‎2008 Jul 25 11:07 AM
Hi Experts,
Is there any way to set a background job to be executed recursively? That means once the job is finished, regardless of possible dump, it will start again. Thanks in advance!
‎2008 Jul 25 1:32 PM
You can use the function module K_BATCH_REQUEST. or
SUBMIT the Progam via JOB NAME and JOB Number.
I mean to say that submit the same program in background within itself.
Just put a sy-subrc check before the submit.
I think it will serve your purpose.
Check if its helpful.
‎2008 Jul 28 7:54 AM
hi abhisek nag,
Thanks a lot for your suggestion. For FM K_BATCH_REQUEST I cannot find in my system. For the anthor solution, I don't think it can meet my requirement because when there is an uncatchable dump in the front part of the report, the next round would never happen again. My idea is to create a background job at the very beginning which would be triggered on condition that the current job is finished, regardless of failure or success. However, since what i'm doing is very critical and any risk is unwanted. This solution is just a work-round, i'd like to know if there is any solution within the framework of background job itself?
‎2008 Jul 28 7:59 AM
Hi Roger,
Programmatically you can achieve this by creating a zprogram1 & submiting your Z program inside the new ZPROGRAM1.
Use FM, JOB_OPEN, JOB_SUBMIT, JOB_CLOSE.
Use FM "BP_JOB_STATUS_GET" to get the status. If the status is successfully again call the close the job & again call the JOB_OPEN FM. THis would be inside a do...enddo loop.
Best regards,
Prashant