Skip to Content
Former Member
Oct 25, 2011 at 08:10 AM

Order handling - Delivery stop - userexit_move_field_to_vbak



I have an issue regarding delivery block.

I've read a couple of posts regarding this, but they all solved their issue by using userexit_save_document or userexit_save_document_prepare which is no option for me.

My issue is the following:

I've created an order type ZTA (copy of TA) and setup a default delivery block "Z1 - in work" to that order type.

This prevents that after saving the order it will not be automatically delivered by a job which is running in background.

So each time I create a ZTA order with VA01, it will set the delivery block Z1. That's fine.

Now let's say when a customer has a delivery block (e.g. Z5), it will not overwrite the order delivery block Z1, when entering sales-to-party (or ship-to-party)!

Now I tried to add some code to userexit_move_field_to_vbak like that:

    if not kuwev-lifsd is initial.
      vbak-lifsk = kuwev-lifsd.      " Z1 -> Z5
      if not kuagv-lifsd is initial.
        vbak-lifsk = kuagv-lifsd.     " Z1 -> Z5

Result: It will execute my new code sequence, but will not change the delivery block Z1 to Z5 on the VA01 screen. Maybe because I'm at this step not in update but insert mode?

I need to show the customer's delivery block while creating the order, means showing the delv. block after saving is too late.

Is there maybe a better exit to change the order delivery block to the customers delivery block?

Thanks in advance