17 Adding buttons on Selection screen application toolbar in SAP CORE ABAP

Опубликовано: 14 Июнь 2026
на канале: SAP Full Stack Custom Development
38
3

To add custom buttons to the application toolbar of a selection screen in SAP ABAP, you must use the standard interface object SSCRFIELDS [1]. This requires including the structure TABLES sscrfields. at the top of your program [1, 2].Here is a step-by-step implementation guide with modern, scannable code.

Step-by-Step Implementation
Declare the Interface Table: Tell ABAP you will use selection screen fields [1, 2].
Define the Button: Use SELECTION-SCREEN FUNCTION KEY n (where n is a number from 1 to 5) [1].
Assign Text and Icons: Populate the sscrfields structure during the INITIALIZATION event [1, 2].
Handle the Click: Capture the button press in the AT SELECTION-SCREEN event [1, 2].

Critical Technical Rules

Maximum Limit: You can add a maximum of 5 buttons using this method (FC01 through FC05) [1].

Function Code Mapping: The buttons trigger strict system function codes:
FUNCTION KEY 1 \(\rightarrow \) Triggers sscrfields-ucomm = 'FC01' [1]
FUNCTION KEY 2 \(\rightarrow \) Triggers sscrfields-ucomm = 'FC02' [1]
FUNCTION KEY 3 \(\rightarrow \) Triggers sscrfields-ucomm = 'FC03' [1]
FUNCTION KEY 4 \(\rightarrow \) Triggers sscrfields-ucomm = 'FC04' [1]
FUNCTION KEY 5 \(\rightarrow \) Triggers sscrfields-ucomm = 'FC05' [1]

Finding Icon IDs: To find codes like @10@ or @01@, run standard SAP program SHOWICON via transaction SE38 to view the complete catalog of system icons.