SELECTION-SCREEN PUSHBUTTON [/][pos](len) button_text
[VISIBLE LENGTH vlen]
[MODIF ID modid]
1. ... [/][pos](len)
2. ... USER-COMMAND fcode
3. ... VISIBLE LENGTH vlen
4. ... MODIF ID modid
This statement creates a pushbutton on the current selection screen. The text on the pushbutton is determined by the content of button_text. The rules that apply to text also apply to button_text when creating an output field.
The additions ldb_additions can only be used in the selection include for a
You must specify the position of the output field using [/][pos](len). The syntax and meaning of [/][pos](len) are the same as when creating
horizontal lines, although in this case, len defines the length of the pushbutton on the selection
screen. If a pushbutton extends beyond position 83 or beyond the edge of a
block with a frame, it is cut off at the right hand side.
... USER-COMMAND fcode
If you specify the USER-COMMAND addition, the pushbutton must be assigned a function code fcode. The function code fcode must be specified directly and can only contain a maximum of 20 characters.
Before you can work with the pushbutton, you must specify a TABLES statement to declare an interface work area for the structure SSCRFIELDS from the ABAP Dictionary.
If the user selects the pushbutton on the selection screen, the runtime environment triggers the event
and the function code fcode is transferred to the
ucomm component in the interface work area sscrfields.
If the function code of a pushbutton corresponds to a function code used in the GUI status of the selection screen, the selection screen processing is influenced accordingly.
... VISIBLE LENGTH vlen
The VISIBLE LENGTH addition defines the visible length
vlen of the pushbutton and your text. The syntax and meaning of this addition are the same as when creating
output fields, although a pushbutton is never displayed as shorter than the text defined for it.
... MODIF ID modid
The MODIF ID addition assigns the pushbutton to the
modid that is assigned to the column group1
on the system table screen.
This means it can be modified using a MODIFY SCREEN statement before the selection screen is displayed.
Define and access a stand-alone selection screen 500 with two pushbuttons in an executable program. An icon and a quick info text are created for the second pushbutton.
BEGIN OF SCREEN 500 AS WINDOW TITLE title,
PUSHBUTTON 2(10) but1 USER-COMMAND cli1,
PUSHBUTTON 12(30) but2 USER-COMMAND cli2
VISIBLE LENGTH 10,
END OF SCREEN 500.
title = 'Push button'.
but1 = 'Button 1'.
CALL FUNCTION 'ICON_CREATE'
name = icon_information
text = 'Button 2'
info = 'My Quickinfo'
RESULT = but2
OTHERS = 0.
CALL SELECTION-SCREEN '0500' STARTING AT 10 10.