cancel
Showing results for 
Search instead for 
Did you mean: 

RFC to receive PDF files

rypatil
Newcomer
0 Kudos

Hi Experts,

I'm working on a scenario which is related to SFTP to RFC. Where I need to pass pdf files from a SFTP server to RFC. Please let me know which type to RFC destination(Example:- ABAP, HTTP Connection to External Server, Internal Connection, TCP/IP Connection) and function module I've to create so that it can receive pdf files.

Thanks and Regards,
Sufiyan.

Sandra_Rossi
Active Contributor
0 Kudos
Could you clarify the scenario, where do you want to create the RFC destination, where do you want to create the ABAP program, etc.? <PDF file in server> ----via-SFTP---> ABAP system 1? ----via-RFC----> ABAP system 2?

Accepted Solutions (0)

Answers (1)

Answers (1)

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
0 Kudos

I think, what you are looking for, is the "RFC" destination SAPFTP and the APAP API that uses it. However, bad luck: the SAPFTP interface does not support SFTP: See 795131 - FAQ: SAPFTP cannot perform secure FTP communication - SAP for Me

I think, your best bet is to use a middleware (like for example SAP BC), and implement the scenario as follows:

  1. set up a type "T" destination to the middleware
  2. create a "Flow" on the middleware that makes an SFTP "get" request to the SFTP server and fetches the file
  3. create an empty function module on ABAP side, that has the required importing/exporting parameters (for example a CHAR import parameter for the filename and an XSTRING export parameter for the returned file data)
  4. on the middleware, link the function module with the Flow, and then you can call it from ABAP via CALL FUNCTION

(If you want to try this using SAP BC, let me know: I am currently writing an SFTP client for SAP BC, which I want to publish via a blog. It's still work in progress, but simple "cd" and "get" commands already work and I could share this with you. So for example, you could already set up the ABAP side and a test Flow on SAP BC, which returns a "hard-coded PDF file", while I finish the SFTP client.)