‎2005 Aug 17 12:23 PM
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
‎2005 Aug 17 12:38 PM
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
‎2005 Aug 17 12:31 PM
assign a <b>function code</b> to the <b>tab strips</b> (in screen painter) for PAI to trigger.
Regards
Raja
‎2005 Aug 17 12:38 PM
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
‎2005 Aug 17 12:43 PM
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.
‎2005 Aug 17 12:47 PM
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
‎2005 Aug 17 1:33 PM
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
‎2005 Aug 17 1:37 PM
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
‎2005 Aug 17 1:42 PM
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
‎2005 Aug 17 1:52 PM
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
‎2005 Aug 17 12:38 PM
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
‎2005 Aug 17 12:42 PM