Skip to Content

In various scenarios, SAP NetWeaver MDM is sending master data to R/3 systems. This article focuses on how an R/3 system can technically confirm that a new record has been created; using standard technologies of PI and R/3 and without using even one line of code. This can be achieved by using a standard R/3 event, and binding it to an ABAP proxy. You need to have at least an ERP system with SAP basis release 6.20 including SAP note 879121 or an ERP system with SAP basis release 6.40. Here I shall show a minimized example of this solution, which can of course be extended in nearly every step to specific requirements.

Below you can see an example business case. A material master is created in MDM and then sent to R/3 using PI as integration platform. In this blog, we shall consider the highlighted part of the process below, beginning with the creation of the material in R/3 (achieved using an IDoc), and subsequent dispatch of the data to PI.


To begin with, you need to know the business object that you are dealing with in this scenario. You may figure this out using R/3 transaction BAPI. In our example we shall use business object BUS1001.




As a prerequisite, you should have a running system landscape, containing MDM, PI and R/3 systems. The aspects of technical connectivity shall not be handled in this article. Besides, the remaining parts of the process have already been presented in other articles on SDN, as an example, in the very good blog SAP NetWeaver Master Data Management (MDM) Posting Confirmation via Exchange Infrastructure. We shall start the design of the process using the Enterprise Services Builder of PI. As a first step, you need to create a data type. In this example I have modeled a minimal version, wherein I send only the material number from R/3 to MDM, whenever a new material is created. This results is a reduced structure for the message, which you may see below



Thereafter, we need to create a message type and reference the new data type in the message type.



In the next step, we create a service interface. As we wish to send data from R/3 to PI, we may choose Category outbound, and reference the newly created message type from the previous step. This is sufficient to set up a proxy communication.



For the next step we log on to the R/3 system and execute transaction code SPROXY to generate the outbound interface. You may search for the message interface which has been created in the previous step, and initiate proxy generation by double-clicking the message interface. In the following dialog, you need to specify a package and prefix. If you do not have a package on your development system, you may create one in a parallel, using the ABAP Development Workbench. When proxy generation is completed, you should activate your ABAP Proxy.





Now we may bind the generated ABAP proxy to standard event CREATED of business object BUS1001. To do this, we may execute transaction SWF_BAM. In the subsequent user dialog, all you need to do is fill out the fields as shown in the screenshot below. In field Proxy Object you should enter the ABAP Name of the generated proxy class, which may be seen using transaction SPROXY.




The linkage may be done by drag and drop. In our example we map the Event _EVT_OBJKEY to the field MATERIAL_NUMBER. You may also add conditions for the binding, however this functionality is not described in the current example.





Now you have everything you need to the set up automated communication between R/3 and PI.



In a real life scenario, you may syndicate a material record from MDM and transfer it to the R/3 system via PI. However in this example, we merely simulate the IDoc posting and create a material manually, using transaction MM01. I chose MDM_CH_TEST2 as sample material number. 





In transaction SWEL you may search for the event. Make sure that event tracing is switched on beforehand using transaction code SWELS. In the screenshot below, you may see that our chosen event was executed and resulted in a call of the generated ABAP proxy. You may take note that R/3 has an event queue, which ensures that events are processed in sequence. This is especially important, when designing scenarios involving mass updates in MDM.



As a result of the above steps, an XML message has been created and sent to PI. You may see the XML file in R/3 by using transaction code SXMB_MONI.




You may also see the message in PI using the same transaction.  All you need to do now is configure PI and transfer the XML file to the appropriate port folder, where the MDM Import Server may pick it up and perform an import. In the associated import map, you may set a specific status for the record in MDM, e.g. “Created in Backend”. As mentioned already at the beginning of this blog, there are various ways to extend this example. You may add conditions to the binding, extend the message structure, use the change event and many more.

To report this post you need to login first.


You must be Logged on to comment or reply to a post.

  1. Alexander Bundschuh
    Hi Rene,

    this is actually a highly demanded requirement from many customers. Just one comment from my side: since you use IDoc anyway for posting the master data in the backend system, you might return an ALEAUDIT to PI instead of using event/proxy. The IDoc adapter converts the ALEAUDIT to an acknowledgement which again has to be converted into an XI message since the file adapter can’t handle acks. This can be configured in PI. However, I’m not sure if it is possible to put the master data information into the ack’s payload, but I would assume so.


    1. Rene Klumberg Post author
      Hi Alex,

      I also did the same scenario using the ALEAUDIT IDoc functionality. I faced the following problems:
      1. PI recognized the ALEAUDIT as an Acknowledgement to the former IDoc and I was not able to route the response message, so I copied the IDoc to a Z-message type in R/3. (Thank you for posting a solution for this in your comment).
      2. I wanted to do a correlation in a ccBPM Process. The ALEAUDIT did not contain the material number, only the former IDoc number it referred to. As the IDoc number is created in the adapter after processing the ccBPM process, it is not available during the runtime of the ccBPM and I was not able to correlate on the IDoc number. So I modified also the creation of the ALEAUDT and added the material number to the IDoc.
      The advantage of using the Event/Proxy is that you can also respond to MDM if you use XI-Adapter from PI to R/3 and you don’t need ABAP development.



Leave a Reply