Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  SAP GUI User Dialogs →  Classic Lists →  Event Blocks for Lists →  AT list_event 

AT LINE-SELECTION

Quick Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


AT LINE-SELECTION. 

Effect

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.


Note

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 AT LINE-SELECTION.


Example

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.