ABAP Keyword Documentation → ABAP - Reference → Program structure → Introductory Statements for Programs
REPORT
Other versions: 7.31 | 7.40 | 7.54
Syntax
REPORT rep [list_options]
[MESSAGE-ID mid]
[DEFINING DATABASE ldb]
[REDUCED FUNCTIONALITY].
Extras
1. ... MESSAGE-ID mid
2. ... REDUCED FUNCTIONALITY
Effect
The statement REPORT
introduces an
executable program. It must be the first statement of a standalone program after the triggering of possible
include programs. You
must specify the name rep
directly. You can use the optional addition list_options
to influence the
basic list of the program. A
message class can be specified using MESSAGE-ID
.
The addition DEFINING DATABASE
is used to define a
logical database,
whereas REDUCED FUNCTIONALITY
shoudl only be used for PROGRAM
.
Notes
-
In the above statement, you can replace the key word
REPORT
with the key wordPROGRAM
. In executable programs,PROGRAM
means the same asREPORT
and can be used with the additions of REPORT. As a rule, only initiate executable programs usingREPORT
. -
Although you do not absolutely need to specify the name
rep
, you should always use the name of the ABAP program from the Repository.
Addition 1
... MESSAGE-ID mid
Effect
This addition specifies a message class mid
that, in the program, allows
the use of shortforms of the statement MESSAGE
in which only the message type and message number are specified. The message class must be specified
directly and appear in the column ARBGB of the database table T100. The variations of statement
MESSAGE
, in which the message class is specified, override the addition MESSAGE-ID
.
Example
Default setting of the message class Z_MY_MESSAGES for the program Z_MY_REPORT.
REPORT z_my_report MESSAGE-ID z_my_messages.
Addition 2
... REDUCED FUNCTIONALITY
Effect
This addition is only intended for the PROGRAM
statement in subroutine pools.