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

Clear the ok_code

Former Member
0 Likes
2,018

Why should we Clear the ok_code in ABAP prg?

1 ACCEPTED SOLUTION
Read only

amit_khare
Active Contributor
0 Likes
1,107

~ From Forum

you must clear the OK_CODE field in the ABAP program to ensure that the function code of a screen is not already filled in the PBO event with an unwanted value. This is particularly important when the next PAI event can be triggered with an empty function code (for example, using ENTER). Empty function codes do not affect SY-UCOMM or the OK_CODE field, and consequently, the old field contents are transported.

2 REPLIES 2
Read only

amit_khare
Active Contributor
0 Likes
1,108

~ From Forum

you must clear the OK_CODE field in the ABAP program to ensure that the function code of a screen is not already filled in the PBO event with an unwanted value. This is particularly important when the next PAI event can be triggered with an empty function code (for example, using ENTER). Empty function codes do not affect SY-UCOMM or the OK_CODE field, and consequently, the old field contents are transported.

Read only

Former Member
0 Likes
1,107

You need to clear the value of ok code , so that it do not effect your normal programming of code.