Skip to content

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

Regular Exiting of a Processing Block

A processing block is exited in a regular when reaching its end. For processing blocks that are concluded using an END statement, this is the end. Event blocks that are not concluded explicitly with a statement have an implicit conclusion after their last statement.

Depending on the processing block exited, the runtime environment behaves as follows:

  • In procedures, the program returns to after the point where they were called. The output parameters for which pass by values are defined are passed to the bound actual parameters.
  • In event blocks, the control is given back to the runtime environment and the current process of the runtime environment continues with the program execution.

Other versions: 7.31 | 7.40 | 7.54


Example

Output before, during, and after execution of a procedure.

CLASS demo DEFINITION. 
  PUBLIC SECTION. 
    CLASS-METHODS main. 
ENDCLASS. 

CLASS demo IMPLEMENTATION. 
  METHOD main. 
    cl_demo_output=>write( `In procedure` ). 
  ENDMETHOD. 
ENDCLASS. 

START-OF-SELECTION. 
  cl_demo_output=>write( `Before procedure` ). 
  demo=>main( ). 
  cl_demo_output=>display( `After procedure` ).