Life, SAP, Consulting, Programming, Coding, ASP.NET, Sharepoint, MVC, Javascript, PHP, WebDesign, CSS, HTML

A vendor may have multiple bank accounts and may want you to make payments to its accounts on the basis of certain rules. The rule-based selection of the vendor’s bank account may depend on a simple rule based on company code currency and bank account currency — for example, if a vendor supplies materials to multiple company codes. Alternatively, it may be a complex rule related to the nature and currency of payment (e.g., cross-border transfer, domestic funds transfer, and the ability of the vendor’s bank account to receive such payment).

If you could store the vendor’s bank details in the vendor invoice, then you could also use it while making automated payments. However, you can’t key vendor bank information directly into an invoice that you create in your SAP system. This would lead to sub-optimal use of master data (vendor’s bank account information) in transactional data (vendor invoice) from the database viewpoint, because you would have to store the bank account information in each invoice. Your SAP system has an optimal way of addressing the issue by providing a bank identifier — partner bank type — that you can associate to the bank details in the vendor master and then use in the vendor invoice. With this method, the bank identifier provides a relationship between bank details in the vendor master and vendor invoice, allowing for the use of bank details with the vendor invoice during automated payments.

I’ll look at how to assign multiple bank accounts in the vendor master and how to include bank identifier information in manual vendor invoices both with and without reference to a purchase order (PO). (You can create an invoice without reference to a PO if you are buying a very low value item on an ad hoc basis. When you create a PO for a purchase, you have to create an invoice with reference to a PO.)

I’ll also show you how to update this information after go-live if you didn’t use multiple bank accounts before go-live with the mass maintenance process. I’ll explain what to do in the case of vendor invoicing through Electronic Data Interchange (EDI). I’ll cover two methods of manual invoice creation and one method of automatic invoice creation from an EDI message. I developed these approaches from experience on an R/3 4.7 system, though it applies to mySAP ERP Central Component (ECC) as well. Much of the documentation on this subject is incomplete. For all three types of invoicing methods, you need to assign multiple bank accounts in the vendor master to the partner bank type, which I’ll explain in the next section.

Assign Multiple Bank Accounts in the Vendor Master

Your SAP system provides the functionality to store and use information from multiple vendor bank accounts in the Payment transactions screen of the vendor master general data via transaction FK03 (Figure 1). Figure 1 reflects the bank type determination logic I used in the vendor master, using the three-digit International Organization for Standardization (ISO) currency code as the Bank type.

Figure 1 Bank details vendor master

You can use the BnkT (bank type) field in the vendor master to enter text differentiators for identifying the vendor’s bank accounts. If you leave the bank type field blank against a bank account in the vendor master, then it serves as the default bank if the bank type information is missing in the vendor invoice. You may want to leave this field blank if the vendor has only one bank account and you want the system to select that bank account for all payments.

If the bank type is blank for multiple bank accounts, then the system looks for the first bank account with the blank bank type in the vendor master to use as the default. You are not required to define the text values — in my example, INR, SGD, and USD — elsewhere in your SAP system. The field allows any value up to a length of four characters. I’ll demonstrate the use of bank type with vendor invoice later on.

The system performs a check at the time of invoice creation on the bank type value used in the vendor invoice against the bank type values used in the vendor master. If you have not defined the bank type value in the vendor master prior to using it in the vendor invoice, the system shows an error message. The system performs the check to ensure that you are using a bank type value in the vendor invoice against which it can find a bank account in the vendor master. Otherwise, the system cannot determine a bank account for making payments to the vendor.

Prerequisites for Vendor Bank Selection

You need to take care of a few configuration prerequisites before you can use vendor bank selection in the automated payment functionality.

1. Check the Bank details check box in the payment method as defined at the country level in transaction FBZP. This ensures the selection of the bank details from the vendor master at the time of the automatic payment run. If you don’t do this, the system does not copy the bank details into the payment IDoc that it creates as a result of the automated payment run (transaction F110).

2. Make the Bank Business Partners field optional in the field status group attached to the vendor’s reconciliation G/L account by selecting the button under Opt. Entry for this field. This field maps to the type (partner bank type) field in the vendor invoice. If the Bank Business Partners field is not optional and is in a suppressed state, then you cannot input the partner bank type field in the vendor invoice.


Bank type is known as partner bank type in the vendor invoice and maps to the field BSEG-BVTYP. You can maintain the field status group through SPRO>Financial Accounting>Accounts Receivable and Accounts Payable>Business Transactions>Incoming Invoices/Credit Memos>Carry out and check document settings>Maintain Field Status Variants. You can create a vendor invoice in the system in multiple ways. I’ll address the three methods of vendor invoice creation and the ways to use the partner bank type functionality in the following sections so you can make the payment to the vendor’s selected bank.

Method 1: Without Reference to a PO

You can create a vendor invoice manually without reference to a PO using transaction FB60. Once you enter transaction FB60, you need to fill in the details related to the invoice in the Basic data tab, including the vendor number, invoice date, posting date, and reference and amount details.

You can see the Payment tab in Figure 2, which shows fields for payment terms (Pmnt terms), payment method (Pmt Method) and partner bank type (Part. bank). Fill the Part. bank field with the appropriate value. As you see, you will pay from House bank field, and vendor receives money to the bank entered in Part. Bank type. You already maintained the bank type in the vendor master data (Figure 1). Provide the offsetting G/L account information in the bottom pane in the FB60 screen to create the invoice. Save to post the document.

Figure 2 Create a vendor invoice using transaction FB60

The invoice posted through FB60 makes a credit (CR) entry against the vendor and a debit (DR) entry against the offsetting expense G/L account. Figure 3 shows the vendor line item containing the bank type information. At the time of the payment run, the system uses bank account 22222 because I used bank type INR in this invoice (Figure 1).

Figure 3 Example accounting document created using transaction FB60

Method 2: With Reference to a PO

You can also create the vendor invoice manually with reference to a PO by using transaction MIRO. I have created a new invoice with reference to a PO for services provided by the vendor, as opposed to the pure accounting document in the first example.

You generally procure goods and services by raising a PO against a vendor, so you create the invoice with reference to the PO. (If you are procuring very low value items on an ad hoc basis without a PO, then you may have to create the vendor invoice using FB60, as discussed earlier.) MIRO creates an invoice document, which you can see using transaction MIR4 (Figure 4), and an accounting document, which you can see using transaction FB03 (Figure 5). You can fill in the appropriate value in the Part. bank field in the Payment tab in transaction MIRO, as in Figure 4. I used a blank value in the bank type field. I already maintained it in the vendor master data before I created the vendor invoice document.

Figure 4 Create a vendor invoice using MIRO

Figure 5 Example accounting document created using transaction MIRO

After entering transaction MIRO, enter the company code in which you are going to post the invoice using menu path Edit>Switch Company Code, or by pressing F7. Provide the invoice date, posting date, and reference in the Basic data tab. In the PO reference tab on the bottom pane of the screen, provide the purchase order details (Figure 4). Provide the partner bank type details in the Payment tab. Click on the save icon to post the documents. I left the Part. bank (partner bank type) field blank in this example to demonstrate the use of the default bank account later on. I’m using default bank account 33333 from Figure 1 here. The accounting document contains the payment information in the Part. bank field.

You can use mass maintenance of the partner bank type field if the vendor provided multiple bank accounts only at a point after go-live and you need to pay the invoices you created before to these multiple bank accounts. See the sidebar, “Mass Maintenance of Partner Bank Type in Vendor Invoices,” for a detailed description of this.

Method 3: Automatic Creation from 810 EDI Message

So far I have discussed two methods to create a vendor invoice manually in the SAP system. While these methods are useful, organizations that have matured in their SAP use prefer to automate tasks such as the posting of vendor invoices, thereby reducing manual intervention and effort. Vendors also benefit from automation because they receive money directly into their bank accounts and don’t have to spend resources on collecting and depositing payments to their bank accounts.

You can automate vendor invoicing by using EDI. The vendor sends the 810 EDI message to the SAP system. The system provides the INVOIC01 standard IDoc that you can use to map to the 810 EDI signal to post the vendor invoice (Figure 6). Now I’ll take you through an example to demonstrate the use of the partner bank type with the automated selection rule of the vendor’s bank account.

Figure 6 Illustrative vendor invoice IDoc in SAP

You can process the vendor invoice IDoc through the standard function module IDOC_INPUT_INVOIC_MRM. You first specify the function module in the partner profile of the vendor via transaction WE20. The INVOIC01 IDoc doesn’t contain any segment that can carry the partner bank type information. However, the function module provides access to user exits through which you can code the customized rules for vendor bank selection to populate the appropriate partner bank type in the invoice.

Use the customer function 014 (user exit ZXM08U25) to populate the partner bank type in the invoice (Figures 7 and 8). You can populate the partner bank type field using the change table field E_RBKPV-BVTYP.

Figure 7 Custom table to store rule-based value of partner bank type

Figure 8 User exit ZXM08U25

Step 1. Check for conditions in which you want to populate the partner bank type. My example makes the bank account selection based on company code currency, so a simple check here is to ensure that the vendor master exists in multiple company codes. If the vendor master doesn’t exist in multiple company codes, then you don’t need to use the bank type field.

Step 2. If the check in Step 1 is met, lay down the rules that determine the partner bank type.

Figure 7 shows the custom table that contains records illustrating the rules used in this article for determination of the vendor bank. I used the records maintained in the custom table to identify the partner bank type to use in the vendor invoice in step 3.

Step 3. Amend field E_RBKPV-BVTYP in the user exit (Figure 8) and write the partner bank type value to it. In Figure 9, you can see the ABAP code that I used to amend E_RBKPV_BVTYP in the user exit to write the partner bank type value. The system derived the partner bank type value using the user exit to create an accounting document (Figure 10).

Figure 9 User exit code logic

Figure 10 Example invoice created using user exit ZXM08U25

After you create the invoices with the three methods discussed above, you then need to perform an automatic payment run to select and make payment against the open vendor items. This applies to all three invoice methods.

Automatic Payment Run I will now complete the process by using transaction F110 to conduct the automatic payment run so I can show you the results and the selection of the vendor’s bank account for the four invoices that I have created.

Create a payment run manually using transaction F110. Fill the Parameter tab using the vendor number and company code to restrict the selection of vendor invoices to those created in Figures 3, 5, and 10 in the main article and Figure 1 in the sidebar. Execute the proposal run to create a proposal for the payment against selected vendor invoices. The proposal list in Figure 11 displays an invoice and the associated vendor bank account details. You can now use the partner bank type field to cross-check the invoices created in this article and the bank accounts selected in Figure 11 per the original requirement in Figure 1.

Figure 11 Vendor bank selection during proposal run

Once you confirm the proposal run for accuracy of document selection and data, run the payment run by clicking on the Payments button on the Status screen of transaction F110. This creates the payment documents in the SAP system. Then go to the Printout/Data Medium tab via transaction F110. Use program RFFOEDI1 under the bottom pane Lists along with an appropriate variant, which you can create using transaction SE38. Create the variant with the combination of company code, house bank, account, and payment methods. This ensures that you can select all the invoice documents in the proposal list for processing so you can create the payment IDocs. Go to the Status tab to create the payment IDoc automatically through menu path Edit>Payments>Schedule Print. Figure 12 illustrates a sample payment IDoc I created. The sample IDoc contains the chosen bank account details of the vendor.

Figure 12 Example payment IDoc

Mass Maintenance of Partner Bank Type in Vendor Invoices

The functionality I discussed in methods 1 and 2 assumes that you’ve been using the partner bank type functionality from the time the vendor went live in your SAP system. However, a practical situation may demand that a vendor provide single bank account details at the time of go-live, and later on provide the details of the other bank accounts. A robust solution thus should address the issue related to mapping of all open documents (vendor invoices pending payment) to the respective partner bank types. If you don’t map the open documents, then the system picks up the default vendor bank account (the one with the blank bank type in the vendor master) when you use transaction code F110 to create the payment IDoc. If you have not maintained a default bank in the vendor master, then it does not pick up a bank at all. In either case, you may end up making a payment to the wrong bank account. In such a case, you need to perform mass maintenance on the Part. bank field to populate the
correct bank type value in all open invoice documents. I’ve created an example of a vendor invoice created with a blank partner bank type to demonstrate how you can perform mass maintenance on the type (partner bank type) field even after you have posted the vendor invoice (Figure 1). I created the invoice using transaction MIRO. Note that in Figure 1 I left the type field blank intentionally to demonstrate the mass maintenance functionality. This case is similar to the one shown in Figure 7 in the main article in terms of the invoice creation. However, I changed the bank type value in this case from blank to SGD using mass maintenance, so I can use bank account 44444 for payment (Figure 1 in the main article).

Figure 1 Vendor invoice with blank partner bank type

To perform mass maintenance, use transaction FBL2N. Enter the selection parameters to select those documents for which you need to maintain the partner bank type field. Follow menu path Environment>Mass Change>New Value, which produces a pop-up window. Enter the new value of the partner bank type SGD in the type field and click on the Execute changes button. Select the invoice document (Figure 1) using the selection parameters upon entering transaction FBL2N. Then provide the value for the partner bank type field that you found in the New Values pop-up window. The partner bank type field acquires the new value in the vendor invoice document (Figure 2).

Figure 2 Vendor invoice post-mass maintenance of partner bank type

// This post is copy for I post it here because it is not just a comment but high quality enough to be considered as a post on a topic


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: