In this lesson you will be able to react to the user double-click on the
basic list with the display of a details list that contains detailed information on the
clicked line (interactive list).
Generating a Details List
- When the user selects a basic list by means of double-click of function key F2, the ABAP event AT LINE-SELECTION is triggered.
- You must implement this in your program in the form of a corresponding processing block.
- You can read the data requested by the user and out put them with the WRITE statement.
- Hint: If an AT LINE-SELECTION block is implemented in the program, a push button with the magnifying glass symbol also appears above the list.
- Marking the list row and then choosing this button has the same effect as double-clicking the list row.
Generating Several Details Lists
- The row selection on the detail list also triggers the AT LINE-SELECTION event.
- You must be able to determine within this block on which list the current row selection was made so that you can react adequately.
- You can use the sy-lsind system field for this. This field shows the current list level: 0 for the basic list, 1 for the first details list, and so on.
- The value of sy-lsind should be used to control processing in the AT LINE-SELECTION block.