<?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: Problem with Decimal Places in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-decimal-places/m-p/954443#M65950</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;Did u debug and check what value each fields are taking&lt;/P&gt;&lt;P&gt;wa_subtotl-J_3AFKIMG * grade_A_price.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check it in debugging mode so that u will get an idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It has to come as 33.00 as u have defined as type p 2 decimals.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Aug 2005 08:27:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-08-01T08:27:12Z</dc:date>
    <item>
      <title>Problem with Decimal Places</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-decimal-places/m-p/954442#M65949</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;When I debug the code the following is what I get;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;subtotal_price = wa_subtotl-J_3AFKIMG * grade_A_price.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_subtotl-J_3AFKIMG -&amp;gt; 15.000 (TYPE p DECIMALS 3 / This field is for Quantity and 3 decimal places is a must) &lt;/P&gt;&lt;P&gt;grade_A_price -&amp;gt; 2.20 (TYPE p DECIMALS 2 / This is Price)&lt;/P&gt;&lt;P&gt;subtotal_price -&amp;gt; 33000.00 (TYPE p DECIMALS 2 / Multiplication of Qty and Price)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why the "subtotal_price" appear as "33000.00" when it should be "33", how ro solve this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kishan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2005 08:18:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-decimal-places/m-p/954442#M65949</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-01T08:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Decimal Places</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-decimal-places/m-p/954443#M65950</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;Did u debug and check what value each fields are taking&lt;/P&gt;&lt;P&gt;wa_subtotl-J_3AFKIMG * grade_A_price.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check it in debugging mode so that u will get an idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It has to come as 33.00 as u have defined as type p 2 decimals.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2005 08:27:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-decimal-places/m-p/954443#M65950</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-01T08:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Decimal Places</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-decimal-places/m-p/954444#M65951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kishan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls set field "fixed point arithmetic" (=x)&lt;/P&gt;&lt;P&gt;in attributes of your prg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Andreas Mann&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2005 08:31:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-decimal-places/m-p/954444#M65951</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2005-08-01T08:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Decimal Places</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-decimal-places/m-p/954445#M65952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Judith,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Values that I have shown are from the dubugger. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kishan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2005 08:34:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-decimal-places/m-p/954445#M65952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-01T08:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Decimal Places</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-decimal-places/m-p/954446#M65953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kishan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible for you to paste us a bit more of your code? I made a small test with your values and it works fine (result is 33,00):&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  Z_TEST.

data: subtotal_price type p decimals 2,
      grade_A_price  type p decimals 2,
      wa_subtotl     type p decimals 3.

grade_A_price = '15.000'.
wa_subtotl = '2.20'.

subtotal_price = wa_subtotl * grade_A_price.

write: / subtotal_price.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ville&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2005 08:44:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-decimal-places/m-p/954446#M65953</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-01T08:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Decimal Places</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-decimal-places/m-p/954447#M65954</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;Look at the following Pgm.It works fine for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  YTEST_VEN1.
 data: x type p decimals 3,
       y type p decimals 2,
       z type p decimals 2.

x = '15.000'.
y = '2.20'.

z = x * y.

write:/ z.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regs,&lt;/P&gt;&lt;P&gt;Venkat Ramanan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2005 08:46:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-decimal-places/m-p/954447#M65954</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-01T08:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Decimal Places</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-decimal-places/m-p/954448#M65955</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;Try this example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES: myamount   TYPE p DECIMALS 2,
       amt1       TYPE p decimals 3,
       amt2       TYPE p decimals 3.

DATA: amount      TYPE myamount,
      damt1     TYPE amt1,
      damt2  type amt2.

damt1 = '15.000'.
damt2 = '2.20'.


amount = damt1 * damt2.
WRITE:  amount.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output is 33.00&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2005 08:50:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-decimal-places/m-p/954448#M65955</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-01T08:50:35Z</dc:date>
    </item>
  </channel>
</rss>

