Application Development 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: 

Catch Keyboard Input

Former Member
0 Kudos

hi, how can i catch keyboard input such as the carriage return in ABAP. should i use the sy-ucomm? thanks

5 REPLIES 5

Former Member
0 Kudos

Yes, Sy-UCOMM is the way to go. You need to have function code for each button presses, similary for ENTER also there should be a function code which will come into SY-UCOMM.

REgards,

Ravi

Ntoe : Please mark the helpful answers

0 Kudos

Hi Ravi, what if im not going to press any button. the cursor is positioned in an input/output field when I press the enter key in the keyboard. when i try to check the sy-ucomm, it is empty.

0 Kudos

In your PF-STATUS, the menu, you should have placed the ENTR function code for the tick mark button.

Only then it will work.

Regards,

Ravi

Note : Please mark the helpful answers

0 Kudos

Got it, thanks everyone

Former Member
0 Kudos

Hi Jesus,

Yes i think you can use SY-UCOMM.

CASE SY-UCOMM

When 'SAVE'.

WHEN 'EXIT'.

WHEN OTHERS.

ENDCASE.

If you want to capture specific actions mention them in the when clause. For other undefined keyboard actions put it under OTHERS option.

Cheers

VJ