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: 

How to use At command ???

Former Member
0 Kudos
128

Dear Sirs/Madams,

Can anybody explain me how to use AT USER-COMMNAD

in classical report...

I mean to say there must be a fix place where i need to write this code into the classical program.. and i dont know where should i write it..

for further information i am writing my bit code here :

REPORT YAGEINGCLASSICAL.

DATA : ITAB TYPE STANDARD TABLE OF STRING WITH HEADER LINE.

START-OF-SELECTION.

SET PF-STATUS 'AGEING'.

AT USER-COMMNAD.

BREAK-POINT.

CASE SY-UCOMM.

WHEN 'EXIT'.

LEAVE PROGRAM.

WHEN 'BACK'.

LEAVE TO SCREEN 0.

ENDCASE.

But it throws me an error..:

"AT USER-COMMAND" is allowed only within "LOOP...ENDLOOP".

howww??????

5 REPLIES 5

Former Member
0 Kudos
76

Hi,

At user command keyword is used to capture the user actions on list display.. Like u have a report program which displays the list with sales order details.. Now if user double click the sales order then your program needs to display the sales order in va03..

So in this case u need to put the code like:

At user-command.

if sy-ucomm = "Double click code".

..........do following logic

endif.

Endat.

i hope this explains ur query.. Do reward!!!!!!

Former Member
0 Kudos
76

Hi,

You have mispelled the at user-command.Thats why it shows error. USE AT USER-COMMAND.

Thanks,

Sankar.

Former Member
0 Kudos
76

Hi,

Check this out.Usage of at user-command.

at user-command.

case sy-ucomm.

when 'SET'.

if sy-lsind = 1.

window starting at 5 3 ending at 40 10.

write 'Select line for a second window'.

elseif sy-lsind = 2.

window starting at 45 10 ending at 60 12.

write 'Last window'.

endif.

Reward if helpful.

Regards,

Ramya

Former Member
0 Kudos
76

Hi

at user command we use for some actionperformed by user i.e when user click on particular button.....

AT USER-COMMAND.

CASE sy-ucomm.

WHEN 'DISP'.

PERFORM get_salesheader.

WHEN 'ITEM'.

PERFORM get_salesitemdata.

WHEN 'VA03'.

SET PARAMETER ID 'AUN' FIELD wa_vbak-vbeln.

CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.

ENDCASE.

AT USER-COMMAND : TO PROVIDE OUR OWN GUI ( PUSH BUTTONS ETC) AT OUTPUT

Former Member
0 Kudos
76

It is working fine. Check your spelling AT USER COMMAND.

Thanks and regards,

Pavithra