<?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: Function module for uploading XML file to inner table? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-uploading-xml-file-to-inner-table/m-p/3521109#M846894</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;calling of FM SMUM_XML_PARSE looks like this:&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 = inpdatax&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;XML_TABLE = t_xml&lt;/P&gt;&lt;P&gt;RETURN = t_err.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume that parameter &lt;STRONG&gt;inpdatax&lt;/STRONG&gt; is a single string of the XML document and in order to prepare this string, I have to use 'GUI_UPLOAD', thew result of calling SMUM_XML_PARSE will be inner table t_xml containing XML document, correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Flow of steps of transforming XML file to inner table of ABAP is not clear for me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mindaugas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Mar 2008 19:52:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-04T19:52:01Z</dc:date>
    <item>
      <title>Function module for uploading XML file to inner table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-uploading-xml-file-to-inner-table/m-p/3521106#M846891</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 need a function module(s) for uploading XML file to inner table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for help,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mindaugas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Mar 2008 20:23:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-uploading-xml-file-to-inner-table/m-p/3521106#M846891</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-02T20:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Function module for uploading XML file to inner table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-uploading-xml-file-to-inner-table/m-p/3521107#M846892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for example, we have FM called ALSM_EXCEL_TO_INTERNAL_TABLE, so maybe we have some analogic FMs for reading XML into inner table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mindaugas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Mar 2008 21:23:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-uploading-xml-file-to-inner-table/m-p/3521107#M846892</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-02T21:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Function module for uploading XML file to inner table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-uploading-xml-file-to-inner-table/m-p/3521108#M846893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use GUI_UPLOAD to load xml to internal table. but if you want to read the (element) values in the xml and map it to  row/columns in an internal table then you have to parse the xml . there are multiple options available for this. the simplest(for a abaper) would be using FM SMUM_XML_PARSE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2008 09:30:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-uploading-xml-file-to-inner-table/m-p/3521108#M846893</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2008-03-04T09:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Function module for uploading XML file to inner table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-uploading-xml-file-to-inner-table/m-p/3521109#M846894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;calling of FM SMUM_XML_PARSE looks like this:&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 = inpdatax&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;XML_TABLE = t_xml&lt;/P&gt;&lt;P&gt;RETURN = t_err.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume that parameter &lt;STRONG&gt;inpdatax&lt;/STRONG&gt; is a single string of the XML document and in order to prepare this string, I have to use 'GUI_UPLOAD', thew result of calling SMUM_XML_PARSE will be inner table t_xml containing XML document, correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Flow of steps of transforming XML file to inner table of ABAP is not clear for me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mindaugas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2008 19:52:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-uploading-xml-file-to-inner-table/m-p/3521109#M846894</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-04T19:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: Function module for uploading XML file to inner table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-uploading-xml-file-to-inner-table/m-p/3521110#M846895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the main thing is that I do not know how to make &lt;STRONG&gt;inpdatax&lt;/STRONG&gt; if I have XML file...&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;&lt;STRONG&gt;XML_INPUT = inpdatax&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;XML_TABLE = t_xml&lt;/P&gt;&lt;P&gt;RETURN = t_err.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Mindaugas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2008 21:29:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-uploading-xml-file-to-inner-table/m-p/3521110#M846895</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-04T21:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Function module for uploading XML file to inner table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-uploading-xml-file-to-inner-table/m-p/3521111#M846896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here is the code sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data:xmldata type xstring .
data: begin of xml_tab occurs 0,
           raw(line_size) type x,
        end   of xml_tab .
data: size type i .
data: result_xml type standard table of smum_xmltb .
data: return type standard table of bapiret2 .

call function 'GUI_UPLOAD'
    exporting
      filename            = filename
      filetype            = 'BIN'
      has_field_separator = ' '
      header_length       = 0
    importing
      filelength          = size
    tables
      data_tab            = xml_tab
    exceptions
      others              = 1.

call function 'SCMS_BINARY_TO_XSTRING'
  exporting
    input_length       = size
*   FIRST_LINE         = 0
*   LAST_LINE          = 0
 importing
   buffer             = xmldata
  tables
    binary_tab         = xml_tab
 exceptions
   failed             = 1
   others             = 2
          .
if sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
CALL FUNCTION 'SMUM_XML_PARSE'
  EXPORTING
    xml_input       = xmldata
  TABLES
    xml_table       = result_xml
    return          = return .
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 05:00:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-uploading-xml-file-to-inner-table/m-p/3521111#M846896</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2008-03-05T05:00:30Z</dc:date>
    </item>
  </channel>
</rss>

