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 a function group, a function module which has been made available for external users can also be called internally.
- 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.
Internal programming call of method
meth1 of a local class from the event
START-OF-SELECTION and the call of
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( ).