SAP Function Modules

BDC_RECORD_OPEN SAP Function module - Batch Input Recording: Open







BDC_RECORD_OPEN is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name BDC_RECORD_OPEN into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: SBDR
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM BDC_RECORD_OPEN - BDC RECORD OPEN





CALL FUNCTION 'BDC_RECORD_OPEN' "Batch Input Recording: Open
  EXPORTING
    queue_id =                  " apqd-qid      Unique database key
    name =                      " apqi-groupid  Name of Recording
* TABLES
*   transactions =              " bdcth
*   dynprotab =                 " bdcdata
  EXCEPTIONS
    NOT_FOUND = 1               "
    SYSTEM_FAILURE = 2          "               System Error
    .  "  BDC_RECORD_OPEN

ABAP code example for Function Module BDC_RECORD_OPEN





The ABAP code below is a full code listing to execute function module BDC_RECORD_OPEN including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
it_transactions  TYPE STANDARD TABLE OF BDCTH,"TABLES PARAM
wa_transactions  LIKE LINE OF it_transactions ,
it_dynprotab  TYPE STANDARD TABLE OF BDCDATA,"TABLES PARAM
wa_dynprotab  LIKE LINE OF it_dynprotab .


SELECT single QID
FROM APQD
INTO @DATA(ld_queue_id).


SELECT single GROUPID
FROM APQI
INTO @DATA(ld_name).


"populate fields of struture and append to itab
append wa_transactions to it_transactions.

"populate fields of struture and append to itab
append wa_dynprotab to it_dynprotab. . CALL FUNCTION 'BDC_RECORD_OPEN' EXPORTING queue_id = ld_queue_id name = ld_name * TABLES * transactions = it_transactions * dynprotab = it_dynprotab EXCEPTIONS NOT_FOUND = 1 SYSTEM_FAILURE = 2 . " BDC_RECORD_OPEN
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_queue_id  TYPE APQD-QID ,
it_transactions  TYPE STANDARD TABLE OF BDCTH ,
wa_transactions  LIKE LINE OF it_transactions,
ld_name  TYPE APQI-GROUPID ,
it_dynprotab  TYPE STANDARD TABLE OF BDCDATA ,
wa_dynprotab  LIKE LINE OF it_dynprotab.


SELECT single QID
FROM APQD
INTO ld_queue_id.


"populate fields of struture and append to itab
append wa_transactions to it_transactions.

SELECT single GROUPID
FROM APQI
INTO ld_name.


"populate fields of struture and append to itab
append wa_dynprotab to it_dynprotab.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name BDC_RECORD_OPEN or its description.