I have been looking at some sample code on exporting data from SAP to XML pass an internal table to FM's SDIXML_DATA_TO_DOM and then to SDIXML_DOM_TO_XML. Since tables are flat the structure always seems to be pretty flat, I'm interested to create a layered XML output such as...
<?xml version="1.0" encoding="iso-8859-1" ?> <ORDERS_HEADER> <sales_order>123456789</sales_order> <sales_date>20100410</sales_date> <ORDERS_DETAILS> <line_id>1</line_id> <material>12345678</material> </ORDERS_DETAILS> <ORDERS_DETAILS> <line_id>2</line_id> <material>987654</material> </ORDERS_DETAILS> </ORDERS_HEADER>
Where I have header data with multiple iterations of detail data, the above desired output has only one order but ideal I'd like to fill a format such as this with 1,000s of orders with numerous lines on each .
Any examples or insight is appreciated.