cancel
Showing results for 
Search instead for 
Did you mean: 

How to fetch data from XML and store it in internal table

Former Member
0 Kudos

Hi All,

Can anyone help me out, in fetching data from xml and store it in an internal table. Is there any standard function module is there?

Regards,

Karthick

Accepted Solutions (0)

Answers (3)

Answers (3)

GrahamRobbo
Active Contributor
0 Kudos

Hi Karti,

look at the XML stuff in SAP Help. http://help.sap.com/saphelp_47x200/helpdata/en/47/b5413acdb62f70e10000000a114084/frameset.htm

The iXML library is quite extensive.

Cheers

Graham

athavanraja
Active Contributor
0 Kudos

to do this you can either develop a XSLT program and use it with CALL TRNSFORMATION key word to tranform the XML into itab .

(search the ABAP General forum, i have posted few samples)

or simply use the following FM which converts your XML into a itab of name value pair (name would holw the element name and value would hold the value of the element) which you can then loop and read it to your itb.

data:             xmldata type xstring .
data: result_xml type standard table of smum_xmltb .
data: return type standard table of bapiret2 .

CALL FUNCTION 'SMUM_XML_PARSE'
  EXPORTING
    xml_input       = xmldata
  TABLES
    xml_table       = result_xml
    return          = return .

Regards

Raja

Former Member
0 Kudos

There are loads of function modules that handle XML (286 in R/3 Enterprise), but they are to specific tables. They also cover input and output.

Can you be a bit more specific?

Try searching SE37 for XML.

We use SAP XI for communicating XML between systems and SAP.

Other useful websites are: http://www.se37.com

and http://ifr.sap.com/catalog/query.asp