Hands on SAP ME integration or how I studied PI (XI)
As it was well described by my colleague Sam http://scn.sap.com/docs/DOC-52940, SAP MII and SAP PI (XI) are designed with specific use-cases in mind.
Obviously, in case of SAP ME integration SAP MII is preferred and therefore certified and recommended by SAP. Moreover, since ME 6 version and introduction of MEINT Configuration Wizard, the standard integration has become really simple.
However, I have been curious how to integrate SAP ME and ERP system via PI instead of MII as long as it is technically possible. Finally, at the end of the year I was able to fulfill my curiosity and to practice a bit the knowledge that I got during PI (XI) training some time ago.
In this blog I’d like to share with you my experience how I installed PI system and managed to import a Material from ERP to SAP ME via PI omitting MII and ask your opinion about it.
So, here are the steps I made:
- Installed a separate PI Netweaver system. Its name is HPI, this is java only installation. On the same server I have another Netweaver H15 system where SAP ME 15.0 is deployed, but of course it technically can be on separate machines.
- Maintained the SLD. H15 system, where SAP ME is deployed, I entered manually. For the ERP system it is better to use RZ70 transaction import automatically. By the way, Note 2073816 – ‘RZ70 hangs in endless loop’ can help you to save as much time as you were ready to wait J
- Defined Business Systems on top of Technical Systems.
- Maintained ESR. Imported the definition of MATMAS03 iDOC and the corresponding WSDL to my own Software Component.
- Maintained ESR. Defined a Service Interface.
- Defined Communication Channels from ERP and to ME in the Integration Builder.
- Defined a Configuration Scenario.
- Where the Receiver Interface used the mapping from ESR. The mapping editor in ESR is the place where I had the most of fun, because I truly liked it. There you can drag and drop tags to map them, you can define Constants etc.
So, I was able to:
send the iDOC from ERP system -> receive it in PI system -> convert to webservice request as per SAP ME definition -> make a webservice call to SAP ME.
In the meantime monitor the message that is being sent
And eventually get a new Material created in ME
Saying this and sharing the steps I made, I’d like to remind one more time that such integration between ERP and SAP ME is not recommended, that standard integration via MII + MEINT should be used instead.
Nevertheless, I would highly appreciate comments and ratings to this blog post. I am very interested to hear about your experience in SAP ME integration, whether you ever tried PI for it or planned some potential ME integration scenarios.
Do you know if PI supports some kind of workflows where it is possible to have multiple steps executed before message is sent target system? Some of the objects are quite different in ME and ERP and mapping from IDOC to ME call includes logical steps where IDOC data is processed before ME service call. Does PI support other sources of messages exept IDOCs? E.g. ME uses ‘db transport’ – db schema which is accessed from ME and MEINT – is it possible to do this in PI?
Thank you, Evgeniy, for good questions!
There are various types of PI Adapters that define the Communication Channels. Including RFC, File/FTP, JMS, Mail, JDBC etc. This page describes them in some more details:
Adapters Running on the Advanced Adapter Engine - SAP NetWeaver Process Integration Security Guide - SAP Library
So, I think it should be possible to access db schemas of ME/MEINT.
As to the logical steps: I have to research it as yet I am new to PI. Hopefully, I'll find some time already this year. I'll update this blog on my findings.
Hi again, Evgeny 🙂
Since PI 7.31 it is possible to define a customizable scenario-specific staging. To validate the payload for instance. I found a very nice Blog about it, which definitely can recommend:
Furthermore, I tested and verified that mapping with XSLT is possible. XSL filed can be archived and loaded to ESR and then used in Operation Mapping instead of a reference to Message Mapping. Major part of the logic can be implemented there. In my test system I only modified the Description of the Material: added a prefix, but of course it can be more sofisticated if needed.
There is no exactly same functionality as MEINT Workflow to call some [MII] transaction at pre/post XSL Transformation, which is expected as PI (XI) is different product with different use case in mind. However, validation of the payload at staging steps before and after transformation as well as XSL Transformation itself may provide many oportunities for implementation.
Last but not least, in case Message Mapping is used, it is possible to define Functions. It is possible to import used-defined functions for mapping.
With PO(PI+BPM), it is support Business Process Management with PI. Which means it could work as MEINT workflow.
However once customer decide to use PI or other middleware to handle ME ERP integration for some customer purpose, that means they will not treat MEINT work model as reference. So why there need Pre or Post transaction? They can done those in ERP custom functions or ME custom function, then only transport simple message by middleware. This is exactly another extreme rather than MEINT put complex message transformation in middleware.
I can only speak from a CAMS perspective, but I think the integration may be similar to ME. I think that PI should be an option for integration if the PI infrastructure is already in place. There can be a lot of advantages in PI around support and performance vs MII in a role as a pure message broker. I wouldn't stand up PI just for this tho. CAMS-INT on MII is much simpler to implement vs PI for an organization starting from scratch.
Thank you Christian,
I appreciate your feedback, will take it into account for my future testing and learning of PI.
Thank you for sharing your knowledge and exprience! Looking forward to more. 😉
Thank you Nancy!
Glad to hear you find it interesting.
I could imagine, that PI is the best way, if you have to integrate any MES, not from SAP, with SAP ERP. But I don't know SAP MII.
Our own MES, designed in 2004, uses PI to connect to SAP ERP, manufacturing database, warehouse management system and issue tracking system (JIRA). But we don't use any of SAPs IDOCs. All ERP business cases that are needed, are individually implemented as abap proxies at SAP ECC backend.
A short time ago I discovered SAPs Enterprise Services (ES). These are standard SOAP Web services. PI configuration for SOAP web service is very easy because PI is basically a SOA architecture. Furthermore SAP delivers PI content packages for all their ES. So you haven't to hassle with importing WSDL or defining PI configuration objects.
Amongst SAPs ES are some intended to integrate any MES with SAP ERP.
Integration of Manufacturing Execution Systems
Manufacturing Work Instructions
I've done first tests with some of these services, to check if we can move from our proprietary abap proxies at ERP backend to these services.
But it seems, that there are a some bugs and performance problems with these services at ERP backend.