Você está na página 1de 8

Table of Contents

1.1. NAMING CONVENTIONS FOR DEVELOPMENT .............................................................................................. 2


TRANSPORT REQUEST: ........................................................................................................................................... 2
DATA DICTIONARY OBJECT: .................................................................................................................................... 2
1.1. Naming Conventions for Development
Packages Names:

Position number 1 2
Description Z Application
Example Z PM

Ex: ZP2P, ZR2R, ZO2C, ZF2P etc.


Note: Only one package per Module will be used for the same.

Transport request:

Example: DINK_ABAP_FI033_WB_MD_22.09.2017_Description
1 2 3 4 5 6 7
Type of Date of
Project Module Object Signature Description
TR Creation
Description of
DINK ABAP SD001 WB MD 02.09.2017
TR

Release method strictly to be followed by Guide lines given by Team Lead/ Project team.

Data Dictionary Object:


Position number 1 2 3 4 5 6
DDIC Underscore
Description Z Country/Global Application Free meaningful text
Type (Optional)
Example Z IN/GB MM T ‘_’ GRNCREATE

DDIC Type: D - Development Class, T-Table, DE-Data Element, DO-Domain, HP-Search Help, S-Structure, TY-
Table type, V-View

Program Names/ Enhancements/ Webdynpro/ BADI’s/PJ:


Position
1 2 3 4 5 6 7
number
Type of Object:-
Free
Object Report/Enhancement/
Description Z Country/Global Module “_” meaningful
No. Webdynpro/BADI/Proj
text
ect
Example Z IN/GB MM 001 RP/EN/WB/BD/PJ ‘_’ GRN_CREATE
Transaction Names:
Position
1 2 3 4 5
number
Free
Running
Description Z Country/Global Application meaningful
No.
text

Example Z IN/GB MM 001 GRNCREATE

Note: Only 4 characters should be used as far as possible. 5th character is optional and should be used only if
required. No Underscore will be used.

Function Modules / Group:

Position
1 2 3 4 5 6 7
number
Free
Object Program
Description Z Country/Global Application “_” meaningful
No. type
text

Example Z IN/GB MM 001 FM/FG ‘_’ GRN_CREATE

Note: Position 3: ‘F’ for Function Module and ‘G’ for Function Group
Smart form/Smart styles:
Position
1 2 3 4 5 6 7
number
Free
Object Program
Description Z Country/Global Application “_” meaningful
No. type
text

Example Z IN/GB MM 001 F/SS ‘_’ GRN_CREATE

Screen Names:
Custom screen painter dynpro must always be numbered greater than 9000.
The ranges are:
9001 - 9999 for all programs and Table Maintenances Screens

Workflows:
Workflow template name would come from the number range.
• Bespoke Business Object Name: Z<country><application><Development ID>_ Description>

When copying the Standard, remove the prefix “BUS” and suffix the copied one with the last four digits. Example:
For standard BUS2015, naming would ZMM001_2015.
 Position 1 is a Z.
 Position 2 is for country

Country code Description


GB Global
IN India
US United States
SL Sri Lanka

 Position 3 represents the SAP module, following SAP standards:

Application SAP Description


FI Finance
MM Procurement
SD Sales and Distribution
HR Human Resource
PM Plant Maintenance
PP Production Planning
PS Project system
CO Controlling

 Position 4 is the unique 3 digit object number assigned to the development,


 Position 5 is type of OBJECT,

Indentifier Object description


RP Report
IN User Interface(Custom
Application)
EN Enhancement
Implementation(BADI, Implicit
and Explicit)
CV Conversion
FR Print out
PJ Project(CMOD)

 Position 6 is "_".
 Positions 7 onwards are free for the user to assign.

Note 1: When copy of standard programs, same rules up to char 5 but concatenate the original program name
from position 6 onwards

Authority Checks for ABAP/4 Programs:

An ABAP/4 program makes authority checks using the AUTHORITY-CHECK statement:

AUTHORITY-CHECK OBJECT <authorization object>


ID <authority-field 1> FIELD <field-value 1>
ID <authority-field 2 > FIELD <field-value 2>
...
ID <authority-field n> FIELD <field-value n>

The OBJECT parameter specifies the authorization object.


The ID parameter specifies an authorization field (in the authorization object).
The FIELD parameter specifies a value for the authorization field.

The AUTHORITY-CHECK statement searches the user's master record for authorizations corresponding to the
authorization object specified in the statement. This means searching through all profiles in the master record, since
the user could have more than one authorization for the given authorization object.

To pass the authority check, the user must have at least one authorization specifying all the values given in the
AUTHORITY-CHECK statement. If so, the system sets the return code SY-SUBRC to 0, and your program can allow the
user to continue working. In all other cases, you must prevent the user from proceeding or accessing the data.

Authorization Object: Z<application>A<Development ID>_ Description>

Code presentation and comments

The heading of the ABAP code must contain this information:

 The author name and user-id.


 The title of the ABAP.
 The date of creation.
 A short functional description.

Comments in the body of the code are only required if they help the understanding of the processing.

Example:
************************************************************************
* Program Name : Object ID: *
* Description : *
* Create Date : *
* FO Owner : *
* Tech Owner : *
* Project Module : *
************************************************************************
* Change Log *
************************************************************************
* REQ# DATE WHO CHANGE_ID DESCR *
*-----------------------------------------------------------------------
* 001 Initial *
************************************************************************
The above header block must be added to all programs, including INCLUDES.

The reference is used to identify the changed lines into the ABAP code. The format of this reference is:
XYZDDMMMYY

Where: XYZ 3-Character Short name of Developer


DD 2-Digit date
MMM 3-Character Month Name
YY 2-Digit Year

The reference must be placed in any changed line during the change of an existing ABAP.

Naming convention for internal data objects


To improve the readability of the ABAP code, it is required to use rules to specify the names of the internal data objects.

Depending on the type of data objects, use the following prefix codes.

Type Prefix Example


Parameters P_ PARAMETERS:
P_BUKRS LIKE T001-BUKRS.

Select-options S_ SELECTION-OPTIONS:
S_BELNR FOR BKPF-BELNR.

Ranges R_ RANGE:
R_WERKS FOR T001W-WERKS.

Types TY_ TYPES : Begin of TY_XXX,


(Define all Types as global in <Fields>
TOP Include) End of TY_XXXX.
Work fields ( Global) GS_ DATA: GS_CNT TYPE TY_XXX.

Work fields (Local ) LS_ DATA: LS_CNT TYPE TY_XXX.

Table Type IT_ TYPES: IT_XXX TYPE STANDARD TABLE OF TY_YYY.


(Define all table types as
global in TOP Include)
Field groups FG_ FIELD-GROUPS:
HEADER,
FG_LINE.
Internal table (Global). GT_ DATA: GT_T001 TYPE STANDARD TABLE OF T001.

Internal table (Local) LT_ DATA: BEGIN OF TY_MATNR,


MATNR(8) TYPE C,
END OF TY_MATNR.

DATA: LT_MATNR TYPE STANDARD TABLE OF


TY_MATNR

Constants C_ CONSTANTS: C_NBDAYS TYPE I VALUE 7.


(Define all constants as
global in TOP Include)
Field Symbols (Global) <FS_> Field-Symbols: <FS_monat>

Field Symbols (Local) <LS_> Field-Symbols: <LS_monat>

Class (local) LCL_ CLASS LCL_XXX DEFINATION.

Class Object (Global) GO_ DATA: GO_XX TYPR REF OF LCL_YYY

Class Object (Local) LO_ DATA: LO_XX TYPR REF OF LCL_YYY

Formal Table parameters PT_ PT_<original name>


within FORM’s

Function Module xxxxx. : object description (as


Export variable E_xxxxx possible the standard name)
xxxxx. : object description (as
Import variable I_xxxxx possible the standard name)
Changing xxxxx. : object description (as
variable C_xxxxx possible the standard name)
Export xxxxx. : object description (as
structure ES_xxxxx possible the standard name)
Import xxxxx. : object description (as
structure IS_xxxxx possible the standard name)
Changing xxxxx. : object description (as
structure CS_xxxxx possible the standard name)
xxxxx. : object description (as
Export table ET_xxxxx possible the standard name)
xxxxx : object description (as
Import table IT_xxxxx possible the standard name)

Coding sequence
All the code elements must be coded in the following defined sequence to help find the coding elements in the ABAP ’s.

The sequence is:


REPORT declaration.
INCLUDES declaration (<Program Name>_TOP): All Data Declaration.
INCLUDES declaration (<Program Name>_SEL): Selection Screen Declaration.
INCLUDES declaration (<Program Name>_SUB): Subroutine Code.

INITIALIZATION event.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR <field>

AT SELECTION-SCREEN ON HELP-REQUEST FOR <field>

AT SELECTION SCREEN ON specific field.

AT SELECTION SCREEN ON block.

AT SELECTION-SCREEN OUTPUT.

AT SELECTION-SCREEN.

START-OF-SELECTION.

PERFORM FETCH_DATA.

END-OF-SELECTION.

Você também pode gostar