10-23-2008 6:44 AM
dear,
i m facing a problem while calculation in routine for billing
(VF02). i am just multiplying two varibles and the system is giving one result which is a include program while i m calculating the same with same data value the system is giving different result in another program.
both have same data type and data value
the first one is giving 118110 (correct one)
other program is giving 1181100.
the calculation is as follows (as example).
data: CONST(5) TYPE C VALUE '39.37' .
DATA: W_LENINCH(10) TYPE N.
TYPES:BEGIN OF TY_ZROLL,
AREA TYPE ZROLL-AREA,
ACTUAL_LEN TYPE zpack_list-ACTUAL_LEN,
VBELN TYPE ZROLL-VBELN,
END OF TY_ZROLL.
DATA: IT_ZROLL TYPE TABLE OF TY_ZROLL,
WA_ZROLL LIKE LINE OF IT_ZROLL.
WA_ZROLL-ACTUAL_LEN = '3000'.
W_LENINCH = WA_ZROLL-ACTUAL_LEN * CONST.
write:W_LENINCH.
please reply
10-23-2008 6:49 AM
hi,
i think u need data type as P...."W_LENINCH(10) TYPE P".
im not sure ,
please check it .
thank u
santhosh
10-23-2008 6:58 AM
the reason is, in the main program SAPMV60A for the tcode VF02 the fixed point arithmetic check box is not checked in the attributes. One solution for your problem would be to call a Z* function module in the include program which does the calculations and returns the result. OR you have to divide the result with 10(which is not suggested though)
10-23-2008 1:36 PM