Application Development 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: 

PAI is NOT trigger for ALV in subscreen

Former Member
0 Kudos
1,098

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos
429

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,

11 REPLIES 11

Former Member
0 Kudos
429

hi, All

Who can help me?

Thanks in advance and will be awarded for all reply

Former Member
0 Kudos
429

hi..

I think after handling double click..it will den goto PAI...

regards

vivek

0 Kudos
429

HI,vivek

I have tried that. But it never go into PAI after double-click event.

Thanks.

0 Kudos
429

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

0 Kudos
429

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.

0 Kudos
429

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

0 Kudos
429

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

0 Kudos
429

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

Former Member
0 Kudos
430

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,

0 Kudos
429

hi, zhang kun

Regarding 'or you can register the event as application event for your alv grid'

How to do this one?

Thanks.

0 Kudos
429

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