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

Background job completion

Former Member
0 Likes
1,938

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.

3 REPLIES 3
Read only

Kartik2
Contributor
0 Likes
1,588

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

Read only

Former Member
0 Likes
1,588

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

Read only

Clemenss
Active Contributor
0 Likes
1,588

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