11-11-2005 4:08 PM
Hi All,
We have a requirement where SAP program creates some 5 files on the application server in one directory.
Out of these 5 files , 1 file is the success file which gives the indication that the other required 4 files have been created successfully.
Our requirement is to trigger a unix script through another program.This other program will look for the success file on the application server at the specified location and if it finds , it should trigger the unix script which will send the secure copy of these 4 files to the other server(not SAP).
If anybody has an idea on this , please pass this to me..
Would appreciate the great help.
Thanks
Alok
11-11-2005 4:11 PM
11-11-2005 4:11 PM
11-11-2005 4:15 PM
You don't need a program to do that. Create an 'External Operating System Command' using SM69. This command will execute your unix script. Once you have that in place, you can add that as the final step of your job with the 'External Command' option.
Srinivas
11-11-2005 5:21 PM
Srinivas,
How we can specify the port where I want to send the files.
I know how the files can be ftp'ed but here we have to send the files to the specified port using unix script.
Thanks
Alok
11-11-2005 5:31 PM
Hi Alok,
All the logic to copy the files, to look for the success file etc, should be in the script.
"<i>Our requirement is to trigger a unix script </i>"
I am basing my solution on this statement. Whatever needs to be done, I am assuming, will be done in this script.
11-11-2005 4:28 PM
Alok,
You can try using
OPEN DATASET dsn FOR OUTPUT FILTER 'compress'.
opens the file dsn and writes the data to the file in compressed form because of the UNIX command 'compress'
Thanks,
Bipin
11-11-2005 4:56 PM
Hi,
You should do it using the FM for FTP´ing the files, check the link bellow:
http://www.members.tripod.com/abap4/FTP_Using_SAP_Functions.html
Hope this helps!!!
Gabriel P.
11-11-2005 5:33 PM
Also I see that you are not closing any of your threads. Could you please take time to close them out?
Thank you,
Srinivas