We are currently planning on communicating with a partner that is running SAP via Idoc files .xml
We already communicate via .xml but with our schema structure, now I´m trying to modify my .xsd to get data from the Idoc WMTORD which contains a tag EILTORH which contains tags occurs once and one tag EILTORI which occurs many times
My question is which type should I use, I tried to make the two types sequence and all on the same tag, and it doesn´t work
<xsd:element name="E1LTORH" type = "E1LTORHType" minOccurs="0"/>
<xsd:complexType name="E1LTORHType">
<xsd:sequence maxOccurs="unbounded">
<xsd:element name="LGNUM" type="xsd:string" minOccurs="0" />
<xsd:element name="TANUM" type="xsd:string" minOccurs="0" />
<xsd:element name="E1LTORI" type="E1LTORIType" minOccurs="0" />
</xsd:sequence>
<xsd:complexType name="E1LTORIType">
<xsd:all maxOccurs="1">
<xsd:element name="Operation" type="OperationType"minOccurs="0"/>
<xsd:element name="TAPOS" type="xsd:integer" minOccurs="0" />
<xsd:element name="MATNR" type="xsd:string" minOccurs="0" />
<xsd:element name="WERKS" type="xsd:string" minOccurs="0" />
<xsd:element name="CHARG" type="xsd:string" minOccurs="0" />
<xsd:element name="MEINS" type="xsd:string" minOccurs="0" />
<xsd:element name="LETYP" type="xsd:string" minOccurs="0" />
</xsd:all>
<xsd:attribute name="SEGMENT" type="xsd:string" />
</xsd:complexType>
Below an example of the file
<E1LTORH SEGMENT="1">
<LGNUM>B02</LGNUM>
<TANUM>0100000024</TANUM>
<BWLVS>999</BWLVS>
<TRART>X</TRART>
<BNAME>GUPET</BNAME>
<PERNR>00000000</PERNR>
<SOLWM> 0.000</SOLWM>
<SOLEX> 0.000</SOLEX>
<ISTWM> 0.000</ISTWM>
<STDAT>00000000</STDAT>
<ENDAT>00000000</ENDAT>
<STUZT>000000</STUZT>
<ENUZT>000000</ENUZT>
<SWABW>0000</SWABW>
<TAPRI>00</TAPRI>
<E1LTORI SEGMENT="1">
<TAPOS>0001</TAPOS>
<MATNR>ISA46290</MATNR>
<WERKS>BP02</WERKS>
<CHARG>L01.01</CHARG>
<MEINS>ST</MEINS>
<LETYP>BT1</LETYP>
<KZQUI>X</KZQUI>
<WDATU>20181212</WDATU>
<WENUM>4900002737</WENUM>
<WEPOS>0001</WEPOS>
<VLTYP>MEC</VLTYP>
<VLBER>001</VLBER>
<VLPLA>TRANSTOCK</VLPLA>
<VSOLM>10.000</VSOLM>
<NLTYP>PCO</NLTYP>
<NLBER>001</NLBER>
<NLPLA>PCO-B-3A</NLPLA>
<NSOLM>10.000</NSOLM>
<MAKTX>Bleomycin complex A2/B2 ISA</MAKTX>
<NLENR>00000000002000000823</NLENR>
<QPLOS>000000000000</QPLOS>
<QPLOA>000000000000</QPLOA>
<LGORT>ETA2</LGORT>
<SOLPO> 0.000</SOLPO>
<VOLUM> 0.000</VOLUM>
<NPLEI>1</NPLEI>
<NWIRM> 0.000</NWIRM>
</E1LTORI>
</E1LTORH>