2012 May 19 8:12 AM
hi, I schdule and release one of my background jobs through my custom program.Once this job completes, I need to do some databse operations in the custom tables. Could any one tell me how to find whether the background job has been completed or not in the program itself?.
Thanks,
Selva.
hi, I schdule and release one of my background jobs through my custom program.Once this job completes, I need to do some databse operations in the custom tables. Could any one tell me how to find whether the background job has been completed or not in the program itself?.
Thanks,
Selva.
2012 May 19 8:25 AM
Hi,
You can use cl_gui_timer class to check for the status of the job for some time. You may use the function module /BDL/_READ_JOB_STATUS to get the status of the job.
Keep reading the status of a job till your timer reaches certain value.
Thanks and regards,
kartik
2012 May 19 9:28 AM
You can use FM BP_JOB_STATUS_GET to the job status by giving the job name.
Either you can use a timer as said above or put the FM in a DO ENDDO loop and check for the status.
Make sure you put an exit from the loop, once the job status changes to completed or cancelled.
Also table TBTCO will have the status, if you want to do a select and get the data.
Check fields TBTCP-PROGNAME and TBTCP-STATUS
2012 May 19 8:30 PM
Hi,
why not just put the 'some databse operations in the custom tables' in the second step of the job?
Or do you also hate simple solutions?
Regards,
Clemens
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |