cancel
Showing results for 
Search instead for 
Did you mean: 

Run command line from receiver

Former Member
0 Kudos

Hello,

I write script to transfer file from our local drive to sFTP server.

I try to run the script from Run Operating System Command After Message Processing in CC

The script not run.

When I try to run this script from our XI server from CMD the script running.

I add the script command line:

"C:\Program Files\WinSCP\WinSCP.exe" /console /script="C:\Program Files\WinSCP\fromnetafim.txt"&"C:\Program Files\WinSCP\script.bat"

I'll be happy to hear what I need to add to this line to run the script from communication channel.

Elad

Accepted Solutions (1)

Accepted Solutions (1)

aashish_sinha
Active Contributor
0 Kudos

Hi,

You just post ur output file in some folder , lets say /usr/sap/sapout/test/.and the shell script in this path /usr/sap/bin/convert.sh.

Inside the File access parameters put target directory and filename scehme and for shell script give processing parameters as File construction mode , File type and OS Command and use a space after the shell script name and the %F.

And for input can use it directly.

Check out these links. First one will help you in acheiving want you want.

/people/sameer.shadab/blog/2005/09/21/executing-unix-shell-script-using-operating-system-command-in-xi

/people/michal.krawczyk2/blog/2007/02/08/xipi-command-line-sample-functions

/people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching

http://help.sap.com/saphelp_nw70/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm

Also have a look on this thread.

?

regards

Aashish Sinha

PS : reward points if helpful

Former Member
0 Kudos

Hello Aashish

The files from XI receiver communication channel download to L:\Netafim\out

The files names is :XXX_POA_N.xml

And the command line is:

"C:\Program Files\WinSCP\WinSCP.exe" /console /script="C:\Program Files\WinSCP\fromnetafim.txt"&"C:\Program Files\WinSCP\script.bat"

What can I add to the command line?

Elad

aashish_sinha
Active Contributor
0 Kudos

Hi,

In using operating system command, try to configure your

File access parameter as

Target Directory L:\Netafim\out

File Name Sceme XXX_POA_N.xml

processing parameters as

File construction mode Add time stamp or whatevr you require

File Type Binary

operating system comand that is what command you wanna run. exact path on server. like C:\Program Files\WinSCP\script.bat %F

Check this blog.

Regards

Aashish Sinha

PS : reward points if helpful

Former Member
0 Kudos

Hello,

I tried to use with this line without successes.

For test I enter to "Run Operating System Command After Message Processing" this line

cmd.exe /C "C:\Program Files\WinSCP\WinSCP.exe %F"

I operate the scenario and the command line doesn’t work

Any idea?

Elad

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

There are few weblog which talks about ROC just look at them to get the more idea.

/people/michal.krawczyk2/blog/2007/02/08/xipi-command-line-sample-functions

/people/sameer.shadab/blog/2005/09/21/executing-unix-shell-script-using-operating-system-command-in-xi

/people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching

http://help.sap.com/saphelp_nw70/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm

Thnx

Chirag