Ansicht
Dokumentation
ABENEXACT_CONSTRUCTOR_ENUM - EXACT CONSTRUCTOR ENUM
Addresses (Business Address Services) ABAP Short ReferenceThis documentation is copyright by SAP AG.
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.
Example
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.
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.
TXBHW - Original Tax Base Amount in Local Currency TXBHW - Original Tax Base Amount in Local Currency
This documentation is copyright by SAP AG.
Length: 2634 Date: 20240425 Time: 065556 sap01-206 ( 31 ms )