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

Convert itab containing XML format to text format

Former Member
0 Likes
911

Hi,

I have a requirement in which I have to read a file from the application server. The file is in xml format. I have to display the file in ALV format. Can anyone tell me a method that can be used to do this?

Thanks

7 REPLIES 7
Read only

Former Member
0 Likes
871

Hi ,

Use Transformation.

regards,

Vijay

Read only

Former Member
0 Likes
871

Hello,

For Fetching the data from the application server . Use Open Dataset , Read Dataset and Close Dataset.After the getting the data , pass the data to the function module SMUM_XML_PARSE . This FM will convert the data from XML.

Read only

0 Likes
871

Hi,

I have already used the read dataset and have filled my itab with the xml data. but when I am passing the same itab to the FM SMUM_XML_PARSE then it is giving me a dump.

Thanks

Edited by: lydia jacob on Jul 7, 2009 9:02 AM

Read only

0 Likes
871

Hello ,

Before passing the data to SMUM_XML_PARSE . Pass the XML data to the function module 'SCMS_BINARY_TO_XSTRING' for converting the file to string Then call the SMUM_XML_PARSE .It should work.

Read only

Former Member
0 Likes
871

Hi Lydia,

Please look at the code example given in code gallery. Link: [XML|https://wiki.sdn.sap.com/wiki/display/Snippets/SimulatortoreaddatafromaxmlfilestoredintheMIMErepositoryandconvertitintotheinternal+table.].

Regards,

Sai

Read only

Former Member
0 Likes
871

Hi,

This is very simple.

1.First you need to bring the data from the application server by using the opendataset.

Read the data from server into an internal table

2.then transform the data from intrenal table to the data base using read dataset

3.finally close the dataset.

hope this might help you out.

Pooja

Read only

ThomasZloch
Active Contributor
0 Likes
871

The most performant way for XML to ABAP conversion (and vice versa) is the so-called simple transformations, available with release 7.00.

http://help.sap.com/saphelp_nw70/helpdata/EN/e3/7d4719ca581441b6841f1054ff1326/frameset.htm

Thomas