Setting IDOC processing status

I have configured IS 4.6 to receive and process IDOCs sent by SAP R/3. On successful completion of processing, the IDOC status in SAP is still shown as Status= 03 “Data passed to port OK”.
I would like to know, how to set the IDOC processing status in SAP for the processed IDOC.



You need to call the RFC ‘WDLD_EDI_STATUS_SET’. Pass it the Idoc number(s) and status.

Good luck,

Hi Devan,

this sounds interesting. But from where do you get the IDoc-No? The only thing I see in the pipeline after sending it is the TID. Sorry, I’m new to this…


Hi Gunter,

Sorry for the delay in answering your question. The Idoc number is stored in the Idoc control record. Since you are new to this I would suggest the following:

  1. Use pub.flow:savePipelineToFile service at the top of your integration to capture an outbound Idoc from SAP.
  2. Once you have saved an Idoc, disable the service and use pub.flow:restorePipeLineFromFile to use the captured Idoc to step through your code.
  3. Next place the sap.idoc:transformFlatToHierarchy service in your flow. The output of this service will be a record called ‘boundNode’.
  4. Save your flow and step through it.
  5. After the restorePipeLineFromFile service has executed, look at the results tab. You will see a number of strings, records, and record lists. The IDOC_CONTROL_REC_40 record list shows the Idoc number in the DOCNUM field. The IDOC_DATA_REC_40 record list shows the actual SAP data. This is just an FYI…be sure to read the footnote below! ,
  6. After the transformFlatToHierarchy service executes, look at the results tab again and study the contents of ‘boundNode’. boundNode will look exactly like the Idoc structure found in R/3. This is the record you will use to map your data.
  7. Expand all of the levels of boundNode and you will find the DOCNUM field in the EDI_DC40 segment.
  8. Code the rest of your integration mapping and looping as necessary. The DOCNUM field from boundNode should be mapped to the DOCNUM field of the PI_T_WDLSP import table required by the RFC. Be sure to set the proper status in PI_STATUS whenever you actually call the RFC.

FOOTNOTE: Before you call the RFC, make sure the pipeline is as clean as possible. If you have any variables in there from previous interactions with SAP, they may interfere with your current call. For example, check out the variables in the pipeline after step 5 above. You should drop them ALL.

I understand how to get the idoc number for outbound idocs from SAP. How do I get an idoc number for inbound idocs to SAP?

Using the opposite steps in the example above:

  1. sap.idoc:transformHierachyToFlat outputs the IDOC_CONTROL_REC_40 record list, which is the inbound idoc to SAP but without the idoc number.

Is there a way to know what idoc numbers were created in SAP after the RFC?

Hi Rebecca,

I’m not an ABAP expert, so I really don’t know of a way to easily retrieve the Idoc number that was assigned to the inbound message. The RFC mentioned above will not give you that functionality. Basically, SAP assigns a range of Idoc numbers to each app server, so depending on which app server you hit your message will be assigned a number in that range.

I would talk with the ALE guru on your project to find out if there is a way to configure the ALE Layer to return the Idoc numbers that are assigned to the messages when they post. They may need to write a custom program to do this because the flow service created from the inbound routing rule does not return the numbers.


Hi Rebecca,

I have posted my suggestion for a solution under “SAP: Get IDoc number via and get IDoc status via IDoc number”.



hi Devan,

I want to set IDoc processing status for Incoming IDocs(to IS).
Can you please give me(or direct me to) the details of RFC WDLD_EDI_STATUS_SET. (I’m new to SAP R/3 interfacing).

thanks in advance…

You need to pass the IDOC Number as a record list along with the appropriate status. For the exact definition of the RFC, use the Lookup Feature in the SAP adapter and specify the RFC name. It will give you all the export and import parameters.

I did post a file to wMusers shareware about a year ago to do just this. Pass the IDOC number and the required status ## to the service.