‎2007 Jun 23 5:45 PM
Hi,
I have the following code that is not working:
ZPROG_TOP:
DATA: save_ok LIKE sy-ucomm,
ok_code LIKE sy-ucomm.
0100 PAI:
save_ok = ok_code.
CLEAR ok_code.
The ok_code always is empty, what else do i need to do?
‎2007 Jun 23 5:47 PM
Hi,
In SE51 give the program and screen number..Press change..
In the element list give the OK_CODE in the row which says OK..
This will populate the OK_CODE variable..
Thanks
Naren
‎2007 Jun 23 5:47 PM
Hi,
In SE51 give the program and screen number..Press change..
In the element list give the OK_CODE in the row which says OK..
This will populate the OK_CODE variable..
Thanks
Naren
‎2007 Jun 23 5:49 PM
Hi,
Your code should be
save_ok = sy-ucomm.
clear: sy-ucomm.
Now, the actual function code stored in the system variable sy-ucomm will be transfered to your variable save_ok. If you want it in the variable ok_code also, then you can add:
save_ok = ok_code = sy-ucomm.
Hope this helps. Please award points.
Regards,
Nithya
‎2007 Jun 23 6:02 PM
The ok_code is of the type sy-ucomm.. Any interaction, which the user does with the screen, the function code gets returned in the system variable sy-ucomm. Even if you double click, it has a function code assigned to it. You capture these function codes and then depending on your requirement, you do further processing.
For example, you are displying a standard sales order details. on double clicking on any of the order no. you wish to show the item details in the next screen. In this case, as soon as the user double clicks, the function code &IC1 (can be found out by debugging ) is returned in the system variable sy-ucomm (or you declare variable ok_code type sy-ucomm). nOw check this variable and do further processing.