SAP NetWeaver PI installation includes a sample adapter that can be used as a template to develop any custom adapter. As, I was unable to find any blog post suggesting step by step detailed configuration to develop the same. I wrote this blog post to describe the steps, to develop custom adapter. Hope this will help SAP PI/PO Developers. This blog post describes how this can be done in NWDS (SAP NetWeaver Development Studio).
Download the .rar file as indicated above. Now, unzip it into local directory and extract all java code from src folder. We can also get the code from OS level at this location: “/usr/sap/POD/J12/j2ee/cluster/apps/sap.com/com.sap.aii.adapter.sample.ra/connector/connectors/com.sap.aii.adapter.sample.ra.rar”. Here, we will get .CLASS files of code. To access the java code, drag and drop the .CLASS files in java decompiler tool i.e. jd-gui. It requires no installation and could be downloaded from : “http://java-decompiler.github.io/” Download the zipped version for windows, then Extract and Run it. 

Copy all java files from Step1 into project directory.
Now, rename the package. After renaming, all files will be modified according to their new package name. It’s time to change some code. Open the SPIManagedConnectionFactory.java file and give values for adapterType and adapterNamespace. 
Add the following two built-in libraries to the project. # SAP Java EE5 Library # XPI Adapter Library
Java project flow will look like as below:
a.) Next, we have to create the RAR project. For this, create a connector project in NWDS.
b.) RAR typically contains the following: # META-INF\connector-j2ee-engine.xml # META-INF\log-configuration.xml #META-INF\Manifest.mf #META-INF\ra.xml *Create these files in META-INF folder. Code for these files are available at the link given below: https://help.sap.com/doc/saphelp_nw73/7.3.16/en-US/3d/0f9f405660f418e10000000a1550b0/content.htm?no_... Now, create three more files in META-INF folder: # META-INF\buildinfo.xml # META-INF\SAP_MANIFEST.MF # META-INF\single-module-dd.xml Code for these files will be available in the rar file downloaded in Step1-1. Now, some code of the above files must be updated as: log-configuration.xml: name="test_ra.trc" pattern="./log/applications/com.samishti.test.adapter.ra/default.trc" <log-controller name="com.samishti.test.adapter.ra" effective-severity="ERROR">
ra.xml: <display-name>test_ra</display-name> <vendor-name>samishti.com</vendor-name> <managedconnectionfactory-class> com.samishti.test.adapter.ra.SPIManagedConnectionFactory</managedconnectionfactory-class> <connectionfactory-impl-class> com.samishti.test.adapter.ra.CCIConnectionFactory</connectionfactory-impl-class> <connection-impl-class>com.samishti.test.adapter.ra.CCIConnection</connection-impl-class> Change config property value of adapter type and adapter namespace: <config-property-value>STA</config-property-value> <config-property-value>http://samishti.com/test/adapter</config-property-value> SAP_MANIFEST.MF: keyvendor: samishti.com keyname: com.samishti.test.adapter.ra name="com.samishti.test.adapter.ra" vendor="samishti.com"
Change these values according to your requirement.
When the object is successfully created, it will provide a default metadata. Overwrite this metadata by importing the modified SampleRA.xml in Step3-i. Now, save and activate this new metadata object.





You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 33 | |
| 21 | |
| 20 | |
| 18 | |
| 17 | |
| 14 | |
| 13 | |
| 10 | |
| 10 | |
| 9 |