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

Setting the TAB

Former Member
0 Likes
650

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

4 REPLIES 4
Read only

Former Member
0 Likes
618

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

Read only

Former Member
0 Likes
618

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.

Read only

Former Member
0 Likes
618

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.

Read only

Former Member
0 Likes
618

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