on 06-05-2012 8:13 AM
Hi,
I would like to read and display PDF file which is stored on application server using webdynpro abap.
Kindly give your valuable inputs.
Thanks,
Rajesh Badita
Hi Former Member
I got the same situation please help me if you got the solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Rajesh
Please see the following in order to viewPDF in Webdynpro
How to call Adobe Forms from Web Dynpro?
You can find many different methods to call an adobe form. If it is enough to have a print form
button, that delivers you a PDF, you can use the following two methods.
method ONACTIONSHOW_ADOBE_FORM .
data : l_pdfstring type xstring.
" Select for print
wd_assist‐>prepare_adobe_forms( importing p_pdf = l_pdfstring ).
" Call print
cl_wd_runtime_services=>attach_file_to_response(
i_filename = 'adobe_form.pdf'
i_content = l_pdfstring
i_mime_type = 'application/pdf'
i_in_new_window = abap_false
i_inplace = abap_false ).
endmethod.
The user clicking on the print form button has to have a default printer. (Usually LOCL)
There is an assistance class method behind:
method prepare_adobe_forms.
* "### A D O B E F O R M S P D F C A L L
data: lv_funcname type funcname.
data: ls_outputparams type sfpoutputparams.
data: ls_formoutput type fpformoutput.
call function 'FP_FUNCTION_MODULE_NAME'
exporting
i_name = 'FP_TEST_DATE'
importing
e_funcname = lv_funcname.
ls_outputparams‐nodialog = 'X'. " suppress printer dialog popup
ls_outputparams‐getpdf = 'X'. " launch print preview
call function 'FP_JOB_OPEN'
changing
ie_outputparams = ls_outputparams
exceptions
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
others = 5.
call function lv_funcname
* exporting
* /1bcdwb/docparams = fp_docparams
importing
/1bcdwb/formoutput = ls_formoutput
exceptions
usage_error = 1
system_error = 2
internal_error = 3
others = 4.
call function 'FP_JOB_CLOSE'
exceptions
usage_error = 1
system_error = 2
internal_error = 3
others = 4.
p_pdf = ls_formoutput‐pdf.
endmethod. "prepare_adobe_forms
Regards,
Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rajesh,
Did u tried with Interactive Form UI element, its used to display the PDF documents in WDA.
Refer the following thread for better understanding about displaying file contents in WDA.
http://scn.sap.com/thread/1746905
Hope its useful to u,
Regards
Jana
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.