LEAVE without additions is context-specific.
During list processing (when the
list processor is active),
LEAVE LIST-PROCESSING. The list processor is either called using
LEAVE TO LIST-PROCESSINGor called implicitly when executable programs are processed.
In all other situations,
LEAVEis executed only when the system field
sy-calldis not initial; if this field is initial, it is ignored.
LEAVEexits a program called using
SUBMIT ... AND RETURN, and returns to the point after the call point.
LEAVEdoes not exit a program if it was started using
LEAVE TO TRANSACTIONor a transaction code from a screen, or if the program is processed in batch input.
- If a program was called using
LEAVEfunctions the same way as in the calling program.