Skip to Content
avatar image
-1
Former Member

Fetch file from FTP using FTP_SERVER_TO_R3

Hi experts,

I am having requirements of fetching pdf or jpeg file from FTP server. for that, I am using FTP_CONNECT, FTP_COMMAND, and FTP_SERVER_TO_R3.

I have also gone through discussion threads but I didn't find any help on this.

I successfully reached till FTP_SERVER_TO_R3. here I am getting data in table BLOB

but after this, I got stuck. I am not passing BLOB_LENGTH, I don't know that will make any difference or not.

I want to convert this data from BLOB table to RAWSTRING format.

So please guide me on this issue.

Thanks in advance for help.

Regards,

ABAPER

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Sep 20, 2017 at 02:54 PM

    Maybe this works (not tested):

        CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
          EXPORTING
            input_length = blob_length
          IMPORTING
            buffer       = content_pdf_x       "type xstring
          TABLES
            binary_tab   = blob
          EXCEPTIONS
            failed       = 1
            OTHERS       = 2.
    Add comment
    10|10000 characters needed characters exceeded