<?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 Decimal Calculation Problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-calculation-problem/m-p/11163187#M1907694</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 am a newbie of ABAP programming. I have create a new routine for condition value by VOFM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;FORM &lt;/SPAN&gt;FRM_KONDI_WERT_908&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S31"&gt;*{&amp;nbsp;&amp;nbsp; INSERT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;DATA&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;p_value&lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;7&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;)&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;p &lt;SPAN class="L0S52"&gt;DECIMALS &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;4.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; p_value &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;komp&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;brtwr * konp&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;kbetr / &lt;SPAN class="L0S32"&gt;10000&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; xkomv&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;kbetr &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;konp&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;kbetr / &lt;SPAN class="L0S32"&gt;10&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; xkwert &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;p_value&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S31"&gt;*}&amp;nbsp;&amp;nbsp; INSERT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;ENDFORM&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;It is very strange that if p_value = 1.2340, &lt;SPAN style="font-size: 13.3333330154419px;"&gt;xkwert will equal to 123.40 but not 1.23. It seems like the number format is right-justified.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;Please kindly help on this issue....I have hold on this for a few days...Thanks~~!!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Jun 2015 09:59:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2015-06-30T09:59:28Z</dc:date>
    <item>
      <title>Decimal Calculation Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-calculation-problem/m-p/11163187#M1907694</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 am a newbie of ABAP programming. I have create a new routine for condition value by VOFM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;FORM &lt;/SPAN&gt;FRM_KONDI_WERT_908&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S31"&gt;*{&amp;nbsp;&amp;nbsp; INSERT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;DATA&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;p_value&lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;7&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;)&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;p &lt;SPAN class="L0S52"&gt;DECIMALS &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;4.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; p_value &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;komp&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;brtwr * konp&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;kbetr / &lt;SPAN class="L0S32"&gt;10000&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; xkomv&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;kbetr &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;konp&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;kbetr / &lt;SPAN class="L0S32"&gt;10&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; xkwert &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;p_value&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S31"&gt;*}&amp;nbsp;&amp;nbsp; INSERT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;ENDFORM&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;It is very strange that if p_value = 1.2340, &lt;SPAN style="font-size: 13.3333330154419px;"&gt;xkwert will equal to 123.40 but not 1.23. It seems like the number format is right-justified.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;Please kindly help on this issue....I have hold on this for a few days...Thanks~~!!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jun 2015 09:59:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-calculation-problem/m-p/11163187#M1907694</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-06-30T09:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal Calculation Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-calculation-problem/m-p/11163188#M1907695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello Chan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what kind of data type you have declared for variable xkwert ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jun 2015 10:06:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-calculation-problem/m-p/11163188#M1907695</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-06-30T10:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal Calculation Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-calculation-problem/m-p/11163189#M1907696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sujatha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;xkwert is type kwert (P(7) DECIMALS 2), thanks~~&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jun 2015 10:13:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-calculation-problem/m-p/11163189#M1907696</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-06-30T10:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal Calculation Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-calculation-problem/m-p/11163190#M1907697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what value you are getting at the run time in xkwert ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as per the data declaration by you , the result of xkwert shouldbe 1.23 itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sujatha Arsid.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jun 2015 10:48:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-calculation-problem/m-p/11163190#M1907697</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-06-30T10:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal Calculation Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-calculation-problem/m-p/11163191#M1907698</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;Change declaration &lt;STRONG&gt;&lt;SPAN style="color: #333333; font-size: 11.818181991577148px;"&gt;p_value&lt;/SPAN&gt; &lt;/STRONG&gt;and check&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 11.818181991577148px;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 11.818181991577148px; color: #333333;"&gt;DATA&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-size: 11.818181991577148px; color: #333333;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-size: 11.818181991577148px;"&gt;p_value&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-size: 11.818181991577148px; color: #333333;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="L0S32" style="font-size: 11.818181991577148px; color: #333333;"&gt;7&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-size: 11.818181991577148px; color: #333333;"&gt;)&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 11.818181991577148px; color: #333333;"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-size: 11.818181991577148px;"&gt;p &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 11.818181991577148px; color: #333333;"&gt;DECIMALS 2&lt;/SPAN&gt;&lt;SPAN class="L0S32" style="font-size: 11.818181991577148px; color: #333333;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S32" style="font-size: 11.818181991577148px; color: #333333;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S32" style="font-size: 11.818181991577148px; color: #333333;"&gt;Thanks and Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S32" style="font-size: 11.818181991577148px; color: #333333;"&gt;Chandra&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jun 2015 13:27:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-calculation-problem/m-p/11163191#M1907698</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-06-30T13:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal Calculation Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-calculation-problem/m-p/11163192#M1907699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is because "Fixed point arithmetic" checkbox is not checked for the main program SAPLV61A.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this reason, it is always better to declare your own function group, and function module inside it, with the required calculation and just call the function module from the routine. Don't do calculations directly inside the routine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Juwin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jun 2015 13:41:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-calculation-problem/m-p/11163192#M1907699</guid>
      <dc:creator>Juwin</dc:creator>
      <dc:date>2015-06-30T13:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal Calculation Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-calculation-problem/m-p/11163193#M1907700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ka Wai Chan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I second Juwin.. He is right. &lt;SPAN style="color: #333333; font-size: 12px;"&gt;SAPLV61A does not hv Fixed Point Arithmetic checked. Create a FM with Fixed Point Arithmetic checked (Attribute menu)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take a look of a example of FM with Fixed Point Arithmetic checked and unchecked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Both Program and FM with Fixed Point Arithmetic UNCHECKED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expect output is 1.235, but 12.35 is wrongly displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/736640" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;2. Program with Fixed Point Arithmetic UNCHECKED and FM with Fixed Point Arithmetic CHECKED (exact your scenario). Output is 1.24&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/736641" width="450" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;More explanation at: &lt;A href="http://www.sapyard.com/do-all-abapers-know-fixed-point-arithmetic/" title="http://www.sapyard.com/do-all-abapers-know-fixed-point-arithmetic/"&gt;Do all ABAPers know Fixed Point Arithmetic? | SAP Yard&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jun 2015 15:02:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-calculation-problem/m-p/11163193#M1907700</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-06-30T15:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal Calculation Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-calculation-problem/m-p/11163194#M1907701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Problem fixed, it is caused by &lt;SPAN style="color: #333333; font-size: 13.3333330154419px;"&gt;Fixed Point Arithmetic~~~~&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I created a function then it works normally.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333330154419px;"&gt;thank you very much~~~!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;God Bless,&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jul 2015 05:52:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-calculation-problem/m-p/11163194#M1907701</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-07-03T05:52:38Z</dc:date>
    </item>
  </channel>
</rss>

