<?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: Strange error: COMPUTE_BCD_OVERFLOW in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-compute-bcd-overflow/m-p/2447235#M548214</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for the quick answer!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How big the result can be to not to throw the exception. Cause i always need the result of the division to calculate other values.&lt;/P&gt;&lt;P&gt;The programm was already run for n times without any. &lt;/P&gt;&lt;P&gt;Only in this special case it throws the exception. And the results of other calculations had not always has less then 14 decimal places.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And Kiran, no, the problem is not with the formatting of the code, cause as i've written befor the programm already run for many times....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jul 2007 15:33:21 GMT</pubDate>
    <dc:creator>andrey_shapovalov</dc:creator>
    <dc:date>2007-07-05T15:33:21Z</dc:date>
    <item>
      <title>Strange error: COMPUTE_BCD_OVERFLOW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-compute-bcd-overflow/m-p/2447230#M548209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a very very strange error/exception trying to divide 2 Numbers:&lt;/P&gt;&lt;P&gt;The source code looks like this:&lt;/P&gt;&lt;P&gt;lv_alt_koeff = ABS( lv_alt_wrbtr_delta / ( lv_alt_wrbtr_h - lv_alt_wrbtr_s ) ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Values are:&lt;/P&gt;&lt;P&gt;lv_alt_wrbtr_delta = 119201.40&lt;/P&gt;&lt;P&gt;lv_alt_wrbtr_h = 0.00&lt;/P&gt;&lt;P&gt;lv_alt_wrbtr_s = 4124.05&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please explain me what i'm doing wrong and how to get off this error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 15:16:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-compute-bcd-overflow/m-p/2447230#M548209</guid>
      <dc:creator>andrey_shapovalov</dc:creator>
      <dc:date>2007-07-05T15:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Strange error: COMPUTE_BCD_OVERFLOW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-compute-bcd-overflow/m-p/2447231#M548210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;lv_alt_wrbtr_delta, lv_alt_wrbtr_h, lv_alt_wrbtr_s are TYPE p DECIMALS 2&lt;/P&gt;&lt;P&gt;lv_alt_koeff  is TYPE p DECIMALS 14&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 15:19:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-compute-bcd-overflow/m-p/2447231#M548210</guid>
      <dc:creator>andrey_shapovalov</dc:creator>
      <dc:date>2007-07-05T15:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Strange error: COMPUTE_BCD_OVERFLOW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-compute-bcd-overflow/m-p/2447232#M548211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrey, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the problem is not with the calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try leaving some spaces after the command and the brackets used.&lt;/P&gt;&lt;P&gt;The compiler might not be recognising it as a command.&lt;/P&gt;&lt;P&gt;try leaving a space between the variables used and the brackets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if that solves ur problem&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 15:23:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-compute-bcd-overflow/m-p/2447232#M548211</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-05T15:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: Strange error: COMPUTE_BCD_OVERFLOW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-compute-bcd-overflow/m-p/2447233#M548212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the data declaration of the variable which holds this value. If the resultant value  is too large then the ABAP throws this exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may handle this using CATCH ENDCATCH statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; PARAMETERS fact TYPE i.&lt;/P&gt;&lt;P&gt;DATA: fact_save TYPE i,&lt;/P&gt;&lt;P&gt;      res(16)  TYPE p.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;ARITHMETIC_ERRORS contains COMPUTE_BCD_OVERFLOW ***&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;CATCH SYSTEM-EXCEPTIONS ARITHMETIC_ERRORS = 5.&lt;/P&gt;&lt;P&gt;  res = fact_save = fact.&lt;/P&gt;&lt;P&gt;  SUBTRACT 1 FROM fact.&lt;/P&gt;&lt;P&gt;  DO fact TIMES.&lt;/P&gt;&lt;P&gt;    MULTIPLY res BY fact. "&amp;lt;- COMPUTE_BCD_OVERFLOW&lt;/P&gt;&lt;P&gt;    SUBTRACT 1 FROM fact.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;P&gt;ENDCATCH.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 5.&lt;/P&gt;&lt;P&gt;  WRITE: / 'Overflow! Factorial of', fact_save,&lt;/P&gt;&lt;P&gt;                               'can not be calculated.'.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;  WRITE: / 'Factorial of', fact_save, 'gives', res.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;SKJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 15:23:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-compute-bcd-overflow/m-p/2447233#M548212</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-05T15:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: Strange error: COMPUTE_BCD_OVERFLOW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-compute-bcd-overflow/m-p/2447234#M548213</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;May be this useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
v_val =  lv_alt_wrbtr_h - lv_alt_wrbtr_s
if v_val gt 0.
lv_alt_koeff = ABS( lv_alt_wrbtr_delta / ( lv_alt_wrbtr_h - lv_alt_wrbtr_s ) ).
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 15:32:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-compute-bcd-overflow/m-p/2447234#M548213</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-07-05T15:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: Strange error: COMPUTE_BCD_OVERFLOW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-compute-bcd-overflow/m-p/2447235#M548214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for the quick answer!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How big the result can be to not to throw the exception. Cause i always need the result of the division to calculate other values.&lt;/P&gt;&lt;P&gt;The programm was already run for n times without any. &lt;/P&gt;&lt;P&gt;Only in this special case it throws the exception. And the results of other calculations had not always has less then 14 decimal places.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And Kiran, no, the problem is not with the formatting of the code, cause as i've written befor the programm already run for many times....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 15:33:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-compute-bcd-overflow/m-p/2447235#M548214</guid>
      <dc:creator>andrey_shapovalov</dc:creator>
      <dc:date>2007-07-05T15:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Strange error: COMPUTE_BCD_OVERFLOW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-compute-bcd-overflow/m-p/2447236#M548215</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;it's not the problem. In this case it would be 'DIVISION_BY_ZERO' exception...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you anyway&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 15:34:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-compute-bcd-overflow/m-p/2447236#M548215</guid>
      <dc:creator>andrey_shapovalov</dc:creator>
      <dc:date>2007-07-05T15:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Strange error: COMPUTE_BCD_OVERFLOW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-compute-bcd-overflow/m-p/2447237#M548216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try changing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_alt_koeff is TYPE p DECIMALS 14&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_alt_koeff is TYPE p DECIMALS 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 15:35:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-compute-bcd-overflow/m-p/2447237#M548216</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-05T15:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: Strange error: COMPUTE_BCD_OVERFLOW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-compute-bcd-overflow/m-p/2447238#M548217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sorry, i can't, cause i need as much decimal places as possible (14).&lt;/P&gt;&lt;P&gt;Or else i get very big round errors in my later calculations. &lt;/P&gt;&lt;P&gt;The booking amount of an FI Document is multiplied by the result of this division...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ThankYou&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 15:44:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-compute-bcd-overflow/m-p/2447238#M548217</guid>
      <dc:creator>andrey_shapovalov</dc:creator>
      <dc:date>2007-07-05T15:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: Strange error: COMPUTE_BCD_OVERFLOW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-compute-bcd-overflow/m-p/2447239#M548218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, this is your problem - either declare it with fewer decimal places or as float.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I take it back - you can also declare it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_alt_koeff(16)       TYPE p DECIMALS 14.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Rob Burbank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 15:57:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-compute-bcd-overflow/m-p/2447239#M548218</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-05T15:57:00Z</dc:date>
    </item>
  </channel>
</rss>

