02-10-2011 7:22 PM
I'm trying to send a PDF file via FTP, that I obtained with FM 'CONVERT_OTFSPOOLJOB_2_PDF'.
After closing the FTP connection, i try to open the PDF file, and I get an error message, saying that the file is damaged.
Any ideas? Do I have to make any conversion?
<promise removed by moderator>
DATA: it_pdf TYPE TABLE OF tline WITH HEADER LINE.
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = p_spool
IMPORTING
pdf_bytecount = lv_byte
TABLES
pdf = it_pdf.
*-- Connection to FTP (not shown here)
*-- .....
*-- Transfer table
CALL FUNCTION 'FTP_R3_TO_SERVER'
EXPORTING
handle = w_hdl
fname = p_dest "file path of destination system
blob_length = lv_byte
* character_mode = ' '
TABLES
blob = it_pdf
* text = lt_value
EXCEPTIONS
tcpip_error = 1.
Thanks in advance,
Maxi.-
Edited by: maxikishi on Feb 10, 2011 8:22 PM
Edited by: Thomas Zloch on Feb 11, 2011 4:41 PM
02-11-2011 12:29 PM
I think you have to make some conversions before passing values to FTP function.
Hope it helps.
02-11-2011 2:47 PM
02-11-2011 3:09 PM
Don't offer rewards for assistance; you'll receive help with or without the offer. This topic is an FAQ; FTP is no different than any other transfer method. Search the forum for PDF conversion code. Also, the function you're using has a 99 page limit for conversion; you may want to view the function parameters and account for that.