Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  Program Layout 

Introductory Statements for Programs

The introductory statements for programs are:

The introductory statement of each program depends on the program type specified in the program attributes.

All statements that follow the introductory statements in the source code or that are included as include programs are handled as a single unit by ABAP Compiler.

The first statement of every independent ABAP program must be an introductory statement, and each program can only contain one of these statements. The only other statement allowed in the first position (alongside the introductory statement) is the statement INCLUDE. In this case, an introductory statement for a program must appear in the first position of the program after the include program has been resolved when the program is generated.

Executable programs, module pools, function groups, class pools, interface pools, subroutine pools, and type groups are standalone compilation units. Include programs, on the other hand, are are only used in the context of of compilation units.

Type groups, also known as type pools, are standalone programs from a logical point of view. However, they do not contain executable code but only type definitions and constant definitions. For this reason, type groups have their own introductory program statement, TYPE-POOL.

Other versions: 7.31 | 7.40 | 7.54


Note

From a syntax point of view, it is not mandatory to assign introductory program statements to the program types defined in the program attributes. The assignments described in the following sections, however, should always be used. When a program is created, the suitable statement is automatically generated by ABAP Workbench and should be changed only in the additions, when editing. In particular, the keywords FUNCTION-POOL, CLASS-POOL, INTERFACE-POOL, and TYPE-POOL should be created solely by the respective tools of ABAP Workbench and never be entered in the source code themselves, to avoid unexpected system behavior.

Continue

REPORT

PROGRAM

FUNCTION-POOL

CLASS-POOL

INTERFACE-POOL

TYPE-POOL