<?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: Same calculation producing two differing results in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/same-calculation-producing-two-differing-results/m-p/5703230#M1295320</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are the interfaces into the User Exit the same?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Neil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Jun 2009 09:57:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-09T09:57:55Z</dc:date>
    <item>
      <title>Same calculation producing two differing results</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/same-calculation-producing-two-differing-results/m-p/5703226#M1295316</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 have some code in a user exit on save of a delivery (VL02N) that calculates the number of bags/pallets required to furnish that delivery.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am now adding the same code to a user exit on save a sales order (VA02) to calculate the number of bags/pallets again but when run it is producing differing results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the code is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: bag_weight(12) TYPE p DECIMALS 4.
DATA: pallet_weight TYPE marm-umrez.
DATA: bag_denominator TYPE i.

...

bag_weight = pallet_weight / bag_denominator.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming pallet_weight = 1000 and bag_denominator = 40.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On save of a delivery it is calculating bag_weight as 25.0000 (correct): &lt;/P&gt;&lt;P&gt;On save of a sales order it is calculating bag_weight as 0.0025 (incoorect).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All data declaration, code etc is the same. Does anybody have any clue as to why it would give two differing answers, I would not like to have to add a additional multiplication step to correct the result otherwise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 09:53:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/same-calculation-producing-two-differing-results/m-p/5703226#M1295316</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-09T09:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Same calculation producing two differing results</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/same-calculation-producing-two-differing-results/m-p/5703227#M1295317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;why dont u just keep a break point and check??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 09:55:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/same-calculation-producing-two-differing-results/m-p/5703227#M1295317</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-09T09:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Same calculation producing two differing results</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/same-calculation-producing-two-differing-results/m-p/5703228#M1295318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check whether the weight unit field ( GEWEI ) is same or different in sales order and Delivery.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 09:56:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/same-calculation-producing-two-differing-results/m-p/5703228#M1295318</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-09T09:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Same calculation producing two differing results</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/same-calculation-producing-two-differing-results/m-p/5703229#M1295319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The weight unit (e.g. KG, G, etc) are the same?&lt;/P&gt;&lt;P&gt;Seems a conversion problem to me.&lt;/P&gt;&lt;P&gt;If they are not the same, you can use the FM UNIT_CONVERSION_SIMPLE to convert everything into the same unit.&lt;/P&gt;&lt;P&gt;If you need to have something equal to compare, i suggest you to implement this FM anyway.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 09:57:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/same-calculation-producing-two-differing-results/m-p/5703229#M1295319</guid>
      <dc:creator>SimoneMilesi</dc:creator>
      <dc:date>2009-06-09T09:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Same calculation producing two differing results</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/same-calculation-producing-two-differing-results/m-p/5703230#M1295320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are the interfaces into the User Exit the same?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Neil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 09:57:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/same-calculation-producing-two-differing-results/m-p/5703230#M1295320</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-09T09:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: Same calculation producing two differing results</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/same-calculation-producing-two-differing-results/m-p/5703231#M1295321</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;Would you please check whether Fixed Point Arithmetic is checked or not in the program attributes.&lt;/P&gt;&lt;P&gt;Some times if the Unicode and Fixed Point Arithmetic is not checked , creates prolem .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pinaki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 10:18:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/same-calculation-producing-two-differing-results/m-p/5703231#M1295321</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-09T10:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Same calculation producing two differing results</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/same-calculation-producing-two-differing-results/m-p/5703232#M1295322</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;Whenever you are using the Packed numbers, you need to check or set the program attribute fixed point arithmetic only as only this ensure that the decimal point is calculated correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at the help.sap.com documentation link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb2fd9358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb2fd9358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Samantak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 10:35:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/same-calculation-producing-two-differing-results/m-p/5703232#M1295322</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-09T10:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: Same calculation producing two differing results</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/same-calculation-producing-two-differing-results/m-p/5703233#M1295323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please check whether the FIXED POINT ARITHMETIC attributes is set for your program in the program attributes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 10:42:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/same-calculation-producing-two-differing-results/m-p/5703233#M1295323</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-09T10:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: Same calculation producing two differing results</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/same-calculation-producing-two-differing-results/m-p/5703234#M1295324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check the units of the pallet weight while creating the sales order.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 11:19:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/same-calculation-producing-two-differing-results/m-p/5703234#M1295324</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-09T11:19:42Z</dc:date>
    </item>
  </channel>
</rss>

