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

Problem converting from XML to ABAP

0 Likes
419

Hi experts,

i am currently experiencing difficulty trying to convert this xml into abap internal table.

I am trying to use XSLT to convert this XML but unsuccessful so far.

<I_DATA>

<NAME1>john</NAME1>

<NAME2>smith</NAME2>

<CONT>

<CONTENT1>STREAM ROAD</CONTENT1>

<CONTENT2>ENGLAND</CONTENT2>

<CONTENT1>CROSS STREET</CONTENT1>

<CONTENT2>MALAYSIA</CONTENT2>

</CONT>

<NAME1>MICHAEL</NAME1>

<NAME2>CAGE</NAME2>

<CONT>

<CONTENT1>HABOUR STREET</CONTENT1>

<CONTENT2>SINGAPORE</CONTENT2>

<CONTENT1>RANCH ROAD</CONTENT1>

<CONTENT2>AMERICA</CONTENT2>

</CONT>

</I_DATA>

This is the internal table:

TYPES: BEGIN OF CONTENT,

CONTENT1(20),

CONTENT2(20),

END OF CONTENT.

TYPES: T_CONTENT TYPE TABLE OF CONTENT.

DATA: BEGIN OF I_DATA_table,

KEY1(10),

KEY2(10),

CONT TYPE T_CONTENT,

END OF I_DATA_table.

DATA: I_DATA type table of I_DATA_TABLE.

Can anyone please shine some light on this?

Many thanks in advance~!

3 REPLIES 3
Read only

Former Member
0 Likes
390
Read only

0 Likes
390

Thanks Sudheer~! but i would like to use XSLT to solve this problem.

Thanks again so much for the information! Points have been awarded.

Read only

0 Likes
390

answered in this thread

Regards

Raja