cancel
Showing results for 
Search instead for 
Did you mean: 

multi SAR files Download

Former Member
0 Kudos

Hi experts,

I have some SAR files in different URLs, I want to zip all the files just in one file and download them at one time. Is that possible? (So far I can get every single file with popup, but it doesnt look nice.)

If I can use the CL_ABAP_ZIP, how can I first get the content from different URLs?

Thanks!

Rui

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You can use CL_ABAP_ZIP to combine them together into one compressed binary string.

>how can I first get the content from different URLs?

How are you getting them individually right now? You say that it is working one at a time with a popup for each. Where are these files at? We need to know about where the files are stored and how you are reading them now. I would imagine you could follow the same process you are using now in a loop processing each file one at a time into a binary string (XSTRING) in memory and adding them one at a time to the CL_ABAP_ZIP class.

Former Member
0 Kudos

Hi Thmoas,

thanks for your reply!

The files are stored somewhere in portal, I just have theire links. I put the links in a table then loop them to get single URL:

CALL METHOD lo_window_manager->create_external_window
      EXPORTING
        url    = final_url
      RECEIVING
        window = lo_window.
    lo_window->open( ).

but how can I get the content?

Edited by: gurui1980 on Jun 26, 2009 4:22 PM

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

If the files are not available from within the ABAP systems, then you would have to use the HTTP Client class (CL_HTTP_CLIENT) to make a request to read the files via URL. This will bring the file content into the ABAP application server so that it can be zipped and downloaded from there.

However consider if this is really the approach you want to take. This means that the entire file contents have to be transmitted over the network to the ABAP server, stored in session memory and then sent out via the ABAP AS. That's a lot of extra resources on the ABAP server just to zip the files. Perhaps it would be better to approach the system owners of where the files come from to see if something can be done on their side.

Former Member
0 Kudos

I think the files are stored in SAP enterprise Portal, could be in KM-content. If I want to change fileslocation, can I upload them in Mime repository or any suggestion for SAR files?

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I guess it really depends upon what all these files are used for. If you only need them for this application download and you need the ability to ZIP them together, then you might well be better off storing them in the MIME repository or a custom database table on the ABAP AS instead of in an external location.