SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → Program structure → Modularization Statements → Event Blocks → program constructor →Syntax
LOAD-OF-PROGRAM.
Effect
This event keyword defines the program constructor of an executable program, a module pool, a function group, or a subroutine pool. The program constructor is an event block whose event is triggered by the ABAP runtime environment when one of the executable programs mentioned above is loaded into the internal session.
When a program is called using SUBMIT or using a transaction code, then (at every call) a new internal session is opened and the event block is executed once at every call. You can initialize global data objects of the program here. The event block must be fully executed, otherwise a runtime error occurs. This means that statements can be specified that exit the event block without returning to it.
The first time an external procedure (subroutine or function module) or a subscreen is called, the master program of the called procedure is loaded into the internal session of the caller, thus triggering the event LOAD-OF-PROGRAM. The event block is executed before the called procedure. Each time a procedure of the same master program is called again by a caller of the same internal session, the event LOAD-OF-PROGRAM is not triggered.
Notes