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

converting an internal table containing XML file data into normal internal

Former Member
0 Likes
506

Hi all,

i'am working with a scenario where we have to read data from an XML file into a internal table and then upload that into any transactions like MM01 r XK01 like that.

now i copied the data from the XML file using some interfaces supporting XML conversions and now the data is present in a internal table declared in the abap program. the declaration of that internal table is

TYPES: BEGIN OF t_xml_line,

data(256) TYPE x,

END OF t_xml_line.

DATA: l_xml_table TYPE TABLE OF t_xml_line,

l_xml_line TYPE t_xml_line,

l_xml_table_size TYPE i.

DATA: l_filename TYPE string.

now all the data read from the XML file has been copied into the internal table along with the tags of the XML. now i want those tags of XML to be removed and data alone to be copied into another intenal table.

CAN ANYONE HELP ME OUT FROM THIS SCENARIO.

Thanks,

anil.

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
480

What SAP release are you working with?

Regards,

Rich Heilman

4 REPLIES 4
Read only

Former Member
0 Likes
480

do this way....

declare another internal table with fields....

loop at itab1.

split itab1 at <delimiter> into itab2.

append itab2.

endloop.

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
481

What SAP release are you working with?

Regards,

Rich Heilman

Read only

0 Likes
480

If you are on a fairly new release, you may be able to use transformations.

http://help.sap.com/saphelp_nw2004s/helpdata/en/e3/7d4719ca581441b6841f1054ff1326/frameset.htm

Regards,

Rich Heilman

Read only

Former Member
0 Likes
480

thanks to ramesh babu and rich heilman.