Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Not able to Divide

Hi Experts

I have a query . I am using one of the oldest version of SAP ie SAP 4.5 b.

I have a code to divide two variables

ie

loop at it_konp.

v_sumkbert = v_sumkbert + it_konp-kbert .

endloop.

In someother loop

v_divkbert = it_konp-kbert / v_sumkbert .

All the variables declared are of type CURR

charcter 11 decimals 2

supppose it_konp-kbert is havign value 20.00

and v_sumkbert is having value 230.00

lv_divkbert is still showing 0.00

suppose it_konp-kbert is havign value 210.00

and v_sumkbert is having value 230.00

lv_divkbert is showing 0.01

I tried all the possiblities by declaring all the variables as type p decimals 2 , still the result is the same .

Please help me as it is very urgent as I am struck up in this small issue.

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question