Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Calling and leaving program units →  Calling ABAP 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,
          selection LIKE LINE OF seltab,
          int       TYPE i,
          rspar     TYPE TABLE OF rsparams,
          wa_rspar  LIKE LINE OF rspar.

    CALL SELECTION-SCREEN 1100 STARTING AT 10 10.
    IF sy-subrc <> 0.
      RETURN.
    ENDIF.
    IF rsparams = 'X'.
      wa_rspar-selname = 'SELECTO'.
      wa_rspar-kind = 'S'.
      wa_rspar-sign = 'E'.
      wa_rspar-option = 'BT'.
      wa_rspar-low  = 14.
      wa_rspar-high = 17.
      APPEND wa_rspar TO rspar.
      wa_rspar-selname = 'PARAMET'.
      wa_rspar-kind = 'P'.
      wa_rspar-low  = 'RSPARAMS'.
      APPEND wa_rspar TO rspar.
      wa_rspar-selname = 'SELECTO'.
      wa_rspar-kind = 'S'.
      wa_rspar-sign = 'I'.
      wa_rspar-option = 'GT'.
      wa_rspar-low  = 10.
      APPEND wa_rspar TO rspar.
      SUBMIT demo_program_submit_rep
             VIA SELECTION-SCREEN
             WITH SELECTION-TABLE rspar
             AND RETURN.
    ELSEIF withexpr = 'X'.
      selection-sign = 'I'.
      selection-option = 'BT'.
      selection-low  = 1.
      selection-high   = 5.
      APPEND selection TO seltab.
      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.