ABAP Keyword Documentation →  ABAP − Reference →  Calling and leaving program units →  Exiting Program Units →  Exiting Programs → 

LEAVE PROGRAM  Syntax Diagram

Short Reference

Syntax

LEAVE PROGRAM.

Effect

This statement immediately ends the current main program and deletes its internal session - including all loaded programs, instances, and their data .

The LEAVE PROGRAM statement can appear anywhere within any processing blocks. It ends the program regardless of the program/object or the program group of the internal session in which it is executed.

The runtime environment responds to the LEAVE PROGRAM statement depending on how the main program was called in the internal session:

Notes