<?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: MARM Conversion Result Drops Decimal? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/marm-conversion-result-drops-decimal/m-p/8287801#M1634467</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like Fixed point Arithmetic is not set in the Program Attributes. If you code is in the User Exit, most probably the std SAP program would have it switched off. You should create a FM to do the calculation and bring the values back to the user exit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Oct 2011 17:05:01 GMT</pubDate>
    <dc:creator>naimesh_patel</dc:creator>
    <dc:date>2011-10-27T17:05:01Z</dc:date>
    <item>
      <title>MARM Conversion Result Drops Decimal?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/marm-conversion-result-drops-decimal/m-p/8287800#M1634466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A new Material conversion was created in MM02 for a Karton....'KAR'. The conversion is KG to KAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The original ABAP logic was zresult = 102 / 5. This should equal 20.4:  &lt;/P&gt;&lt;P&gt;The code used &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;marm-umrez = marm-umrez / marm-umren&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; the result is 20, missing decimal value.&lt;/P&gt;&lt;P&gt;I understand that umrez and umren are not decimals so a decimal cannot be assigned to the result so I tried this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: znew_value(5) type p DECIMALS 3. 
DATA: umrez_new(5) type p DECIMALS 2.
DATA: umren_new(5) type p DECIMALS 2.

umrez_new = marm-umrez .
umren_new = marm-umren.
znew_value = umrez_new / umren_new.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still get 20 instead of 20.4?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have played with the syntax unpack, write to, assign to, and move to, but my syntax cold have been off. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone suggest how I can use, or define a new field, or fields to pass them into so that I will get the decimal value after the calculation? Or, possible syntax for calculating the result using the original fields that will have the decimal value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Thank-You&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2011 16:59:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/marm-conversion-result-drops-decimal/m-p/8287800#M1634466</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-27T16:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: MARM Conversion Result Drops Decimal?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/marm-conversion-result-drops-decimal/m-p/8287801#M1634467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like Fixed point Arithmetic is not set in the Program Attributes. If you code is in the User Exit, most probably the std SAP program would have it switched off. You should create a FM to do the calculation and bring the values back to the user exit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2011 17:05:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/marm-conversion-result-drops-decimal/m-p/8287801#M1634467</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2011-10-27T17:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: MARM Conversion Result Drops Decimal?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/marm-conversion-result-drops-decimal/m-p/8287802#M1634468</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;From ur code, I written the below code.&lt;/P&gt;&lt;P&gt;DATA: znew_value(5) type p DECIMALS 3.&lt;/P&gt;&lt;P&gt;DATA: umrez_new(5) type p DECIMALS 2.&lt;/P&gt;&lt;P&gt;DATA: umren_new(5) type p DECIMALS 2.&lt;/P&gt;&lt;P&gt;DATA: marm TYPE marm.&lt;/P&gt;&lt;P&gt;marm-umrez = 102.&lt;/P&gt;&lt;P&gt;marm-umren = 5.&lt;/P&gt;&lt;P&gt;umrez_new = marm-umrez .&lt;/P&gt;&lt;P&gt;umren_new = marm-umren.&lt;/P&gt;&lt;P&gt;znew_value = umrez_new / umren_new.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BREAK-POINT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its giving the perfect result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you try this one in a test program. If this one is working in SE38 program then its a arithmetic problem of any routine. &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;&lt;P&gt;To overcome this one you have to write one small FM and build the logic there. Its a magic &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Subhankar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Subhankar Garani on Oct 27, 2011 7:11 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2011 17:10:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/marm-conversion-result-drops-decimal/m-p/8287802#M1634468</guid>
      <dc:creator>Subhankar</dc:creator>
      <dc:date>2011-10-27T17:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: MARM Conversion Result Drops Decimal?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/marm-conversion-result-drops-decimal/m-p/8287803#M1634469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This issue drove me nuts once before. In your program look at the attributes. Make sure the checkbox is checked for Fixed point arithmetic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brenda&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2011 17:29:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/marm-conversion-result-drops-decimal/m-p/8287803#M1634469</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-27T17:29:57Z</dc:date>
    </item>
  </channel>
</rss>

