ABAP Keyword Documentation → ABAP - Reference → Program structure → Introductory Statements for Programs
PROGRAM
Other versions: 7.31 | 7.40 | 7.54
Syntax
PROGRAM prog [list_options]
[MESSAGE-ID mid]
[REDUCED FUNCTIONALITY].
Addition
Effect
The statement PROGRAM initiates a
module pool or a
subroutine pool. It must be the first statement of a standalone program after the triggering of possible
include programs. The name prog must be specified directly. The following applies for the additions:
-
In module pools, the additions
list_optionsandMESSAGE-IDof thePROGRAMstatement have the same meaning as the additions of the same name in the statement REPORT. TheREDUCED FUNCTIONALITYaddition has an effect only in subroutine pools, otherwise it is ignored. -
In subroutine pools, the specification of
MESSAGE-IDhas the same meaning as with the statementREPORT.. The possible additionslist_optionsfor the basic list are ignored, since subroutine pools do not have a separate list buffer. Output statements in subroutine pools write to the current list of the calling main program. The additionREDUCED FUNCTIONALITYonly works in subroutine pools..
Notes
-
In the above statement, the key word
PROGRAMcan be replaced by the key wordREPORT. In module pools or subroutine pools,REPORThas the same meaning asPROGRAMand can be used with its additions. As a rule, module pools and subroutine pools should only be introduced by usingPROGRAM. -
The name
progis not absolutely necessary, but the name of the ABAP program from the repository should always be used. -
The name of a module pool is not fixed, but should follow the naming conventions in ABAP Workbench. These specify that the name of module pools should start with "SAPM".
Addition
... REDUCED FUNCTIONALITY
Effect
This addition only has an effect in programs of the type
subroutine pool. In
a subroutine pool initiated with the addition REDUCED FUNCTIONALITY, not all components that are usually loaded with an ABAP program are loaded. This leads to a reduction in the
program load and to a lower memory in the
roll area. This means that the full ABAP language range is not available.
-
The embedded structure
systis not loaded. Instead ofsyst, the structuresywith the same meaning can be used. -
The embedded structure
screenis not loaded. The statements LOOP AT SCREEN andMODIFY SCREENare then not possible. - Editing is not possible with the dynpros of the main program of the current program group .
-
No support is available for list printing. The corresponding
additions of the statements
NEW-PAGEandSUBMITcannot be changed.
If none of the missing functionality is required, the REDUCED FUNCTIONALITY addition can be used to avoid the unnecessary resources being consumed by subroutine pools.
Notes
-
The
REDUCED FUNCTIONALITYaddition also works in subroutine pools which were created withGENERATE SUBROUTINE POOL. -
The use of
REDUCED FUNCTIONALITYis especially recommended for small subroutine pools which only contain simple help procedures -
The use of
REDUCED FUNCTIONALITYin a subroutine pool leads to a warning from the syntax check, pointing out that the entire ABAP range is not available. If functionality which is not present is used, corresponding syntax errors occur.