<?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: SAP ABAP - Nested ZIP files in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap-nested-zip-files/m-p/683623#M30514</link>
    <description>&lt;P&gt;You can v_zip-&amp;gt;&lt;STRONG&gt;add&lt;/STRONG&gt;( ) any xstring data (content) to ZIP. Even the v_zipcontent which you got from v_zip-&amp;gt;save( ). Just make sure you do not use same cl_abap_zip object instance (basic OOP).&lt;/P&gt;</description>
    <pubDate>Thu, 18 Oct 2018 11:26:03 GMT</pubDate>
    <dc:creator>Tomas_Buryanek</dc:creator>
    <dc:date>2018-10-18T11:26:03Z</dc:date>
    <item>
      <title>SAP ABAP - Nested ZIP files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap-nested-zip-files/m-p/683615#M30506</link>
      <description>&lt;P&gt;Hi, My requirement is to zip a file and then zip that into another folder with few more files and place it on App Server. I could do the first zip, but couldn't figure out how to do nested zip. Please help if anyone has done it before. &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Example: &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;1. Zip files A, B, C into Zipper1.zip&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;2. Zip Zipper1.zip, D, E, F into Zipper2.zip&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;3. Write Zipper2.zip onto App Server&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Thanks,&lt;BR /&gt;Murali.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 18:51:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap-nested-zip-files/m-p/683615#M30506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-10-17T18:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: SAP ABAP - Nested ZIP files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap-nested-zip-files/m-p/683616#M30507</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Not sure why 2 times zipped. I think the logic for first zip will work with  files only and the same can not be used to zip - zipped file along with other file.&lt;/P&gt;&lt;P&gt;Technically, you are doing zip for A,B,C,D,E,F..then why not single zip for all these?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mohan&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 02:34:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap-nested-zip-files/m-p/683616#M30507</guid>
      <dc:creator>TMSingh_SAP</dc:creator>
      <dc:date>2018-10-18T02:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAP ABAP - Nested ZIP files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap-nested-zip-files/m-p/683617#M30508</link>
      <description>&lt;P&gt;What is there to figure out? Second level of archiving is same like first or any other.&lt;/P&gt;&lt;P&gt;Where exactly you have problem?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 06:46:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap-nested-zip-files/m-p/683617#M30508</guid>
      <dc:creator>Tomas_Buryanek</dc:creator>
      <dc:date>2018-10-18T06:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: SAP ABAP - Nested ZIP files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap-nested-zip-files/m-p/683618#M30509</link>
      <description>&lt;P&gt;Perhaps you could share how you did the first zip.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 07:00:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap-nested-zip-files/m-p/683618#M30509</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2018-10-18T07:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: SAP ABAP - Nested ZIP files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap-nested-zip-files/m-p/683619#M30510</link>
      <description>&lt;P&gt;Sorry No, I am not doing all the files in a single zip.&lt;/P&gt;&lt;P&gt;My requirement for 3rd party is to generate a zip file which contains "1 zip file with n number of files + some more files". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the requirement. If I have to zip all in one zip then I could have done it.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Murali. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 10:20:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap-nested-zip-files/m-p/683619#M30510</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-10-18T10:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: SAP ABAP - Nested ZIP files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap-nested-zip-files/m-p/683620#M30511</link>
      <description>&lt;P&gt;I will share how to zip(including nested zip) once I am done with my development. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Murali&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 10:25:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap-nested-zip-files/m-p/683620#M30511</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-10-18T10:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: SAP ABAP - Nested ZIP files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap-nested-zip-files/m-p/683621#M30512</link>
      <description>&lt;P&gt;"I will share how to zip(including nested zip) once I am done with my development."&lt;/P&gt;&lt;P&gt;You say you've done the first zip. The reason I wanted to see that was that it might give a hint as to why you're finding doing the second zip difficult. A Tomas Buryanek points out - what is there to figure out?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 10:45:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap-nested-zip-files/m-p/683621#M30512</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2018-10-18T10:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: SAP ABAP - Nested ZIP files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap-nested-zip-files/m-p/683622#M30513</link>
      <description>&lt;P&gt;Here is the code for the first zip. It generated &lt;STRONG&gt;Test.zip&lt;/STRONG&gt; on the Application Server. &lt;/P&gt;&lt;P&gt;*&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ztest_zip.&lt;BR /&gt;
&lt;BR /&gt;
PARAMETERS: p_file TYPE localfile.&lt;BR /&gt;
&lt;BR /&gt;
TYPES: BEGIN OF type_ekpo,&lt;BR /&gt;
 ebeln TYPE ebeln,&lt;BR /&gt;
 ebelp TYPE ebelp,&lt;BR /&gt;
 END OF type_ekpo.&lt;BR /&gt;
&lt;BR /&gt;
TYPES: type_t_ekpo TYPE STANDARD TABLE OF type_ekpo,&lt;BR /&gt;
 type_t_rec TYPE STANDARD TABLE OF sdokcntasc.&lt;BR /&gt;
&lt;BR /&gt;
DATA: t_ekpo TYPE type_t_ekpo,&lt;BR /&gt;
 t_rec TYPE type_t_rec,&lt;BR /&gt;
 t_zipdata TYPE TABLE OF x255,&lt;BR /&gt;
 w_ekpo TYPE type_ekpo,&lt;BR /&gt;
 w_rec TYPE sdokcntasc,&lt;BR /&gt;
 w_zipdata TYPE x255.&lt;BR /&gt;
&lt;BR /&gt;
DATA: v_date TYPE sy-datum,&lt;BR /&gt;
 v_zipcontent TYPE xstring,&lt;BR /&gt;
 v_zipcontent1 TYPE xstring,&lt;BR /&gt;
 v_zipfile TYPE string VALUE 'Test.zip',&lt;BR /&gt;
 v_content TYPE xstring,&lt;BR /&gt;
 v_xstr TYPE xstring,&lt;BR /&gt;
 v_name TYPE string,&lt;BR /&gt;
 v_filelength TYPE i,&lt;BR /&gt;
 v_zip TYPE REF TO cl_abap_zip.&lt;BR /&gt;
&lt;BR /&gt;
v_date = sy-datum - 7.&lt;BR /&gt;
&lt;BR /&gt;
SELECT ebeln&lt;BR /&gt;
 ebelp&lt;BR /&gt;
 FROM ekpo&lt;BR /&gt;
 INTO TABLE t_ekpo&lt;BR /&gt;
 WHERE aedat &amp;gt;= v_date.&lt;BR /&gt;
&lt;BR /&gt;
CLEAR: w_rec.&lt;BR /&gt;
CONCATENATE 'Purchase Order#'&lt;BR /&gt;
 'Item #'&lt;BR /&gt;
 INTO w_rec-line&lt;BR /&gt;
 SEPARATED BY ','.&lt;BR /&gt;
APPEND w_rec TO t_rec.&lt;BR /&gt;
&lt;BR /&gt;
CLEAR w_rec.&lt;BR /&gt;
&lt;BR /&gt;
LOOP AT t_ekpo INTO w_ekpo.&lt;BR /&gt;
 CONCATENATE w_ekpo-ebeln&lt;BR /&gt;
 w_ekpo-ebelp&lt;BR /&gt;
 INTO w_rec-line&lt;BR /&gt;
 SEPARATED BY ','.&lt;BR /&gt;
 APPEND w_rec TO t_rec.&lt;BR /&gt;
 CLEAR w_rec.&lt;BR /&gt;
ENDLOOP.&lt;BR /&gt;
&lt;BR /&gt;
CLEAR v_content.&lt;BR /&gt;
CREATE OBJECT v_zip.&lt;BR /&gt;
CALL FUNCTION 'SCMS_TEXT_TO_XSTRING'&lt;BR /&gt;
 IMPORTING&lt;BR /&gt;
 buffer = v_xstr&lt;BR /&gt;
 TABLES&lt;BR /&gt;
 text_tab = t_rec&lt;BR /&gt;
 EXCEPTIONS&lt;BR /&gt;
 failed = 1&lt;BR /&gt;
 OTHERS = 2.&lt;BR /&gt;
IF sy-subrc = 0.&lt;BR /&gt;
 REFRESH: t_rec.&lt;BR /&gt;
 FREE: t_rec.&lt;BR /&gt;
ENDIF.&lt;BR /&gt;
&lt;BR /&gt;
v_name = 'Test.csv'.&lt;BR /&gt;
v_zip-&amp;gt;add( name = v_name content = v_xstr ).&lt;BR /&gt;
v_zipcontent = v_zip-&amp;gt;save( ).&lt;BR /&gt;
&lt;BR /&gt;
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'&lt;BR /&gt;
 EXPORTING&lt;BR /&gt;
 buffer = v_zipcontent&lt;BR /&gt;
 IMPORTING&lt;BR /&gt;
 output_length = v_filelength&lt;BR /&gt;
 TABLES&lt;BR /&gt;
 binary_tab = t_zipdata.&lt;BR /&gt;
&lt;BR /&gt;
CONCATENATE p_file&lt;BR /&gt;
 v_zipfile&lt;BR /&gt;
 INTO v_zipfile&lt;BR /&gt;
 SEPARATED BY '/'.&lt;BR /&gt;
OPEN DATASET v_zipfile FOR OUTPUT IN BINARY MODE.&lt;BR /&gt;
LOOP AT t_zipdata INTO w_zipdata.&lt;BR /&gt;
 TRANSFER w_zipdata TO v_zipfile.&lt;BR /&gt;
ENDLOOP.&lt;BR /&gt;
CLOSE DATASET v_zipfile.&lt;/P&gt;&lt;P&gt;*&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 11:04:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap-nested-zip-files/m-p/683622#M30513</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-10-18T11:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAP ABAP - Nested ZIP files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap-nested-zip-files/m-p/683623#M30514</link>
      <description>&lt;P&gt;You can v_zip-&amp;gt;&lt;STRONG&gt;add&lt;/STRONG&gt;( ) any xstring data (content) to ZIP. Even the v_zipcontent which you got from v_zip-&amp;gt;save( ). Just make sure you do not use same cl_abap_zip object instance (basic OOP).&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 11:26:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap-nested-zip-files/m-p/683623#M30514</guid>
      <dc:creator>Tomas_Buryanek</dc:creator>
      <dc:date>2018-10-18T11:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAP ABAP - Nested ZIP files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap-nested-zip-files/m-p/683624#M30515</link>
      <description>&lt;P&gt;Thank you Tomas. It is resolved. &lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 11:48:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap-nested-zip-files/m-p/683624#M30515</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-10-18T11:48:31Z</dc:date>
    </item>
  </channel>
</rss>

