F110 – Manage vendor bank details

How to be sure to select the right bank details for a payment and avoid bank fees for foreign currency conversion ? Every bank is different, but in general you can expect them to take as much as 3-4% of your total transfer as a fee when you pay in foreign currency to a local currency bank account. Companies are opening several bank accounts in different currencies to avoid such charges.
That is the purpose of the partner bank type in SAP.
1. SAP standard solution
Due to the system design, the bank data is not company code specific. This means that in case of automatic payment, the bank is determined from all banks, which are in the vendor master. The banks are sorted by partner bank type, bank country key, bank number and bank control key. Starting from the first one, each bank checked. After that, the first bank, which has passed the check, is selected.

How Partner Bank Type (BVTYP) is selected by Automatic Payment Program?

1.1. If the vendor item of the invoice contains a partner bank type
If you have mentioned a Partner Bank Type (BVTYP) during document posting then the same BVTYP will be picked in automatic payment program for that document because fields maintained during document posting like BVTYP, payment method etc. are selected in payment program since these are specifically mentioned.

1.2. If the vendor item of invoice doesn’t contain a partner bank type
The system selects the bank with the lowest Partner Bank Type (BVTYP), this means that a bank, which has no BVTYP will be, selected first, then one with AAAA, then BBBB.

For the example 1 below, the system will sort BVTYP, so it will be in sequential order: 0001 / 0002 / 0003
So, in this case BVTYP 0001 will be selected i.e. bank details with bank key 67270003 and Bank account 12345679 is used for payment.
Example 1
LFBK-BANKSLFBK-BANKLLFBK-BANKNLFBK-BVTYP
CountryBank KeyBank accountPartner bank type
DE0003234134123456680002
DE10000001000012120003
DE67270003123456790001

For the example 2, bank details with bank key 0003234134 and Bank account 12345668 is used for payment.
Example 2
CountryBank KeyBank accountPartner bank type
DE000323413412345668
DE1000000100001212
DE67270003123456790001

1.3 Partner bank type SPRO prerequisites
 To allow the bank account selection during the automatic payment program, the “Bank details” indicator must be set as below:
 
SPRO>Financial Accounting (new)>Accounts Receivable and Accounts Payable>Business Transactions>Outgoing Payments>Automatic Outgoing Payments>Payment Method/Bank Selection for Payment Program>Set Up Payment Methods per Country for Payment Transactions


By setting this indicator, we specify that the payment method can only be used if bank details have been maintained in the vendor master data. Conversely, the vendor bank details are only selected and entered into the payment dataset if this indicator is set.
 
We have to set also the Bank Business Partners field optional. For this, we need to go through:
SPRO>Financial Accounting (new)>Accounts Receivable and Accounts Payable>Business Transactions>Incoming Invoices/Credit Memos>Carry out and check document settings>Maintain Field Status Variants.
 
Select the appropriate group associated with the vendor’s reconciliation G/L and set the button under “Opt.entry” as below:
 

If the Bank Business Partners is in a suppressed state, the field Part.bank will not be available when entering the vendor invoice via the MIRO, MIR7, FB60 and FB65. Therefore it will be impossible for the user to fill the partner bank type field in the invoice. Make the same customizing for the posting key “21” (OB41).
2. Custom solution
2.1 Partner bank type codification
To avoid bank charges for forex conversion, the partner bank type codification is a solution. The partner bank type is a 4 characters field and it is free to encode it as you wish. Encode it like a currency, i.e EUR or USD or CHF…etc, to identify the currency of the bank account.
Then you can have a vendor bank details like this:
CountryBank KeyBank accountPartner bank type
DE000323413412345668 EUR
CH1000000100001212 CHF
US6727000312345679USD

Once you have defined the values of the partner bank types, it is directly available in the vendor’s invoice item. The end user will be able to easily assign the correct account to the vendor item, regarding the currency of the invoice, as the invoice header data contains the currency field (BKPF-WAERS).


For an automatic assignment of the partner bank type, the system is able to match the vendor item of the invoice with the partner bank type where the partner bank type value = the invoice header currency. For that, you must define a user exit in MM or FI module.

2.2 Tcode OBBH or GGB1 – FI substitution
For your company code, activate the call point 2 for a substitution at financial document item level.





When you create the step, you must choose the field to be substituted. Here you must choose BSEG-BVTYP.


If BSEG-BVTYP field is not visible in the list, you have to activate it from the view VWTYGB01 with tcode SM30.


Untick the checkbox «Exclude» in front of the field you want to see in OBBH.

 
Then you have three options to manage the field substitution:
Constant value: you decide to have always the same value to fill the field. (this is not our case)
Exit : you can add an abap code to read the database and have some logic to follow to find and assign the value in the field. This is the solution.
Field to field assignment : you can transfer a value you will find in another field of the document to the target field.
 

Let’s try with the field to field assignment, as we said we want to use the header currency value to match with the partner bank type.
 

Before you define the substitution, you must define a prerequisite. It is a rule to be met to allow the posting to go through the substitution. If the rule is not met, the program will ignore the substitution.
 
As we are at the item level of the financial document, we say to enter this substitution only for the vendor item (BSEG-KOART = ‘K’) and only when the partner bank type field is empty (because is a value already exists that means the user
has chosen one, and we don’t want to overwrite it.
 
Remark: i do not advice to use a field to field assignment for this substitution because it has two limitations.
First limitation is if the invoice currency is different from the values available in the vendor bank details, like an invoice in CAD then the partner bank type value will be substituted with CAD value, but there is no partner bank type named CAD
in your vendor data. This will stop your posting with an error message.
Second limitation is if you have several bank details with the same currency, for instance in EUR, you cannot name them identically. SAP will require to use different names like EUR1 and EUR2. But the invoice header only knows EUR, so it comes back to the same error as in first limitation.
 
Choose the user exit option.

 
To manage the user exits visible in OBBH, SAP says to copy the program RGGBS001 into a Program ZRGGBS001.
Check this link to manage it : https://wiki.scn.sap.com/wiki/display/ERPFI/Creating+user+exits+for+substitutions
You must assign the Z program to the customizing point GCX2 to make it work.
 
You can assign the user exit defined in ZRGGBS001 program from the match code of OBBH step substitution.
here i have created the user exit UZ04 for the partner bank type management.

In this UZ04 exit, the rule to find the value of the partner bank type is:
Select the value of field BVTYP from the table LFBK where BVTYP = BKPF-WAERS (the currency code of the invoice header), and put this value in BSEG-BVTYP (the item of the invoice under construction).
If no value is found in the bank details table LFBK, then no substitution is done.
 
Conclusion: using a user exit allows you to define complex rules to manage the partner bank type. You can create a
mapping table where you can add any field that can help to assign correctly the right bank detail to the invoice, like the company code, the vendor, the currency, and any other criteria you can imagine.
Then from the values (company code, vendor, currecny…) found in the invoice under construction, you can read this mapping table and assign the partner bank type.

2.3 Tcode OB28 or GGB0 – FI validation
 
OB28 tcode is used for data quality management, to inform or block a user if he forget to fill an important field on the invoice.
 
If you don’t want to substitute the value automatically and you want the user to be responsible of the choice of the partner bank type, you can use the OB28 FI validation to check if several bank details exist for the vendor and display a warning message to inform the user if he forget to fill the partner bank type on the vendor item.
 
If the user bypasses the warning message, you can also use the OB28 validation to display an error message that will block the posting until the partner bank type value is set on the vendor item.
 
Check this link to know more about OB28: https://wiki.scn.sap.com/wiki/display/ERPFI/Validations
Share Tweet Share Email