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: 

Copy data from VBAK to LIKP during delivery creation

Former Member
0 Kudos

Hi Experts,

There is a custom field ZZLATESTDATE in the table VBAK. This is entered during sale order creation on the screen in the Additional Data tab of VA01 transaction.

Now when I create a delivery with ref to this sale order, and save it, I want to copy this field VBAK-ZZLATESTDATE to LIKP-ZZLATESTDATE. This needs to be done automatically, through a user-exit or any other enhancement available. I dont want to populate it on the delivery screen. I just want to save it in the delivery header table LIKP. How do I go about it?

Appreciate your help.

5 REPLIES 5

ThomasZloch
Active Contributor
0 Kudos

Where have you looked for available exits so far?

Thomas

0 Kudos

Hi Thomas,

Currently I'm looking if Data Transfer routines will serve my purpose. Not sure if I'm on the right track...

0 Kudos

I think you are, sales document header to delivery header. There is enhancement spots provided inside the includes that you can use to move the contents of your ZZ-field.

Thomas

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

First of all, you need that the copy relation will be 1 to 1, ie, don't merge two or more SO in one delivery. For this, check in VTLA the field or VOFM that you set in Combination Requirement.

Second, in tcode VTLA check in copy rules for the type SO to delivery. So, in VTLA in the field Header Data in transfers, create a copy of VOFM 001 (for instance 901) using VOFM 001 as a template and add this line.


  LIKP-ZZLATESTDATE = CVBAK-ZZLATESTDATE.

See Note 327220 - VOFM function and its objects for further information related with VOFM.

I hope this help you

Regards

Eduardo

Former Member
0 Kudos

You can use the BADI LE_SHP_DELIVERY_PROC and create its implementation to resolve your purpose.

The method which can be used is FILL_DELIVERY_HEADER.

You can read the Sales order number from LIPS-VGBEL, query the VBAK table for your custom field and pass it over to the LIKP header field.

Regards,

Abhishek