cancel
Showing results for 
Search instead for 
Did you mean: 

How to use the FormDownload UI element?

0 Kudos

Hi,

I am a newbie in ABAP Webdynpro and I want to know how to use the FormDownload UI Element. Any hints plz? Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi, Check standard component WDR_TEST_EVENTS. Regards, Radhika.

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

There is no FormDownload UI element. Did you mean FileDownload? If so, you can read about it here:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/09/a5884121a41c09e10000000a155106/frameset.htm

FileDownload is pretty simple to use. Was there a particular question that you had about it?

0 Kudos

Hi,

Actually I have a smartform whose output is converted to in PDF format using the FM CONVERT_OTF. Now the output will be downloaded and savede as pdf file in my system from browser WITHOUT DISPLAYING THE SMARTFORM. Now my requirement is, whenever the user will click for the DOWNLOAD AS PDF button, he will be asked with a popup window asking for target location

(similar to the SAVE AS file dialog window in Windows Operating systems). How can I achieve this in webdynpro? Thanks in advance...

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You just described exactly what the FileDownload UI element does.

0 Kudos

Hi,

Thanks for ur replies. Now I am being able to download the pdf file in the specifed target location by using the FileDownload UI element properly. But my pdf file is saved as a corrupt file. I have given the mime type as Application/pdf. Any suggestions plz?

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

It is probably something happening to the data before it is bound to the context. Are you keeping the data as an XSTRING? What processing steps are you taking to get the data from OTF all the way to the context attribute XSTRING?

0 Kudos

Hi,

I used CONVERT_OTF FM to convert the otf data to pdf data. In my form user has the option to view the smartform (a button) or to directly download the pdf from smartform output without displaying the output. While the former has been taken care of by using InteractiveForm UI element and is displaying the smartform output fine, I am not being able to implement the second option. I have given a supply function to the pdfsource context node but am clueless about what to write to pass pdf data. In the sam WD component WDR_TEST_EVENTS, the FileDownload is used to save a text file with just one line. But how can I save a pdf file? I have assigned mime to application/pdf. How will I proceed now? Please suggest. Thanks in advance.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You only need to bind the fileDownload data property to an XSTRING context attribute or to a context attribute that contains a SUPPLY_FUCTION that returns an XSTRING variable.

>While the former has been taken care of by using InteractiveForm UI element and is displaying the smartform output fine, I am not being able to implement the second option.

If you are displaying the content in an InteractiveForm UI element, then you must already have the PDF content as an XSTRING. Just reuse that same XSTRING content.