Introductory Statements for Programs
The introductory statements for programs are:
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,
From a syntax point of view, it is not mandatory to assign introductory program statements to the program types defined in the
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
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.