2006 Mar 27 8:53 AM
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?
2006 Mar 27 8:59 AM
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
2006 Mar 27 8:59 AM
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
2006 Mar 27 9:04 AM
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
2006 Mar 27 9:24 AM
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.