‎2009 Jul 07 7:27 AM
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
‎2009 Jul 07 7:28 AM
‎2009 Jul 07 7:42 AM
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.
‎2009 Jul 07 8:02 AM
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
‎2009 Jul 07 8:06 AM
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.
‎2009 Jul 07 9:36 AM
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
‎2009 Jul 07 9:51 AM
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
‎2009 Jul 07 9:59 AM
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