SELECTION-SCREEN - PUSHBUTTON
SELECTION-SCREEN PUSHBUTTON [/]pos|POS_LOW|POS_HIGH button_text
[VISIBLE LENGTH vlen]
[MODIF ID modid]
This statement creates a pushbutton on the current
The text on the pushbutton is determined by the content of
rules that apply to
text also apply to
in the addition
MODIF ID assigns the pushbutton to the
You can use the function module ICON_CREATE to assign an icon, a
quick info text and a corresponding
text to a pushbutton. When you do this, you must specify an adequate length
lenfor the pushbutton so that the icon can be displayed internally and adjust the visible length with
Once the event block in
AT SELECTION-SCREENhas 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 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.
You must specify the position of the pushbutton using this addition. The syntax and meaning of 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.
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
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
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.
Define and access a stand-alone
500 with two pushbuttons in an executable program. An icon and a quick info text are created for the second pushbutton.
TABLES sscrfields. SELECTION-SCREEN: 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. AT SELECTION-SCREEN. CASE sscrfields. WHEN 'CLI1'. ... WHEN 'CLI2'. ... ENDCASE. START-OF-SELECTION. title = 'Push button'. but1 = 'Button 1'. CALL FUNCTION 'ICON_CREATE' EXPORTING name = icon_information text = 'Button 2' info = 'My quick info' IMPORTING RESULT = but2 EXCEPTIONS OTHERS = 0. CALL SELECTION-SCREEN '0500' STARTING AT 10 10.