Ansicht
Dokumentation

ABAPSELECT-OPTIONS_FOR - SELECT-OPTIONS FOR

ABAPSELECT-OPTIONS_FOR - SELECT-OPTIONS FOR

General Data in Customer Master   PERFORM Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

SELECT-OPTIONS, FOR

Short Reference



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

Alternatives:

1. ... FOR dobj

2. ... FOR (name)

Effect

This addition determines the data type of the columns low and high in the selection table. The data type can be defined using a static reference to an existing data object dobj or by a dynamic reference to a data type from the 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 flat data types, except enumerated types, are possible.

Note

When referencing data types from the 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 the ABAP Dictionary can be inherited as a selection text. It should be noted, however, that the input fields on the selection screen are linked with a global data object of the program and are not given a real reference to the dictionary, in contrast to dynpro 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 dynpros, input help functionality is limited here in such a way that dependencies between fields and previously entered data are not respected. No automatic value checking is performed.

Alternative 1

... FOR dobj


Effect

If this addition is specified, the columns low and high of the selection table inherit all the attributes of a data object dobj that has already been declared, in particular any reference to the ABAP Dictionary. 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.

Note

The data objects that can be referred to using FOR include the public attributes of global classes as well as those of their own program.

Example

Typical declaration and application of a selection criterion.

Alternative 2

... FOR (name)


Effect

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 the ABAP Dictionary in uppercase letters when the selection screen is called. 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 not evaluated. If the text pool currently loaded does not contain a selection text for the parameter, the output field displays the corresponding field label from the 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 the 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.

Example

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








BAL_S_LOG - Application Log: Log header data   General Data in Customer Master  
This documentation is copyright by SAP AG.

Length: 6505 Date: 20240424 Time: 073018     sap01-206 ( 115 ms )