ABAP TRANSACTION CODE AND EVENTS

Module Objectives

•Create transaction codes to load custom programs
•Utilize ABAP Events to manage program processing

Creating a Custom Transaction Code

Creating a Custom Transaction Code
Creating a Custom Transaction Code
we will click on ABAP Repository object and search for Transaction and write the object name.
Creating A transaction Code
Creating A transaction Code
 we will enter the transaction code and select the Start object type and enter the transection text and program name


ABAP Events

  • Events are declared through the event keyword
  • Events are triggered when the program encounters a particular scenario (i.e. program is loaded, execution after selection screen, etc.)
  • Events are terminated when any of these scenarios are met
          -Declaration of another event
          -Declaration of a subroutine or local method
          -End of source code

ABAP Event Keywords

ABAP Events
ABAP Events


ABAP Events

LOAD-OF-PROGRAM

•Occurs prior to the loading of the selection screen
•Infrequently used but can be utilized for additional security checks


INITIALIZATION

•Occurs after to the loading of the selection screen but before it is displayed
•Often used to pre-populate select-options


AT SELECTION-SCREEN

•Occurs at the selection screen prior to executing the main program
•Used to control and validate selection screen elements
•Has additional variants such as ON VALUE-REQUEST, and OUTPUT

START-OF-SELECTION

•Occurs after the selection screen has been validated
•Used to contain the main processing and display components of the program


Sample use of Events

ABAP Events Example
ABAP Events Example



AT SELECTION-SCREEN variants

AT SELECTION-SCREEN OUTPUT

•Occurs during the loading of the selection-screen
•Used to control properties (i.e. visibility) of a selection-screen element

AT SELECTION-SCREEN ON [selection-screen element]

•Occurs prior to AT SELECTION-SCREEN
•Used to give error/warning messages specific to a screen element (i.e. field, block, etc.)

AT SELECTION-SCREEN ON VALUE-REQUEST FOR [selection-screen field]

•Occurs when selection-screen field is issued a value-request command (i.e. F4)
•Used to trigger specific processing for a selection-screen field (i.e. popup for filepath)

AT SELECTION-SCREEN ON HELP-REQUEST FOR [selection-screen field]


•Occurs when selection-screen field is issued a value-request command (i.e. F1)
•Used to trigger specific processing for a selection-screen field (i.e. additional help information)


Comments

Popular posts from this blog

SAP ABAP SELECT STATEMENT

SAP ADOBE FORMS

ABAP AUTHORIZATION CONCEPT