<?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: convert string to decimal in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-to-decimal/m-p/6156652#M1369481</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: p TYPE string VALUE '773,35999999',
v TYPE p DECIMALS 2.
 REPLACE ALL OCCURRENCES OF ',' IN p WITH '.'.

v = p.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kanagaraja L&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Sep 2009 09:44:12 GMT</pubDate>
    <dc:creator>Kanagaraja_L</dc:creator>
    <dc:date>2009-09-24T09:44:12Z</dc:date>
    <item>
      <title>convert string to decimal</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-to-decimal/m-p/6156648#M1369477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i´ve got a string with value 773,35999999 and wan´t them converted to 773,36. Anybody knows how to this.&lt;/P&gt;&lt;P&gt;In my test I always get problems with the comma ',' if it´s a point the following coding works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: p TYPE string VALUE '773.35999999',
      
v TYPE ZTEST123." ( ZTEST123 is dec15 decimals 2.)

v = p.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any idea´s?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx, in advance,&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 09:22:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-to-decimal/m-p/6156648#M1369477</guid>
      <dc:creator>andy_dingfelder3</dc:creator>
      <dc:date>2009-09-24T09:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: convert string to decimal</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-to-decimal/m-p/6156649#M1369478</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;replace , with . &amp;amp; try&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 09:29:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-to-decimal/m-p/6156649#M1369478</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T09:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: convert string to decimal</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-to-decimal/m-p/6156650#M1369479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yò Andy,&lt;/P&gt;&lt;P&gt;check this out: &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;replace all occurrences of ',' in yourcommanotation with '.' .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In alternative, you could check for some conversion FM, e.g. BAPI_CURRENCY_CONV_TO_EXTERNAL / INTERNAL, or PP_CATT_CONVERT_DECIMAL_POINT. But I guess the first one is the simplest way to obtain your desiderata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 09:30:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-to-decimal/m-p/6156650#M1369479</guid>
      <dc:creator>matteo_montalto</dc:creator>
      <dc:date>2009-09-24T09:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: convert string to decimal</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-to-decimal/m-p/6156651#M1369480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see.. comma is just a display pattern. the actual way how its stored is 100.00 not 100,00. this is a user display setting in SU01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but still if you are getting , in place of . in the input string. replace this by a '.'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: p1 TYPE string VALUE '773,35999999'.
data : p2 type p DECIMALS 2.
REPLACE FIRST OCCURRENCE OF ',' in p1 WITH '.'.
p2 = p1.
WRITE : p2.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 09:37:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-to-decimal/m-p/6156651#M1369480</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T09:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: convert string to decimal</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-to-decimal/m-p/6156652#M1369481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: p TYPE string VALUE '773,35999999',
v TYPE p DECIMALS 2.
 REPLACE ALL OCCURRENCES OF ',' IN p WITH '.'.

v = p.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kanagaraja L&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 09:44:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-to-decimal/m-p/6156652#M1369481</guid>
      <dc:creator>Kanagaraja_L</dc:creator>
      <dc:date>2009-09-24T09:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: convert string to decimal</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-to-decimal/m-p/6156653#M1369482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just go through this link, I hjope it will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Link|&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="88925"&gt;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nidhi Kothiyal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 09:45:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-to-decimal/m-p/6156653#M1369482</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T09:45:26Z</dc:date>
    </item>
  </channel>
</rss>

