> FTP Connection Creation and Test in SAP - sapbasis

sapbasis

Share the Knowledge

Thursday, 25 October 2018

FTP Connection Creation and Test in SAP


FTP(FileTransferProtocol) is a network protocol built on top of the TCP/IP protocol,allowing transfer of files between two host machines,over the network. FTP is used for Application-to-appication(A2A) or Business-to-business(B2B) scenarios.
SAP provides a built in client library called 'SAPFTP Library'. It has two parts:
Part A: Executable File
Executable file called SAPFTP,which is installed on the SAP Netweaver AS Abap Host,as well as installed on any client as part of the SAP Gui client installation.

Module
Comment
RSFTP001
SAPFTP version
RSFTP002
Execute FTP Command
RSFTP003
Test
RSFTP004
FTP copy
RSFTP005
SAPFTP check
RSFTP006
FTP command list
RSFTP007
Test FB:FTP_SERVER_TO_R3 / FTP_R3_TO_SERVER
RSFTP008
Test FB:FTP_CLIENT_TO_R3 / FTP_R3_TO_CLIENT

Creating RFC Destinations for FTP communications:

You need to create RFC destinations for FTP communications. There is a standard report for that purpose called:
    'RSFTP005'(SAPFTP check)
instead of configuring it manually via the transaction 'SM59'(Configurations of RFC connections),it automatically creates the following two RFC destinations:
(1)SAPFTP(For invoking the RFC library on the SAP GUI frontend)
(2)SAPFTPA(For invoking the RFC library on the SAP Netweaver AS ABAP host)

Test the RFC destinations:

After setting up the RFC destinations,you can check the following report for testing them:
  'RSFTP002'(Execute FTP Command). Here you enter in the credentials(which includes fields like 'User','Password','Host','RFC Destination'). In order to test commands you enter in a command such as 'help',that displays a list of all commands that can be entered in the command field.

checking the Trace of the FTP communication:

You can use the report 'RSFTP001',which displays the trace of the FTP communications,provided tracing has been enabled for BOTH RFC destinations 'SAPFTP' and 'SAPFTPA' in Transaction 'SM59'. This report not only tells you about all commands and interaction but also informs about attributes such as the working directory,SAPFTP executable file path for each of the RFC destinations mentioned above(SAPFTP and SAPFTPA). Enabling Tracing generates a trace file in the SAP GUI Working directory with the name 'dev_rfc'(For unix) and rfc.trc*(Windows 32).

Setting Up an FTP Server:

Before you can use the SAPFTP library API's,you will first need to set up an FTP Server at least locally to test the examples that will be created in the upcoming sections. We will be using a free FTP Server called 'FileZilla Server' and an FTP client called 'FileZilla Client' for accessing the FTP Server. Both of these software packages can be downloaded from the following URL:
    http://filezilla-project.org/
Just click on the 'quick download links' area on the Main Page or download both the server and the client from the 'Download' section on the left for 'FileZilla' and 'FileZilla Server' sections respectively

No comments:

Post a Comment