Adapter for SAP 10.1 | webMethods Adapter for SAP Documentation | webMethods Adapter for SAP Installation and User’s Guide Documentation | Routing Messages Through Adapter for SAP | Mapping IDocs to Other Formats | Mapping IDoc Information to Pipeline Variables
 
Mapping IDoc Information to Pipeline Variables
After transforming the IDoc into a document, you can map the fields of the IDoc to other variables in the pipeline (for example, to variables in a cXML or OAG document). To do this, you must add a MAP operation to the flow, insert document types for the IDoc and the target document, and then map fields in the IDoc to the appropriate variables in the other document.
The following procedure describes how to add the MAP operation to the service and configure the MAP operation to copy values from the IDoc to other variables in the pipeline.
*To map the IDoc to variables in the pipeline
Perform the following steps to add a Document Type describing the content and structure of the IDoc.
1. In Designer, select the Flow tab.
Note:
See webMethods Service Development Help for details.
2. In the Flow Pane, select the iDocToDocument / xmlNodeToDocument operation.
3. Select the Pipeline tab and select the document variable under Pipeline Out.
4. Click the icon on the toolbar and select Document.
5. In the Name field, type the fully-qualified name of the document type you created in Creating a Document Type for Your IDoc, or select it in the Folder tree.
6. Click OK.
7. Type a name for this document and press ENTER. (You can give this Document any name you like, but we suggest that you identify the IDoc in the name.)
When you finish this step, Pipeline Outshould contain a document that defines the structure of your IDoc. (Do not save the flow at this stage, because if you do, the yet unused document will be deleted again from the service...)
8. Take the following steps to map the document variable to the document you just created.
9. In Service Out, select the document variable.
10. In Pipeline Out, select the IDoc document and click Map, or map document to the IDoc document using 'drag and relate':
11. The Pipeline Editor will show a connecting line between document and the IDoc document you created in the previous procedure.