Java Mapping for PI 7.1 using Abstract transformation class

By Jayanth Kumar N, Accenture

Before looking at how to use the PI 7.1 API for JAVA Mapping let us look at few new features the latest API for JAVA Mapping offer and how are they different from SAP NW 7.0 and 2004 API.

1.     In PI 7.1 Each XI Java mapping program must extends the abstract class AbstractTransformation. Until PI 7.0 each JAVA Mapping class use to implement interface StreamTransformation

2.     Each JAVA Mapping using program 7.1 API must implement the method transform(TransformationInput in, TransformationOutput out) as oppose to execute Method in earlier version.

3.     In the JAVA Mapping using program 7.1 API  trace Object (AbstractTrace) is obtained using getTrace() Method of AbstractTransformation class, whereas until PI 7.0 for getting an instance of trace object method setParameter was used which took a java.util.Map as input that contained the AbstractTrace.  

The document is about latest Java Mapping for PI 7.1 using Abstract transformation class in SAP XI Technology . Please click here for the Java Mapping code.  

The Java Code would convert the flat file to an XML format. This was a sample example taken to explain the usage of the Java Mapping. For the sample files, click here.  

The Java Mapping code is designed in such a way which would reuse the same memory defined in String Buffers, which would be using less memory. Because the same data would be used and rotated with in the same memory.   

I didn’t use any of the parser to convert the flat file to XML. Usage of DOM and SAX Parsers depends on the size of file which is used. I wanted to contribute that there is also another way of converting the flat file to XML without using any of the parsers. All types of type castings are done in the code.  


Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image