11-17-2005 8:40 PM
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 couldnt 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
11-17-2005 8:44 PM
11-17-2005 8:44 PM
11-17-2005 8:44 PM
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.
11-17-2005 8:46 PM
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.
11-17-2005 8:53 PM
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.
11-17-2005 9:12 PM
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
11-17-2005 9:19 PM
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
11-17-2005 10:10 PM
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 couldnt able to find the file. It will stops and fail both jobs.
Thanks
Bye
11-17-2005 10:16 PM
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
12-05-2005 9:56 AM
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