ABAP Keyword Documentation → ABAP - Reference → Calling and leaving program units → Calling Processing Blocks → Calling Procedures
External Procedure Calls
The following procedures of the same AS ABAP can be called externally:
- Procedures which are intended for external calls:
- Methods of global classes in class pools visible where called (that is, public methods in all programs), protected methods in subclasses, and private methods in friends of the classes.
- Function modules in function groups
- Methods of local classes of other programs that are visible at the call position if a reference variable with a reference to an object of the class was passed to the calling program
- Procedures which are not intended for external calls but can still be called externally (but should not be):
- Subroutines in executable programs, module pools, function groups, and subroutine pools
- Static methods of local classes which are visible at the call position, if the name of the class is specified dynamically using an absolute type name
In the first external call of a procedure of the same
AS ABAP, its
master program is loaded into the
internal session of the calling program if it has not yet been loaded. Except when loading
class
pools, the event LOAD-OF-PROGRAM
is also triggered, which calls the
program constructor
program. External calls of subroutines and methods of local classes is not recommended and is critical, since the assignment of the loaded master program to a
program group is usually not determined:
Furthermore, for external procedure calls, the possibility that properties of the calling and called programs may differ must be considered.
Other versions: 7.31 | 7.40 | 7.54
Programming Guideline
Only call suitable procedures externally