SAP BDC_OBJECT_COUNT Function Module for









BDC_OBJECT_COUNT is a standard bdc object count SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for bdc object count FM, simply by entering the name BDC_OBJECT_COUNT into the relevant SAP transaction such as SE37 or SE38.

Function Group: SBDR
Program Name: SAPLSBDR
Main Program: SAPLSBDR
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function BDC_OBJECT_COUNT pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'BDC_OBJECT_COUNT'"
EXPORTING
NAME = "Group name: Batch input session name
* DATATYPE = '%BDC' "Queue data type
* CLIENT = SY-MANDT "Queue client
* DATE_FROM = "Queue creation date
* DATE_TO = "Queue creation date
* TIME_FROM = "Queue creation time
* TIME_TO = "Queue creation time
* QSTATE = '*' "Queue status
* SESSION_CREATOR = '*' "Queue user ID / for historical reasons

IMPORTING
COUNT = "DB operations, number of table lines processed

EXCEPTIONS
INVALID_DATATYPE = 1 SQL_ERROR = 2
.



IMPORTING Parameters details for BDC_OBJECT_COUNT

NAME - Group name: Batch input session name

Data type: APQI-GROUPID
Optional: No
Call by Reference: No ( called with pass by value option)

DATATYPE - Queue data type

Data type: APQI-DATATYP
Default: '%BDC'
Optional: Yes
Call by Reference: No ( called with pass by value option)

CLIENT - Queue client

Data type: APQI-MANDANT
Default: SY-MANDT
Optional: Yes
Call by Reference: No ( called with pass by value option)

DATE_FROM - Queue creation date

Data type: APQI-CREDATE
Optional: Yes
Call by Reference: No ( called with pass by value option)

DATE_TO - Queue creation date

Data type: APQI-CREDATE
Optional: Yes
Call by Reference: No ( called with pass by value option)

TIME_FROM - Queue creation time

Data type: APQI-CRETIME
Optional: Yes
Call by Reference: No ( called with pass by value option)

TIME_TO - Queue creation time

Data type: APQI-CRETIME
Optional: Yes
Call by Reference: No ( called with pass by value option)

QSTATE - Queue status

Data type: APQI-QSTATE
Default: '*'
Optional: Yes
Call by Reference: No ( called with pass by value option)

SESSION_CREATOR - Queue user ID / for historical reasons

Data type: APQI-CREATOR
Default: '*'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for BDC_OBJECT_COUNT

COUNT - DB operations, number of table lines processed

Data type: SY-DBCNT
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

INVALID_DATATYPE -

Data type:
Optional: No
Call by Reference: Yes

SQL_ERROR -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for BDC_OBJECT_COUNT Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_name  TYPE APQI-GROUPID, "   
lv_count  TYPE SY-DBCNT, "   
lv_invalid_datatype  TYPE SY, "   
lv_datatype  TYPE APQI-DATATYP, "   '%BDC'
lv_sql_error  TYPE APQI, "   
lv_client  TYPE APQI-MANDANT, "   SY-MANDT
lv_date_from  TYPE APQI-CREDATE, "   
lv_date_to  TYPE APQI-CREDATE, "   
lv_time_from  TYPE APQI-CRETIME, "   
lv_time_to  TYPE APQI-CRETIME, "   
lv_qstate  TYPE APQI-QSTATE, "   '*'
lv_session_creator  TYPE APQI-CREATOR. "   '*'

  CALL FUNCTION 'BDC_OBJECT_COUNT'  "
    EXPORTING
         NAME = lv_name
         DATATYPE = lv_datatype
         CLIENT = lv_client
         DATE_FROM = lv_date_from
         DATE_TO = lv_date_to
         TIME_FROM = lv_time_from
         TIME_TO = lv_time_to
         QSTATE = lv_qstate
         SESSION_CREATOR = lv_session_creator
    IMPORTING
         COUNT = lv_count
    EXCEPTIONS
        INVALID_DATATYPE = 1
        SQL_ERROR = 2
. " BDC_OBJECT_COUNT




ABAP code using 7.40 inline data declarations to call FM BDC_OBJECT_COUNT

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single GROUPID FROM APQI INTO @DATA(ld_name).
 
"SELECT single DBCNT FROM SY INTO @DATA(ld_count).
 
 
"SELECT single DATATYP FROM APQI INTO @DATA(ld_datatype).
DATA(ld_datatype) = '%BDC'.
 
 
"SELECT single MANDANT FROM APQI INTO @DATA(ld_client).
DATA(ld_client) = SY-MANDT.
 
"SELECT single CREDATE FROM APQI INTO @DATA(ld_date_from).
 
"SELECT single CREDATE FROM APQI INTO @DATA(ld_date_to).
 
"SELECT single CRETIME FROM APQI INTO @DATA(ld_time_from).
 
"SELECT single CRETIME FROM APQI INTO @DATA(ld_time_to).
 
"SELECT single QSTATE FROM APQI INTO @DATA(ld_qstate).
DATA(ld_qstate) = '*'.
 
"SELECT single CREATOR FROM APQI INTO @DATA(ld_session_creator).
DATA(ld_session_creator) = '*'.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!