Skip to Content
0
May 28, 2009 at 03:12 AM

Tabbed selection screen problem.

32 Views

Hi expert,

I need some help in creating my selection screen.

Right now i'm creating a tabbed selection screen as the code below follows.

PARAMETERS: p_test AS CHECKBOX USER-COMMAND testrun DEFAULT 'X'.

SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
PARAMETERS: p_offkdt TYPE sy-datum MODIF ID thr.
SELECT-OPTIONS: s_konfe FOR p0002-konfe.
SELECTION-SCREEN END OF SCREEN 100.

SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
SELECTION-SCREEN: BEGIN OF LINE,
                   COMMENT 1(20) text-005 MODIF ID yea
                    FOR FIELD p_lowdt,
                    POSITION POS_LOW.
PARAMETERS: p_lowdt TYPE begda MODIF ID yea,
            p_updt TYPE endda MODIF ID yea.
SELECTION-SCREEN: END OF LINE.
PARAMETERS: p_keydt TYPE dats MODIF ID yea.
SELECTION-SCREEN END OF SCREEN 200.

SELECTION-SCREEN BEGIN OF SCREEN 300 AS SUBSCREEN.
PARAMETERS: p_lvdat TYPE dats MODIF ID lv.
SELECTION-SCREEN END OF SCREEN 300.

SELECTION-SCREEN: BEGIN OF TABBED BLOCK prog_selection FOR 4 LINES,
                  TAB (20) button1 USER-COMMAND push1,
                  TAB (20) button2 USER-COMMAND push2,
                  TAB (20) button3 USER-COMMAND push3,
                  END OF BLOCK prog_selection.
 

Now as I'm using tab and subscreen, therefore i need to initialize the subscreen which i wanted to use which i did in the initialization event.

 
  prog_selection-dynnr = 100.
  prog_selection-activetab = 'PUSH1'.

With the above code, my default tab would be screen 100 which is the first tab.

My problem right now is, after i execute the program, and then i press the back button to go back to the selection screen, the default tab 100 is shown again while i wanted to show the last tab which was picked before the program was executed. Please kindly advise how can i solve this problem.

Many Thanks!

-Suwardi Nursalim-