‎2011 Aug 07 6:57 AM
Dear Experts,
I have a simal requirements, just i want to calculate my basic value divided by tax amount. So i have incorporated the the logic in to a pricing routine, When i check the output its gave a wrong value. So i debuged the program i came to know while doing division its not working properly. I made the same code ( for testing ) in a normal z program its giving the correct value. How to manage this issue?
data : l_mrp1_temp1 type p decimals 4.
data : i_value4 TYPE p decimals 4 value '3.7600'.
data : l_tax1 type p DECIMALS 4 VALUE '1.1376'.
l_mrp1_temp1 = i_value4 / c_tax1 * 100.
xkomv-kbetr = l_mrp1_temp1 . Reg,
Mohana
‎2011 Aug 07 10:41 AM
330.5203..this should be the result of your calculation.
What is the value that you are getting in the pricing routine? Have you checked in debug mode?
Division is not working properly? or this " xkomv-kbetr = l_mrp1_temp1 " statemen?
‎2011 Aug 07 10:59 AM
Hi
Perhaps the problem is the flag "Fixed point aritmhetic" is set in the attribute of your z-program but not in the main of the pricing routine (probably SAPLV61A)
If it's so, try to run your modification in a your function module where main program has that flag
Max
‎2011 Aug 07 3:49 PM
thaz true, i experienced those sort of calculation issues when "Fixed point aritmhetic" is not checked in the attributes of classes. I wasnt aware that it might happen in the reports too. thz was the reason i was asking for the result of the calculation you have got