SAP GET_BANK_ACCOUNT Function Module for









GET_BANK_ACCOUNT is a standard get bank account SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 get bank account FM, simply by entering the name GET_BANK_ACCOUNT into the relevant SAP transaction such as SE37 or SE38.

Function Group: FIBL_HB1
Program Name: SAPLFIBL_HB1
Main Program: SAPLFIBL_HB1
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function GET_BANK_ACCOUNT 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 'GET_BANK_ACCOUNT'"
EXPORTING
* I_BANKL = ' ' "A,B: Bank key (optional)
* I_BANKN = ' ' "A: Bank account number
* I_WAERS = ' ' "A: Account currency (optional)
* I_BNKN2 = ' ' "B: Alternative bank account number
* I_BKONT = ' ' "
* I_BIGAC1 = ' ' "Account Number in Bank Statement
* I_BIGAC2 = ' ' "Account Number in Bank Statement

IMPORTING
E_T012 = "House bank found
E_T012K = "House bank account found
E_IBAN = "

EXCEPTIONS
INPUT_WRONG = 1 BANK_ACCOUNT_NOT_FOUND = 2 BANK_KEY_FALSE = 3 BANK_KEY_NOT_FOUND = 4 CURRENCY_FALSE = 5 CURRENCY_NOT_FOUND = 6 MULTIPLE_BANK_ACCOUNT = 7 ACCOUNT_TYPE_FALSE = 8 ACCOUNT_TYPE_NOT_FOUND = 9
.



IMPORTING Parameters details for GET_BANK_ACCOUNT

I_BANKL - A,B: Bank key (optional)

Data type: T012-BANKL
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_BANKN - A: Bank account number

Data type: T012K-BANKN
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_WAERS - A: Account currency (optional)

Data type: T012K-WAERS
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_BNKN2 - B: Alternative bank account number

Data type: T012K-BNKN2
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_BKONT -

Data type: T012K-BKONT
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_BIGAC1 - Account Number in Bank Statement

Data type: BIGAC_EB
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_BIGAC2 - Account Number in Bank Statement

Data type: BIGAC_EB
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for GET_BANK_ACCOUNT

E_T012 - House bank found

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

E_T012K - House bank account found

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

E_IBAN -

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

EXCEPTIONS details

INPUT_WRONG - Incorrect parametrization (either A or B)

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

BANK_ACCOUNT_NOT_FOUND - Bank account number not found

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

BANK_KEY_FALSE - Bank account number found, bank key incorrect

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

BANK_KEY_NOT_FOUND - Bank account number found more than once, bank key not found.

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

CURRENCY_FALSE - Bank account number found, currency incorrect

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

CURRENCY_NOT_FOUND - Bank account number found more than once, currency not found.

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

MULTIPLE_BANK_ACCOUNT - Bank account found more than once

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

ACCOUNT_TYPE_FALSE -

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

ACCOUNT_TYPE_NOT_FOUND -

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

Copy and paste ABAP code example for GET_BANK_ACCOUNT 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_t012  TYPE T012, "   
lv_i_bankl  TYPE T012-BANKL, "   SPACE
lv_input_wrong  TYPE T012, "   
lv_e_t012k  TYPE T012K, "   
lv_i_bankn  TYPE T012K-BANKN, "   SPACE
lv_bank_account_not_found  TYPE T012K, "   
lv_e_iban  TYPE IBAN, "   
lv_i_waers  TYPE T012K-WAERS, "   SPACE
lv_bank_key_false  TYPE T012K, "   
lv_i_bnkn2  TYPE T012K-BNKN2, "   SPACE
lv_bank_key_not_found  TYPE T012K, "   
lv_i_bkont  TYPE T012K-BKONT, "   SPACE
lv_currency_false  TYPE T012K, "   
lv_i_bigac1  TYPE BIGAC_EB, "   SPACE
lv_currency_not_found  TYPE BIGAC_EB, "   
lv_i_bigac2  TYPE BIGAC_EB, "   SPACE
lv_multiple_bank_account  TYPE BIGAC_EB, "   
lv_account_type_false  TYPE BIGAC_EB, "   
lv_account_type_not_found  TYPE BIGAC_EB. "   

  CALL FUNCTION 'GET_BANK_ACCOUNT'  "
    EXPORTING
         I_BANKL = lv_i_bankl
         I_BANKN = lv_i_bankn
         I_WAERS = lv_i_waers
         I_BNKN2 = lv_i_bnkn2
         I_BKONT = lv_i_bkont
         I_BIGAC1 = lv_i_bigac1
         I_BIGAC2 = lv_i_bigac2
    IMPORTING
         E_T012 = lv_e_t012
         E_T012K = lv_e_t012k
         E_IBAN = lv_e_iban
    EXCEPTIONS
        INPUT_WRONG = 1
        BANK_ACCOUNT_NOT_FOUND = 2
        BANK_KEY_FALSE = 3
        BANK_KEY_NOT_FOUND = 4
        CURRENCY_FALSE = 5
        CURRENCY_NOT_FOUND = 6
        MULTIPLE_BANK_ACCOUNT = 7
        ACCOUNT_TYPE_FALSE = 8
        ACCOUNT_TYPE_NOT_FOUND = 9
. " GET_BANK_ACCOUNT




ABAP code using 7.40 inline data declarations to call FM GET_BANK_ACCOUNT

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 BANKL FROM T012 INTO @DATA(ld_i_bankl).
DATA(ld_i_bankl) = ' '.
 
 
 
"SELECT single BANKN FROM T012K INTO @DATA(ld_i_bankn).
DATA(ld_i_bankn) = ' '.
 
 
 
"SELECT single WAERS FROM T012K INTO @DATA(ld_i_waers).
DATA(ld_i_waers) = ' '.
 
 
"SELECT single BNKN2 FROM T012K INTO @DATA(ld_i_bnkn2).
DATA(ld_i_bnkn2) = ' '.
 
 
"SELECT single BKONT FROM T012K INTO @DATA(ld_i_bkont).
DATA(ld_i_bkont) = ' '.
 
 
DATA(ld_i_bigac1) = ' '.
 
 
DATA(ld_i_bigac2) = ' '.
 
 
 
 


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!