Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP naming conventions: customer DDIC objects, ABAP programming

Jarmo_Tuominen
Participant
0 Likes
2,803

SAP Note 16466 Customer name range for SAP objects contains the SAP naming conventions for customer DDIC objects. Rule of thumb is that the names reserved for customer objects start with 'Y' or 'Z'. However, this note contains the naming convention for DDIC objects only.

ABAP Code Inspector (transaction SCI) contains the following naming convention for ABAP programming:

- Global types: T_

- Global constants: C_

- Global data: gv_

- Global field-symbols: FS_

- Global parameters: P_

- Global select-options: S_

- Global field-groups: FS_

- Local types: LT_

- Local constants: LC_

- Local data: v_

- Local field-symbols: LFS_

This is the only place I know for ABAP programming naming convention. Does SAP has somewhere else any additional naming convention guidelines for ABAP programming?

Thanks in advance for your help.

Regards,

Jarmo Tuominen

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,997

Hi,

For naming internal data objects within your ABAP program this naming convention is fine enough.

Regards,

Ankur Parab

4 REPLIES 4
Read only

Former Member
0 Likes
1,998

Hi,

For naming internal data objects within your ABAP program this naming convention is fine enough.

Regards,

Ankur Parab

Read only

Former Member
0 Likes
1,997

Hi,

SAP naming convention is 'Y' and 'Z' for all the customized objects whtever it is not only DDIC...

The ABAP programming naming convention mentioned by you is to be used within the program...

Just to add to your list is the work areas.. which is WA

Read only

Jarmo_Tuominen
Participant
0 Likes
1,997

Naming convention guidelines for ABAP programming is available in here: [Manage Successful Customer Development|https://websmp206.sap-ag.de/~sapidb/011000358700004444532001E].

Naming Data Types and Objects

The names of data types and objects have the form: <Classifier>_<Data type>_<Descriptor>.

The names of data types and objects have up to 30 characters.

Exceptions: names of input parameters and select options have up to 8 characters, and <Data type> and _ are omitted.

First component: Classifier

T Data type C Constant G Global data object L Local data object FS Field symbol P Input parameter S Select option P Formal parameter in form FM Formal parameter in function

Second component: Data Type

<t> Elementary data type, optionally followed by length C<n> Type C of length <n> N<l> Type N of length <n> X<l> Type X of length <n> D Type D T Type T I Type I P<d> Type P with <d> decimals F Type F WA Work area IT Internal table

Third component: Descriptor

Use meaningful English names. Later, your code may be maintained or analyzed by a programmer or support consultant who is not familiar with another language.

Use only alphanumeric characters (A-Z and 0-9) and separate words with underscores (_). Hyphens are reserved for separating components in structured data types.

Examples:

G_I_COUNTER (global counter)

T_IT_BOOKING_LIST (type for list of bookings)

G_IT_BOOKINGS (global internal table of bookings)

PSMOKER (input parameter for smoker flag: note omission of data type and _ for brevity)

Edited by: Jarmo Tuominen on Feb 21, 2011 2:13 PM

Read only

KrittinE
Participant
0 Likes
1,997

Hi Jarmo Tuominen, Could you kindly to share the Naming convention guidelines again ?