ABAP Keyword Documentation → ABAP − Reference → Obsolete Language Elements → Obsolete Processing of External Data → Logical Databases (Obsolete) → Logical Databases - Statements → Statements for Logical Databases
REJECT
Other versions: 7.31 | 7.40 | 7.54
Obsolete Syntax
REJECT [node].
Addition
Effect
The statement END-OF-SELECTION
is only intended for use in
executable programs that are associated with a
logical database.
It exits the current GET
event block
of an executable program. If node
is not specified, any nodes that are at
a lower level in the hierarchical structure of the associated logical database are no longer processed.
The logical database reads the next line of the current node or next higher node, if it has reached the end of the hierarchy level.
The REJECT
statement always refers to the current GET
event, not to the location where it is specified. If a
procedure is called in a
GET
event block, and the REJECT
statement is executed there, the calling event block is modified.
Notes
-
REJECT
cannot be used in methods. Also, it is not recommended that REJECT is used in processing blocks other than inGET
event blocks. Runtime errors can occur if the processing blocks are not executed in the correct context. -
If logical databases are no longer used, the statement
REJECT
is also no longer necessary.
Addition
... node
Effect
node
can be specified as a
flat
character-like data object. When the statement is executed, the object must contain the name of a node that lies above the current node in the
logical database
hierarchy. If node
is specified, the logical database reads the next data record of the corresponding node.
Example
Exits the event block GET
sbook
and branches to
the event GET sflight
after the interface work area sbook
is produced for the first time. Before the example can run, the program must be associated with the logical database F1S.
NODES: sflight,
sbook.
GET sflight.
cl_demo_output=>next_section(
|Carrid: { sflight-carrid } | &&
|Connid: { sflight-connid } | &&
|Fldate: { sflight-fldate }| ).
GET sbook.
cl_demo_output=>write_text(
|Bookid: { sbook-bookid }| ).
REJECT 'SFLIGHT'.
END-OF-SELECTION.
cl_demo_output=>display( ).
Exceptions
Non-Handleable Exceptions
-
Cause: The table whose name is in the field
dbtab
is not active. This means that the table does not lie above the current table in the database hierarchy. Therefore, the processing cannot continue with the next data record of this table.
Runtime error:REJECT_TABLE_NOT_FOUND