XML Templates
The IDoc class of ERPConnect offers support for both the IDoc schema and IDoc data located in XML-files.
The IDoc-Schema-Generator provided by ERPConnect generates an XML file that can be used to load IDoc schemas.
Loading IDoc schemas via XML usually has higher performance than loading them via CreateIdoc
or CreateEmptyIdoc
, because no SAP connection is necessary.
Note
IDoc schema files contain the structure of an IDoc while IDoc data files contain the actual content of the IDoc.
Create XML Templates
- Run the IdocSchemaGenerator.exe in the ERPConnect directory
C:\Program Files\ERPConnect
to start the IDoc-Schema-Generator. - Enter the IDoc type you want to generate. If needed, enter enhancements.
- Click [Generate Now!].
- The window "SAP Login" opens. Enter your SAP credentials and click [OK].
- Save the XML file to your local hard drive.
Example of an *ORDERS01* IDoc schema
xml version="1.0" encoding="ISO-8859-1" ?>
- <ORDERS01>
- <IDOC>
- <EDI_DC40>
<TABNAM>EDI_DC40TABNAM>
<IDOCTYP>ORDERS01IDOCTYP>
<MESTYP>ORDERS>MESTYP>
<SNDPRT>KUSNDPRT>
EDI_DC40>
<E1EDK01 />
- <E1EDK01>
<MENGE>10MENGE>
- <E1EDP10>
<QUALF>002QUALF>
<IDTNR>100-100IDTNR>
E1EDP19>
Use XML Templates
- Create an XML template using the tool IDocSchemaGenerator.exe located in the ERPConnect installation directory.
- Use the method
LoadIdocSchema
tool to create an IDoc object from a schema file. - Load the IDoc data from a data file with the method
LoadXMLData
.
How to use XML Templates | |
---|---|
Last update: June 4, 2024