2019 Jan 08 6:50 AM
Hello,
I have this requirement to upload multiple documents from presentation server to SAP Application server and then from that Application server to email as attachment. So, we are thinking of putting up all files in a ZIP file and upload it, then send this exact ZIPPED file ( which is first uploaded to Application Server ) to concerned person over email through another program.
The upload of ZIP file to Application Server has to be done through ALV cell like this.

Kindly suggest.
Regards,
Anurag Singh
Hello,
I have this requirement to upload multiple documents from presentation server to SAP Application server and then from that Application server to email as attachment. So, we are thinking of putting up all files in a ZIP file and upload it, then send this exact ZIPPED file ( which is first uploaded to Application Server ) to concerned person over email through another program.
The upload of ZIP file to Application Server has to be done through ALV cell like this.

Kindly suggest.
Regards,
Anurag Singh
2019 Jan 08 7:13 AM
Hello, nice requirement 🙂 Where did you find problem? And which ways did you tried?
2019 Jan 08 10:16 AM
2019 Jan 08 10:43 AM
The problem is I need some solution to Upload a zipped file containing different types of documents ( like .XLS, .DOC, .PDF, etc ).
And now this zipped file has to be saved in SAP somewhere so that later on I can provide a hyperlink to this zipped file in another ALV Report. When user clicks that hyperlink in ALV, the zipped file can be downloaded to Local PC and the user can see those documents wrapped into the zipped file then.
Kindly suggest.
2019 Jan 08 3:27 PM
2019 Jan 08 10:45 AM
Hello,
My dear client gave this requirement 😄 :D.
I used GUI Upload but it's restricted to only .txt files which is not my requirement.
Hope you can provide some help.
2019 Jan 08 12:29 PM
GUI Upload is not restricted to only .txt files. It has no problem with a .zip or any other file.
2019 Jan 09 2:54 PM
You can use cl_abap_zip class to create zip file.
Following is the sample code to covert text to zip. It returns a binary string which can be written to file.
data: lo_bcs_exception type ref to cx_bcs,
lex_text type string,
l_xstring type xstring.
data: l_zipper type ref to cl_abap_zip,
filename type string,
zip type xstring,
filelenght type i.
try.
l_xstring = cl_bcs_convert=>string_to_xstring( iv_string = p_output iv_codepage = '4103' iv_add_bom = 'X').
filename = 'alvfile.xls'.
create object l_zipper.
l_zipper->add( name = filename content = l_xstring )."add object to zip
call method l_zipper->save( receiving zip = zip ). "save zip
catch cx_bcs into lo_bcs_exception.
lex_text = lo_bcs_exception->get_text( ).
endtry.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |