RATE THIS ANSWER
0
Click to Vote:
0
0
Last Answered:
Mar 18 2008 0:31 AM GMT
by Lakiwi
For as long as I have used IDoc function from an external system they have never returned the IDoc number. I once customised the function INBOUND_IDOC_PROCESS as it literally doesn't copy the IDoc number into the original IDOC_CONTROL structure and that is all. If you debug the function it has the newly created IDoc number inside the function module and then proceeds to do nothing with it. That has been happening since at least SAP 3.0 and does not surprise me that it was never fixed. Basically unless you copy the FM and add in the code to copy the IDoc number to the structure you will never get the number back in the external system. In the case of the function INBOUND_IDOC_PROCESS I simply updated the passed in control record in the table with the resulting IDoc number from the function call IDOC_CREATE_ON_DATABASE. This FM was easier to copy and modify as the work is done in the FMs called inside and the final call to IDOC_CREATE_ON_DATABASE. You'll find the FM you mention calls the same function eventually, so you may wish to look at using this instead.
Sorry for the bad news.
Cheers,
Jason