2010 Aug 23 9:39 AM
Hi,
Requirement : If partial stock exist, item should be splitted into 2 line items. (MTS & MTO).
ex : If available stock for Material M1 is 30.
Input : Item Material Qty
10 M1 50.
Output : Item Material Qty
10 M1 30 MTS
11 M1 20 MTO
We are able to do it during Sale Order creation (VA01). We are facing problem during Change (VA02).
Sale order created with material M1 of qty 30. When we try to change the quantity to 50 in Sales order Change (VA02), it is not splitting.
During initial case (Sale order Creation), the logic was written in exit : USEREXIT_MOVE_FIELD_TO_VBAK.
During Change(VA02), above exit will not be useful. Hence tried to use exit : USEREXIT_MOVE_FIELD_TO_VBEP.
We are not able to add new item at this level.
I couldn't find helpful information on SDN history, can any one share your ideas.
Thank you.
2010 Aug 26 6:05 AM
Did you consider using product substitution? I think product substitution can resolve your issue.
2010 Aug 25 5:57 PM
How do you know the stock exists? What if you have two orders and both exceed the available stock for a particular material? You update the first order (By the way, ITEMS are in table VBAP, VBEP contains the schedule lines for an ITEM, showing what quantities you can deliver and when if you utilize ATP). After you update the first order, to 30 and 20, you encounter second order for 35. So you split it into 30 and 5? Is that right? How are you going to deliver 60? Now, if your installation uses ATP, SAP would create the schedule lines correctly, showing what actually can be delivered, considering stock already "consumed" by another order/item/schedule line.
And, handling additional item lines is not a function of user exit for VBAK (header row). Look for userexits in MV45AFZx that refer to VBAP for items and VBEP for schedule lines!
2010 Aug 26 6:05 AM
Did you consider using product substitution? I think product substitution can resolve your issue.