‎2011 Dec 28 7:05 AM
Hi,
I have tabbed selection screen. When am in second tab if error occurs then first tab becomes as active tab, i want second as the active tab. Please advise on this.
Regards,
srikanth
‎2011 Dec 28 7:09 AM
‎2011 Dec 28 7:11 AM
hi shrikant,
kindly explain what u really want?
regards,
Sulabh
‎2011 Dec 28 7:17 AM
Hi,
I have a selection screen with 2 tabs, tab1 and tab2. Functin codes or tab1 is 'f1'
and for tab2 is 'f2'. Now i am in tab2, entered some selections and excuted. In screen
validation a error message raised. Now screen-ative tab automatically becomes 'f1', but
i want it to be 'f2'.
Regards,
srikanth
‎2011 Dec 28 7:25 AM
Hai,
I tried your scenario its working for me. use this code
IF SY-UCOMM = 'F1'. // fctcode of TAB1
TAB-activetab = 'F1' .
dynnr = '0002'.
ELSEIF SY-UCOMM = 'F2' .
TAB-activetab = 'F2' .
dynnr = '0003'.
ELSE.
TAB-activetab = 'F1'.
dynnr = '0002'.
ENDIF.
‎2011 Dec 28 7:13 AM
hi,
kindly check this code.....
SELECTION-SCREEN BEGIN OF TABBED BLOCK tbl FOR 15 LINES.
SELECTION-SCREEN TAB (15) tbl_tab1 USER-COMMAND tab1 DEFAULT SCREEN 9001.
SELECTION-SCREEN TAB (15) tbl_tab2 USER-COMMAND tab2 DEFAULT SCREEN 9002.
SELECTION-SCREEN END OF BLOCK tbl.
SELECTION-SCREEN BEGIN OF SCREEN 9001 AS SUBSCREEN.
PARAMETERS: pa_test.
SELECTION-SCREEN END OF SCREEN 9001.
SELECTION-SCREEN BEGIN OF SCREEN 9002 AS SUBSCREEN.
SELECTION-SCREEN END OF SCREEN 9002.
PARAMETERS:
Hidden parameters to store the last selected tab strip
pa_dynnr LIKE tbl-dynnr NO-DISPLAY,
pa_acttb LIKE tbl-activetab NO-DISPLAY.
INITIALIZATION.
Descriptions of the tab strips
tbl_tab1 = 'First tab'.
tbl_tab2 = 'Second tab'.
AT SELECTION-SCREEN OUTPUT. " PBO
if the last choice is saved
IF NOT pa_dynnr IS INITIAL.
activate the last choice
tbl-dynnr = pa_dynnr.
tbl-activetab = pa_acttb.
clear the saved choice to make it only once
pa_dynnr = ''.
pa_acttb = ''.
ENDIF.
AT SELECTION-SCREEN. " PAI
if the list is started (F8)
IF sy-ucomm = 'ONLI'.
save the last choice
pa_dynnr = tbl-dynnr.
pa_acttb = tbl-activetab.
ENDIF.
START-OF-SELECTION.
WRITE: / tabstrip_tbl-activetab. " show which tabstrip is active
‎2011 Dec 28 7:14 AM
Hai,
Try this code.
IF SY-UCOMM = 'FTAB1'. // fctcode of TAB1
TAB-activetab = 'FTAB1' .
dynnr = '0002'.
ELSEIF SY-UCOMM = 'FTAB2' .
TAB-activetab = 'FTAB2' .
dynnr = '0003'.
ELSE.
TAB-activetab = 'FTAB1'.
dynnr = '0002'.
ENDIF.
if your problem is not solved then paste your code i will tell where the problem occurs.
‎2011 Dec 28 7:28 AM
In the if clause whenever error comes set activetab as second tab and its done.
If you want a sample program message me
‎2011 Dec 28 7:38 AM
The problem here is in intialization event tab-activetab is getting set to default tab.
‎2012 Jan 03 6:45 AM