SAP EXACT CONSTRUCTOR ENUM



Get Example source ABAP code based on a different SAP table
  



EXACT, Lossless Conversion of Enumerated Types
If the constructor expression CONV is applied to enumerated types, the same rules apply as to the conversion operator CONV :
An enumerated object can be converted to the base type of its enumerated type, as with CONV. ... EXACT base_type( enum_dobj ) ...
A data object that can be converted to the base type of an enumerated type can be converted to the enumerated type, as with CONV. ... EXACT enum_type( dobj ) ...
The conditions of losslessness also apply:
If a data object that can be converted to the base type is converted to the enumerated type, this happens in accordance with the rules of lossless assignment.
If an arithmetic expression is used as the argument of a conversion to the enumerated type, the result must be obtained in accordance with the rules of lossless calculation.

ABAP_EXAMPLE_VX5
If the conversion operator is used, the argument is converted to the base type c with length 4, cutting off any surplus places. If the lossless operator is used, this results in an exception.
ABEXA 01023
If an arithmetic expression is used in the conversion operator, the result is converted to the base type i, cutting off the decimal places. If the lossless operator is used, this results in an exception.
ABEXA 01024
ABAP_EXAMPLE_END