<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: DEC to STRING conversion in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dec-to-string-conversion/m-p/3798231#M913472</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is timestamp then there are FM to convert timestamps to date use them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 May 2008 02:45:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-13T02:45:03Z</dc:date>
    <item>
      <title>DEC to STRING conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dec-to-string-conversion/m-p/3798230#M913471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;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.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aaron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2008 02:41:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dec-to-string-conversion/m-p/3798230#M913471</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-13T02:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: DEC to STRING conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dec-to-string-conversion/m-p/3798231#M913472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is timestamp then there are FM to convert timestamps to date use them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2008 02:45:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dec-to-string-conversion/m-p/3798231#M913472</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-13T02:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: DEC to STRING conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dec-to-string-conversion/m-p/3798232#M913473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the idea.  ABI_TIMESTAMP_CONVERT_FROM works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, I thought it did.  It throws a run-time error telling me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error analysis&lt;/P&gt;&lt;P&gt;    At the statment&lt;/P&gt;&lt;P&gt;         "WRITE src TO dest"&lt;/P&gt;&lt;P&gt;    only character-type data objects are supported at the argument position&lt;/P&gt;&lt;P&gt;    "dest", but no strings are supported (data types STRING and XSTRING).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    In this particular case, the operand "dest" has the&lt;/P&gt;&lt;P&gt;    type "g".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It sounds like it doesn't like the DEC data type as an input but that is all I have to work with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aaron&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Aaron Shover on May 12, 2008 10:54 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, it looks like LXHME_TIMESTAMP_CONVERT_FROM will work for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aaron&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Aaron Shover on May 12, 2008 10:58 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2008 02:48:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dec-to-string-conversion/m-p/3798232#M913473</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-13T02:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: DEC to STRING conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dec-to-string-conversion/m-p/3798233#M913474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi aaron,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try transferring your data into a char variable before executing the FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write &amp;lt;decimal_variable&amp;gt; to &amp;lt;character_variable&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function ABI_TIMESTAMP_CONVERT_FROM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2008 03:00:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dec-to-string-conversion/m-p/3798233#M913474</guid>
      <dc:creator>peter_ruiz2</dc:creator>
      <dc:date>2008-05-13T03:00:29Z</dc:date>
    </item>
  </channel>
</rss>

