on 09-25-2009 7:15 AM
hi all,
I am doing a POC on exploring custom adapter modules. Can anyone please help me in understanding various possible uses of adapter module?
I already know about creating PDF file, Reading/Writing Excel file, Encode/Decode, setting FileName, Sending attachment through Mail Adapter. Any other possible use of adapter module?
Thanks,
Mayank
Read Multiple attachment content inside adapter module
/people/paras.arora3/blog/2008/04/07/reading-excel-line-items-using-the-jexcel-api
these are for reading Excel file which you already know
refer this http://wiki.sdn.sap.com/wiki/display/stage/AdapterModuleToReadExcelFilewithMultipleRowsandMultiple+Columns
/people/shabarish.vijayakumar/blog/2009/04/05/excel-files--how-to-handle-them-in-sap-xipi-the-alternatives
/people/paras.arora3/blog/2008/04/07/reading-excel-line-items-using-the-jexcel-api
/people/sandeep.jaiswal/blog/2008/05/13/adapter-module-to-stop-processing-of-duplicate-file-ftp-location Adapter Module to stop processing of duplicate file (FTP Location)
/people/amol.joshi2/blog/2007/01/29/rfc-calls-from-adapter-modulesthe-web-service-way RFC calls from Adapter modules...the Web Service Way!
best option is to search SDN using the key adapter module
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
I had tried creating module for reading excel file, as given in blog, i tried to get workbook from bytearrayinputstream using these lines of code.
ByteArrayInputStream byteArr= new ByteArrayInputStream(src);
Workbook wb = Workbook.getWorkbook(byteArr);
I am getting following error: The method getWorkbook(File) in the type Workbook is not applicable for the arguments (byte[])
How can i resolve it?
Thanks,
Mayank
Hi for that you need external libraries like jxl.jar.....You have to add that jar file....
Refer This wiki...
Here I have explained step by step...
https://wiki.sdn.sap.com/wiki/display/stage/AdapterModuleToReadExcelFilewithMultipleRowsandMultiple+Columns
Thanks
Hi Gupta,
Then it may be some mistake....Check the jxl API once...You may be writing some speelling mistake.....
In my WIKI I have provided the link for that API aswell.....Check that wiki and code for syntax....
These 2 import statements should be there.....
import jxl.Cell;
import jxl.Workbook;
and Syntax is like this...
ByteArrayInputStream byteArr= new ByteArrayInputStream(src);
Workbook wb = Workbook.getWorkbook(byteArr);
Check these and let me know for any other issues..
Thanks.
hi Jyothi,
Now i am getting following error:
Error jxl.read.biff.BiffException: Unable to recognize OLE stream
My lines of code are:
System.out.println("01");
FileInputStream fis = new FileInputStream("C:
Documents and Settings
Mayank
Desktop
mayank1.xls");
System.out.println("001");
String str = fis.toString();
System.out.println("0001");
byte src [] = str.getBytes();
System.out.println("00001");
ByteArrayInputStream f5 = new ByteArrayInputStream(src);
System.out.println("000001");
Workbook workbook1 = Workbook.getWorkbook(f5);
System.out.println("000002");
i am using lines because i will be converting xmlpayload to bytestream in actual module code.
And output i am getting is:
01
001
0001
00001
000001
Error jxl.read.biff.BiffException: Unable to recognize OLE stream
which means there is some problem in line
Workbook workbook1 = Workbook.getWorkbook(f5);
Also when i am reading file using:
Workbook workbook = Workbook.getWorkbook(new FileInputStream("C:
Documents and Settings
Mayank
Desktop
mayank1.xls")); ,, it's working.
Thanks,
Mayank
hi all,
While creating EJB adapter module we need to create ejb-jar.xml file and in this file we need to add following:
<home>com.sap.aii.af.lib.mp.module.ModuleHome</home>
<remote>com.sap.aii.af.lib.mp.module.ModuleRemote</remote>
<local-home>com.sap.aii.af.lib.mp.module.ModuleLocalHome</local-home>
<local>com.sap.aii.af.lib.mp.module.ModuleLocal</local>
what is the use of these elements?
Thanks,
Mayank
HI Mayank,
This is regarding the blog Adapter module to read excel file -java code required for PI 7.1
I'm completely new to Java Background and also new to Module's concept as well.
I'm trying to develop the adapter module as given in the below link:
[http://wiki.sdn.sap.com/wiki/display/ABAP/AdapterModuleToReadExcelFilewithMultipleRowsandMultiple+Columns]
But unable to create jar file because I'm unable to create EJB Candidate.
My doubt is where can I save the class file given in the above link.
Could you please help me out here.
Regards,
Prajwal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Prajwal,
You have to create EJB project and then EAR project that will be used to deploy on PI server.
Please follow the link below on how to create EJB module in PI 7.1:
Before starting developing the module, download required JAR files from PI server location: Please check link below for same:
https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/wheretogetthelibrariesforXI+development
After creating the module you need to deploy it on PI server. Please check:
Thanks,
Mayank
hi Prajwal,
You have to create EJB project and then EAR project that will be used to deploy on PI server.
Please follow the link below on how to create EJB module in PI 7.1:
Before starting developing the module, download required JAR files from PI server location: Please check link below for same:
https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/wheretogetthelibrariesforXI+development
After creating the module you need to deploy it on PI server. Please check:
Thanks,
Mayank
Hi Mayank,
You can also try to validate EDI document in Adapter module..Developing a custom adapter module to validate EDI documents is also a part of handling EDI in PI environment.for this you need to have a basic knowledge on EDI at the same time this approach is very limited and small EDI documents.Please refer the approach Custom-Built approach in the following link on handling EDI in PI by SOA evangelist AXEL Angeli.
https://wiki.sdn.sap.com/wiki/display/bpxproj/EDI%20with%20PI
Thanks,
Ram.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.