Skip to content

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

PARAMETERS

Quick Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


PARAMETERS {para[(len)]}|{para [LENGTH len]} 
           [type_options]
           [screen_options]
           [value_options]
           [ldb_options].

Effect

Declares a parameter para of length len. Parameters are components of a selection screen that are assigned a global elementary data object in the ABAP program and an input field on the selection screen.

The name of the parameter para can contain a maximum of eight characters. This statement is allowed in the global declaration part of executable programs, function groups, and module pools. In function groups and module pools, the statement is only allowed within the definition of a standalone selection screen. In executable programs, the statement is otherwise automatically assigned to the standard selection screen.

The length len can only be specified if the data type specified in type_options has a generic length (c, n, p, and x). The length len must be specified directly as a number or as a numeric constant within the length range defined for the type in question. If len is not specified, the length is set to 1 for a generic data type; otherwise it is set to the length of the data type.

The statement PARAMETERS has the following effect:

  • The statement declares a global variable (para) of the specified length in the program. The type of the data object is specified in type_options.
  • An input field with the same name and a suitable external data type is created in a new row at position 35 on the current selection screen. The length of the input field is determined by the length of the parameter. The maximum length of the input field is 255. The maximum visible length of the input field is between 39 and 45 (depending on the nesting depth in framed blocks). If the length len is greater than the maximum visible length, the content is displayed as movable.

    An output field generated automatically is displayed in the first position available to the left of the input field as a description with a length of between 23 and 30, depending on the nesting depth in blocks with frames. The output field contains either the name of the parameter para or the selection text to which the parameter is assigned in the text elements of the program. If the user requests a field help or input help in the output field by pressing F1 or F4, the same data is displayed as when the input field itself is selected.

    The attributes of the elements on the selection screen can be modified in screen_options and with the statement SELECTION-SCREEN .
  • Before the selection screen is sent, the content of the para data object is transported to the input field on the selection screen and a conversion routine may be executed. If the length of the parameter is greater than 255, the content is truncated from the right. Settings can be configured for the content of the input field in value_options. After a user action on the selection screen, the content of the input field is transported to the data object and the content of character-like fields is converted to uppercase by default. A conversion routine may then be executed. Various selection screen events are raised after the transport.
  • If parameters are defined in the selection include of a logical database, further ldb_options additions are necessary or possible.


Notes

  • If a parameter is given data using SUBMIT when an executable program is called, a conversion routine may also be called and the content truncated on the right at position 255. The conversion routine is skipped and the content not truncated only if the parameter is declared with the addition NO-DISPLAY.
  • To ensure legibility, it is best to specify a length for the generic types and always use the addition LENGTH instead of parentheses.
  • The name of a parameter must not be one of the keywords of the dynpro flow logic (MODULE, SELECT, or VALUES).
  • If the parameter is a decimal floating point number which does not refer to a data type in ABAP Dictionary, the output style scaling retained is set for the entry field on the selection screen, which means that closing zeros are retained after the decimal point. If there is a reference to a data type in the ABAP Dictionary, the output style defined there is used.
  • If the type of the parameter is a packed number or a decimal floating point number defined in ABAP Dictionary, the attribute sign must be set for the type attribute, so that negative numbers can be displayed on the selection screen. This setting is only possible for domains and not for specifying a built-in type directly for data elements or structure components. If a negative number is entered on the selection screen and this property is not set, the system rejects it with an error message. If the parameter contains a negative number when the selection screen is called, an unhandleable exception occurs.
  • If the parameter type is a decimal floating point number defined in ABAP Dictionary for which the output style "currency amount" is specified, only numbers with the corresponding amount of decimal places can be entered on the selection screen. If the associated ABAP data object is a number with more decimal places when the selection screen is called, a non-handleable exception is raised. If the output style is "extended currency amount", additional decimal places can be displayed.

Continue

PARAMETERS - type_options

PARAMETERS - screen_options

PARAMETERS - value_options