Conversion Rules for Elementary Data Objects
The programming language ABAP includes a set of built-in elementary data types. It also supports automatic type conversions and length adjustments for assignments between all these data types (with the exception of date fields, time fields, and time stamp fields, where many conversions are not applicable).
The conversion tables in the following sections define the rules for converting all possible elementary target fields for
In all conversions, it must be possible to create a value from the type-specific value range from the
content of the source field; otherwise the system raises an exception that is defined in one of the
subclasses of the class CX_SY_CONVERSION_ERROR. Conversion errors can usually be handled using
CATCH. There are some assigning statements whose conversion errors are either handled implicitly or that produce a runtime error directly.
After an exception, the contents of the target field are undefined and should not be used. After an exception, the target field can contain either the previous value or an invalid value (the latter is the case after an overflow of a floating point number, for example).