<?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: Calculation when Fixed point arithmetic not selected in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculation-when-fixed-point-arithmetic-not-selected/m-p/2964984#M699612</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;Could you please give me some helpful hints?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Balaji Viswanath.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Oct 2007 14:11:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-16T14:11:16Z</dc:date>
    <item>
      <title>Calculation when Fixed point arithmetic not selected</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculation-when-fixed-point-arithmetic-not-selected/m-p/2964983#M699611</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 have written a pricing formula routine (RV64A*) since routine resides inside SAPLV61A and Fixed point arithmetic is not selected, pricing formula routine also inherits the properties i.e. fixed point arithmetic is not selected so while doing any calculation I am taking care of decimals and doing the calculation accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;DATA: v_zrus_price                  TYPE p DECIMALS 3,        &lt;/P&gt;&lt;P&gt;           v_zrus_manual_price     TYPE p DECIMALS 3,  &lt;/P&gt;&lt;P&gt;           v_zrus_factor                TYPE p DECIMALS 10,        &lt;/P&gt;&lt;P&gt;           v_kbetr                         TYPE kbetr.               &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_kbetr                         = '2235.60'.&lt;/P&gt;&lt;P&gt;v_zrus_manual_price     = '1209.000'.&lt;/P&gt;&lt;P&gt;v_zrus_price                 = '1106.235'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_zrus_factor = ( ( ( ( v_kbetr / 10 ) - ( v_zrus_manual_price / 100 ) ) * 1000000000000 ) / ( v_zrus_price ) ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write:/ v_zrus_factor.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As expected above calculation written the value &amp;lt;b&amp;gt;0.9280125832&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But same calculation is not working when I assign &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;v_kbetr                 = '199123.24'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_zrus_factor = ( ( ( ( v_kbetr / 10 ) - ( v_zrus_manual_price / 100 ) ) * 1000000000000 ) / ( v_zrus_price ) ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write:/ v_zrus_factor.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It&amp;#146;s returning the value &amp;lt;b&amp;gt;178.9079173955&amp;lt;/b&amp;gt; instead of expected &amp;lt;b&amp;gt;178.9079535542&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please tell me what is the mistake and how to correct it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Balaji Viswanath.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 13:51:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculation-when-fixed-point-arithmetic-not-selected/m-p/2964983#M699611</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T13:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation when Fixed point arithmetic not selected</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculation-when-fixed-point-arithmetic-not-selected/m-p/2964984#M699612</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;Could you please give me some helpful hints?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Balaji Viswanath.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 14:11:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculation-when-fixed-point-arithmetic-not-selected/m-p/2964984#M699612</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T14:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation when Fixed point arithmetic not selected</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculation-when-fixed-point-arithmetic-not-selected/m-p/2964985#M699613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One of your intermediate results is getting too big, truncating some digits at the end. the follwoing formular avoids this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a/10 - b/100 is the the same as (10a-b)/100 and now you can shorten the 100 with the 1000000000000 giving&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;v_zrus_factor = ( ( ( ( 10 * v_kbetr ) - ( v_zrus_manual_price ) ) * 10000000000 ) / ( v_zrus_price ) ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Rainer Hübenthal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 14:52:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculation-when-fixed-point-arithmetic-not-selected/m-p/2964985#M699613</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2007-10-16T14:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation when Fixed point arithmetic not selected</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculation-when-fixed-point-arithmetic-not-selected/m-p/2964986#M699614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;quick work around for this is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create a function module and do all the calculations there. pass the results back to the program. I have done the same in our recent project.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2007 01:41:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculation-when-fixed-point-arithmetic-not-selected/m-p/2964986#M699614</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-17T01:41:40Z</dc:date>
    </item>
  </channel>
</rss>

