You can connect to FTP for transfering, deleting, read file from SAP to FTP, This ABAP Program to connect FTP is simple because SAP provide us with required function module to connect it to FTP.

Here the Step to connect SAP to FTP.

  1. First Step before you use FTP_CONNECT function module to connect SAP to FTP, you need to Scramble FTP Password with HTTP_SCRAMBLE Function module.

In the HTTP_SCRAMBLE you need to passing Length of your FTP Password , Key value is the key for scramble your password you can entered anything value, and your FTP password itself.

Next, you need to call FTP_CONNECT function module, this important function module handling job to create connection from SAP System to FTP.

  1. After you success creating connection to FTP, in this step you can use FTP_COMMAND to execute any of FTP command, for this sample we will run FTP_COMMAND to transfer file from SAP to FTP.

In this FTP_COMMAND function module you need to pass parameter HANDLE this value you just entered 1 as integer data type, COMMAND this parameter contain your FTP command, and DATA as internal table char.

  1. The last step you need to close connection or disconnect FTP connection using FTP_DISCONNECT function module.


Incoming search terms: