<?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 Read a zip file from Application server. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-a-zip-file-from-application-server/m-p/6599940#M1437176</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;Is there a way to read a zip file from the applicatoin server to internal table in ABAP program?  The operation system is running MS windows server.  The zip file contains only 1 text file.  I tried to use open dataset 'uncompress', and use read dataset, but read dataset gave me sy-subrc = 4.  Any feedback is greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Feb 2010 16:07:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-02-19T16:07:21Z</dc:date>
    <item>
      <title>Read a zip file from Application server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-a-zip-file-from-application-server/m-p/6599940#M1437176</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;Is there a way to read a zip file from the applicatoin server to internal table in ABAP program?  The operation system is running MS windows server.  The zip file contains only 1 text file.  I tried to use open dataset 'uncompress', and use read dataset, but read dataset gave me sy-subrc = 4.  Any feedback is greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2010 16:07:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-a-zip-file-from-application-server/m-p/6599940#M1437176</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-19T16:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Read a zip file from Application server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-a-zip-file-from-application-server/m-p/6599941#M1437177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out this [Thread|&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="90072"&gt;&lt;/A&gt;;.&lt;/P&gt;&lt;P&gt;This last answer from Thomas may help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chaiphon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2010 16:37:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-a-zip-file-from-application-server/m-p/6599941#M1437177</guid>
      <dc:creator>chaiphon</dc:creator>
      <dc:date>2010-02-19T16:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: Read a zip file from Application server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-a-zip-file-from-application-server/m-p/6599942#M1437178</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;briefly, without error handling.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA zip TYPE REF TO cl_abap_zip.&lt;/P&gt;&lt;P&gt;DATA file_name TYPE string.&lt;/P&gt;&lt;P&gt;DATA zipped_data TYPE xstring.&lt;/P&gt;&lt;P&gt;DATA unzipped_data TYPE xstring.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET file_name IN BINARY MODE FOR INPUT.&lt;/P&gt;&lt;P&gt;READ DATASET file_name INTO zipped_data.&lt;/P&gt;&lt;P&gt;*CLOSE DATASET file_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT zip.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;zip-&amp;gt;load( zipped_data ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD zip-&amp;gt;get&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    index   = 1 " first file in zip &lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    content = unzipped_data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2010 16:43:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-a-zip-file-from-application-server/m-p/6599942#M1437178</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-19T16:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: Read a zip file from Application server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-a-zip-file-from-application-server/m-p/6599943#M1437179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tested it, and I get the data from the zip file.  And now how to I read the data as lines of character type?  I'd like to read content of the data and populate it in the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Lily&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2010 17:45:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-a-zip-file-from-application-server/m-p/6599943#M1437179</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-19T17:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Read a zip file from Application server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-a-zip-file-from-application-server/m-p/6599944#M1437180</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;to convert xstring to text you can use this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA unzipped_data TYPE xstring.
DATA text_data TYPE string.
DATA conv_x2c TYPE REF TO cl_abap_conv_in_ce.

conv_x2c = cl_abap_conv_in_ce=&amp;gt;create( ).
conv_x2c-&amp;gt;convert( EXPORTING input = unzipped_data IMPORTING data = text_data ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;moreover, if you want to split your text at "end of line" (CR LF in microsoft windows) into lines:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA text_lines TYPE TABLE OF string.

SPLIT text_data AT cl_abap_char_utilities=&amp;gt;cr_lf INTO TABLE text_lines.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Feb 2010 02:22:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-a-zip-file-from-application-server/m-p/6599944#M1437180</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-21T02:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: Read a zip file from Application server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-a-zip-file-from-application-server/m-p/6599945#M1437181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some days ago I downloaded a film in zip archive. Today I have tried to watch it but I couldn't extract the archive. I saw an unknown error. My friend told me that he didn't know what to do next. I was distressed, but suddenly entered the Google and by chance found - &amp;lt;a href="http://www.recoverytoolbox.com/damaged_zip_file.html"&amp;gt;damage zip&amp;lt;/a&amp;gt;. The utility worked out my issue within seconds and totally free of charge as I kept in mind.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jul 2010 06:01:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-a-zip-file-from-application-server/m-p/6599945#M1437181</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-23T06:01:38Z</dc:date>
    </item>
  </channel>
</rss>

