<?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 Value getting rounded off in custom Pricing routine code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/value-getting-rounded-off-in-custom-pricing-routine-code/m-p/2769461#M645193</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 a unique problem. The below code worked perfectly correct when i ran it through custom program. The output value was 2.84. But when the same code was copy pasted in custom pricing routine, the output value is getting rounded to 0.03.&lt;/P&gt;&lt;P&gt;I tried changing the types for the data variables from Char type to P -Decimals 2, but the output is still getting rounded off.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The rountine is written in VOFM-FORMULAS-CONDITION VALUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly let me know the problem and the solution for the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and regards&lt;/P&gt;&lt;P&gt;Abishek&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  z_test1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DATA: z_v_unitprice LIKE KOMV-KWERT,&lt;/P&gt;&lt;P&gt;       z_v_kawrt like komv-kawrt,&lt;/P&gt;&lt;P&gt;       z_v_mgame like komp-mgame.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;z_v_mgame = '1092.10' / '384.000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;z_v_kawrt = '1092.10' .&lt;/P&gt;&lt;P&gt;z_v_mgame = '384.000'. &lt;/P&gt;&lt;P&gt;z_v_unitprice = z_v_kawrt / z_v_mgame. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write: z_v_unitprice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Sep 2007 05:23:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-04T05:23:00Z</dc:date>
    <item>
      <title>Value getting rounded off in custom Pricing routine code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/value-getting-rounded-off-in-custom-pricing-routine-code/m-p/2769461#M645193</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 a unique problem. The below code worked perfectly correct when i ran it through custom program. The output value was 2.84. But when the same code was copy pasted in custom pricing routine, the output value is getting rounded to 0.03.&lt;/P&gt;&lt;P&gt;I tried changing the types for the data variables from Char type to P -Decimals 2, but the output is still getting rounded off.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The rountine is written in VOFM-FORMULAS-CONDITION VALUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly let me know the problem and the solution for the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and regards&lt;/P&gt;&lt;P&gt;Abishek&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  z_test1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DATA: z_v_unitprice LIKE KOMV-KWERT,&lt;/P&gt;&lt;P&gt;       z_v_kawrt like komv-kawrt,&lt;/P&gt;&lt;P&gt;       z_v_mgame like komp-mgame.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;z_v_mgame = '1092.10' / '384.000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;z_v_kawrt = '1092.10' .&lt;/P&gt;&lt;P&gt;z_v_mgame = '384.000'. &lt;/P&gt;&lt;P&gt;z_v_unitprice = z_v_kawrt / z_v_mgame. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write: z_v_unitprice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 05:23:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/value-getting-rounded-off-in-custom-pricing-routine-code/m-p/2769461#M645193</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T05:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Value getting rounded off in custom Pricing routine code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/value-getting-rounded-off-in-custom-pricing-routine-code/m-p/2769462#M645194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi can you try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: g_amount type p.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: z_v_unitprice LIKE KOMV-KWERT,&lt;/P&gt;&lt;P&gt;z_v_kawrt like komv-kawrt,&lt;/P&gt;&lt;P&gt;z_v_mgame like komp-mgame.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;z_v_mgame = '1092.10' / '384.000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;z_v_kawrt = '1092.10' .&lt;/P&gt;&lt;P&gt;z_v_mgame = '384.000'.&lt;/P&gt;&lt;P&gt;z_v_unitprice = z_v_kawrt / z_v_mgame.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write: z_v_unitprice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MOVE z_v_unitprice TO G_AMOUNT.&lt;/P&gt;&lt;P&gt;  WRITE G_AMOUNT NO-GROUPING DECIMALS 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;Venkatesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 05:32:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/value-getting-rounded-off-in-custom-pricing-routine-code/m-p/2769462#M645194</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T05:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Value getting rounded off in custom Pricing routine code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/value-getting-rounded-off-in-custom-pricing-routine-code/m-p/2769463#M645195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Venkatesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Thanks for your response. But actaully in report its working fine, but my problem is in pricing routine and in pricing routine i cannot use wRITE statement. The value of z_v_unitprice is what matters to me and that value is getting rounded off.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you have any clue abt this problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;abhishek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 05:59:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/value-getting-rounded-off-in-custom-pricing-routine-code/m-p/2769463#M645195</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T05:59:18Z</dc:date>
    </item>
  </channel>
</rss>

