ABAP Keyword Documentation → ABAP - Reference → Calling and leaving program units → Calling Processing Blocks → Calling procedures
External Procedure Call
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):
- Subprograms 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
During the first external call of a procedure of the same
AS ABAP, its
frame program is loaded in the
internal session of the calling program if it has not yet been loaded. Except when loading
class
pools, the LOAD-OF-PROGRAM
event is also triggered, which calls the
program constructor
program. The external call of subprograms and methods of local classes is not recommended and is critical, since the assignment of the loaded frame 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