ABAP Keyword Documentation → ABAP − Reference → Program Layout → 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 introduces a
module pool or a
subroutine pool. It must be the first statement of a standalone program after any
include programs are
resolved. The name prog must be specified directly. The following applies for the additions:
-
In module pools, the additions
list_optionsandMESSAGE-IDof the statementPROGRAMhave the same meaning as the additions of the same name in the statement REPORT. The additionREDUCED FUNCTIONALITYworks only in subroutine pools and is otherwise ignored. -
In subroutine pools,
MESSAGE-ID(if specified) has the same meaning as in 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
-
The keyword
PROGRAMcan also be replaced by the keywordREPORT. 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 program type
subroutine pool. In
other program types, the syntax check raises a warning. In a subroutine pool introduced with the addition
REDUCED FUNCTIONALITY, not all components that are usually loaded with an ABAP program are loaded. This reduces the
program load and memory consumption in the
session memory. This means that the full ABAP language range is not available.
-
The built-in structure
systis not loaded. Instead ofsyst, the structuresywith the same meaning can be used. -
The built-in structure
screenis not loaded. The statements LOOP AT SCREEN andMODIFY SCREENare then not possible. - It is not possible to work with the dynpros of the main program of the current program group.
-
No support is available for spooling lists. The corresponding
additions of the statements
NEW-PAGEandSUBMITcannot be used.
If none of the missing functions are required, the addition REDUCED FUNCTIONALITY can be used to avoid the unnecessary resources being consumed by subroutine pools.
Notes
-
The addition
REDUCED FUNCTIONALITYalso 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 produces a warning from the syntax check, indicating that not all ABAP functions are available. If nonexistent functions are used, corresponding syntax errors are produced.