<?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: Simple question: COMPUTE_BCD_OVERFLOW - how solve? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-question-compute-bcd-overflow-how-solve/m-p/3214528#M766471</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;thanks for your answer, do you mean I should define a field based on character values and should give the value of the calc to this field? Or did I misundertand you?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because I don't think that could be a solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greets&lt;/P&gt;&lt;P&gt;Markus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 23 Dec 2007 14:52:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-23T14:52:02Z</dc:date>
    <item>
      <title>Simple question: COMPUTE_BCD_OVERFLOW - how solve?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-question-compute-bcd-overflow-how-solve/m-p/3214526#M766469</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;I have a really simple problem but in the moment I can't find the right solution, so I hope you can give me a hint...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to calculate a percentage-value based on 2 given amounts (of money). So my codings looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;diff_amount  = amount - amount_comp.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;  &lt;EM&gt;IF amount NE 0.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;    &lt;EM&gt;diff_percent = diff_amount / amount * 100.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;  &lt;EM&gt;ELSE.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;    &lt;EM&gt;diff_percent = 0.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;  &lt;EM&gt;ENDIF.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use own data-elemnts in de DDIC for the definition of the variables. So for the amounts I use the domain of SAP WERTV8 (this is type P) and for the percentage I use an own domain with DEC (length: 5, decimals: 2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if there are high values in the amount-fields( going into the millions)  I get an dump because of COMPUTE_BCD_OVERFLOW. But now I don't really know which data elements to use to implement such a simple calculation?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me! Thanks a lot &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Merry X-Mas &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Markus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Dec 2007 12:12:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-question-compute-bcd-overflow-how-solve/m-p/3214526#M766469</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-23T12:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: Simple question: COMPUTE_BCD_OVERFLOW - how solve?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-question-compute-bcd-overflow-how-solve/m-p/3214527#M766470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Markus Glubka,&lt;/P&gt;&lt;P&gt;To avoid this error.&lt;/P&gt;&lt;P&gt;1. Define the character type field of length shown in the data element of the screen field.&lt;/P&gt;&lt;P&gt;2. now use write statement like write (currency type  field ) to (char field ) unit ( currency unit ).&lt;/P&gt;&lt;P&gt;3. pass the value in the character field to screen field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Think this will help you.&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Dec 2007 13:49:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-question-compute-bcd-overflow-how-solve/m-p/3214527#M766470</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-23T13:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Simple question: COMPUTE_BCD_OVERFLOW - how solve?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-question-compute-bcd-overflow-how-solve/m-p/3214528#M766471</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;thanks for your answer, do you mean I should define a field based on character values and should give the value of the calc to this field? Or did I misundertand you?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because I don't think that could be a solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greets&lt;/P&gt;&lt;P&gt;Markus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Dec 2007 14:52:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-question-compute-bcd-overflow-how-solve/m-p/3214528#M766471</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-23T14:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: Simple question: COMPUTE_BCD_OVERFLOW - how solve?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-question-compute-bcd-overflow-how-solve/m-p/3214529#M766472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Either find a data element that has a bigger length, or define you variables as TYPE P LENGTH 16 DECIMALS 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your basic problem is that you've not defined your variables with sufficient length.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Dec 2007 15:28:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-question-compute-bcd-overflow-how-solve/m-p/3214529#M766472</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2007-12-23T15:28:52Z</dc:date>
    </item>
  </channel>
</rss>

