‎2007 Nov 12 6:16 AM
Hi all,
the program on execution, throws an error " BCD_ZERODIVIDE ".
This is due to the fact that, a line in the program has attempted to divide by Zero.
eg:
V_PERCENT = ( A / B ) * 100.
Here,
the value of B is zero, and hence this ABAP runtime.
What are the logics could be implied, when B is zero. I have no option to throw an error mmessage, because it is a report,, am really unaware what even the report is doing.. suggest the ways to handle this situation.
thanks in adv..
‎2007 Nov 12 6:20 AM
Hi,
Just change code as
<b>IF B IS NOT INITIAL.
V_PERCENT = ( A / B ) * 100.
ENDIF.</b>
Regards,
Atish
‎2007 Nov 12 6:20 AM
Hi,
Just change code as
<b>IF B IS NOT INITIAL.
V_PERCENT = ( A / B ) * 100.
ENDIF.</b>
Regards,
Atish
‎2007 Nov 12 6:36 AM
Hi,
Before that statement check B should not be initial.
EX.
If not b is initial.
V_PERCENT = ( A / B ) * 100.
endif.