‎2009 Dec 07 10:00 AM
Hi Gurus,
I have created a smartform and converted into PDF using function module as given below. Now I want to write this generated PDF file into application server. I am not generating any spool request too. How can I proceed from here? Pls advice..
CALL FUNCTION 'CONVERT_OTF_2_PDF'
IMPORTING
bin_filesize = lv_bin_filesize
TABLES
otf = ls_job_output_info-otfdata
doctab_archive = lt_docs
lines = lt_lines
EXCEPTIONS
err_conv_not_possible = 1
err_otf_mc_noendmarker = 2
OTHERS = 3.
Thanks..
Saj
‎2009 Dec 07 10:15 AM
Hi,
Try using open dataset to write ur file into the application server. The following syntax might help u
OPEN DATASET 'urfilename.pdf' FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
regards,
Ibrar
‎2009 Dec 07 10:30 AM
How can I use OPEN DATASET becase which internal table should I write to file?
We have 3 internal tables exporting from above function module.
‎2009 Dec 07 10:39 AM
transfer all the data from ur itabs to one final itab declared as follow
DATA: BEGIN OF final_itab OCCURS 0,
document TYPE string,
END OF final_itab.
then finally,
OPEN DATASET 'yourfile.pdf' FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
len = strlen( final_itab-DOCUMENT ).
TRANSFER final_itab-DOCUMENT TO 'yourfile.pdf' LENGTH len.
CLOSE DATASET 'yourfile.pdf'.
This ends the coding mate.
Enjoy it n have a good day.
Cheers
‎2009 Dec 28 10:19 AM
this doesn't work..one thing i understood it supposed to be in BINARY mode...