on 04-05-2013 10:58 AM
Hi Friends,
I Have a XString PDF Content which should be downloaded as a PDF file in webdynpro to a default location, which can be a desktop/downloads folder. We have function modules in R3 to download directly to a specified location but how to achieve this in webdynpro, i tried all the standard R3 function module which gives dumps, so please help me in downloading the file directly to a specified location from webdynpro application.
Thank you in advance...
Arjun.
hello,
Check this link for an example to download a file from WebDynpro
http://an-sap-consultant.blogspot.com/2012/03/web-dynpro-abap-download-file.html
best regards,
swanand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Neither of the proposed solutions will automatically download the file and store it on the PC, meaning the browser will prompt the user for the action.
Some years back I solved a similar requirement by calling webgui from WDA. With webgui you can use the methods of ABAP class CL_GUI_FRONTEND_SERVICES.
Hi Samuli Kaski,
CL_GUI_FRONTEND_SERVICES class have the methods, which will download a file to the specified default location by clicking an button. But when we use all these R3 related classes and function modules it gives dump like, NOT_SUPPORTED_BY_GUI exception, so is their any option in webdynpro so that we can directly store a file to a specified location.
Regards,
Manikandan
Assuming you are on NW701 or newer, you could look into making a ACF implementation for WDA. Assuming you setup a whitelist, you should be able to automatically (and silently) download files to the PC. See the attached link for details.
Hi,
Please try this bleow code and see it works for your
place a LinkToAction UI Element in the View and in Event Handler code as follows
LV_FILENAME = 'RebateRequest.pdf'.
LV_CTYPE = 'pdf'.
CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE(
EXPORTING I_FILENAME = LV_FILENAME
I_CONTENT = LV_CONTENT
I_MIME_TYPE = LV_CTYPE
I_IN_NEW_WINDOW = ABAP_TRUE ).
where LV_CONTENT is XSTRING, convert your internal table to XSTRING.
Also kindly share the details of the Dump for further understanding
Regards
Vinay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vinay,
This code is downloading the pdf, but what happens is it opens a pop up and giving a option of save, open, cancel, i dont want this to happen and we cant pass the default location with the above logic, so is their any options like R3 gui download fn module where we can specify the default path to download, so in webdynpro also by clicking the download button it gets downloaded to the default location.
User | Count |
---|---|
86 | |
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.