Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
nishashrivansh
Explorer
Dear Reader,

In this blog post I will explain each step required to configure FTP and SFTP adapter in CPI using basic authentication.

The FTP adapter allows you to configure transport protocol FTP/FTPS for the connection to the FTP server to send messages to the FTP server or to receive messages from the FTP server. FTP adapter uses TCP protocol to connect to CPI tenant to remote system to send/receive files.

The SFTP Adapter connects an SAP Cloud Integration tenant to a remote system using the SSH File Transfer protocol to write files to the system. The SFTP adapter uses a certificate and keystore to authenticate the file transfer unlike the standard FTP. The SFTP adapter achieves secure transfer by encrypting sensitive information before transmitting it on the network. It uses SSH protocol to transfer files.

We have requirements mostly in Financial workstream to poll the files from bank server and post the files to SAP system without changing the content of file. File format can be any XML, TXT, CSV, BAI, BAI2 etc.

Message flow will be like this:


Message Flow


Steps required to configure this Integration Flow in CPI:

Step1: To connect to FTP server we should have FTP server url/IP address, port, user id and password details. To connect to FTP server, we should a establish TCP connection in Cloud connector first.

You need to login to cloud connector and go to Cloud to On Premise and add Mapping virtual to Internal system.

Here we need to maintain 2 connections. One is FTP control connection with port 21 and other one is FTP data connection with port data port range.


 

Step 2: Deploy FTP credentials to Security material of CPI.


Step 3: Create TCP connection for SFTP server same as FTP:


 

Step 4: Update SFTP Known_host file in CPI security material. If it is not available, then we can create this file and deploy in CPI.

Now how to get this known_host details (public key) of SFTP?

Option 1: get it from SFTP server admin.

Option 2: We can generate it ourselves using connection test in CPI tenant.

Operations view- > Manage security-> Connectivity test->SSH

Provide your virtual host created in Cloud connector, SFTP port, CPI location id and click send. It will generate the host key. We can copy this host key and update in known_host file.


 

Step 5: Deploy SFTP credentials in security materials.


Step 6: Create Integration Flow in CPI.




Content modifier header property is used to keep file name same as source.


 

Step 7: Now deploy the iflow.


Step 8: Testing the Iflow: I have placed the file on FTP server directory:


So, file Test_18_09_2021.txt has been picked up and sent to SFTP server location with same file name.


 


 

In this blog post we learnt about how to configure FTP and SFTP adapter in cloud platform integration using basic authentication.

References:

Configure the SFTP Receiver Adapter - SAP Help Portal

Configure the FTP Sender Adapter - SAP Help Portal

https://launchpad.support.sap.com/#/notes/0003076681

 

Happy reading 🙂

 

Thanks & Regards,

Nisha Shrivansh

 
13 Comments
Labels in this area