Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
alexander_teslyuk
Product and Topic Expert
Product and Topic Expert
1,136


I decided to make some more advanced integration and write this separate Blog post based on the comments to the first Blog that I wrote about ME integration via PI http://scn.sap.com/community/manufacturing/blog/2015/12/12/hands-on-sap-me-integration-or-how-i-lear...

 

The main feature that I discovered since then, is that it is possible to define more than 1 mapping step and thus implement PRE/POST XSLT steps.

In my sample scenario the first step is a Message Mapping step (iDOC to iDOC) that selects only needed tags from the incoming iDOC



 

and makes a transformation of one of its fields (Description) based on the string concatenation rule:



 

So, the inbound scenario I implemented looks like this:

 

iDOC is sent from ERP -> received by PI -> as PRE XSLT step, the initial iDOC is converted to another one with modifications using the capabilities of PI -> the modified iDOC is transformed by the XSL to the SOAP request -> the SOAP request is received and processed by SAP ME

 

 

Here is a screenshot of the imported Material with 2 times modified Description field. Prefix Alex+ was added by the XSL transformation, suffix +IDOC2IDOC was added at PRE XSLT step:


 

The main point was, of course, not to modify the iDOC before XSL transformation, but actually to show that it is possible to define the PRE or POST XSLT steps. Since it is possible to define a Java Class at PRE/POST XSLT step to be executed instead of a Message Mapping, any custom code can be executed within it (not necessarily for mapping purposes). Just at the end it should return the message to the next mapping (in this case XSL transformation) step.

 

 

I am looking forward for your comments. Your comments to my first PI Blog helped me to study PI deeper and in a right direction, so this Blog on how to implement PRE/POST XSLT steps was born.

 

I also hope you find information about ME integration via PI as much interesting as I do. Your Likes and Ratings would be appreciated.

 

 

Best  regards,

Alex.

2 Comments