cancel
Showing results for 
Search instead for 
Did you mean: 

Call standard adobe form from a WD application

former_member205763
Active Contributor
0 Kudos

Hi All,

I have a requirement of displaying a standard adobe form from a click of a button in a WDA portal,

I am an ECC developer and have no idea of WD. I created a function module which uses submit statement to invoke the driver program and displays the PDF output, but when this function module is invoked from the portal on the click of button it gives and error FP job open error.

I understand that displaying PDF wont work in this way on portal, so can anyone please guide me the correct procedure on how to achieve this.

I came across this thread

[|]

which mentions of feeding the complete PDF document to the UI element as an XSTRING context node bound to the pdfSource property, but the help link provided in the thread is not opening.

Thanks in advance.

Regards,

Kartik

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi karthick , creat a button in the view and assign a action to it .

inside that action eventhandeler method call the method for prepare_adobe _form for dislay PDF .

method ONACTIONSHOW_ADOBE_FORM .
data : l_pdfstring type xstring.
" Select for print
wd_this->prepare_adobe_forms( importing p_pdf = l_pdfstring ). " coding is given below 
" 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.

prepare PDF

method prepare_adobe_forms.
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_outputparamsu2010nodialog = 'X'. " suppress printer dialog popup
ls_outputparamsu2010getpdf = '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_formoutputu2010pdf.
endmethod .

Regards

Chinnaiya P

former_member205763
Active Contributor
0 Kudos

Hi,

I had already got the PDF in xstring format, but was not sure abt how to proceed after that , I'll try what u've suggested.

Thanks for the code.

I'll try the code and share the results.

Regards,

Kartik