ARTICLE
Exiting Processing Blocks
Processing blocks can be implicitly
exited by
normal exiting
or program-driven exiting, using these statements:
RETURN
EXIT
CHECK
STOP
CHECK SELECT-OPTIONS (obsolete,
for logical databases only)
REJECT (obsolete, for logical databases only)
. The onward flow of the program depends on the type of processing
block.
In addition to the statements described here, statements that call other
units without returning to the caller after the call is made, also end
their processing block. These include:
LEAVE [TO] SCREEN
LEAVE LIST-PROCESSING
LEAVE TO TRANSACTION
SUBMIT without AND RETURN
Messages and raised
exceptions can also end processing blocks.
ABAP_PGL Only use RETURN to
exit procedures
Note
Exiting a procedure by pressing RETURN (or EXIT or
CHECK ) is the error-free way to end the procedure. Formal parameters
for which the pass by value is defined are not passed to the assigned
actual parameters only if the procedure terminates after an error (if an
exception is raised or a message is sent).
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved