Event in SAP ABAP
In SAP ABAP we use various type of events to trigger the specific codes in a pre-define sequence.
Events are:
1. INITIALIZATION
2. AT SELECTION-SCREEN
3. START-OF-SELECTION
4. TOP-OF-PAGE
5. TOP-OF-PAGE DURING LINE SELECTION
6. END-OF-PAGE
7. END-OF-SELECTION
8. GET
9. GET LATE
Initialization: Used whenever we need to initialize any variable or any field in our program.
AT SELECTION-SCREEN events:
The event AT SELECTION-SCREEN get trigger while the selection screen is being processed. Following are the AT SELECTION-SCREEN events-
1. AT SELECTION-SCREEN OUTPUT
2. AT SELECTION-SCREEN ON 'field'
3. AT SELECTION-SCREEN ON END OF sel
4. AT SELECTION-SCREEN ON VALUE-REQUEST FOR psel_low_high
5. AT SELECTION-SCREEN ON HELP-REQUEST FOR psel_low_high
6. AT SELECTION-SCREEN ON RADIOBUTTON GROUP radi
7. AT SELECTION-SCREEN ON BLOCK block
8. AT SELECTION-SCREEN
9. AT SELECTION-SCREEN...ON EXIT-COMMAND
At Selection screen is the event to validate the input values given in the selection screen using initialization event. First in the sequence AT SELECTION SCREEN event will be triggered and then START-OF-SELECTION.
TOP-OF-PAGE:
The TOP-OF-PAGE event occurs as soon as the system starts processing a new page of a list.
TOP-OF-PAGE DURING LINE SELECTION:
The system triggers this event for each secondary list. If you want to create different page headers for different list levels, you must program the processing block of this event accordingly, for example by using system fields such as SY-LSIND or SY-PFKEY in control statements (IF, CASE).
END-OF-PAGE:
This event is triggered at the end of page.
END-OF-SELECTION: is used mostly when you are using Logical data base in your report. It is triggered when all selection get finished from the data base.
GET:
This is the most important event for executable programs that use a logical database. It occurs when the logical database has read a line from the node and made it available to the program in the work area declared using the statement NODES
GET LATE:
Get Late event is triggered when all of the data records for a node of the logical database have been read. It will call the most recent values of a particular table, set in the program.
SELECTION-SCREEN variants:
1. SELECTION-SCREEN BEGIN OF BLOCK block
2. SELECTION-SCREEN BEGIN OF TABBED BLOCK block FOR n LINES.
3. SELECTION-SCREEN END OF BLOCK block.
4. SELECTION-SCREEN TAB (len) tabname USER-COMMAND ucomm.
5. SELECTION-SCREEN BEGIN OF LINE.
6. SELECTION-SCREEN END OF LINE.
7. SELECTION-SCREEN POSITION pos.
8. SELECTION-SCREEN ULINE.
9. SELECTION-SCREEN COMMENT fmt name.
10. SELECTION-SCREEN PUSHBUTTON fmt name USER-COMMAND ucom.
11. SELECTION-SCREEN SKIP n.
12. SELECTION-SCREEN FUNCTION KEY n.
Comments
Post a Comment