cancel
Showing results for 
Search instead for 
Did you mean: 

xml schema of ordrsp

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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).

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks harald

Former Member
0 Kudos

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

Former Member
0 Kudos

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.