‎2009 Feb 20 6:19 AM
Hi,
I need to parse XML to internal table.XML will be in the format which i have shown below.
<?xml version="1.0" encoding="utf-8" ?>
-<Msg type="B">
<E_MATERIAL_DETAILS C1="100-100" C2="0000001000" C4="135.98" C0="005056A400D91DDDBFCF2CC4FE631570" C3="ST" tv="005056A400D91DDDBFCF2A849DE9F570" />
<E_MATERIAL_DETAILS C1="100-200" C2="0000001000" C4="72.7" C0="005056A400D91DDDBFCF2CC4FE633570" C3="ST" tv="005056A400D91DDDBFCF2A849DE9F570" />
<E_MATERIAL_DETAILS C1="CH-2050" C2="0000001000" C0="005056A400D91DDDBFCF2CC4FE635570" C3="KG" tv="005056A400D91DDDBFCF2A849DE9F570" />
<E_MATERIAL_DETAILS C1="CH-2060" C2="0000001000" C0="005056A400D91DDDBFCF2CC4FE637570" C3="KG" tv="005056A400D91DDDBFCF2A849DE9F570" />
</Msg>
I have to parse this XML to my internal table..
Internal table structure will be like this..
data : begin of itab occurs 0,
c0(20),
c1(20),
c2(20),
c3(20),
c4(20),
end of itab.
How to achieve this.. Please Guide me..
Regards
Bala.
‎2009 Feb 20 6:22 AM
‎2009 Feb 20 6:23 AM
SEARCH in Scn you have so many posts on the same like these.
[xml to internal table|https://forums.sdn.sap.com/click.jspa?searchID=22566581&messageID=6318699]
‎2009 Feb 20 6:28 AM
hi:
have a look
[Link|http://help.sap.com/saphelp_nw04s/helpdata/en/48/c21940a65ec442e10000000a1550b0/content.htm]
Regards
Shashi
‎2009 Feb 20 7:06 AM
Hi,
I can able to parse into my internal table if the XML is having separate tag for each columns, here the XML is not having separate tag, instead it is having separate tag for each row.
Like this.
<E_MATERIAL_DETAILS C1="100-100" C2="0000001000" C4="135.98" C0="005056A400D91DDDBFCF2CC4FE631570" C3="ST" tv="005056A400D91DDDBFCF2A849DE9F570" />
This is my problem..
Regards
Bala..
‎2009 Feb 20 8:05 AM