SAP® Documentation

Single view

ABAPAT_LINE-SELECTION - AT LINE-SELECTION

ABAP Short Reference   General Material Data  
This documentation is copyright by SAP AG.
SAP E-Book

AT LINE-SELECTION

Short Reference



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.






PERFORM Short Reference   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 2194 Date: 20191208 Time: 225632     sap01-206 ( 8 ms )

Our Service

Looking for Support? Questions?

The

Consolut

Callback-Service

Leave us your contact details and we will call you back. Panels marked with * are mandatory.