2015 Feb 19 3:48 PM
Hello friends
im experiencing a divide problem im dividing
divide gv_tot_rem_dev by gv_taux. and it is giving me always zero instead of -37.50
gv_tot_rem_dev is type kawrt curr 15 2 dec value of the field at divide time is 24599.62-
gv_taux is type kkurs dec 9 and 5 decimals. value is 655.95700
i dont know why , so if you can help me in this it will be great
Tahar Yacoub
2015 Feb 19 4:46 PM
Philip.
2015 Feb 19 4:34 PM
hi tahar,
i am getting the result as 37.50- when I execute the following code:
DATA: gv_tot_rem_dev type kawrt,
gv_taux type kkurs,
result type p LENGTH 15 DECIMALS 2.
gv_tot_rem_dev = '-24599.62'.
gv_taux = '655.95700'.
result = gv_tot_rem_dev / gv_taux.
write: / result.
May be you are making some mistake. It is better you cross check it.
2015 Feb 19 4:50 PM
I did the samething than you in a small program and it works fine but not in my f=driver program for the PO PRINT PROGRAM FOR SMARTFORMS WHY I DO NOT KNOW ?
Tahar
2015 Feb 19 5:05 PM
Regards,
Philip.
2015 Feb 19 4:46 PM
Philip.
2015 Feb 19 5:07 PM
Yes that is the problem , i checked the fxed point arithmetic and is ok now. It was driving me nuts
Thanks
Tahar
2015 Feb 19 6:17 PM
Hi,
If you have not checked fixed arithmetic checkbox, then other solution is divide the result amount always by 1000. This is will give you correct result.
Regards,
Pravin
2015 Feb 20 7:59 AM
Thank you very much for your valuable answer . I prefer to go with checking the arithmetic box.
Tahar