‎2011 Mar 30 6:19 AM
Hi Gurus,
I am using an fm to find whether the back ground job running is completed or not.
CALL FUNCTION 'BDC_RUNNING' "Provide batch input runtime information
IMPORTING
bi_info = g_bdcrun Transfer structure BI
ctu_info = g_ctu_params Call Transaction Using Values
EXCEPTIONS
BI_INVALID_DATA = 1 " Transfer structure missing or incorrect
BI_NOTAKTIV = 2 . " Batch input is not active
This fm is called after the submit program RM06IBIO to create info records and i have called another standard program to process the session using the session name.
Now i need to query whether the back ground job is completed or not.
While using the fm BDC_RUNNING, i got the sy-subrc value as 0, but the structures g_bdcrun and g_ctu_params
are empty.
Is there any alternative to do this? Please help
‎2011 Mar 30 8:26 AM
Try the fm BDC_OBJECT_SELECT which returns the table APQITAB, which contains a field QSTATE, with the following values. If QSTATE = F which means that session is completed
if QSTATE = E, which means the session is ended in error .
Otherwise (QSTATE equal to R still processing).
This fm is called after the job close fm
CALL FUNCTION 'BDC_OBJECT_SELECT'
EXPORTING
name = lv_name
datatype = 'BDC'
client = sy-mandt
date_from = sy-datum
TABLES
apqitab = lt_apqi.
‎2011 Mar 30 8:26 AM
Try the fm BDC_OBJECT_SELECT which returns the table APQITAB, which contains a field QSTATE, with the following values. If QSTATE = F which means that session is completed
if QSTATE = E, which means the session is ended in error .
Otherwise (QSTATE equal to R still processing).
This fm is called after the job close fm
CALL FUNCTION 'BDC_OBJECT_SELECT'
EXPORTING
name = lv_name
datatype = 'BDC'
client = sy-mandt
date_from = sy-datum
TABLES
apqitab = lt_apqi.