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

Confused Regarding OK_CODE....

Former Member
0 Likes
367

Hi All,

I am facing a confusing issue.. I have created a Table Control where 2 colums are editable..so user will go and change those 2 fields and on click on SAVE data will get updated in Ztable...

But the prob is for both Scroll and Enter SY-UCOMM is returning same value i.e. SPACE....But requirement is different for both operations...So is it possible to identify which action user did i.e. either he would have 'Srolled' or Pressed 'Enter'...

Is thr any possiblity to change the OK_CODE (SY-UCOMM) set by system to be enhanced for our requirent.....

Rewards for sure ...

Regards,

ABAPer 007

2 REPLIES 2
Read only

Former Member
0 Likes
351

hi,

You are right. there is no ok_code for scroll and enter key.but there is one way to find out. try to use table control top line, current if any one is changed, scrolling action, else enter key action. try it if useful reward me

Read only

Former Member
0 Likes
351

In your PF-Status you can assign a function key value to Enter (e.g. "ZCONT") that you can pick up in your PAI logic. Be sure to clear sy-ucomm & your own OK Code fields after each pass through the screen as the "scroll" seems to have a habit of showing up with the last user-command issued rather than blank.

Of course you will want the scroll and the enter to perform the same checking of business logic initially - otherwise you will find you have wise users who discover they can bypass validations by entering screen values and scrolling down...

Jonathan