Monday, March 13, 2017
Order of ABAP Events
Although there are subroutine that makes our code easier to maintain by modularize the program into modular units or logical blocks. There are some default blocks that help in controlling the flow of the program. These blocks are known as there are some ABAP events and they run in sequence.
LOAD-OF-PROGRAM
The first triggered event is load-of-program that runs before any other ABAP code. The purpose is to load the program into system memory so that the program can be executed. However, this event only available for program with the type of 1, M, F, or S.
INITIALIZATION.
Initialization will be the next event after Load-Of-Program. But, it will be the first triggered event if the program does not have load-of-program event. This event allow us to initialize values of variables or input fields of the selection screen.
AT SELECTION-SCREEN.
Before the selection screen is displayed, this event is usually called to validate done on selection screen. Moreover, it can be used to manipulate the actual screen in order to make a dynamic selection screen that can hide/disable some parameter by the use of loop at screen funcion.
START-OF-SELECTION.
This event is the first event that is triggered right after the user executes the program by pressing execute button (F8). It is before any GET events or any other event processing blocks. This will be started automatically when there is no other event keywords coded.
END-OF-SELECTION.
This event is triggered after all logical database records have been read or once the START-OF-SELECTION is finished. The purpose of this is generally only for the summary/results of reports.
TOP-OF-PAGE.
This event is used on basic list only in order to create a header.
END-OF-PAGE.
On the contrary, this event is used to create a footer.
AT LINE-SELECTION.
After the screen list has been displayed, the user can select on a list line by double click it or F2 to display a secondary list.
AT PFn (n is number between 01-24)
This is the event which is triggered by function key to perform interactive action.
AT USER-COMMAND.
This event triggered when toolbar button is pushed.
Source:
http://saptechsrs.blogspot.co.id/2011/10/abap-events-in-report-programming.html
http://loveabap.blogspot.co.id/2012/04/abap-flow-of-events-1.html
http://www.sapdev.co.uk/abap/abap-events.htm
Labels:
ABAP,
AT LINE-SELECTION,
AT USER-COMMAND,
BASIC,
BLOCK,
CONCEPT,
END-OF-PAGE,
END-OF-SELECTION,
EVENTS,
INITIALIZATION,
LOAD-OF-PROGRAM,
ORDER,
SAP,
SELECTION-SCREEN,
SIMPLE,
START-OF-SELECTION,
TOP-OF-PAGE
Subscribe to:
Posts (Atom)