2008 Jan 17 1:54 AM
Hi all,
understand that there are many references and information available for the above mentioned issue, but because the current SAP version 4.6B does not have FM such as CONVERT_ABAPSPOOLJOB_2_PDF & CONVERT_OTFSPOOLJOB_2_PDF. So making it difficult to do codings for PDF conversion.
I would like to seek any advises from experts around, is there any other methods to convert spool file (SP02) to PDF files?
Appreciate your help , thanks.
Regards,
JL
2008 Jan 17 2:00 AM
2008 Jan 17 2:00 AM
2008 Jan 17 2:08 AM
Hi a®s,
I do understand that program RSTXPDFT4 can be used, but unfortunately, this program does not exist in my SAP system.
Possible to provide the source code for this program so that i create it manually in the system or any other methds?
Thanks.
Regards,
JL
2008 Jan 17 3:08 AM
Use the FM 'CONVERT_OTFSPOOLJOB_2_PDF' to get the PDF data from Spoll by passing the spol number if its a script or smartform related output.Or if its a list by ABAP program then use 'CONVERT_ABAPSPOOLJOB_2_PDF'. It will work.
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = v_spoolid
NO_DIALOG = 'X'
DST_DEVICE =
pdf_destination = 'C:\File.pdf'
IMPORTING
pdf_bytecount = numbytes
pdf_spoolid = pdfspoolid
OTF_PAGECOUNT =
btc_jobname = jobname
btc_jobcount = jobcount
TABLES
pdf = pdfdata[]
EXCEPTIONS
err_no_otf_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_dstdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11.
*refresh pdfdata[].
*pdfdata-tdformat = 'hello pawan'.
*append pdfdata.