ARTICLE
Source Field Type t
The conversion rules are designed in such a way that when data objects
of type t are assigned to character-like data objects they behave
as character-like data objects. When assigned to numeric data objects,
they behave as numeric data objects. The latter serves as the basis for
calculating time in arithmetic expressions. If the content of data
objects of type t are time entries 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 permit the assignment of time
fields that contain invalid data, this is not recommended.
Numeric Target Fields
Target Conversion
i ,
int8 ,
( b , s )If the source field contains only digits, the
content is interpreted as a time entry in the format "hhmmss"
from which the value hh*3600+mm*60+ss is calculated, which is then
converted into the internal representation of the relevant integer
number. 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, a treatable exception CX_SY_CONVERSION_OVERFLOW is
raised.
p If the source field contains only digits, the content is
interpreted as a time entry in the format "hhmmss" from which the
value hh*3600+mm*60+ss is calculated, which is then converted into the
internal representation of a packed number. If the value range of the
target field is too small, a handleable exception
CX_SY_CONVERSION_OVERFLOW is raised. If the source does not contain
only digits, the target field is given the value 0.
decfloat16 , decfloat34 If the source field contains
only digits, the content is interpreted as a time entry in the format
"hhmmss" from which the value hh*3600+mm*60+ss is calculated,
which is then converted into the internal representation of a decimal
floating point number with scaling of 0. If the
source 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 entry in the format "hhmmss" from which the
value hh*3600+mm*60+ss is calculated, which is then converted into the
internal representation of a binary floating point number. If the
source does not contain only digits, the target field is given the value
0.
Character-Like Target Fields
Target Conversion
c Content is handled in the same way as a
source field of type c
string 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
passed. If the target field is longer than the source field, it is
padded to the right with the character "0". If the target field is
shorter, it is truncated on the right.
d Not supported. Produces a syntax error or runtime error.
t The content of the source field is passed unconverted.
Byte-Like Target Fields
Target Conversion
x The content of the source field is first converted to the
data type i (see above), and then to the type x (see the
conversion table for source field type
i ,
int8 ,
( b , s ) ).
xstring The content of the source field is first converted to
the data type i (see above), and then to the type x (see
the conversion table for source field type
i ,
int8 ,
( b , s ) ).
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved