ABAP Keyword Documentation → ABAP - Reference → Obsolete Language Elements → Obsolete Leave
LEAVE
Other versions: 7.31 | 7.40 | 7.54
Obsolete Syntax
LEAVE.
Effect
The statement LEAVE without additions is context-specific.
-
During list processing (when the
list processor is active),
LEAVEfunctions likeLEAVE LIST-PROCESSING. The list processor is either called usingLEAVE TO LIST-PROCESSINGor called implicitly when executable programs are processed. -
In all other situations,
LEAVEis executed only when the system fieldsy-calldis not initial; if this field is initial, it is ignored.
LEAVEexits a program called usingCALL TRANSACTIONorSUBMIT ... AND RETURN, and returns to the point after the call point.
LEAVEdoes not exit a program if it was started usingLEAVE TO TRANSACTIONor a transaction code from a screen, or if the program is processed in batch input.
- If a program was called using
SUBMITwithout theAND RETURNadditions,LEAVEfunctions the same way as in the calling program.
Note
The behavior of the statement LEAVE without additions is particularly unpredictable
(statically) when specified in callable units. Therefore, LEAVE should only be used with additions that uniquely control the behavior: