2019 Sep 16 6:48 AM
Dear Gurus,
Can anybody help me to read zip file from my AL11 directory (Application server) in my ABAP program and post-reading I need to send it via email.
2019 Sep 16 7:03 AM
You could find a lot of documentation about how to read a file in the server, how to send email using Oo ..
please try first to search
2019 Sep 16 7:09 AM
Dear Frederic,
thank you for your prompt response.
I did try to search a lot and at last, finally posted because I could not find a single blog or thread which will help me to understand how to read a zip file from AL11 directory. Also I am not worried about sending mail logic I have already written it.
Regards,
2019 Sep 16 8:33 AM
2019 Sep 16 12:29 PM
Please use the COMMENT button for comments, questions, adding details, etc., ANSWER is only to propose a solution, dixit SAP text at the right of the answer area: "Before answering You should only submit an answer when you are proposing a solution to the poster's problem"
2019 Sep 16 7:26 AM
You searched and you didn't find open dataset dset read dataset dset into xstring close dataset dset?
2019 Sep 16 7:43 AM
Please try to understand that I am asking regarding zip file, I am not talking about text file or pdf file or excel file. there are lot of opendataset codes but nothing regarding zip file
2019 Sep 16 9:16 AM
What is a zip file if not a binary file?
You have hundreds of threads on the topic and hundreds of threads on how to send them via email.
ZIP is not a magical format, it's like any other non-text file.
2019 Sep 16 12:16 PM
It does not matter what type of file is it if you read it in "BINARY MODE".
2019 Sep 17 1:46 AM
do you mean that you want to read the content of zip file, or what we call unzip it? maybe CL_ABAP_ZIP is what you looking for, but how to read the content of zipped file is difference thing based on what file zipped. if you don't have to care about file content, just read the zip into xstring and send it.
2021 Dec 02 10:27 AM
Hi Simson,
have you got solution for this?
I want read .GZ file from AL11. Searched a lot but not able to find any solid solution. Please let me know if you have resolved this problem.
Thanks
2019 Sep 16 12:31 PM
Use this code, handle errors, and that's done...
data: dset type string,
xstring type xstring.
dset = '/tmp/file'.
open dataset dset for input in binary mode.
read dataset dset into xstring.
close dataset dset.
2019 Oct 12 3:53 PM