Skip to Content

Idoc to SAP BPM Scenario


What is an IDoc?

IDoc or Intermediate Document is an SAP document format for business transaction data transfers. 
This blog describes the detailed steps to be followed for setting up and sending an IDoc from an SAP R3 system to SAP BPM via SAP PI  in a Process Orchestration setup.


An IDoc cannot be directly imported into SAP BPM.  The WSDL generated from an imported IDoc in ESR is not WS-I compliant – hence you may face runtime issues when BPM tries to consume the service interface created of IDoc type.

Let us see how we can overcome this constraint and have the scenario run successfully.

Creation of Design objects

Creation of wsdls

The IDoc we import from an SAP R/3 system will be used on the sender side but we cannot use this on the receiver side (BPM) because it is not WS-I compliant as mentioned in the earlier section.  We need to modify certain tags before using it on the receiver side. (Note:1414292)

  1. Import the IDoc from corresponding R/3 system in ESR.
    1. Open ESR,  right click on Imported objects, provide R3 system details and import IDoc (A)
      This will be used in the sender interface – let us denote this as ‘A’.
  2. After the import is successful, open the IDoc, switch to the WSDL tab and Export the WSDL into a file
  3. Make a copy of the WSDL and edit it to reflect the following changes:
    1. Set the targetNamespace attribute to “urn:sap-com:document:sap:idoc:messages” and xmlns attribute to “urn:sap-com:document:sap:idoc:messages” for the xsd:schema
    2. Set the xmlns attribute to “urn:sap-com:document:sap:idoc:messages” for the <WSDL:definition> element
      Refer to the image below for an example.
    3. Import the modified WSDL as an external definition. (B)
      This will be used in the receiver interface – let us denote this as ‘B’.
    4. Save and Activate all the changes.


Note : To set a relevant type for a data object in BPM for an element, there needs to be a name associated with the complex type.

For example.. Below is the structure of the exported idoc in ESR

<xsd:element name=”HRCC1UPTEVEN01″><xsd:complexType><xsd:sequence><xsd:element name=”IDOC” type=”HRCC1UPTEVEN.HRCC1UPTEVEN01″/></xsd:sequence></xsd:complexType>

We need to have an associated name to the complex type as shown below.

<xsd:element name=”HRCC1UPTEVEN01″ type=”named_example_complex_type><xsd:complexType name=”named_example_complex_type><xsd:sequence><xsd:element name=”IDOC” type=”HRCC1UPTEVEN.HRCC1UPTEVEN01″/></xsd:sequence></xsd:complexType>

Creation of Service Interfaces

  1. Create these Interfaces with the listed attributes.
Field Sender Interface (SI_A) Receiver Interface (SI_B)
Category Abstract Abstract
Interface pattern Stateless XI 3.0 Compatible Stateless XI 3.0 Compatible
Mode Asynchronous Asynchronous
Request Type Idoc External Definition (3.d in Creation of wsdl section)

  2. Save and Activate all the changes.

Creation of Mappings

  1. Create a Message Mapping with source as IDoc (A) and target as External Definition (B)
    Note : This is required as the sender and receiver do not use the same schema.
  2. Perform the mapping with the corresponding field
  3. Create an Operation Mapping with source as Sender Interface (SI_A) and Target as Receiver Inteface (SI_B)
  4. Assign the message mapping to this operation mapping
    Save and Activate all the changes

Creation of Integration Flows

  1. Create an Iflow with following attributes
    Field Sender Receiver
    Interface SI_A SI_B
    Adapter Idoc_AAE SOAP, XI 3.0, JPR URL
  2. Assign the operation Mapping created to this integration Flow.
  3. Save , Activate and deploy all the changes

Modelling BPM Process

  1. Create a new Process Composer Development Project
  2. Import the SI_B from ESR under service Interfaces tab.
  3. The data types should be created under a namespace “urn:sap-com:document:sap:idoc:messages
  4. Assign this to the SE of the BPM Process
  5. Create a data object and map in Output Mapping
  6. Build and Deploy the processes

Note : The WSDL might have errors  as “s4s-att-invalid-value: Invalid attribute value for ‘maxOccurs’ in element ‘element’.
Recorded reason: cvc-datatype-valid.1.2.1: ‘9999999999’ is not a valid value for ‘nonNegativeInteger’.”
This can be ignored.

Sending IDoc from R/3 System

  1. Trigger the IDoc from the R/3 system.
  2. Monitor the messages using the Message Monitor page in NWA. Verify that they have been delivered.
  3. The BPM Process should be started and the context data should be updated in the corresponding sent fields. This can be monitored in Manage Processes Page in NWA.

You must be Logged on to comment or reply to a post.
  • Hi Preethi,

    Thanks for your great blog.As you suggested I have followed point no:3 .When I’m trying to import the wsdl(SI) into BPM ,I’m getting below error .Could you please share your thoughts on this as early as possible.

    >>>An internal error occurred during: “Importing MOIN models for XSDs and WSDLs…”.

    java.lang.OutOfMemoryError: Java heap space

    at java.util.ArrayList.<init>(

    at org.eclipse.xsd.impl.XSDParticleImpl$XSDNFA.initialize(

    at org.eclipse.xsd.impl.XSDParticleImpl$XSDNFA.<init>(

    at org.eclipse.xsd.impl.XSDParticleImpl$XSDNFA.initialize(

    at org.eclipse.xsd.impl.XSDParticleImpl$XSDNFA.<init>(

    at org.eclipse.xsd.impl.XSDParticleImpl$XSDNFA.initialize(

    at org.eclipse.xsd.impl.XSDParticleImpl$XSDNFA.<init>(

    at org.eclipse.xsd.impl.XSDParticleImpl.getDFA(

    at org.eclipse.xsd.impl.XSDModelGroupImpl.validateRoot(

    at org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.validate(

    at org.eclipse.xsd.impl.XSDConcreteComponentImpl.validate(

    at org.eclipse.xsd.impl.XSDSchemaImpl.validate(

















  • Hi Venkat,

    Sorry, I was on vacation and could not respond earlier. Can you please confirm if you imported this wsdl from ESR ?

    Meanwhile, let me check from my end by importing this wsdl.



    • Hi Preethi,

      I imported the WSDL structure of the IDOC ZIPSPLO as external definition into the BPMN as per your blog, the only I am not doing is “To set a relevant type for a data object in BPM for an element, there needs to be a name associated with the complex type”.

      When I see the Data Object structure in BPMN I am missing the node IDOC, as shown in the screenshot. Did you come accross an issue like this and is it something to do with setting up the relevant type for a data object? Please suggest.Capture.PNG

  • Hello Venkat,

    The reason of the import failure is maxOccurs=”9999999999″. This value is greater than the limit of an Integer number in Java. That’s why the Eclipse EMF API cannot validate the document and the import in the BPM process fails. See SAP Note No 1988746.

    Best regards,


  • In Java world such great values as maxOccurs=”9999999999″ should not be ignored. Such a Web Service cannot be invoked from Java Application Server also. The same OutOfMemory will arise. The more proper value in the WSDL would be maxOccurs=”unbounded” according to the specification.