
Usually the user selects areas in the ALV output, by clicking - and perhaps also pressing CTRL or shift - in the ALV output.
You are also able to determine which functions will be started when the user performs the following mouse actions:
Single click on a cell or an item of the ALV output
Double click on a cell or an item of the ALV outputor alternativelySelecting a cell or an item of the ALV output and pressing F2
For more information on clicking options, see Displaying Interactive Elements .
You are able to make the following settings for mouse actions:
Functions for single click
Functions for Double Click or F2
The following is valid for all of these functions:
|
ALV Tool |
Display type |
Function available |
|
Simple, two-dimensional table |
Classic ABAP List |
Yes |
|
Fullscreen |
Yes |
|
|
In the Container |
Yes |
|
|
Hierarchical-sequential list |
Classic ABAP List |
Yes |
|
Tree Structure |
Fullscreen |
Yes |
|
In the Container |
Yes |
Functions for Single Click
So that the user not only selects the rows or the item with a single click, but also triggers a specific function, you have to ensure the following:
The cells/items for which these functions are to be triggered have a specific Cell or Item Type :
In list-like ALV outputs, the cells have the cell type HOTSPOT
In tree structures the items have the item type LINK
You have registered your application for the event LINK_CLICK (class CL_SALV_EVENTS_TABLE, CL_SALV_EVENTS_HIERSEQ or CL_SALV_EVENTS_TREE) and programmed it into a suitable event handler.
Functions for Double Click or F2
You have two options for processing the double click or F2 being pressed:
You register your application for the event DOUBLE_CLICK (class CL_SALV_EVENTS_TABLE, CL_SALV_EVENTS_HIERSEQ or CL_SALV_EVENTS_TREE) or
You specify the function code of the function directly that is to be executed with a double click or F2.
The DOUBLE_CLICK event returns the position (cell or item) where the user double clicked. The second option, on the other hand, does not return information about exactly where the double click occurred.
|
Function |
Class |
Method |
|
Set function code |
CL_SALV_FUNCTIONAL_SETTINGS |
SET_F2_CODE |
|
Get function code |
GET_F2_CODE |