<?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: Extract file from http://...zip into ABAP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/extract-file-from-http-zip-into-abap/m-p/1000303#M76269</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 do not have access to an SAP system right now but have you checked the class CL_ABAP_GZIP method DECOMPRESS. There has been some discussion on this forum on using it. See if it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Aug 2005 13:58:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-08-17T13:58:17Z</dc:date>
    <item>
      <title>Extract file from http://...zip into ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extract-file-from-http-zip-into-abap/m-p/1000302#M76268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I know how to import a text file from HTTP server into ABAP (string variable) by using the CL_HTTP_CLIENT functionalities (thanks to &amp;lt;a href="https://www.sdn.sap.com/sdn/weblogs.sdn?blog=/pub/u/55615"&amp;gt;Craig Cmehil's&amp;lt;/a&amp;gt; weblog &amp;lt;a href="/people/sap.user72/blog/2005/05/03/sdn-meets-labs-integrated-web-content Meets Labs: Integrated Web Content&amp;lt;/a&amp;gt;).&lt;/P&gt;&lt;P&gt;But now I have a &amp;lt;i&amp;gt;*.txt&amp;lt;/i&amp;gt; file packed with other files into a &amp;lt;i&amp;gt;http://...zip&amp;lt;/i&amp;gt; file. How do I extract and import the text file into ABAP string (or other) variable? &lt;/P&gt;&lt;P&gt;I'd prefer something direct, without using shell commands and filesystem.  &lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2005 12:51:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extract-file-from-http-zip-into-abap/m-p/1000302#M76268</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-17T12:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Extract file from http://...zip into ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extract-file-from-http-zip-into-abap/m-p/1000303#M76269</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 do not have access to an SAP system right now but have you checked the class CL_ABAP_GZIP method DECOMPRESS. There has been some discussion on this forum on using it. See if it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2005 13:58:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extract-file-from-http-zip-into-abap/m-p/1000303#M76269</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-17T13:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Extract file from http://...zip into ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extract-file-from-http-zip-into-abap/m-p/1000304#M76270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;long ago i found this example in forum "SAP Abap en Castellano".&lt;/P&gt;&lt;P&gt;First find out the winzip parameters accepted from ms-dos.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. to compress two files 1.txt and 2.txt in destination.zip use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WS_EXECUTE' &lt;/P&gt;&lt;P&gt;EXPORTING &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;DOCUMENT = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CD = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;COMMANDLINE = ' -min -a c:destino.zip c:1.txt c:2.txt' &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;INFORM = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;PROGRAM = 'winzip32.exe' &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;STAT = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WINID = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OSMAC_SCRIPT = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OSMAC_CREATOR = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WIN16_EXT = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXEC_RC = ' ' &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;RBUFF = &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FRONTEND_ERROR = 1 &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;NO_BATCH = 2 &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PROG_NOT_FOUND = 3 &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ILLEGAL_OPTION = 4 &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;GUI_REFUSE_EXECUTE = 5 &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OTHERS = 6 &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;. &lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2005 14:07:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extract-file-from-http-zip-into-abap/m-p/1000304#M76270</guid>
      <dc:creator>former_member182371</dc:creator>
      <dc:date>2005-08-17T14:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Extract file from http://...zip into ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extract-file-from-http-zip-into-abap/m-p/1000305#M76271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, guys!&lt;/P&gt;&lt;P&gt;Running WINZIP32.EXE as an external command is also an option. I'd have to first import the *.zip file from HTTP site, then download it to server (or PC) just to run WinZip, and then import again the extracted text file. I see this more as a workaround.&lt;/P&gt;&lt;P&gt;I'd loooove to see it work directly from HTTP site, without using the filesystem.&lt;/P&gt;&lt;P&gt;Before I try to do it with external command, I'd like to explore direct possibilities. From the posts about GUI_ABAP_GZIP I can see that it's an internal ABAP compress/decompress tool, not capable of decompressing files zipped with WinZip. And to make it more complicated: It's not just decompressing. I have to extract just one file of many which are zipped in a single *.zip file. &lt;/P&gt;&lt;P&gt;Not to mention that my second step is verifying the digital signature for the text file (it's currency exchange rates) contained in the same *.zip.&lt;/P&gt;&lt;P&gt;It's a tough one, isn't it?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2005 13:10:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extract-file-from-http-zip-into-abap/m-p/1000305#M76271</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-18T13:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: Extract file from http://...zip into ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extract-file-from-http-zip-into-abap/m-p/1000306#M76272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;i don´t know if i´ve understood it right but as a suggestion what if you used a script for decompressing?.&lt;/P&gt;&lt;P&gt;Have a look at: &lt;A href="http://java.sun.com/developer/technicalArticles/Programming/compression/" target="test_blank"&gt;http://java.sun.com/developer/technicalArticles/Programming/compression/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2005 16:02:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extract-file-from-http-zip-into-abap/m-p/1000306#M76272</guid>
      <dc:creator>former_member182371</dc:creator>
      <dc:date>2005-08-18T16:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: Extract file from http://...zip into ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extract-file-from-http-zip-into-abap/m-p/1000307#M76273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Calsadillo!&lt;/P&gt;&lt;P&gt;Thanks for an interesting suggestion! I could get a zip file with CL_HTTP_CLIENT, pass it to a script which extracts and returns unzipped file. &lt;/P&gt;&lt;P&gt;However, I don't know how to use a script in my ABAP program, whithout using the filesystem commands or JCo server. And especially not filesystem of a workstation, since my program should be able to run in background too.&lt;/P&gt;&lt;P&gt;How do I integrate a script with ABAP?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Igor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. I was on vacation - that's why it took me so long to answer your post.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2005 10:46:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extract-file-from-http-zip-into-abap/m-p/1000307#M76273</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-05T10:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Extract file from http://...zip into ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extract-file-from-http-zip-into-abap/m-p/1000308#M76274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;have a look at his link (just in case):&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.4soi.de/SAPCAR.php?Area=SAPGenie&amp;amp;" target="test_blank"&gt;http://www.4soi.de/SAPCAR.php?Area=SAPGenie&amp;amp;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2005 16:52:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extract-file-from-http-zip-into-abap/m-p/1000308#M76274</guid>
      <dc:creator>former_member182371</dc:creator>
      <dc:date>2005-09-05T16:52:26Z</dc:date>
    </item>
  </channel>
</rss>

