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:
- Use pub.flow:savePipelineToFile service at the top of your integration to capture an outbound Idoc from SAP.
- Once you have saved an Idoc, disable the service and use pub.flow:restorePipeLineFromFile to use the captured Idoc to step through your code.
- Next place the sap.idoc:transformFlatToHierarchy service in your flow. The output of this service will be a record called ‘boundNode’.
- Save your flow and step through it.
- 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! ,
- 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.
- Expand all of the levels of boundNode and you will find the DOCNUM field in the EDI_DC40 segment.
- 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.
#Adapters-and-E-Standards#Integration-Server-and-ESB#webMethods