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: 

Scheduling question

Former Member
0 Kudos

Hi Guys,

We have two programs, one ABAP program called a UNIX script and get a text file from receiver server, and place it to our server in some directory.

Other program run and take that file as input and do some calculation and send back this file using the UNIX script back to the receiving server in different directory.

I Schedule this programs in one-steps, under one job.

My question is that if first program couldn’t be able to find input file from receiving server it should stop and does not process the second program in Scheduling.

How I can achieve this task guys, I know there is Command called "STOP”, will it work in my scenario.

Please share your input/suggestions.

Thanks

Bye

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

Yeah STOP will Work.

It won't go for Second Process.

Regards.

vijay

9 REPLIES 9

former_member188685
Active Contributor
0 Kudos

Yeah STOP will Work.

It won't go for Second Process.

Regards.

vijay

Former Member
0 Kudos

As these 2 are independent programs, i will suggest you to add a check in second program. If the file is opened successfully then only process further else stop processing in second program.

govind_seenivasan
Participant
0 Kudos

Hi ,

Instead of scheduling two programs why don't you call the second program from the first program, if the first program gets some data.

Thanks

Govind.

Former Member
0 Kudos

Hi,

In the first program keep a memory varaible and pass 'X' if the file is not there and export that value to memory.

In the Second program import the value from the memory and if the value is 'X' than exit from the Program.

Hope this helps you out.

Let me know if this helps and reward me .

Regards,

Naidu.

Former Member
0 Kudos

Is the process like this:

Program A submits program B then program C.

Program B processes a file but may not be successful.

Program C processes a file if B is successful?

If so, program B can export to memory some value "success" or "fail".

Program A imports the value. If it is "success" it submits program C; otherwise, it doesn't.

Rob

0 Kudos

If you don't mind the job going to error status, then just issue an error message in the first job when the file is not found.

Srinivas

0 Kudos

We are using some utility, which release the jobs and off coarse I have logic in program it shows the error log. However, SAP Scheduling is using by software called ControL+M, Which only release the jobs.

Any way I should program "STOP" in my program if that couldn’t able to find the file. It will stops and fail both jobs.

Thanks

Bye

0 Kudos

I am not talking about the error log, I am suggesting issuing an error message in your first program like below

if <filenotfound>.

message e000 with 'File Not Found'.

endif.

This will <b>cancel</b> the job and thus the second step will not be executed. The error message will go into the job log.

Srinivas

Former Member
0 Kudos

Hi,

You might also want to have a look at the new Job Scheduling capabilities of SAP NetWeaver. You can find more information about this on SAP Service Marketplace under quick-link job-scheduling (http://service.sap.com/job-scheduling)

Kind regards,

Edwin Esser