<?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 Re: Convert XML to SAP internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-xml-to-sap-internal-table/m-p/7538405#M1562141</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;It has 2 part one is source code and another is the XML file&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;create an XML file with the data provided in the last 2.&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;then place it in a path mention the path in the below source.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. Complete code for converting XML to internal table in SAP.&lt;/STRONG&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; Report  ZTST_PGM02&lt;/P&gt;&lt;P&gt;*&amp;amp;&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;&lt;/P&gt;&lt;P&gt;*&amp;amp;&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;&lt;/P&gt;&lt;P&gt;REPORT  ZTST_PGM02.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Load iXML Lib.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;type-pools: ixml.&lt;/P&gt;&lt;P&gt;class cl_ixml definition load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: G_IXML type ref to if_ixml.&lt;/P&gt;&lt;P&gt;data: STREAMFACTORY type ref to if_ixml_stream_factory.&lt;/P&gt;&lt;P&gt;data: ISTREAM type ref to if_ixml_istream.&lt;/P&gt;&lt;P&gt;data: DOCUMENT type ref to if_ixml_document.&lt;/P&gt;&lt;P&gt;data: PARSER type ref to if_ixml_parser.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: LV_FILE_URL type rlgrap-filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;You should provide the parameter for file name&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LV_FILE_URL = 'D:\navps\input_xml.xml'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of XML_LINE,&lt;/P&gt;&lt;P&gt;        DATA(256) type x,&lt;/P&gt;&lt;P&gt;      end of XML_LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of TY_HEADER,&lt;/P&gt;&lt;P&gt;         CUST_NAME(20)     type c,&lt;/P&gt;&lt;P&gt;         CARD_NO(20)       type c,&lt;/P&gt;&lt;P&gt;         TAX_AMOUNT(10)    type c,&lt;/P&gt;&lt;P&gt;         TOTAL_AMOUNT(10)  type c,&lt;/P&gt;&lt;P&gt;       end of TY_HEADER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of TY_ITEM,&lt;/P&gt;&lt;P&gt;         ITEM_NO(4)      type n,&lt;/P&gt;&lt;P&gt;         ITEM_ID(20)     type c,&lt;/P&gt;&lt;P&gt;         ITEM_TITLE(50)  type c,&lt;/P&gt;&lt;P&gt;         ITEM_QTY(10)    type c,&lt;/P&gt;&lt;P&gt;         ITEM_UPRICE(10) type c,&lt;/P&gt;&lt;P&gt;       end of TY_ITEM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: GV_HEADER type TY_HEADER.&lt;/P&gt;&lt;P&gt;data: GT_ITEM   type standard table of TY_ITEM  with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: XML_TABLE      type table of XML_LINE,&lt;/P&gt;&lt;P&gt;      XML_TABLE_SIZE type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The next step is creating the main factory for the iXML library:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;G_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;Now Create Stream Factory&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;STREAMFACTORY = G_IXML-&amp;gt;create_stream_factory( ).&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;upload a file from the client's workstation&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call function 'WS_UPLOAD'&lt;/P&gt;&lt;P&gt;     exporting&lt;/P&gt;&lt;P&gt;          filename   = LV_FILE_URL&lt;/P&gt;&lt;P&gt;          filetype   = 'BIN'&lt;/P&gt;&lt;P&gt;     importing&lt;/P&gt;&lt;P&gt;          filelength = XML_TABLE_SIZE&lt;/P&gt;&lt;P&gt;     tables&lt;/P&gt;&lt;P&gt;          data_tab   = XML_TABLE&lt;/P&gt;&lt;P&gt;     exceptions&lt;/P&gt;&lt;P&gt;          others     = 11.&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;ISTREAM = STREAMFACTORY-&amp;gt;create_istream_itable( table = XML_TABLE&lt;/P&gt;&lt;P&gt;                                                size  = XML_TABLE_SIZE )&lt;/P&gt;&lt;P&gt;.&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;Get the file data as Stream&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*istream = streamfactory-&amp;gt;create_istream_uri( public_id = lv_file_url&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                                            system_id = lv_file_url ).&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create XML Document instance&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DOCUMENT = G_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 parser Object&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;PARSER = G_IXML-&amp;gt;create_parser( stream_factory = STREAMFACTORY&lt;/P&gt;&lt;P&gt;                                ISTREAM = istream&lt;/P&gt;&lt;P&gt;                                DOCUMENT = document ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Parse an XML document into a DOM tree&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*parser-&amp;gt;parse( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Parsing Error Processing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if PARSER-&amp;gt;parse( ) ne 0.&lt;/P&gt;&lt;P&gt;  if 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 = 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 = 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;Close the stream since it #s not needed anymore&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call method ISTREAM-&amp;gt;close( ).&lt;/P&gt;&lt;P&gt;clear ISTREAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Now try to make it look good&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; data : lv_size     type sytabix,&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        lv_ret_code type sysubrc.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; data: lo_xml_document type ref to cl_xml_document.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; field-symbols: &amp;lt;fs_xml_data&amp;gt; type any table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; lo_xml_document = document.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; call method lo_xml_document-&amp;gt;get_as_table&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   importing&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     table   = &amp;lt;fs_xml_data&amp;gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     size    = lv_size&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     retcode = lv_ret_code&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*data: items type ref to if_ixml_node_collection.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*items = document-&amp;gt;get_elements_by_tag_name( name = 'Item' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*data: iterator type ref to if_ixml_node_iterator,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     node     type ref to if_ixml_node.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*iterator = document-&amp;gt;create_iterator( ).&lt;/P&gt;&lt;P&gt;*node = iterator-&amp;gt;get_next( ).&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*while not node is initial.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;do something with the node&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; ...&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; node = iterator-&amp;gt;get_next( ).&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*endwhile.&lt;/P&gt;&lt;P&gt;DATA : GV_NODE type ref to if_ixml_node.&lt;/P&gt;&lt;P&gt;DATA : GV_NODETEXT type STRING.&lt;/P&gt;&lt;P&gt;data:  GV_FIRST_TIME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GV_FIRST_TIME = 'X'.&lt;/P&gt;&lt;P&gt;GV_NODE = DOCUMENT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GT_ITEM-item_no = 1.&lt;/P&gt;&lt;P&gt;perform GET_DATA tables     GT_ITEM&lt;/P&gt;&lt;P&gt;                 using      GV_NODE&lt;/P&gt;&lt;P&gt;                 changing   GV_HEADER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Last item is still not added.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  append GT_ITEM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write  : GV_HEADER-cust_name,&lt;/P&gt;&lt;P&gt;         GV_HEADER-card_no,&lt;/P&gt;&lt;P&gt;         GV_HEADER-tax_amount,&lt;/P&gt;&lt;P&gt;         GV_HEADER-total_amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at GT_ITEM.&lt;/P&gt;&lt;P&gt;  write  /:.&lt;/P&gt;&lt;P&gt;  write  : GT_ITEM-item_no,&lt;/P&gt;&lt;P&gt;           GT_ITEM-item_id,&lt;/P&gt;&lt;P&gt;           GT_ITEM-item_title,&lt;/P&gt;&lt;P&gt;           GT_ITEM-item_qty,&lt;/P&gt;&lt;P&gt;           GT_ITEM-item_uprice.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      FORM Get_data                                                 *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form get_data tables   YT_ITEM    structure GT_ITEM&lt;/P&gt;&lt;P&gt;              using value(x_node) type ref to if_ixml_node&lt;/P&gt;&lt;P&gt;              changing Y_HEADER   type TY_HEADER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: INDENT      type i.&lt;/P&gt;&lt;P&gt;  data: PTEXT       type ref to if_ixml_text.&lt;/P&gt;&lt;P&gt;  data: STRING      type string.&lt;/P&gt;&lt;P&gt;  data: TEMP_STRING(100).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  case X_NODE-&amp;gt;get_type( ).&lt;/P&gt;&lt;P&gt;    when if_ixml_node=&amp;gt;co_node_element.&lt;/P&gt;&lt;P&gt;      STRING = X_NODE-&amp;gt;get_name( ).&lt;/P&gt;&lt;P&gt;      GV_NODETEXT = STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    when if_ixml_node=&amp;gt;co_node_text.&lt;/P&gt;&lt;P&gt;      PTEXT ?= X_NODE-&amp;gt;query_interface( IXML_IID_TEXT ).&lt;/P&gt;&lt;P&gt;      if PTEXT-&amp;gt;ws_only( ) is initial.&lt;/P&gt;&lt;P&gt;        STRING = X_NODE-&amp;gt;get_value( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        case GV_NODETEXT.&lt;/P&gt;&lt;P&gt;          when 'Customer'.&lt;/P&gt;&lt;P&gt;            clear GV_HEADER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          when 'Name'.&lt;/P&gt;&lt;P&gt;            move STRING to GV_HEADER-cust_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          when 'Cardnum'.&lt;/P&gt;&lt;P&gt;            move STRING to GV_HEADER-card_no.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          when 'Tax'.&lt;/P&gt;&lt;P&gt;            move STRING to GV_HEADER-tax_amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          when 'Total'.&lt;/P&gt;&lt;P&gt;            move STRING to GV_HEADER-total_amount.&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;        Iteam details&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          when 'ID'.&lt;/P&gt;&lt;P&gt;            move STRING to GT_ITEM-item_id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          when 'Title'.&lt;/P&gt;&lt;P&gt;            move STRING to TEMP_STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            move TEMP_STRING to GT_ITEM-item_title.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          when 'Quantity'.&lt;/P&gt;&lt;P&gt;            move STRING to GT_ITEM-item_qty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          when 'UnitPrice'.&lt;/P&gt;&lt;P&gt;            move STRING to GT_ITEM-item_uprice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;  endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if GV_NODETEXT = 'Customer'.&lt;/P&gt;&lt;P&gt;    clear GV_HEADER.&lt;/P&gt;&lt;P&gt;  elseif GV_NODETEXT = 'Item'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if GV_FIRST_TIME ne 'X'.&lt;/P&gt;&lt;P&gt;       append GT_ITEM.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     clear : gt_item.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       GT_ITEM-item_no = gt_item-item_no + 1.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;    GV_FIRST_TIME = ' '.&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;Get the next child&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  X_NODE = x_node-&amp;gt;get_first_child( ).&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Recurse&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  while not X_NODE is initial.&lt;/P&gt;&lt;P&gt;    perform GET_DATA tables     GT_ITEM&lt;/P&gt;&lt;P&gt;                     using      X_NODE&lt;/P&gt;&lt;P&gt;                     changing   GV_HEADER.&lt;/P&gt;&lt;P&gt;    X_NODE = x_node-&amp;gt;get_next( ).&lt;/P&gt;&lt;P&gt;  endwhile.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Create an XML file with the following DATA given below and place it in the path mentioned above source code.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. XML File DATA. You create an XML File in this format to test the same.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*************************************************************************************&lt;/P&gt;&lt;P&gt;  &amp;lt;?xml version="1.0" encoding="ISO-8859-1" standalone="yes" ?&amp;gt; &lt;/P&gt;&lt;P&gt;- &amp;lt;Order&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;Customer&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;Name&amp;gt;Bill Buckram&amp;lt;/Name&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Cardnum&amp;gt;234 234 234 234&amp;lt;/Cardnum&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/Customer&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;Manifest&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;Item&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;ID&amp;gt;209&amp;lt;/ID&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Title&amp;gt;Duke: A Biography of the Java Evangelist&amp;lt;/Title&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Quantity&amp;gt;1&amp;lt;/Quantity&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;UnitPrice&amp;gt;$10.75&amp;lt;/UnitPrice&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/Item&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;Item&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;ID&amp;gt;208&amp;lt;/ID&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Title&amp;gt;100% Pure: Making Cross Platform Deployment a Reality&amp;lt;/Title&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Quantity&amp;gt;1&amp;lt;/Quantity&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;UnitPrice&amp;gt;$10.75&amp;lt;/UnitPrice&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/Item&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;Item&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;ID&amp;gt;204&amp;lt;/ID&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Title&amp;gt;Making the Transition from C++ to the Java(tm) Language&amp;lt;/Title&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Quantity&amp;gt;1&amp;lt;/Quantity&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;UnitPrice&amp;gt;$10.75&amp;lt;/UnitPrice&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/Item&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;Item&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;ID&amp;gt;202&amp;lt;/ID&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Title&amp;gt;Web Servers for Fun and Profit&amp;lt;/Title&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Quantity&amp;gt;1&amp;lt;/Quantity&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;UnitPrice&amp;gt;$10.75&amp;lt;/UnitPrice&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/Item&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;Item&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;ID&amp;gt;210&amp;lt;/ID&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Title&amp;gt;I Think Not: Dukes Likeness to the Federation Insignia&amp;lt;/Title&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Quantity&amp;gt;1&amp;lt;/Quantity&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;UnitPrice&amp;gt;$10.75&amp;lt;/UnitPrice&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/Item&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/Manifest&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;Receipt&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;Subtotal&amp;gt;$53.75&amp;lt;/Subtotal&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Tax&amp;gt;$4.43&amp;lt;/Tax&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Total&amp;gt;$58.18&amp;lt;/Total&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/Receipt&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/Order&amp;gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="85" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Dec 2010 12:26:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-12-29T12:26:01Z</dc:date>
    <item>
      <title>Convert XML to SAP internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-xml-to-sap-internal-table/m-p/7538401#M1562137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My program is suppose to get current exchange rate file from website and upload it in SAP.&lt;/P&gt;&lt;P&gt;by using FM 'HTTP_GET', im getting the data in XML format.My problem is..i have tried to use transformation but failed to &lt;/P&gt;&lt;P&gt;map it against XML data element..and i have tried to use CALL FUNCTION 'SCMS_TEXT_TO_XSTRING' and then CALL FUNCTION 'SMUM_XML_PARSE' but it returns initial value with error ''line   0 col  12-unexpected symbol: '&amp;gt;'' .&lt;/P&gt;&lt;P&gt;Below is an excerpt of my XML file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;..&amp;lt;xml version&amp;gt;&lt;/P&gt;&lt;P&gt;..&amp;lt;Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"&lt;/P&gt;&lt;P&gt;.. xmlns:o="urn:schemas-microsoft-com:office:office"&lt;/P&gt;&lt;P&gt;.. xmlns:x="urn:schemas-    microsoft-com:office:excel"&lt;/P&gt;&lt;P&gt;.. xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"&amp;gt;&lt;/P&gt;&lt;P&gt;.. &amp;lt;ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"&amp;gt; &amp;lt;WindowHeight&amp;gt;10875&amp;lt;/WindowHeight&amp;gt;........ &amp;lt;WindowWidth&amp;gt;13260&amp;lt;/WindowWidth&amp;gt;&amp;lt;WindowTopX&amp;gt;480&amp;lt;/WindowTopX&amp;gt;&amp;lt;WindowTopY&amp;gt;30&amp;lt;/Wind&lt;/P&gt;&lt;P&gt;..  &amp;lt;Style ss:ID="Default" ss:Name="Normal"&amp;gt;&lt;/P&gt;&lt;P&gt;..  &amp;lt;Alignment ss:Vertical="Bottom"/&amp;gt;&lt;/P&gt;&lt;P&gt;..  &amp;lt;Borders/&amp;gt;&lt;/P&gt;&lt;P&gt;..  &amp;lt;Font/&amp;gt;&lt;/P&gt;&lt;P&gt;..  &amp;lt;Interior/&amp;gt;&lt;/P&gt;&lt;P&gt;..  &amp;lt;NumberFormat/&amp;gt;&lt;/P&gt;&lt;P&gt;..  &amp;lt;Protection/&amp;gt;&lt;/P&gt;&lt;P&gt;..  &amp;lt;/Style&amp;gt;&lt;/P&gt;&lt;P&gt;..  &amp;lt;Style ss:ID="BoldColumn"&amp;gt;&lt;/P&gt;&lt;P&gt;..  &amp;lt;Font ss:FontName="Microsoft Sans Serif" x:Family="Swiss" ss:Bold="1"/&amp;gt;&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;.. &amp;lt;Worksheet ss:Name="Page1"&amp;gt;&amp;lt;Table ss:StyleID="s21"   &amp;gt; &amp;lt;Column   ss:Width="130"/&amp;gt; &amp;lt;Column   ss:Width="85"/&amp;gt; &amp;lt;Column   .. ss:Width="85"/&amp;gt; &amp;lt;Column   ss:Width="85"/&amp;gt; &amp;lt;Column   ss:Widt&lt;/P&gt;&lt;P&gt;.. Cell&amp;gt;&amp;lt;Cell ss:MergeAcross="1" ss:StyleID="BoldColumn"&amp;gt;&amp;lt;Data ss:Type="String"&amp;gt;Average Buying Rates&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell .. ss:MergeDown="1" ss:StyleID="BoldColumn"&amp;gt;&amp;lt;Data ss:Type="Stri&lt;/P&gt;&lt;P&gt;.. ss:Type="Number"&amp;gt;47.3732&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell ss:StyleID="Decimal"&amp;gt;&amp;lt;Data ss:Type="Number"&amp;gt;47.5374&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell .. ss:StyleID="Decimal"&amp;gt;&amp;lt;Data ss:Type="Number"&amp;gt;48.2323&amp;lt;/Data&amp;gt;&amp;lt;/Ce&lt;/P&gt;&lt;P&gt;.. "  &amp;gt;&amp;lt;Data ss:Type="String"&amp;gt;HONG KONG&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell ss:StyleID="StringLiteralCenter"  &amp;gt;&amp;lt;Data .. .. ss:Type="String"&amp;gt;HKD&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell ss:StyleID="Decimal"&amp;gt;&amp;lt;Data ss:Type="Numb&lt;/P&gt;&lt;P&gt;.. ss:Type="Number"&amp;gt;22.8131&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell ss:StyleID="Decimal"&amp;gt;&amp;lt;Data ss:Type="Number"&amp;gt;23.2595&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;.. .. &amp;lt;/Row&amp;gt;&amp;lt;Row&amp;gt;&amp;lt;Cell ss:StyleID="StringLiteral"  &amp;gt;&amp;lt;Data ss:Type="String"&lt;/P&gt;&lt;P&gt;.. ss:StyleID="StringLiteralCenter"  &amp;gt;&amp;lt;Data ss:Type="String"&amp;gt;IDR&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell ss:StyleID="Decimal"&amp;gt;&amp;lt;Data .. ss:Type="Number"&amp;gt;3.0395&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell ss:StyleID="Decimal"&amp;gt;&amp;lt;Data&lt;/P&gt;&lt;P&gt;.. ecimal"&amp;gt;&amp;lt;Data ss:Type="Number"&amp;gt;30.6424&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;/Row&amp;gt;&amp;lt;Row&amp;gt;&amp;lt;Cell ss:StyleID="StringLiteral"  &amp;gt;&amp;lt;Data .. ss:Type="String"&amp;gt;AUSTRALIA&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell ss:StyleID="StringLiteralCe&lt;/P&gt;&lt;P&gt;.. ell ss:StyleID="Decimal"&amp;gt;&amp;lt;Data ss:Type="Number"&amp;gt;0.3392&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell ss:StyleID="Decimal"&amp;gt;&amp;lt;Data .. ss:Type="Number"&amp;gt;0.3409&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell ss:StyleID="Decimal"&amp;gt;&amp;lt;Data ss:Typ&lt;/P&gt;&lt;P&gt;.. StringLiteral"  &amp;gt;&amp;lt;Data ss:Type="String"&amp;gt;DENMARK&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell ss:StyleID="StringLiteralCenter"  &amp;gt;&amp;lt;Data .. ss:Type="String"&amp;gt;DKK&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell ss:StyleID="Decimal"&amp;gt;&amp;lt;Data ss&lt;/P&gt;&lt;P&gt;.. ata ss:Type="Number"&amp;gt;4.4550&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell ss:StyleID="Decimal"&amp;gt;&amp;lt;Data ss:Type="Number"&amp;gt;4.6073&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;.. &amp;lt;/Row&amp;gt;&amp;lt;Row&amp;gt;&amp;lt;/Row&amp;gt;&amp;lt;Row&amp;gt;&amp;lt;/Row&amp;gt;&amp;lt;Row&amp;gt;&amp;lt;Cell ss:MergeAcross="4" ss:Style&lt;/P&gt;&lt;P&gt;.. s of   23 November 2010&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;/Row&amp;gt;&amp;lt;Row&amp;gt;&amp;lt;/Row&amp;gt;&amp;lt;Row&amp;gt;&amp;lt;Cell ss:MergeAcross="4" .. ss:StyleID="BoldColumn_Left" &amp;gt;&amp;lt;Data ss:Type="String"&amp;gt;2. Foreign Exchange Rates (THOMSON REUTE&lt;/P&gt;&lt;P&gt;..  &amp;gt;&amp;lt;Data ss:Type="String"&amp;gt;ZAR&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell ss:StyleID="Decimal"&amp;gt;&amp;lt;Data ss:Type="Number"&amp;gt;4.2735&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;.. &amp;lt;Cell ss:StyleID="Decimal"&amp;gt;&amp;lt;Data ss:Type="Number"&amp;gt;4.3125&amp;lt;/Data&amp;gt;&amp;lt;/&lt;/P&gt;&lt;P&gt;.. ="Decimal"&amp;gt;&amp;lt;Data ss:Type="Number"&amp;gt;106.5459&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell ss:StyleID="Decimal"&amp;gt;&amp;lt;Data .. ss:Type="Number"&amp;gt;107.5164&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;/Row&amp;gt;&amp;lt;Row&amp;gt;&amp;lt;Cell ss:StyleID="StringLiteral"  &amp;gt;&amp;lt;Da&lt;/P&gt;&lt;P&gt;.. a&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell ss:StyleID="Decimal"&amp;gt;&amp;lt;Data ss:Type="Number"&amp;gt;4.6916&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;/Row&amp;gt;&amp;lt;Row&amp;gt;&amp;lt;Cell .. ss:StyleID="StringLiteral"  &amp;gt;&amp;lt;Data ss:Type="String"&amp;gt;BANGLADESH&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell&lt;/P&gt;&lt;P&gt;.. r"&amp;gt;0.0074&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;/Row&amp;gt;&amp;lt;Row&amp;gt;&amp;lt;Cell ss:StyleID="StringLiteral"  &amp;gt;&amp;lt;Data ss:Type="String"&amp;gt;KENYA&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell .. ss:StyleID="StringLiteralCenter"  &amp;gt;&amp;lt;Data ss:Type="String"&amp;gt;KE&lt;/P&gt;&lt;P&gt;.. &amp;gt;&amp;lt;Cell ss:StyleID="StringLiteral"  &amp;gt;&amp;lt;Data ss:Type="String"&amp;gt;VIET NAM&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell ss:StyleID="StringLiteralCenter"  &amp;gt;.. &amp;lt;Data ss:Type="String"&amp;gt;VND&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell ss:StyleI&lt;/P&gt;&lt;P&gt;.. A&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell ss:StyleID="StringLiteralCenter"  &amp;gt;&amp;lt;Data ss:Type="String"&amp;gt;LKR&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell .. .. ss:StyleID="Decimal"&amp;gt;&amp;lt;Data ss:Type="Number"&amp;gt;0.2686&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell ss:St&lt;/P&gt;&lt;P&gt;.. String"&amp;gt;OMR&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell ss:StyleID="Decimal"&amp;gt;&amp;lt;Data ss:Type="Number"&amp;gt;77.7094&amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&amp;lt;Cell &lt;/P&gt;&lt;P&gt;.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me to translate my XML file into SAP format...i need it fixed urgently..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Guest101 on Dec 28, 2010 12:11 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Dec 2010 11:02:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-xml-to-sap-internal-table/m-p/7538401#M1562137</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-28T11:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: Convert XML to SAP internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-xml-to-sap-internal-table/m-p/7538402#M1562138</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;anyone ??? please...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Dec 2010 09:58:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-xml-to-sap-internal-table/m-p/7538402#M1562138</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-29T09:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: Convert XML to SAP internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-xml-to-sap-internal-table/m-p/7538403#M1562139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;call method cl_gui_frontend_services=&amp;gt;gui_download&lt;/P&gt;&lt;P&gt;  Exporting&lt;/P&gt;&lt;P&gt;       bin_filesize  = l_xml_size&lt;/P&gt;&lt;P&gt;       filename  = filename&lt;/P&gt;&lt;P&gt;       filetype = 'BIN'&lt;/P&gt;&lt;P&gt;       write_lf = 'X'&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 = 24 .&lt;/P&gt;&lt;P&gt;&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Dec 2010 11:08:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-xml-to-sap-internal-table/m-p/7538403#M1562139</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-29T11:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: Convert XML to SAP internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-xml-to-sap-internal-table/m-p/7538404#M1562140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u can try this function   cl_gui_backend_services=&amp;gt;gui_upload it will work for to upload data in sap from xml file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Dec 2010 11:11:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-xml-to-sap-internal-table/m-p/7538404#M1562140</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-29T11:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: Convert XML to SAP internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-xml-to-sap-internal-table/m-p/7538405#M1562141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;It has 2 part one is source code and another is the XML file&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;create an XML file with the data provided in the last 2.&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;then place it in a path mention the path in the below source.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. Complete code for converting XML to internal table in SAP.&lt;/STRONG&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; Report  ZTST_PGM02&lt;/P&gt;&lt;P&gt;*&amp;amp;&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;&lt;/P&gt;&lt;P&gt;*&amp;amp;&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;&lt;/P&gt;&lt;P&gt;REPORT  ZTST_PGM02.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Load iXML Lib.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;type-pools: ixml.&lt;/P&gt;&lt;P&gt;class cl_ixml definition load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: G_IXML type ref to if_ixml.&lt;/P&gt;&lt;P&gt;data: STREAMFACTORY type ref to if_ixml_stream_factory.&lt;/P&gt;&lt;P&gt;data: ISTREAM type ref to if_ixml_istream.&lt;/P&gt;&lt;P&gt;data: DOCUMENT type ref to if_ixml_document.&lt;/P&gt;&lt;P&gt;data: PARSER type ref to if_ixml_parser.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: LV_FILE_URL type rlgrap-filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;You should provide the parameter for file name&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LV_FILE_URL = 'D:\navps\input_xml.xml'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of XML_LINE,&lt;/P&gt;&lt;P&gt;        DATA(256) type x,&lt;/P&gt;&lt;P&gt;      end of XML_LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of TY_HEADER,&lt;/P&gt;&lt;P&gt;         CUST_NAME(20)     type c,&lt;/P&gt;&lt;P&gt;         CARD_NO(20)       type c,&lt;/P&gt;&lt;P&gt;         TAX_AMOUNT(10)    type c,&lt;/P&gt;&lt;P&gt;         TOTAL_AMOUNT(10)  type c,&lt;/P&gt;&lt;P&gt;       end of TY_HEADER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of TY_ITEM,&lt;/P&gt;&lt;P&gt;         ITEM_NO(4)      type n,&lt;/P&gt;&lt;P&gt;         ITEM_ID(20)     type c,&lt;/P&gt;&lt;P&gt;         ITEM_TITLE(50)  type c,&lt;/P&gt;&lt;P&gt;         ITEM_QTY(10)    type c,&lt;/P&gt;&lt;P&gt;         ITEM_UPRICE(10) type c,&lt;/P&gt;&lt;P&gt;       end of TY_ITEM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: GV_HEADER type TY_HEADER.&lt;/P&gt;&lt;P&gt;data: GT_ITEM   type standard table of TY_ITEM  with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: XML_TABLE      type table of XML_LINE,&lt;/P&gt;&lt;P&gt;      XML_TABLE_SIZE type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The next step is creating the main factory for the iXML library:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;G_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;Now Create Stream Factory&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;STREAMFACTORY = G_IXML-&amp;gt;create_stream_factory( ).&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;upload a file from the client's workstation&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call function 'WS_UPLOAD'&lt;/P&gt;&lt;P&gt;     exporting&lt;/P&gt;&lt;P&gt;          filename   = LV_FILE_URL&lt;/P&gt;&lt;P&gt;          filetype   = 'BIN'&lt;/P&gt;&lt;P&gt;     importing&lt;/P&gt;&lt;P&gt;          filelength = XML_TABLE_SIZE&lt;/P&gt;&lt;P&gt;     tables&lt;/P&gt;&lt;P&gt;          data_tab   = XML_TABLE&lt;/P&gt;&lt;P&gt;     exceptions&lt;/P&gt;&lt;P&gt;          others     = 11.&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;ISTREAM = STREAMFACTORY-&amp;gt;create_istream_itable( table = XML_TABLE&lt;/P&gt;&lt;P&gt;                                                size  = XML_TABLE_SIZE )&lt;/P&gt;&lt;P&gt;.&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;Get the file data as Stream&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*istream = streamfactory-&amp;gt;create_istream_uri( public_id = lv_file_url&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                                            system_id = lv_file_url ).&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create XML Document instance&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DOCUMENT = G_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 parser Object&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;PARSER = G_IXML-&amp;gt;create_parser( stream_factory = STREAMFACTORY&lt;/P&gt;&lt;P&gt;                                ISTREAM = istream&lt;/P&gt;&lt;P&gt;                                DOCUMENT = document ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Parse an XML document into a DOM tree&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*parser-&amp;gt;parse( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Parsing Error Processing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if PARSER-&amp;gt;parse( ) ne 0.&lt;/P&gt;&lt;P&gt;  if 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 = 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 = 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;Close the stream since it #s not needed anymore&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call method ISTREAM-&amp;gt;close( ).&lt;/P&gt;&lt;P&gt;clear ISTREAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Now try to make it look good&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; data : lv_size     type sytabix,&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        lv_ret_code type sysubrc.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; data: lo_xml_document type ref to cl_xml_document.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; field-symbols: &amp;lt;fs_xml_data&amp;gt; type any table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; lo_xml_document = document.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; call method lo_xml_document-&amp;gt;get_as_table&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   importing&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     table   = &amp;lt;fs_xml_data&amp;gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     size    = lv_size&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     retcode = lv_ret_code&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*data: items type ref to if_ixml_node_collection.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*items = document-&amp;gt;get_elements_by_tag_name( name = 'Item' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*data: iterator type ref to if_ixml_node_iterator,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     node     type ref to if_ixml_node.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*iterator = document-&amp;gt;create_iterator( ).&lt;/P&gt;&lt;P&gt;*node = iterator-&amp;gt;get_next( ).&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*while not node is initial.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;do something with the node&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; ...&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; node = iterator-&amp;gt;get_next( ).&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*endwhile.&lt;/P&gt;&lt;P&gt;DATA : GV_NODE type ref to if_ixml_node.&lt;/P&gt;&lt;P&gt;DATA : GV_NODETEXT type STRING.&lt;/P&gt;&lt;P&gt;data:  GV_FIRST_TIME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GV_FIRST_TIME = 'X'.&lt;/P&gt;&lt;P&gt;GV_NODE = DOCUMENT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GT_ITEM-item_no = 1.&lt;/P&gt;&lt;P&gt;perform GET_DATA tables     GT_ITEM&lt;/P&gt;&lt;P&gt;                 using      GV_NODE&lt;/P&gt;&lt;P&gt;                 changing   GV_HEADER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Last item is still not added.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  append GT_ITEM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write  : GV_HEADER-cust_name,&lt;/P&gt;&lt;P&gt;         GV_HEADER-card_no,&lt;/P&gt;&lt;P&gt;         GV_HEADER-tax_amount,&lt;/P&gt;&lt;P&gt;         GV_HEADER-total_amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at GT_ITEM.&lt;/P&gt;&lt;P&gt;  write  /:.&lt;/P&gt;&lt;P&gt;  write  : GT_ITEM-item_no,&lt;/P&gt;&lt;P&gt;           GT_ITEM-item_id,&lt;/P&gt;&lt;P&gt;           GT_ITEM-item_title,&lt;/P&gt;&lt;P&gt;           GT_ITEM-item_qty,&lt;/P&gt;&lt;P&gt;           GT_ITEM-item_uprice.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      FORM Get_data                                                 *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form get_data tables   YT_ITEM    structure GT_ITEM&lt;/P&gt;&lt;P&gt;              using value(x_node) type ref to if_ixml_node&lt;/P&gt;&lt;P&gt;              changing Y_HEADER   type TY_HEADER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: INDENT      type i.&lt;/P&gt;&lt;P&gt;  data: PTEXT       type ref to if_ixml_text.&lt;/P&gt;&lt;P&gt;  data: STRING      type string.&lt;/P&gt;&lt;P&gt;  data: TEMP_STRING(100).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  case X_NODE-&amp;gt;get_type( ).&lt;/P&gt;&lt;P&gt;    when if_ixml_node=&amp;gt;co_node_element.&lt;/P&gt;&lt;P&gt;      STRING = X_NODE-&amp;gt;get_name( ).&lt;/P&gt;&lt;P&gt;      GV_NODETEXT = STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    when if_ixml_node=&amp;gt;co_node_text.&lt;/P&gt;&lt;P&gt;      PTEXT ?= X_NODE-&amp;gt;query_interface( IXML_IID_TEXT ).&lt;/P&gt;&lt;P&gt;      if PTEXT-&amp;gt;ws_only( ) is initial.&lt;/P&gt;&lt;P&gt;        STRING = X_NODE-&amp;gt;get_value( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        case GV_NODETEXT.&lt;/P&gt;&lt;P&gt;          when 'Customer'.&lt;/P&gt;&lt;P&gt;            clear GV_HEADER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          when 'Name'.&lt;/P&gt;&lt;P&gt;            move STRING to GV_HEADER-cust_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          when 'Cardnum'.&lt;/P&gt;&lt;P&gt;            move STRING to GV_HEADER-card_no.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          when 'Tax'.&lt;/P&gt;&lt;P&gt;            move STRING to GV_HEADER-tax_amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          when 'Total'.&lt;/P&gt;&lt;P&gt;            move STRING to GV_HEADER-total_amount.&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;        Iteam details&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          when 'ID'.&lt;/P&gt;&lt;P&gt;            move STRING to GT_ITEM-item_id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          when 'Title'.&lt;/P&gt;&lt;P&gt;            move STRING to TEMP_STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            move TEMP_STRING to GT_ITEM-item_title.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          when 'Quantity'.&lt;/P&gt;&lt;P&gt;            move STRING to GT_ITEM-item_qty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          when 'UnitPrice'.&lt;/P&gt;&lt;P&gt;            move STRING to GT_ITEM-item_uprice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;  endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if GV_NODETEXT = 'Customer'.&lt;/P&gt;&lt;P&gt;    clear GV_HEADER.&lt;/P&gt;&lt;P&gt;  elseif GV_NODETEXT = 'Item'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if GV_FIRST_TIME ne 'X'.&lt;/P&gt;&lt;P&gt;       append GT_ITEM.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     clear : gt_item.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       GT_ITEM-item_no = gt_item-item_no + 1.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;    GV_FIRST_TIME = ' '.&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;Get the next child&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  X_NODE = x_node-&amp;gt;get_first_child( ).&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Recurse&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  while not X_NODE is initial.&lt;/P&gt;&lt;P&gt;    perform GET_DATA tables     GT_ITEM&lt;/P&gt;&lt;P&gt;                     using      X_NODE&lt;/P&gt;&lt;P&gt;                     changing   GV_HEADER.&lt;/P&gt;&lt;P&gt;    X_NODE = x_node-&amp;gt;get_next( ).&lt;/P&gt;&lt;P&gt;  endwhile.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Create an XML file with the following DATA given below and place it in the path mentioned above source code.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. XML File DATA. You create an XML File in this format to test the same.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*************************************************************************************&lt;/P&gt;&lt;P&gt;  &amp;lt;?xml version="1.0" encoding="ISO-8859-1" standalone="yes" ?&amp;gt; &lt;/P&gt;&lt;P&gt;- &amp;lt;Order&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;Customer&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;Name&amp;gt;Bill Buckram&amp;lt;/Name&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Cardnum&amp;gt;234 234 234 234&amp;lt;/Cardnum&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/Customer&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;Manifest&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;Item&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;ID&amp;gt;209&amp;lt;/ID&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Title&amp;gt;Duke: A Biography of the Java Evangelist&amp;lt;/Title&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Quantity&amp;gt;1&amp;lt;/Quantity&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;UnitPrice&amp;gt;$10.75&amp;lt;/UnitPrice&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/Item&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;Item&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;ID&amp;gt;208&amp;lt;/ID&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Title&amp;gt;100% Pure: Making Cross Platform Deployment a Reality&amp;lt;/Title&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Quantity&amp;gt;1&amp;lt;/Quantity&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;UnitPrice&amp;gt;$10.75&amp;lt;/UnitPrice&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/Item&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;Item&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;ID&amp;gt;204&amp;lt;/ID&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Title&amp;gt;Making the Transition from C++ to the Java(tm) Language&amp;lt;/Title&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Quantity&amp;gt;1&amp;lt;/Quantity&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;UnitPrice&amp;gt;$10.75&amp;lt;/UnitPrice&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/Item&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;Item&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;ID&amp;gt;202&amp;lt;/ID&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Title&amp;gt;Web Servers for Fun and Profit&amp;lt;/Title&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Quantity&amp;gt;1&amp;lt;/Quantity&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;UnitPrice&amp;gt;$10.75&amp;lt;/UnitPrice&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/Item&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;Item&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;ID&amp;gt;210&amp;lt;/ID&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Title&amp;gt;I Think Not: Dukes Likeness to the Federation Insignia&amp;lt;/Title&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Quantity&amp;gt;1&amp;lt;/Quantity&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;UnitPrice&amp;gt;$10.75&amp;lt;/UnitPrice&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/Item&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/Manifest&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;Receipt&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;Subtotal&amp;gt;$53.75&amp;lt;/Subtotal&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Tax&amp;gt;$4.43&amp;lt;/Tax&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;Total&amp;gt;$58.18&amp;lt;/Total&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/Receipt&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/Order&amp;gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="85" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Dec 2010 12:26:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-xml-to-sap-internal-table/m-p/7538405#M1562141</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-29T12:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: Convert XML to SAP internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-xml-to-sap-internal-table/m-p/7538406#M1562142</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;appreciate all the replies..will try all suggestions..&lt;/P&gt;&lt;P&gt;and will get back if its successful or not..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jan 2011 02:38:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-xml-to-sap-internal-table/m-p/7538406#M1562142</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-06T02:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Convert XML to SAP internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-xml-to-sap-internal-table/m-p/7538407#M1562143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out Amit Mittal's answer in below thread.&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="1283866"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jan 2011 03:35:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-xml-to-sap-internal-table/m-p/7538407#M1562143</guid>
      <dc:creator>awin_prabhu</dc:creator>
      <dc:date>2011-01-06T03:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Convert XML to SAP internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-xml-to-sap-internal-table/m-p/7538408#M1562144</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;when i try to download the file im getting from http_get function to presentation server.&lt;/P&gt;&lt;P&gt;i cannot open the file ..im getting error :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;XML PARSE ERROR:  Null or missing attribute value&lt;/P&gt;&lt;P&gt;  Error occurs at or below this element stack:&lt;/P&gt;&lt;P&gt;    &amp;lt;ss:Workbook&amp;gt;&lt;/P&gt;&lt;P&gt;     &amp;lt;x:ExcelWorkbook&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mine is xml spreadsheet..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jan 2011 08:41:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-xml-to-sap-internal-table/m-p/7538408#M1562144</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-10T08:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Convert XML to SAP internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-xml-to-sap-internal-table/m-p/7538409#M1562145</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;Hope this will hlp you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  w_filename = p_file.&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;code to upload data from application server&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;***********************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  OPEN DATASET w_filename FOR INPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MESSAGE i000(ymmm) WITH  'File Not Exists In the Application Server'.&lt;/P&gt;&lt;P&gt;    LEAVE LIST-PROCESSING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DO.&lt;/P&gt;&lt;P&gt;    READ DATASET w_filename INTO is_xml_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      APPEND is_xml_line TO it_xml_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLOSE DATASET w_filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;code to find the table size&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_xml_tab[] = it_xml_table[] .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'SCMS_TEXT_TO_XSTRING'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      mimetype = '&amp;gt;'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      buffer   = is_xmldata&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      text_tab = it_xml_tab[]&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      failed   = 1&lt;/P&gt;&lt;P&gt;      OTHERS   = 2.&lt;/P&gt;&lt;P&gt;&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;P&gt;  CALL FUNCTION 'SMUM_XML_PARSE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      xml_input = is_xmldata&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      xml_table = it_result_xml&lt;/P&gt;&lt;P&gt;      return    = it_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jan 2011 11:50:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-xml-to-sap-internal-table/m-p/7538409#M1562145</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-10T11:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: Convert XML to SAP internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-xml-to-sap-internal-table/m-p/7538410#M1562146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi eswar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have tried as per suggestion..but im getting error from return table in call function 'SMUM_XML_PARSE'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;XML_PARSER  &lt;/P&gt;&lt;P&gt;|line   0 col  12-unexpected symbol: '&amp;gt;'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i copied the exact same code but why am i getting this error ?&lt;/P&gt;&lt;P&gt;is it possible the XML spreadsheet file im getting is not in correct format ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Guest101 on Jan 11, 2011 7:10 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Guest101 on Jan 11, 2011 8:37 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jan 2011 02:30:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-xml-to-sap-internal-table/m-p/7538410#M1562146</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-11T02:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Convert XML to SAP internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-xml-to-sap-internal-table/m-p/7538411#M1562147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Finally..since i cannot parse it..try to download the file to presentation in '.xml' ..still have error too..cause i thot it suposed to be&lt;/P&gt;&lt;P&gt;in xml spreadsheet..&lt;/P&gt;&lt;P&gt;try my luck to save it in '.xls' ..and getting the file using cl_http and massage to itab...and it finally work!!!&lt;/P&gt;&lt;P&gt;and now after download..i will upload it back into sap...at least i get to rid of all the html codes...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks to all for ur help..=)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jan 2011 09:02:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-xml-to-sap-internal-table/m-p/7538411#M1562147</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-12T09:02:42Z</dc:date>
    </item>
  </channel>
</rss>

