Application Development and Automation 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: 
Read only

Query on batchjob

Former Member
0 Likes
650

Hi,

I have a report which extract the data from certain tables create the file in AL11. From there a UNIX job having unix script PUSH the file to other third party system. As the report in SAP execute through batch job and when the report wont executes then file wont be created. But as per the scheduling and business requirements UNIX job has to run daily. Issue here is if the file is not there then UNIX job look for it and fails, I want in SAP itself if the Job runs and file created then it will all the UNIX script.

Is it possible if yes then how?

vishal

Moderator message: please use more descriptive subject lines from now on.

Edited by: Thomas Zloch on May 18, 2010 4:38 PM

Hi,

I have a report which extract the data from certain tables create the file in AL11. From there a UNIX job having unix script PUSH the file to other third party system. As the report in SAP execute through batch job and when the report wont executes then file wont be created. But as per the scheduling and business requirements UNIX job has to run daily. Issue here is if the file is not there then UNIX job look for it and fails, I want in SAP itself if the Job runs and file created then it will all the UNIX script.

Is it possible if yes then how?

vishal

Moderator message: please use more descriptive subject lines from now on.

Edited by: Thomas Zloch on May 18, 2010 4:38 PM

4 REPLIES 4
Read only

former_member226519
Active Contributor
0 Likes
623

you could create an external UNIX command (SM69) and use it with fm SXPG_COMMAND_EXECUTE

Read only

0 Likes
623

@ Binder: I didnt got this can you please explain the same in detail.

@kevin: in the SAP pgm how i can call the UNIX script.

vishal

Read only

0 Likes
623

you can create a SAP command and assign an OS command (e.g. UNIX) with parameters. This is done with transaction SM69.

From you report you can execute this command with th function module.

Read only

Former Member
0 Likes
623

You could run your program from a batch job and have a second step in the job call the UNIX program. That way the UNIX program would be called each time after your program creates the file.