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: 

ALV Grid - Trigger PBO ?

Former Member
0 Kudos

Hi,

I have a screen 100 which calls a subscreen 500.

500 has an alv grid (cl_gui_alv_grid). User shd choose a record and press button "Accept" and the certain values of this record shd populate teh screen fields of Screen 100.

on pressing Accept, it will call my event handler for user command and will populate the corresponding screen field of 100.

Now the value will reflect on screen 100, only if the PBO is called. But since the event was generated out of the ALV, PBO of 100 is not called. I know explicitly calling screen 100 in the event handler is a bad idea.

1. So how else to trigger the PBO ?

2. Or may be another idea would be to set this event user_command as an application event and hence it will come to PAI-PBO. but how to do this ?

Rgds,

Prash.

1 ACCEPTED SOLUTION

thomas_jung
Developer Advocate
Developer Advocate

You can trigger PBO/PAI with CL_GUI_CFW=>SET_NEW_OK_CODE( ). This can be called from within an event handler.

4 REPLIES 4

Former Member
0 Kudos

You can try to use LEAVE SCREEN statament, infact only acive screen should be screen 100, so LEAVE SCREEN should leave PAI of 100 and trigger PBO of 100.

thomas_jung
Developer Advocate
Developer Advocate

You can trigger PBO/PAI with CL_GUI_CFW=>SET_NEW_OK_CODE( ). This can be called from within an event handler.

0 Kudos

...

or fm <b>SAPGUI_SET_FUNCTIONCODE</b>

Andreas

0 Kudos

14 years later Thomas Jung and you fixed my problem!