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

at user-command

Former Member
0 Likes
636

Hi,

I am trying out the "at user-command", but it is not working. Also, if I give an "endat" at the end of the code it gives an error. From my understanding of the following code, it should write 'End' on the screen if I type 'end' and press return.

Can anyone tell me what I am doing wrong?

Al Lal


write 'waiting...'.

at user-command.
  case sy-ucomm.
    when 'end'.
      write 'End'.
  endcase.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
605

Hi,

After end of selection write at user-command.

START-OF-SELECTION.

END-OF-SELECTION.

AT USER-COMMAND.

CASE SY-UCOMM.

case sy-ucomm.

when 'END'. write capital letters for function code

write : 'End'.

endcase.

5 REPLIES 5
Read only

dhruv_shah3
Active Contributor
0 Likes
605

Hi,

First of all have you created the Function code 'end'.

it must be the same if you have created it.

also you must write end at. in the last

HTH

Regards,

Dhruv Shah

Read only

0 Likes
605

NO he MUST not wirte endat in the last line.

at-user-command is an event.

or did you ever see a endat after Start-of-selection?

Read only

Former Member
0 Likes
605

hi...

your code which i am showing is correct..

no need for end at in ths..

try your code like this..

AT USER-COMMAND.

CASE sy-ucomm.

WHEN 'DISP'.

PERFORM get_salesheader.

WHEN 'ITEM'.

PERFORM get_salesitemdata.

ENDCASE.

Regards,

Bhumit Mehta

Read only

Former Member
0 Likes
606

Hi,

After end of selection write at user-command.

START-OF-SELECTION.

END-OF-SELECTION.

AT USER-COMMAND.

CASE SY-UCOMM.

case sy-ucomm.

when 'END'. write capital letters for function code

write : 'End'.

endcase.

Read only

Former Member
0 Likes
605

case - endcase is case sensitive.

no need to write endat.

reward for correct answers.

S@meer