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

code for 'enter' button in user command.

Former Member
0 Likes
5,934

hi experts,

i have developed a initial screen as selection screen for table control.

data is displayed in second screen(table control).

<b></b>when user enters inputs in selection screen and presses enter on keyboard

it should execute to second screen. code for enter button. <b></b>

4 REPLIES 4
Read only

Former Member
0 Likes
1,812

Hi,

goto the PF Status. in that you will have green color button with tick mark.

give the ok code as 'ENTER'.

activate the PF status.

now in user command module,

if sy-ucomm eq 'ENTER'.

<< do your code here>>

endif.

Regards,

Niyaz

Read only

Former Member
0 Likes
1,812

Hi,

1.It may be space. In case statments for SY-UCOMM you can write

When Others to handle it.

like,

AT USER-COMMAND

case ucomm.

when 'A'.

when others.

endcase.

2. Else put break point at case statment and execute program and press Enter and see the comm code.

Reward if useful!

Read only

Former Member
0 Likes
1,812

Hello,

in the PBO process should you have the next code:

for example:

case sy-ucomm.

when 'ENTER'.

CALL SCREEN 0200. " The second window

when 'SAVE'.

. . .

when ...

endcase.

You should have all conditions in the case statement, otherwise you have a error.

Regards,

Read only

Former Member
0 Likes
1,812

Just put the program in debug mode and press the key you want to check, then see what's in SY-UCOMM. That will tell what you want to know.