on 02-02-2015 4:20 PM
Hello Everyone,
we are creating deliveries using VL10E background mode based on the schedule line items.
My requirement is restrict the delivery based on the ATP stock.
for example
ATP stock in MD04 is 11
For Item 10 below are the schedule lines:
Item date: Req QTY Confimed QTY
10 05.02.2015 10 10
10 06.02.2015 20 20
10 07.02.2015 30 30
Delivery will be created with the below items when executed using VL10E like below:
Item numbre: QTY
10 10
20 1
As we have only 11 materials(ATP stock) available delivery will be created for the first 10 QTY
and for the next 20 there is only 1 ATP available so it will created item20 with QTY 1.
But we do not want allow the partial delivery for item 20...
we would like to achieve this using code (any user exit or badi available for this if yes how the logic should be implemented).
Please give me some light on the above
Thanks In Advance
regards
Trupthi
Hi Trupthi,
I tested this on my internal system and got the same behaviour as you. I quickly browsed the standard settings but again, like you I did not find a way to prevent the creation of item 20 (the item with the partial quantity).
User exit USEREXIT_SAVE_DOCUMENT could be used to do this though - you could loop through the XLIPS structure and compare the value to the value in VBEP-BMENG. if they do not match, then delete the XLIPS item.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Noel,
Thanks for swift response.
The solution which you have provided above may not work fully.
for example in my XLIPS has only one line item with partial delivery, as per the above solutions we will delete this item..so now the delivery has no items i.e we are just creating a delivery without items which is not ideal.
the only issue in USEREXIT_SAVE_DOCUMENT is the delivery number has already been generated..
please suggest me if any other solution.
regards
Trupthi
Hi Trupthi,
How about this:
In the item category customising, set the field "Check quantity 0" to "B" or "C" (this means that the system will error if the delivery quantity is 0.
In your case, the delivery quantity of item 20 will be 1 as a result of the ATP check. But you could use user exit EXIT_SAPLATPC_002 to change this to 0. For example, you could have code in this exit akin to this:
IF SY-TCODE = 'VL10X'. << You should specify transaction as this code is used in other modules
IF T_MDVEX-MNG02 < T_MDVEX-MNG01 << Check if confirmed quantity is less than req quantity
T_MDVEX-MNG02 = '0.00' < change the confirmed quantity to 0
ENDIF.
ENDIF.
This would mean that the user exit of the availability check will change the confirmed quantity to 0 and transfer a quantity of 0 back to the delivery code. Then, the delivery code will error due to the item category customising. I tested this just now and seemed to work well for me.
Hi Noel,
Thanks alot for helping me out in this .
I feel this doesn't serve my purpose as we have few other validation but we do not get enough information in this exit.
I would like to do in BADI LE_SHP_DELIVERY_PROC or any other appropriate user exit or routine.
please suggest me how we can achieve this.
Thanks In Advance
regards
Trupthi
Hi Noel,
Again , I am coming back on this. Thanks alot for whatever information you have provided.
As you suggested I can do validation in the VOFM delivery routines for example 901 and based this outcome I would like to do the ATP validation, is there any mechanism to pass the flag from VOFM routine to ATP exit EXIT_SAPLATPC_002 casue this I would like to do only certain cases but not all the cases.
I would like to allow the patail deliveries in few cases...If we can pass the flag based on our validation to ATP exit EXIT_SAPLATPC_002 then we can achive this.
I found a badi LE_SHP_DELIVERY_PROC and method PUBLISH_DELIVERY_ITEM but the problem is to identify delivery item with the exact schdule line item( we do not have schdule line data here).
This is something urgent and it would great help if you can help me.
Thanks In Advance
regards
Trupthi
Hi,
Delivery is always created for confirmed scheduled lines. This means that the quantity is available for that SLc.
If you dont have stock on the confirmed S.L. date, system will still be able to allow delivery creation for the SLC quantity. But we cannot do PGI as there is no stock.
In this case, you can change the quantity in the delivery and then post the GI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You have not indicated what is the order quantity and confirmed quantity as like line item 10. If you dont want partial delivery to happen, you can very well set the option of "Complete Delivery" in customer master
G. Lakshmipathi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lakshmipathi,
Thanks for your reply.
As mentioned above.
ATP stock in MD04 is 11
For Item 10 in VA33 below are the schedule lines quantities..
Item date: Ordered QTY Confimed QTY
10 05.02.2015 10 10
10 06.02.2015 20 20
10 07.02.2015 30 30
Please let me know if any way to achieve the result.
regards
Trupthi
Hi,
Have you considered ATP scope with replenishment lead
time scenario? .
Regards
Mrsri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Trupthi
I suggest you need to confirm something first, if ATP stock is 11 why your schedule line 1 confirm qty is 10. Do you have any scenario to split delivery item?
In standard system, the qty of delivery seem equality to schedule line qty.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.