Get Example source ABAP code based on a different SAP table
Source Field Type x ITOC
Numeric Target FieldsTarget>Conversion> i>, (b>, s>)Only the last 4 bytes of the source field are converted. If the source field is shorter than 4 bytes, it is extended on the left with the hexadecimal 0 until it is 4 bytes long. The content of these bytes is interpreted as a number stored in big endian order, of type i>. The hexadecimal values from 00000000 > to 7FFFFFFF> are assigned to numbers from +0 to +2147483647 and the hexadecimal values from 80000000> to FFFFFFFF> are assigned to the numbers -2147483648 to -1. The number obtained in this way is converted to the internal representation of the corresponding integer. If the value range> of data types b> or s> is not sufficient, the catchable exception CX_SY_CONVERSION_OVERFLOW> is raised. int8>Only the last 8 bytes of the source field are converted. If the source field is shorter than 8 bytes, it is extended on the left with the hexadecimal 0 until it is 8 bytes long. The content of these bytes is interpreted as a number stored in big endian order, of type int8>. The hexadecimal values from 0000000000000000> to 7FFFFFFFFFFFFFFF> are assigned to numbers from +0 to +9223372036854775807 and the hexadecimal values from 8000000000000000> to FFFFFFFFFFFFFFFF> are assigned to the numbers --9223372036854775808 to -1. The number obtained in this way is converted in the internal representation of the corresponding integer. p>The content of the source field is first converted to data type i> (see above) and then to type p> (see conversion table for source field type i>, int8>, (b>, s>)>). decfloat16>, decfloat34>The content of the source field is first converted into data type i> (see above) and then into type decfloat16> or decfloat34> (see conversion table for source field type i>, int8>, (b>, s>)>). f>The content of the source field is first converted to data type i> (see above) and then to type f> (see conversion table for source field type i>, int8>, (b>, s>)>).
ABAP_EXAMPLE_VX5 The result of the following conversion has the value 10000>. ABEXA 00957 ABAP_EXAMPLE_END
Character-Like Target FieldsTarget>Conversion> c>The values of each half-byte in the source field are converted to the hexadecimal characters 0> to 9> and A > to F> and passed left-aligned to the target field. If the target field is longer than the number of characters passed, it is padded on the right with blank characters. If it is too short, it is truncated on the right. n>The content of the source field is first converted to data type i> (see above) and then to type n> (see conversion table for source field type i>, int8>, (b>, s>)>). string>The values of each half-byte in the source field are converted to the hexadecimal characters 0> to 9> and A > to F> and passed to the target field. The resulting length of the target field is determined by the number of characters passed.
ABAP_EXAMPLE_VX5 The string resulting from the conversion is 27>. Two characters 10> are cut off on the right. ABEXA 00958 ABAP_EXAMPLE_END
Byte-Like Target FieldsTarget>Conversion> x>The bytes in the source field are passed left-aligned to the target field. If the target field is longer than the number of bytes passed, it is padded with hexadecimal 0 on the right. If the target field is shorter, it is truncated on the right. xstring>The bytes in the source field are placed in the target field. The resulting length of the target field is determined by the number of bytes passed.
ABAP_EXAMPLE_VX5 The byte chain resulting from the conversion is 27100000>. ABEXA 00959 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 is 024640 > (or 10000 seconds after midnight). ABEXA 00960 ABAP_EXAMPLE_END