To build an adapter module in SAP XI/PI/PO there are many standard step by step SAP documents, blogs etc.. available on SAP SDN.

How this blog is different?

Well, this blog indirectly covers all those common steps but in the form of a EJB, EAR project template to simplify development effort in Netweaver Developer Studio (NWDS)

How to make use of EJB,EAR template?

Quite easy 😉 Download the EJB,EAR template zip file from (Also attached to this blog now) In NWDS, File menu -> Import option wizard (General -> Existing Projects into Workspace) and load the downloaded zip file into your NWDS workspace as EJB, EAR projects

What all changes required to the imported projects?

  1. Right click on both the imported EJB and EAR projects together (use CTRL key) and then in the context menu click validate to see if any errors
  2. Right click on the imported EJB project to configure build path to the mandatory module API jars/external jars ( Beginners, please refer to steps 4.1, 4.2 and 4.7 for required jar files and detailed procedure
  3. Rename (Refactor option in the context menu of right click on EJB project) YourAdapterModule_EJB to desired name as per your project requirement e.g., for this demo I am using ForSDNDemo_EJB
  4. Expand ForSDNDemo_EJB project and then refactor the current java package “yourpackagename” according to your project requirement e.g., for this demo I am using “com.sapsdn.demo” as package for module development. Ignore any errors during this step and continue
  5. Similarly refactor “YourAdapterModuleBean” java file to your own java file. E.g., ForSDNDemoBean. Click Next -> and then Finish. ** Amend the java code according to your requirement with your code
  6. Optional step but it is a good practice: Open file, and then find (CTRL+F) “” and replace with (import extra packages and add your own java code according to your requirement) and also replace yourpackagename with your project package i.e., in this demo com/sapsdn/demo
  7. ** Expand META-INF folder and then open ejb-j2ee-engine.xml -> go to source tab, then change <ejb-name> tag value to ForSDNDemo (same as your EJB project name) from YourAdapterModule. Also, the most important <jndi-name> tag value to your specific jndi-name, for this demo I used  ForSDNDemoJNDI as jndi name in place of YourAdapterModuleJNDI
  8. Similary, change <ejb-name> tag value of ejb-jar.xml to ForSDNDemo (same as your EJB project name)  from YourAdapterModule
  9. Build your EJB project from its context menu when you are done with above steps
  10. Finally rename YourAdapterModule_EAR project to ForSDNDemo _EAR and then export project as SAP EAR File for deployment into XI system by BASIS team (or) directly deploy to XI server from EAR project context menu Run AS -> Run on Server. For direct deployment option please refer 4.11 and 4.12 sections of above step1 reference SAP document

Hope the above procedure is clear and helps you to build your custom module requirement easily. Appreciate your feedback and comments to improvise this blog content

Few important snap shots for above procedure,







Best Regards,

Praveen Gujjeti

To report this post you need to login first.


You must be Logged on to comment or reply to a post.

Leave a Reply