Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  SAP GUI User Dialogs →  Selection Screens →  Create Selection Screens →  SELECTION-SCREEN →  SELECTION-SCREEN - screen_elements 

SELECTION-SCREEN - FUNCTION KEY

Quick Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


SELECTION-SCREEN FUNCTION KEY n [ldb_additions]. 

Effect

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", where a value between 1 and 5 must be entered for n.

To enable use of the pushbuttons, the statement TABLES can be used to declare an interface work area of the structure SSCRFIELDS from 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 associated function code is passed to the component ucomm of the interface work area sscrfields.

The ldb_additions can only be used in the selection include of a logical database.


Notes

  • To assign icons, a tooltip, and appropriate text to the pushbuttons, a data object can be defined of the structured type SMP_DYNTXT in ABAP Dictionary. The ID of the icon, a tooltip, and the associated text must be assigned to the components of this data object. The content of the whole structure must then be assigned to the component functxt_0n of the interface work area sscrfields.
  • Once the event block in AT SELECTION-SCREEN has been processed, the system usually returns to displaying the selection screen. To exit selection screen processing and continue executing the program, either Execute or Cancel must be chosen. This means pushbuttons on selection screens are intended primarily for use for dynamic modifications to the selection screen rather than to control the program.
  • If the content of the component ucomm is set to a function code used in the GUI status during selection screen processing, the selection screen processing is modified accordingly.
  • It is not recommended that the system field sy-ucomm instead of sscrfields-ucomm is evaluated, since this does not guarantee that sy-ucomm is always given the correct value in selection screen processing.

Executable Example

Selection Screens, Pushbuttons in the Application Toolbar

Continue

Selection Screens, Pushbuttons in the Application Toolbar