Event Control
Concept
When a program is executed, either event blocks are called in a predefined order or dialog modules or event blocks are executed after user actions on SAP GUI screens.
-
Dialog modules are implemented between the statements MODULE and ENDMODULE. An addition, OUTPUT or INPUT, is used to assign the dialog module to the dynpro processing events PBO or PAI, which permit actions either before or after the screen is displayed.
-
Event blocks are introduced using an event key word and closed by the following processing block or the end of the program. Examples of event key words are LOAD-OF-PROGRAM, INITIALIZATION, START-OF-SELECTION, AT SELECTION-SCREEN, or AT USER-COMMAND.
The concept of event control has its origins in the role of the application layer has an intermediary between the database and presentation layers. Early ABAP programs were mainly used to format the business data in the database as print lists or screen lists (known as reports). The program flow logic was defined by the interaction on the UI on the one hand and the provision of data on the other. In today's ABAP programs, event control is not so significant, since dynpros and their variants selection screens and list have been replaced by modern class-based user interfaces that are no longer based on this concept- In executable programs, however, the reporting event START-OF-SELECTION, is still the starting point for processing.