09-09-2008 11:18 AM
I want 0.00 + 0.00 = 0.00, in my case its happening as:
0.00 + 0.00 = 0.
Values are stored in CHAR field.
09-09-2008 12:54 PM
*check the length of your variable.
*see bellow example change the length of varibale charv and see the difference.
REPORT ztest.
data: charv type char5.
charv = '0.00 + 0.00 = 0.00'.
write charv.
thanks
ganesh
09-09-2008 12:58 PM
well this wont work with char fields.
move your values to type p fields before summing and the move your sum back to the char field.
you can use the addition right-justified and decimals 2.
09-09-2008 1:02 PM
Hi Anand,
Try this way :
Data :
w_var1 type p decimals 2 value '0.00',
w_var2 type p decimals 2 value '0.00',
w_var3 type p decimals 2.
w_var3 = w_var1 + w_var2.
write 😕 w_var3.
Regards,
Swapna.