Application Development 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: 

How to send files to the server other than SAP using Unix Script

Former Member
0 Kudos

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

8 REPLIES 8

Former Member
0 Kudos

Pls try by FTP ing the files.

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Is this to be done in the background, or online?

Regard,

RIch Heilman

Former Member
0 Kudos

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

0 Kudos

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

0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

Also I see that you are not closing any of your threads. Could you please take time to close them out?

Thank you,

Srinivas