We can add new toolbar (maximal 5) in ABAP report to make program more interactive to user on selection screen.

Do following step.

1. Declare work area sscrfields.

TABLES: sscrfields.

2. Define text displayed in button in initialization event.

INITIALIZATION.
MOVE 'This is button 1' TO sscrfields-functxt_0n." n = 1 up to 5

3. Activate toolbar in selection screen.

SELECTION-SCREEN FUNCTION KEY n.

4. Check user command in AT selection screen

AT SELECTION-SCREEN.
IF sy-ucomm = 'FC0n'." n = 1 up to 5
....
ENDIF.

This is complete sample:

REPORT ZAALGAL0005 .

TABLES: sscrfields.

DATA: d_butt1(4).

PARAMETERS: p_grpa1(10) MODIF ID A,
p_grpa2(10) MODIF ID A,
p_grpb1(10) MODIF ID B.

SELECTION-SCREEN FUNCTION KEY 1.
SELECTION-SCREEN FUNCTION KEY 2.

INITIALIZATION.
MOVE 'This is button 1' TO sscrfields-functxt_01.
MOVE 'Toggle 1' TO sscrfields-functxt_02.
d_butt1 = 'NO'.

AT SELECTION-SCREEN.
IF sy-ucomm = 'FC01'.
d_butt1 = 'YES'.
sscrfields-ucomm = 'ONLI'.
ELSEIF sy-ucomm = 'FC02'.
IF sscrfields-functxt_02 = 'Toggle 1'.
sscrfields-functxt_02 = 'Toggle 2'.
ELSE.
sscrfields-functxt_02 = 'Toggle 1'.
ENDIF.
ENDIF.

START-OF-SELECTION.
WRITE d_butt1.



Serkan AKKAVAK
Computer Engineer
SAP Department Deputy Manager
Contact : serkurumsal@yandex.com