ABAP - Keyword Documentation →  ABAP - Reference →  SAP GUI User Dialogs →  Selection Screens →  Create Selection Screens →  PARAMETERS → 

PARAMETERS - screen_options

Quick Reference

Syntax

... { {[OBLIGATORY|NO-DISPLAY] [VISIBLE LENGTH vlen]}
    | {AS CHECKBOX [USER-COMMAND fcode]}
    | {RADIOBUTTON GROUP group [USER-COMMAND fcode]}
    | {AS LISTBOX VISIBLE LENGTH vlen [USER-COMMAND fcode]
                                      [OBLIGATORY]} }

    [MODIF ID modid] ...

Extras:

1. ... OBLIGATORY

2. ... NO-DISPLAY

3. ... VISIBLE LENGTH vlen

4. ... AS CHECKBOX [USER-COMMAND fcode]

5. ... RADIOBUTTON GROUP group [USER-COMMAND fcode]

6. ... AS LISTBOX VISIBLE LENGTH vlen [USER-COMMAND fcode]

Effect

These additions can be used to declare the input field as a required field, hide the input field on the selection screen, and define the visible length of the field. The input field can be displayed as a checkbox, radio button, or dropdown list box. The MODIF ID addition assigns all the screen elements of the parameter to the modification group modid.

Note

Not all combinations of additions are valid. The syntax above shows the permitted combinations.

Addition 1

... OBLIGATORY

Effect

This addition defines the input field of the parameter on the selection screen as a required (obligatory) field. If no entry is made in this field, the user cannot use the Execute function (F8) to exit the selection screen; instead, the user can only use the functions Back, Exit, or Cancel.

Addition 2

... NO-DISPLAY

Effect

This addition specifies that no screen elements are generated for the parameter on the selection screen. In an executable program, a parameter of this type is used only as part of the interface defined by the selection screen. It can be supplied with a value by the calling program when called with SUBMIT.

If the addition NO-DISPLAY is specified, a parameter can have any data types except for reference types. These parameters can only be populated using the WITH addition of the SUBMIT statement. In this case, unlike the general conversion rule for deep types, the same rules apply as when importing data from a data cluster.

Note

The length of a value passed to a parameter without input field is not subject to the 132 character restriction that applies to parameters that do have input fields.

Addition 3

... VISIBLE LENGTH vlen

Effect

This addition defines the visible length of the input field as vlen. Here, vlen is entered directly as a positive number. If vlen is less than the length of the parameter and less than the maximum visible length, the input field is displayed in the length defined in vlen, with movable content. Otherwise, the addition is ignored.

Addition 4

... AS CHECKBOX [USER-COMMAND fcode]

Effect

This addition specifies that the input field in the first position of the selection screen is displayed as a checkbox with the corresponding description next to it on the right. The checkbox is selected if the value of para is "X" or "x". Otherwise, it is not selected.

This parameter must be created with type c and length 1. Explicitly specified lengths len are not allowed. If the addition TYPE is used, it can only be followed by the generic type c or a non-generic data type of type cand length 1.

The addition USER-COMMAND can be used to assign a function code fcode to the parameter. The function code fcode must be specified directly and can only contain a maximum of 20 characters. To evaluate the function code, an interface work area of the structure SSCRFIELDS from ABAP Dictionary can be declared using the statement TABLES. When the user selects the checkbox on the selection screen, the runtime environment raises the event AT SELECTION-SCREEN and passes the function code fcode to the component ucomm of the interface work area sscrfields. If a function code used in the GUI status of the selection screen is specified for fcode, the selection screen processing is affected accordingly.

Notes

Addition 5

... RADIOBUTTON GROUP group [USER-COMMAND fcode]

Effect

This addition specifies that the input field is displayed as a radio button in the first position on the selection screen, and the output field is displayed next to it on the right. The radio button is selected if the value of para is "X" or "x". Otherwise, it is not selected.

group is used to define the radio button group for the parameter. The name group is entered directly as a character string with a maximum of 4 characters. Within a selection screen, there must be a minimum of two parameters in the same radio button group. There cannot be more than one radio button group with the same name in one program, even if they are defined in different selection screens.

This parameter must be created with type c and length 1. Explicitly specified lengths len are not allowed. If the addition TYPE is used, it can only be followed by the generic type c or a non-generic data type of type cand length 1.

In a radio button group, only one parameter can be defined with the addition DEFAULT, and the specified value must be "X". By default, the first parameter in a radio button group is set to the value "X" and the rest are set to " ".

The addition USER-COMMAND can be used to assign a function code fcode to the first parameter in a radio button group. The function code fcode must be specified directly and can only contain a maximum of 20 characters. To evaluate the function code, an interface work area of the structure SSCRFIELDS from ABAP Dictionary can be declared using the statement TABLES. When the user selects any radio button from the radio button group on the selection screen, the runtime environment raises the event AT SELECTION-SCREEN and passes the function code fcode to the component ucomm of the interface work area sscrfields. If a function code used in the GUI status of the selection screen is specified for fcode, the selection screen processing is affected accordingly.

Notes

Addition 6

... AS LISTBOX VISIBLE LENGTH vlen [USER-COMMAND fcode]

Effect

This addition creates a dropdown list box for an input field on the selection screen. The dropdown list box can be supplied with a selection list as follows:

The addition VISIBLE LENGTH must be used to specify the visible length of the input field. The length must be specified explicitly since the length of the entries in the list box is usually different from the actual length of the parameter.

The addition USER-COMMAND can be used to assign a function code fcode to the dropdown list box. The function code fcode must be specified directly and can only contain a maximum of 20 characters. To evaluate the function code, an interface work area of the structure SSCRFIELDS from ABAP Dictionary can be declared using the statement TABLES. When the user selects a row from the list box on the selection screen, the runtime environment raises the event AT SELECTION-SCREEN and passes the function code fcode to the component ucomm of the interface work area sscrfields. If a function code used in the GUI status of the selection screen is specified for fcode, the selection screen processing is affected accordingly.

Notes

Example

For parameter p, the system creates a dropdown list box, whose values are created once for event AT SELECTION-SCREEN OUTPUT and then passed to function module VRM_SET_VALUES.

PARAMETERS p TYPE i AS LISTBOX VISIBLE LENGTH 10.

AT SELECTION-SCREEN OUTPUT.
  CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
      id     = CONV  vrm_id( 'P' )
      values = VALUE vrm_values(
                 FOR i = 1 UNTIL i > 10
                 ( key = i text = |Value { i }| ) ).

Example

For parameter p_carrid, the system creates a dropdown list box, whose values originate from the input help for data type SPFLI-CARRID from ABAP Dictionary. The parameter p_carrid is displayed with a length of 20 and filled with the label "Lufthansa". The user can select another airline; in this case, the three-character airline ID is assigned to the parameter. When the function code onli (associated with the function Execute in the GUI status of the default selection screen) is assigned, the events AT SELECTION-SCREEN and START-OF-SELECTION are raised.

PARAMETERS p_carrid TYPE spfli-carrid
                    AS LISTBOX VISIBLE LENGTH 20
                    USER-COMMAND onli
                    DEFAULT 'LH'.

AT SELECTION-SCREEN.
  ...

START-OF-SELECTION.
  ...



Continue
Example Selection Screens, Display Properties for Parameters