cancel
Showing results for 
Search instead for 
Did you mean: 

Runtime OS command before Message processing

Former Member
0 Kudos

Hi all,

I have a scenario where the input file from a particular FTP server has to be moved to XI server and then process the message from there. For this I am trying to use "Runtime OS command before Message processing" My problem is that how do I define it in the normal adapter configuration i.e. File access parameters for the sender.

My Query is:

Now should I use the NFS protocol or the FTP protocol ie.in the File access parameters should I specify the directory from which the file needs to be processed after movement to the XI server or should I specify the FTP server details choosing the FTP protocols.

Also provide me some links on how to configure using OS commands.

Thanks & Regards,

Nithiyanandam

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

U can use NFS ...also for RUN Operating sysyrm command

Try using RUN OPERATING SYSTEM COMMAND AFTER MESSAGE PROCESING and RUN OPERATING SYSTEM COMMAND BEFORE MESSAGE PROCESING.

You just post ur output file in some folder(Target) , lets say /usr/sap/sapout/test/.and the shell script in this path /usr/sap/bin/convert.sh (use ur Rename logic here).

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.

For the shell script (which u will use to rename the file after processing) you can put anywhere inside /INTERFACE/XI/ but athe time you provide the pat it will be exactly matching as from where you are using the Shell Script and the file at the coressponding places. It shud be in XI. Thats it and u r done.

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

I hope this will solve your problem

thanq

krishna

Edited by: krishnachitanya siddavattam on Mar 10, 2008 5:38 AM

Former Member
0 Kudos

Hi Krishna,

Thanks for Immd reply. But I hope you are not clear with wat my query was: I know I can use "RUN OPERATING SYSTEM COMMAND AFTER MESSAGE PROCESING and RUN OPERATING SYSTEM COMMAND BEFORE MESSAGE PROCESING." but for my case i wanted to use "RUN OPERATING SYSTEM COMMAND BEFORE MESSAGE PROCESING" my query was to How do i specify the details in the file access parameters, should i specify the details regarding my source directory from where the file needs to be processed from initially or shd I specify the details of the directory from the where the file was moved by using the OS commands before processing.

As i think only i execute my scenario the file adapter will execute the RUN OPERATING SYSTEM COMMAND BEFORE MESSAGE PROCESING and it will move the file to the directory in XI server from where I need to start processing of messages till then I dont think the message will be processed.

regards,

Nithiyanandam

Answers (2)

Answers (2)

Former Member
0 Kudos

Hey

Since the the OS commands are executed on XI server(not on FTP server) so you need to give the path of script on your XI server,now suppose you are using NFS then your script can simple do whatever is required(for e.g copying file as a backup etc) but in case you are using FTP them your script needs to either call another script on the FTP server which in turn will do the required functionality for u(for e.g copying the file as a backup etc) of your script on XI server needs to establish a connection with the FTP server directly and do the required task.

Its always easier and more efficient to use NFS if you want to execute OS command before or after message processing

Thanx

Aamir

Former Member
0 Kudos

Hi,

NFS -- if the input file is exist in the XI server itself

FTP- iNPUT File is exist outside the XI SERVER

http://help.sap.com/saphelp_nw04/helpdata/en/0b/64d88cb81540258b016fb46746f38e/frameset.htm

Regards