‎2007 Sep 04 6:23 AM
Hi All,
I have a unique problem. The below code worked perfectly correct when i ran it through custom program. The output value was 2.84. But when the same code was copy pasted in custom pricing routine, the output value is getting rounded to 0.03.
I tried changing the types for the data variables from Char type to P -Decimals 2, but the output is still getting rounded off.
The rountine is written in VOFM-FORMULAS-CONDITION VALUE.
Kindly let me know the problem and the solution for the same.
thanks and regards
Abishek
REPORT z_test1.
DATA: z_v_unitprice LIKE KOMV-KWERT,
z_v_kawrt like komv-kawrt,
z_v_mgame like komp-mgame.
z_v_mgame = '1092.10' / '384.000'.
z_v_kawrt = '1092.10' .
z_v_mgame = '384.000'.
z_v_unitprice = z_v_kawrt / z_v_mgame.
write: z_v_unitprice.
‎2007 Sep 04 6:32 AM
Hi can you try
data: g_amount type p.
DATA: z_v_unitprice LIKE KOMV-KWERT,
z_v_kawrt like komv-kawrt,
z_v_mgame like komp-mgame.
z_v_mgame = '1092.10' / '384.000'.
z_v_kawrt = '1092.10' .
z_v_mgame = '384.000'.
z_v_unitprice = z_v_kawrt / z_v_mgame.
write: z_v_unitprice.
MOVE z_v_unitprice TO G_AMOUNT.
WRITE G_AMOUNT NO-GROUPING DECIMALS 2.
thanks & regards,
Venkatesh
‎2007 Sep 04 6:59 AM
Venkatesh
Thanks for your response. But actaully in report its working fine, but my problem is in pricing routine and in pricing routine i cannot use wRITE statement. The value of z_v_unitprice is what matters to me and that value is getting rounded off.
Please let me know if you have any clue abt this problem
regards
abhishek