SAP BAPI_BROKERREP_GETOPENITEMS Function Module for Selection of Open Items in Broker Collections
BAPI_BROKERREP_GETOPENITEMS is a standard bapi brokerrep getopenitems SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Selection of Open Items in Broker Collections 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 bapi brokerrep getopenitems FM, simply by entering the name BAPI_BROKERREP_GETOPENITEMS into the relevant SAP transaction such as SE37 or SE38.
Function Group: IBRBAPI
Program Name: SAPLIBRBAPI
Main Program: SAPLIBRBAPI
Appliation area:
Release date: 21-Aug-2007
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_BROKERREP_GETOPENITEMS 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 'BAPI_BROKERREP_GETOPENITEMS'"Selection of Open Items in Broker Collections.
EXPORTING
REPORTID = "Broker Report Identification
* INVOICINGPERIOD = "Broker Report. BAPI Structure Invoicing Period for BR
SELECTION = "Selection Structure for Open Items in Broker Collections
* CLEARINGCURRENCY = "Transaction Currency
* CLEARINGCURRENCYISO = "ISO Currency Code
* CLEARINGDATE = SY-DATUM "Document Date in Document
* NO_AUTH_CHECK = "Do Not Execute Authorization Checks for User Data
* SHOW_POSTLOCK_ITEMS = ' ' "Flag: Display Items with Posting Lock
TABLES
* OPENITEMS = "Clearing Items for Document in Contract A/R + A/P
* EXTENSIONIN = "Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
* EXTENSIONOUT = "Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
* RETURN = "Return Parameters
IMPORTING Parameters details for BAPI_BROKERREP_GETOPENITEMS
REPORTID - Broker Report Identification
Data type: BAPIBROKREPHEADER-REPORTOptional: No
Call by Reference: No ( called with pass by value option)
INVOICINGPERIOD - Broker Report. BAPI Structure Invoicing Period for BR
Data type: BAPIBROKER_PERIODOptional: Yes
Call by Reference: No ( called with pass by value option)
SELECTION - Selection Structure for Open Items in Broker Collections
Data type: BAPIBROKREPOPENITEMSELECTOptional: No
Call by Reference: No ( called with pass by value option)
CLEARINGCURRENCY - Transaction Currency
Data type: BAPIDFKKCL-CURRENCYOptional: Yes
Call by Reference: No ( called with pass by value option)
CLEARINGCURRENCYISO - ISO Currency Code
Data type: BAPIDFKKCL-CURRENCY_ISOOptional: Yes
Call by Reference: No ( called with pass by value option)
CLEARINGDATE - Document Date in Document
Data type: BAPIDFKKCL-DOC_DATEDefault: SY-DATUM
Optional: No
Call by Reference: No ( called with pass by value option)
NO_AUTH_CHECK - Do Not Execute Authorization Checks for User Data
Data type: BAPIBROKREPCTRL-NO_AUTH_CHECKOptional: Yes
Call by Reference: No ( called with pass by value option)
SHOW_POSTLOCK_ITEMS - Flag: Display Items with Posting Lock
Data type: BAPIBROKREPCTRL-SHOW_POSTLOCK_ITEMSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_BROKERREP_GETOPENITEMS
OPENITEMS - Clearing Items for Document in Contract A/R + A/P
Data type: BAPIDFKKCLOptional: Yes
Call by Reference: Yes
EXTENSIONIN - Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
EXTENSIONOUT - Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
RETURN - Return Parameters
Data type: BAPIRET2Optional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for BAPI_BROKERREP_GETOPENITEMS 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_reportid | TYPE BAPIBROKREPHEADER-REPORT, " | |||
| lt_openitems | TYPE STANDARD TABLE OF BAPIDFKKCL, " | |||
| lt_extensionin | TYPE STANDARD TABLE OF BAPIPAREX, " | |||
| lv_invoicingperiod | TYPE BAPIBROKER_PERIOD, " | |||
| lv_selection | TYPE BAPIBROKREPOPENITEMSELECT, " | |||
| lt_extensionout | TYPE STANDARD TABLE OF BAPIPAREX, " | |||
| lt_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lv_clearingcurrency | TYPE BAPIDFKKCL-CURRENCY, " | |||
| lv_clearingcurrencyiso | TYPE BAPIDFKKCL-CURRENCY_ISO, " | |||
| lv_clearingdate | TYPE BAPIDFKKCL-DOC_DATE, " SY-DATUM | |||
| lv_no_auth_check | TYPE BAPIBROKREPCTRL-NO_AUTH_CHECK, " | |||
| lv_show_postlock_items | TYPE BAPIBROKREPCTRL-SHOW_POSTLOCK_ITEMS. " SPACE |
|   CALL FUNCTION 'BAPI_BROKERREP_GETOPENITEMS' "Selection of Open Items in Broker Collections |
| EXPORTING | ||
| REPORTID | = lv_reportid | |
| INVOICINGPERIOD | = lv_invoicingperiod | |
| SELECTION | = lv_selection | |
| CLEARINGCURRENCY | = lv_clearingcurrency | |
| CLEARINGCURRENCYISO | = lv_clearingcurrencyiso | |
| CLEARINGDATE | = lv_clearingdate | |
| NO_AUTH_CHECK | = lv_no_auth_check | |
| SHOW_POSTLOCK_ITEMS | = lv_show_postlock_items | |
| TABLES | ||
| OPENITEMS | = lt_openitems | |
| EXTENSIONIN | = lt_extensionin | |
| EXTENSIONOUT | = lt_extensionout | |
| RETURN | = lt_return | |
| . " BAPI_BROKERREP_GETOPENITEMS | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_BROKERREP_GETOPENITEMS
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 REPORT FROM BAPIBROKREPHEADER INTO @DATA(ld_reportid). | ||||
| "SELECT single CURRENCY FROM BAPIDFKKCL INTO @DATA(ld_clearingcurrency). | ||||
| "SELECT single CURRENCY_ISO FROM BAPIDFKKCL INTO @DATA(ld_clearingcurrencyiso). | ||||
| "SELECT single DOC_DATE FROM BAPIDFKKCL INTO @DATA(ld_clearingdate). | ||||
| DATA(ld_clearingdate) | = SY-DATUM. | |||
| "SELECT single NO_AUTH_CHECK FROM BAPIBROKREPCTRL INTO @DATA(ld_no_auth_check). | ||||
| "SELECT single SHOW_POSTLOCK_ITEMS FROM BAPIBROKREPCTRL INTO @DATA(ld_show_postlock_items). | ||||
| DATA(ld_show_postlock_items) | = ' '. | |||
Search for further information about these or an SAP related objects