2006 Jul 19 3:54 PM
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 ?
2006 Jul 19 9:18 PM
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
2006 Jul 19 4:19 PM
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
2006 Jul 19 4:42 PM
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 ?
2006 Jul 19 9:07 PM
Try using USEREXIT_SAVE_DOCUMENT_PREPARE and changing XLIKP-LFDAT.
2006 Jul 19 9:18 PM
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
2006 Jul 19 9:26 PM
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 ...?
2006 Jul 19 9:31 PM
I'm telling ya use USEREXIT_SAVE_DOCUMENT_PREPARE.
If Sy-tcode = 'VL01N'.
XLIKP-LFDAT = SY-DATUM.
MODIFY XLIKP TRANSPORTING LFDAT.
Endif.
2006 Jul 19 9:34 PM
Matt...It worked ..phewww....:) cant figure out though why it wouldnt work in the SAVE user exit ?
Can you think of any reason ?
2006 Jul 19 9:36 PM
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.
2006 Jul 19 9:34 PM
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
2006 Jul 19 9:38 PM
Hi,
Matt's solution works like charming.
Give it try
Regards,
Ferry Lianto
2006 Jul 19 9:43 PM
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
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |