2008 Mar 20 5:28 AM
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??????
2008 Mar 20 5:32 AM
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!!!!!!
2008 Mar 20 5:34 AM
Hi,
You have mispelled the at user-command.Thats why it shows error. USE AT USER-COMMAND.
Thanks,
Sankar.
2008 Mar 20 5:35 AM
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
2008 Mar 20 5:40 AM
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
2008 Mar 20 5:56 AM
It is working fine. Check your spelling AT USER COMMAND.
Thanks and regards,
Pavithra