ABAP Keyword Documentation → ABAP − Reference → Processing Internal Data → Assignments → Assignment and Conversion Rules → Conversion Rules for Elementary Data Objects → Date fields, time fields, and time stamp fields as source fields
Source Field Type utclong
Other versions:Numeric Target Fields
Target | conversion |
---|---|
i , int8 , (b , s ) |
Not supported. Produces a syntax error or raises the exception CX_SY_CONVERSION_NOT_SUPPORTED. |
p |
Not supported. Produces a syntax error or raises the exception CX_SY_CONVERSION_NOT_SUPPORTED. |
decfloat16 , decfloat34 |
Not supported. Produces a syntax error or raises the exception CX_SY_CONVERSION_NOT_SUPPORTED. |
f |
Not supported. Produces a syntax error or raises the exception CX_SY_CONVERSION_NOT_SUPPORTED. |
Note
The methods UTCLONG2TSTMP and UTCLONG2TSTMP_SHORT of class
CL_ABAP_TSTMP convert
time stamp fields of the type utclong
to
time stamps in packed numbers.
Character-Like Target Fields
Target | conversion |
---|---|
c |
The internal representation of the time stamp is converted to a character string that representsthe time stamp in the notation "yyyy-mm-dd hh:mm:ss.fffffff". Between the date and time specification there is a space and a period(.) is used as a decimal separator. If the target field is shorter than27, the character string is truncated from the right. If the target field is longer than 27, the fieldis padded with spaces on the right. If the source field is initial, the target field is filled withspaces. If the source field contains an invalid value, an exception of the class CX_SY_CONVERSION_NO_DATE_TIME is raised. |
n |
Not supported. Produces a syntax error or raises the exception CX_SY_CONVERSION_NOT_SUPPORTED. |
string |
As for a target field of type c . The resulting length of the target field is 27. If the source field is initial, the target field is a blank string. |
Note
The formatting of a time stamp of type utclong
during the conversion follows
the SQL standard according to ISO 9075 and corresponds to the formatting option
TIMESTAMP
with the value SPACE
for embedded expressions in string templates.
Example
The example compares the formatting of the conversion with the corresponding formatting in a string template.
DATA(ts) = utclong_current( ).
ASSERT CONV string( ts ) =
|{ ts TIMESTAMP = SPACE }|.
Byte-Like Target Fields
Target | conversion |
---|---|
x |
Not supported. Produces a syntax error or raises the exception CX_SY_CONVERSION_NOT_SUPPORTED. |
xstring |
Not supported. Produces a syntax error or raises the exception CX_SY_CONVERSION_NOT_SUPPORTED. |
Date/Time Fields as Target Fields
Target | conversion |
---|---|
d |
Not supported. Produces a syntax error or raises the exception CX_SY_CONVERSION_NOT_SUPPORTED. |
t |
Not supported. Produces a syntax error or raises the exception CX_SY_CONVERSION_NOT_SUPPORTED. |
utclong |
The content of the source field is passed unconverted. |