on 12-26-2007 1:02 PM
Hi all!!
I have to convert a SapScript to PDF, and then, display it on a Web Dynpro ABAP.
Somebody could guide me on this process?
Helpful answers will be rewarded.
Thanks and regards,
Manuel.
Hi ,
see this pdf........................
Regards
Yash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Once you got the Script output in OTF, use the FM 'CONVERT_OTF' by exporting the format as 'PDF' and importing the PDF data in XSTRING.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = lv_bin_file_size
bin_file = ev_pdf_xstr
TABLES
otf = it_otf
lines = et_otf_pdf
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
Once you have the PDF data as XSTRING, we need to get the mimetype of PDF, so that the PDF can be downloaded in WebDynpro.
Use the FM 'SDOK_MIMETYPE_GET' to get the mimetype.
CALL FUNCTION 'SDOK_MIMETYPE_GET'
EXPORTING
extension = 'PDF'
IMPORTING
mimetype = lv_mimetype_pdf.
Then use the WDA runtime services to attach file to response.
CALL METHOD cl_wd_runtime_services=>attach_file_to_response
EXPORTING
i_filename = ls_filename
i_content = lv_pdf_xstr
i_mime_type = lv_mimetype_pdf
i_in_new_window = abap_false
i_inplace = abap_false.
This will prompt the user for PDF download.
Let me know if you any other questions.
Thanks,
Anand
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.