on 03-25-2011 8:33 AM
Hello All,
Is it possible to execute OS level commands on FTP adapter to execute Unix script?
If No,please let me know the reason
Thanks
Regards,
Moorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I guess u r looking for this:
http://wiki.sdn.sap.com/wiki/display/XI/SAPXIFileAdapterOSCommandLine+Feature
Thanks
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, is possible.
In FCC there are 2possible options, before processing and after processing.
Write your shell execution command (like sh /xxx/pippo.sh). You can pass also some parameters to the script.
In case of parameters, Script, can be like this (in unix):
#!/usr/bin/ksh
if [ "$#" = "0" ]; then
echo "You don't have any arguments! "; exit
fi
echo $#
>
> Hi Dasika,
>
> As i told you before also,It works on FTP. Make sure that your Shell script is available in FTP machine.
>
> @sunil - Please provide details how it is not possible.
>
> Regards
> Aashish Sinha
Please refer to sap note 841704.
Note that for the File Adapter transport protocol "FTP", the operating system command is NOT executed on the FTP server, but on the server hosting the Adapter Engine.
Regards,
Sunil Chandra
Hello Sunil Chandra,
Thanks for the note. I have gone through that and according to the note OS commands does not work on FTP adapter.
In that case, Can I go for Unix shell script on FTP adapter as suggested in the blog:http://wiki.sdn.sap.com/wiki/display/XI/SAPXIFileAdapterOSCommandLine+Feature
Thanks,
Regards,
Moorthy
>
> Hello Sunil Chandra,
>
> Thanks for the note. I have gone through that and according to the note OS commands does not work on FTP adapter.
> In that case, Can I go for Unix shell script on FTP adapter as suggested in the blog:http://wiki.sdn.sap.com/wiki/display/XI/SAPXIFileAdapterOSCommandLine+Feature
>
> Thanks,
>
> Regards,
> Moorthy
Just to correct you, the note simply says the OS command is NOT executed on the FTP server. Many a times we use term FTP adapter for File adapter. Actually there is nothing exactly like FTP adapter, its file adapter with FTP protocol
Using OS command with NFS protocol, you can run script located at XI filesystem to handle files available at XI filesystem directly. Although you have option to use OS command for FTP protocol to run a script located at XI filesystem but it doesn't give you direct control over files available at FTP server. You first need to use ftp command in your script to create explicit connection to FTP server and then you write your logic to process the file.
So in both the cases, the script(.bat for windows or .sh for unix) should be available at XI filesystem then only it can be called by the OS command.
Regards,
Sunil Chandra
Hello Sunil Chandra,
Thanks a lot for long explanation:)
Still I am finding that OS commands works on FTP adapter in PI 7.1
As per SAP documentation - You can define operating system commands that are to be executed by the file/FTP adapter before and after message processing.The adapter writes the output (STDOUT and STDERR) for the operating system command in the system trace.Message processing is independent of any errors that occur during the execution of a configured operating system command.
Please refer this link: http://help.sap.com/saphelp_nwpi71/helpdata/EN/44/556cb799c93677e10000000a114a6b/frameset.htm
Can you please clear me on this..
Thanks,
Regards,
Moorthy
[help.sap|http://help.sap.com/saphelp_nwpi71/helpdata/EN/44/556cb799c93677e10000000a114a6b/frameset.htm] says:
You can define operating system commands that are to be executed by the file/FTP adapter before and after message processing
[sapnote 841704 |https://service.sap.com/sap/support/notes/841704]says:
For the File Adapter transport protocol "FTP", the OS command is NOT executed on the FTP server, but on the server hosting the Adapter Engine.
I guess you are clear with the difference between File/FTP adapter and FTP server. Both the above statments about File/FTP adapter are true.
The first one is generic about File/FTP adapter that include both NFS and FTP protocol.
The second one is more specific to FTP protocol and talks about limitation of using OS command/script with FTP server. So the workaround is to create explicit connection with script when you work with FTP server as I explained earlier.
I hope it is clear now.
Regards,
Sunil Chandra
Hi Dasika & Sunil,
I hope you guys understand unix system, so i hope you are aware of what is the difference between Command and a Shell script.
Dasika, As sunil provided the note for the same that command doen't work in File/FTP Adapter, i din't checked this but i will come back on this. As per my understanding and working on numerous scenarios of this kind, i can say that FTP Adapter is capable of running Operating system shell scripts on condition that shell script is there in the FTP location. I am using this since SAP BC, SAP XI 3.0 till 7.1. So i am quite sure about it.
Write one shell script and give that shell script there in Run OS Command After/Before Processing. It will work. For NFS, you can give commands directly as well as Shell script.
Regards
Aashish Sinha
Hi,
I think Ashish is correct.
We can execute the OS commands in FTP adapter provided the OS scripts are available in FTP server using a workaround. The same is explained in the link below with screenshots:
http://wiki.sdn.sap.com/wiki/display/XI/SAPXIFileAdapterOSCommandLine+Feature
I hope this will clear the confusion around this topic.
HI,
Yes it is possible to execute OS Command of File/FTP adapter.. same manner you use for normal File adapter.
Regards
Aashish Sinha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.