on 06-18-2008 10:20 AM
hi,
I createa an application ,in that i converted Smartform to Pdf.I want to download the generated pdf to our local system by using "cl_wd_runtime_services" because we cant directly use FM GUI_DOWNLOAD directly.So can any one please tell me the process.
Hi ,
see the below code..
call function 'CONVERT_OTF'
exporting
format = 'PDF'
importing
bin_filesize = pdf_size
bin_file = LV_PDF
tables
otf = lt_otfdata[]
lines = l_dummy
exceptions
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
others = 4.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
lv_string = filename
cl_wd_runtime_services=>attach_file_to_response(
i_filename = LV_STRING
i_content = lv_pdf
i_mime_type = 'pdf/application'
i_in_new_window = abap_false
i_inplace = abap_false ).
this will open a popup same as when u download some file...
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 Yashpal,
First of all i want to thank you for solving my problem.It is generating to PDF and iam able to save in my local system.But if my application run in other system then it is showing an run time error like " Please maintain an output device in your user master data". Can you please resolve this error.
showing run time error
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This will help you
The last statement in the Link is this
elem_pdf->set_attribute(
exporting
name = `SOURCE`
value = pdf_data ).
instead of showing the InteractiveForm UI, place FileDownload UI element and bind the data property to the SOURCE attribute.
Abhi
Edited by: Abhimanyu Lagishetti on Jun 18, 2008 11:25 AM
Edited by: Abhimanyu Lagishetti on Jun 18, 2008 11:28 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.