Show TOC

Suggested Values for Input Fields Locate this document in the navigation structure

 

For users who do not know the possible values for InputFields, Input Help is provided where search criteria is used to make a selection.

Input help is traditionally displayed in popups. A list of suggested values provides a more straightforward way for users to select a value.

The suggested values list is provided by the SAP system. These may be values that the user has entered before in this InputField (history), or they may be values that the SAP system tries to find using a search help. The suggested values list is displayed as soon as the user has entered one or more characters in the InputField.

For example, if you enter value A into an InputField for departure city, a dropdown list is displayed showing all departure cities that start with "A". The values from the history are displayed in the upper part of the dropdown list. The values that the SAP system finds using a search help are displayed in the lower part of the dropdown list (see figure).

Suggested Values List (Suggested Values List)

The suggested values list contains a maximum of ten values, regardless of how many values are in the history and the results list of the input help. If there are more values in the results list, you can display them by pressing the F4 key or clicking on the link beneath the results list.

Note Note

There is no input history or suggested values for the passwordField.

End of the note.
Context Menu Entries for Input Field History

With the Delete Input History for User <User> command the entire field history of this user is deleted. This command is only available if the field history is activated for the application (see application parameter WDENABLEFIELDHISTORY).

Field history can be activated or deactivated with the History of Input Field "<Label>" command in submenu User Settings of an InputField.

This command is only available if the following conditions are met:

  • Field history is activated for the application (see application parameter WDENABLEFIELDHISTORY).

  • Field history is permitted for this InputField. Field history is not permitted for an InputField if property NoHistory ofInputField UI control is set, or the InputField type comes from the ABAP Dictionary and the NoHistory flag is set here.

Note Note

The field history for this InputField can be deactivated with property NoHistory in the InputField. The NoHistory information of a data element from the ABAP Dictionary cannot be overridden. This means that if the NoHistory property is set for the data element, it cannot be reset for the InputField.

End of the note.
Required Settings

The suggested values list for an InputField is available if the following conditions are met:

  • Property valueSuggest of the InputField is set.

  • Property value of the InputField must be bound to a context attribute for which an ABAP Dictionary value help or value set (ValueSet) is available.

  • Application parameter WDALLOWVALUESUGGEST is set for your system or application.

  • The Accessibility mode is deactivated. Das heißt, dass im barrierefreien Modus keine Vorschlagswerte zur Verfügung stehen.

The history is available if the following conditions are met:

Notes on Use
  • The selection of an entry from the suggested value list for an InputField must relate specifically to this InputField. Other InputFields are not updated if they are bound to an ABAP Dictionary search help with output parameters.

  • Not all ABAP Dictionary search helps are suitable for suggested values. With complex ABAP Dictionary search helps the suggested values may not be very meaningful.

    For example, if the key column of the suggested values list is not a key field of the underlying database table, search help is not appropriate. In this case it can result in multiple entries in the key colmun of the sugggested value list. The Web Dynpro ABAP framework selects only one entry for the suggested values list.

    Example:

    For example, you are using one ABAP Dictionary search help with two fields for employee and home town. The search help is based on a database table that lists all employees and their home town. In this case suggested values work well for an input field that is bound to an employee. If however the home town is displayed in the InputField, the result for the suggested values is a list of towns with some employee or other who lives there as the description text. This can be confusing for the user.

  • Suggested values do not support data elements with domains that differentiate between upper and lower case.

  • Displaying the suggested value list increases the network workload and uses extra processing time on the server.

  • Suggested value lists are not displayed for OVS-programmed and user-programmed value helps.

  • The history of an InputField is not dependent on any value help. It is available for every InputField, including input fields that have an OVS or user-programmed value help.

  • Entries can be deleted from the history with the Delete key.

Use of Search Help Exits for Suggested Value Lists

A search help exit can be called from the Web Dynpro framework to ascertain either the suggested value list or the results list of the value help popup.

The variant in which it is called can be specified in CL_WEB_DYNPRO=>valuehelpinfo-valuesuggest. Possible values are:abap_true and abap_false

A search help exit can search across multiple columns. To do this, you set CL_WEB_DYNPRO=>valuehelpinfo-suggestfiltercolumn = '01' (allColumns)

Caution Caution

The suggested value list is displayed in two columns only: The first column is the key column, the second contains the description.

The key column contains the user input, the description column contains a list of the rest of the column content. Each cell is separated by a comma and a space (see figure).

This graphic is explained in the accompanying text.

If suggestFilterMethod = prefixSearch is set, only the first two columns are searched. Use suggestFilterMethod = containsSearch if you want to search in all the columns.

End of the caution.

More Information

You can find an example in the system in the DEMO_VALUE_SUGGEST component.