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

Using the Tabstrip

Former Member
0 Likes
621

Hi,

I am using a tabstrip with 3 options. When you select an option, a set of fields is getting automatically filled.

At one of the options, i have to call another program first to do something and when the user is done there, i need to go back to the original program.

Can i, in my original program set the tabstrip to tab 3 instead of tab 1?

Because, when i get back in my original program, the fields are filled with the data from option 3, but the tabstrip is setted on tab1.

Edited by: Fritz Heinzwagel on Apr 3, 2008 12:33 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
573

Yes you can.

If you used the Table Control Wizard, you can use code like this to set the tab you want to go to.


g_tabctl01-pressed_tab = c_tabctl01-tab1.

in the Global area the wizard generates this code which you can relate to your code


* FUNCTION CODES FOR TABSTRIP 'TABCTL01'
CONSTANTS: BEGIN OF c_tabctl01,
             tab1 LIKE sy-ucomm VALUE 'TABCTL01_FC1',
             tab2 LIKE sy-ucomm VALUE 'TABCTL01_FC2',
             tab3 LIKE sy-ucomm VALUE 'TABCTL01_FC3',
             tab4 LIKE sy-ucomm VALUE 'TABCTL01_FC4',
             tab5 LIKE sy-ucomm VALUE 'TABCTL01_FC5',
             tab6 LIKE sy-ucomm VALUE 'TABCTL01_FC6',
             tab7 LIKE sy-ucomm VALUE 'TABCTL01_FC7',
             tab8 LIKE sy-ucomm VALUE 'TABCTL01_FC8',
           END OF c_tabctl01.
* DATA FOR TABSTRIP 'TABCTL01'
CONTROLS:  tabctl01 TYPE TABSTRIP.
DATA:      BEGIN OF g_tabctl01,
             subscreen   LIKE sy-dynnr,
             prog        LIKE sy-repid VALUE 'ZLMX_LEAD_TRACKING',
             pressed_tab LIKE sy-ucomm VALUE c_tabctl01-tab1,
           END OF g_tabctl01.

3 REPLIES 3
Read only

Former Member
0 Likes
573

Hi,

when you create your tabstrip with the wizard, you get a code for selecting the active tab:

MODULE MYTAB_ACTIVE_TAB_SET OUTPUT.

MYTAB-ACTIVETAB = G_MYTAB-PRESSED_TAB.

CASE G_MYTAB-PRESSED_TAB.

WHEN C_MYTAB-TAB1.

G_MYTAB-SUBSCREEN = '0101'.

WHEN C_MYTAB-TAB2.

G_MYTAB-SUBSCREEN = '0102'.

ENDCASE.

ENDMODULE.

follow your code with the debugger after return of the called program and check whether your setting the active tab.

Read only

0 Likes
573

Thanks.

Read only

Former Member
0 Likes
574

Yes you can.

If you used the Table Control Wizard, you can use code like this to set the tab you want to go to.


g_tabctl01-pressed_tab = c_tabctl01-tab1.

in the Global area the wizard generates this code which you can relate to your code


* FUNCTION CODES FOR TABSTRIP 'TABCTL01'
CONSTANTS: BEGIN OF c_tabctl01,
             tab1 LIKE sy-ucomm VALUE 'TABCTL01_FC1',
             tab2 LIKE sy-ucomm VALUE 'TABCTL01_FC2',
             tab3 LIKE sy-ucomm VALUE 'TABCTL01_FC3',
             tab4 LIKE sy-ucomm VALUE 'TABCTL01_FC4',
             tab5 LIKE sy-ucomm VALUE 'TABCTL01_FC5',
             tab6 LIKE sy-ucomm VALUE 'TABCTL01_FC6',
             tab7 LIKE sy-ucomm VALUE 'TABCTL01_FC7',
             tab8 LIKE sy-ucomm VALUE 'TABCTL01_FC8',
           END OF c_tabctl01.
* DATA FOR TABSTRIP 'TABCTL01'
CONTROLS:  tabctl01 TYPE TABSTRIP.
DATA:      BEGIN OF g_tabctl01,
             subscreen   LIKE sy-dynnr,
             prog        LIKE sy-repid VALUE 'ZLMX_LEAD_TRACKING',
             pressed_tab LIKE sy-ucomm VALUE c_tabctl01-tab1,
           END OF g_tabctl01.