SAP REJECT ABAP Statements



Get Example source ABAP code based on a different SAP table
  


ID REJECT
• REJECT ABAP Statement

REJECT
Short Reference

ABAP_SYNTAX_OBS
REJECT $[node$].

ABAP Addition
... node

What does it do?
The statement END-OF-SELECTION is only intended for use in executable programs that are linked 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 linked 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 affected.



Latest notes:

REJECT is forbidden in methods. Also, it is not recommended that REJECT is used in processing blocks other than in GET event blocks. Runtime errors can occur if the processing blocks are not executed in the appropriate context.
If logical databases are no longer used, it is no longer necessary to use the statement REJECT.
ABAP_HINT_END

ABAP Addition

What does it do?
node can be a flat character-like data object that, when the statement is executed, 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 ABAP Coding

Exits the event block GET sbook and branches to the event GET sflight after the interface work area sbook was produced as output for the first time. To execute the example, the program must be linked with the logical database F1S.
ABEXA 00543
ABAP_EXAMPLE_END



Runtime Exceptions


Non-catchable Exceptions
Reason for error:
The table whose name is in the field dbtab is not active, that is, the table is not 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
ABAP_NONCAT_END

Return to menu