‎2007 Mar 06 5:52 PM
Hi,
is there an easy way to create a xml string based on a ddic structure?
Its a nested structure and I want to avoid to create all elements manually.
Perfect way would be that i could fill the structure with data and then transform this into a xml string.
for instance:
ls_test-header-name = 'tester'
ls_test-header-county = 'germany'
ls_test-item-material = '4711'
ls_test-item-pos = '1'
should be transformed to:
<?xml version="1.0"?>
<ls_test>
<header>
<name>tester</name>
<country>germany</country>
</header>
<item>
<material>4711</material>
<pos>1</pos>
</item>
</ls_test>
Thanks,
Christoph
‎2007 Mar 06 6:02 PM
Hi,
Please try to use CALL TRANSFORMATION.
CALL TRANSFORMATION id
SOURCE (Internal table)
RESULT (XML string )
Regards,
Ferry Lianto
‎2007 Mar 06 11:18 PM
Hi Christoph,
following link describes the xml transformation suggested above:
http://help.sap.com/saphelp_erp2005vp/helpdata/en/e3/7d4719ca581441b6841f1054ff1326/frameset.htm
and here is a small example
http://help.sap.com/saphelp_erp2005vp/helpdata/en/ae/101640a991c742e10000000a1550b0/frameset.htm
Hope this is helpful.
Regards
Bernd