ABAP modularization technique Include Programs

Include programs are created as global Repository objects used for modularizing source code. Same INCLUDE can be called in other programs. To create an Include program, program attributes should be selected to I. You can even edit or create include program by double-clicking on the name of the include program after the INLCLUDE statement.

An INCLUDE cannot run independently, but must be built into other programs. Include programs have no interface parameter. INCLUDE can contain other INCLUDE but cannot call itself.

Syntax for calling INCLUDE program

INCLUDE <include program name>.

In the below program, we place the global data declaration in an INCLUDE.

Steps to modularize source code with INCLUDE.

  • Execute SE38
  • Enter program name ZAMARMN_SELECT_TOP and choose Create
  • Enter appropriate title. Choose Type INCLUDE program. Choose Save.
  • Copy the global declaration to INCLUDE program and delete it from the main program. Save and activate the INCLUDE.
  • Call INCLUDE in the main program.