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

Function Module 'FTP_R3_TO_SERVER' Not Working

Former Member
0 Likes
580

Hi Gurus,

I have a requirement to get data from a FILE server .

I am using 2 function modules

1) CALL FUNCTION 'FTP_COMMAND'

2) CALL FUNCTION 'FTP_SERVER_TO_R3'.

The first function 'FTP_COMMAND' is working fine and connection isestablished .

How to view the data in internal Table in Program or in SAP system using CALL FUNCTION 'FTP_SERVER_TO_R3'.

Syntax:-

CALL FUNCTION 'FTP_COMMAND'

EXPORTING

handle = g_hdl

command = g_temp2

compress = 'N'

TABLES

data = gi_result

EXCEPTIONS

command_error = 1

tcpip_error = 2.

IF sy-subrc EQ 0.

CALL FUNCTION 'FTP_SERVER_TO_R3'

EXPORTING

handle = g_hdl

fname = '/usr/sap/tmp/avi.txt'

character_mode = 'X'

TABLES

text = gi_text

EXCEPTIONS

tcpip_error = 1

command_error = 2

data_error = 3

OTHERS = 4.

IF sy-subrc <> 0.

ENDIF.

Avi.

Edited by: Avi on Sep 23, 2010 3:02 PM

Edited by: Avi on Sep 23, 2010 3:03 PM

1 REPLY 1
Read only

former_member188827
Active Contributor
0 Likes
354

check program RSFTP007 to see the use of 'FTP_SERVER_TO_R3'