Do you Know ?

SAP ABAP Include Simple Example

Include concept:

With include concept complexity can be reduced, steps follows:

Go to TCode: SE38, create program and  select type “include” and create.

 Level 1:

_________________________________________________________________
Tables: kna1.

types: begin of fs,
       Customerno type kna1-kunnr,
       name type kna1-name1,
       Country type kna1-land1,
       end of fs.


       data: wa_itab type fs,
             itab type standard table of fs.

Save & Activate !

_________________________________________________________________________________________________

Level 2:

Go to TCode: SE38 again, create program and  select type “include” and create.

Type : Include

_________________________________________________________________

include zinclude1.

select kna1~kunnr kna1~name1 kna1~land1 into table itab from kna1.

loop at itab into wa_itab.
write:/ wa_itab-customerno under 'Customer No',
        wa_itab-name under 'Name',
        wa_itab-country under 'Country'.
 endloop.

 top-of-page.
 uline.
 write:/1  'Customer No' color 4,
        20 'Name' color 4,
        56 'Country' color 4.
 uline.

___________________________________________________________________________________________________

Save & Activate !

Level 3:

Final should be Executable type.

Go to TCode: SE38 again, create program and  select type “Executable” and create.


_________________________________________________________________________

REPORT  ZINCLUDE_EXE3
no standard page heading
line-count 30(3)
line-size 80.

include zinclude2.
__________________________________________________________________________


That’s it.