on 05-24-2011 9:31 AM
Hi experts,
I need to download a file in wd. I searched the forum and so far i found mostly for upload.
and i need to use cl_wd_file_download. There is a method get_data. But I don't know how to initialize the reference.
A sample code or any hint will be useful downloading a file using this class.
Thanks in advance.
Tenzin
used the ui element file donwload
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi experts,
Thanks for the support. Now I'v successfully used file download ui element and its opening the same session.
warm Regards
Tenzin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The link wasn't of much help. I need to download a mime file which is already available in the repository.
Kindly can you provide any other assistance regarding that. Is it madatory to have the download file ui element.
Any assistance will be helpful
Thanks Tenzin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kissnas,
I am aware of this downloading from the mime, once downloaded how do i use the cl_wd_runtime_services=>attach_file_to_response.
Currently what happens is when i try to open a new url for the downloaded file, its trying to open a new session and i am getting the error 400 session not found. is there a solution for this issue.
Warm Regards
Tenzin
Hi,
once downloaded how do i use the cl_wd_runtime_services=>attach_file_to_response.
When you get the content of the mime into lv_data of type xstring, pass that to the i_content like below.
cl_wd_runtime_services=>attach_file_to_response(
i_filename = lv_file_name
i_content = lv_data
i_mime_type = 'text/plain'
i_in_new_window = abap_false
i_inplace = abap_false ).
Hi Bakaran,
With this method i want to open a new window but with the same instance.
The generated url to download the file should point on the same instance, so i don't have this session out issue.
Some one has recommended me to use cl_wd_file_download... if you have any code related with using this will be helpful.
Thanks
Tenzin
Hi,
Please go through this..
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/09/a5884121a41c09e10000000a155106/content.htm
Cheers,
Kris.
I think you can use
i_in_new_window = abap_true
i_in_place = abap_false
this will bring the new window. I am not sure about your problem with session. You get a popup asking you to save the file in desired place. Same as another file you would download from internet. It is just a browser function.
I think for the file download there a link already provided in this forum.
Hi Wang,
Please go through this wiki.. download and uplaod.
http://wiki.sdn.sap.com/wiki/display/WDABAP/UploadandDownloadfilesinWebdynproABAP
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.