<?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: Download Multiples archived documents in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/download-multiples-archived-documents/m-p/433291#M12395</link>
    <description>&lt;P&gt;I try to download multiple files in local , but after i implement this code i have just the last selected document in local !&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; CALL METHOD cl_gui_frontend_services=&amp;gt;directory_browse
    EXPORTING
*window_title = l_title
      initial_folder  = dir
    CHANGING
      selected_folder = l_string
    EXCEPTIONS
      cntl_error      = 1
      error_no_gui    = 2
      OTHERS          = 3.


  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.




  REFRESH downdocs. CLEAR downdocs.


   LOOP AT int_conn  WHERE selfield = 'X'.
    MOVE-CORRESPONDING int_conn TO downdocs.






* check free space on client disk
* check size of document (print lists)
* if size of document exceeds x KB , dont transfer
    CALL FUNCTION 'SCMS_HTTP_GET'
      EXPORTING
        mandt                 = sy-mandt
        crep_id               = downdocs-archiv_id
        doc_id                = downdocs-arc_doc_id
*       COMP_ID               =
*       OFFSET                = 0
*       LENGTH                = -1
*       SIGNATURE             = 'X'
*       ACCESSMODE            = 'r'
*       SECURITY              = ' '
*       BLANKSTOCRLF          = ' '
*       NO_CACHE              = ' '
*       CREPHTTP              =
      IMPORTING
        length                = length_1
*       MIMETYPE              =
*       CHARSET               =
*       VERSION               =
*       FROM_CACHE            =
*       DOC_PROT              =
      TABLES
        data                  = data_tab
      EXCEPTIONS
        bad_request           = 1
        unauthorized          = 2
        not_found             = 3
        conflict              = 4
        internal_server_error = 5
        error_http            = 6
        error_url             = 7
        error_signature       = 8
        OTHERS                = 9.
    IF sy-subrc &amp;lt;&amp;gt; 0.
* Implement suitable error handling here
    ENDIF.


CONCATENATE l_string part2 INTO filename.


    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        bin_filesize = length_1
        filename     = filename
        filetype     = 'BIN'
      TABLES
        data_tab     = data_tab.
    IF sy-subrc = 0.
    counter = counter + 1.
    ENDIF.
    CLEAR : filename, int_conn , ls_conn.




  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 05 Jun 2017 15:25:19 GMT</pubDate>
    <dc:creator>former_member421809</dc:creator>
    <dc:date>2017-06-05T15:25:19Z</dc:date>
    <item>
      <title>Download Multiples archived documents</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/download-multiples-archived-documents/m-p/433288#M12392</link>
      <description>&lt;P&gt;Hello All , &lt;/P&gt;&lt;P&gt;I try to download multiple archived documents using this function module and it works , but the problem is that it download files in another place not in 'C:\' &lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/37146-download-files.png" /&gt;&lt;/P&gt;&lt;P&gt;thanks in advance,&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2017 16:07:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/download-multiples-archived-documents/m-p/433288#M12392</guid>
      <dc:creator>former_member421809</dc:creator>
      <dc:date>2017-06-02T16:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Download Multiples archived documents</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/download-multiples-archived-documents/m-p/433289#M12393</link>
      <description>&lt;P&gt;If you had taken the 10 seconds to debug it, you'd have seen that DTPATH parameter doesn't work, and that you must pass the path using SET PARAMETER ID 'OAP' FIELD 'C:\PATH' before calling the function module.&lt;/P&gt;&lt;P&gt;But, of course, this function module is not released, so I hope that you won't see this function module being deleted in a future release.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2017 20:45:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/download-multiples-archived-documents/m-p/433289#M12393</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-06-02T20:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: Download Multiples archived documents</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/download-multiples-archived-documents/m-p/433290#M12394</link>
      <description>&lt;P&gt;Ok , so i have to found an alternative to download the multiple archive files  in a single folder on the local &lt;/P&gt;&lt;P&gt;thanks Sandra&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 09:10:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/download-multiples-archived-documents/m-p/433290#M12394</guid>
      <dc:creator>former_member421809</dc:creator>
      <dc:date>2017-06-05T09:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Download Multiples archived documents</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/download-multiples-archived-documents/m-p/433291#M12395</link>
      <description>&lt;P&gt;I try to download multiple files in local , but after i implement this code i have just the last selected document in local !&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; CALL METHOD cl_gui_frontend_services=&amp;gt;directory_browse
    EXPORTING
*window_title = l_title
      initial_folder  = dir
    CHANGING
      selected_folder = l_string
    EXCEPTIONS
      cntl_error      = 1
      error_no_gui    = 2
      OTHERS          = 3.


  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.




  REFRESH downdocs. CLEAR downdocs.


   LOOP AT int_conn  WHERE selfield = 'X'.
    MOVE-CORRESPONDING int_conn TO downdocs.






* check free space on client disk
* check size of document (print lists)
* if size of document exceeds x KB , dont transfer
    CALL FUNCTION 'SCMS_HTTP_GET'
      EXPORTING
        mandt                 = sy-mandt
        crep_id               = downdocs-archiv_id
        doc_id                = downdocs-arc_doc_id
*       COMP_ID               =
*       OFFSET                = 0
*       LENGTH                = -1
*       SIGNATURE             = 'X'
*       ACCESSMODE            = 'r'
*       SECURITY              = ' '
*       BLANKSTOCRLF          = ' '
*       NO_CACHE              = ' '
*       CREPHTTP              =
      IMPORTING
        length                = length_1
*       MIMETYPE              =
*       CHARSET               =
*       VERSION               =
*       FROM_CACHE            =
*       DOC_PROT              =
      TABLES
        data                  = data_tab
      EXCEPTIONS
        bad_request           = 1
        unauthorized          = 2
        not_found             = 3
        conflict              = 4
        internal_server_error = 5
        error_http            = 6
        error_url             = 7
        error_signature       = 8
        OTHERS                = 9.
    IF sy-subrc &amp;lt;&amp;gt; 0.
* Implement suitable error handling here
    ENDIF.


CONCATENATE l_string part2 INTO filename.


    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        bin_filesize = length_1
        filename     = filename
        filetype     = 'BIN'
      TABLES
        data_tab     = data_tab.
    IF sy-subrc = 0.
    counter = counter + 1.
    ENDIF.
    CLEAR : filename, int_conn , ls_conn.




  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Jun 2017 15:25:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/download-multiples-archived-documents/m-p/433291#M12395</guid>
      <dc:creator>former_member421809</dc:creator>
      <dc:date>2017-06-05T15:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Download Multiples archived documents</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/download-multiples-archived-documents/m-p/433292#M12396</link>
      <description>Sorry, I don't know what the issue is.</description>
      <pubDate>Mon, 05 Jun 2017 16:47:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/download-multiples-archived-documents/m-p/433292#M12396</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-06-05T16:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Download Multiples archived documents</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/download-multiples-archived-documents/m-p/433293#M12397</link>
      <description>&lt;P&gt;To quote Sandra, "if you had taken the 10 seconds to debug it" I'm sure you'd come up with at least one possible reason and solution.&lt;/P&gt;&lt;P&gt;From what I see, there is nothing extremely challenging in this task. Debugger is your friend.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 21:16:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/download-multiples-archived-documents/m-p/433293#M12397</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2017-06-05T21:16:21Z</dc:date>
    </item>
  </channel>
</rss>

