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

How to check whether a batch input session is completed in ABAP program

former_member220801
Participant
0 Likes
3,727

I have created a ABAP program to create a batch input session (reference to RSBDCSUB). After the creation of the batch input session, I kick it to start and read the execution log. However, sometimes I cannot read anything from the execution log as the execution of the batch input is a synchronized process to the execution of my program, i.e. at the time being that I try to read the log of a particular transaction, that transaction is being processing / haven't start processing.

How can I check whether a batch input session is completed in the program?

The code that corresponding to the triggering of batch input session:

SUBMIT (SUBREPORT)

USER MTAB-USERID

VIA JOB MTAB-GROUPID

NUMBER JNUMB

WITH QUEUE_ID EQ MTAB-QID

WITH MAPPE EQ MTAB-GROUPID

WITH MODUS EQ 'N'

WITH LOGALL EQ LMODUS

Or is there any method to wait here until the process is completed before further processing?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,870

Hi,

you can try reading the Job status and then read the Log.

using the FM BP_JOB_STATUS_GET read the status and if job is complete then only read the log.

Regards

Vijay

3 REPLIES 3
Read only

Former Member
0 Likes
1,871

Hi,

you can try reading the Job status and then read the Log.

using the FM BP_JOB_STATUS_GET read the status and if job is complete then only read the log.

Regards

Vijay

Read only

Former Member
0 Likes
1,870

Hi

You should read the table APQI, here you can find the status of your session.

See the standard program RSBDC_ANALYSE for more details.

Max

Read only

Former Member
0 Likes
1,870

Hi gundam,

1. Or is there any method to wait here until the process is completed before further processing?

There is no such direct method to wait.

2. Immediately after submitting in background,

we cannot wait

neither can we LOOP and go on detecting

whether the b/g process has completed or not !

3. To over come such problems,

we have to use another technique.

4. we have to submit another

job which will get triggered

on event SAP_END_OF_JOB

ie. when the original job will finish,

our new job will AUTOMATICALLY get triggered,

5. This new job / program

will do the FURTHER actions !

regards,

amit m.