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: 

call OK code at the screen PAI

Former Member
0 Kudos

Hi,

I want to call a function code at the screen PAI and CL_GUI_CFW=>SET_NEW_OK_CODE didn't work. Are there other methods available?

Best regards,

ts

4 REPLIES 4

Former Member
0 Kudos

Hi ,

I think you need to use another  CL_GUI_CFW=>FLUSH along with SET_NEW_OK_CODE .

CALL METHOD cl_gui_cfw=>set_new_ok_code

EXPORTING

new_code = 'DUMMY'. "<<==-- Here you put the OKCODE that you want to dispatch

* A flush is required to trigger the refresh

CALL METHOD cl_gui_cfw=>flush.

0 Kudos

Hi,

Thank you for your reply but it didn't work.

Best regards,

ts

Former Member
0 Kudos

The method doesn't exist in the an event handler of ALV but in PAI of the program.

Former Member
0 Kudos

Hi,

You want to change the sy-ucomm field and want to perform some function?

on screen you have ok_code of type sy-ucomm in which you are getting the fcode, and you want to change its value on some logic or anything, you can do through code as well and can change the value of variable ok_code in PAI.

Thanks,

Dharmishta