Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Processing Internal Data →  Assignments →  Assignment and Conversion Rules 

Conversion Rules for Elementary Data Objects

The programming language ABAP includes a set of predefined elementary data types. It supports automatic type conversions and length adjustments for assignments between all these data types (with the exception of date fields and time 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.

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).

Other versions: 7.31 | 7.40 | 7.54

Programming Guideline

Avoid unexpected conversion results

Continue

Numeric Source Fields

Character-Like Source Fields

Byte-Like Source Fields