on 06-22-2011 2:14 PM
Dear Experts,
My requirement is to show the interactive adobe form in my webdynpro ABAP applicatiion, using the class cl_wd_runtime_services=>attach_file_to_response,
For this I have to converts the pdf into xstring.
Request you to please suggest.
Warm Regards,
Upendra Agrawal
Hi Upendra,
If you have form already in your application as a part of your view, then bind the pdfsource property to a context attribute of type xstring. This will contain pdf form in xstring format. You can pass this attribute to the class method.
In case you are uploading the form using an upload UI element in WD application, again the data property of the upload UI should be bound to the attribute you are using as pdfsource of the form. Later you can use the same attribute as pdfsource to the form ui element. It won't require any class to show the uploaded form
In case your scenario is different please explain it.
Regards,
Vaibhav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Vaibhav,
Thank you for the suggestion, but in my scenario, I do not have the interactive form as a part of my view.
Instead, i just have a Download button.
By clicking on the download button, my adobe form which is designed separately in TCode SFP,
should be downloaded to the users machine.
For this I have used the class cl_wd_runtime_services=>attach_file_to_response( ),
But here I have to pass the Interactive form as a xstring, whereas I am having the form in Rawdata.
Kindly suggest.
Upendra
Hi,
Try this..
ie_outputparams-getpdf = 'X'.
ie_outputparams-nodialog = 'X'. " suppress printer dialog popup
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = ie_outputparams.
i_name = 'YOUR_FORM_NAME'.
TRY.
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.
lv_data = fp_formoutput-pdf.
wdr_task=>client_window->client->attach_file_to_response(
i_filename = Test.PDF'
i_content = lv_data
i_mime_type = 'PDF' ).
Hope it helps..
Regards, Amith
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.