Step-by-step guide to develop Adapter Module to read Excel file in PI/XI
Converting Text Format in the Sender File/FTP Adapter to XML Use. You can convert a text file with complex structures to an XML source format. The file can contain different row formats in logical. PGP is one of the most commonly-used encryption and decryption mechanism used in data transmission across internal and external systems. SAP PI/PO provides out-of-the-box functionality via Adapter Modules to support PGP— utilized to encrypt or decrypt data as well as sign it. If you are developing a module for the sender file/FTP adapter and want to access the file name in the module, see SAP Note819761. You have created a new communication channel or have.
By Jyothi Anagani, Yash Technologies
Before proceeding with the actual scenario, we would discuss about the importance of Adapter module.
Module acts as a special function that is used by an Adapter to provide the additional functionality to the Adapter.
By using File Adapter we can only read .xml files and .txt files (using File Content Conversion).If we want to read an excel sheet, it is not possible by using the normal File Adapter. For this purpose we are developing a module & Deploying it into the sap j2ee server and we will specify the module name in module tab of Communication channel. Then this module will read excel sheet and convert that into an xml format which XI can understand.
Here is a simple example to read data from excel sheet and pass it into the Adapter Framework
The Step By Step Solution to Develop a Simple Adapter Module:
For the module development you have to extract following libraries from your PCK/AF installation:
aii_af_mp.jar à the interface Moduleaii_af_ms_api.jarSteps in SAP Net Weaver Developer Studio
Addheaderline In Fcc Sap Pi
Open SAP Net Weaver Developer Studio.
Steps in SAP Net Weaver Developer Studio
Addheaderline In Fcc Sap Pi
Open SAP Net Weaver Developer Studio.
Create a new Project as J2EE à EJB Module Project.
Fcc Parameters In Sap Pi
ChooseProject à Properties à Java Build Path à LibrariesàAdd External Jars to assign the libraries to your project.
We have to add one more jar file here. That isjxl.jaràto read excel sheet contentYou will find the jxl.jar at this location.http://vonage.otabi.com/activity/lib/jxl.jarand the corresponding API will be found at http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/
Under EJB Module Project select ejbModule folder and Right Click to create a Package.
Right Click on Package à New à Java Class
That Class has to implement SessionBean and Module interfaces
When you create the adapter module your Java class has to implement Module Interface of adapter Module API (com.sap.aii.af.mp.module.Module).
This Module Interface has only one Method process
Write your Business Logic inside this process method ( ie Conversion of Exceel sheet content to xml structure ).
·You get the error message: Bean problem: No Interface classes found. This occurs because there is no Java source available for the EJB interface classes.
Choose the Package Explorer view in the Developer Studio.
Choose your project, and in the context menu, choose Close Project.
Choose Open Project again.
Finally, switch back to the J2EE Explorer view
·Your Class will Look Like this.
Fcc In Sap Pipe
Click here to continue....