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

Tabbed selection screen

Former Member
0 Likes
478

Hello.

I have a tabbed selection screen with 3 tabs.

when i execute first tab , and click on back it goes to first tab.

When i execute second tab and goes back , contriol returns to first tab .

Is there any option to handle the back button so that control goes to the tab from which execution was done. that is tab2.

2 REPLIES 2
Read only

Former Member
0 Likes
452

Hi,

You can use the case statement & catch the user command, & according to the tab write the BACK command as you require,

So that the BACK will work independent of tabs,

Thanks & Regards,

Dileep Kumar .C

Read only

Former Member
0 Likes
452

Hi,

Please try with the below code.

SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.

PARAMETERS: p1(10) TYPE c,

p2(10) TYPE c,

p3(10) TYPE c.

SELECTION-SCREEN END OF SCREEN 100.

SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.

PARAMETERS: p_1(10) TYPE c,

p_2(10) TYPE c,

p_3(10) TYPE c.

SELECTION-SCREEN END OF SCREEN 200.

SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 10 LINES,

TAB (20) button1 USER-COMMAND push1,

TAB (20) button2 USER-COMMAND push2,

END OF BLOCK mytab.

INITIALIZATION.

button1 = 'Selection Screen 1'.

button2 = 'Selection Screen 2'.

mytab-prog = sy-repid.

mytab-dynnr = 100.

mytab-activetab = 'PUSH1'.

AT SELECTION-SCREEN.

CASE sy-dynnr.

WHEN 1000.

CASE sy-ucomm.

WHEN 'PUSH1'.

mytab-dynnr = 100.

WHEN 'PUSH2'.

mytab-dynnr = 200.

ENDCASE.

ENDCASE.

With Regards,

Sumodh.P