Skip to Content
0
Former Member
Dec 23, 2007 at 12:12 PM

Simple question: COMPUTE_BCD_OVERFLOW - how solve?

51 Views

Hi,

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...

I try to calculate a percentage-value based on 2 given amounts (of money). So my codings looks like this:

diff_amount = amount - amount_comp.

IF amount NE 0.

diff_percent = diff_amount / amount * 100.

ELSE.

diff_percent = 0.

ENDIF.

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).

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?

Please help me! Thanks a lot 😊

Merry X-Mas 😊

Markus