2008 Nov 06 2:42 AM
Hi, All
Currently, I am using ALV object to output ALV report in one SUBSCREEN.
When I double-click, the PAI is not trigger. But just go into double-click event directly.
However, If I use AVL function or object to output in NORMAL screen, PAI is trigger after double click.
SY-UCOMM is like %_GC 920 3
2008 Nov 06 3:59 AM
hi,
you can use method cl_gui_cfw=>set_new_ok_code inside double-click handler to force PAI occurs.
or you can register the event as application event for your alv grid.
regards,
2008 Nov 06 2:55 AM
hi, All
Who can help me?
Thanks in advance and will be awarded for all reply
2008 Nov 06 3:29 AM
hi..
I think after handling double click..it will den goto PAI...
regards
vivek
2008 Nov 06 3:32 AM
HI,vivek
I have tried that. But it never go into PAI after double-click event.
Thanks.
2008 Nov 06 3:44 AM
hi Ocean,
I ahve checked in one of existing code and there also its not going in PAI...why dont you write ur PAI logc for double click ..in that double click method only....It will not only make code it will be better also..
regards
vivek
2008 Nov 06 3:50 AM
HI,vivek
I understand what you mean.
But for my case, I need double click one record in alv, and output this record in another subcreen below the alv in the same normal screen.
seem like ME23N, once you double click one item line, the detail data will output in screen below. But in ME23N, the item lines is output by table control, not alv.
Thanks.
2008 Nov 06 3:54 AM
Hi Ocean ..
U mean if u do the same process in PAI u will be able to show that on
below screen...<i didnt get this point>
The other solution can be.... u put the data or table in some global variable or global table so u can use it from everywhere..
regards
vivek
2008 Nov 06 3:58 AM
hi, vivek
Yes, I have stored the data in global table,
But the issue is that system never trigger PAI process after double click, so that the data can't reflect into screen below
2008 Nov 06 4:11 AM
hi...
I think cl_gui_cfw=>set_new_ok_code forces PAI to occur and then PBO...just put ur ok code into that as suggested in above reply...
or u can put ur code in PBO itself and check if global data is not intial then exceute the code...
regards
vivek
2008 Nov 06 3:59 AM
hi,
you can use method cl_gui_cfw=>set_new_ok_code inside double-click handler to force PAI occurs.
or you can register the event as application event for your alv grid.
regards,
2008 Nov 06 4:25 AM
hi, zhang kun
Regarding 'or you can register the event as application event for your alv grid'
How to do this one?
Thanks.
2008 Nov 06 4:38 AM
Hello Ocean
The ALV grid is a special control in terms that all the events are already pre-registered at the control (method SET_REGISTERED_EVENTS). This means that as soon as you define an event handler method and SET HANDLER for the corresponding event your application can deal with this event.
You can register all events of the ALV grid as application events (i.e. after any event handling PAI of the screen is triggered) at the CONSTRUCTOR method:
I_APPL_EVENTS = 'X'
However, I prefer to use method CL_GUI_CFW=>SET_NEW_OK_CODE because it offers more flexibility to me:
Only those event where I need to trigger PAI after event handling are affected
By setting a new ok-code I can trigger a specific logic at PAI
Regards
Uwe