Application Development 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: 

Active tab in Tabstrip on Report screen

glauco
Active Contributor
0 Kudos
234

Hi.

I developed a Report which has a tabstrip on its selection screen. After user press F8 and execute the report and it writes the result. When it come back to selection screen, it always come back to first tab. I want to back to last selected tab.

I want to define the active tab. How to do that ?

thanks.

Glauco

1 REPLY 1

glauco
Active Contributor
0 Kudos
62

Solved by myself.

AT SELECTION-SCREEN
      IF sy-ucomm(5) = 'UCOMM'.
        g_active_tab   = sy-ucomm. "tabs-activetab.
        g_active_dynnr = 9000.
        g_active_dynnr+3(1) = sy-ucomm+5(1)."tabs-dynnr.
        EXPORT ztab = g_active_tab   TO MEMORY ID 'ztab'.
        EXPORT zdyn = g_active_dynnr TO MEMORY ID 'zdyn'.
      ENDIF.

AT SELECTION-SCREEN OUTPUT.
  IMPORT ztab = g_active_tab   FROM MEMORY ID 'ztab'.
  IMPORT zdyn = g_active_dynnr FROM MEMORY ID 'zdyn'.

  IF g_active_tab IS NOT INITIAL.
    tabs-activetab = g_active_tab.
    tabs-dynnr     = g_active_dynnr.

  ENDIF.