SAP BAPI_BANK_STATEMENT_EXEC Function Module for Bank Statement: Newly Create Bank Statement
BAPI_BANK_STATEMENT_EXEC is a standard bapi bank statement exec 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: Newly Create 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 exec FM, simply by entering the name BAPI_BANK_STATEMENT_EXEC 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_EXEC 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_EXEC'"Bank Statement: Newly Create 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_BKSTATDATE = SY-DATUM "Bank Statement Date
* I_BKSTATTIME = SY-UZEIT "Bank Statement Time
I_BKSTITEMDATE = "Posting Date To
* I_FLG_SIMULATION = "'X': Only Simulate Bank Statement
* I_FLG_BKST_NOITEMS = ' ' "'X': Bank Statement Without Turnovers
IMPORTING
E_RC = "Return Code (see long text)
E_HEADER = "Bank Statement Header
E_BKK42 = "Structure for Current Account Operative Data
TABLES
* E_T_ADDRESSES = "Address List of Statement Recipients
* E_T_ITEMS = "Statement Items
* E_T_AIPOSTS = "Infoposten für Vorschusszinsen
* E_T_PAYMNOTES = "Payment Notes
* E_T_CLOSINFOS = "Account Balanacings Since Last Statement
* E_T_ADDRESS_BINT = "
* E_T_LIMIT = "
IMPORTING Parameters details for BAPI_BANK_STATEMENT_EXEC
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_BKSTATDATE - Bank Statement Date
Data type: IBKKBKSTHD-BKSTATDATEDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_BKSTATTIME - Bank Statement Time
Data type: IBKKBKSTHD-BKSTATTIMEDefault: SY-UZEIT
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_BKSTITEMDATE - Posting Date To
Data type: IBKKBKSTHD-SDATEPOSTHOptional: No
Call by Reference: No ( called with pass by value option)
I_FLG_SIMULATION - 'X': Only Simulate Bank Statement
Data type: BOOLE-BOOLEOptional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_BKST_NOITEMS - 'X': Bank Statement Without Turnovers
Data type: BOOLE-BOOLEDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_BANK_STATEMENT_EXEC
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 - Bank Statement Header
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_EXEC
E_T_ADDRESSES - Address List of Statement Recipients
Data type: IBKKBKSTADOptional: Yes
Call by Reference: No ( called with pass by value option)
E_T_ITEMS - Statement Items
Data type: IBKKBKSTIT_EXTOptional: Yes
Call by Reference: No ( called with pass by value option)
E_T_AIPOSTS - Infoposten für Vorschusszinsen
Data type: IBKKBKSTITAIOptional: Yes
Call by Reference: Yes
E_T_PAYMNOTES - Payment Notes
Data type: IBKKBKSTNTOptional: Yes
Call by Reference: No ( called with pass by value option)
E_T_CLOSINFOS - Account Balanacings 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_EXEC 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_bkstatdate | TYPE IBKKBKSTHD-BKSTATDATE, " SY-DATUM | |||
| lt_e_t_closinfos | TYPE STANDARD TABLE OF IBKKBKSTCL_EXT, " | |||
| lv_i_bkstattime | TYPE IBKKBKSTHD-BKSTATTIME, " SY-UZEIT | |||
| lt_e_t_address_bint | TYPE STANDARD TABLE OF IBKKBKSTAD_BINT, " | |||
| lt_e_t_limit | TYPE STANDARD TABLE OF IBKKBKSTLI_EXT, " | |||
| lv_i_bkstitemdate | TYPE IBKKBKSTHD-SDATEPOSTH, " | |||
| lv_i_flg_simulation | TYPE BOOLE-BOOLE, " | |||
| lv_i_flg_bkst_noitems | TYPE BOOLE-BOOLE. " ' ' |
|   CALL FUNCTION 'BAPI_BANK_STATEMENT_EXEC' "Bank Statement: Newly Create Bank Statement |
| EXPORTING | ||
| I_BANKCODE | = lv_i_bankcode | |
| I_COUNTRY | = lv_i_country | |
| I_BANKAREA | = lv_i_bankarea | |
| I_ACCOUNT | = lv_i_account | |
| I_BKSTATDATE | = lv_i_bkstatdate | |
| I_BKSTATTIME | = lv_i_bkstattime | |
| I_BKSTITEMDATE | = lv_i_bkstitemdate | |
| I_FLG_SIMULATION | = lv_i_flg_simulation | |
| I_FLG_BKST_NOITEMS | = lv_i_flg_bkst_noitems | |
| 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_EXEC | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_BANK_STATEMENT_EXEC
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 BKSTATDATE FROM IBKKBKSTHD INTO @DATA(ld_i_bkstatdate). | ||||
| DATA(ld_i_bkstatdate) | = SY-DATUM. | |||
| "SELECT single BKSTATTIME FROM IBKKBKSTHD INTO @DATA(ld_i_bkstattime). | ||||
| DATA(ld_i_bkstattime) | = SY-UZEIT. | |||
| "SELECT single SDATEPOSTH FROM IBKKBKSTHD INTO @DATA(ld_i_bkstitemdate). | ||||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_flg_simulation). | ||||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_flg_bkst_noitems). | ||||
| DATA(ld_i_flg_bkst_noitems) | = ' '. | |||
Search for further information about these or an SAP related objects