SELECTION-SCREEN FUNCTION KEY n.
Effect
Activates a pushbutton (one of a maximum of 5) in the application toolbar of the selection screen (where n is between 1 and 5).
At runtime, you must insert the text for the pushbutton into the appropriate ABAP Dictionary field SSCRFIELDS-FUNCTXT_01 ... SSCRFIELDS-FUNCTXT_05. If you want to assign an icon to the pushbutton, you must fill SSCRFIELDS-FUNCTXT_01 ... SSCRFIELDS-FUNCTXT_05 using the structure SMP_DYNTXT.
The function code placed in field SSCRFIELDS-UCOMM is 'FC01' ... 'FC05'. You can query this function code in the AT SELECTION-SCREEN event or the PAI routine in the database access program SAPDBldb.
Within the selection include : Additions FOR NODE node , FOR TABLE dbtab and ID id.
Notes
- If a pushbutton (ex. FUNCTION KEY 2,) is already defined in the selection include, the system returns a syntax error if you try to include an equivalent statement in your report.
- You can create your own pushbuttons directly on the screen using the PUSHBUTTON addition.
Example
TABLES SSCRFIELDS.
...
SELECTION-SCREEN FUNCTION KEY 1.
...
INITIALIZATION.
MOVE 'My text' TO SSCRFIELDS-FUNCTXT_01.
...
AT SELECTION-SCREEN.
IF SSCRFIELDS-UCOMM = 'FC01'.
...
ENDIF.
Generates a pushbutton in the application toolbar of the selection screen with the text 'My text' . In the AT SELECTION-SCREEN event, SSCRFIELDS-UCOMM has the contents FC01 when the button has been pushed.