Skip to Content
0
Sep 30, 2013 at 02:57 PM

Need help to handle the error "Picking quantity larger than delivery quantity"

473 Views

Hi,

I have a requirement where I need to delete a packaging line item from Outbound Delivery and subsequently block corresponding schedulining line item in Sales order at the line item level. But as per the business logic, this whole activity needs to be performed after checking batch's date of manufature (MCHA-HSDAT or MCH1-HSDAT). Now, I have chosen the exit EXIT_SAPLV50E_003 (Enhancement V50EPROP; called through LT12 after user clicks SAVE). Reason for choosing this exit is, first it provides me with BATCH NUMBER and DELIVERY NUMBER and also, at this step user is certain about using the the selected BATCH. Inside the exit, I have used BAPI BAPI_OUTB_DELIVERY_CHANGE for deleting the delivery line item after checking batch's Date of Manufature and then I used BAPI BAPI_SALESORDER_CHANGE for blocking the corresponding scheduline line item at the item level. After each of these BAPI calls, I called BAPI_TRANSACTION_COMMIT to commit my changes to the respective documents.

I tested this enhancement in the following way -

1. Creat sales order (VA01)

2. Create an outbound delivery (VL01N - with reference to the Sales Order created in Step 1)

3. Create an transfer order (LT03 - with reference to the Delivery created in Step 2)

4. Confirm transfer order (LT12 - with reference to the transfer order created in Step 3)

In LT12 finally, I get the error "Picking quantity larger than delivery quantity". Here, I want to mention that the enhancement is working fine as the delivery line item is getting deleted correctly and the sales order scheduline line item is also getting blocked at item level correctly.

Now, my questions are as follows -

1. Why this error is appearing?

2. How can I make sure that this error doesn't appear?

3. If the choice of exit is right?

Thanks & regards,

Sambaran Ray