
Some keys on the keyboard have special meaning in ALV and you can assign specific functions to others:
F1 Function Key The user calls a help text for the selected column using the F1 function key.
F2 Function Key This key is always an alternative to double clicking. You determine which function is triggered when the user double clicks or presses F2. You cannot change its meaning.
F4 function key With the F4 function key, users call a value list with possible entries that are possible and useful for their current situation.
You are able to make the following settings for key settings:
Assigning Any Functions to Keys
Assigning Any Functions to Keys
In the tree structure, you are able to specify functions for a selection of keys and key combinations that are to be executed when the user presses these buttons.
|
ALV Tool |
Display type |
Function available |
|
Simple, two-dimensional table |
Classic ABAP List |
No |
|
Fullscreen |
No |
|
|
In the Container |
No |
|
|
Hierarchical-sequential list |
Classic ABAP List |
No |
|
Tree Structure |
Fullscreen |
Yes |
|
In the Container |
Yes |
You proceed in two steps:
You specify which of the possible keys trigger the event KEYPRESS of class CL_SALV_EVENTS_TREE. You repeat this specification for every key that you wish to register for the event.
You specify which function will be executed when the user presses the appropriate key. To do this, register the application for the event and program the desired event handler.
You can assign the following keys and key combinations in the tree structure with the desired functions:
Function key F1
Function key F4
Remove
Enter
Insert
Control plus X
Control plus C
Control plus V
By default, each key listed here is used for very specific purposes (for example, with the F4 function key, the user calls a dialog box with a value list of the permitted or useful entries for the current column). Find out about the conventions in your company as to the meaning of the individual keys. SAP recommends that you do not change the original objectives of the keys.
|
Function |
Class |
Method |
|
Register the key for an event |
CL_SALV_EVENTS_TREE |
ADD_KEY_FOR_KEYPRESS |
|
Delete entire list of keys that trigger the event |
REMOVE_ALL_KEYS_ FOR_KEYPRESS |