XML Support for IDocs English

From Theobald Software

Jump to: navigation, search

ERPConnect offers support for both IDoc schema and IDoc data located in XML-files. The two figures below show a IDoc schema file (for the ORDERS01 type) and an IDoc data file. Both are also included in the samples directory.


To create an IDoc object out of the schema we use the method LoadIdocSchema. After doing so, it is possible to create segment objects by using the method CreateSegment (as we did in the other ORDER-Example). The example below shows how to load the IDoc data from a data file by using the method LoadXMLData.

[C#]

R3Connection con = new R3Connection();
if (!con.AskUserAndOpen(true))
    return;
 
Idoc i = new Idoc();
i.Connection = con;
 
i.LoadIdocSchema(@"ORDERS01.xsd");
i.LoadXMLData(@"OrderIdoc.xml");
 
i.Send();
 
con.Close();

[VB]

Dim con As R3Connection = New R3Connection
  If (Not con.AskUserAndOpen(True)) Then
      Return
  End If
 
  Dim i As Idoc = New Idoc
  i.Connection = con
 
  i.LoadIdocSchema("ORDERS01.xsd")
  i.LoadXMLData("OrderIdoc.xml")
 
  i.Send()
 
 con.Close()
DeutschEnglish
Personal tools
Navigation
XtractQL Provider
Xtract RS