Thursday, February 9, 2017

Variable Naming Convention in ABAP

Here are some rules that I used for my convenience in coding ABAP. You can also have your own style in naming the variables in ABAP. These naming convention might help you remember and differentiate variables that you used, but keep in mind that you might need to follow a different naming convention in every project.

Variable TypeUsage
Global Varibles gv_<variablename>
d_<variablename>
Local Variable lv_<variablename>
ld_<variablename>
Global Internal Table it_<internaltablename>
gt_<internaltablename>
Local Internal Table lt_<internaltablename>
Global Work Area gw_<workareaname>
Local Work Area lw_<workareaname>
wa_<workareaname>
Constant c_<constantname>
Parameter p_<parametername>
Select_option s_<selectoptionname>
Ranges r_<rangename>
Type Structure ty_<structurename>
Subroutines F_<subroutinename>
FORM_<subroutinename>

Source: 

No comments:

Post a Comment