Using Web Services in Adobe Forms

...Previous

Step 5: Create a print program for the form.

In the '####' place, enter your form name

 data: ie_outputparams type sfpoutputparams.
 data: i_name type fpname,
       i_funcname type funcname.
 data: fp_docparams type sfpdocparams.
 data: fp_formoutput type fpformoutput.
 data: data_tab type SOLIX_TAB.
 ie_outputparams-getpdf = 'X'.
 ie_outputparams-nodialog = 'X'. " suppress printer dialog popup
 call function 'FP_JOB_OPEN'
 changing
 ie_outputparams = ie_outputparams.
 try.
 i_name = '######################'.		"Your Form Name
 call function 'FP_FUNCTION_MODULE_NAME'
 exporting
 i_name = i_name
 importing
 e_funcname = i_funcname.
 catch cx_fp_api_repository.
 catch cx_fp_api_usage.
 catch cx_fp_api_internal.
 endtry.
fp_docparams-langu = 'E'.
fp_docparams-country = 'US'.
fp_docparams-FILLABLE = 'X'.
 call function i_funcname
 exporting
 /1bcdwb/docparams = fp_docparams
 importing
 /1bcdwb/formoutput = fp_formoutput
 exceptions
 usage_error = 1
 system_error = 2
 internal_error = 3.
 call function 'FP_JOB_CLOSE'
 exceptions
 usage_error = 1
 system_error = 2
 internal_error = 3
 others = 4.
 data: filename type string,
 path type string,
 fullpath type string,
 default_extension type string value 'PDF'.
 cl_gui_frontend_services=>file_save_dialog(
 exporting
 default_extension = default_extension
 changing
 filename = filename
 path = path
 fullpath = fullpath ).
 check fullpath is not initial.
 call function 'SCMS_XSTRING_TO_BINARY'
 exporting
 buffer = fp_formoutput-pdf
 tables
 binary_tab = data_tab.
 cl_gui_frontend_services=>gui_download(
 exporting
 filename = filename
 filetype = 'BIN'
 changing
 data_tab = data_tab ).
 cl_gui_frontend_services=>execute(
 exporting
 document = filename ).

Output:  

Step 6: Run the print program and then save the pdf form in your drive or desktop, then open the form using the Adobe Reader (7.0 or above).  

Give the material number and press description Button; it fetches the description of the Material entered.

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image