Parsing an IDoc in XML format using SAP Java IDoc Class Library

℡╲_俬逩灬. 提交于 2019-12-01 04:40:38

Without the respective IDoc meta data you cannot interpret the XML data as an SAP IDoc. Without having this IDoc meta data, the IDoc-XML document is just some hierarchically structured bunch of strings.

And the only way for the SAP Java IDoc Class Library to get the IDoc meta data is to query it from some SAP System - at least this is valid for the current version 3.0.12 of the JIDocLib. So the answer to both of your questions is unfortunately: NO.

Of course, you can parse the IDoc-XML with a standard XML parser like any other arbitrary XML document.

Lanzelot

Perhaps you want to take a look at the SAP Business Connector: it can create IDocDocument objects from IDoc-XML without having a connection to an SAP system. You can then work with these IDoc objects in Java. The metadata information (field-offset and -length for each segment in the IDoc) is only needed at the point, where you actually want to send the IDoc into an SAP system. But as apparently you don't need to do this, you should be fine without metadata information.

SAP BC Homepage: https://support.sap.com/sbc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!