LEAVE

Short Reference

Syntax

LEAVE.

Effect

This statement is only executed if the system field sy-calld is not initial, otherwise it is ignored.

LEAVE exits a program called using

CALL TRANSACTION, CALL DIALOG, or SUBMIT ... AND RETURN and returns to the calling position. In the case of programs called using CALL DIALOG, the output parameters of the dialog module are transferred to the caller.

LEAVE does not exit a program if it was started using LEAVE TO TRANSACTION or a transaction code from a screen, or if the program is processed in batch input.

If a program was called using SUBMIT without the AND RETURN additions, LEAVE functions the same as in the calling program.

Note

The LEAVE statement without an addition exits a program depending on how it was called. Therefore, LEAVE should only be used with additions that uniquely control the behavior: