Using PI 7.1 API for Java mapping


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, where as 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

4.    One of the most useful features of the 7.1 JAVA API is now it supports parameters in the mapping (inline with parameterized message mapping). This feature is not available with older version of JAVA Mapping API.

5.    A DynamicConfiguration is a map containing adapter specific message attributes. It associates DynamicConfigurationKeys with string values. The DynamicConfiguration object is obtained using method getDynamicConfiguration()of class com.sap.aii.mapping.api.TransformationInput. In earlier version the DynamicConfiguration object is obtained using method get of java.util.Map as DynamicConfiguration conf = (DynamicConfiguration) param.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

To access the mapping API in a JAVA project in SAP NetWeaver Developer Studio either refer to http://help.sap.com/saphelp_nwpi71/helpdata/en/bd/c91241c738f423e10000000a155106/content.htm

Or add the com.sap.xpi.ib.mapping.lib.jar to your JAVA project as an external jar to JAVA Build path.

Refer to the link  below for sample JAVA mapping code illustrating PI 7.1 API usage.

https://wiki.sdn.sap.com/wiki/x/RYDUAw

Labels

pi pi Delete
71 71 Delete
api api Delete
java java Delete
mapping mapping Delete
program program Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.