SAP BDC_OPEN_GROUP Function Module for Open batch input session for adding transactions









BDC_OPEN_GROUP is a standard bdc open group SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Open batch input session for adding transactions processing and below is the pattern details for this FM, 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 open group FM, simply by entering the name BDC_OPEN_GROUP into the relevant SAP transaction such as SE37 or SE38.

Function Group: SBDC
Program Name: SAPLSBDC
Main Program: SAPLSBDC
Appliation area: S
Release date: 02-Mar-2005
Mode(Normal, Remote etc): Normal Function Module
Update:



Function BDC_OPEN_GROUP 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_OPEN_GROUP'"Open batch input session for adding transactions
EXPORTING
* CLIENT = SY-MANDT "Client
* DATFM = '%' "Date Format Used
* DEST = FILLER8 "Target system for ODC/no longer relevant
* GROUP = FILLER12 "Session Name
* HOLDDATE = FILLER8 "Session locked until specified date
* KEEP = FILLER1 "Indicator to keep processed sessions
* USER = FILLER12 "Batch input user
* RECORD = FILLER1 "Indicator: BI recording ('X' or ' ')
* PROG = SY-CPROG "Creator Program
* DCPFM = '%' "Decimal Character Used

IMPORTING
QID = "Unique database key

EXCEPTIONS
CLIENT_INVALID = 1 USER_INVALID = 10 DESTINATION_INVALID = 2 GROUP_INVALID = 3 GROUP_IS_LOCKED = 4 HOLDDATE_INVALID = 5 INTERNAL_ERROR = 6 QUEUE_ERROR = 7 RUNNING = 8 SYSTEM_LOCK_ERROR = 9
.



IMPORTING Parameters details for BDC_OPEN_GROUP

CLIENT - Client

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

DATFM - Date Format Used

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

DEST - Target system for ODC/no longer relevant

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

GROUP - Session Name

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

HOLDDATE - Session locked until specified date

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

KEEP - Indicator to keep processed sessions

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

USER - Batch input user

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

RECORD - Indicator: BI recording ('X' or ' ')

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

PROG - Creator Program

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

DCPFM - Decimal Character Used

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

EXPORTING Parameters details for BDC_OPEN_GROUP

QID - Unique database key

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

EXCEPTIONS details

CLIENT_INVALID - Client is invalid

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

USER_INVALID - BI user is not valid

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

DESTINATION_INVALID - Target system is invalid/no longer relevant

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

GROUP_INVALID - Batch input session name is invalid

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

GROUP_IS_LOCKED - Batch input session is protected elsewhere

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

HOLDDATE_INVALID - Lock date is invalid

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

INTERNAL_ERROR - Internal error of batch input (see SYSLOG)

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

QUEUE_ERROR - Error reading/writing the queue (see SYSLOG)

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

RUNNING - Session is already being processed

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

SYSTEM_LOCK_ERROR - System error when protecting BI session

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

Copy and paste ABAP code example for BDC_OPEN_GROUP 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_qid  TYPE APQI-QID, "   
lv_client  TYPE APQI-MANDANT, "   SY-MANDT
lv_client_invalid  TYPE APQI, "   
lv_datfm  TYPE USDEFAULTS-DATFM, "   '%'
lv_user_invalid  TYPE USDEFAULTS, "   
lv_dest  TYPE APQI-DESTSYS, "   FILLER8
lv_destination_invalid  TYPE APQI, "   
lv_group  TYPE APQI-GROUPID, "   FILLER12
lv_group_invalid  TYPE APQI, "   
lv_holddate  TYPE APQI-STARTDATE, "   FILLER8
lv_group_is_locked  TYPE APQI, "   
lv_keep  TYPE APQI-QERASE, "   FILLER1
lv_holddate_invalid  TYPE APQI, "   
lv_user  TYPE APQI-USERID, "   FILLER12
lv_internal_error  TYPE APQI, "   
lv_record  TYPE APQI-PUTACTIVE, "   FILLER1
lv_queue_error  TYPE APQI, "   
lv_prog  TYPE APQI-PROGID, "   SY-CPROG
lv_running  TYPE APQI, "   
lv_dcpfm  TYPE USDEFAULTS-DCPFM, "   '%'
lv_system_lock_error  TYPE USDEFAULTS. "   

  CALL FUNCTION 'BDC_OPEN_GROUP'  "Open batch input session for adding transactions
    EXPORTING
         CLIENT = lv_client
         DATFM = lv_datfm
         DEST = lv_dest
         GROUP = lv_group
         HOLDDATE = lv_holddate
         KEEP = lv_keep
         USER = lv_user
         RECORD = lv_record
         PROG = lv_prog
         DCPFM = lv_dcpfm
    IMPORTING
         QID = lv_qid
    EXCEPTIONS
        CLIENT_INVALID = 1
        USER_INVALID = 10
        DESTINATION_INVALID = 2
        GROUP_INVALID = 3
        GROUP_IS_LOCKED = 4
        HOLDDATE_INVALID = 5
        INTERNAL_ERROR = 6
        QUEUE_ERROR = 7
        RUNNING = 8
        SYSTEM_LOCK_ERROR = 9
. " BDC_OPEN_GROUP




ABAP code using 7.40 inline data declarations to call FM BDC_OPEN_GROUP

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 QID FROM APQI INTO @DATA(ld_qid).
 
"SELECT single MANDANT FROM APQI INTO @DATA(ld_client).
DATA(ld_client) = SY-MANDT.
 
 
"SELECT single DATFM FROM USDEFAULTS INTO @DATA(ld_datfm).
DATA(ld_datfm) = '%'.
 
 
"SELECT single DESTSYS FROM APQI INTO @DATA(ld_dest).
DATA(ld_dest) = FILLER8.
 
 
"SELECT single GROUPID FROM APQI INTO @DATA(ld_group).
DATA(ld_group) = FILLER12.
 
 
"SELECT single STARTDATE FROM APQI INTO @DATA(ld_holddate).
DATA(ld_holddate) = FILLER8.
 
 
"SELECT single QERASE FROM APQI INTO @DATA(ld_keep).
DATA(ld_keep) = FILLER1.
 
 
"SELECT single USERID FROM APQI INTO @DATA(ld_user).
DATA(ld_user) = FILLER12.
 
 
"SELECT single PUTACTIVE FROM APQI INTO @DATA(ld_record).
DATA(ld_record) = FILLER1.
 
 
"SELECT single PROGID FROM APQI INTO @DATA(ld_prog).
DATA(ld_prog) = SY-CPROG.
 
 
"SELECT single DCPFM FROM USDEFAULTS INTO @DATA(ld_dcpfm).
DATA(ld_dcpfm) = '%'.
 
 


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!