Get Example source ABAP code based on a different SAP table
Source Field Type f ITOC
Numeric Target FieldsTarget>Conversion> i>, int8>, (b>, s>)The value of the binary floating point number is rounded up to an integer. If this number is within the value range> for the data type i>, int8>, (b>, s>), it is converted to the internal representation of the corresponding integer number. Otherwise, the catchable exception CX_SY_CONVERSION_OVERFLOW> is raised. p>The value of the binary floating point number is rounded to the number of decimal places> in the target field. If this number is within the value range for the data type of the target field, it is converted to the internal representation of a packed number. Otherwise, the catchable exception CX_SY_CONVERSION_OVERFLOW> is raised. decfloat16>, decfloat34>The value of the binary floating point number is rounded to 17 places, depending on the platform, and converted to the value of a decimal floating point number. The representation in the decimal floating point number is such that the mantissa has no trailing zeros. f>The content of the source field is passed unconverted.
ABAP_EXAMPLE_VX5 The result of the following conversion has the rounded value 1234.57 >. ABEXA 00931 ABAP_EXAMPLE_END
Character-Like Target FieldsTarget>Conversion> c>The value of the binary floating point number is formatted in the same way as when converting to the data type string>. If the target field is shorter than the complete notation, the mantissa is rounded up. If the target field is not long enough to include at least one digit of the mantissa in addition to the exponent and the minus sign (for a negative value), the target field is padded with *> characters. If the target field is longer than the complete notation, it is padded with blanks on the left. n>The value of the floating point number is rounded up to an integer. The absolute value of this number is passed as a right-aligned string of digits to the target field. If the target field is longer than the string of digits, the field is padded with zeros on the left. If it is too short, it is truncated on the left. string>The value of the binary floating point number is formatted in scientific notation> and transferred to the target field without gaps. The exponent is always displayed with a plus/minus sign and at least two places, and the mantissa with one integer digit and 16 decimal places. To do this, the internal representation of the floating point number is rounded to 17 places (depending on the platform). Depending on the sign and the length of the exponent, the resulting length of the target field is between 22 and 24.
ABAP_EXAMPLE_VX5 The string resulting from the conversion is -1.2345678000000001E-04 >. ABEXA 00932 ABAP_EXAMPLE_END
Byte-Like Target FieldsTarget>Conversion> x>The content of the source field is first converted to data type i> (see above) and then to type x> (see conversion table for source field type i>, int8>, (b>, s>)>). xstring>The content of the source field is first converted to data type i> (see above) and then to type xstring> (see conversion table for source field type i>, int8>, (b>, s>)>).
ABAP_EXAMPLE_VX5 The byte chain resulting from the conversion is 0000007C> and matches the result of the conversion of the rounded number 124>. ABEXA 00933 ABAP_EXAMPLE_END
Date/Time Fields as Target FieldsTarget>Conversion> d>The content of the source field is first converted to data type i> (see above) and then to type d> (see conversion table for source field type i>, int8>, (b>, s>)>). t>The content of the source field is first converted to data type i> (see above) and then to type t> (see conversion table for source field type i>, int8>, (b>, s>)>). utclong>Not supported. Produces a syntax error or raises the exception CX_SY_CONVERSION_NOT_SUPPORTED >>.
ABAP_EXAMPLE_VX5 The value of the time field resulting from the conversion of the result of a calculation with calculation type f> is 181216>. ABEXA 00934 ABAP_EXAMPLE_END