IDoc creation function not returning Idoc number

25 pts.
Tags:
iDoc
SAP development
Hi. I am working on the requirement to send data from SAP to non-SAP system and I using the IDoc creation function 'MASTER_IDOC_DISTRIBUTE'. I am having issue with it. It is not returning Idoc numbers that it created even though it has in Table parameter COMMUNICATION_IDOC_CONTROL = I_EDIDC. I checked everything and it looks fine. I do not know what is missing. Can anyone help how to get Idoc numbers. Will it send one Idoc number or multiple? Will reward point who can help me solve the issue. Samantha777

Answer Wiki

Thanks. We'll let you know when a new response is added.

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

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Cfilandro
    We may have had a similiar issue in the past. When our middleware wanted to create an IDOC, they were calling IDOC_INBOUND_ASYNCHRONOUS. This had the same problem of not returning the IDOC number. However, you can instead call IDOC_INBOUND_SINGLE and it does return an IDOC number. This was inbound (into SAP)...not sure it can help you if you are trying to create outbound IDOCs.......but just in case it gives you any ideas. Chris
    180 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following