Skip to content

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

PARAMETERS - value_options

Short Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


... [DEFAULT val] 
    [LOWER CASE]
    [MATCHCODE OBJECT search_help]
    [MEMORY ID pid]
    [VALUE CHECK] ...

Extras

1. ... DEFAULT val

2. ... LOWER CASE
3. ... MATCHCODE OBJECT search_help
4. ... MEMORY ID pid

5. ... VALUE CHECK

Effect

Using these additions, it is possible define a start value that allows lowercase letters, a search help, or SPA/GPA parameter to be bound, or a check to be executed against a value list.

Addition 1

... DEFAULT val

Effect

This addition defines a start value for the content of the parameter para. The start value val can either be specified as a literal or as a predefined data object.

If the data type of the specified start value does not match the data type of the declaration, it is converted in accordance with the conversion rules. Without the addition DEFAULT, the initial value associated with the data type is used as a start value.

There are two times when a start value can be passed to the parameter:

In both cases, all the parameters are supplied with their start values, irrespective of the selection screen on which they are defined. If a parameter is not initial at the time the data is passed, the start value will not be passed.


Notes

  • The associated input field on the selection screen is only filled with the start value if the value for para is no longer changed before the selection screen is sent. The system displays the exact value that the parameter has at the end of processing of the event AT SELECTION-SCREEN OUTPUT.
  • When start values are specified, these must have the internal format of the ABAP values, and not the output format of the screen display.

Addition 2

... LOWER CASE

Effect

This addition prevents the content of character-like fields from being converted to uppercase letters when the input field on the selection screen is transported to the data object para in the program and vice versa.

The addition LOWER CASE cannot be combined with the additions AS CHECKBOX or RADIOBUTTON.

Addition 3

... MATCHCODE OBJECT search_help

Effect

This addition associates the input field of the parameter with a search help search_help from ABAP Dictionary. The name of the search help must be specified directly. The input help key is displayed for the input field of the parameter on the selection screen. When the input help (F4) is requested, the hit list from the search help is displayed to the user. When an entry is selected, the corresponding value is placed in the input field. If no search help for the specified name exists in ABAP Dictionary, a message is displayed in the status line when the input help is requested.

The addition MATCHCODE OBJECT cannot be combined with the additions AS CHECKBOX or RADIOBUTTON.


Note

The predecessors of the search helps in ABAP Dictionary were called matchcode objects. This is why this addition has the name MATCHCODE OBJECT. Matchcode objects that have not yet been replaced by search helps are still supported by this addition.


Example

Associating the parameter p_carrid with a suitable search help. When the input help is selected on the selection screen, a list with the names of the airline carriers is displayed. If a name is selected, the corresponding abbreviation is placed in the input field.

PARAMETERS p_carrid TYPE s_carr_id 
           MATCHCODE OBJECT demo_f4_de. 

Addition 4

... MEMORY ID pid

Effect

This addition associates the input field of the parameter with a SPA/GPA parameter in the user memory. The ID pid of the SPA/GPA parameter must be specified directly and it can contain a maximum of 20 characters.

When the selection screen is called, the input field is filled with the current value of the SAP/GPA parameter in the user memory, provided the data object para is initial after processing of the event AT SELECTION-SCREEN OUTPUT. Otherwise, the value of para is displayed. If there is a user action on the selection screen, the content of the input field is assigned to the SPA/GPA parameter in the user memory. If no SPA/GPA parameter exists for the specified ID, it is created.

If the specified ID pid is not in the database table TPARA, the extended program check reports an error.


Note

The addition DEFAULT overrides the addition MEMORY ID.


Example

The parameter p_prog is associated with the SPA/GPA parameter RID, which in turn is associated with the input field for the program name in the screens of ABAP Workbench. Accordingly, the input field of the parameter is filled with the name of the program last processed.

PARAMETERS p_prog TYPE sy-repid MEMORY ID rid. 

Addition 5

... VALUE CHECK

Effect

This addition can only be specified if the type of the parameter is defined using a reference to a data type from ABAP Dictionary.

If a user action is performed on the selection screen, the current content of the input field is checked against any fixed values defined in the domain of the data type. If the data type is a component of a foreign key table, a check against the check table is executed. If the check is not successful, an error message is displayed in the status line of the selection screen. If the program was called using SUBMIT without the selection screen being displayed, the screen is displayed if an error occurs.

The addition VALUE CHECK cannot be combined with the additions AS CHECKBOX, RADIOBUTTON, AS LISTBOX, or NO-DISPLAY.


Note

The check against a check table is executed even if the input field is empty. Therefore, it is advisable to use the addition OBLIGATORY at the same time.

Continue

Selection Screens, Value Properties of Parameters - Example