Posts

Showing posts with the label initialization keyword

SAP ABAP - INITIALIZATION Events, Examples With Output.

Image
Initialization event gets triggered when the program is loaded in memory but before the selection screen processing. This event gives an opportunity to initialize the input fields of the selection screen. Initialization is an event that can be used for setting default values on selection fields , setting a title bar, assigning text to pushbuttons, etc. at runtime. Initialization event block can also be used to perform authority checks. SAMPLE PROGRAM - 1: REPORT ztest. SELECTION-SCREEN BEGIN OF BLOCK rad1 WITH FRAME TITLE title. PARAMETER: p_budat LIKE bsid-budat OBLIGATORY. SELECTION-SCREEN END OF BLOCK rad1. INITIALIZATION. title = 'Selection'. p_budat = '20110825'. AUTHORITY-CHECK OBJECT 'Z_BUDAT' ID 'ZCHECK' FIELD 'BUDAT'. IF sy-subrc EQ 0. ..... ENDIF. START-OF-SELECTION. WRITE: 'START-OF-SELECTION Event Initialized'. OUTPUT: On executing / F8: The output is as expected: Also remember...