Skip to Content
0

Changing sales order Qty at item level

Dec 13, 2016 at 05:59 PM

68

avatar image

I want to change the sales order item quantity on base of some conditions but I am unable to modify the quantity. i have also searched SCN but no success. i have written the following code in the module MV45AOZZ

FIELD-SYMBOLS <vbep> LIKE LINE OF xvbep.

LOOP AT xvbep ASSIGNING <vbep>." WHERE zzcustom1 <> vbak-zzcustom1.
<vbep>-WMENG = <vbep>-WMENG * '12'.

ENDLOOP.

need your help to resolve the issue.

thanks,

aneel.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Jelena Perfiljeva
Dec 13, 2016 at 07:24 PM
0

That's because SO quantity is supposed to be what the customer is ordering. Why would it need to be changed programmatically? "I order 10... Oh no you di-in't, I'll change it to 20!". Would you like that if you were a customer?

You can enforce minimum order quantity, for example, or determine confirmed quantity and such. But changing order quantity just makes no sense, sorry.

Share
10 |10000 characters needed characters left characters exceeded
Aneel Munawar Dec 14, 2016 at 04:33 AM
0

Actually, This is service material and we are using Qty as no of day. I want to put days difference of two dates in the Qty field.

Regards,

Aneel

Share
10 |10000 characters needed characters left characters exceeded
Aneel Munawar Dec 15, 2016 at 01:23 PM
0

I solved my self by adding following lines. We also need to update scheduled lines after changing the qty.

LOOP AT xvbep ASSIGNING <vbep> where posnr eq vbap-posnr.

<vbep>-wmeng = count1.

<vbep>-cmeng = count1.

<vbep>-bmeng = count1.

IF <vbep>-updkz IS INITIAL.

<vbep>-updkz = updkz_update.

ENDIF.

ENDLOOP.

Share
10 |10000 characters needed characters left characters exceeded