ABAP Keyword Documentation → ABAP - Reference → Processing Internal Data → Assignments
Lossless Assignments
A lossless assignment is an assignment between incompatible data types in which the conversion is checked to see whether data is lost. Lossless assignments can be performed using the
- lossless operator
EXACT
, in which the argument is converted to a result of the specified type using the
This makes it possible to use lossless assignments in all operand positions in which EXACT
can be specified.
The real meaning of a lossless assignment is the following method of using a
constructor expression with EXACT
as the right side of an
assignment:
Other versions:
7.31 | 7.40 | 7.54
Syntax
destination = EXACT #( source ).
In this case, source is converted to the data type of destination and checked accordingly.
Notes
- If the argument of the operator
EXACT
is an arithmetic expression, a lossless calculation is performed instead of a lossless assignment.
- Using the addition
EXACT
in the obsolete statementMOVE
is an obsolete form of lossless assignment.