Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SO quantity convert problem -_-

Former Member
0 Likes
574

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.

3 REPLIES 3
Read only

Former Member
0 Likes
512

!!!!

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.

Read only

0 Likes
512

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

Read only

0 Likes
512

Yes . I check the value in debug mode as soon as possible.