Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Report: Get USER-Comand from subscreen?

Former Member
0 Likes
759

Hi all,

I wrote a report:

SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
PARAMETERS: p1 TYPE c LENGTH 10,
            p2 TYPE c LENGTH 10,
            p3 TYPE c LENGTH 10.
SELECTION-SCREEN END OF SCREEN 100.

SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
PARAMETERS: q1 TYPE c LENGTH 10,
            q2 TYPE c LENGTH 10,
            q3 TYPE c LENGTH 10.
SELECTION-SCREEN END OF SCREEN 200.

SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 10 LINES,
                  TAB (20) button1 USER-COMMAND push1
                                   DEFAULT SCREEN 100,
                  TAB (20) button2 USER-COMMAND push2
                                   DEFAULT SCREEN 200,
                  END OF BLOCK mytab.

INITIALIZATION.
  button1 = 'Selection Screen 1'.
  button2 = 'Selection Screen 2'.

When the user now start the ABAP, ow do I know, wich subscreen is active (Wich user command was fired)?

Thanks

Regards

Mario

1 ACCEPTED SOLUTION
Read only

apratsch
Explorer
0 Likes
719

Hi Mario,

you need to use event AT SELECTION-SCREEN. There you can get the user command from field SY-UCOMM after one of the tabs was clicked.


Best regards,

Andreas

Hi all,

I wrote a report:

SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
PARAMETERS: p1 TYPE c LENGTH 10,
            p2 TYPE c LENGTH 10,
            p3 TYPE c LENGTH 10.
SELECTION-SCREEN END OF SCREEN 100.

SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
PARAMETERS: q1 TYPE c LENGTH 10,
            q2 TYPE c LENGTH 10,
            q3 TYPE c LENGTH 10.
SELECTION-SCREEN END OF SCREEN 200.

SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 10 LINES,
                  TAB (20) button1 USER-COMMAND push1
                                   DEFAULT SCREEN 100,
                  TAB (20) button2 USER-COMMAND push2
                                   DEFAULT SCREEN 200,
                  END OF BLOCK mytab.

INITIALIZATION.
  button1 = 'Selection Screen 1'.
  button2 = 'Selection Screen 2'.

When the user now start the ABAP, ow do I know, wich subscreen is active (Wich user command was fired)?

Thanks

Regards

Mario

2 REPLIES 2
Read only

apratsch
Explorer
0 Likes
720

Hi Mario,

you need to use event AT SELECTION-SCREEN. There you can get the user command from field SY-UCOMM after one of the tabs was clicked.


Best regards,

Andreas

Read only

Former Member
0 Likes
719

Hi Andreas,

danke!

Regards

Mario