on 04-22-2009 2:31 PM
hi,
i am converting Smartform output to PDF .
it's downloading and it's taking time 15mins to open the file.
i am using CONVERT_OTF and WS_DOWNLOAD fundtion modules.
please tell me what is the wrong.
Hi,
You can use these function modules write after o call the smartform it self.
First:
"Convert SPOOL to PDF
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = spool
no_dialog = 'X'
IMPORTING
pdf_bytecount = numbytes
pdf_spoolid = pdfspoolid
btc_jobname = jobname
btc_jobcount = jobcount
TABLES
pdf = it_pdf
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.
IF sy-subrc EQ 0.
Second:
"Saves PDF file in local PC
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = filename
filetype = 'BIN'
TABLES
data_tab = it_pdf
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
IF sy-subrc EQ 0.
"Erases spool Order
del_spool = spool.
CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
EXPORTING
spoolid = del_spool.
Hope it helped.
Regards.
Sandra Marques
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
i used this FM to convert a smartform to PDF.
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
CALL FUNCTION fm_name
*****.........................CONVERT TO OTF TO PDF.......................*****
CALL FUNCTION 'CONVERT_OTF_2_PDF'
****........................GET THE FILE NAME TO STORE....................
CALL METHOD v_guiobj->file_save_dialog
CALL FUNCTION 'GUI_DOWNLOAD'
That's all
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try with FM CONVERT_OTFSPOOLJOB_2_PDF to convert to PDF and use GUI_DOWNLOAD to download the file.
Check program RSTXPDFT4.
Regards,
Naimesh Patel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
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.