cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Background Job output to FTP

Former Member
0 Kudos

Hi,

We are running SAP R/3 4.6c on HP-UX.

We need to schedule some long running processes in the background. We need the out put of that job in excel or csv or tab delimited. Once the output is getting generated we need that on our FTP site in different folders.

I dont have a problem with the output generation in csv format. Is it possible to move the output automatically to the FTP site. If yes, How?.

Regards,

Kasi

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

may be I didnt eloborate on the fact that we moved from the idea of "FTP Transfer".

We have a Program scheduled in the background.

Output of the background job is to be sent as an Email attachment to the user's outlook mailbox.

With the configuration I did in SCOT, I am getting the output in .htm or .txt. With the settings via scot->settings->conversion rules((4.6c) , I tried all possible scenarios

Now I want the output directly converted into .xls or .csv format, directly delivered to the mailbox of the user.

Former Member
0 Kudos

I think the solution to this is pretty straightforward, or maybe I dont understand the problem completely.

Here is what I think you should do. For now, I am assuming you have succeeded in getting the file to generate a .csv or .xls file on the OS side and the file is being generated in the filesystem /usr/sap/SID

1. Write a script on the OS that will FTP the file from the source to the destination. Get help from a HP-UX sysadmin if needed. I think ftp -ni destination is the command for this.

2. Define 2 jobs. The 1st one will be the one that generates the .csv file and the 2nd one will be the one that executes the FTP script. For this, you might need to define the script as an "External Command" (SM69) and SM37 --> Job Name --> Step --> External Comand

3. Include the 1st job name as the Predecessor in the 2nd job definition so that the script executes only after the 1st job finishes. (Test this out if it works)

If you are not able to get the .csv generated, then the program might need some tweaking.

Hope this helps

Kunal

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

check this [http://www.saptechies.com/output-of-background-job-download-to-pc-automatically/]

Former Member
0 Kudos

Hi Kasi

To send any file via ftp, what we need to keep in mind here is the source and destination location of the file. First we may have to decide that what should be location of this .csv file generated on our local server i.e. the source location of the file.....

from here we have to send this file to another server via ftp, so there we need to define the destination locaion or we can say a directory...

normally, how ftp is used:

first we should be at the source locaion where the output file resides

from here we have to connect to destination ftp server via ftp command

obviously, it asks for user/password

then after connection to destination server, we need to navigate to destination location via

CD <destination path> command

there we have to place the source .csv file using mput command

I have not scheduled file transfer jobs before, but yeah, to manage/edit/delete the files at OS level, i have scheduled jobs which do connect to the server via ftp and then after do the manipulation of files there at destination location. But it doesn't need any source location, as first of all the jobs does the ftp login to target server directly at target location, means no file transfer.

May be you can consider above procedure as a hint for your job

Bhudev