I have a list report that uses the event block AT LINE SELECTION
(and HIDE
).
AT LINE-SELECTION.
WRITE: 'Testline'.
* and some more things
When I double click on a line in the main list, AT LINE SELECTION
is processed, and the main list is replaced with a list that consists of the text 'Testline'.
When I klick on the green back button, the main list is shown again.
Everything works as espected.
Now to my question:
Is there some way how the report can be notified when the user clicks on the green back button to go from the detail list to the main list?
The obvious solution AT USER-COMMAND
is not called.
This is the event where I want to SUBMIT
the same report again to update the list.
(I know I could do this with an ALV report, but is this possible with a simple list report?)
When you check the documentation you will find the following information:
- The function codes PICK and PF## ("##" stands for 01 to 24) do not cause the event AT USER-COMMAND, but the events AT LINE-SELECTION and AT PF##.
- All function codes that start with the character "%" are interpreted as system functions and do not cause the event AT USER-COMMAND. The system functions for lists are listed in the following table 1.
- The function codes in the following table 2, likewise, do not cause the event AT USER-COMMAND, but are handled by the list processor.
table 2 includes BACK
(that's the default code for the green arrow).
What you can do: Write your own status.
REPORT ytest.
DATA pf_exclude TYPE TABLE OF sy-ucomm WITH HEADER LINE.
START-OF-SELECTION.
SET PF-STATUS 'LIST'. "<--- here
WRITE: / 'Hello World'.
AT LINE-SELECTION.
WRITE: 'Testline'.
* and some more things
AT USER-COMMAND.
BREAK-POINT.
CASE sy-ucomm.
WHEN 'MYBACK'.
ENDCASE.
Now you can define your own status:
PICK
- or the double click will not work.