‎2014 Jan 13 6:14 AM
Hi All,
I have a requirement to update the external delivery number in the delivery with the tracking number.
For this I'm following a approach of updating it by creation of the IDoc through code. Due to technical reason cannot update the same using the FM available.
Please let me know how can I create the IDoc through the code and same in the case as it come from the external system(Inbound) and get processed.
Thanks in advance
‎2014 Jan 13 6:26 AM
Hi Nilesh,
Please answer the below questions!
1. You want to update the tracking number and external delivery for inbound or outbound
2. From where you need to get the information! Manually or any other tables?
3. Why you want to do it in IDOC, user-exits are available? is there any reason?
Provide me specific details before answering your question!
Rg, Kiran
‎2014 Jan 13 6:34 AM
Hi Kiran,
Just to give you a background.
When the delivery is PGI'ed there is a output type which gets triggered, the routine attached to this output type (nace) get the data which needs to be sent to the external system and sends the same to the Proxy. As the proxy is Synchronous we get the response and in this response we get the Tracking ID and other details.
Now, earlier I had written code in the same routine for updating delivery, creatign shipment and Shipping cost document, but as the Delivery is locked when output type is processed I cannot do this activities in this routine.
I had pondered on the option of creating Z table and storing the response and processing the same Sheduling bacth job but they want to restrict use of Z tables.
I hopes above answers all the three questions.
Thanks
‎2014 Jan 13 6:39 AM
Hi Nilesh
if you have the functuon module for the same you can use the fm to be called in background task. It will get triggered once all locks are released
Nabheet
‎2014 Jan 13 7:42 AM
Hi Nilesh,
- You are connected to PGI! it means it will create the material document ( MKPF,MSEG) - I don't think so it will lock the delivery tables ( LIKP and LIPS). After delivery completion you are creating the PGI.
- After NAST protocol you are trying to update!
- Please check delivery updates should be happend back ground task, if you want use the BAPI- delivery change again.
- before creation of shipment. better to enque the MKPF table
call function 'ENQUEUE_EZ_MKPF'
exporting
mode_mkpf = 'X'
mandt = sy-mandt
mblnr = belnr
mjahr = gjahr
- I have checked in my system - the delivery is not locking once break point triggered in NAST protocol at the time of PGI.
Your Proposal:
* You want to create the IDOC for delivery updates, How you want to process the IDOCs?
* how will you do the shipment creation?
Rg, Kiran
‎2014 Jan 13 7:47 AM
Hi Nabheet,
Didn't work. When I tried to update delivery in the background task, it was triggering the same output type again in a rescursion and finally terminated wit a dump.
Thanks.
‎2014 Jan 13 8:01 AM
Hi Nliesh
First of all why is your output type getting triggered again..? Please check in output type configuration it should not. If that is corrected it will work..
Nabheet
‎2014 Jan 13 8:02 AM
Hi Kiran,
I'm doing the PGI without saving the delivery.
VA02 -> Deliver -> Picking -> PGI. In that case I'm finding that while processing the output type delivery remains locked.
Also, it moves into update task.
I want to create the IDoc and there will be a background job which will process the IDoc after some delay.
Thanks
‎2014 Jan 13 8:13 AM
Oh! I have checked the PGI from Delivery
I understand that you will create the TO and shipment subsequently. After that you will fill the delivery change to IDOC!
Check this! IDOC_OUTPUT_DESADV01
‎2014 Jan 13 8:17 AM
‎2014 Jan 13 8:39 AM