<?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: Formatting floating point numbers into a string in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-floating-point-numbers-into-a-string/m-p/6054343#M1352885</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thx Shiva,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but this dosn't solve my problem. I 'simply' want to apply a format like described above to the number and thus get the number in the desired format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg.&lt;/P&gt;&lt;P&gt;I have a float number 1234.34 which is stored in the float field like 1.23456E+3. I have a format telling me to show only the integer part of this number (like 1234). My idea is to apply a format '###9' to that number and it will give back a string containing '1234'. Likewise with the other format expressed in my original question. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this makes my question a bit more understandable. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Aug 2009 14:54:10 GMT</pubDate>
    <dc:creator>martin_dietiker</dc:creator>
    <dc:date>2009-08-24T14:54:10Z</dc:date>
    <item>
      <title>Formatting floating point numbers into a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-floating-point-numbers-into-a-string/m-p/6054341#M1352883</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;I am relatively new in ABAP and I am searching for a FM or function to convert a given floating point number into a string using a given format (like using the [DecimalFormatter|http://java.sun.com/javase/6/docs/api/java/text/DecimalFormat.html] class in Java).&lt;/P&gt;&lt;P&gt;eg.&lt;/P&gt;&lt;P&gt;Number: 1234.56 &lt;/P&gt;&lt;P&gt;Format: #,##0.00&lt;/P&gt;&lt;P&gt;Result 1,234.45&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Number: 1234&lt;/P&gt;&lt;P&gt;Format #,##0.00&lt;/P&gt;&lt;P&gt;Result: 1,234.00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Number 0.34&lt;/P&gt;&lt;P&gt;Format: #,###.##&lt;/P&gt;&lt;P&gt;Result: .34&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Number: 0.34&lt;/P&gt;&lt;P&gt;Format: #,##0.00&lt;/P&gt;&lt;P&gt;Result. 0.34&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Number: 0.56&lt;/P&gt;&lt;P&gt;Format: 0.0&lt;/P&gt;&lt;P&gt;Result: 0.6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Number: 1234.56&lt;/P&gt;&lt;P&gt;Format: abc#,###&lt;/P&gt;&lt;P&gt;Result: abc1,235&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and so on&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already tried the 'using mask' expression in the write command and also the FM 'C14N_NUMERIC_FORMAT' but without my desired results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2009 13:46:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-floating-point-numbers-into-a-string/m-p/6054341#M1352883</guid>
      <dc:creator>martin_dietiker</dc:creator>
      <dc:date>2009-08-24T13:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting floating point numbers into a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-floating-point-numbers-into-a-string/m-p/6054342#M1352884</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;You can use WRITE....TO statement to convert. which converts the contents of the source field into a field with type C&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE &amp;lt;f1&amp;gt; TO &amp;lt;f2&amp;gt; &amp;lt;Options&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: NUMBER TYPE F VALUE '4.3',&lt;/P&gt;&lt;P&gt;TEXT(10),&lt;/P&gt;&lt;P&gt;FLOAT TYPE F,&lt;/P&gt;&lt;P&gt;PACK TYPE P DECIMALS 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE NUMBER TO TEXT EXPONENT 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE NUMBER TO FLOAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE NUMBER TO PACK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Shiva Kumar Tirumalasetty on Aug 24, 2009 8:03 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2009 14:32:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-floating-point-numbers-into-a-string/m-p/6054342#M1352884</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-24T14:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting floating point numbers into a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-floating-point-numbers-into-a-string/m-p/6054343#M1352885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thx Shiva,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but this dosn't solve my problem. I 'simply' want to apply a format like described above to the number and thus get the number in the desired format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg.&lt;/P&gt;&lt;P&gt;I have a float number 1234.34 which is stored in the float field like 1.23456E+3. I have a format telling me to show only the integer part of this number (like 1234). My idea is to apply a format '###9' to that number and it will give back a string containing '1234'. Likewise with the other format expressed in my original question. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this makes my question a bit more understandable. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2009 14:54:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-floating-point-numbers-into-a-string/m-p/6054343#M1352885</guid>
      <dc:creator>martin_dietiker</dc:creator>
      <dc:date>2009-08-24T14:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting floating point numbers into a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-floating-point-numbers-into-a-string/m-p/6054344#M1352886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've never seen that. In SAP, we don't bother with formats, we usually have requirements which require only one format. I'm afraid that you have to code it yourself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2009 19:56:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-floating-point-numbers-into-a-string/m-p/6054344#M1352886</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2009-08-24T19:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting floating point numbers into a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-floating-point-numbers-into-a-string/m-p/6054345#M1352887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use 'FLTP_CHAR_CONVERSION' in this you can mention the number of decimal place you want to have...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2009 20:04:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-floating-point-numbers-into-a-string/m-p/6054345#M1352887</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-08-24T20:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting floating point numbers into a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-floating-point-numbers-into-a-string/m-p/6054346#M1352888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nowadays, you format numeric data into strings with embedded expressions in string templates and their formatting options:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/abapdocu_750/en/index.htm?file=abapcompute_string_format_options.htm"&gt;Embedded expressions - format options&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE TO is the old fashioned way ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2016 12:39:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-floating-point-numbers-into-a-string/m-p/6054346#M1352888</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2016-08-17T12:39:48Z</dc:date>
    </item>
  </channel>
</rss>

