cancel
Showing results for 
Search instead for 
Did you mean: 

Setting a Delivery Block on a Delivery during creation (VL01N)

Former Member
0 Kudos

Hi all,

We have a requirement to place a Delivery Block (Awaiting Inspection - QA) on Deliveries of a certain Order Type when they are created.

I've previously done this for Sales Order Header (via MV45AFZZ, USEREXIT_SAVE_DOCUMENT_PREPARE) by setting VBAK-LIFSK to 'QA'. This worked straight away.

However I'm having a real issue in doing something similar for Delivery Header. I've already attempted changes (via MV50AFZ1, USEREXIT_SAVE_DOCUMENT & USEREXIT_SAVE_DOCUMENT_PREPARE) by changing LIPK-LIFSK.

I wonder if I'm changing the wrong value, or setting it at the wrong point for Deliveries?

Any help much appreciated, cheers!

raghug
Active Contributor
0 Kudos

I would add a tag for 'SD' also, you might get some more answers from those folks...

In this case do you have a sales order for the delivery? If you do, then you might be able just use config to set the header block automatically - no programming needed.

Former Member
0 Kudos

Added the tag, thanks.

We do have a Sales Order at this point, but it's the Delivery Header we need to place a block on, not Sales Header.

I've found a BAPI (BAPI_OUTB_DELIVERY_CHANGE) that looks like it'd update the delivery block, but since I'd like to place the block during creation, we've not got the right header data to populate the BAPI at this point.

If I could find somewhere to do this right after the delivery is created, then that'd be something to consider, but I'm not quite sure.

Cheers,

Sam

matt
Active Contributor
0 Kudos

I've closed this question due to lack of clarity in the question.

Accepted Solutions (1)

Accepted Solutions (1)

matt
Active Contributor

Sam Powell wrote in a private message to me. I thought it worth reopening the question to post it.

My question was very clear: I want to change the value of LIKP-LIFSK at the point of delivery document creation, in MV50AFZ1, similar to as I had previously done in MV45AFZZ for sales documents.

You'll be glad to know I managed this by changing XLIKP-LIFSK, not LIKP-LIFSK.

Answers (3)

Answers (3)

Lakshmipathi
Active Contributor

Why to set a block after creating delivery? As a functional consultant, I prefer to have in sale order only and delivery should not be created if there is any quality issue or sufficient stock is not there. Also, I presume, during delivery creation, once the QA block is set, you need to save the delivery and I dont think, this is a Best Practice from users point of view. You must be aware, if any unrestricted stock is made available and you create delivery and save, system would block this unrestricted to stock to that delivery. So at some point of time, there would be more blocked stocks and either the user has to clear the existing deliveries or cancel such of those deliveries.

raghug
Active Contributor
0 Kudos

The OP already shared why he is trying to do this... I will repeat for his sake.

- During delivery creation only (not via Sales Order), and for certain order types (note edit highlighted)

- When a certain user status is set

As a functional consultant, with your book of best practices, how are you going to set either one of these cases up?

Jelena
Active Contributor

Raghu, OP only stated what he/she believes the task is but did not provide any business requirements. What business process does OP's organization have that can't use standard SAP process? Adopting standard SAP processes is the whole point of SAP implementation.

And GL brings good points about stock that I didn't even think about (and I know SD much better than an average ABAPer). That's why I strongly suggest for OP to get professional assistance.

raghug
Active Contributor

See below, the first part was a mis-read on my part - I thought that it was a delivery without reference.

On the other hand, I can think of several valid reasons that creating a delivery ahead of material availability (true availability, not ATP availability) makes sense - especially in a JIT scenario. So, if there is a written best practice that says the Delivery (and shipment if any) should be created after the material becomes physically available to ship, I would like to see that. That kind of negates the entire reason for having an ATP check at delivery creation - which is a standard SAP process.

And, about the blocked inventory, you are talking about net quantities in ATP checks correct? The material itself does not become blocked stock or sales order stock if a delivery's block status is changed. I am trying to clarify this statement "system would block this unrestricted to stock to that delivery.". That seems like a very specific statement to me!

Jelena
Active Contributor

This just highlights the importance of knowing the background behind this question. Right now we're all throwing darts into dark. I sure hope OP appreciates all the free consulting received in this post. 🙂

Jelena
Active Contributor

Please reach to a qualified SD consultant on this, you are trying to re-create with ABAP what is already available in the configuration, from what I see.

Google -> "default delivery block site:sap.com"

Google -> "delivery block user exit site:sap.com"

Former Member
0 Kudos

We need to apply the block at 2 possible points, either:

- During delivery creation only (not Sales Order), and for certain order types

- When a certain user status is set

Is this possible via config? I'm going to ask our SD analyst when he's next available, but until then it'd be great to make progress ASAP.

I'm curious as to why an ABAP change in the Userexit works for Sales Orders, but not Deliveries?

Cheers,

Sam

Jelena
Active Contributor

Did Google search not answer your question? I ran the same search and found many SCN posts on this subject in seconds, so I'm confused...

It does not work in deliveries because what you're trying to do is not the standard SAP process. As G Lakshmipathi correctly pointed out, delivery block is assigned in the order. It is not clear to me either why would anyone need to do it in the delivery instead.

Lakshmipathi
Active Contributor
0 Kudos

Raghu Govindarajan

If you don't understand, better not to respond like this. The question asked was the business process for which, this requirement is needed. Go through the original post once again.

raghug
Active Contributor
0 Kudos

Sorry, I didn't read this comment, I only read this one and thought the OP. Based on the second one, I thought that the OP was talking about creating a delivery without reference.