cancel
Showing results for 
Search instead for 
Did you mean: 

VL10E batch job restrictions on delivery creation

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member223981
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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

former_member223981
Active Contributor
0 Kudos

You could always raise an error if there are no items in XLIPS (preventing the save of the delivery). Anyway, I'll think about it and see if I can come up with a better solution.

Former Member
0 Kudos

Hi Noel,

Yes I can do that but Delivery number has been generated by then.

in few post they have suggested the exit LV50R_VIEWH19 but it didn't work for me.

Can you please suggest me the better place to write the code.

Regards

Trupthi

former_member223981
Active Contributor
0 Kudos


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.

Former Member
0 Kudos

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

former_member223981
Active Contributor
0 Kudos

What are the other validations that you need to do? Maybe, you can do them separately in a different exit.

The advantage of the ATP exit is this is where you definitely have access to the quantity and can check that it is only partially available.

0 Kudos

Hi,

Use Delivery group entered  in sales order,that will prevent schedule lines that ends up with partial delivery Qty.However , it may have pros and cons,which you can evaluate.

Regards

Mrsri

Former Member
0 Kudos

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

former_member223981
Active Contributor
0 Kudos

You could test exporting the flag to a user parameter in SAP memory in your VOFM routine.

Then import it again in the ATP exit.

That could be 1 approach.

Former Member
0 Kudos

Hi Noel,

Thanks alot for your infiormation.

Can I create custom enhancement in include FV50PFLP_LIPS_PRUEFEN as this has all the information to cater my requirment.

regards

Trupthi

Answers (4)

Answers (4)

former_member183879
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

Hi Navaneetha,

Thanks for the reply.

can you please explain me with my example please.

regards

Trupthi

Lakshmipathi
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

Hi,

Have you considered ATP scope with replenishment lead

time scenario? .

Regards

Mrsri

Former Member
0 Kudos

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.