Get Example source ABAP code based on a different SAP table
Program Groups in External Procedure Calls The programs within an ABAP_ISESS > form program groups> there. There is always one main program group> and possibly multiple additional program groups>. Each program group contains a main program and any other programs loaded. If, during an external procedure call, the procedure accesses shared resources of the program group, it is important to know the program group of the compilation unit> of the procedure. This determines whether non-critical external procedure calls and critical external procedure calls are made.
Non-Critical External Procedure Calls The only procedures intended for external calls are the visible methods of global classes and function modules. The compilation units of these procedures are always main programs> of their program groups and it is always determined that the procedures work with the resources of this program group.
Latest notes: For this reason, only the methods of global classes and function modules should be called externally. ABAP_HINT_END
Critical External Procedure Calls Subroutines and the methods of local classes are not intended for external calls. Both in external subroutine calls and in dynamic calls of the local class of a program that does not create its own program group, there is no static assignment to a program group. The program in which a program that is yet to be loaded is used for the first time determines the program group. The order of the user actions, field content, or switches can determine the order of usage, which means that the compilation unit of the procedure can belong to the main program group in one instance, and to an additional program group in another instance. The way external procedures of additionally loaded programs are used is critical for the following reasons:
Within a program group, only the dynpros>, selection screens>, lists>, and GUI statuses> of the main program are used. For example, the statement CALL SCREEN>> does not call any dynpros of its own compilation unit in an externally called subroutine of another loaded program and calls a dynpro of the main program of its program group instead. The responses to user actions are also raised in the main program.