This statement defines an event block whose event is raised by the ABAP runtime environment when a screen list is displayed. This is provided the screen cursor is a list line and a function is selected using the function code PICK. By defining this event block, the standard list status is enhanced automatically in such a way that the function code F2 and, with it, the double-click mouse function is associated with the function code PICK.
If the function key F2 is associated with a function code other than
PICK, each double click raises its event, usually
AT USER-COMMAND, and not
This program works with the standard list status. Selecting a line with the left mouse key raises the event
AT LINE-SELECTION and creates details lists.
REPORT demo_at_line_selection. START-OF-SELECTION. WRITE 'Click me!' COLOR = 5 HOTSPOT. AT LINE-SELECTION. WRITE: / 'You clicked list', sy-listi, / 'You are on list', sy-lsind. IF sy-lsind < 20. SKIP. WRITE: 'More ...' COLOR = 5 HOTSPOT. ENDIF.