<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Loading XML document into Internal Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/loading-xml-document-into-internal-table/m-p/2316205#M507937</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have system SAP 4.6C. Is there any way how to read the data to internal table(s).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 May 2007 09:22:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-28T09:22:57Z</dc:date>
    <item>
      <title>Loading XML document into Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loading-xml-document-into-internal-table/m-p/2316205#M507937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have system SAP 4.6C. Is there any way how to read the data to internal table(s).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2007 09:22:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loading-xml-document-into-internal-table/m-p/2316205#M507937</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-28T09:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: Loading XML document into Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loading-xml-document-into-internal-table/m-p/2316206#M507938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try below code &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've commented several lines. Here is an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report z_xit_xml_check&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report z_xit_xml_check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class cl_ixml definition load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type-pools: ixml.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of t_xml_line,&lt;/P&gt;&lt;P&gt;data(256) type x,&lt;/P&gt;&lt;P&gt;end of t_xml_line,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;begin of tsfixml,&lt;/P&gt;&lt;P&gt;data(1024) type c,&lt;/P&gt;&lt;P&gt;end of tsfixml.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: l_ixml type ref to if_ixml,&lt;/P&gt;&lt;P&gt;l_streamfactory type ref to if_ixml_stream_factory,&lt;/P&gt;&lt;P&gt;l_parser type ref to if_ixml_parser,&lt;/P&gt;&lt;P&gt;l_istream type ref to if_ixml_istream,&lt;/P&gt;&lt;P&gt;l_document type ref to if_ixml_document,&lt;/P&gt;&lt;P&gt;l_node type ref to if_ixml_node,&lt;/P&gt;&lt;P&gt;l_xmldata type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: l_elem type ref to if_ixml_element,&lt;/P&gt;&lt;P&gt;l_root_node type ref to if_ixml_node,&lt;/P&gt;&lt;P&gt;l_next_node type ref to if_ixml_node,&lt;/P&gt;&lt;P&gt;l_name type string,&lt;/P&gt;&lt;P&gt;l_iterator type ref to if_ixml_node_iterator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: l_xml_table type table of t_xml_line,&lt;/P&gt;&lt;P&gt;l_xml_line type t_xml_line,&lt;/P&gt;&lt;P&gt;l_xml_table_size type i.&lt;/P&gt;&lt;P&gt;data: l_filename type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: pa_file type char1024 default&lt;/P&gt;&lt;P&gt;'d:\joao\desenvolvimentos\fi\fact\teste.xml'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Validation of XML file: Only DTD included in xml document is supported&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;parameters: pa_val type char1 as checkbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Creating the main iXML factory&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;l_ixml = cl_ixml=&amp;gt;create( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Creating a stream factory&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;l_streamfactory = l_ixml-&amp;gt;create_stream_factory( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform get_xml_table changing l_xml_table_size l_xml_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;wrap the table containing the file into a stream&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;l_istream = l_streamfactory-&amp;gt;create_istream_itable( table =&lt;/P&gt;&lt;P&gt;l_xml_table&lt;/P&gt;&lt;P&gt;size =&lt;/P&gt;&lt;P&gt;l_xml_table_size ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Creating a document&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;l_document = l_ixml-&amp;gt;create_document( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create a Parser&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;l_parser = l_ixml-&amp;gt;create_parser( stream_factory = l_streamfactory&lt;/P&gt;&lt;P&gt;istream = l_istream&lt;/P&gt;&lt;P&gt;document = l_document ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Validate a document&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if pa_val eq 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;l_parser-&amp;gt;set_validating( mode = if_ixml_parser=&amp;gt;co_validate ).&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Parse the stream&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if l_parser-&amp;gt;parse( ) ne 0.&lt;/P&gt;&lt;P&gt;if l_parser-&amp;gt;num_errors( ) ne 0.&lt;/P&gt;&lt;P&gt;data: parseerror type ref to if_ixml_parse_error,&lt;/P&gt;&lt;P&gt;str type string,&lt;/P&gt;&lt;P&gt;i type i,&lt;/P&gt;&lt;P&gt;count type i,&lt;/P&gt;&lt;P&gt;index type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count = l_parser-&amp;gt;num_errors( ).&lt;/P&gt;&lt;P&gt;write: count, ' parse errors have occured:'.&lt;/P&gt;&lt;P&gt;index = 0.&lt;/P&gt;&lt;P&gt;while index &amp;lt; count.&lt;/P&gt;&lt;P&gt;parseerror = l_parser-&amp;gt;get_error( index = index ).&lt;/P&gt;&lt;P&gt;i = parseerror-&amp;gt;get_line( ).&lt;/P&gt;&lt;P&gt;write: 'line: ', i.&lt;/P&gt;&lt;P&gt;i = parseerror-&amp;gt;get_column( ).&lt;/P&gt;&lt;P&gt;write: 'column: ', i.&lt;/P&gt;&lt;P&gt;str = parseerror-&amp;gt;get_reason( ).&lt;/P&gt;&lt;P&gt;write: str.&lt;/P&gt;&lt;P&gt;index = index + 1.&lt;/P&gt;&lt;P&gt;endwhile.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Process the document&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if l_parser-&amp;gt;is_dom_generating( ) eq 'X'.&lt;/P&gt;&lt;P&gt;perform process_dom using l_document.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form get_xml_table&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form get_xml_table changing l_xml_table_size type i&lt;/P&gt;&lt;P&gt;l_xml_table type standard table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Local variable declaration&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data: l_len type i,&lt;/P&gt;&lt;P&gt;l_len2 type i,&lt;/P&gt;&lt;P&gt;l_tab type tsfixml,&lt;/P&gt;&lt;P&gt;l_content type string,&lt;/P&gt;&lt;P&gt;l_str1 type string,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;c_conv TYPE REF TO cl_abap_conv_in_ce,&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;l_itab type table of string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_filename = pa_file.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;upload a file from the client's workstation&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call method cl_gui_frontend_services=&amp;gt;gui_upload&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;filename = l_filename&lt;/P&gt;&lt;P&gt;filetype = 'BIN'&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;filelength = l_xml_table_size&lt;/P&gt;&lt;P&gt;changing&lt;/P&gt;&lt;P&gt;data_tab = l_xml_table&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;others = 19.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;message id sy-msgid type sy-msgty number sy-msgno&lt;/P&gt;&lt;P&gt;with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Writing the XML document to the screen&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CLEAR l_str1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;LOOP AT l_xml_table INTO l_xml_line.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;c_conv = cl_abap_conv_in_ce=&amp;gt;create( input = l_xml_line-data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*replacement = space ).&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;c_conv-&amp;gt;read( IMPORTING data = l_content len = l_len ).&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CONCATENATE l_str1 l_content INTO l_str1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;l_str1 = l_str1+0(l_xml_table_size).&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SPLIT l_str1 AT cl_abap_char_utilities=&amp;gt;cr_lf INTO TABLE l_itab.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WRITE: /.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WRITE: /' XML File'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WRITE: /.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;LOOP AT l_itab INTO l_str1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=&amp;gt;horizontal_tab&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*IN&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;l_str1 WITH space.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WRITE: / l_str1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WRITE: /.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endform. "get_xml_table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form process_dom&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form process_dom using document type ref to if_ixml_document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: node type ref to if_ixml_node,&lt;/P&gt;&lt;P&gt;iterator type ref to if_ixml_node_iterator,&lt;/P&gt;&lt;P&gt;nodemap type ref to if_ixml_named_node_map,&lt;/P&gt;&lt;P&gt;attr type ref to if_ixml_node,&lt;/P&gt;&lt;P&gt;name type string,&lt;/P&gt;&lt;P&gt;prefix type string,&lt;/P&gt;&lt;P&gt;value type string,&lt;/P&gt;&lt;P&gt;indent type i,&lt;/P&gt;&lt;P&gt;count type i,&lt;/P&gt;&lt;P&gt;index type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: name2 type string,&lt;/P&gt;&lt;P&gt;name_root type string,&lt;/P&gt;&lt;P&gt;node_parent type ref to if_ixml_node,&lt;/P&gt;&lt;P&gt;node_root type ref to if_ixml_node,&lt;/P&gt;&lt;P&gt;num_children type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;node ?= document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check not node is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;uline.&lt;/P&gt;&lt;P&gt;write: /.&lt;/P&gt;&lt;P&gt;write: /' DOM-TREE'.&lt;/P&gt;&lt;P&gt;write: /.&lt;/P&gt;&lt;P&gt;if node is initial. exit. endif.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;create a node iterator&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;iterator = node-&amp;gt;create_iterator( ).&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;get current node&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;node = iterator-&amp;gt;get_next( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;loop over all nodes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;while not node is initial.&lt;/P&gt;&lt;P&gt;indent = node-&amp;gt;get_height( ) * 2.&lt;/P&gt;&lt;P&gt;indent = indent + 20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;num_children = node-&amp;gt;num_children( ).&lt;/P&gt;&lt;P&gt;case node-&amp;gt;get_type( ).&lt;/P&gt;&lt;P&gt;when if_ixml_node=&amp;gt;co_node_element.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;element node&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;name = node-&amp;gt;get_name( ).&lt;/P&gt;&lt;P&gt;nodemap = node-&amp;gt;get_attributes( ).&lt;/P&gt;&lt;P&gt;node_root = node-&amp;gt;get_root( ).&lt;/P&gt;&lt;P&gt;name_root = node_root-&amp;gt;get_name( ).&lt;/P&gt;&lt;P&gt;write: / 'ELEMENT :'.&lt;/P&gt;&lt;P&gt;write: at indent name color col_positive inverse.&lt;/P&gt;&lt;P&gt;write: 'NUM_CHILDREN:', num_children.&lt;/P&gt;&lt;P&gt;write: 'ROOT:', name_root.&lt;/P&gt;&lt;P&gt;node_parent = node-&amp;gt;get_parent( ).&lt;/P&gt;&lt;P&gt;name2 = node_parent-&amp;gt;get_name( ).&lt;/P&gt;&lt;P&gt;write: 'NAME2: ' , name2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not nodemap is initial.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;attributes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;count = nodemap-&amp;gt;get_length( ).&lt;/P&gt;&lt;P&gt;do count times.&lt;/P&gt;&lt;P&gt;index = sy-index - 1.&lt;/P&gt;&lt;P&gt;attr = nodemap-&amp;gt;get_item( index ).&lt;/P&gt;&lt;P&gt;name = attr-&amp;gt;get_name( ).&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;prefix = attr-&amp;gt;get_namespace_prefix( ).&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;value = attr-&amp;gt;get_value( ).&lt;/P&gt;&lt;P&gt;write: / 'ATTRIBUTE:'.&lt;/P&gt;&lt;P&gt;write: at indent name color col_heading inverse, '=',&lt;/P&gt;&lt;P&gt;value color col_total inverse.&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;when if_ixml_node=&amp;gt;co_node_text or&lt;/P&gt;&lt;P&gt;if_ixml_node=&amp;gt;co_node_cdata_section.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;text node&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;value = node-&amp;gt;get_value( ).&lt;/P&gt;&lt;P&gt;write: / 'VALUE :'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;mjprocha&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;node_parent = node-&amp;gt;get_parent( ).&lt;/P&gt;&lt;P&gt;write: at indent value color col_group inverse.&lt;/P&gt;&lt;P&gt;name2 = node_parent-&amp;gt;get_name( ).&lt;/P&gt;&lt;P&gt;write: 'NAME2: ' , name2.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;advance to next node&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;node = iterator-&amp;gt;get_next( ).&lt;/P&gt;&lt;P&gt;endwhile.&lt;/P&gt;&lt;P&gt;endform. "process_dom&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR chk this blog&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/people/r.eijpe/blog/2005/11/21/xml-dom-processing-in-abap-part-ii--convert-an-xml-file-into-an-abap-table-using-sap-dom-approach &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or Try this :&lt;/P&gt;&lt;P&gt;SMUM_XML_PARSE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it is Helpful to you..&lt;/P&gt;&lt;P&gt;Mark helful asnwers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Tushar Mundlik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2007 09:34:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loading-xml-document-into-internal-table/m-p/2316206#M507938</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-28T09:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: Loading XML document into Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loading-xml-document-into-internal-table/m-p/2316207#M507939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the below links, this is useful for you &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/people/tobias.trapp/blog/2006/10/06/xml-processing-in-abap-part-9-150-abap-processing-using-xslt&lt;/P&gt;&lt;P&gt;&lt;A href="http://searchtechtarget.techtarget.com/generic/0,295582,sid21_gci1207657,00.html" target="test_blank"&gt;http://searchtechtarget.techtarget.com/generic/0,295582,sid21_gci1207657,00.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2604363"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/15ecdf90-0201-0010-d792-941a3c3c30a4" target="test_blank"&gt;http://sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/15ecdf90-0201-0010-d792-941a3c3c30a4&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/d-f/from%20xml%20to%20abap%20data%20structures%20and%20back%20bridging%20the%20gap%20with%20xslt" target="test_blank"&gt;https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/d-f/from%20xml%20to%20abap%20data%20structures%20and%20back%20bridging%20the%20gap%20with%20xslt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****do rewards if usefull&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2007 09:46:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loading-xml-document-into-internal-table/m-p/2316207#M507939</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-28T09:46:04Z</dc:date>
    </item>
  </channel>
</rss>

