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

zero divide error in my query sq01

Former Member
0 Likes
411

Hi Gurus

I keep getting a 0 divide error in my query, I think it's because some of the invoices have 0.00 dollars amount, t

For Contribution Margin in sq01 I wrote a formula in Calculation formula

CONT_MARG / (MAT_PRC-FRGT_PROV + DISC_SURC+FREIGHT ) * 100

Condition : MAT_PRC-FRGT_PROV <> 0 OR DISC_SURC+FREIGHT <> 0.

after running the invoice I am getting an error as zero divide in the report

Any help will be appreciated

Thanks in Advanced

Hi Gurus

I keep getting a 0 divide error in my query, I think it's because some of the invoices have 0.00 dollars amount, t

For Contribution Margin in sq01 I wrote a formula in Calculation formula

CONT_MARG / (MAT_PRC-FRGT_PROV + DISC_SURC+FREIGHT ) * 100

Condition : MAT_PRC-FRGT_PROV <> 0 OR DISC_SURC+FREIGHT <> 0.

after running the invoice I am getting an error as zero divide in the report

Any help will be appreciated

Thanks in Advanced

1 REPLY 1
Read only

Former Member
0 Likes
342

Hi,

Change your query like below

define a local variable l_variable.

l_variable = (MAT_PRC-FRGT_PROV + DISC_SURC+FREIGHT ) * 100 .

IF l_wariable IS NOT INITIAL.

CONT_MARG / l_variable.

ENDIF.

Regards,

Atish