05-22-2008 3:58 AM
code :
Tables s906.
data : int1 type i.
select single * from s906 into s906 where bstnk = 'SY05'.
if sy-subrc = 0.
int1 = s906-aemenge . (s906-aemeng = 12.000)
BREAK-POINT.
endif.
The table 'S906' is a info structure of SO . It collect the quantity of one matiral in all SO when a SO create.
The 'aemenge' is the SO item quantity to base unit.
The field is 'P'.
When I create a test programe by SE38, the 'int1' is 12.
When I add the code to 'MV45AFZZ' which is a userexit for SO save event , the 'int1' is 12000.
SAME CODE.
Help.plz.
05-22-2008 4:20 AM
!!!!
The fact is .....
In 'MV45AFZZ'
data int1 type i.
p1 type p decimals 3.
p1 = 12.
int1 = p1.'
the result is 'int1 = 0.012'.
But in my test prograem
The result is 12.
05-22-2008 4:25 AM
Hi,
There may be chance that the value of that variable is changed at some time later in the code.
Have you checked the value in debugging?
Regards,
Atish
05-22-2008 5:41 AM