Application Development and Automation 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: 
Read only

Delivery W/O Reference

Former Member
0 Likes
1,598

VL02n , I have set up the user exit , move field to LIKP with current data (lfdat) . It works good when i create the Delivery W/O order reference but when its created with ref to an order , it doesnt take the dates from the USER EXIT ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,495

Hi,

I did the debugging and seems you can not change the delivery date (header) thru user exits.

You need to go to processsing tab and change to new date. Once the date is changed, there is a logic to flag gf_header_work_flag = 'X'.

This flag will be used to change delivery header via BADI Change_Delivery_Header later on.


...
call method gi_badi_delivery->change_delivery_header
...

Are you using BDC for this delivery date change?

Hope this will help.

Regards,

Ferry Lianto

Hi,

I did the debugging and seems you can not change the delivery date (header) thru user exits.

You need to go to processsing tab and change to new date. Once the date is changed, there is a logic to flag gf_header_work_flag = 'X'.

This flag will be used to change delivery header via BADI Change_Delivery_Header later on.


...
call method gi_badi_delivery->change_delivery_header
...

Are you using BDC for this delivery date change?

Hope this will help.

Regards,

Ferry Lianto

11 REPLIES 11
Read only

Former Member
0 Likes
1,495

Hi,

Please use user exits <b>USEREXIT_SAVE_DOCUMENT</b> instead of USEREXIT_MOVE_FIELD_TO_LIKP in include program MV50AFZ1 for creating delivery with order reference.

Hope this will help.

Regards,

Ferry Lianto

Read only

0 Likes
1,495

It still doesnt work , when i go to vl02n and see the delivery created , it doesnt show the new date ??

I set a breakpoint in the USEREXIT for save , it goes there , changes the value : move sy-datum to likp-lfdat but doesnt update it in the vl02n or likp ?

Where am i going wrong ?

Read only

0 Likes
1,495

Try using USEREXIT_SAVE_DOCUMENT_PREPARE and changing XLIKP-LFDAT.

Read only

Former Member
0 Likes
1,496

Hi,

I did the debugging and seems you can not change the delivery date (header) thru user exits.

You need to go to processsing tab and change to new date. Once the date is changed, there is a logic to flag gf_header_work_flag = 'X'.

This flag will be used to change delivery header via BADI Change_Delivery_Header later on.


...
call method gi_badi_delivery->change_delivery_header
...

Are you using BDC for this delivery date change?

Hope this will help.

Regards,

Ferry Lianto

Read only

0 Likes
1,495

Hi Ferry ,

First of all thanks a lot .

Yes , looks like date cant be changed the way they want .

I was just trying to do it through User exit as they wanted the date to be changed right when the delivery is created . Now , shall i set this flag in the exit and call the BADI from the user exit ? I havent ever worked with BADIs but will look into it now ?

Any idea why is this now allowed though we are allowed to change it manually ...?

Read only

0 Likes
1,495

I'm telling ya use USEREXIT_SAVE_DOCUMENT_PREPARE.

If Sy-tcode = 'VL01N'.

XLIKP-LFDAT = SY-DATUM.

MODIFY XLIKP TRANSPORTING LFDAT.

Endif.

Read only

0 Likes
1,495

Matt...It worked ..phewww....:) cant figure out though why it wouldnt work in the SAVE user exit ?

Can you think of any reason ?

Read only

0 Likes
1,495

I'm not positive why it wouldn't work in USEREXIT_SAVE_DOCUMENT. I'd have to debug to see how and when xlikp actually updates likp.

Read only

Former Member
0 Likes
1,495

Hi,

The BADI will get executed prior to user exits.

So there is no point to set this flag in user exits (too late). It is very strange why ONLY for creating outbound delivery with order reference does not work.

If you use BDC or BAPI as solution, it will work.

Anyway, let you know if I find any miracle solution.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
1,495

Hi,

Matt's solution works like charming.

Give it try

Regards,

Ferry Lianto

Read only

0 Likes
1,495

Yeah , it worked for sure ...:) i m pondering on why its not working in Save , it gives an error dump of SAPSQL_Duplicate_array_insert (in the above post detail is there ) ...Meanwhile i am assigning points for allllll the helppp...thanks all ...!!

If any of us can find out why it doesnt work for SAVE ...Pls do post it here .

Thank YOu