Entering content frame

Introductory Statements for Programs Locate the document in its SAP Library structure

Each ABAP program type has a statement that introduces programs of that type:


Program Type

Introductory Statement

Executable Program


Module Pool


Function Group


Class Pool


Interface Pool


Subroutine Pool


Type Group


Include Program



Include programs are not compilation units. Instead, they are purely modularization units that are only ever used in the context of superior-level programs. For this reason, include programs do not have a special introductory statement.


It is not obligatory, from a syntax point of view, to assign introductory program statements to the program types defined in the program properties. However, the assignment shown in the above table should nonetheless be used always. When a program is created, the suitable statement is automatically generated by the ABAP Workbench and should be changed during editing in the additions only.  In particular, the keywords FUNCTION-POOL, CLASS-POOL, INTERFACE-POOL, and TYPE-POOL should be created solely by the respective tools of the ABAP Workbench and never be entered in the source text themselves in order to avoid unexpected system behavior.


The following sections describe the function of introductory statements:


The REPORT and PROGRAM statements currently have the same function. They allow you to specify the message class of the program and the formatting options for its default list. Whether a program is executable or can only be started using a transaction code depends exclusively on the program type and not on the statement that introduces it. Nonetheless, module pools and subroutine pools should always begin with a PROGRAM statement, and executable programs always with a REPORTstatement.


The introductory statement FUNCTION-POOL declares a program in which you can define function modules. At runtime, it has the effect that – during program loading – a new program group with its own screens and its own shared data areas is created in the internal session of the calling program. For this reason, function groups must always begin with a FUNCTION-POOL statement. The statement FUNCTION-POOL is usually generated by the Function Builder. Other programs (executable programs, module pools, and subroutine pools) should not begin with a FUNCTION-POOLstatement, since they would then not share common data areas with the caller when loaded by an external subroutine call. However, in exceptional cases, you can force processing of your own screens for externally called subroutines if you introduce executable programs or module pools with FUNCTION-POOL. As in the REPORT and PROGRAMstatements, you can specify the message class for the program and the standard list formatting options of the program using FUNCTION-POOL.


The introductory program statements CLASS-POOL and INTERFACE-POOL are provided solely for class and interface definitions. A program introduced with the CLASS-POOLstatement can only contain global type definitions and definitions of classes and interfaces. Programs introduced with INTERFACE-POOL can only contain the definition of a global interface. The CLASS-POOL and INTERFACE-POOL statements must be generated solely by the Class Builder tool.


The introductory statement TYPE-POOL can only be used for type groups. A program introduced with the TYPE-POOL statement can only contain global type definitions and constant declarations. The TYPE-POOL statement must be generated solely by the Dictionary tool.




Leaving content frame