Naming convention

Naming convention

1 Main Objects

Object

Syntax

Example

Report/Program

https://hostiq.ua/clients/aff.php?aff=2305&lid=3

<namespace>R_NAME

ZCBA_R_TEST_CALCULATIONS

/ZHM/R_TEST_CALCULATIONS

Class(global)

<namespace>CL_<component prefix>_<name>

ZCBA_CL_TEST_CLASS

/ZHM/CL_TEST_CLASS

Class(local)

LCL_<component prefix>_<name>

LCL_TEST_CLASS

Exception Class

<namespace>CX_<component prefix>_<name>

ZCX_CBA_TEST_EX

/ZHM/CX_TEST_EX

Interface

<namespace>IF_<component prefix>_<name>

ZCBA_IF_MY_INTF

/ZHM/_IF_MY_INTF

Interface(local)

<namespace>IF_<component prefix>_<name>

LIF_TEST_INTF

Constant-Interface

<namespace> [L]IF_<component prefix>_<name>_C

The constants within this interface should be named GC_<name>

ZCBA_IF_MY_CONST_C

Function Group

<namespace> [<component prefix>_]<name>

ZCBA_ADM_GROUP

/ZHM/ADM_GROUP

Transactions

<namespace> [<component prefix>_]<name>(**)

ZCBA_TESTTRAN

/ZHM/TESTTRAN

L means for local classes/interfaces

2 Methods

Object

Syntax

Example

Class Methods

<activity>_[<object>]

CREATE_ORDER

Function Modules

<namespace><component prefix>(*)<activity>_[<object>]

ZCBA_CREATE_ORDER

/ZHM/CREATE_ORDER

Sub Routines

<activity>_[<object>]

CREATE_ORDER

Events

<occurred event>)

ORDER_FILTERED

Event Handler

ON_<occurred event>

ON_ORDER_FILTERED

(*) could be shortened or even omitted

3 Memory Elements

Memory elements should be named according following pattern

<visibility><data type>[addition]_<name>

Visibility ABAP

Data type (<data type>)

Optional Addition

[<addition>]

L

Local

C

Constant

H

Hashed Table

G

Global

V

Variable

S

Sorted Table

S

Static variable

S

Structure

G

Static attribute (class attribute)

T

Table (or table type)

M

Instance (member) attribute

R

Data reference

O

Object reference

B

BAdI reference

X

Exception reference

4 Signature Elements

Signature elements should be named according following pattern

<visibility><data type>[addition]_<name>

Signature ABAP

Data type (<data type>)

Optional Addition

[<addition>]

I

Importing Parameter

C

Constant

H

Hashed Table

E

Exporting Parameter

V

Variable

S

Sorted Table

C

Changing Parameter

S

Structure

R

Returning Parameter

R

Data reference

U

Using Parameter

O

Object reference

T

Tables Parameter

B

BAdI reference

X

Exception reference

5 DDIC Objects

Object

Naming Convention

Example

Domains

<namespace><component>_<name>

ZCBA_BBP_ACCTYP

/ZHM/BBP_ACCTYP

Data elements

<namespace><component>_<name>

ZCBA_BBP_PARTNER_PROD

/ZHM/BBP_PARTNER_PROD

Table types

<namespace>_T_<component>_<name>

ZCBA_T_CURRENCY

/ZHM/T_CURRENCY

Structures

<namespace>_S_<component>_<name>

ZCBA_S_CURRENCY

/ZHM/S_CURRENCY

Views

<namespace>_V_<component>_<name>

ZCBA_V_PRO

/ZHM/V_PRO

Database tables (Master and Transaction Data)

<namespace>_D_<component>_<name>

ZCBA_D_PRO

/ZHM/D_PRO

Database tables (Customizing Data)

<namespace>_C_<component>_<name>

ZCBA_C_APP_CFG

/ZHM/C_APP_CFG

Text tables

<name of the corresponding table>_T

ZCBA_D_PRO_T

/ZHM/D_PRO_T

Search Helps

<namespace>_H_<component>_<name>

ZCBA_H_ELM_CUST

/ZHM/H_ELM_CUST

Lock Objects

E<namespace>(*)<object name>

<namespace><object name>

EZCBA_INVOICE

/ZHM/INVOICE

Comments:

The names of database tables and views in ABAP the Dictionary have always max. length 16

The names of structures in the ABAP Dictionary have always max. length 30

6 Other objects

Object

Syntax

Example

Types

<visibility prefix><TY>_<name>

LTY_LIST

Field Symbols(*)

<<visibility prefix><data type>[addition]_<name>>

<LV_X>

Message Classes

<namespace><name of owner object>

ZCBA_OBJECT

/ZHM/OBJECT

Number Range Objects

<namespace><component prefix>_<name>

ZCBA_COUNT

/ZHM/COUNT

Selection Screen – selection option

SO_name

So_mysel

Selection Screen — parametr

P_name

P_par

7 WebDynpro

Object

Syntax

Example

Component

<visibility prefix><TY>_<name>

LTY_LIST

View

V_name

V_MAIN

Inbounf plug

FROM_name

FROM_LIST

Outtbound plug

TO_name

TO_DETAIL

Selection Screen – selection option

SO_name

So_mysel

Selection Screen — parametr

P_name

P_par

Добавить комментарий

Ваш адрес email не будет опубликован.