ABAP Events
March-2005
Objectives
The participants will be able to:
Interpret ABAP Event-Driven Programming.
Identify the System Triggered events that are executed during runtime of a Report program
Identify the User Invoked List Display events, that are triggered after the report has generated the basic list.
March-2005
Program Flow
List Produced
Program Header
2
3 1
March-2005
March-2005
March-2005
March-2005
March-2005
March-2005
March-2005
10
March-2005
11
March-2005
Demonstration
Observe the following system-triggered events during execution of a Report program.
INITIALIZATION. AT SELECTION-SCREEN. START-OF-SELECTION. GET <table>. GET <table> LATE. END-OF-SELECTION. TOP-OF-PAGE. END-OF-PAGE.
12
March-2005
Practice
Observe the following system-triggered events during execution of a Report program.
INITIALIZATION. AT SELECTION-SCREEN. START-OF-SELECTION. GET <table>. GET <table> LATE. END-OF-SELECTION. TOP-OF-PAGE. END-OF-PAGE.
13
March-2005
14
March-2005
PF##
15 ABAP Events | 4.02 March-2005
PICK
16 ABAP Events | 4.02 March-2005
17
March-2005
Demonstration
Observe the following user-invoked List Display events after the Basic List has been generated by a Report Program.
AT PF##. AT LINE-SELECTION. AT USER-COMMAND.
18
March-2005
Practice
Observe the following user-invoked List Display events after the Basic List has been generated by a Report Program.
AT PF##. AT LINE-SELECTION. AT USER-COMMAND.
19
March-2005
Function Code
AT PF## PF##
Action Assigned
Function key pressed
AT LINE-SELECTION
PICK
AT USER-COMMAND
20
March-2005
21
March-2005
Summary
Flow of an ABAP program is controlled by events. Execution order of events does not depend on the order in which they are coded in the program. All ABAP statements that are not coded as part of an event, are part of the event START-OF-SELECTION. This event does not need to be coded explicitly in an ABAP program. It gets triggered automatically. END-OF-SELECTION is the last system triggered event to be processed during the runtime of a program. It occurs after all database retrievals has finished and before any User-invoked events. It occurs only once during the execution of an ABAP program. AT PF## (when any Function key is pressed), AT LINE-SELECTION (when the user double-clicks on a line) and AT USER-COMMAND (Clicking on a pushbutton or selecting a menu item) are three different user-invoked events that are handled from an ABAP program.
22
March-2005
Questions
What are the different events in an ABAP program that can be triggered before user interaction ? When do they get triggered ? What are the user-invoked events for a list display ? What are the events used for displaying Headers and Footers in a list ? When are these events invoked ? Which part of a code in a program are executed for an event ?
23
March-2005