Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
FOR ALL
DEVELOPMENTS
Index
1. Self-registration
2. Introduction to HP Systems & Land scape
2.1. Overview
2.2. R/3 systems in HP Landscape APJ, EMEA,SAIL,AMS
2.3. USER Credentials SAMM
2.4. Standard templates
3. Development Standards
3.1. Technical spec. Templates
3.2. Naming convention
3.3. ABAP Documentation Standards
3.4. Custom Program Standards
3.5. Custom ABAP Security
3.6. Unit Test cases & Documents
3.7. Implementing Solution Guidelines
3.8. PCR process code review
3.9. Transport management
3.10. Compliance of custom code
3.11. Project updates
4. Appendix
5. Conclusions
1. Self-Registration
Welcome to HP ES, SAP Technical team, we are request you to enroll your
information in below share point location.
Things to update
a. Name
b. Employee number
c. Official Email ID
d. Experience in ABAP
e. Domain experience
f. Area of expertise
2. Overview
2.1 overview
We have region wise categorized EMEA, SAIL and APJ systems inside HP
landscape. All the projects categorized and specific region wise HP internal
customers.
2.2. R/3 systems in HP Land space
SCIT ASSETS
A. EMEA
FUSION APJ
PROCESS FLOW
SAIL
PDN P2T REL CPO
APJ
FUSION
RSAP
AMS
FUSION
VELOCITY
The SAMM tool is used by end users and approvers to manage your SAP access needs. The sections
below will help guide you through the various requests that can be made using this tool.
If you DO NOT already have a USER ID in the system you need access to, use this link to request a
NEW USER ID.
http://intranet.hp.com/HPIT/WW/SCIT/Ops/Pages/SapAccess_ZUSRV2.aspx
You will have the option to either Select a User Group/Approver directly or COPY User from an existing
user ID. Please ensure the user ID you are copying from is appropriate.
NOTE: If you select to create a new account in multiple systems at once, you will NOT be able to take
advantage of the COPY User functionality. You will have to select an appropriate User Group from the
drop down list in the tool.
If you ALREADY HAVE a User ID in the system you need access to, but need to
update/change the USER ID, use this link to request a variety of actions including:
Password reset (will also automatically unlock your User ID if it is locked due to incorrect logon
attempts)
*Note your PW will be sent to you automatically within 10 minutes.
Unlock user ID only (no password reset)
*Note: your User ID will be unlocked immediately if locked due to incorrect logon attempts.
NOTE: If your User ID has an ADMIN lock on it, you will get a Request ID sent to you and your
approver.
Your Approver must place an SST/HPSC ticket with the local Security team for assistance.
Extend validity if your User ID is expired (error message: "User account not in validity date"
when trying to log in)
Update User Access - used to request additional (or remove) access from your User ID
References & Documentation
This section contains links to helpful references and documentation for end users as well as
Approvers.
SAPGUI Installation
Instance Selector (SAPGUI Setup)
Global Groups (notification of system downtimes)
SAMM End User Guide (please use link below)
SAMM End User & Approver Guide
SAMM Frequently Asked Questions
Password Security & Password Management Policy & Standards
Corporate Common SOD Matrix Please NOTE you must sign in to this Sharepoint (Top
Right hand corner of screen click on "Sign In" button)
IT USERS ONLY - Devkey/Object Key, Service Connection Requests
AMERICAS APPROVERS ONLY - REFERENCE INFO
3. Documentation Standards
3.1 Technical Specification
Mandatory format to fill for all developments
Function specification
Templates for HP standard Technical specification
TDS_RVC_LO002_Z_C
REATE_TR.doc
UTD_Z_CREATE_DISPL
AY_TO_ST12584.doc
3.2 Naming standards
This documents consists of two sections. Section one contains the object naming conventions, and
section two contains several physical implementation guidelines.
ABAP Dictionary naming conventions have been defined for each of the following object types:
Table
Structure
View
Append Structure
Field
Data Element
Domain
Lock Object
Search Help
Secondary Index
BAPI Fields
Note : The names for each of the above should be singular and stored in upper case in SAP. Current site
code usage:
1 = EMEA
2 = PRMO
3 = NA
4 = NA Rep
7 = AP
8 = AP Rep
9 = EMEA Rep
Database Table
Table fields: The field names and the data types of the fields
contained in the table are defined here.
Foreign keys: The foreign keys define the relationships between
this table and other tables.
Technical settings: The technical settings define how the table is
created on the database.
Indexes: Indexes can be defined for the table to speed up data
selection from the table.
Format Zyx
Structure
Definition A structure is used as a placeholder for data produced when
calculations are carried out within programs, or when data is
transferred between programs. While data in a table is stored
permanently in the database, a structure contains data only during
the runtime of a program. Therefore, a structure is defined almost like
a table, except no underlying physical database table is generated for
it.
Note: There is a different Naming Convention for IM/3 Interface
Structures than for ordinary DDIC Structures. Reason for the different
standard is: IM/3 Interface Structures are being generated out of
IM/3. In the current IM/3 versions structure names must not be longer
than 10 characters and must not contain any special characters
IM3 Standard
Format ZyS_xn
Table Types
Definition A table type describes the structure and functional attributes of an
internal table in an ABAP program. Defines the structure of a row of
the table type (row type), the options for accessing data in the defined
internal table (access mode) and the key of the table type.
In ABAP programs you can reference a table type defined in the
ABAP Dictionary with the command DATA <inttab> TYPE TTYP. An
internal table <inttab> is created in the program with the attributes
defined for TTYP in the ABAP Dictionary.
Format ZyT_x
Examples Z1T_VBAK
Type Groups
Definition The ABAP Dictionary supports the definition of user-defined types
(data elements, structures and table types). You can also define the
structure of database objects (tables, indexes and views) in the ABAP
Dictionary. These objects can then be automatically created in the
database with this definition.
Format Zyx
Append Structure
Definition An Append Structure is used to extend a standard SAP table with
custom fields. It is not a separate dictionary object like a Structure,
but is defined/maintained only through the table definition screen. The
primary advantage of using an Append Structure is that it is protected
from being overwritten when the system is upgraded. Therefore, after
an upgrade the fields in an Append Structure are added to the new
standard tables, thereby maintaining any custom extensions that may
have been added to SAP standard tables.
Format During the process of creating an Append Structure, the system
proposes a default name. The current standard is to accept the
proposed name.
Examples ZAVBAK
Field
Definition It is important to note that a field is not an object in the ABAP
Dictionary. It has no associated description, but it provides the link
between a table and a data element, which contains a description.
The data element provides the link to a domain, which contains the
physical characteristics of the field. In other words, physical
characteristics are inherited from the domain to the data element.
Then both physical characteristics and description are inherited from
the data element to the field.
If possible, use the data element name as all or part of the field
name, so that it will inherit its name from the data element.
Notes:
ZZx
Data Element
Definition A Data Element stores field descriptions. All fields assigned to a data element will have
the same description. Data Elements also store the domain name which contain the
physical characteristics of a field.
The Data Element should contain a more detailed description than the Domain. It
should describe the business functionality of the field. The last word of the description
should contain a Data Class word (Amount, Code, Flag, etc). See the Data Class
Words standard for a full list:
http://supplychainit.hp.com/eda/DataDesign/Data%20Class%20Words%20Standard%20Statement.10.03.doc
The Data Element Name should contain 1 - 3 character standard abbreviations of the
original Data Element description. If more than 3 qualifiers are needed to describe an
attribute, use the first character of the 2-character abbreviation of the least significant
word. See the Standard Abbreviations:
http://supplychainit.hp.com/eda/DataDesign/Abbreviations.htm
Notes:
Data Elements are reusable objects; i.e., multiple fields can be based on the
same Data Element. However, although the contextual meaning of the fields
may change, this can only be reflected by extensions to the Data Elements
description.
If there is a 1:1:1 relationship between a particular Domain, Data Element, and
Field, SAP recommends using the same name for all.
Format Zyx
Domain
Definition A Domain stores physical characteristics of a field; i.e., Data Type, Length, and Range
of Values, Validation Table are defined for a Domain.
The last word of the Domain description should contain a Data Class word (Amount,
Code, Flag, etc). See the Data Class Words standard for a full list:
http://supplychainit.hp.com/eda/DataDesign/Data%20Class%20Words%20Standard%20Statement.10.03.doc
http://supplychainit.hp.com/eda/DataDesign/Abbreviations.htm
Notes:
Domains are reusable objects; i.e., multiple Data Elements can be based on
the same Domain.
If there is a 1:1:1 relationship between a particular Domain, Data Element, and
Field, SAP recommends using the same name for all
Standard SAP-defined Domains should be used instead of custom-developed
Domains where possible. Some are generic in that they are not associated
with a Check Table, which is used to verify range of values. An example of a
generic SAP Domain is NUMC09.
SAP has recommended not using the INT data type for any primary key fields.
Format Zyx
Format Ext
t = Lock type
S = Shared
X = Exclusive
Examples EZ3TSLSORDX for a lock object for the table Z3TSLSORD
Search Help
Definition Help views are used to output additional information when the online help
system is called.
Format Format for SAP Standard Tables
Zyx
Z = Custom Designation
Z2
BAPI Fields
Definition BAPIs are interfaces for Business Objects. Together with the Business
Objects, BAPIs define and document the interface standard at the business
level. BAPI fields are merely fields within a structure in the ABAP Dictionary.
A BAPI structure is used to pass data to and from a BAPI function module.
Because the structure has visibility outside of SAP, it makes sense to use
meaningful descriptive names for the structure fields.
Format Program BAPIFELD, offered in SAP 4.6, generates English defaults for
external BAPI structures. The recommended default values should be used
when creating BAPI related structures.
Examples N/A
SECTION II - Implementation Guidelines
Table Normalization
SAP recommends normalizing custom tables and only denormalizing them in one of the following two
cases:
The reason SAP recommends the use of prudence when denormalizing data is because the use of triggers
and stored procedures are not available to ensure the integrity of the redundant data often inherent in
denormalizing data. As a result, programs must be used to keep the redundant data in sync, and all it will
take to corrupt the data is one poorly written program. Denormalization also reduces data usefulness,
flexibility and limits access paths, making it less compatible with user query tools.
Therefore, the going in position for each custom table is that it should be in Third Normal Form when initially
implemented unless its denormalization can be justified.
Development Class
See Object naming standards for Development Class
Table Class
The Table Class determines the tablespaces in which the tables and indexes will be physically stored.
Therefore, if tables are to be successfully created in the tablespaces assigned to a particular project, they
must be created using the Table Class associated with the tablespaces.
Two tablespaces are associated with each USERn Table Class: one for data and ano ther for indexes.
When physical database objects are activated with a particular Table Class, they are stored in the
tablespaces associated with the Table Class.
Please contact the Regional Basis for assignment to a Table Class before defining any cus tom tables in
SAP. If all existing USERn Table Classes are inappropriate for the new project, SAP System Administration
must create a new USERn Table Class and relate it to two new tablespaces before the project can begin
custom table development.
Delivery Class
The delivery class indicates whether a table is an application table, control table, or system table. It also
indicates whether the table is maintained by the user or by SAP, and whether it is delivered by SAP with or
without contents.
Authority/Responsibility
The creation and transport of all custom ABAP Dictionary objects is the responsibility of the assigned SAP
developer. Adherence to this standard is monitored at the regional level by the designated transport
approvers.
General guidelines are provide below for each of the standard components.
Comment Block
All custom programs should include the following comment block at the very top of the program.
***********************************************************************
* Title : *
* Author Name : *
* Create Date : *
* Reference Number : *
* Specification Name : *
* Purpose : *
* Developer Notes : *
*---------------------------------------------------------------------*
* Revision History *
* User-ID Description *
* xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*
***********************************************************************
Reference Num: Reference number which identifies the request. EtcOVSD, OVSC, Teamplay
Specification Name: The repository file name of the Specification that contains the program
specifications
Purpose: This section should describe the overall functional purpose of the program, and how it works, in
concise terms
Developer Notes: Special notes for future developers. This may include areas for potential
improvement, unit testing hints, etc.
Revision History
All program changes should be documented in the "Revision History" section of the comment block. The
revision history entry should contain a header line that contains the date, programmer name, and
reference (SR number, project name, etc.). Comment the changed lines of code with the same reference
number. The reference number therefore links the revision history entry with the related source code
changes. After the changes have been in production for a couple of months it is suggested that
superfluous comments be removed from the source code in order to maintain the readability of the
program.
*If a lot of program changes are being implemented it may be more efficient to avoid commenting every
changed line with a reference number. Comment lines can instead be added to mark the beginning and
end of changed sections. For extensive changes that make even that difficult, the reference column can
indicate to see the version management to identify the changes.
Following the header line you should describe the purpose of the code changes, i.e. why the code was
changed. For readability it helps if you indent these lines of text by one or two characters. Don't be afraid
to enter too much information! What you consider as common knowledge today may be forgotten in just
a few months. Help us remember. Include these things:
Sometimes changes are made to subroutines to modify the behavior of a module pool (transaction) or
function module. These subroutines are usually contained in form includes. If the subroutine changes
are not also documented at the top of the main program, it can be difficult to ascertain where the relevant
changes were made. Therefore, you should create two revision history entries in this case. One in the
form include that contains the subroutine, and one at the top of the main program - indicating the
subroutine and include program that was modified. In this way the main program contains a complete
reference list of all the modifications made to its various includes.
Document internal data fields, structures, table definitions, and parameters by describing what
they will be used for.
Document the contents of referenced message texts and text symbols. For example:
*Invalid Purchase Order Number for this
Sold-to Party
MESSAGE E046.
WRITE "Sold-to Party"(001).
MESSAGE E005. "Please enter a unit of
measure
Document complex or lengthy statements such as table joins, compound tests, compound
calculations, complex conditional processing, nested operations, etc.
Document lines or sections that were difficult to code, or where you had to refer to the help (the
reader will likely have the same problem).
Document, or better yet, avoid tricky code.
Document expected database access paths (table indexes, sequence of table joins) if they are
considered important.
Document the end of lengthy operations such as ENDIF, ENDLOOP, ENDFORM. For example:
ENDIF. "if quantity greater than
zero
ENDLOOP. "Loop at sales order items
ENDFORM. "validate input data
Form Documentation
Subroutines should be created for logical blocks of code when they are; performed more than once, or
are lengthy and would aid readability. For the latter you should consider breaking the code down into
smaller manageable units since subroutines should generally be kept short (no more than a few pages)
so that their mechanics can be easily grasped. You should also avoid over modularization, i.e. creating
subroutines for very simple operations (unless they are duplicated extensively), or shor t routines that are
only called once (those tend to make program navigation more difficult). The goal is to strike a balance
between good program modularity and easy program navigation.
1. A comment block that documents the functional purpose of the routine (what the routine is
accomplishing), as well as the meaning of all its parameters. Subroutines should have one
clearly defined purpose or task. The comment block should be coded directly above the
subroutine.
Note: Pretty Printer will automatically insert the basic structure of the comment block. You can also
create the form interface (if it does not already exist yet) by double clicking on the form name in the
PERFORM statement.
*---------------------------------------------------------------------*
* FORM name *
*---------------------------------------------------------------------*
* Functional Purpose *
*---------------------------------------------------------------------*
*---------------------------------------------------------------------*
SAP Exits
Custom exit routines must include their own special comment block and revision history that appears
directly above the FORM. This is in addition to the comment block at the top of the include program.
When a form is first created (or later changed) a simple entry should be made in the modification history
comment block at the top of the include program. Such as:
This gives an overview of the modifications made to the various forms within the include program. The
detailed revision history entry should be created in the corresponding FORM comment block below.
*---------------------------------------------------------------------*
* FORM name *
*---------------------------------------------------------------------*
* Author Name : *
* Create Date : *
* Reference Number: *
* Specification Name: *
* SAP Exit : *
* FORM Purpose : *
* : *
*---------------------------------------------------------------------*
*---------------------------------------------------------------------*
* Revision History *
* Date Programmer Name Reference Number *
* User-ID
Reference Number: This should be the original service request number (or equivalent)
Specification Name: The repository file name of the specification that contains the exit routine
specification
SAP Exit: The name of the calling SAP userexit or function exit
FORM Purpose: This section should describe the overall functional purpose of the form, and how it
works, in concise terms. Also include the following items as appropriate:
Declare all tables and global data in the top include userexit. Do not declare global data in a form
include outside of a form.
All custom global data names must be prefixed with the letters ZZ
All custom form names must begin with the letters ZZ
Only code PERFORM statements within the SAP exit routine. For function exits, the custom
code can be entered directly into the ZX include (within the function module) if the global interface
flag has not been set and passing the interface data would be cumbersome.
Minimize the usage of the system Literal table
Only modularize your routines when it is absolutely necessary, or consider implementing your
code in a function module instead
Do not use hard coded strings as MESSAGE variables
Programming Conventions
Readability of the source code can be improved dramatically by following certain standard programming
conventions and style guidelines as follows:
Type 1 (executable) programs should be arranged in the following generally accepted sequence:
1. Report statement
2. Table declarations
3. Data declarations
4. Data INCLUDES
5. Selection screen definition
6. Initialization
7. At selection-screen
8. Top-of-page, End-of-page
9. At line-selection, At user-command
10. Start-of-selection
11. End-of-selection
12. Forms
13. Form INCLUDES
Note: Top includes and form includes should not normally be created unless more than one program
needs the same data or forms, or it becomes necessary to break the program down into includes for
readability and maintainability, i.e. for very large programs.
Data Names
CONSTANTS C_ or
CONST_
Other generally W_, WA, [Type DDIC field] WA_NETPR LIKE VBAP-NETPR
accepted prefixes for TEMP, etc.
Global and Local
DATA work area fields
End Users
Business or Functional Analysts
Support teams
Programmers
Since not everyone in the audience may be capable of reading ABAP source code, the program
documentation is usually their primary resource for understanding the program's purpose, requirements,
and output. Even if they know ABAP, program documentation can convey basic information about a
program quicker than by reading the source code.
The following section provides content guidelines for documentation within the template provided by SAP
in the documentation editor. You are free to add additional paragraph sections as appropriate.
Purpose
This section should describe:
Prerequisites
Features
Selection
How to use all of the available execution features:
- Select-options
- Parameters
- Performance expectations and hints
- Input suggestions and examples
Standard Variants
Print output
- Sort options
- Output field descriptions & Definition of calculated fields
- Control breaks and totaling
- Section definitions
- Available interactive functions
File output
- File path and names
- Format and contents
- Receiver
- Purpose
Database output
- Called transactions (or update functions, e.g. Direct Input, ALE, BAPI), including the
primary data used to create those transactions
- Batch input session names & processing requirements
- Direct tables updates
Miscellaneous
- Job log messages
- Usage of standard texts or layout sets
Authority/Responsibility
ABAP programmers must be familiar with, and adhere, to these program documentation standards.
Adherence to this standard is monitored at the regional level by the designated development and
transport approvers.
PROGRAMMING STANDARDS
This section contains a list of ABAP coding standards, as well as some efficiency standards. The
purpose of these standards is to:
Encourage consistent practices among programmers: Programs coded by
different people should follow standard coding conventions.
Provide internal documentation: Programs should be documented to the extent
that another programmer could follow the logic of the code.
Improve readability: Programs should follow a format that makes the code
easy to read.
2.0.General Rules
Standard:
2.0.1. ABAP programs that update master and transactional data MUST
ALWAYS use SAP transaction codes (where transaction codes are
available) by utilizing BDC or call transaction utilities. The only
exception to this would be the use of a BAPI or "direct input" program
provided by SAP. These methods ensure that logical units of work,
rollback, locking operations and edits are performed. SAP-supplied tables
MUST NEVER be updated directly by custom programs.
2.0.2. ABAP programs MUST NEVER be used to update configuration tables.
2.0.3. SAP-delivered ABAP programs, Dynpros, SAP transactions and Batch
programs should never be changed without the approval of the
Development Team Leader. SAP approval will also generally be required.
If it becomes necessary to modify one of these objects, then, if possible,
the object should be copied to a new name using SAP naming standards,
and modifications should be made to the copied object.
2.0.4. Before writing any code, make sure that no existing programs or function
modules, either custom or SAP-supplied, satisfy the coding requirements.
2.0.5. If custom coding is necessary, attempt to write the module so that it is re-
usable and can be stored in a central library. Function modules are an
example of this approach.
2.1. Coding Style
Standard:
2.1.9. Comment all subroutines with their purpose. Comments should explain
the business reasons for the code in a particular section and what the code
in that section is accomplishing. Comments should not explain individual
ABAP commands. Allow the ABAP editor to generate the comment box,
by coding the "PERFORM <form>" statement and double-clicking on the
<form>. Be sure to document the input and output parameters for the
specific form in the comment box.
2.1.10. Dead Code should be removed from the program, i.e., the fields which are
never referenced and code which can never logically executed.
Guideline :
2.1.14. The ABAP editor has a PP (Pretty Printer) command to indent specific
lines of code by 2 positions and add subroutine comments. Menu path:
program/pretty printer in ABAP Editor. However, since this command is
CPU intensive, its use should be kept to a minimum. Use it only after
making a series of changes for a new version of the program, rather than
after each individual change.
2.2. Report Standard
Standard :
2.2.5. There should be no hard-coding of date formats in the programs, The date
format of the users default information (SU50) should be used to output
any date.
2.2.6. There will be no hard-coding of currency output formats in our programs.
The decimal notation of the users default information (SU50) should be
used to output any currency value.
2.2.7. The European standard paper size is A4 (210 x 297 mm) whereas the US
standard is Letter size (8.5 x 11 inches). A4 is a little bit longer and a little
bit narrower than Letter size paper. The reports should be designed so that
they will work on either paper size, so we dont end up creating two
versions of a report simply to accommodate the different dimensions.
This means we should design our reports to fit on the minimum dimension
of each, in Landscape orientation the report should be designed to fit
Letter length (11 inches) and A4 width (210 mm).
Tip :
2.2.8. Dates in ASCII interface files (flat files) should be of the form
CCYYMMDD. This is reasonably unambiguous, makes sure we have no
year 2000 issue, and allows the file to be sorted on the date. When creating
a BDC session the ABAP should use the user default date format when
formatting the record for the screen. We cant make assumptions about the
date format of the user executing the program.
2.2.9. SAP currently does not support multiple time zones, so the time used in
the system is the time that the database server is set to. The system field
SY-TZONE indicates the time difference in seconds to GMT time.
2.3. Data Definition
Standard :
2.3.1. Use CONSTANTS for variables whose values do not change (Static
Data).
2.3.2. Define CONSTANTS rather than Text Elements for these non-output hard
code literals in the program. For example:
CONSTANTS : C_ONE_THOUSAND TYPE I VALUE 1000,
C_TRUE TYPE C VALUE TRUE,
C_FALSE TYPE C VALUE FALSE.
2.3.3. For each field, include a comment (after the field) describing the use or
purpose of the field.
2.3.4. LIKE verb is used while declaring the fields whenever feasible, e.g. when
assigning internal fields that are to hold values from databases, use the
LIKE option to ensure that the variables have identical characteristics.
2.3.5. Data length and data type are not left as default.
2.3.6. Only one table shall be listed on any one line of the program, and the table
description should be added as the end of line comment.
Example:
TABLES: T001, Company codes
T100, Messages
TAPLT. Program applications
TDCT, Dialog Modules
2.3.7. INCLUDES are created for data declarations and any data structures that
will be used in more than one ABAP program.
Guideline :
I2 = <F>. I2 = <I>.
I3 = <F>. I3 = <I>.
I4 = <F>. I4 = <I>.
Standard :
2.4.1. Always define the field with a Format = OK as OK_CODE. This field is
used to validate the OK Event.
2.4.2. Define all global data in the main program (TOP) module instead of the
PBO/PAI.
2.4.3. To handle a lock entry failure, invoke an error message (type E) to prevent
any further progress but leaving the user on the current screen. The user
can then take an alternative action or continue to try to lock the object. To
minimize the impact on users, limit retries.
2.4.4. When activating buttons or boxes, activate the associated text as well. This
enables the user to click on either the button/box or the text.
2.4.5. Do not use AT PFnn in programs. Instead use the function name so that
any method of invoking the function will have the same effect as the use
of the PF-Key.
Guideline :
2.4.6. Use Data Dictionary names (short, medium, long) for field text on screens
where applicable.
2.5. Batch Program / Interface Standards
Standard :
Guideline :
2.5.3. Message statements executed in batch programs are output to the txn
SM37 "Job Log". "Success" messages (type 'S') should be used
generously to provide an audit trail of the program's execution.
2.5.4. Define Logic filename as parameters
See the following example:
DATA: G_PDSNME LIKE FILENAME-FILEEXTERN. "Physical Dataset
Name.
AT SELECTION-SCREEN.
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
LOGICAL_FILENAME = P_LDSNME
IMPORTING
FILE_NAME = G_PDSNAME
EXCEPTIONS
FILE_NOT_FOUND = 01.
IF SY-SUBRC <> 0.
*-------No physical filename can be determined for &
MESSAGE E016(MG)WITH P_LDSNME.
ENDIF.
START-OF-SELECTION.
IF SY-SUBRC <> 0.
* Insert error processing here.
ENDIF.
2.6. Message
Standard :
2.6.1. Do not use SAP-supplied default message IDs, as these IDs can change
from release to release. Instead, copy these messages to customer
message IDs.
Guideline :
Standard :
2.7.1. A program should test the system return code field (SY-SUBRC) after any
statements that could potentially change its value unless the outcome of
the statement is not important for subsequent processing. The return code
should always be checked after any database table read/update statements.
Guideline :
I1 = 0. I1 = 0.
ENDDO.
Notes: The runtimes depicted in this manual are just sample measurement, they are measured
on multi-processor environment, they are, however, not runtime measurement
benchmarks.
ENDLOOP. ENDLOOP.
Tip :
Standard :
2.8.1. In a SELECT statement, only the fields that are needed are selected in the
order that they reside on the database, thus network load is considerably
less. The number of fields can be restricted in two ways using a field list in
the SELECT clause of the statement or by using a view defined in ABAP
Dictionary. The usage of view has the advantage of better reusability.
Select * Select with select list
ENDSELECT.
ENDSELECT.
ENDSELECT. ENDSELECT.
2.8.4. Use a select list with aggregate functions instead of checking and
computing, when try to find the maximum, minimum, sum and average
value or the count of a database column, thus network load is considerably
less.
Select Where + Check Select using an aggregate function
ARBGB = '00'.
C4A = T100-MSGNR.
ENDSELECT.
Guideline :
2.8.5. Always select into an internal table, except when the table will be very
large (i.e., when the internal tables will be greater than 500,000 records).
Use Up to N Rows when the number of records needed is known
Select + Append statement Select Into Table
APPEND X006.
ENDSELECT.
ENDLOOP.
2.8.7. ORDER BY statement is used in SELECT only if it can use an index else
sorting is effective by reading into an internal table and use the SORT
statement in the program.
Order by with index Order by without index
ENDSELECT.
Tip :
2.8.11. No complex WHERE clauses, since complex where clauses are poison for
the statement optimizer in any database system.
2.8.12. For all frequently used SELECT statements, try to use an index. You
always use an index if you specify (a generic part of) the index fields
concatenated with logical ANDs in the Select statement's WHERE clause..
Select without index Select with primary index support
support
ENDSELECT.
ENDSELECT.
2.8.13. Use SAP buffering for accessing frequently used, read-only tables,
network load can be considerably less. However, in case of retrieving
latest data in multi-user environment, you may need to bypass the buffer.
Select without buffer Select with buffer support
support
SFLIGHT-SEATSOCC - 1.
UPDATE SFLIGHT.
ENDSELECT.
Standard :
* Table TAB is filled with 100 * Table TAB is filled with 100
entries of 500 bytes each entries of 500 bytes each
Guideline :
2.9.3. Header line of internal table is cleared before moving data into it.
2.9.4. Internal table is defined with OCCURS 0 if the maximum size of the
table is potentially >=8K. If the data to be read is estimated to be under
8K, then specifying the number of lines in the OCCURS statement (e.g.
itab1 occurs 10) is effective.
2.9.5. LOOP ... WHERE is faster than LOOP/CHECK because LOOP ...
WHERE evaluates the specified condition internally. The performance
can be further enhanced if LOOP ... WHERE is combined with FROM i1
and/or TO i2, if possible.
Key access with LOOP/CHECK Key access with LOOP
WHERE
* Table TAB is filled with 100 * Table TAB is filled with 100
entries of 500 bytes each, entries of 500 bytes each,
ENDLOOP.
Tip :
2.9.6. Use explicit work area operations rather than header line where
appropriate, since header line will have unnecessary MOVEs involved.
Table operation via header Table operation via explicit
line work area
* The line width of table TAB is * The line width of table TAB
500 bytes is 500 bytes
APPEND TAB.
2.9.7. Use one-step approach READ/INSERT. If the amount of data is small (<
20 entries), or if users need read-access to the internal table while it is
being filled, however, if the data amount is larger and you need read-
access only to the completely-filled table, the two-step algorithm
APPEND/SORT or three-step approach APPEND/SORT/DELETE
DUPLICATE(for tables without duplicates) is preferable.
One-step approach: Two-step approach: APPEND,
READ/INSERT then SORT
ENDLOOP.
ENDIF.
ENDLOOP.
Runtime Measure(in microsec): Runtime Measure(in microsec):
22,663 14,888
ADD: TAB_SRC-VAL1 TO
TAB_DEST-VAL1,
TAB_SRC-VAL2 TO
TAB_DEST-VAL2.
ELSE.
ENDIF.
ENDLOOP.
* Table TAB is filled with 1000 * Table TAB is filled with 1000
entries entries of 100 bytes each
* The READ ends with SY- * The READ ends with SY-
SUBRC=4 SUBRC=4
READ TABLE TAB WITH KEY K = READ TABLE TAB WITH KEY K =
'X'. 'X' BINARY SEARCH.
2.9.11. Specify the key fields for read access explicitly, use READ TABLE
WITH KEY k = X instead of READ TABLE WITH KEY. Otherwise,
the key fields have to be computed dynamically by the run time system.
Access via implicit default key Access via key specified
explicitly
* The READ ends with SY- * The READ ends with SY-
SUBRC=4 SUBRC=4
TAB-K = 'X'.
2.9.12. Internal tables can be compared, copied in logical expressions just like
other data objects. Two internal tables are equal if
- they have the same number of lines and
- each pair of corresponding lines is equal.
If an internal table itab has a header line, the table itself is accessed by
itab[].
Pedestrian way to compare Let the kernel to do the work
internal tables
* Tables TAB1 & TAB2 are each * Tables TAB1 & TAB2 are each
filled with 100 entries filled with 100 entries
ENDIF.
IF L1 <> L2.
TAB_DIFFERENT = 'X'.
ELSE.
TAB_DIFFERENT = SPACE.
LOOP AT TAB1.
ENDIF.
ENDLOOP.
ENDIF.
IF TAB_DIFFERENT = SPACE.
" ...
ENDIF.
2.9.13. Use parallel cursor instead of join two tables or nested loop. If TAB1 has
n1 entries and TAB2 has n2 entries, the time needed for joining TAB1 and
TAB2 with the straightforward algorithm is O( n1 * log2( n2 ) ), nested
loop is O( n1 * n2 ), whereas the parallel cursor approach takes only O( n1
+ n2 ) time. Binary search is used when parallel cursor is not feasible and
the number of entries in the internal table is greater than 20.
Nave join: loop tab1, read tab2 More sophisticated: use
with key parallel cursor
* Table TAB1 is filled with 1000 * Table TAB1 is filled with 1000
entries of 100 bytes each entries of 100 bytes each
* Table TAB2 is filled with 300 * Table TAB2 is filled with 300
entries of 100 bytes each entries of 100 bytes each
* order
I2 = 1.
READ TABLE TAB2 WITH KEY READ TABLE TAB2 INDEX I2.
ENDLOOP. ENDIF.
ENDLOOP.
* Table TAB1 is filled with 100 * TAB1 is filled with 100 entries
entries of 100 bytes each of 100 bytes each
* Table TAB2 is filled with 10 * * TAB2 is filled with 10 * 100 =
100 = 1000 entries of 1000 entries of 100 bytes each
LOOP AT TAB1. I2 = 1.
ENDLOOP. I2 = SY-TABIX.
EXIT.
ENDIF.
ENDLOOP.
ENDLOOP.
2.9.14. Use the MODIFY variant MODIFY itab ... TRANSPORTING f1 f2 ...
for single line, and MODIFY itab ... TRANSPORTING f1 f2 ... WHERE
condition for a set of line, to accelerate the updating of internal table. The
longer the table line is, the larger the speed-up is. The effect increases for
tables with complex structured line types.
Modifying all components of Modifying selected
single line components only
* Table TAB is filled with 5000 * Table TAB is filled with 5000
entries of 500 bytes each. entries of 500 bytes each.
ENDLOOP. ENDLOOP.
* Table TAB is filled with 100 * Table TAB is filled with 100
entries. A line has two entries. A line has two
* The Flag is switched on for all * The Flag is switched on for all
100 lines. 100 lines.
ENDIF.
MODIFY TAB.
ENDLOOP.
2.9.15. Use APPEND LINES OF itab1 TO itab2 and INSERT LINES OF itab1
INTO itab2 INDEX idx instead of APPEND and INSERT. And thus the
task of appending and insert a table to another table can be transferred to
the kernel.
Pedestrian way to append a Let the kernel to do the work
table
ENDLOOP.
ADD 1 TO IDX.
ENDLOOP.
* each and contains 500 pairs of * each and contains 500 pairs of
duplicates duplicates
READ TABLE TAB_DEST INDEX 1 DELETE ADJACENT DUPLICATES
INTO FROM
IF TAB_DEST = PREV_LINE.
DELETE TAB_DEST.
ELSE.
PREV_LINE = TAB_DEST.
ENDIF.
ENDLOOP.
* each, and lines 450 to 550 are * each, and lines 450 to 550 are
to be deleted to be deleted
ENDDO.
* each, 250 of which match the * each, 250 of which match the
WHERE condition WHERE condition
DELETE TAB_DEST.
ENDLOOP.
Runtime Measure(in microsec): Runtime Measure(in microsec):
4,813 3,771
2.9.17. The performance gain when using DELETE itab WHERE ... instead of
LOOP AT itab WHERE ... DELETE itab. ENDLOOP. increases with the
number of entries the internal table contains and the number of lines to be
deleted.
2.9.18. If the data is processed only once, use a SELECT-ENDSELECT loop
instead of collecting data in an internal table with SELECT .INTO
TABLE because the Internal table handling takes up much more space.
SELECT * FROM <TABLE> SELECT * FROM <TABLE>
LOOP AT <INT-TAB>.
..
ENDLOOP.
2.9.19. Internal tables can be copied by move just like any other data object. If the
table has a header line then the tables need to be referenced by square
brackets.
ITAB[] = ITAB1[]. LOOP AT ITAB INTO ITAB1.
APPEND ITAB1.
ENDLOOP.
2.9.20. Internal tables are freed when no longer needed (either by the free
command or a subroutine exit), especially when the tables are large or the
program is a batch program.
2.10. String Operation
Guideline :
2.10.1. Use the special operators CO, CA, CS, instead of programming the
operations yourself. If ABAP statements are executed per character on
long strings, CPU consumption can rise substantially.
DO-Loop with Field-Symbols Using the CA operator
"...any actions
"...any actions
EXIT.
ENDIF.
ENDDO.
" MOVE 'New York City' TO CMC. " MOVE 'New York City' TO
CMC.
MOVE CMA(SY-FDPOS) TO
AREA_CODE.
I1 = I1 - 1. TEL_NO2.
MOVE CMA+I1(SY-FDPOS) TO
TEL_NO1.
I1 = I1 + SY-FDPOS + 1.
2.10.3. If you want to delete the leading spaces in a string, use the ABAP
statement SHIFT...LEFT DELETING LEADING... . Other constructions
(with CN and SHIFT...BY SY-FDPOS PLACES, with CONDENSE if
possible, with CN and ASSIGN CLA+SY-FDPOS(LEN) ...) are not as
fast. In any case, avoid using SHIFT inside a WHILE-loop!
Shifting by SY-FDPOS places. Using SHIFT LEFT DELETING
LEADING
" CLA contains the string " CLA contains the string
Tip :
2.10.4. Some function modules for string manipulation have become obsolete and
should be replaced by ABAP statements or functions:
STRING_CONCATENATE... -> CONCATENATE,
STRING_SPLIT... -> SPLIT,
STRING_LENGTH -> strlen(),
STRING_CENTER -> WRITE...TO...CENTERED,
STRING_MOVE_RIGHT -> WRITE...TO...RIGHT-JUSTIFIED,
Use of a CONCATERNATE Use of the CONCATERNATE
function module statement
EXPORTING T100-MSGNR
STRING2 = T100-MSGNR
STRING3 = T100-TEXT
IMPORTING
STRING = CLA
EXCEPTIONS
TOO_SMALL = 01.
2.10.5. Use the strlen( ) function to restrict the DO loop to the relevant part of the
field, e.g. when determining a check-sum.
Get a check-sum with field Get a check-sum with strlen()
length
"DATA: BEGIN OF STR, LINE TYPE "DATA: BEGIN OF STR, LINE TYPE
X, END X, END
"OF STR, CHECK_SUM TYPE I. "OF STR, CHECK_SUM TYPE I.
I1 = STRLEN( CLA ).
ENDDO. ENDDO.
2.10.6. Use "CLEAR f WITH val" whenever you want to initialize a field with a
value different from the field's type-specific initial value.
Initializing with Initializing with CLEAR WITH
CLEAR/TRANSLATE val
A separate ALE Technical Specification template has been designed to cover ALE
related interfaces template is contained within the ABAP Development
Standards
Interfaces may support more than one record type each record type will have
a corresponding IDOC
Each IDOC will map to one Message Type and there will be one Technical
Specification per message type per direction of interface.
There will be one test plan per Technical Specification i.e. by message type
There will be one Development Check-list per interface message type which will
be used to validate that interface is set-up correctly in each Instance/Client
interface will be operational (this will include Unit/String/Integration/volume
test clients as well as training and production)
All ALE Configuration set-ups for Client Dependent or Independent elements will
be documented in a configuration script, refer to SAP Template Design
standards for details.
All ALE non- configuration set-ups, for example ALE batch jobs, field level
change pointers will be registered in Non Transportable Objects document
The general principle is to utilise the main ALE standard scenarios i.e.
Message types and IDOC structures in order to reduce long term maintenance
and upgrade risks. In addition,
The preferred design is to minimise Routing and/or ALE Data Controls and allow
these requirements to be controlled by the Middleware HUB
The initiating source will not be identified at technical level within the ALE
layer/Idoc structure any source identification will be part of application data e.g.
plant. (However, if this is required for inter-system audit - i.e. the ability to map
the message sent from one system to the message received at the other, then a
standard procedure will be introduced for adding the required data to an IDOC).
Workflow will be used as primary method for error handling and reprocessing.
No batch file controls will be applied to ALE/Idoc interfaces within the ALE layer,
alternative business/compensating controls will need to be available or written.
There are three generic scenarios that apply to ALE interfaces, the
development effort associated to these scenarios is provided in Middleware
Services Agreement.
Standard Scenario:
Standard IDOC exists that matches required data elements
Standard Triggering technique will be used i.e. change pointer, output
determination
Standard Message Type available for IDOC
No modifications to the ABAP Repository objects will be required
Extended Scenario:
An extended scenario has the following characteristics
Custom Scenario:
A custom scenario has the following characteristics
New basic IDOC and/or IDOC segments have to be created
A specific triggering mechanism has to be created i.e. selection screen built
ABAP repository objects have to be created in order to meet business
requirements.
Master Data:
Master data interfaces requiring Real Time data transfer will use Workflow and
change pointer methods to initiate transfer
Master data interfaces that require periodic processing will use the standard
SAP supplied Change Pointer program, RBDMIDOC, to initiate transfer
Adhoc requests for Individual, Mass or complete refresh of master data will be
performed manually using the standard SAP programs within the BALM
transaction
The decision on which technique to apply will be based upon the business
requirements or the need to spread volume over course of working day
Only fields identified as change fields will have active change pointers
set for transfer
Transaction Data:
If Output determination functionality is available within that business
transaction then this will be the preferred method for transfer
Where no output determination is available for real time or batch then a user
exit will be used to hard code entry into NAST table
Real time interfaces will use output determination with trigger immediately
profile to transfer the data
Output determination will also be used for batch transfer of transaction data
by running NAST transfer program (RSNASTED) in periodic batch on manually
on-line.
For custom Message types requiring specific application triggering then
a selection screen will be made available for initiating the interface
Outbound Processing:
All errors in ALE will be sent to Workflow for investigation or reprocessing
ALE reprocessing program will be run periodically to re-send application data
in error
For real-time interfaces the Message types will be set to Process Immediately
within the partner profile
Packet sizes will be determined based upon performance and optimisation
analysis during testing, default will be set to 50
Periodic Processing will be assigned to a Server group to ensure that SAP work
processes are not degraded during interface execution
For custom IDOCS that require event triggering from within the standard
SAP transactions, a function module will be created otherwise, a separate
standalone program will be written
Inbound Processing:
All errors in ALE inbound processing will be sent to Workflow
ALE reprocessing program will run periodically to re-send application data in
error
For real time interfaces message types will be set to trigger immediately within
the partner profile
For batch processing of IDOCS the message type will be set to trigger by
background program, a separate batch job will be required for this interface
type
Server Groups will be utilised for batch inbound processing. In near-real time
processing the Link for R/3 can utilise logon groups which can be set up with
the same application servers as the application group. A separate document:
ALE Server Group Usage.doc details this process.
All relevant Parameter IDs must be cleared before a Call Transaction
command is issued. This ensures that redundant ABAP memory
(maintained from a previous interface run) is cleared. This is required
due to the logon characteristics of the Link for R/3.
For custom IDOCS there are alternative approaches for processing the data
into SAP, in order of preference the following techniques will be used
Error Handling:
Workflow will be used as the mechanism to handle all ALE related errors
All messages will be sent to user inbox for re-processing
ALE reprocessing program will run periodically to process application
errors and IDOCS that have been edited
Work Items:
Work Items archiving will be performed on WORKITEM object
Work Item archiving will be undertaken at X monthly intervals for work items
that are more than XX weeks old
The standard ABAP programs supplied for ALE reporting will be preferred solution to
providing interface processing reports. Separate variants will be set-up for Master and
Transaction data for these standard reports. Active Consistency check will be performed
once weekly to ensure Distribution model and Partner profiles are aligned. Active
monitoring will be performed for each message type or group of message types values
for active monitoring will be not be defined until integration testing. Regular reporting
of all message types in error can be performed. See ALE Error Handling Approaches for
IDOC reporting (success or failure IDOCs).
*&---------------------------------------------------------------------*
*& TABLES:
*&---------------------------------------------------------------------*
tables:
*&---------------------------------------------------------------------*
*& CONSTANTS:
*&---------------------------------------------------------------------*
constants:
*&---------------------------------------------------------------------*
*& VARIABLES
*&---------------------------------------------------------------------*
data:
*&---------------------------------------------------------------------*
*& STRUCTURES
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& INTERNAL TABLES
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& SELECT-OPTIONS
*&---------------------------------------------------------------------*
select-options:
*&---------------------------------------------------------------------*
*& PAPAMETERS
*&---------------------------------------------------------------------*
parameters:
************************************************************************
* INITIALIZATION
************************************************************************
* Event which occurs before the selection screen is
* shown to the user. It happens only once and is
* ignored in background processing.
INITIALIZATION.
************************************************************************
* AT SELECTION-SCREEN
************************************************************************
* Event which occurs each time the user hits enter on * the selection screen. This event is ignored
in
* background processing.
AT SELECTION-SCREEN.
************************************************************************
* TOP-OF-PAGE
************************************************************************
TOP-OF-PAGE.
************************************************************************
* END-OF-PAGE
************************************************************************
END-OF-PAGE.
************************************************************************
* START-OF-SELECTION
************************************************************************
START-OF-SELECTION.
GET ...
************************************************************************
* END-OF-SELECTION
************************************************************************
END-OF-SELECTION.
SORT ...
LOOP ...
AT FIRST
...
ENDAT.
AT NEW
...
ENDAT.
AT END OF
...
ENDAT.
AT LAST.
...
ENDAT.
ENDLOOP.
*&---------------------------------------------------------------------*
*& Form SUB_ INSERT_ENTRIES
*&---------------------------------------------------------------------*
* xxxxxxxxx xxxx xxxx xxx xxxxx xxxx xxxxx xxxx xx xxxxxx xxxx
*----------------------------------------------------------------------*
FORM SUB_INSERT_ENTRIES
...
ENDFORM.
APPENDIX A-2. Interactive ABAP List Report
*&---------------------------------------------------------------------*
*& Program Name : Zxxxxxx *
*& Author : xxxxxx xxx , xxxxx xxxxx *
*& Creation Date : xx/xx/xxxx *
*& Program Type : Reports *
*& SAP Release : 4.6D *
*& Description : xxxxxxxxxx xx xxxxxx xxxxxxx xxxx xxxx xxxxx *
*& xxxx xx xxxxxxx xxxx xx xx xx xxxxxxxxx *
*& Transport No : xxxxxxxxxx
*&---------------------------------------------------------------------*
*& Revision Log *
*& Date : x/xx/xx *
*& Author : xxxxxx xxx *
*& Description: xxxxx xxxxx xxxxxxx xxxxxxxx xx xxxx *
*& xxxxxxxxx xxx xxx xxxxxxxx *
*&---------------------------------------------------------------------*
REPORT ZSKELINT
no standard page heading
message-id xxxx
line-count xxxx
line-size xxxx.
*&---------------------------------------------------------------------*
*& TABLES:
*&---------------------------------------------------------------------*
TABLES: ...
*&---------------------------------------------------------------------*
*& VARIABLES:
*&---------------------------------------------------------------------*
DATA: ...
*&---------------------------------------------------------------------*
*& SELECT OPTIONS:
*&---------------------------------------------------------------------*
SELECT-OPTIONS: ...
*&---------------------------------------------------------------------*
*& PARAMETERS:
*&---------------------------------------------------------------------*
PARAMETERS: ...
*&---------------------------------------------------------------------*
*& FIELD SYMBOLS:
*&---------------------------------------------------------------------*
FIELD-SYMBOLS: ...
*&---------------------------------------------------------------------*
*& FIELD GROUPS:
*&---------------------------------------------------------------------*
FIELD-GROUPS: ...
*&---------------------------------------------------------------------*
*& INITIALIZATION:
*&---------------------------------------------------------------------*
* Event which occurs before the selection screen is
* shown to the user. It happens only once and is
* ignored in background processing.
INITIALIZATION.
*&---------------------------------------------------------------------*
*& AT SELECTION SCREEN:
*&---------------------------------------------------------------------*
* Event which occurs each time the user hits enter on
* the selection screen. This event is ignored in
* background processing.
AT SELECTION-SCREEN.
*&---------------------------------------------------------------------*
*& TOP OF PAGE:
*&---------------------------------------------------------------------*
TOP-OF-PAGE.
*&---------------------------------------------------------------------*
*& TOP OF PAGE AT LINE SELECTION:
*&---------------------------------------------------------------------*
* Top of page for sublists
TOP-OF-PAGE DURING LINE-SELECTION.
*&---------------------------------------------------------------------*
*& END OF PAGE:
*&---------------------------------------------------------------------*
END-OF-PAGE.
*&---------------------------------------------------------------------*
*& START OF SELECTION:
*&---------------------------------------------------------------------*
START-OF-SELECTION.
GET ...
*&---------------------------------------------------------------------*
*& END OF SLECTION:
*&---------------------------------------------------------------------*
END-OF-SELECTION.
WRITE:/ ...
ENDLOOP.
*&---------------------------------------------------------------------*
*& AT PF STATUS:
*&---------------------------------------------------------------------*
* Event which occurs when user hits a particular PF
* key, e.g. PF6. The hide area and SY-LISEL are
* automatically available. It produces a sublist SY-
* LSIND = 1-9. PF3 is automatic and will always
* take the user back one list level, (SY-LSIND - 1).
AT PF...
*&---------------------------------------------------------------------*
*& AT USER COMMAND:
*&---------------------------------------------------------------------*
* Event which occurs when a user types =LIST in the OK
* code. The hide area and SY-LISEL are automatically
* available. It produces a sublist SY-LSIND = 1-9.
* PF3 is automatic and will always take the user back
* one list level, (SY-LSIND - 1).
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'LIST'. .....
ENDCASE.
*&---------------------------------------------------------------------*
*& AT LINE SELECTION:
*&---------------------------------------------------------------------*
* Event which occurs when the user places the cursor
* to a specific line on the report and hits enter.
* The hide area and SY-LISEL are automatically
* available. It produces a sublist SY-LSIND = 1-9.
* PF3 is automatic and will always take the user back
* one list level, (SY-LSIND - 1).
AT LINE-SELECTION.
Subroutines
*-----------------------------------------------------
* SUB_INSERT_ENTRIES
*-----------------------------------------------------
FORM SUB_INSERT_ENTRIES
...
ENDFORM.
APPENDIX A-3. Create a Sequential Dataset
*&---------------------------------------------------------------------*
*& Program Name : Zxxxxxx *
*& Author : xxxxxx xxx , xxxxx xxxxx *
*& Creation Date : xx/xx/xxxx *
*& Program Type : Reports *
*& SAP Release : 4.6D *
*& Description : xxxxxxxxxx xx xxxxxx xxxxxxx xxxx xxxx xxxxx *
*& xxxx xx xxxxxxx xxxx xx xx xx xxxxxxxxx *
*& Transport No : xxxxxxxxxx
*&---------------------------------------------------------------------*
*& Revision Log *
*& Date : x/xx/xx *
*& Author : xxxxxx xxx *
*& Description: xxxxx xxxxx xxxxxxx xxxxxxxx xx xxxx *
*& xxxxxxxxx xxx xxx xxxxxxxx *
*&---------------------------------------------------------------------*
REPORT ZSKELOUT
no standard page heading
message-id xxxx
line-count xxxx
line-size xxxx.
*&---------------------------------------------------------------------*
*& TABLES:
*&---------------------------------------------------------------------*
TABLES: ...
*&---------------------------------------------------------------------*
*& VARIABLES:
*&---------------------------------------------------------------------*
DATA: G_PDSNME LIKE FILENAME-FILEEXTERN. "Physical Dataset Name.
*&---------------------------------------------------------------------*
*& INTERNAL TABLES:
*&---------------------------------------------------------------------*
DATA: BEGIN OF T_TAB OCCURS ...
END OF T_TAB.
*&---------------------------------------------------------------------*
*& PARAMETERS:
*&---------------------------------------------------------------------*
PARAMETERS: P_LDSNME LIKE FILENAME-FILEINTERN "Logical Dataset Name
DEFAULT 'CUSTOMER_FILE'.
*&---------------------------------------------------------------------*
*& FIELD SYMBOLS:
*&---------------------------------------------------------------------*
FIELD-SYMBOLS: ...
*&---------------------------------------------------------------------*
*& AT SELECTION SCREEN:
*&---------------------------------------------------------------------*
AT SELECTION-SCREEN.
IF SY-SUBRC <> 0.
*-------No physical filename can be determined for &
MESSAGE E016(MG)WITH P_LDSNME.
ENDIF.
*&---------------------------------------------------------------------*
*& START OF SELECTION:
*&---------------------------------------------------------------------*
START-OF-SELECTION.
GET ...
*&---------------------------------------------------------------------*
*& END OF SELECTION:
*&---------------------------------------------------------------------*
END-OF-SELECTION.
Subroutines
*-----------------------------------------------------
* SUB_INSERT_ENTRIES
*-----------------------------------------------------
FORM SUB_INSERT_ENTRIES
...
ENDFORM.
APPENDIX A-4. Read Sequential Dataset and Create a BDC Session
*&---------------------------------------------------------------------*
*& Program Name : Zxxxxxx *
*& Author : xxxxxx xxx , xxxxx xxxxx *
*& Creation Date : xx/xx/xxxx *
*& Program Type : Reports *
*& SAP Release : 4.6D *
*& Description : xxxxxxxxxx xx xxxxxx xxxxxxx xxxx xxxx xxxxx *
*& xxxx xx xxxxxxx xxxx xx xx xx xxxxxxxxx *
*& Transport No : xxxxxxxxxx
*&---------------------------------------------------------------------*
*& Revision Log *
*& Date : x/xx/xx *
*& Author : xxxxxx xxx *
*& Description: xxxxx xxxxx xxxxxxx xxxxxxxx xx xxxx *
*& xxxxxxxxx xxx xxx xxxxxxxx *
*&---------------------------------------------------------------------*
REPORT ZSKELBDC
no standard page heading
message-id xxxx
line-count xxxx
line-size xxxx.
*&---------------------------------------------------------------------*
*& TABLES:
*&---------------------------------------------------------------------*
TABLES: ...
*&---------------------------------------------------------------------*
*& VARIABLES:
*&---------------------------------------------------------------------*
DATA: G_PDSNME LIKE FILENAME-FILEEXTERN. "Physical Dataset Name.
*&---------------------------------------------------------------------*
*& INTERNAL TABLES:
*&---------------------------------------------------------------------*
DATA: BEGIN OF T_TAB OCCURS ...
END OF T_TAB.
*&---------------------------------------------------------------------*
*& SELECT OPTIONS:
*&---------------------------------------------------------------------*
SELECT-OPTIONS: ...
*&---------------------------------------------------------------------*
*& PARAMETERS:
*&---------------------------------------------------------------------*
PARAMETERS: P_LDSNME LIKE FILENAME-FILEINTERN "Logical Dataset Name
DEFAULT 'CUSTOMER_FILE'.
*&---------------------------------------------------------------------*
*& FIELD SYMBOLS:
*&---------------------------------------------------------------------*
FIELD-SYMBOLS: ...
*&---------------------------------------------------------------------*
*& AT SELECTION SCREEN:
*&---------------------------------------------------------------------*
AT SELECTION-SCREEN.
IF SY-SUBRC <> 0.
*-------No physical filename can be determined for &
MESSAGE E016(MG)WITH P_LDSNME.
ENDIF.
*&---------------------------------------------------------------------*
*& START OF SELECTION:
*&---------------------------------------------------------------------*
START-OF-SELECTION.
IF SY-SUBRC <> 0.
.
ENDIF.
PERFORM INSERT_BDC.
ENDLOOP.
*&---------------------------------------------------------------------*
*& END OF SELECTION:
*&---------------------------------------------------------------------*
END-OF-SELECTION.
*----------------------------------------------------*
* Subroutines
*----------------------------------------------------*
*--------- Add a line to the DYNPRO Table ----------*
FORM BDCDYNPRO USING BEG PRG DYN FLD VAL.
CLEAR T_BDCDATA.
T_BDCDATA-DYNBEGIN = BEG.
T_BDCDATA-PROGRAM = PRG.
T_BDCDATA-DYNPRO = DYN.
T_BDCDATA-FNAM = FLD.
T_BDCDATA-FVAL = VAL.
APPEND T_BDCDATA.
ENDFORM.
*----------------------------------------------------*
* Add a transaction to the BDC session with the *
* entries in BDCDATA. *
*----------------------------------------------------*
FORM INSERT_BDC.
CALL FUNCTION 'BDC_INSERT'
EXPORTING TCODE = 'TCOD'
TABLES DYNPROTAB = T_BDCDATA.
REFRESH T_BDCDATA.
ENDFORM.
*----------------------------------------------------*
APPENDIX A-5. CALL TRANSACTION USING Technique
*&---------------------------------------------------------------------*
*& Program Name : Zxxxxxx *
*& Author : xxxxxx xxx , xxxxx xxxxx *
*& Creation Date : xx/xx/xxxx *
*& Program Type : Reports *
*& SAP Release : 4.6D *
*& Description : xxxxxxxxxx xx xxxxxx xxxxxxx xxxx xxxx xxxxx *
*& xxxx xx xxxxxxx xxxx xx xx xx xxxxxxxxx *
*& Transport No : xxxxxxxxxx
*&---------------------------------------------------------------------*
*& Revision Log *
*& Date : x/xx/xx *
*& Author : xxxxxx xxx *
*& Description: xxxxx xxxxx xxxxxxx xxxxxxxx xx xxxx *
*& xxxxxxxxx xxx xxx xxxxxxxx *
*&---------------------------------------------------------------------*
REPORT ZSKELCLT
no standard page heading
message-id xxxx
line-count xxxx
line-size xxxx.
*&---------------------------------------------------------------------*
*& TABLES:
*&---------------------------------------------------------------------*
TABLES: INDX,
...
*&---------------------------------------------------------------------*
*& VARIABLES:
*&---------------------------------------------------------------------*
DATA: V_RETURN_CODE LIKE SY-SUBRC,
V_MESSAGE_TEXT(120).
*&---------------------------------------------------------------------*
*& INTERNAL TABLES:
*&---------------------------------------------------------------------*
DATA: BEGIN OF T_TRANTAB OCCURS ...
INCLUDE STRUCTURE BDCDATA.
DATA: END OF T_TRANTAB.
*&---------------------------------------------------------------------*
*& SELECT OPTIONS:
*&---------------------------------------------------------------------*
SELECT-OPTIONS: ...
*&---------------------------------------------------------------------*
*& PARAMETERS:
*&---------------------------------------------------------------------*
PARAMETERS: ...
*&---------------------------------------------------------------------*
*& FIELD SYMBOLS:
*&---------------------------------------------------------------------*
FIELD-SYMBOLS: ...
*&---------------------------------------------------------------------*
*& START OF SELECTION:
*&---------------------------------------------------------------------*
START-OF-SELECTION.
* Message handling
V_RETURN_CODE = SY-SUBRC.
IF SY-SUBRC = 4.
V_MESSAGE_TEXT = 'No message text found in T100'.
ENDIF.
IF V_RETURN_CODE = 0.
* At this point, various things can be done to make
* the process slicker. Send the confirmation or error
* to the other program via RFC. Store key values and
* confirmation document number or error message in an
* ATAB table for future processing.
MOVE 'Transaction posted' TO ...
MOVE V_MESSAGE_TEXT TO ...
MODIFY ...
ELSE.
MOVE 'Transaction failed' TO ...
MOVE V_MESSAGE_TEXT TO ...
MODIFY ...
* In the event of erred transactions:
* Store the internal table in the INDX database for
* future online processing of the SAP transaction.
EXPORT T_TRANTAB TO INDX(..) ID ...
ENDIF.
* or create a batch input session for future
* processing.
REFRESH: T_TRANTAB,
T_MESGTAB.
*&---------------------------------------------------------------------*
*& END OF SELECTION:
*&---------------------------------------------------------------------*
END-OF-SELECTION.
* Subroutines
*-----------------------------------------------------
* Add an entry to the TRANTAB
*-----------------------------------------------------
FORM TRANS_FIELD USING BEG PRG DYN FLD VAL.
CLEAR T_TRANTAB.
T_TRANTAB-DYNBEGIN = BEG.
T_TRANTAB-PROGRAM = PRG.
T_TRANTAB-DYNPRO = DYN.
T_TRANTAB-FNAM = FLD.
T_TRANTAB-FVAL = VAL.
APPEND T_TRANTAB.
ENDFORM.
*----------------------------------------------------*
FORM ...
...
ENDFORM.
*------------------------------------------------------
Please follow these procedures to minimize versioning issues when creating test
versions of programs. Test versions should only be created for programs that
need to be tested in Production, or benchmarked against the Production version
the Testing environment. We should not create test versions to test in the
Testing environment. In those cases just modify the Production version. If we
need to revert back to the old code we can use version management.
1. Save the Production version to put it on a transport. This will lock it from
further changes. If the program is already locked you cannot proceed!
The lock should be held on the Production version until step 4.
2. Copy the Production version to the Test version. The Test program name
should be the
Production program ended with _TEST. Put the Test version on a new
transport - not
the transport created in step 1. If the Test version already exists, first
determine if it is an
old test version. If it is, overwrite it. If it is not, you need to determine
how the Test
version is being used. You may need to add a numeric counter for the
copied version in
order to not disturb the Test version. Add the following comment line to
the Test version
testing/benchmarking".
3. Make changes to the Test version and transport them for testing. This
may be an iterative
process.
4. Once the changes have been signed off, copy the Test version back to
the Production version and delete the Test version. Use the transport
created in step 1 for the delete. Update the revision history in the
Production version.
Guidelines
be parameterized.
In order to monitor access to any custom SAP program or report in the production
environment, it is necessary to integrate security in the program development stage.
This document also provides the ability to incorporate security checks within any custom
SAP program. This in turn, allows Security Administration the right to limit access
according to the confidentiality of the information, to certain groups as defined by owner
of the information.
General
Early Planning For Security
Authorization Check Objects
Programming Authority-Checks
Securing Transaction Codes
Development Steps
Administration
used.
Document the field and values required for this object to Security Administration.
Security Administration then creates the object with the fields defined by the
developer and notifies the developer of the authorization object name. Security
Administration will create a user to test the object with.
Validate the authorization checks with the test user for that object. This must be a
joint effort between Security Administration and the developer. Different values in
the authorization need to be checked in order to determine if all possible values
are controlled by the program.
Once the testing and the object is ready for implementation, it will be transport to
production.
Inform the appropriate application module team of the authorization objects so
that it can be incorporated into programs and reports.
NOTE: Because this is an integrated process between the developer and Security
Administration, Security Administration will be available for consultation on the definition
of fields and values and also on the implementation of security requirements.
Administration
Security administration is defined by the regional infrastructure team.
Authority/Responsibility
SAP Security Administration
They are responsible for communicating this Guideline and keeping the developer
community informed of changes and updates. In addition, they will implement new
authorization object and assign to users.
Developer Community
The developers have the responsibility for adhering to this standard and to maintain a
vigilant effort to review for occasional updates. The community is also responsible for
documenting the security requirement based on business needs.
Business Community
The business community owns/defines the requirement for business object and approves
user requests for activity group.
Definitions/Terms/Acronyms
Authorization
Specifies the value for the fields in an authorization object. Authorizations allow control
and flexibility in assigning access to certain data values.
Authority-check
A statement in ABAP that allows checks to be carried out at run-time. At this statement,
the system searches the master record of the user executing the program for the
necessary authorization values.
Authorization object
Activity Group
With the SAP upgrade to ABAP 7.0 a new way to change SAP application execution is
provided. These are called Enhancements. There are four technologies available within
Enhancement Framework:
Class Enhancement
Kernel-BADI Enhancement
There are two kinds of source code enhancements, Explicit and Implicit. These are
based on technology which dynamically executes an instance of customer code when
reaching a certain point in the standard SAP object. Therefore, there is no change to the
SAP object and no repair key is needed.
Explicit Enhancements
Explicit enhancements are added to SAP code at predefined anchor points. These are
called enhancement points. These enhancement points are assigned to an
enhancement spot. The enhancement spot is the compilation and transport unit, similar
to a function group. An enhancement point can have multiple enhancement
implementation assignments. A given enhancement implementation can be assigned to
multiple enhancement points. But the assignment of a given enhancement point to a
given enhancement implementation, creates a specific change at run-time. They can be
a BADI or a source code plug-in.
Implicit Enhancements
An Implicit enhancement has no pre-existing definition nor has it been planned for by
SAP developers. An Implicit enhancement can be implemented when an SAP object
starts or ends execution. You can insert implicit source code plug-ins before the first and
the after the last line of includes, methods, reports, and function modules. Dictionary and
defined structures also allow for implicit enhancements. The following are implicit
enhancement options at which enhancements can always be inserted:
You can implement implied enhancements before the first and the after the last
line of form routines, includes, methods, reports, and function modules.
For global classes, there are different permanent, implicit options for
enhancements: You can insert additional attributes or methods, and you can add
optional parameters to existing methods.
A source code plug-in is custom code dynamically loaded at that point. But it has no
defined interface. There are 2 flavors of these, enhancement-point and enhancement-
section. Enhancement-point only occurs at a specific line in the SAP code, but can
trigger multiple enhancement implementations. Enhancement section is a replacement
for a section of code and can have only one implementation.
Function Group enhancements allow SAP customers to add new optional parameters to
SAP function provided function modules. It is important to note that these types of
enhancements ARE upgradeable. As stated above these are considered implicit
enhancements and could prove to provide HP significant benefit. Instead of copying an
SAP function or performing a core mod you should investigate to see if a function group
enhancement along with an implicit source code plug-in can meet your requirements.
BADIs
A BADI enhancement is an objects method that includes import and export parameters.
It follows the rules of ABAP Objects, including filters and inheritance. Data in the SAP
code is passed through the parameters of the method interface.
**** These are considered explicit enhancements when an existing BADI is called in the
system. If you choose to enhance the BADI and add new methods or parameters this is
considered an implicit enhancement!
http://help.sap.com/saphelp_nw70/helpdata/EN/94/9cdc40132a8531e10000000a1550b0/
frameset.htm
Enhancement Builder
The following SAP documentation links will provide you an overview of how you can
browse the different available enhancements, spots, implementations, etc.
Enhancement Builder:
http://help.sap.com/saphelp_nw70/helpdata/EN/94/9cdc40132a8531e10000000a1550b0/
frameset.htm
Enhancement Information System:
http://help.sap.com/saphelp_nw70/helpdata/EN/94/9cdc40132a8531e10000000a1550b0/
frameset.htm
http://help.sap.com/saphelp_nw70/helpdata/EN/94/9cdc40132a8531e10000000a1550b0/
frameset.htm
http://help.sap.com/saphelp_nw70/helpdata/EN/94/9cdc40132a8531e10000000a1550b0/
frameset.htm
Key Considerations
Required Analysis
Is there an existing SAP solution, program or switchable SAP enhancement that can be
utilized instead?
Are you absolutely sure standard SAP configuration changes will not meet the
requirement?
Discuss the proposed enhancement with architects and key stakeholders, someone will
most likely be able to provide you feedback on the best approach.
Make sure to review the enhancement type preferences below to ensure you are
implementing the most desired technology/enhancement type.
Make sure to analyze the interaction with existing SAP implementation and switch
frameworks to ensure your enhancement will work.
Will an existing enhancement implementation meet your needs? Reuse of existing
enhancement implementations at new enhancement points is better then duplicating.
Enhancement vs. Core mod: The usage of the SAP provided Enhancements are always
preferable to core modifications. Before implementing an Enhancement, it is essent ial
that you are well acquainted with an applications construction and flow logic. Such
knowledge is necessary if you want to evaluate enhancement possibilities and decide on
a sensible implementation. Developers implementing enhancements are required to be
familiar with the enhancement framework and the development tools used.
Switches
Switch framework is used primarily for controlling the implementation of one or many
industry specific solutions. While switches may also be used to control/turn on HP
enhancements to SAP the benefits for SCIT at this time are not there. At this point
SCIT will not be employing switches for enhancements. It is important to note that as
SAP rolls out new functionality that will be leveraged by HP, switch framework may be
used to turn it on.
The development class used must be of the enhancement type, eg. Z3ELOPDM_IDOC
where the E represents Enhancement. As per the development class/package naming
conventions the description portion of the package should be descriptive of the solution
type, eg. TOOLS, IDOC, ORDER, BOM.
Examples:
ZG3ELOPDM_TOOLS_EI_SAPMV45A_01
Z1ESDCM_IDOC_EI_SAPRQ33A_03
Z3ESD_EZPRS_EI_MV45AFZC_01
Activating Enhancements
Enhancements can be active or inactive. They should be left inactive, until coding is
complete and all syntax errors are resolved. They should be activated when developer is
ready to unit test.
If transported to production with the active flag turned off, the enhancement will not
execute.
The Explicit enhancement is defined by SAP. SAP program expects that customers may
implement this. Therefore, we will treat these in the same manner as classic CMOD user
exits or include user exits. They should not be considered risky development and no
PAR approval is needed. TD will decide on the correct implementation.
The preferred kind of explicit enhancement is the BADI enhancement. This has a defined
interface and is safe to use because of the object technology used.
There are 2 kinds of Explicit source code plug-ins. There are Enhancement-Points and
Enhancement-Sections.
An Enhancement-Point that is triggered when the SAP object gets to that point in the
code. These are pre-named and can be static or dynamic.
Examples:
exporting
comm_head_i = komk
comm_item_i = komp
komv_i = komv
preliminary = 'X'
importing
comm_head_e = komk
comm_item_e = komp
komv_e = komv
konp_e = konp.
END-ENHANCEMENT-SECTION.
Section 3 Usage of the Implicit Enhancement
The Implicit enhancement is not pre-defined by SAP. These enhancements are implied
by the start and end of a SAP objects execution. SAP allows customers to implement
these and they will be retained in upgrades. Regardless, the approval approach for
implicit enhancements will be to gain a PAR approval in order to implement one. Please
follow the High Risk Development PAR approval guidelines. Keep in mind these are still
preferred over SAP source code modifications.
You will need to use the ABAP Editor Edit->Enhancement Operations->Show Implicit
Enhancement Options to actually see these enhancement points.
Examples:
*&--------------------------------------------------------------------- *
*---------------------------------------------------------------------- *
*---------------------------------------------------------------------- *
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$ \S
E:(2 ) Form CHECK_WAERS, Start
A
okflg(1) type c,
"""""""""""*"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$ \S
E:(1 ) Form CHECK_WAERS, Struct. CURRS, End
S
end of currs.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$ \S
E:(3 ) Form CHECK_WAERS, End
A
endform.
Section 4 Source Code Comment Requirements
Source code comments are required for enhancements just as they are for any other
custom code. The one difference here is that you are required to call out your change in
the program header with a description that starts with Enhancement, see below.
Implementation must include a comment at the very top of the source. Insert lines as
necessary. The comment should include the following data at a minimum; the date of the
change, the programmers name, the change request (transport) number, and the S-ticket
number. Additional comment lines within the comment block, or within the source code,
may be added as necessary, but should be succinct and kept to a minimum. For
readability, indent the comment lines as necessary. See ABAP documentation standard
for detailed requirements.
*----------------------------------------------------------------
-----*
* Revision History
*
* User-ID Description
*
* xxxxxxxxxxxxxxxxx Enhancement-
xxxxxxxxxxxxxxxxxxx*
*****************************************************************
******
You must also use the enhancement implementation Long Text to document the reason
and function of the enhancement.
Regarding the format you are free to use either free floating text, a table or whatever
you like. However, the items listed above need to be explicitly mentioned in the
document.
Hint:
The description of the test process should be in a way that a third person can find the
test cases in the test system. The person should be able to understand the key
purpose of the test case and the test process.
Test ID Test Steps incl. test input data Expected Result Actual Result +
Status +
Test output data
1 Execute the Function Module: Z_CREATE_DISPAY_TO
Figure 1 :
Now Execute the Function Module L_TO_CONFIRM with the following value:
Test Issue log
= Test Incident Report
Use the issue log to describe each error that occurred.
The column Test case is to have a reference to the corresponding test case.
The column Date comm., that means date communicated indicates, if the
error was communicated to the responsible person in order to have a
continuous tracking.
If an issue is processed you can mark that line in green.
Global objects should follow the naming standard for Global objects and
assigned to a Global Development Class and Global Function Group assigned to
the Global Transport Package.
Ex. Z_GX_* (Function Modules)
Regional Exits should also follow the naming conventions for Global objects and
assigned to the Global Development Class, a Global Exit Function Group, and a
Regional Top Include within the Global Exit Function Group.
Existing regional objects identified as Global process will change their name to a
Global Object name and assigned to the Global Development class and the
Global Exit Function Group.
Regional Exit routines name will include the following suffix _EXIT0n. (n =
numeric counter)
Regional objects belonging to a global solution will be deployed by the global
solution as an empty object. The regional developer will create a Regional
Include Member using the regional naming convention, a regional TOP include
and assigned to a regional development class.
Subsequent deployment of the regional call must be managed and coordinated
with Basis and Developers as the call will overlay the include member and have
to be re-applied.
The comment box at the top of the Object will now include as the first comment:
* GLOBAL OBJECT *
The Global objects or imbedded Global code should be well documented both
identifying it as a Global solution and the functionality of the solution.
One of the Regional platforms will be the host of the Global solution and
transported to the other Regional platforms.
For existing Regional solutions, the Global code should be in an INCLUDE
member or Function Module depending on the solution.
When a Global solution cannot be isolated into a separate object, the Global
code should be incased within a comment block or in a separate FORM
identifying it as Global code.
For a portion of a Global Solution that differs at the Regional level, then a Global
Function Module OR Program would call a Regional Function Module OR a
FORM within a Regional program with Regional specific functionality which could
encompass any Data Dictionary or regional code.
FUNCTION Z_G1_EXTEND_MATERIALS.
import
ENDFUNCTION.
import
ENDFUNCTION.
ENDFUNCTION.
FUNCTION Z_G1_RETRIEVE_PLANTS_EXIT01.
include z3ilopdm_retrieve_plants .
ENDFUNCTION.
REPORT ZG1ISDOM_SHIP_EXTRACT.
PERFORM FILTER_SHIPMENT_REGION
IN PROGRAM
ZG1ISDOM_SHIP_EXTRACT_EXIT01
CHANGING T_XLIKP[]
T_XLIPS[]
IF FOUND.
Introduction.
As the S-Ticket tool is used to track assignments and workloads, it is also used to request
the corresponding code review (PCR) once you are done with your development and did
all necessary test.
If your changes are more than 10 lines of code (LOC), you have to create a PCR document
a before you can request the code review itself. PCR document helps the reviewers to
know which areas they will be focus on the code so it is very important you know how to
fill it right.
Also this document helps as a check list for developers to verify if all her/his code is
compliant with ABAP development standards followed in HP.
Only if your change is 10 lines or less, you can skip the creation of the PCR document and
go direct to the Code Review.
Mandatory fields to successfully create the PCR document are Assigned To, Transport
Request and PCR Reviewer.
If one or more of those fields are missing, the document will not be created but you will
also be notified.
<DIV></DIV>
Include important information to share with the reviewer.
New Development - Program N/A
Attributes
Is the title a concise description, the ABAP application is set to the appropriate
value for the functional area involved and the Development Class is
appropriated?
New Development - Security N/A
Has an appropriate strategy been discussed with request owner and agreed for
authorization objects inclusion in the development?
Are program attributes correctly Setup?
New Development - Program N/A
Documentation
The Online Program Documentation provides functional leads and end users
with necessary information to determine report functionality. It also contains
information on file inputs and outputs
Version Management N/A
Has version been checked in the different systems including production, if an
existing object is being changed / enhanced?
Error Handling N/A
Are Errors handled within the program, including:
-FM exceptions
-SY-SUBRC checks on Database Act
-Division by Zero
Import-Export N/A
Avoid EXPORT/IMPORT to memory whenever possible. If used at all, is this
the only possible way to exchange the information?
Transport Request Documentation N/A
Is the Transport Request/Task Correctly Documented? (Following Template)
Code Comments N/A
Internal commenting has been done sufficiently enough to ease program
maintenance and reliability of the ABAP
Change History N/A
A chronological history of modification notes; with the latest change being the
last entry in the modification log including transport number and Request
number (S-ticket, HPSM, etc.)
Naming Standards N/A
The ABAP Naming Standards and Programming Standards have been followed
in ALL NEW OBJECTS and components inside the programs
<DIV></DIV>
For SMARTFORMS and LAYOUTS, specify the elements
that were modified or created
Layout and Smartforms - Tabs N/A
The tab symbol (,,) is used instead of spaces
Layout and Smartforms - Underlines N/A
Underlines are written using uline(xx) instead of typed out
User Exits - Exit Statement N/A
Do not use EXIT statement on user exits, or use it inside DO 1 TIME ... ENDO
User Exits - COMMIT work N/A
Don't do COMMIT or ROLLBACK WORK on user exists. (SAP will do this when
ready, we dont need to do this)
Reviewer Signoff <DIV></DIV>
<DIV></DIV>
I certify that the above items have been checked
(Enter Name and Date for each time this PCR Document is reviewed)
Once you are done filling the PCR Document, then you can request the corresponding
Code Review.
All Changes are to be made in the Development Box First and then
transported to the Testing Box for Testing, because these changes are
referred to as master changes and the same is also moved to production
RTP PROCESS
Once the changes are transported to Testing Environment and all Test
scenarios are completed, a UAT signoff is received to move the changes to
production. To move these changes a RTP Request needs to be raised and
approved
2. Exception: These are changes which dont have major impact but
needs to be addressed before the planned RTP date. e.g. less critical
bugs /fixes. While submitting the Exception, please provide L3
approval too with UAT signoff
The following steps are followed to have these changes approved for
the MTP
2. The fields are self explanatory. The contacts are given on the last
page of the presentation.
3. RTP Type and Date and the sequence of the TRs are critical
Testing Evidence: All * fields are critical .In testing ,please mention
few Test Cases
Questionnaire: All the fields are explanatory. Please type all the
Function modules/user exits in respective field
Control Period: Only in case the RTP is being made during Control
period the fields needs to be entered
D. MTP Verification:
1. On the day and time of MTP, an email will be sent across by Joyce
mentioning that the changes have been moved to the Staging
Environment. At this time, the development team has to re-verify
these changes and confirm if these Transports are correctly moved
and everything is working fine. Else contact Joyce and stop the
further move to Production and have the rectifications done asap
What is a Methodology?
HP ME Methodology Framework