2012 Jan 31 5:04 PM
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
2012 Jan 31 6:35 PM
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.