... { TYPE type [DECIMALS dec] }
| { LIKE dobj }
| { LIKE (name) } ... .
1. ... TYPE type [DECIMALS dec]
2. ... LIKE dobj
3. ... LIKE (name)
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 through static reference to an existing data type type, through static reference to a data object dobj, or through dynamic reference to a data type from the ABAP Dictionary in name.
If the addition NO-DISPLAY is not specified, the data type of a parameter must be elementary and
flat, and the numeric type
f is not allowed. If the addition NO-DISPLAY is specified, any arbitrary data types, except
reference types, are possible.
If there is a reference to data types from the 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 can be adopted 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 which are created in the Screen Painter with reference to the Dictionary. This affects the automatic support for the input help (F4) and the value check in particular. The functions of the input help are restricted compared to the general dynpro fields because dependencies between fields and already existing input are not considered. A value check is not automatically performed, but can be executed using the addition VALUE CHECK.
... TYPE type [DECIMALS dec]
With this addition, the parameter receives the data type type. For type, you can specify:
With the specification of the built-in ABAP type p, you can use DECIMALS to define the number of decimal places dec. Without the specification of DECIMALS, the number of decimal places is 0.
If type is a type from the 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.
Declaration of a parameter with reference to the component carrid of the database table spfli. On the selection screen, a three-digit input field with a field and input help that can be called is created.
PARAMETERS p_carrid TYPE spfli-carrid.
... LIKE dobj
With this addition, the parameter adopts all the properties of a data object dobj already declared, in particular also a possible reference to the ABAP Dictionary. For dobj, a data object must be specified that is elementary and flat, and not of the type f (with the exception of the use of NO-DISPLAY).
For compatibility reasons, you can use the addition LIKE to reference - with the exception of properties of data objects - the components of flat structures, database tables, or
views in the ABAP Dictionary.
Data objects that can be referenced using LIKE include the ones of the own programm and the ones of public attributes of global classes.
... LIKE (name)
Using this addition, you create the data object para with the data type c of the length 132. The input field on the selection screen, however, is displayed in a length and with a field and input help that matches the data type as specified in name.
For name, a flat, character-type data object is expected that - when the selection screen is called - contains the name of a component of a flat structure or a database table of the ABAP Dictionary in uppercase letters. If no selection text for the parameter is created in the currently loaded text pool, the respective field descriptor from the ABAP Dictionary appears in the output field. 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 of
the ABAP Dictionary, 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".
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.
Dynamic formatting of the input field of the parameter p_dyn. On the selection screen, a three-digit 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'.