02-02-2007 4:29 AM
HI ALL,
COULD ANYBODY TELL ME THE FUNCTIONALITY OF OKCODE?
WITH REGARDS,
KHADAR
02-02-2007 4:32 AM
02-02-2007 4:32 AM
Hi,
Ok_code is the variable that you declare in the screen to get the function code. When ever you create a button or say select a menu entry the relative function code will be there in the system variable sy-ucomm. by defining ok_code in your screen you get the value in sy-ucomm into your varable. You need to store the ok_code in a temporary filed and clear it so that it will not cause any side effects.
In your Screen PAI you need to check what action user has done on the UI the value in ok_code will give you the idea what user has selected in the UI.
Regards,
Sesh
02-02-2007 4:36 AM
Hi ,
OKCODE is same as SY-UCOMM , it is used to handle the actions performed by the user on your program.
..
Regards
Arun
02-02-2007 4:37 AM
for different push buttons ,menu or radio button you have to assign different okcode as per your need . you can catch those okcode when you are pressing those items and code at perticular event for different functionality.
suppose you have two push buttons on your screen next -- okcode NEXT and previvious okcode PREV.
as per user interaction
case okcode.
when 'NEXT'.
call screen 200.
when 'PREV'.
set screen 0.
leave screen.
end case.
regards
shiba dutta