2008 May 13 3:41 AM
I can't seem to convert a DEC to a string. This is a field defined in the dictionary by type TZNTSTMPS (DEC 15). I tried the following to do the conversions:
d_string = d_dec.
write d_dec to d_string.
CALL FUNCTION 'HRCM_AMOUNT_TO_STRING_CONVERT'
EXPORTING
betrg = d_dec
* WAERS = ' '
* NEW_DECIMAL_SEPARATOR =
* NEW_THOUSANDS_SEPARATOR =
IMPORTING
STRING = d_string.
They all give me the same result which is an 8 character result with * being the first charcter. Ultimately, what I need is to grab the first 8 characters as that is a date.
Regards,
Aaron
2008 May 13 3:45 AM
Hi,
If this is timestamp then there are FM to convert timestamps to date use them.
Regards,
Atish
2008 May 13 3:45 AM
Hi,
If this is timestamp then there are FM to convert timestamps to date use them.
Regards,
Atish
2008 May 13 3:48 AM
Thanks for the idea. ABI_TIMESTAMP_CONVERT_FROM works.
Sorry, I thought it did. It throws a run-time error telling me:
Error analysis
At the statment
"WRITE src TO dest"
only character-type data objects are supported at the argument position
"dest", but no strings are supported (data types STRING and XSTRING).
In this particular case, the operand "dest" has the
type "g".
It sounds like it doesn't like the DEC data type as an input but that is all I have to work with.
Any ideas?
Aaron
Edited by: Aaron Shover on May 12, 2008 10:54 PM
Sorry, it looks like LXHME_TIMESTAMP_CONVERT_FROM will work for me.
Regards,
Aaron
Edited by: Aaron Shover on May 12, 2008 10:58 PM
2008 May 13 4:00 AM
hi aaron,
try transferring your data into a char variable before executing the FM.
write <decimal_variable> to <character_variable>.
call function ABI_TIMESTAMP_CONVERT_FROM
regards,
Peter