SELECTION-SCREEN FUNCTION KEY n [ldb_additions].
In the GUI status of the selection screen set by the system, the application toolbar contains five inactive pushbuttons, to which the function codes FC01 to FC05 are assigned. This statement activates the pushbutton of the function code FC0n, whereby a value between 1 and 5 must be entered for n.
To enable use of the pushbuttons, the statement TABLES must be used to declare an interface work area of the structure SSCRFIELDS from the ABAP Dictionary.
If a text is assigned to the component functxt_0n of the interface area sscrfields before the selection screen is called, this text is displayed on the relevant pushbutton. Otherwise, the pushbutton does not contain any text.
When the user chooses a pushbutton in the application toolbar, the runtime environment triggers the event AT SELECTION-SCREEN and the corresponding function code is transferred to the component comm of the interface work area sscrfields.
The additions ldb_additions can only be used in the selection include of a
logical database.
Activation of two pushbuttons with icons and quick info in the application toolbar (pushbutton toolbar) of the standard selection screen of an executable program. Selecting one of these buttons preassigns different values to the input fields.
REPORT demo_sel_screen_function_key.
TYPE-POOLS icon.
TABLES sscrfields.
DATA functxt TYPE smp_dyntxt.
PARAMETERS: p_carrid TYPE s_carr_id,
p_cityfr TYPE s_from_cit.
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2.
INITIALIZATION.
functxt-icon_id = icon_ws_plane.
functxt-quickinfo = 'Preselected Carrier'.
functxt-icon_text = 'LH'.
sscrfields-functxt_01 = functxt.
functxt-icon_text = 'UA'.
sscrfields-functxt_02 = functxt.
AT SELECTION-SCREEN.
CASE sscrfields-ucomm.
WHEN 'FC01'.
p_carrid = 'LH'.
p_cityfr = 'Frankfurt'.
WHEN 'FC02'.
p_carrid = 'UA'.
p_cityfr = 'Chicago'.
WHEN OTHERS.
...
ENDCASE.
START-OF-SELECTION.
...