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

BDC_RUNNING - Batch input run time information

Former Member
0 Likes
966

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
645

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.

1 REPLY 1
Read only

Former Member
0 Likes
646

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.