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

Command SXPG_COMMAND_EXECUTE to FTP

Former Member
0 Likes
1,494

Hi All.

I am using SXPG_COMMAND_EXECUTE to execute a script to transfer files from R/3 App Server to FTP Server.

I have maintained the settings in SM69 as follows :

External name : z123.

Command :
<network path>\ftp_script.bat

Additional param : blank.

Additional param checkbox ticked.

Now I call the SXPG_COMMAND_EXECUTE passing in command as Z123, and in the parameters I pass in the parameters as are required by the script. (Dir and file name).

I get an unknown error. Don't know where I am going wrong.

Can guide anyone please? I have searched the forums already. But could not find a solution :(.

I think the problem is in the path of the script file. It is in a network path like this:
<some path>\

But to access that network, user id is different from the PC logon id. Can that be an issue? If yes, where do I specify the logon id for the network path?

Thanks in adv.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
935

Instead of

Command :
<network path>\ftp_script.bat

Additional param : blank.

Try

Command : sh or cmd

Additional param :
<network path>\ftp_script.bat

4 REPLIES 4
Read only

Former Member
0 Likes
936

Instead of

Command :
<network path>\ftp_script.bat

Additional param : blank.

Try

Command : sh or cmd

Additional param :
<network path>\ftp_script.bat

Read only

former_member181966
Active Contributor
0 Likes
935

Did you test the command from <b>Tr.SM49</b> . Is it working fine ? Do one more thing try to execute the same command at your OS leve ( E,g UnIX ) . Fire the same command and see its executing it or not ..

As a note you should have W,R,X permission at OS level ...

Hope this`ll give you an idea ..

pl..award the points if helpfull ..

Thanks

Saquib Khan

Read only

0 Likes
935

Sorry. Still not able to get it to work.

It does not run from SM49 even. Infact none of the commands (Even SAP ones)work from SM49. Our OS is Windows NT. Even a simple command like DIR/W does not work from SM49.

Don't know what is going wrong.

Btw, I was not talking about connecting to FTP script when I said that user id is different.

What i meant was that the server ON WHICH the SCRIPT file is kept has a different logon id.

Any help please?

Read only

Former Member
0 Likes
935

Samant

The login id for connecting to the ftp server should be in your .bat file.

First try connecting to the ftp server using the login that you have (for ftp) from the ftp command prompt.

Once this works test whether your batch file works from DOS prompt.

Whatever you have put in SAP as command seems fine.

Let me know whether this solves your problem.