PARAMETERS - type_options
Short Reference
ABAP Syntax ... { TYPE type [DECIMALS dec] }
| { LIKE dobj }
| { LIKE (name) } ... .
ABAP_ALTERNATIVES:
1 ... TYPE type [DECIMALS dec]
2 ... LIKE dobj
3 ... LIKE (name)
What does it do? These additions define the data type of the parameter. If
none of the additions is specified, the parameter has the type c
. The data type can be defined using a static reference to an existing
data type type , using a static reference to a data object
dobj , or using a dynamic reference to a data type from ABAP
Dictionary in name .
If the addition NO-DISPLAY is not
specified, the data type of a parameter must be elementary and (with the
exception of string ) flat , and the
numeric type f is not allowed. If the addition NO-DISPLAY
is specified, any data types, except
reference types , are possible.
Latest notes: If there is a reference to data types from ABAP Dictionary,
the parameter adopts all the properties defined there as screen-relevant
. Conversion routines defined in the domain may be executed during the
data transport from and to the input field. The text defined in ABAP
Dictionary can be inherited as a selection text. You must must ensure
that the input field on the selection screen is associated with a global
data object of the program and does not receive a real reference, as is
the case for dynpro fields created in Screen Painter with
reference to the dictionary. This has a particular effect on automatic
support for input help ( F4 ) and value checking. In comparison to
general screens, input help functionality is limited here in that
dependencies between fields and previously entered data are not taken
into account. A value check is not performed automatically, but can be
executed using the addition VALUE CHECK
.
ABAP_ALTERNATIVE_1 ... TYPE type [DECIMALS dec]
What does it do? This addition gives the parameter the data type
type
. For type , you can specify:
the predefined ABAP types, with the exception of b , s ,
f , and xstring
A non-generic data type from ABAP Dictionary, a non-generic public
data type of a global class, or a data type from the same program,
already defined using TYPES , and which is
elementary and not of the type f or xstring (with the
exception of the use of NO-DISPLAY
).
If the predefined ABAP type p is specified, you can use
DECIMALS to define the number of
decimal places dec . If DECIMALS is not specified, the
number of decimal places is 0.
If type is a type from ABAP Dictionary that has the type
CHAR , length 1, and (in the domain) the
fixed values "X" and " ", the input field on the selection
screen is automatically displayed as if the addition
AS CHECKBOX were specified.
Example ABAP Coding Declaration of a parameter with reference to the
component carrid of the database table spfli . On the
selection screen, a callable three-character input field with a field
help and input help is created.
PARAMETERS p_carrid TYPE spfli-carrid.
ABAP_ALTERNATIVE_2 ... LIKE dobj
What does it do? Using this addition, the parameter adopts all the
properties of a data object dobj already declared, in particular
also a possible reference to ABAP Dictionary. The same applies to
dobj as to TYPES ... LIKE , except
that the specified data object can be elementary and
flat (with the exception of string ) and
cannot have the type f (unless
NO-DISPLAY is used).
Latest notes: You can use LIKE to refer to data objects, and also
to the public attributes of global classes.
For reasons of compatibility, LIKE can also be used for an
obsolete type reference .
ABAP_ALTERNATIVE_3 ... LIKE (name)
What does it do? This addition creates the data object para with
the data type c and the length 132. The input field is displayed
on the selection screen, but with a length, field help, and input help
appropriate for the data type specified in name .
For name , you must specify a flat character-like data object
containing the name of a component in a flat structure from ABAP
Dictionary in uppercase when the selection screen is accessed. You can
specify a flat character-like literal for name , but its content
is ignored. If the text pool currently
loaded does not contain a selection text for the parameter, the output
field displays the corresponding field label from ABAP Dictionary. When
the data is transported from the input field to the data object para
, the content is converted in such a way as if it were assigned by
the respective ABAP data type (no formatting characters, decimal
separation character is period symbol, data format is "yyyymmdd" ,
and so on).
If the content of name is not a component structure from ABAP
Dictionary or a literal is specified for name , the input field is
displayed according to the actual type of the parameter. If no selection
text is created for the parameter in the currently loaded text pool, the
output field contains the text "Dynamic Parameter".
Latest notes: The field name of the program in which the selection
screen is defined is used. If the selection screen is defined in a
logical database , the field
name of the database program is
used, even if the selection screen from the assigned
executable program is displayed.
Example ABAP Coding Dynamic formatting of the input field of the parameter
p_dyn . On the selection screen, a three-character input field
with the input help for the column carrid in the database table
spfli is displayed. If the parameter does not have a selection
text, the text "Airline Carrier" is displayed in the output field.
DATA comp TYPE c LENGTH 60.
PARAMETERS p_dyn LIKE (comp).
INITIALIZATION.
comp = 'SPFLI-CARRID'.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved