on 12-22-2009 5:47 AM
Hi,
How can i get the xml schema of idoc ordrsp in sap.And also how to build xml in java using Sapjco3.0 and sapidoc3.0.
Regards
Sri
Hi,
Xml building means ,i want to resend the idoc in the xml format from java to SAP.How can i read each segment by segment and how can i set the values.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As mentioned in my previous post look at interface IDocSegment. There you have several choices for parsing an existing IDoc ranging from several methods for getting another segment (e.g. check getNext() method) or various iterators (e.g. getDescendantsIterator() method).
For changing any values or setting values in an IDocSegment you'd utilize the methods available within this interface due to parent interface IDocRecord (check that interface for the corresponding getters and setters).
Thanks harald
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Thanks harald.
I want some more information.With out creating new idoc, is it possible to use already existing idoc and to set some values and resend to SAP.
Thanks Sri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Sri,
You can get the XML schema of an IDoc in SAP via transaction WE60. There you can choose menu entry Documentation -> XML schema assuming that you're on a high enough release (I think 4.70 and higher is sufficient, in 4.6c you can only generate DTD's, but no schemas). Otherwise an XI system is always handy, because there you can easily generate schemas for any IDocs.
I'm not quite sure I understand the question about building XML. Do you want to create an XML IDoc and then use an IDocXMLProcessor class to parse it? Maybe you can elaborate a bit what you want to achieve.
Cheers, harald
p.s.: When creating an IDoc via JCo3 IDoc library you might not need any XML processing. I.e. you could create your IDoc via the IDocFactory (which you get from <i>JCoIDoc</i>) and then get the root segment from your IDocDocument via method getRootSegment(). Once you have the IDocSegment class you can add additional segments via methods addChild or addSibling, depending on your IDoc hierarchy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.