ABAP Keyword Documentation → ABAP - Reference → Assignments → Value Assignments → MOVE → MOVE EXACT
MOVE EXACT - Elementary Data Objects
In assignments between incompatible
elementary data objects, the EXACT
addition ensures that no values are
lost. Regardless of the value of the source field, the EXACT
addition generally
does not permit assignments between data objects with the following data types. The is because with these data types, values are always lost when the
conversion rules are applied.
- From
x
,xstring
tod
,n
, andt
and the other way around
- From
x
,xstring
to all numeric data types and the other way around
- From
d
andt
tob
ands
Conversions from d
to t
(and the other way around)
are not permitted, regardless of whether the EXACT
addition is used. Other
conversions that are not permitted are conversions in which byte-like fields are converted directly or as an intermediate result to the data type i
(or the other way around).
If illegal assignments are made, a syntax error occurs, or if the cause cannot be identified statically, an exception of the class CX_SY_CONVERSION_EXACT_NOT_SUP is raised. This also occurs with types for which assignments are permitted, but for which a loss of values can be identified regardless of the content, for example, if an assignment is made to fields that are too short.
When permitted assignments are made between incompatible elementary data objects, the EXACT
addition checks the contents of the source field at runtime as follows:
When assignments are made between compatible elementary data objects for which no conversion is required, no checks are performed and no exceptions are raised.
Other versions: 7.31 | 7.40 | 7.54
Notes
- When the
EXACT
addition is used, a handleable exception is always raised when an illegal assignment is made. This occurs in particular with assignments betweend
andt
. If theEXACT
addition is not used, an unhandleable exception is raised.
- If a source field contains an invalid or inappropriate value, this is assigned to a compatible target field, even if the
EXACT
is used.
Example
See Lossless Assignment.