sapdev logo background
sapdev logo sapdev logo
Comments

ABAP SELECTION-SCREEN FUNCTIONKEY Statement syntax, information and example SAP source code



Return to Statement index



SELECTION-SCREEN - FUNCTION KEY

Short Reference

ABAP Syntax SELECTION-SCREEN FUNCTION KEY n [
ldb_additions ].

What does it do? 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 must 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 comm of the interface work area sscrfields .
The ldb_additions can only be used in the selection include of a logical database .

Latest 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, you can only choose either Execute
or Cancel . 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, then the selection screen processing is modified accordingly.

Example ABAP Coding See Selection Screens, Pushbuttons in Application Toolbar
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




SELECTION-SCREEN_DEFINITION
SELECTION-SCREEN_INCLUDE




comments powered by Disqus