on 07-13-2010 7:44 AM
Hi all!
I have my WD4A application. It has some fields that user must fill. Then he push the button and printable pdf form must be generated. I created a context in WD and assigned it to pdf form's context. I can't figure out how I can start form processing from button event. I know that I can do it manually with ABAP using function modules, pass parameters to pdf forms, get binary presentation of the form, etc. But I want WD4A do it for me. The only question is how to trigger pdf generating (through InteractiveForm UI element) when I want.
Thank you for advice. I don't want the user to view this pdf file in browser. After clicking a button, suggestion to save the pdf file should appear. But when I made InteractiveForm UI element invisible, It doesn't generate pdf anymore. What should I do?
Edited by: Konstantin Milutin on Jul 14, 2010 2:55 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As Frank suggests, you'll need to use the generated FM of the form to build it. The Form UI element does this for you - but only if it's visible.
[from SAP HELP|http://help.sap.com/saphelp_nw70ehp2/Helpdata/EN/ed/29093b519e4f0db9be6063526537f5/frameset.htm]
>Note that complex UI elements can execute actions only if they are visible.
>In Web Dynpros, user entries or information can be transferred to an active component only using the context and action handler of a view. The corresponding UI element must be available in this view and the view must exist, that is, it must be visible in terms of the runtime. For example, the pixel size is already 1x1.
Alternatively you could set it to be 1 pixel by 1 pixel as per the suggestion in the help....
If you want to allow the user to decide where to save the file (not true background processing) then use the FileDownload UI element.
You must create a new view containing a Interactive form UI element, and then you must create a button that navigates to that view (through an outbound plug). You will find several turorials on how to create a view containing a form if you search a bit.
Here is a detailed description of the process:
http://help.sap.com/saphelp_tm60/helpdata/en/44/11780a48c9088be10000000a422035/frameset.htm
Edited by: Frank Stødle on Jul 13, 2010 9:24 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, correct, using the method I descriibed above, the PDF document will be displayed and the user can print the document or save it to disk.
Why would you want to "just download" a PDF file? Is it a requirement that this happens in the background?
"Just downloading" the PDF is not so easy because browser security will generally prevent any downloading of files to the client PC without user interaction. It is however possible to download the file in the background using the ACFUpDownload UI element. You would then need to generate the PDF document using the generated function module for your print form, and then download the PDF using ACFUpDownload.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.