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

Problem with Background job

Former Member
0 Likes
430

Hi,

I have a problem with background job. I have to search if another background job is running for the same program then I should display an error message.

The problem is that when i do a query on table TBTCO it gives me the current background job status using select single with status 'R" and everytime displays the message since this job is being executed.

Can any one help me in this?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
408

Hi,

Don't do select single. Select all entries corresponding to that program with status R in an internal table and then use describe statement to know how many records it has fetched.

If its more than one, it means another job is also running.

regards,

pankaj

3 REPLIES 3
Read only

Former Member
0 Likes
408

Hi,

Have you checked table TBTCP ?

Regards

Read only

Former Member
0 Likes
409

Hi,

Don't do select single. Select all entries corresponding to that program with status R in an internal table and then use describe statement to know how many records it has fetched.

If its more than one, it means another job is also running.

regards,

pankaj

Read only

0 Likes
408

Thanks a lot Pankaj. This did not striked my mind.

Thanks,

Amit