‎2008 Jun 09 9:52 PM
Do you have any information about reading a XML File from ABAP?
‎2008 Jun 09 10:38 PM
‎2008 Jun 09 11:29 PM
‎2008 Jun 10 7:40 AM
Hi ,
see this demo program TST_CL_FX_READER .
also do search in SE38 with TST_CL* you will get some more programs .
Tthank you .
Regards ,
Kumar.
‎2008 Jun 10 8:08 AM
use these two functions,
but first you have to download xml to a string with another function. It matter with respect to the source. For example if you want to take it from net u use CALL FUNCTION 'HTTP_GET'
but i dont know how to read a local file. But you can find it with a search.
At the end you will have the xml in an internal table. Then you can again parse it for your own usage.
Hope it will help
&----
*& Form str_to_xstr
&----
text
----
-->PV_PAGE text
-->BUFFER text
----
FORM STR_TO_XSTR USING PV_PAGE TYPE STRING
CHANGING BUFFER.
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
TEXT = PV_PAGE
MIMETYPE = ' '
ENCODING =
IMPORTING
BUFFER = BUFFER
EXCEPTIONS
FAILED = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "str_to_xstr
*
FORM PARSEXML TABLES XMLTABLE RETURN
USING BUFFER.
CALL FUNCTION 'SMUM_XML_PARSE'
EXPORTING
XML_INPUT = BUFFER
TABLES
XML_TABLE = XMLTABLE
RETURN = RETURN.
ENDFORM. "parsexml
‎2008 Sep 02 12:12 PM
Read this, it might help you:
Best wishes,
Jan
Edited by: Jan Krohn on Jul 15, 2011 10:54 AM