06-18-2009 3:57 PM
Hi, I have this xml file in my local directory: /usr/sap/tmp/vestiario.xml with this structure:
<NewDataSet>
<elenco>
<MATRMEC>005724Y</MATRMEC>
<CODTAGLIAART>T108 </CODTAGLIAART>
<CODTAGLIA>8 </CODTAGLIA>
<DESCRIZIONEMATERIALE>GUANTI DI PELLE UOMO </DESCRIZIONEMATERIALE>
</elenco>
<elenco>
<MATRMEC>036097E</MATRMEC>
<CODTAGLIAART>T42 </CODTAGLIAART>
<CODTAGLIA>2 </CODTAGLIA>
<DESCRIZIONEMATERIALE>CALZE COLLANT </DESCRIZIONEMATERIALE>
</elenco>
</NewDataSet>
Now I want to read this xml and fill an internal table with data.
How can I do it step by step?
Help me please. THANKS
06-18-2009 4:16 PM
Create a [Simple Transformation|http://help.sap.com/saphelp_nw04/helpdata/en/a9/001540bf1af72ee10000000a1550b0/frameset.htm] and call it from your ABAP program. More info in previous discussions in these forums.
Thomas
06-18-2009 4:13 PM
06-18-2009 4:16 PM
Create a [Simple Transformation|http://help.sap.com/saphelp_nw04/helpdata/en/a9/001540bf1af72ee10000000a1550b0/frameset.htm] and call it from your ABAP program. More info in previous discussions in these forums.
Thomas
06-19-2009 10:28 AM
I created this XSLT for my XML but it does not work fine. Can someone help me please?
<?sap.transform simple?>
<tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
<tt:root name="T_ELENCO" type="?"/>
<tt:root name="MATRICOLA" type="?"/>
<tt:root name="TAGLIA" type="?"/>
<tt:root name="CODICE" type="?"/>
<tt:root name="DESCRIZ" type="?"/>
<tt:template>
<NewDataSet>
<tt:loop name="elenco" ref="T_ELENCO">
<elenco>
<MATRMEC><tt:value ref="MATRICOLA"/></MATRMEC>
<CODTAGLIAART><tt:value ref="TAGLIA"/></CODTAGLIAART>
<CODTAGLIA><tt:value ref="CODICE"/></CODTAGLIA>
<DESCRIZIONEMATERIALE><tt:value ref="DESCRIZ"/></DESCRIZIONEMATERIALE>
<elenco>
</tt:loop>
</NewDataSet>
</tt:template>
</tt:transform>