cancel
Showing results for 
Search instead for 
Did you mean: 

How to read/parse IDoc without a Connection to a SAP System

Former Member
0 Kudos

Hi there,

i'm hoping to get some help here with reading and parsing IDoc files.

Task:

Receive IDoc Files (Currently Binary, eg. ORDERS05.xlsb, maybe also possible to receive XML IDoc) from a customer and extract information from the IDoc. I'll receive the files, so i don't have access to the SAP System directly.

What i tried:

I optained the JCo and the SAP Java IDoc class library, hoping that this API provides certain functions to read and parse the IDoc files. But after following the Example it seams, that i will need some sort of SAP-Serveraccess for the JCoDestination class:

Part of the example:


JCoDestination destination=JCoDestinationManager.getDestination("BCE");
IDocRepository iDocRepository = JCoIDoc.getIDocRepository(destination);

because repository is needed later:

IDocXMLProcessor processor=iDocFactory.getIDocXMLProcessor();
IDocDocumentList iDocList=processor.parse(iDocRepository, iDocXML);

So for now i have two questions:

+ How can i read/parse XML IDoc files without having access to a SAP Server using the SAP IDoc class Library

+ Is there also a way to read Binary IDoc files (ORDERS05.xlsb), like the one i got for testing purposes

I appreciate any suggestion or help.

Thanks in advance

Hotk3y

Edited by: Hotk3y on Feb 14, 2012 8:56 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member193328
Active Participant
0 Kudos

Hi

You can manually parse the IDoc based on the IDoc XSD that you can get from the ERP System. The logic has to be written by you. You can use DOM or SAX. Alternately you can convert the XML to Java objects using JAXB but this is beneficial if the IDoc you process is same all the time.

Hope this helps.

regards

Partha