ABAP – Adding Pushbutton in selection screen

We can add push button in selection screen as follows:

SELECTION-SCREEN BEGIN OF BLOCK B1.

SELECTION-SCREEN PUSHBUTTON /20(10) btn1 USER-COMMAND CLI1.
SELECTION-SCREEN PUSHBUTTON /20(10) btn2 USER-COMMAND CLI2.

SELECTION-SCREEN END OF BLOCK B1.

When the user clicks the pushbutton on the selection screen, usercommand  (ucom)  is entered in the Dictionary field SSCRFIELDS-UCOMM and in program it will present in the variable after USER-COMMAND here it is CLI1 and CLI2.

This will create 2 button in selection screen with blank names. If you want to name the buttons use the following code.

INITIALIZATION.

btn1 = ‘Button1′.

btn2 = ‘Button2′.

0 Comments

Leave A Reply