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

Variable naming conventions

Former Member
0 Likes
1,570

Hi all,

I come from a mostly JAVA background. Big emphasis in that arena on encapsulation and modularization of code to help facilitate ease of maintenance and reuse...in theory I sometimes struggle with variable naming conventions within my ABAP code because I'm not all together certain there are any. In C or C++ I might use a derivation of Hungarian notation to name varaibles...and in JAVA I might observe certain object oriented rules regarding varaible naming...I find myself using a combination of those two protocols in my ABAP code. Does anyone have any suggestions for how I might name global and lcoal variables within my code?

regards,

Mat

3 REPLIES 3
Read only

amit_khare
Active Contributor
0 Likes
841

Hi,

For every project there is specific client driven SAP naming convention which needs to be followed for ABAP code.

e.g. say -


for types - TYPE_<NAME>

for internal table T_<NAME>

for global variable GV_<NAME>, etc.

So just follow the convention given by the client.

Still you can check these threads -

Regards,

Amit

Read only

Former Member
0 Likes
841

Hello,

It is usually done by the project standards. Usually it is defined during the beggining. Ask for that document.

Usually is like this:

TI_X for internal tables.

G_X for globlas

T_X for Types

WA_X for work areas

C_X for constants.

P_X parameters, sometimes PI_X for input and PO_X for output.

FS_x for field symbols

etc,

Hope this helps dont forget to reward

Gabriel P.