Using IDoc Interfaces in BPM

You can send an Intermediate Document (IDoc) from an SAP R/3 system to SAP BPM. This topic describes the needed steps for using IDoc interfaces in BPM.

An IDoc cannot be directly imported into SAP BPM. The WSDL generated from an imported IDoc in the Enterprise Services Repository (ES Repository) is not WS-I compliant. Therefore, runtime issues can occur when BPM tries to consume the service interface.

To use IDoc interfaces in BPM, you need to perform the following steps:
  1. Modifying the WSDLModifying the WSDL
  2. Creating Service InterfacesCreating Service Interfaces
  3. Creating MappingsCreating Mappings
  4. Creating an Integration FlowCreating an Integration Flow
  5. Modeling a BPM processModeling a BPM process
  6. Sending the IDoc from the R/3 System Sending the IDoc from the R/3 System

Modifying the WSDL

When an IDoc is imported from an R/3 system into the ES Repository not all attributes that are needed on the receiver side (BPM) are generated. Therefore, you need to modify certain tags of the imported WSDL to enable the consumption of the imported IDoc by BPM:
  1. After you have successfully imported the IDoc, open the IDoc, go to the WSDL tab, and export the WSDL into a file.
  2. Make a copy of the WSDL file and in this copy, do the changes that are described in the following steps.
  3. For the xsd:schema, set the targetNamespace attribute to "urn:sap-com:document:sap:idoc:messages" and the xmlns attribute to "urn:sap-com:document:sap:idoc:messages".
  4. For the <WSDL:definitions> element, set the xmlns attribute to "urn:sap-com:document:sap:idoc:messages".
  5. Import the modified WSDL file as an external service definition (SI_R).
  6. Save and activate your changes.

For more information, see 1414292 Information published on SAP site

Creating Service Interfaces

Create service interfaces with the attributes as shown in the following table:
Field Sender Interface Receiver Interface
Category Abstract Abstract
Interface Pattern Stateless XI 3.0 Compatible Stateless XI 3.0 Compatible
Mode Asynchronous Asynchronous
Request Type IDoc External Definition
For more information, see Creating Service Interfaces or Services.

Creating Mappings

  1. In the ES Repository, you need to create a message mapping between the source (as IDoc) and the target (as external definition) because the sender and receiver do not use the same schema. For more information, see Message Mappings.
  2. Create an operation mapping between source (the imported and not modified interface SI_S, that means the sender interface) and target (the modified interface SI_R, that means the receiver interface). For more information, see Operation Mapping and Using Operation Mappings (PI) in a BPM Process.
  3. Assign the message mapping to this operation mapping.
  4. Save and activate your changes.

Creating an Integration Flow

In the Developer Studio, with the SAP Process Integration Designer, create an integration flow. For more information about creating integration flows, see .
  1. Create an integration flow with the following attributes:
    Field Sender Receiver
    Interface SI_S SI_R
    Adapter Idoc_AAE SOAP, XI 3.0, JPR URL
  2. Assign the operation mapping you created before to this integration flow.
  3. Save, activate and deploy your changes.

Modeling a BPM process

In the Developer Studio, with the Process Composer, model a BPM process. For more information about modeling BPM processes, see Modeling Processes with Process Composer

  1. Create a new Process Composer Development Component.

    For more information, see Creating a Project

  2. Import the service interface SI_R from the ES Repository.

    The data types are created in the namespace "urn:sap-com:document:sap:idoc:messages" as we changed before.

    For more information about the import of service interfaces, see Importing Service Interface Definitions

  3. Assign this service interface to the start event of your BPM process.

    For more information, see Modeling Events.

  4. Crate a data object and map it in the Output Mapping of the event.

    For more information, see Creating Data Objects and Working with Data Mappings.

Sending the IDoc from the R/3 System

  1. Trigger the IDoc from the R/3 system.
  2. Check whether the messages have been delivered.

    You can monitor the messages using the Message Monitor. To open the Message Monitor, log on to the SAP NetWeaver Administrator (URL: http://<host>:<port>/nwa), and go to Start of the navigation pathAvailablility and Performance Next navigation step Process Monitoring Next navigation step Message MonitorEnd of the navigation path.

  3. Check whether the BPM process started and the context data has been updated according to the sentvalues.

    In the SAP NetWeaver Administrator (URL: http://<host>:<port>/nwa), go to Start of the navigation pathOperations Next navigation step Processes and Tasks Next navigation step Manage ProcessesEnd of the navigation path