Application Development and Automation 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: 
Read only

File Upload from FTP Server

Former Member
0 Likes
478

Dear ABAPers,

I want to Upload the data from Given FTP Server into SAP.could you please send me the Sample code.

Regards,

Ashok.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
430

Hi Ashok,

Please try FTP FM's

FTP_COMMAND Execute a command on the FTP server

FTP_CONNECT Open a connection (and log in) to an FTP server

FTP_DISCONNECT Close the connection (and log off) the FTP server

Regards,

Venkat

Dear ABAPers,

I want to Upload the data from Given FTP Server into SAP.could you please send me the Sample code.

Regards,

Ashok.

2 REPLIES 2
Read only

Former Member
0 Likes
431

Hi Ashok,

Please try FTP FM's

FTP_COMMAND Execute a command on the FTP server

FTP_CONNECT Open a connection (and log in) to an FTP server

FTP_DISCONNECT Close the connection (and log off) the FTP server

Regards,

Venkat

Read only

Former Member
0 Likes
430

Use the following FM's ...

CALL FUNCTION 'FTP_CONNECT'

CALL FUNCTION 'FTP_COMMAND'

CALL FUNCTION 'FTP_DISCONNECT'

CALL FUNCTION 'FTP_CONNECT'

EXPORTING

user = user

password = password

host = host

rfc_destination = rfc_destination

IMPORTING

handle = wa_handle

EXCEPTIONS

not_connected = 1

OTHERS = 2.

CALL FUNCTION 'FTP_COMMAND'

EXPORTING

handle = wa_handle

command = 'ASCII'

TABLES

data = result_itab

EXCEPTIONS

tcpip_error = 1

command_error = 2

data_error = 3

OTHERS = 4.

CALL FUNCTION 'FTP_DISCONNECT'

EXPORTING

handle = wa_handle

EXCEPTIONS

OTHERS = 1.