2005 Aug 06 5:10 AM
i have 4 tabs in my Module, while saving data i have checked certain conditions in PERRFORM, but i want to set the tab to in which my condition fails, i am not able to set the tab. i hope u got my problem.
abhishek suppal
2005 Aug 07 8:59 AM
CALL SUBSCREEN TAB_STRIP_SCA
INCLUDING G_TAB_STRIP-PROG G_TAB_STRIP-SUBSCREEN.
G_TAB_STRIP-PROG - set pgm id
G_TAB_STRIP-SUBSCREEN - set subscreen ( screen no of tab which u want to set)
TAB_STRIP_SCA - ur tab strip name
Regds
gv
2005 Aug 08 11:18 AM
You can declare your tabs as local tabstrips, and implement your check code inside those tabstrips.
If user wants to save the data, your checks will run and if an error occurs SAP automatically shows the tabstrip where the error has happened.
You can also do this when declaring your tabstrips as "normal" tabstrips, but if there are more than one, and you want to check all the data in all the tabs before saving your data, you have to declare them as "local" tabstrips.
Hope I helped you.
2005 Aug 08 12:29 PM
Hi Abhishek,
Have you tried setting ACTIVETAB. tabstrip control has one field ACTIVETAB which we can set dynamicaly in our program.
after checking your condition, you can assign the code for the tab you want to be displayed in
<tabstrip>-activetab.
Regards,
Komal.
2005 Aug 08 9:23 PM
Hi
I hope the code below may help :
Define
Data : pressed_tab LIKE sy-ucomm VALUE c_ticket-tab1,
IN PBO
MODULE ticket_active_tab_set.
CALL SUBSCREEN ticket_sca
INCLUDING g_ticket-prog g_ticket-subscreen.
MODULE ticket_active_tab_set OUTPUT.
ticket-activetab = pressed_tab.
CASE pressed_tab.
WHEN c_ticket-tab1.
g_ticket-subscreen = '0204'.
WHEN c_ticket-tab2.
g_ticket-subscreen = '0205'.
WHEN c_ticket-tab3.
g_ticket-subscreen = '0206'.
WHEN OTHERS.
DO NOTHING
ENDCASE.
ENDMODULE. " TICKET_ACTIVE_TAB_SET OUTPUT
In the form, where you are checking the error, you set your pressed_tab as desired.
Regards,
Gagan