ABAP Keyword Documentation → ABAP - Reference → Calling and leaving program units → Calling Programs → Calling Executable Programs → SUBMIT → SUBMIT - selscreen_options
Program Calls, Filling the Selection Screen
The example shows how to fill the standard selection screen when a program is called.
Other versions: 7.31 | 7.40 | 7.54
Source Code
DATA: seltab TYPE RANGE OF i,
rspar TYPE TABLE OF rsparams.
CALL SELECTION-SCREEN 1100 STARTING AT 10 10.
IF sy-subrc <> 0.
RETURN.
ENDIF.
IF rsparams = 'X'.
rspar = VALUE #(
( selname = 'SELECTO'
kind = 'S'
sign = 'E'
option = 'BT'
low = 14
high = 17 )
( selname = 'PARAMET'
kind = 'P'
low = 'RSPARAMS' )
( selname = 'SELECTO'
kind = 'S'
sign = 'I'
option = 'GT'
low = 10 ) ).
SUBMIT demo_program_submit_rep
VIA SELECTION-SCREEN
WITH SELECTION-TABLE rspar
AND RETURN.
ELSEIF withexpr = 'X'.
seltab = VALUE #(
( sign = 'I'
option = 'BT'
low = 1
high = 5 ) ).
SUBMIT demo_program_submit_rep
VIA SELECTION-SCREEN
WITH paramet EQ 'WITH EXPR'
WITH selecto IN seltab
WITH selecto NE 3
AND RETURN.
ENDIF.
Description
When the program is executed, the system displays a prompt and depending on the selection made there
fills the standard selection screen of the program called either using a table of the type RSPARAMS or using multiple WITH
additions.
In both calls of demo_program_submit_rep
, the system passes values leading
to two-row selection tables selecto
. The second row is displayed in the dialog
box Multiple Selection for selecto
. Without the
addition VIA SELECTION-SCREEN
of the statement SUBMIT
,
the system would equally fill but not display paramet
and selecto
in demo_program_submit_rep
.