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

Check batch job status from within ABAP program

Former Member
0 Likes
7,384

Hi!

My program creates and runs (by using RSBDCSUB) a batch input job. Before countinuing the program execution, I would like to <b>check the status of the batch job</b> to see if it has finished processing. Is there any way of doing this?

- Mari Virik

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,247

Hi!

I have the <b>session name</b> for the batch input i created, e.g. Z_MY_BATCH. Is this the same as the <b>JOBNAME</b> in BP_JOB_STATUS_GET? How do I obtain the <b>JOBCOUNT</b>?

- Mari

Hi!

My program creates and runs (by using RSBDCSUB) a batch input job. Before countinuing the program execution, I would like to <b>check the status of the batch job</b> to see if it has finished processing. Is there any way of doing this?

- Mari Virik

7 REPLIES 7
Read only

Former Member
0 Likes
2,247

Hi mari,

1. This FM can be useful

BP_JOB_STATUS_GET

regards,

amit m.

Read only

alex_m
Active Contributor
0 Likes
2,247

Hi,

BDL_READ_JOB_STATUS

give job name and job number u will get status

Job status

R - Running

Y - Ready

P - Scheduled

S - Released

A - Aborted

F - finished

Z - put_active

X - unknown state

Message was edited by:

Alexander

Read only

Former Member
0 Likes
2,248

Hi!

I have the <b>session name</b> for the batch input i created, e.g. Z_MY_BATCH. Is this the same as the <b>JOBNAME</b> in BP_JOB_STATUS_GET? How do I obtain the <b>JOBCOUNT</b>?

- Mari

Read only

0 Likes
2,247

Hi again,

1. We can query the table APQI.

(Input the session name in the field GROUPID)

2. and get the field QSTATE

regards,

amit m.

Read only

Former Member
0 Likes
2,247

Hi again,

Do you have the values and descriptions for the possible entries of APQI-QSTATE?

E.g.

E = ?

F = ?

...

- Mari

Read only

Former Member
0 Likes
2,247

Hi Mari,

I understand this thread was answered.

And I need you to help with the answer about you last reply on this question, i.e. The descriptions of possible entries for field APQI - QSTATE.

Thank you in advance.

Kind Regards;

Rebaone

Read only

0 Likes
2,247

Hi Mari,

I managed to get the answer.

The values in APQI-QSTATE mean the following;

space - To be processed

C - Creating

E - Incorrect

F - Processed

R - Processing

S - Batch

Thank you.

Rebaone