Skip to Content
0
Former Member
Dec 15, 2003 at 04:14 PM

keeping active tab on selection-screen after end of program

607 Views

Hi all,

We have a program which uses tabs on the selection

screen:

selection-screen begin of tabbed block tabb1 for 18

lines.

SELECTION-SCREEN TAB (31) tabs1 USER-COMMAND ucomm1

DEFAULT SCREEN 110.

SELECTION-SCREEN TAB (31) tabs4 USER-COMMAND ucomm4

DEFAULT SCREEN 140.

SELECTION-SCREEN TAB (31) tabs2 USER-COMMAND ucomm2

DEFAULT SCREEN 120.

SELECTION-SCREEN TAB (31) tabs3 USER-COMMAND ucomm3

DEFAULT SCREEN 130.

selection-screen end of block tabb1.

the active tab is determined as follows:

AT SELECTION-SCREEN.

CASE Sy-UCOMM.

WHEN 'UCOMM1'.

tabb1-prog = sy-repid.

tabb1-dynnr = 110.

tabb1-activetab = 'UCOMM1'.

WHEN 'UCOMM2'.

tabb1-prog = sy-repid.

tabb1-dynnr = 120.

tabb1-activetab = 'UCOMM2'.

WHEN 'UCOMM3'.

tabb1-prog = sy-repid.

tabb1-dynnr = 130.

tabb1-activetab = 'UCOMM3'.

WHEN 'UCOMM4'.

tabb1-prog = sy-repid.

tabb1-dynnr = 140.

tabb1-activetab = 'UCOMM4'.

ENDCASE.

The problem is: the user starts the program. The

program shows the first tab, tabs1, on the selection

screen in the tabbed block. The user clicks on tab

tabs2. The tab becomes active and the user fills in

some selection parameters and starts the program. After

execution of program the user presses the 'Back' button

and comes again on the selection screen. But at that

moment the previous program execution is finished and

the program has 'forgotten' which tab was chosen in the

previous run and it shows again the first tab,

so tabs1. The user would like to see tab tabs2 at that

moment and not tabs1. But since the report was in fact

finished and started again, all internal variables were

refreshed and the information on the acitve tab is

nowhere to be found...

Any idea how to make the program 'remember' the

previous active tab?

thanks in advance,

ioana