I am trying to divide a currency field with quantity field and want to store the result in currency field or decimal field. I tried it as below...
DATA: l_field1 LIKE J_1IEXCDTL-EXBAS,
l_field2 LIKE j_1iexcdtl-menge,
l_field3 TYPE p DECIMALS 2.
l_field1 = ' 165915.00'.
l_field2 = ' 15.000'.
l_field3 = l_field1 / l_field2.
WRITE :/ l_field3.
I am getting the desired result (output is comming as 11061.00).
But same thing is not working, output is comming as 11.06 for below code...
l_field3 = it_excdtl-exbas / it_excdtl-menge.
Why? How to solve it.