PARAMETERS
Short Reference
Syntax
PARAMETERS {para[(len)]}|{para [LENGTH len]}
[type_options]
[screen_options]
[value_options]
[ldb_options].
Effect
Declaration of a para parameter 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 para parameter may contain a maximum of eight characters. This statement is permitted in the global declaration part of
executable programs,
function groups and
module pools. In function groups and module pools it is only permitted within the definition of a
independent selection screen. In executable programs, it is otherwise automatically assigned to the
standard selection screen.
The length len can only be specified if the data type
specified in type_options is generic regarding the length
(c, n,
p, and x). The length len must be specified as a numeric literal or as a numeric constant within the corresponding
interval ranges. If len
is not specified, the length is set to 1 for a generic data type, or else it is set to the length of
the data type. As of Release 6.10, it is possible to specify the length using the LENGTH addition.
In detail, the PARAMETERS statement 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.
-
On the current selection screen, an input field with the same name and a suitable external data type
is created in a new line at position 35. The length of the input field is aligned with the length of
the parameter. The maximum length of the input field is 132. The maximum visible length of the input
field is between 39 and 45, depending on the nesting depth in blocks with frames. If the
len length is greater than the maximum visible length, the content is displayed as movable.
In front of the input field, in the first possible position, an automatically generated output
field is displayed as a description, whose length is between 23 and 30 depending on the nesting depth
in blocks with frames. The output field contains either the name of the
para parameter or the selection text to which the parameter is assigned in the text elements
of the program. If the user requests field or input help on the output field using the
F1 or F4 function keys, the same output is displayed as when the input field itself is selected.
The attributes of the elements on the selection screen can be influenced in
screen_options and with the SELECTION-SCREEN statement.
-
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
convertion routine may be executed.
If the length of the parameter is greater than 132, the content is truncated from the right. Settings
regarding the content of the input field can be made 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-type fields is converted into uppercase by default. Afterwards, a conversion routine may be executed. Various
selection screen events are triggered after the transport.
-
If parameters are defined in the selection include in the
logical database, additional
ldb_options additions are necessary or possible.
Note
-
If a parameter is populated by SUBMIT when an executable program is called, a
convertion routine may also be
executed and the value is truncated from the right at position 132. The conversion routine is not executed
and the value is not truncated when the parameter is declared with the NO-DISPLAY addition.
-
For legibility reasons, SAP recommends not to omit the generic types for the length specification and to always use the LENGTH addition instead of brackets.