Properties and Handling of Specific Attribute and Field Types

The attribute and field types described below have special properties or are handled in a special way.

Free Text Search

Search terms are attributes of type if_wd_select_options_20=>e_attribute_types-free_text. This attribute type is always rendered as the first row, and includes a label, but no dropdown menu. The text for a label can be defined in the TEXT attribute. Only one attribute of this type can be defined. If a label is defined for each row, the search term is not assigned an additional label.

Methods GET_INPUT_COMPLETE and GET_INPUT_PER_ATTRIBUTE return the value of the input field for search terms. A conversion into a RANGE table is not possible. For this reason the value in method GET_INPUT_COMPLETE_AS_RANGE has the attribute Not Convertable.

Rules for Evaluated Rows

The Select Options component itself decides whether a row is to be evaluated and included in a selection. This information is set in the transfer table of type WDR_SO_T_VALUES in column UNVALUATED_ROW.

There are the following types of input fields:

Input fields in which the initial value is empty (NULL):

These are attributes of a type in which the initial value is the empty string (NULL). Examples of this are CHAR fields or NUMC fields with the option NULL_AS_BLANK, or fields that are rendered with a dropdown menu.

The Select Options component evaluates an attribute without an assigned value in the following cases:

  • The operator IS or EQUALS is used and the input field contains the initial value.

  • The operator IS BETWEEN is used and both input fields contain the initial value.

  • The operator IS is used and the initial value is selected in the dropdown menu.

Input fields in which the initial value is NULL

Examples of input fields whose initial value is NULL are fields such as NUMC, TIME, DATE, PACKED. The Select Options components evaluates attributes without an assigned value if the input field contains the value NULL and operator IS EMPTY is not selected.

Attributes with Range Conversion

Attributes that have a range conversion are handled in a special way. Attribute have a range conversion if the domain used uses a conversion exit, and function CONVERSION_EXIT_exit_RANGE_I exists. These attributes are automatically recognized by the Select Options component.

For example, the entry "Language starts with an A" results in a range containing multiple lines (in this case, language = AR and language = AF). The special problem comes about because no internal value exists for the external value (A*). For this reason when data is exchanged using structure WDR_SO_S_VALUES, under certain circumstances the external value must be forwarded.

Attributes with a range conversion are rendered as CHAR field with an output length in accordance with the conversion. Initial data can be transferred in internal or external format. Parameter EXT_PRESENTATION in structure WDR_SO_S_VALUES must be set accordingly (internal format ABAP_FALSE, external format ABAP_TRUE). In methods GGET_INPUT_COMPLETE and GET_INPUT_PER_ATTRIBUTE the data is transferred in external format (EXT_PRESENTATION = abap_true). In methods CONVERT_DATA_INTO_RANGES and GET_INPUT_COMPLETE_AS_RANGE the data is converted into a range that always returns the data in internal format.

Since the data transfer in external format places additional workload on the calling application, the range conversion can be suppressed for the whole component too. To do this, in INIT_SELECT_OPTIONS set parameter GLOBAL_OPTIONS NO_RANGE_CONVERSION = ABAP_TRUE. In this case the input field for the attribute is rendered as typed, and the data is always exchanged in internal format.

Fields with Units or Currencies

Amounts and quantities can be rendered with the Select Options component together with the associated currencies and units. The relevant currency or unit field is rendered directly after the quantity or amount field.

You can define these attributes with the following attribute types:

  • For amounts and quantities: if_wd_select_options_20=>e_attribute_types-curr_quan

  • For currencies and units: if_wd_select_options_20=>e_attribute_types-cuky_unit

The attributes must be defined with the relevant DDIC types CURR, CUKY, QUAN, and UNIT. The attribute for quantity/amount must contain a reference to the attribute for the assigned CURRENCY/UNIT attribute in field REF_ATTRIBUTE. The input fields for CURRENCY/UNIT attributes appear directly after the assigned quantity/amount field, rather than in a separate line.

Multiple attributes of type CURR_QUAN can use the same reference attribute for the currency or unit.

You can set a default value for currencies or units by specifying a row for the currency or unit attribute in the initial data. The default operator for currency and unit is always IS. Currency and unit attributes can also be defined as READ_ONLY. In this case a value must be set in the initial data.

The entered data is read in with method GET_INPUT_COMPLETE or GET_INPUT_PER_ATTRIBUTE. A rendering as a range is not possible which is why the tuples in method GET_INPUT_COMPLETE_AS_RANGE appear as Non-Convertable. The data entered in the currency or unit field is not checked.

Supported Value Help Modes

The following value help modes are supported (the constants are defined in if_wd_context_node_info=>c_value_help_mode):

  • Deactivated: No search help is offered.

  • (automatic: The search help is identified automatically from the type information. If the type is defined in REF_TABLE/REF_FIELD, the DDIC search help from the structure is used.

  • DDIC: The application must specify a DDIC search help in the definition of the attributes. This search help is used for the relevant input field.

  • OVS: OVS events are passed to the calling application.

  • Application-defined: You can create your own component for an F4 help. Make sure that access is adequate to context element of F4 help from the value help listener in interface IWD_VALUE_HELP. You can find an example under WDR_TEST_SELOPT20_VH.

For the DDIC search helps only the entry in the F4 field is included, and only in this field can a value be reset. This must be also implemented the same way in the OVS-defined and application-defined search helps. Access to the context of other attributes is denied.

The DDIC search help allows you to select multiple values so that they can be used for the search. This feature cannot be deactivated.