Skip to Content
0
Former Member
Feb 10, 2011 at 07:22 PM

Problem downloading a PDF via FTP.

50 Views

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