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?
XML Header and Detail record
Moderators: chulett, rschirm, roy
The retrieval that you see is correct. Article, as a part of ZCOMMDET is an entirely separate repeating group from anything in ZCOMMHDR. They may "look" like a parent child relationship, but they are not.... to get the results you are looking for, ZCOMMHDR would have to be entirely wrapping the ZCOMMDET element. In this document they are equal. Without resorting to changes in xpath, you could just have two links, and then a counter to match them up later.
Ernie
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>