Get Example source ABAP code based on a different SAP table
Source Field Type <(>t<)> The conversion rules are designed in such a way that, when data objects of time type t>> are assigned to character-like data objects, they behave like character-like objects and numerically in assignments to numeric data objects. The latter is the basis for calculating time in arithmetic expressions. If the content of data objects of type t> is time specifications in the format hhmmss>, and the values only correspond to valid times of day ( hh> is between 00 and 23, mm > and ss> are between 00 and 59), the value assigned to a numeric data object corresponds to the number of seconds since midnight. Although the conversion rules actually allow the assignment of time fields that contain invalid data, this is not recommended. ITOC
Numeric Target FieldsTarget>Conversion> i>, int8>, (b>, s>)If the source field contains only digits, the content is interpreted as a time specification in the format hhmmss> from which the value hh*3600+mm*60+ss > is calculated and then converted to the internal representation of the corresponding integer. If the source field does not only contain digits, the target field is given the value 0. If the value range> of the internal data types b> and s> is not sufficient, the catchable exception CX_SY_CONVERSION_OVERFLOW> is raised. p>If the source field contains only digits, the content is interpreted as a time specification in the format hhmmss> from which the value hh*3600+mm*60+ss> is calculated and then converted to the internal representation of a packed number. If the value range of the target field is too small, the catchable exception CX_SY_CONVERSION_OVERFLOW> is raised. If the source field does not contain only digits, the target field receives the value 0. decfloat16>, decfloat34>If the source field contains only digits, the content is interpreted as a time specification in the format hhmmss> from which the value hh*3600+mm*60+ss > is calculated and then converted to the internal representation of a decimal floating point number with scaling> of 0. If the source field does not contain only digits, the target field is given the value 0. f>If the source field contains only digits, the content is interpreted as a time specification in the format hhmmss> from which the value hh*3600+mm*60+ss> is calculated and then converted to the internal representation of a binary floating point number. If the source field does not contain only digits, the target field is given the value 0.
ABAP_EXAMPLE_VX5 The result of the following conversion has the value 66656>. This is the number of seconds of the specified time since midnight. ABEXA 00952 ABAP_EXAMPLE_END
Character-Like Target FieldsTarget>Conversion> c>The content is handled in the same way as a source field of type c>> n>The characters in the source field are inserted in the target field, left-aligned. Trailing blanks in the source field are transferred. If the target field is longer than the source field, it is padded on the right with the character 0>. If the target field is shorter, it is truncated on the right. string>The content is handled in the same way as a source field of type c>>
ABAP_EXAMPLE_VX5 The string resulting from the conversion is 18>. Four characters 3056> are cut off on the right. ABEXA 00953 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 010460>. This is the integer 66655 or the number of seconds since midnight. ABEXA 00954 ABAP_EXAMPLE_END
Date/Time Fields as Target Fields#Target>Conversion> d>Not supported. Produces a syntax error or runtime error. t>The content of the source field is transferred unconverted. utclong>Not supported. Produces a syntax error or raises the exception CX_SY_CONVERSION_NOT_SUPPORTED>>.
ABAP_EXAMPLE_VX5 The conversion of t> to d>, which is not known statically, is not supported and produces the runtime error MOVE_NOT_SUPPORTED >. ABEXA 00955 ABAP_EXAMPLE_END