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: 

Problem in using FTP_COMMAND

Former Member
0 Kudos
1,934

hi all,

in one of our programs we are using FTP_COMMAND to transfer to some other system. if it runs for some long time.. we are getting TCPIP_ERROR exception. we thought of giving some delay and call the FM AGAIN if such error occurs if that is the case ideally how much should be the wait time.. pls advice.

Thanks,

Shiva.

6 REPLIES 6

Former Member
0 Kudos
1,163

can u paste your code?

Its a normal connection to the FTP server there is no need of a time delay.

Whts your vaule of handle?

0 Kudos
1,163

CALL FUNCTION 'FTP_COMMAND'

EXPORTING HANDLE = HDL COMMAND = CMD1

TABLES DATA = RESULT

EXCEPTIONS TCPIP_ERROR = 1 COMMAND_ERROR = 2.

Former Member
0 Kudos
1,163

Hello,

Refer this thread...

************Reward points,if found useful

Former Member
0 Kudos
1,163

1>Use report RSFTP002 and test your connection first.

2>also make sure you have your SAPFTP setup in sm39 tcp/ip connections.

Hope it helps

0 Kudos
1,163

Not every time FTP_COMMAND IS FAILING....

some times it is successfully executing... we are running the job in back ground.

some times it is failing after it ran for 11-12 hrs.. so i am thinking whether repeated calls to this FM is giving TCP_IP error. so i am thinking to give a delay if TCP_IP error occurs and again call the FM..

will it work?? if so how much delay i should give.??

0 Kudos
1,041

Please help.

This is my code.

 CALL FUNCTION FTP_COMMAND
        EXPORTING
          handle        w_hdl
          command       p_lv_cmd
        TABLES
          data          it_result
        EXCEPTIONS
          tcpip_error   1
          command_error 2
          data_error    3
          OTHERS        4.

What i have to pass in parameter   command       p_lv_cmd as i am receiving XML file here