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: 

HELP ME IN OKCODE

Former Member
0 Kudos

HI ALL,

COULD ANYBODY TELL ME THE FUNCTIONALITY OF OKCODE?

WITH REGARDS,

KHADAR

4 REPLIES 4

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Generally it is used to store sy-ucomm.

0 Kudos

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

Former Member
0 Kudos

Hi ,

OKCODE is same as SY-UCOMM , it is used to handle the actions performed by the user on your program.

..

Regards

Arun

Former Member
0 Kudos

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