Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

compute_bcd_overflow runtime errror

Former Member
0 Likes
1,329

hi ,

kindly any one tell me wat will be the problem for this type of error. kindly give me a solution for this

regards,

nagaraj.j

5 REPLIES 5
Read only

Former Member
0 Likes
914

Where are you facing this? In what instance? Without any details you should not expect useful repiles.

Read only

Former Member
0 Likes
914

Hi nagaraj ,

This sort of error usually occurs when the amounts involved are too big for the program to handle. The ABAP will be trying to write to a table or structure which does not have enough space. Run the Program in Debug mode and see where it drops out.

once you identify the field or table structure try to increse its length .

Hopefully this will solve your problem.

Regards,

Nikhil

Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
914

This type of error occurs if an overflow occurs in an arithmetic expression with an operand of the type P (the result may have another type).

If you must execute type conversions within the arithmetic expressions,the errors BCD_FIELD_OVERFLOW or BCD_OVERFLOW are triggered, as before.

Read only

Former Member
0 Likes
914

hi,

This happens generally with amount field you neeed to catch the exception in your code

for example

catch system-exceptions compute_bcd_overflow = 5.
          compa_ratio = v_salary / v_slref.
        endcatch.
*---- Compa ratio is 9.99 as ideally it should not be grater than 10
        if sy-subrc = 5.
          compa_ratio = '9.99'.
        endif.

thanks

Read only

Former Member
0 Likes
914

u can use catch ....endcatch like


catch system-exceptions bcd_zerodivide = 1.
  rate = rate / kpein.
    endcatch .

or use


CATCH SYSTEM-EXCEPTIONS ARITHMETIC_ERRORS = 5.
.....
.....
ENDCATCH

Edited by: Krupajani on Dec 24, 2009 11:21 AM