Application Development and Automation 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: 
Read only

SY-UCOMM and OK_CODE

Former Member
0 Likes
678

what is the differenece between these two ?

when will the user event be stored in each of these..

i had a dialog with PF status and it was working fine as the ok_code was capturing the function code perfectly.

then i recreated my tabstrip and after that the function code of the buttons in the PF status are not at all captured when the first tab is selected. when the second tab of the tabstrip is selected the function code is correctly set in the ok_code !!

sounds weird , isn't it ? but this is what is happening with me..

any help pl ??

thks

1 ACCEPTED SOLUTION
Read only

former_member190578
Participant
0 Likes
642

SY-UCOMM is a system-field and will be filled only by the system.

You can query this field.... but don't fill any system-field by yourself.

OK_CODE is created from you. Usually it is filled from the PF-Status or the screen-field (OK_code...or simelar). But you also can changed this field whenever you want to do this.

3 REPLIES 3
Read only

former_member190578
Participant
0 Likes
643

SY-UCOMM is a system-field and will be filled only by the system.

You can query this field.... but don't fill any system-field by yourself.

OK_CODE is created from you. Usually it is filled from the PF-Status or the screen-field (OK_code...or simelar). But you also can changed this field whenever you want to do this.

Read only

bpawanchand
Active Contributor
0 Likes
642

Hi

Regards

Pavan

Read only

Former Member
0 Likes
642

Hi Friend,

SY-UCOMM is for performing the functions what the user wishes to do at that particular event(action). We use it in menus and other place . this mainly in using

OK_CODE is generally used in screen as of I have used. You will define the function in the screen. and you can use it in the main program.

OK_CODE acts just as a temporary variable that stores the value of sy-ucomm. When user interacts with the screen elements, the function code that you have assigned is filled in the sy-ucomm field which is turn gets reflected in OK_CODE.

Check this link:

http://www.saptechies.com/difference-between-sy-ucomm-and-ok_code-in-dialog-program/

Regards,

Chandra Sekhar