Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to update Sales Order Delivery Block while saving Delivery ?

Former Member
0 Kudos
941

Hi,

I have a requirement wherein i need to update sales order delivery block field(VBAK-LIFSK) while saving the delivery for the order.

Also I need to remove this block while execution of Backorder Rescheduling program SDV03V02 (Tcode : V_V2),

Can anybody help me out in this?

regards,

Nitin

5 REPLIES 5

Former Member
0 Kudos
195

Hi Nitin,

I hope your requirement and logic works only if the billing is order relavant.

You can update the delivery block field in the sales order using the exit USEREXIT_SAVE_DOCUMENT_PREPARE in include MV50AFZ1.

Regards,

Babul.

0 Kudos
195

Hi Babul,

Thanks for the reply.

I already tried this but its not updating VBAK-LIFSK.

Do u have ne code for this which u can share ?

regards,

Nitin

0 Kudos
195

HI,

try using BAPI_SALESORDER_CHANGE

pass ur vbeln in SALESDOCUMENT

pass an 'X' to BAPISDH1-DLV_BLOCK

and 'X' to BAPISDH1X-DLV_BLOCK

Also add the UPDATE task clause, you will want to set the flag only when delivery is being saved, not before that.

0 Kudos
195

Hi Gary,

Thanks for reply.

It worked fine .Just wanted to check with you If u wrote ne code for Error Scenarios ?

regards,

Nitin

Former Member
0 Kudos
195

Hi,

You can make use of the exit MV50AFZ1.

Here pick up the sale order item information from Delivery information and put block in sale order and modify the record in VBAP.

Regards,

Sai