Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ddic structure to XML

christoph_rhein1
Associate
Associate
0 Likes
659

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

2 REPLIES 2
Read only

ferry_lianto
Active Contributor
0 Likes
508

Hi,

Please try to use CALL TRANSFORMATION.

CALL TRANSFORMATION id

SOURCE (Internal table)

RESULT (XML string )

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
508

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