<?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: reading XML File from application server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-xml-file-from-application-server/m-p/5915212#M1330453</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nikhil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using identical transformation that will convert XML string directly in ABAP data stored record wise in internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is simple and fast.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Augustin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Jul 2009 05:50:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-07-23T05:50:56Z</dc:date>
    <item>
      <title>reading XML File from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-xml-file-from-application-server/m-p/5915208#M1330449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My aim is to read a XML file from application server and extract the relevant data from it and process further. &lt;/P&gt;&lt;P&gt;When I am trying to read a XML file from application server it is reading success fully but the problem is that its not reading the last root structure of XML file why is so happening can any body help me? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the following code: &lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF xml_line, &lt;/P&gt;&lt;P&gt;text(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;DATA: e_file LIKE rlgrap-filename VALUE  'applcatin server path' &lt;/P&gt;&lt;P&gt;OPEN DATASET e_file FOR INPUT IN BINARY MODE. &lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0. &lt;/P&gt;&lt;P&gt;  DO. &lt;/P&gt;&lt;P&gt;    READ DATASET e_file INTO wa_item1-text. &lt;/P&gt;&lt;P&gt;    IF sy-subrc EQ 0. &lt;/P&gt;&lt;P&gt;      APPEND wa_item1 TO gt_item1 . &lt;/P&gt;&lt;P&gt;      CLEAR wa_item1. &lt;/P&gt;&lt;P&gt;    ELSE. &lt;/P&gt;&lt;P&gt;      EXIT. &lt;/P&gt;&lt;P&gt;    ENDIF. &lt;/P&gt;&lt;P&gt;  ENDDO. &lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;CLOSE DATASET e_file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after this i am passing this internal table to "cl_ixml" class to extract the data &lt;/P&gt;&lt;P&gt;but it returning the itab with required value except the last record. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The stream reading the file it self is i thought in complete thats why it is not converting the all values. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please  help me... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a ton in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2009 15:12:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-xml-file-from-application-server/m-p/5915208#M1330449</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-22T15:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: reading XML File from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-xml-file-from-application-server/m-p/5915209#M1330450</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;Try to debug and find out weather your  internal table gt_item1 is populating with all the entries...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thnx&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2009 16:09:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-xml-file-from-application-server/m-p/5915209#M1330450</guid>
      <dc:creator>RahulKeshav</dc:creator>
      <dc:date>2009-07-22T16:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: reading XML File from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-xml-file-from-application-server/m-p/5915210#M1330451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;1 Copy Report BCCIIXMLT1&lt;/P&gt;&lt;P&gt;2 (you can change the way of filling internal table xml_table if necessary)&lt;/P&gt;&lt;P&gt;3 you don't need the part between&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- render the DOM back into an output stream/internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- print the whole DOM tree as a list...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Comment it out or simply delete it&lt;/P&gt;&lt;P&gt;4 Rename form print_node to your liking e.g. process_node&lt;/P&gt;&lt;P&gt;5 In your new form you need three extra variables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: attribs type ref to IF_IXML_NAMED_NODE_MAP,&lt;/P&gt;&lt;P&gt;      attrib_node type ref to IF_IXML_NODE,&lt;/P&gt;&lt;P&gt;      attrib_value type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6 After the lines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when if_ixml_node=&amp;gt;co_node_element.&lt;/P&gt;&lt;P&gt;  string = pNode-&amp;gt;get_name( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Insert:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;attribs = pNode-&amp;gt;get_attributes( ).&lt;/P&gt;&lt;P&gt;clear attrib_value.&lt;/P&gt;&lt;P&gt;case string.&lt;/P&gt;&lt;P&gt;  when ''. "put your XML tag name here&lt;/P&gt;&lt;P&gt;    attrib_node = attribs-&amp;gt;get_named_item(name = '' ). "put your XML attribute name here&lt;/P&gt;&lt;P&gt;    attrib_value = attrib_node-&amp;gt;get_value( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also refer link,&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;thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;shreemohan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2009 19:47:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-xml-file-from-application-server/m-p/5915210#M1330451</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-22T19:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: reading XML File from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-xml-file-from-application-server/m-p/5915211#M1330452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; but it returning the itab with required value except the last record. &lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before you use cl_ixml, did you check whether your itab contains this last record ? If it's missing, it means that the last record in your file doesn't end with a "line feed character". This is because READ DATASET sets sy-subrc = 4 though it reads something (the last line). You should either modify the source file (add a line feed character after the last character), or add LENGTH keyword to READ DATASET and test this length altogether with sy-subrc (IF sy-subrc EQ 0 OR length &amp;lt;&amp;gt; 0. (processing) ELSE. EXIT. ENDIF.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2009 21:20:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-xml-file-from-application-server/m-p/5915211#M1330452</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2009-07-22T21:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: reading XML File from application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-xml-file-from-application-server/m-p/5915212#M1330453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nikhil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using identical transformation that will convert XML string directly in ABAP data stored record wise in internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is simple and fast.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Augustin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2009 05:50:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-xml-file-from-application-server/m-p/5915212#M1330453</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-23T05:50:56Z</dc:date>
    </item>
  </channel>
</rss>

