Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  Calling and leaving program units →  Calling Processing Blocks →  Calling Procedures 

Internal Procedure Calls

All procedures which are defined in the same ABAP program and are visible from the calling position can be called internally.

  • In every ABAP program, and within a class, the visible methods of the class or visible methods of other local classes of the same program can be called. The calling of methods is the only procedure call which is recommended for the program modularization.
  • In every ABAP program that still contains subroutines, these can also still be called internally. Subroutines are an obsolete form of internal modularization and should be replaced by methods if possible.

The required program is always already loaded for internal calls.

Other versions: 7.31 | 7.40 | 7.54


Example

Internal programming call of method meth1 of a local class from the event block START-OF-SELECTION and the call of meth2 from meth1.

CLASS cls DEFINITION. 
  PUBLIC SECTION. 
    METHODS meth1. 
  PRIVATE SECTION. 
    METHODS meth2. 
ENDCLASS. 

CLASS cls IMPLEMENTATION. 
  METHOD meth1. 
    ... 
    meth2( ). 
    ... 
  ENDMETHOD. 
  METHOD meth2. 
    ... 
  ENDMETHOD. 
ENDCLASS. 

START-OF-SELECTION. 
  NEW cls( )->meth1( ).