on 09-01-2010 11:58 AM
Hi Experts,
When I convert the SAP Script output to pdf, it gives an error like "Form is trying to convert *752 as number".
What is this? Is it the problem from content?
I am using convert_otf_2_pdf FM
Thanks and regards,
Venkat
Hi,
try this way...
SELECT SINGLE * FROM tsp01 into wa_tsp01 WHERE rqident = p_spool .
* To get attributes of spool request
CALL FUNCTION 'RSPO_GET_ATTRIBUTES_SPOOLJOB'
EXPORTING
rqident = p_spool "Spool Request Number
IMPORTING
rq = wa_TSP01 "Consists the Spool Document Type Details
TABLES
attributes = dummy
EXCEPTIONS
no_such_job = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
*Convert spool request into PDF, dependent on document type
IF wa_TSP01-rqdoctype = 'OTF' OR wa_TSP01-rqdoctype = 'SMART'. "Doc Type is of Sap Script or Smart form
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = p_spool "Spool Request Number
no_dialog = 'X'
pdf_destination = 'X'
no_background = 'X'
IMPORTING
pdf_bytecount = bin_size
bin_file = pdf_xstring "This fm will convert the spool data into
"PDF Format in this importing string
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
OTHERS = 12.
IF sy-subrc <> 0.
MESSAGE e712(po) WITH sy-subrc 'CONVERT_OTFSPOOLJOB_2_PDF'.
ENDIF.
ENDIF.
"Now call
* Downloading file to p_file loation in PDF foramt
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = w_numbytes
filename = w_filename
filetype = 'BIN'
TABLES
data_tab = t_pdf.
Prabhudas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
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.