Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  SAP GUI User Dialogs →  Selection Screens →  Create Selection Screens →  SELECT-OPTIONS 


Quick Reference

Other versions: 7.31 | 7.40 | 7.54


... FOR {dobj|(name)} ... 


1. ... FOR dobj
2. ... FOR (name)


This addition determines the data type of the columns low and high in the selection table. The data type can be defined by means of a static reference to an existing data object dobj or by a dynamic reference to a data type from ABAP Dictionary in name.

If the addition NO-DISPLAY is not specified, the data type of the columns low and high in the selection table must be elementary and flat and the numeric type f is not allowed. If the addition NO-DISPLAY is specified, any data types, except enumerated types, are possible.


When referencing data types from ABAP Dictionary, the selection criterion inherits all the screen-relevant attributes defined there. During data transport to and from the input fields, any conversion routines defined in the domain are executed. The text defined in ABAP Dictionary can be inherited as a selection text. Note, however, that the input fields on the selection screen are linked with a global data object belonging to the program and do not have any real reference to the dictionary, in contrast to screen fields, which are created in the Screen Painter with reference to the dictionary. This has a particular effect on automatic support for input help (F4) and value checking. In comparison to general screens, input help functionality is limited here in that dependencies between fields and previously entered data are not taken into account. No automatic value checking is performed.

Alternative 1

... FOR dobj


If this addition is specified, the columns low and high in the selection table inherit all the attributes of a data object dobj that has already been declared, most importantly a reference to ABAP Dictionary, if applicable. dobj expects a data object that is elementary and flat and not of the type f (unless NO-DISPLAY is used) and is not an enumerated type.


As well as the data objects referred to using FOR from their own program, the public attributes of global classes are also relevant data objects.


Typical declaration and application of a selection criterion.

DATA spfli_wa TYPE spfli. 

SELECT-OPTIONS s_carrid FOR spfli_wa-carrid. 

       FROM spfli 
       WHERE carrid IN @s_carrid 
       INTO @spfli_wa. 

Alternative 2

... FOR (name)


This addition is used to create the columns low and high in the selection table with data type c and length 45. The input fields are displayed on the selection screen, but with a length, field help, and input help appropriate for the data type specified in name.

name expects a flat character-like data object that contains the name of a component in a flat structure from ABAP Dictionary in uppercase letters when the selection screen is accessed. The following can be specified for name:

  • Constant
If the data object name is specified as a constant, it can be evaluated statically and the specified component is identified as the used object.
  • Variable
If the data object name is specified as a variable, it is specified only dynamically and the content is not evaluated statically.

A text field literal can be specified for name, but its content is ignored. If the text pool currently loaded does not contain a selection text for the parameter, the output field displays the corresponding field label from ABAP Dictionary. When data is transported from the input field to the selection table, the content is converted as if it were assigned by the corresponding ABAP data type (no formatting characters, period as a decimal separator, date format "yyyymmdd", and so on).

If the content of name is not a structure component in ABAP Dictionary, the input fields are displayed according to the actual type of the columns low and high. This also applies if a literal is specified for name. If a selection text for the parameter is not created in the text pool currently loaded, the output field contains the text "Generic Selection Option".

A dynamic reference to a data type is not possible in a selection include for a logical database.


Dynamic design of the selection criterion selcrit on selection screen 500 based on the entries in the standard selection screen for an executable program.

            column TYPE c LENGTH 30. 

DATA name(80) TYPE c. 

SELECT-OPTIONS selcrit FOR (name). 

name = dbtab && '-' && column. 



Selection Screens, Basic Form of Selection Criteria