on 03-16-2011 7:28 AM
Hello Experts,
I have a requirement wherein I need to download the data present in a context to a specific location of local machine. The user does no want to select the destination folder, so there would be no further action required from user after clicking the Download button.
I tried using class CL_GUI_FRONTEND_SERVICES but it is not compatible in WD framework. I also checked class CL_WD_RUNTIME_SERVICES but it gives a dialog to select the destination folder.
Please let me know your ideas and suggestions at the earliest.
Regards,
Amit
If you are on NetWeaver 7.0 Enhancement Package 1 or higher, you can use the new UI element ACFUpDownload to perform silent downloads:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/b9157c878a2d67e10000000a42189c/frameset.htm
This UI element is designed for use with the content/cache server, but if you want to send the data directly from Web Dynpro I have a tutorial online for that:
And Sample Source Code:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amit,
Use the below class and method.
cl_wd_runtime_services=>attach_file_to_response(
i_filename = 'filename.extension'
i_content = file_conetent
i_mime_type = '/Desktop').
Regards,
Simi A M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amit ,
you can also use the class CL_ABAP_ZIP for downloading the file to the desktop.
Regards
Kuldeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I guess the only campatible methods are those which are available in CL_WD_RUNTIME_SERVICES class.
and i think there no method will download it directly to some folder.
and i guess it does make sense also.
in case of GUI, you are sure of soem location in GUI for downlaod.
but in case of Wd you are never sure that the specified location is existing there or not.
thanks
sarbjeet singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI
Use FM GUI_DOWNLOAD and if the data is huge you can use class CL_ABAP_ZIP class for zipping the data and then send it to desktop .
Regards
Kuldeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.