XML Header and Detail record
Posted: Fri Mar 06, 2009 11:38 pm
Hi,
For the following xml as source file, i need to import data in dataset.
<IDOC>
- <ZCOMMHDR>
<ZCOMPANY>8206</ZCOMPANY>
</ZCOMMHDR>
- <ZCOMMDET>
<ZARTICLE>T816028NY00100</ZARTICLE>
</ZCOMMDET>
- <ZCOMMHDR>
<ZCOMPANY>8293</ZCOMPANY>
</ZCOMMHDR>
- <ZCOMMDET>
<ZARTICLE>T816028NY0E0200</ZARTICLE>
</ZCOMMDET>
- <ZCOMMDET>
<ZARTICLE>T313193VE0233</ZARTICLE>
</ZCOMMDET>
</IDOC>
Data should come the following format
<ZCOMPANY>;<ZARTICLE>
1st record : 8206;T816028NY00100
2nd record : 8293;T816028NY0E0200
3rd record : 8293;T313193VE0233
When i marked <ZARTICLE> {lowest element} as key field, i get 3 records as output, but as seen below it is not the required output.
1st record : 8206;T816028NY00100
2nd record : 8206;T816028NY0E0200
3rd reocrd : 8206;T313193VE0233
Can anyone please let me know any workaround for this issue?
For the following xml as source file, i need to import data in dataset.
<IDOC>
- <ZCOMMHDR>
<ZCOMPANY>8206</ZCOMPANY>
</ZCOMMHDR>
- <ZCOMMDET>
<ZARTICLE>T816028NY00100</ZARTICLE>
</ZCOMMDET>
- <ZCOMMHDR>
<ZCOMPANY>8293</ZCOMPANY>
</ZCOMMHDR>
- <ZCOMMDET>
<ZARTICLE>T816028NY0E0200</ZARTICLE>
</ZCOMMDET>
- <ZCOMMDET>
<ZARTICLE>T313193VE0233</ZARTICLE>
</ZCOMMDET>
</IDOC>
Data should come the following format
<ZCOMPANY>;<ZARTICLE>
1st record : 8206;T816028NY00100
2nd record : 8293;T816028NY0E0200
3rd record : 8293;T313193VE0233
When i marked <ZARTICLE> {lowest element} as key field, i get 3 records as output, but as seen below it is not the required output.
1st record : 8206;T816028NY00100
2nd record : 8206;T816028NY0E0200
3rd reocrd : 8206;T313193VE0233
Can anyone please let me know any workaround for this issue?