ABAP Keyword Documentation → ABAP - Reference → Calling and leaving program units → Exiting Program Units
Exiting Processing Blocks
Processing blocks can be implicitly exited by
or program-driven exiting, using these statements:
. 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:
SUBMIT
withoutAND RETURN
Messages and the triggering of exceptions can also end processing blocks.
Other versions: 7.31 | 7.40 | 7.54
Programming Guideline
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 (an exception is triggered or a message is sent).