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

function code for enter

Former Member
0 Likes
5,172

what is the function code for 'enter'. i used 'space' but its working both for scrolling and enter so need function code only for enter. please give me answer.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,244

Hi,

Please search the forum. This question has been answered many times.

->

The keyboard event 'Enter' does not have a default sy-ucomm or a Function code associated with it.

So, whenever you press Enter, it triggers the PAI (sy-ucomm would be blank).

You can assign a Function code for Enter. Go to the GUI Status of the Screen -> Function Keys -> You will find a icon Enter (the one with the tick mark in a green circular background) -> Assign Function code like 'ENTER'.

Now in your PAI, restrict your code saying


if sy-ucomm = 'ENTER'.
 "Logic
endif.

1 REPLY 1
Read only

Former Member
0 Likes
2,245

Hi,

Please search the forum. This question has been answered many times.

->

The keyboard event 'Enter' does not have a default sy-ucomm or a Function code associated with it.

So, whenever you press Enter, it triggers the PAI (sy-ucomm would be blank).

You can assign a Function code for Enter. Go to the GUI Status of the Screen -> Function Keys -> You will find a icon Enter (the one with the tick mark in a green circular background) -> Assign Function code like 'ENTER'.

Now in your PAI, restrict your code saying


if sy-ucomm = 'ENTER'.
 "Logic
endif.