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

How to assign ENTER to a function key

0 Likes
5,819

Hi, all,

When user press ENTER, I want to accept OKCODE 'OKAY' at PAI, so, I create a function code 'OKAY' in PF Status, but when I want to assign function key 'ENTER' to it, I can't fount any function key call 'ENTER', can you help me?

Hi, all,

When user press ENTER, I want to accept OKCODE 'OKAY' at PAI, so, I create a function code 'OKAY' in PF Status, but when I want to assign function key 'ENTER' to it, I can't fount any function key call 'ENTER', can you help me?

4 REPLIES 4
Read only

Former Member
0 Likes
2,791

Hi

The keyboard "ENTER" is always assigned to the first place of the "Standard Toolbar" section, so you need to place your okcode 'OKAY' there.

Max

Read only

Former Member
0 Likes
2,791

Hi

Check the below thread

Cheerz

Ramchander Rao.K

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,791

Read some documentation like Using GUI Statuses.

The ENTER Key

The ENTER key belongs to the V icon in the standard toolbar, and is always active, even if no function is assigned to it in the GUI status, or there is no GUI status set at all. The PAI event is always triggered when the user chooses ENTER. The following function codes can be passed to SY-UCOMM or the OK_CODE field:

· Any entry in the command field when the user presses ENTER

· If there is no entry in the command field, any function code assigned to the ENTER key in the Menu Painter.

· If the command field does not contain an entry and no function code is assigned to the ENTER key in the Menu Painter, the function code is empty and therefore not passed to SY-UCOMM or the OK_CODE field.

Regards,

Raymond

Read only

surajarafath
Contributor
2,791

Use this FM to give enter key function in the code

CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE'
   EXPORTING
     FUNCTIONCODE                 = '=ENT'
   EXCEPTIONS
     FUNCTION_NOT_SUPPORTED       = 1
     OTHERS                       = 2.