SAP BAPI_BANK_STATEMENT_GET Function Module for Bank Statement: Call Up Created Bank Statement
BAPI_BANK_STATEMENT_GET is a standard bapi bank statement get SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Bank Statement: Call Up Created Bank Statement 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 bank statement get FM, simply by entering the name BAPI_BANK_STATEMENT_GET into the relevant SAP transaction such as SE37 or SE38.
Function Group: FBM2
Program Name: SAPLFBM2
Main Program: SAPLFBM2
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_BANK_STATEMENT_GET 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_BANK_STATEMENT_GET'"Bank Statement: Call Up Created Bank Statement.
EXPORTING
* I_BANKCODE = "Bank Key (Bank Identification Number)
* I_COUNTRY = "Country Key of Bank Country
* I_BANKAREA = "Bank Area
I_ACCOUNT = "Account Number
I_BKSTATYEAR = "Bank Statement Date
I_BKSTATNO = "Bank Statement Number
* I_FLG_CALCULATE_FEE = ' ' "
IMPORTING
E_RC = "Return Code (see long text)
E_HEADER = "Header Data Bank Statement
E_BKK42 = "Structure for Current Account Operative Data
TABLES
* E_T_ADDRESSES = "Address List Statement Recipients
* E_T_ITEMS = "List of Statement Items
* E_T_AIPOSTS = "Info Items for Interest Penalty
* E_T_PAYMNOTES = "List of Payment Notes
* E_T_CLOSINFOS = "Account Balancing Runs Since Last Statement
* E_T_ADDRESS_BINT = "
* E_T_LIMIT = "
IMPORTING Parameters details for BAPI_BANK_STATEMENT_GET
I_BANKCODE - Bank Key (Bank Identification Number)
Data type: IBKKBKSTHD-BANKCODEOptional: Yes
Call by Reference: No ( called with pass by value option)
I_COUNTRY - Country Key of Bank Country
Data type: IBKKBKSTHD-BANKCTRYOptional: Yes
Call by Reference: No ( called with pass by value option)
I_BANKAREA - Bank Area
Data type: IBKKM6-BKKRSOptional: Yes
Call by Reference: No ( called with pass by value option)
I_ACCOUNT - Account Number
Data type: IBKKBKSTHD-ACCOUNTOptional: No
Call by Reference: No ( called with pass by value option)
I_BKSTATYEAR - Bank Statement Date
Data type: IBKKBKSTHD-BKSTATYEAROptional: No
Call by Reference: No ( called with pass by value option)
I_BKSTATNO - Bank Statement Number
Data type: IBKKBKSTHD-BKSTATNOOptional: No
Call by Reference: No ( called with pass by value option)
I_FLG_CALCULATE_FEE -
Data type: BOOLE-BOOLEDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_BANK_STATEMENT_GET
E_RC - Return Code (see long text)
Data type: IBKK_MISC-RC2Optional: No
Call by Reference: No ( called with pass by value option)
E_HEADER - Header Data Bank Statement
Data type: IBKKBKSTHD_EXTOptional: No
Call by Reference: No ( called with pass by value option)
E_BKK42 - Structure for Current Account Operative Data
Data type: IBKK42Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_BANK_STATEMENT_GET
E_T_ADDRESSES - Address List Statement Recipients
Data type: IBKKBKSTADOptional: Yes
Call by Reference: No ( called with pass by value option)
E_T_ITEMS - List of Statement Items
Data type: IBKKBKSTIT_EXTOptional: Yes
Call by Reference: No ( called with pass by value option)
E_T_AIPOSTS - Info Items for Interest Penalty
Data type: IBKKBKSTITAIOptional: Yes
Call by Reference: Yes
E_T_PAYMNOTES - List of Payment Notes
Data type: IBKKBKSTNTOptional: Yes
Call by Reference: No ( called with pass by value option)
E_T_CLOSINFOS - Account Balancing Runs Since Last Statement
Data type: IBKKBKSTCL_EXTOptional: Yes
Call by Reference: No ( called with pass by value option)
E_T_ADDRESS_BINT -
Data type: IBKKBKSTAD_BINTOptional: Yes
Call by Reference: No ( called with pass by value option)
E_T_LIMIT -
Data type: IBKKBKSTLI_EXTOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPI_BANK_STATEMENT_GET 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_e_rc | TYPE IBKK_MISC-RC2, " | |||
| lv_i_bankcode | TYPE IBKKBKSTHD-BANKCODE, " | |||
| lt_e_t_addresses | TYPE STANDARD TABLE OF IBKKBKSTAD, " | |||
| lv_e_header | TYPE IBKKBKSTHD_EXT, " | |||
| lt_e_t_items | TYPE STANDARD TABLE OF IBKKBKSTIT_EXT, " | |||
| lv_i_country | TYPE IBKKBKSTHD-BANKCTRY, " | |||
| lv_e_bkk42 | TYPE IBKK42, " | |||
| lv_i_bankarea | TYPE IBKKM6-BKKRS, " | |||
| lt_e_t_aiposts | TYPE STANDARD TABLE OF IBKKBKSTITAI, " | |||
| lv_i_account | TYPE IBKKBKSTHD-ACCOUNT, " | |||
| lt_e_t_paymnotes | TYPE STANDARD TABLE OF IBKKBKSTNT, " | |||
| lv_i_bkstatyear | TYPE IBKKBKSTHD-BKSTATYEAR, " | |||
| lt_e_t_closinfos | TYPE STANDARD TABLE OF IBKKBKSTCL_EXT, " | |||
| lv_i_bkstatno | TYPE IBKKBKSTHD-BKSTATNO, " | |||
| lt_e_t_address_bint | TYPE STANDARD TABLE OF IBKKBKSTAD_BINT, " | |||
| lt_e_t_limit | TYPE STANDARD TABLE OF IBKKBKSTLI_EXT, " | |||
| lv_i_flg_calculate_fee | TYPE BOOLE-BOOLE. " ' ' |
|   CALL FUNCTION 'BAPI_BANK_STATEMENT_GET' "Bank Statement: Call Up Created Bank Statement |
| EXPORTING | ||
| I_BANKCODE | = lv_i_bankcode | |
| I_COUNTRY | = lv_i_country | |
| I_BANKAREA | = lv_i_bankarea | |
| I_ACCOUNT | = lv_i_account | |
| I_BKSTATYEAR | = lv_i_bkstatyear | |
| I_BKSTATNO | = lv_i_bkstatno | |
| I_FLG_CALCULATE_FEE | = lv_i_flg_calculate_fee | |
| IMPORTING | ||
| E_RC | = lv_e_rc | |
| E_HEADER | = lv_e_header | |
| E_BKK42 | = lv_e_bkk42 | |
| TABLES | ||
| E_T_ADDRESSES | = lt_e_t_addresses | |
| E_T_ITEMS | = lt_e_t_items | |
| E_T_AIPOSTS | = lt_e_t_aiposts | |
| E_T_PAYMNOTES | = lt_e_t_paymnotes | |
| E_T_CLOSINFOS | = lt_e_t_closinfos | |
| E_T_ADDRESS_BINT | = lt_e_t_address_bint | |
| E_T_LIMIT | = lt_e_t_limit | |
| . " BAPI_BANK_STATEMENT_GET | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_BANK_STATEMENT_GET
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 RC2 FROM IBKK_MISC INTO @DATA(ld_e_rc). | ||||
| "SELECT single BANKCODE FROM IBKKBKSTHD INTO @DATA(ld_i_bankcode). | ||||
| "SELECT single BANKCTRY FROM IBKKBKSTHD INTO @DATA(ld_i_country). | ||||
| "SELECT single BKKRS FROM IBKKM6 INTO @DATA(ld_i_bankarea). | ||||
| "SELECT single ACCOUNT FROM IBKKBKSTHD INTO @DATA(ld_i_account). | ||||
| "SELECT single BKSTATYEAR FROM IBKKBKSTHD INTO @DATA(ld_i_bkstatyear). | ||||
| "SELECT single BKSTATNO FROM IBKKBKSTHD INTO @DATA(ld_i_bkstatno). | ||||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_flg_calculate_fee). | ||||
| DATA(ld_i_flg_calculate_fee) | = ' '. | |||
Search for further information about these or an SAP related objects