Skip to content

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 demonstrates 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, a prompt is displayed and, depending on the selection made, the standard selection screen of the called program is filled either using a table of the type RSPARAMS or using multiple WITH additions.

In both calls of demo_program_submit_rep, values producing double-row selection tables selecto are passed. The second row is displayed in the dialog box Multiple Selection for selecto. If the addition VIA SELECTION-SCREEN of the statement SUBMIT is not specified, paramet and selecto in demo_program_submit_rep would be filled in exactly the same way but not displayed.