<?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: In reference to Thread Rounding  a float value. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-reference-to-thread-rounding-a-float-value/m-p/3269432#M781479</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;Thanks for your replies. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the float value already. &lt;/P&gt;&lt;P&gt; num1 is type float and num2 is type p decimals 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say Eg num1 = 1.6666666666. when num2 = num1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the value of num2 = 0.167. But the correct value is 1.67.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this clears you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;chaithanya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Jan 2008 16:39:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-09T16:39:44Z</dc:date>
    <item>
      <title>In reference to Thread Rounding  a float value.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-reference-to-thread-rounding-a-float-value/m-p/3269429#M781476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to round a float value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose the value is 1.6666666666666666E-01 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I need the output as 1.67&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hve been using ROUND function module but it gives me 1.6700000000E-01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I use Packed decimal it takes as 0.17&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Chaithanya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my above thread. I have a new issue with the abve Thread&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As Rich suggested I multiplied by 10 and I got the value as 1.67.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if the value is 1.0000000000000000E+00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I multiply by 10. I get the value as 10.000 &lt;STRONG&gt;which is wrong&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions that would solve the issue for all the cases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chaithanya K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 15:37:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-reference-to-thread-rounding-a-float-value/m-p/3269429#M781476</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T15:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: In reference to Thread Rounding  a float value.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-reference-to-thread-rounding-a-float-value/m-p/3269430#M781477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chaitanya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can check with the abap statements CEIL or FLOOR OR try with the function module ROUND_AMOUNT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'HR_IN_ROUND_AMT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;amount = p_amt&lt;/P&gt;&lt;P&gt;rndoff = '100'.&lt;/P&gt;&lt;P&gt;RNDLMT = 'N'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;RETAMT =&lt;/P&gt;&lt;P&gt;DLTAMT =&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps u .....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REWARD IF USEFUL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and regards&lt;/P&gt;&lt;P&gt;suma sailaja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 15:43:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-reference-to-thread-rounding-a-float-value/m-p/3269430#M781477</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T15:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: In reference to Thread Rounding  a float value.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-reference-to-thread-rounding-a-float-value/m-p/3269431#M781478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chaitanya,&lt;/P&gt;&lt;P&gt;                      try using the code like this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: num1 TYPE f, num2 TYPE p DECIMALS 2.&lt;/P&gt;&lt;P&gt;num1 = 73050 * '0.0727'.                    " result: 5.3107349999999997E+03&lt;/P&gt;&lt;P&gt;num2 = num1. WRITE num2.              " result: 5310.73&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Goutham.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 16:17:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-reference-to-thread-rounding-a-float-value/m-p/3269431#M781478</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T16:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: In reference to Thread Rounding  a float value.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-reference-to-thread-rounding-a-float-value/m-p/3269432#M781479</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;Thanks for your replies. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the float value already. &lt;/P&gt;&lt;P&gt; num1 is type float and num2 is type p decimals 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say Eg num1 = 1.6666666666. when num2 = num1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the value of num2 = 0.167. But the correct value is 1.67.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this clears you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;chaithanya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 16:39:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-reference-to-thread-rounding-a-float-value/m-p/3269432#M781479</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T16:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: In reference to Thread Rounding  a float value.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-reference-to-thread-rounding-a-float-value/m-p/3269433#M781480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Chaitanya,&lt;/P&gt;&lt;P&gt;                          it gives you 1.667 as your statement has 'decimals 3'. num2 is not 0.167...it comes to 1.667. try executing this code of yours in se38 once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: num1 TYPE f, num2 TYPE p DECIMALS 3.&lt;/P&gt;&lt;P&gt;num1 = '1.666666'. &lt;/P&gt;&lt;P&gt;num2 = num1.&lt;/P&gt;&lt;P&gt;WRITE num2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward ponts if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Goutham.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 16:50:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-reference-to-thread-rounding-a-float-value/m-p/3269433#M781480</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T16:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: In reference to Thread Rounding  a float value.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-reference-to-thread-rounding-a-float-value/m-p/3269434#M781481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chaitanya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the Function Module &lt;/P&gt;&lt;P&gt; 'MURC_ROUND_FLOAT_TO_PACKED'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpfull.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kashyap Ivaturi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 20:08:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-reference-to-thread-rounding-a-float-value/m-p/3269434#M781481</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T20:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: In reference to Thread Rounding  a float value.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-reference-to-thread-rounding-a-float-value/m-p/3269435#M781482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kashyap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. When I try to execute the function module through SE37. It says Error generating the test frame before I try to give the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After some analysis and time taken&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value I had was 1.6666666666666666E-01 which was raised to power -1 and  Srinivas has already mentioned in my previous thread so the when 0.166666666666 is converted to packed decimal the value would be 0.167. which is correct&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks to all for your replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;chaithanya K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 20:33:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-reference-to-thread-rounding-a-float-value/m-p/3269435#M781482</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T20:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: In reference to Thread Rounding  a float value.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-reference-to-thread-rounding-a-float-value/m-p/3269436#M781483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solved&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 20:34:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-reference-to-thread-rounding-a-float-value/m-p/3269436#M781483</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T20:34:00Z</dc:date>
    </item>
  </channel>
</rss>

