04-12-2012 12:22 PM
Hi experts,
I have a report included a dynpro (1001). On this dynpro I have a tabstrip (TAB_ALV) with 4 tabs (dynpro 1010, 1020, 1030 and 1040).
PBO for 1001:
CALL SUBSCREEN: sub_button INCLUDING sy-repid '1010',
sub_layout INCLUDING sy-repid '1020',
sub_spalte INCLUDING sy-repid '1030',
sub_beispiel INCLUDING sy-repid '1040'.
Okay, everything is working. I can change tabs...
Now I have added in my TOP-include
CONTROLS tab_alv TYPE TABSTRIP.
because I want to know which tab is selected.
But when I try to debug my report (Dialog transaction with dynrpo 1001), the variant TAB_ALV is not assigned...
What am I doing wrong?
04-12-2012 7:51 PM
PBO stands for Processing Before Output
It is used to SET values not read values. If you wanted to make a particular tab the active tab, you would do that here.
In PBO you should set the active tab to what ever you want it to be.
PAI stands for Processing After Input
This is where you need to look at what the active tab has been set to. Which actually is the value in sy-ucomm.
Normally, you would setup a variable for this called w_pressed(or whatever you want to call it) then in PBO move that to the activetab field of the tabstrip.
04-12-2012 12:42 PM
Hi Michael,
The Tabstrip contraol in the screen layout should have same name as tab_alv.
Regards,
Rakesh.
04-12-2012 1:01 PM
Hi Rakesh,
they have the same name:
Dynpro, Tabstrip called TAB_ALV
TOP include: CONTROLS tab_alv TYPE TABSTRIP.
Both called tab_alv
04-12-2012 1:16 PM
Hi,did u used code in pbo,pai
use in pbo.
data:pressed type sy-ucomm.
tab_alv-activetab = pressed.
case pressed.":for first time make it as TAB1 or TAB2.
when 'TAB1'.
screen = '201'
.
when 'TAB2'.
screen = '202'.
endcase.
in pai,,,
case sy-ucomm.
when 'TAB1'.
pressed = 'TAB1'.
when 'TAB2'.
pressed = 'TAB2'.
endcase.
thanks
04-12-2012 1:24 PM
Hi,
Well then there can be some logical error. check this demo program for help DEMO_DYNPRO_TABSTRIP_LOCAL.
Regards,
Rakesh
04-12-2012 2:06 PM
The defintion of the tabstrip control is in the TOP include.
My break point is in the PBO... and here my variant TAB_ALV is not assigned.
So I can't make any changes to the tab_strip- activetab.
Also my report is a type M (Module Pool), I call it via transaction (type Dialog transaction, Screen number 1001).
04-12-2012 2:07 PM
I have the same logic - expect that the demo program is a Executable program, I have a Module pool
04-12-2012 7:53 PM
The processing is the same for both types of programs. This is a question about screen processing.
04-12-2012 7:51 PM
PBO stands for Processing Before Output
It is used to SET values not read values. If you wanted to make a particular tab the active tab, you would do that here.
In PBO you should set the active tab to what ever you want it to be.
PAI stands for Processing After Input
This is where you need to look at what the active tab has been set to. Which actually is the value in sy-ucomm.
Normally, you would setup a variable for this called w_pressed(or whatever you want to call it) then in PBO move that to the activetab field of the tabstrip.
04-12-2012 8:19 PM
Sure, I know PAI/PBO...that's not the problem.
I make a break point now in my PAI (USERCOMMAND_1001), it isn't called when I change my tab. When I leave the program (Exit-command), I reach my breakpoint, also the control is assigned and my active tab is correct.
Okay, now I know that all all declarations are correct.
Last problem to solve is - how to call a PAI when changing a tab?
04-12-2012 9:27 PM
in the screen painter each tab of the tabstrip has a set of attributes. Make sure you have assigned a function code to each one. I think you also need to be sure Fct Type is set to <none> (blank)
04-13-2012 5:57 AM
That's it! I have to make sure the Fct type is blank!
Then USercommand for dynpro 1001 will be called, I can check the sy-ucomm, change the activetab in my control manually - and can work with the active tab...
Thank you very much for your help
04-08-2013 8:00 AM
Thanks!
I had the same problem.
The wizard filles FctType with the Value 'P' which causes problems later on.
(When you scroll in the second tab , you will automaticlly land in the first tab or when you hit enter in the second tab you will also then end up in the first tab and so on)
Now it is blank and everything works, thanks!