ARTICLE
Introductory Statements for Programs
The introductory statements for programs are:
REPORT
PROGRAM
FUNCTION-POOL
CLASS-POOL
INTERFACE-POOL
TYPE-POOL .
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 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 INCLUDE statement.
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, the
TYPE-POOL
.
Note
It is not obligatory, from a syntax point of view, to assign
introductory program statements to the program types defined in the
program attributes . However, you
should always use the assignments listed in the following sections. 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 text themselves, in order to avoid unexpected system
behavior.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved