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

TABSTRIP Control - Input event

Former Member
0 Likes
1,924

Hi,

I'm quite naive to GUI based programming. My question reg. Tabstrip control is, <i>'Does selecting a Tab trigger the PAI modules?'</i>. It doesn't seem to and the Active Tab, value is not stored correctly in the Global variables (I used wizard to create the controls).

So, on refresh of control, it displays the first tab always. Can anyone help me out on this?

Thanks & regards,

Sree

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,424

Check this code sample

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap-co... code sample for tab strip in alv.pdf

In this part u can change the default tab by passing the corresponding tabname

CONTROLS: main_tab TYPE TABSTRIP.
DATA: BEGIN OF i_main_tab,
subscreen LIKE sy-dynnr,
prog LIKE sy-repid VALUE
'ZZZ_TEST',
pressed_tab LIKE sy-ucomm <b><u>VALUE c_main_tab-tab1</u>,</b>

Change this bold part so that u can change the default tab.
END OF i_main_tab

10 REPLIES 10
Read only

athavanraja
Active Contributor
0 Likes
1,424

assign a <b>function code</b> to the <b>tab strips</b> (in screen painter) for PAI to trigger.

Regards

Raja

Read only

0 Likes
1,424

Ofcourse, I have the fucntion code assigned. My problem is on selecting a tab, one of the PAI modules are triggered. I'm expecting the PAI modules of the screen containing the Tabstrip contriol to be triggered. But, it is not getting triggered. So, how will I get information abt the Active tab.

If I click any other buttons on tabs of subscreen only the func code of that button(or whatever other control) is returned in sy-ucomm.

To keep it simple...When(or on doing what) will I get the function code of Tabs in tabstrip control in sy-ucomm??

Thanks & regards,

Sree

Read only

0 Likes
1,424

S u will get the function code of the tab in sy-ucomm.

Have a look into the code u can change the default value as the second tab function code name.

Or else u can define without any default value, but by default it will take the first tab.

Tell me i will send u the code if u cant open that link.

Read only

0 Likes
1,424

when you click on the tab, first the PAI of the screen containing the tabstrips will get triggered.

following is the first hit as soon as you click on the tab. check out in debugging.

PROCESS AFTER INPUT.

  • PAI FLOW LOGIC FOR TABSTRIP 'YPCTS'

MODULE USER_COMMAND_<base screen>.

CALL SUBSCREEN <clicked tab>.

MODULE xxxxx_ACTIVE_TAB_GET.

Regards

Raja

Read only

0 Likes
1,424

That is where my problem lies! I set a breakpoint on this input module and when I select a tab it doesn't get triggered! I'm wondering why...any clues?

and that is what I'm trying to explain from the beginning. Perhaps I didn't make myself clear.

Thansk & regards,

Sree

Read only

0 Likes
1,424

you may not have put the break point in the right place.

instead of placing a break point, just type /h in the command box & enter to get into debuggin and see where it goes.

Regards

Raja

Read only

0 Likes
1,424

I tried that too. I excuted program. After getting the screen, switched on debug using '/h' then I click on the tabs, and nothing happenned!

Thanks & regards,

Sree

Read only

0 Likes
1,424

thats surprising. check out the following example program

DEMO_DYNPRO_TABSTRIP_SERVER

this may give you some idea on what you are missing.

Regards

Raja

Read only

Former Member
0 Likes
1,425

Check this code sample

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap-co... code sample for tab strip in alv.pdf

In this part u can change the default tab by passing the corresponding tabname

CONTROLS: main_tab TYPE TABSTRIP.
DATA: BEGIN OF i_main_tab,
subscreen LIKE sy-dynnr,
prog LIKE sy-repid VALUE
'ZZZ_TEST',
pressed_tab LIKE sy-ucomm <b><u>VALUE c_main_tab-tab1</u>,</b>

Change this bold part so that u can change the default tab.
END OF i_main_tab

Read only

Former Member
0 Likes
1,424

hi,

Tabstrip-ActiveTab contains the Fcode the Active Tab.