Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to do a FTP from one system to another

Former Member
0 Kudos

Hi,

I have a program which creates a file from the master data in one system (Logistics), and I have another program in another system (HR) which writes the contents from this file to a custom table.

I want to the avoid manual movement of the file among the systems. One option would be to create a common location on the file system which is accessible from both these systems.

But, could someone help me on doing a FTP of this file to HR system.

Appreciate your inputs.

Thanks

M

1 ACCEPTED SOLUTION

mvoros
Active Contributor
0 Kudos

Hi,

I've never worked with it but check reports RSFTP* which contain some FTP examples. Those examples use functions from function group SFTP so check how are these functions used in SAP as well.

8 REPLIES 8

mvoros
Active Contributor
0 Kudos

Hi,

I've never worked with it but check reports RSFTP* which contain some FTP examples. Those examples use functions from function group SFTP so check how are these functions used in SAP as well.

Former Member
0 Kudos

Hi!!

Try RSFTP007 .

hope this olves ur purpose.

0 Kudos

Thanks for the suggestions Martin/Deepika.

I will try this when I get to work tomorrow and update the post.

Thanks

M

kiran_k8
Active Contributor
0 Kudos

Mark,

Check if this can give you any lead.


data:host(64) TYPE c VALUE 'ip address here',
       dest LIKE rfcdes-rfcdest VALUE 'ZFTP',
User and password can be harcoded in the program
*CONNECT TO SERVER
  CALL FUNCTION 'FTP_CONNECT'
    EXPORTING
      user              = user
      password       = pwd
      host              = host
      rfc_destination = dest
    IMPORTING
      handle          = hdl
    EXCEPTIONS
      not_connected   = 1
      OTHERS          = 2.

K.Kiran.

Former Member
0 Kudos

Hey Kiran, I will try this too.

Thanks

M

kiran_k8
Active Contributor
0 Kudos

Mark,

Just now I had checked my ZPROGRAM which has used this FTP concept is based on the report RSFTP007 itself.I guess this program as mentioned by them will give you a lead.

K.Kiran.

uwe_schieferstein
Active Contributor
0 Kudos

Hello Mark

Are the two systems accessible via RFC to each other? If so you can use one of the following function modules:

EPS_FTP_GET
EPS_FTP_PUT
EPS_FTP_MGET
EPS_FTP_MPUT

Regards

Uwe

Former Member
0 Kudos

Solved......

I had added another step in the background job to copy the file over to the other system.This second step has some unix code in it.

Thanks for all your suggestions.

MM