11-08-2006 4:30 PM
any one knows or has the nomclature to use when programing in the ABAP language, i'm new with this language.
i apreciate your help
11-08-2006 4:41 PM
Hi, there are a few, for example, naming variables in your program. These are just a few.
Prefix
LT_ = Local internal table
LS_ = Local structure(work area)
LR_ = Local reference
GT_ = Global internal table
GS_ = Global structure(work_area)
GR_ = Global reference
IT_ = Internal table
WA_ = Work Area
V_ = Variable
C_ = constant
Regards,
Rich Heilman
11-08-2006 4:41 PM
Hi, there are a few, for example, naming variables in your program. These are just a few.
Prefix
LT_ = Local internal table
LS_ = Local structure(work area)
LR_ = Local reference
GT_ = Global internal table
GS_ = Global structure(work_area)
GR_ = Global reference
IT_ = Internal table
WA_ = Work Area
V_ = Variable
C_ = constant
Regards,
Rich Heilman
11-08-2006 5:09 PM
Hi Erick,
Just a few additions..
W_ for global variables.
l_ for local variables.
lwa_ for local work area.
lt_ or lit_ for local int. table.
Also,
ZRP - if it is a report program.
ZUT - if it is utility ...etc.
11-09-2006 9:44 PM
Hello Erick
I would like to add my naming convention for function module parameters, especially TABLES parameters. I differentiate between
- <b>IT_ITAB</b> => "IMPORTING" tables parameter whose values are exclusively intended as input for the function module
- <b>ET_ITAB</b> => "EXPORTING" tables parameter whose is exclusively used to export values from the function module (therefore, I will always have the following statement at the beginning of the function module:
REFRESH: et_itab.
- <b>XT_ITAB</b> => "CHANGING" tables parameter whose values are used as input for the function module and modified values are returned (usually there is no REFRESH of such an itab)
Please note that these different types of TABLES parameters are purely semantic, because technically they are all the same. However, you will see the big difference if you have function modules with many tables parameters, e.g.:
CALL FUNCTION '...'
TABLES
t_itab1 = ...
t_itab2 = ...
t_itab3 = ...
t_itab4 = ... .
CALL FUNCTION '...'
TABLES
<b>it</b>_itab1 = ...
<b>it</b>_itab2 = ...
<b>it</b>_itab3 = ...
<b>et</b>_itab4 = ... .
I believe it is much easier to grasp what the function module using semantic naming conventions does then the other function module. Only by inspecting the interface you will understand that parameter it_itab1, it_itab2 and it_itab3 are used as input that will produce output in et_itab4.
Regards
Uwe