EVENTS IN CLASSICAL REPORTS of SAP ABAP
EVENTS IN CLASSICAL REPORTS -
CLASSICAL REPORTS: A report which can generate only one list, that is Basic List, is called classical report. First List of a report is called the BASIC LIST.
CLASSICAL REPORTS: A report which can generate only one list, that is Basic List, is called classical report. First List of a report is called the BASIC LIST.
EVENTS IN CLASSICAL REPORTS:
1. INITIALIZATION.
2. AT SELECTION-SCREEN.
(a) AT SELECTION-SCREEN ON <FIELD>.
(b) AT SELECTION-SCREEN OUTPUT.
(c) AT SELECTION-SCREEN ON VALUE-REQUEST FOR <FIELD>.
3. START-OF-SELECTION.
4. TOP-OF-PAGE.
5. END-OF-PAGE.
6. END-OF-SELECTION.
INITIALIZATION : This is the first event to be triggered. So this event is triggered before the selection screen is displayed. This event is used to give the default values to the selection screen fields.
AT_SELECTION-SCREEN : Event is triggered after giving input in the selection-screen fields. So this event is used to handle the user actions on the screen. Also this is used to validate all the selection-screen fields.
AT SELECTION-SCREEN ON <FIELD> : This event is used to validate a particular field present on the selection-screen.
AT SELECTION-SCREEN OUTPUT : This event is used to change the selection screen properties dynamically.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR <FIELD>:- This event is used to give F4 help to a particular field resent on the selection-screen.
START-OF-SELECTION:- The main logic of the program is written in this event. So usually write statement is recognized from this event.
TOP-OF-PAGE:- This event is used to write something on top of every page. The first write statement / output statement [SKIP] of a page triggers this event.
END-OF_PAGE : This event is used to write something at end of every page. So last line of the page triggers this event. So we have to allocate the line for end-of-page.
END-OF_SELECTION : Program output usually written in this event. So this event is used to handle the abnormal termination of the program. Stop statement written in start of selection event takes the control to the end of selection event.
No event is mandatory. But default event is start-of-selection.
SAP ABAP is an event driven language so there is no need to maintain the order of the events. System will take care of the order of the events automatically.
The write statement written in initialization event cannot be seen if the program is having the selection-screen, because the initialization event is triggered before the selection screen is displayed. If the program is not having the selection-screen then we can see the write statement written in Initialization event. So starting of a new event symbolizes ending of the previous event.
So STOP statement in start-of-selection takes the control to end-of-selection statement.
Skip statement also triggers top-of-page event.
Declarations should be written before initialization event.
Comments
Post a Comment
If you have any doubts let me know