<?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: Using a floating point number in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-a-floating-point-number/m-p/10112508#M1816199</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there are no stupid questions (mostly), just stupid answers.&lt;/P&gt;&lt;P&gt;Floats are not scary, just the scientific representations of values. You probably know the meaning of 1.234 * 10&lt;SUP&gt;5&lt;/SUP&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And yes, you can use &lt;SPAN style="color: #333333; font-size: 12px;"&gt;LV_TOTAL_COST = LV_TOTAL_COST * Floating_point_value&lt;/SPAN&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Feb 2014 19:41:13 GMT</pubDate>
    <dc:creator>UweFetzer_se38</dc:creator>
    <dc:date>2014-02-19T19:41:13Z</dc:date>
    <item>
      <title>Using a floating point number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-a-floating-point-number/m-p/10112500#M1816191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hiya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following table field:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/391835" /&gt;&lt;/P&gt;&lt;P&gt;I'd like to use the contents of it to do some calculations but the value always appears slightly odd.&lt;/P&gt;&lt;P&gt;I mean if I read and write the value to screen I get the following:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/391836" /&gt;&lt;/P&gt;&lt;P&gt;When I would have expected it to show 12.33&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me understand what I might be doing wrong please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 14:01:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-a-floating-point-number/m-p/10112500#M1816191</guid>
      <dc:creator>former_member195355</dc:creator>
      <dc:date>2014-02-19T14:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using a floating point number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-a-floating-point-number/m-p/10112501#M1816192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this post, i guess that it will help you to solve ur problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="922677" __jive_macro_name="thread" class="jive_macro_thread jive_macro" data-orig-content="TYPE CONVERSION FLOAT TO CHAR" href="https://community.sap.com/" modifiedtitle="true" title="TYPE CONVERSION FLOAT TO CHAR"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 14:05:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-a-floating-point-number/m-p/10112501#M1816192</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-02-19T14:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Using a floating point number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-a-floating-point-number/m-p/10112502#M1816193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Miguel1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That was helpful but I'd like to do some calculations with the floating point number and I don't think Char fields are recommended for calculations..&lt;/P&gt;&lt;P&gt;Or do you think I should do this:&lt;/P&gt;&lt;P&gt;-Get the floating point number from the table.&lt;/P&gt;&lt;P&gt;-CALL FUNCTION 'CEVA_CONVERT_FLOAT_TO_CHAR' to convert the number into a character.&lt;/P&gt;&lt;P&gt;-Move the number from the character field into a NUMC field(?) and then do my calculations with that value?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do you reckon?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 14:12:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-a-floating-point-number/m-p/10112502#M1816193</guid>
      <dc:creator>former_member195355</dc:creator>
      <dc:date>2014-02-19T14:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: Using a floating point number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-a-floating-point-number/m-p/10112503#M1816194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;it is easier to move a char to a numc to do calculations. So half way it is done using that FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 14:14:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-a-floating-point-number/m-p/10112503#M1816194</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-02-19T14:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using a floating point number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-a-floating-point-number/m-p/10112504#M1816195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thansk Miguel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the problem with that function module is that it expects you to know how many decimal places you would expect - via the FORMAT_IMP parameter.&lt;/P&gt;&lt;P&gt;For me that number could be variable....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't really know what to do now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 14:23:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-a-floating-point-number/m-p/10112504#M1816195</guid>
      <dc:creator>former_member195355</dc:creator>
      <dc:date>2014-02-19T14:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using a floating point number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-a-floating-point-number/m-p/10112505#M1816196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Yes, as u said, u need to show just 2 decimals...&lt;SPAN style="color: #333333; font-size: 12px;"&gt;12.33&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;so all the numbers will be showed with 2 decimals...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;check the FM in development system and so dome calculation, maybe it will work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;Miguel&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 14:28:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-a-floating-point-number/m-p/10112505#M1816196</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-02-19T14:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using a floating point number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-a-floating-point-number/m-p/10112506#M1816197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why don't you want to use the FLOAT for calculations? If you fear rounding errors just move the value to a DEC field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 14:35:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-a-floating-point-number/m-p/10112506#M1816197</guid>
      <dc:creator>UweFetzer_se38</dc:creator>
      <dc:date>2014-02-19T14:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using a floating point number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-a-floating-point-number/m-p/10112507#M1816198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Uwe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry I'm new to floating point numbers and I'm finding them a little scary. I'm probably asking lots of stupid questions but what you write makes sense.&lt;/P&gt;&lt;P&gt;-Do the calculation with the floating point number.&lt;/P&gt;&lt;P&gt;I'm doing a total for a currency field field with 2 decimal points:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/391958" height="134" width="370" /&gt;&lt;/P&gt;&lt;P&gt;Once I've done my calculation would it be okay (i.e. good practice) to simply move my value into this field?&lt;/P&gt;&lt;P&gt;Or even to use this field directly in the calculation i.e.&lt;/P&gt;&lt;P&gt;LV_TOTAL_COST = LV_TOTAL_COST * Floating_point_value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry if my questions sound stupid but I want to follow vbest practice when coding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 15:23:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-a-floating-point-number/m-p/10112507#M1816198</guid>
      <dc:creator>former_member195355</dc:creator>
      <dc:date>2014-02-19T15:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using a floating point number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-a-floating-point-number/m-p/10112508#M1816199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there are no stupid questions (mostly), just stupid answers.&lt;/P&gt;&lt;P&gt;Floats are not scary, just the scientific representations of values. You probably know the meaning of 1.234 * 10&lt;SUP&gt;5&lt;/SUP&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And yes, you can use &lt;SPAN style="color: #333333; font-size: 12px;"&gt;LV_TOTAL_COST = LV_TOTAL_COST * Floating_point_value&lt;/SPAN&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 19:41:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-a-floating-point-number/m-p/10112508#M1816199</guid>
      <dc:creator>UweFetzer_se38</dc:creator>
      <dc:date>2014-02-19T19:41:13Z</dc:date>
    </item>
  </channel>
</rss>

