‎2008 Aug 18 6:34 AM
Hi,
I am using ECC5 ver. of ABAP.
Can I use AT USER-COMMAND and AT LINE-SELECTION
in the same report?
I have used it but only At user command works, not At line selection.
When I remove Set pf-Status, At line selection works.
Here is my code.
*----
REPORT PF&ATLINE.
AT LINE-SELECTION.
MESSAGE 'Line Selected' TYPE 'I'.
AT USER-COMMAND.
IF sy-ucomm = 'PUSH'.
MESSAGE 'Button Pushed' type 'I'.
elseif sy-ucomm = 'EXIT'.
LEAVE PROGRAM.
ENDIF.
START-OF-SELECTION.
SET PF-STATUS 'ZRND3'.
DO 10 TIMES.
WRITE:/01 SY-INDEX HOTSPOT.
ENDDO.
END-OF-SELECTION.
*----
‎2008 Aug 18 6:45 AM
Hi Rajiv,
in your SET PF-STATUS 'ZRND3'.
go to FUNCTION KEYS
give 'PICK' as function key in Recommended Function Key Settings against F2 like
F2 PICK Choose
With luck,
Pritam.
‎2008 Aug 18 6:36 AM
Dear,
prob is not that.Pf status has its own function it has no relation with any event.
Thanks,
jaten
‎2008 Aug 18 6:40 AM
‎2008 Aug 18 6:37 AM
hi,
You can use both of them in the same report.
In your case put write AT USER-COMMAND after Start-of selection.
Regards,
anirban
‎2008 Aug 18 6:45 AM
I have kept At user-command below start-of-selection but
It works only AT USER-COMMAND not AT LINE-SELECTION.
‎2008 Aug 18 6:42 AM
Hi,
Generally AT line selection is used to scroll through the lists.
if u double click on the list and u want to show some relevant information about that line in another list we use this event.
At user command is used when you click some button particular code have to be executed then we use this event.
we can use both the events at the same time.
‎2008 Aug 18 6:45 AM
Hi Rajiv,
in your SET PF-STATUS 'ZRND3'.
go to FUNCTION KEYS
give 'PICK' as function key in Recommended Function Key Settings against F2 like
F2 PICK Choose
With luck,
Pritam.
‎2008 Aug 18 7:04 AM
Dear Pritam,
I have done as U suggested. But in both (Button click or line selection) it goes to AT USER-COMMAND.
how can it go to AT LINE-SELECTION?
tHANKS.
‎2008 Aug 18 7:11 AM
Hi Rajiv,
Setting the PICK function code to F2 will definitely solve it..
and it triggers the at user-command and at line-selection event as per user interaction...
If it is not working properly... then there might me something wrong in your code...
can you place the code... so that we can know the exact problem
regards
padma
‎2008 Aug 18 7:12 AM
Hi Rajiv,
If you have given PICK as the function code against F2, always AT LINE-SELECTION will be triggered whenever you select a line in the list, in your case the MESSAGE 'Line Selected' will be displayed , AT LINE-SELECTION gets the highest priority in all the interactive list events.
With luck,
Pritam.
‎2008 Aug 18 6:47 AM
hi,
U can use both in the same report.
But one thing needs to be taken care of is
In ur GUI .
IN the function key-->
In F2 write PICK & CHOOSE.
This will definetely solve ur problem.
Regards,
Aleem.
‎2008 Aug 18 6:55 AM
Hi Rajiv,
In your PF Status.... goto function keys...
and set the function code for F2 as PICK
This helps you to use both at user-command and at line-selection in the same report.
regards
padma