cancel
Showing results for 
Search instead for 
Did you mean: 

Display PDF file through webdynpro abap (File is placed on application server folder)

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Former Member

I got the same situation please help me if you got the solution.

venkateswaran_k
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Dear Venkateswaran,

My requirement is clear.

I would like to read the pdf file which is located on application server folder, but not to upload the pdf file into MIME repository of WD ABAP Application.

Kindly suggest.

Thanks,

Rajesh

JanarthananE
Contributor
0 Kudos

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

Former Member
0 Kudos

hi Rajesh,

do u have a solution now for this? I have the same problem for opening a pdf file that is placed on the application server in web dynpro.

regards