ABAP Keyword Documentation → ABAP - Reference → Obsolete Language Elements → Obsolete Processing of Internal Data → Obsolete Assignments
ASSIGN - obsolete_casting
Other versions: 7.31 | 7.40 | 7.54
Obsolete Syntax
... { TYPE name }
| { [TYPE name] DECIMALS dec } ...
Extras
1. ... TYPE name
2. ... DECIMALS dec
Effect
This form of the addition casting_spec
of the statement ASSIGN
, in which
TYPE
or DECIMALS
is specified without the addition
CASTING
, is not allowed in classes. Also it cannot be used together with
the statement INCREMENT
in
mem_area or with the addition RANGE
.
However, the field symbol may have been typed using the obsolete- addition
STRUCTURE
of the statement FIELD-SYMBOLS
.
Addition 1
... TYPE name
Effect
After TYPE
, a single character character-like data object name
is expected, which must contain exactly one of the case-sensitive letters "C", "D", "F", "I", "N", "P", "T", "X", "b", or "s" when the statement is executed. These letters label the respective predefined
ABAP types and have the following effects:
-
If the field symbol
<fs>
is typed completely or in parts, the typing must match the ABAP type specified afterTYPE
. The assigned memory area is cast to the type of the field symbol. -
If the field symbol is typed completely generically, the type of the assigned memory area is cast to the ABAP type specified after
TYPE
.
Note
The specification of the predefined types b
and s
using "b" or "s" is an exception to the rule that these cannot be specified in statements. It is only possible in these obsolete variants.
Addition 2
... DECIMALS dec
Effect
A numeric data object dec
must be specified after DECIMALS
. For the
casting, the data type p
is used; the size of the
fractional portion
is determined by the content of dec
. TYPE
does
not need to be specified for DECIMALS
. If TYPE
is specified, name
must contain the data type "P", which is used anyway.
Example