
You can associate the Lockbox functionality in SAP to a mailbox dedicated for check payments. This post will cover the Lockbox process, its use, relation to SAP, configuration, transaction codes, as well as the H2H Connectivity overview.
The key words or phrases for lockbox in this case can be “check payments”, “payment collection”, “mailbox for check payments”. You can also refer to “What is a Lockbox System” for more information.
Overview
- What is a Lockbox?
- Why do companies use a Lockbox?
- How do Lockboxes relate to SAP?
- Lockbox Business Process
- SAP Lockbox Process – Check Deposit
- Lockbox File Formats
- Configuration and Transaction Codes
- Lockbox H2H Connectivity
What is a Lockbox?
Earlier, we associated lockboxes to a mailbox dedicated for check payments. This lockbox basically allows a business or company to process payments from their customers quickly.
…Okay, but how does a lockbox process customer payments quickly?
Customers can send their payments to one or more lockboxes. Take your mind off SAP for the meantime and think of this lockbox as a mailbox or post office box that is outside of SAP. Visualize that this box is at a bank.
In the image below, you will see 3 banks (each with their own lockbox) residing in different locations. For example, “Bank ABC Location A” could be in Los Angeles. Notice how there are different customers paying and sending those payments to different lockboxes.

As such, lockboxes are special depository bank accounts of a company where customers can pay or remit their invoice payments.
Why do companies use a Lockbox?
These lockboxes are (ideally) strategically placed in geographical areas that are closest to their customer groups. It is a matter of convenience for the customer and it is a way to minimize mail time.
Note that in the United States, checks are the most common method of payment so lockboxes would most likely be utilized there compared to Germany for example.
Let us consider (for example) a company called Company Cool Inc. or CCI. Let us add onto that scenario and consider that CCI resides in New York but they have customer groups in different locations such as Los Angeles, Chicago, Washington DC etc.
Given this scenario, CCI can setup lockboxes with banks that are within the area of these customer groups. CCI in turn will pay the bank for the processing of payments through the lockbox setups.
At a certain period of time, a bank employee collects these customer payments and does the necessary processing. This happens daily.
…What does the bank employee do to these customer payments?

They simply apply or execute these payments. This means that the payments are deposited to the company’s bank account. In our example, the payments of Customer 1, 2, and 3 will be deposited to CCI’s bank account.
After the payments are processed or deposited, the necessary reports will be sent to the concerned company. You can refer to the updated image above where reports are sent to CCI after processing.
How do Lockboxes relate to SAP?
This time, put your focus on the reports that the bank gives to Company Cool Inc. These reports can be by form of electronic files that contains all the payments, deposits, and the invoices that were paid against. After all, we are shifting to more digitalized processes.
Refer to the updated image below emphasizing how these reports are in the form of electronic files that contain the payment details.

Now, try to visualize Company Cool Inc. and consider that they have SAP implemented. These electronic files can be sent to CCI where the files can be uploaded in SAP.
This means that you can expect these electronic lockbox files inbound to SAP where SAP in turn can update the customer balances, clear customers (accounts receivable accounts).

Lockbox Business Process
- Customers send their checks (with payment information) directly to the bank.
- The bank processes the check and payment information, then saves the information in a file.
- The file is sent to the concerned company department (for example: accounting department) using data transfer.
- The file (lockbox file) is processed and recorded in SAP.
- Posting to incoming checks account.
- Paid Invoices are cleared.
- If payment information is complete, then invoices are cleared.
- If payment information is incomplete (i.e. SAP cannot find the concerned invoice in the system, the payment information should be processed manually – using the post processing function.)
SAP Lockbox Process – Check Deposit

As you refer to the image, let us go through the check deposit process steps.
- Payments are processed by the bank and corresponding details are stored in a lockbox file.
- Lockbox file is finalized, and data transfer is triggered. This data transfer can be through EDI, Manual Input, or other means.
- Lockbox file is sent to SAP where processing can begin. This file is usually in the form of BAI or BAI2 Format.
- Incoming files are processed manually or with automated tool (i.e check scanner)
- List of checks to be processed will be shown and can be corrected as needed.
- List of checks can be printed out as needed and provided to the banks.
- List of checks are provided to the banks so that when the check is cleared (on the banks side), the entry will be part of your Electronic Bank Statement.
- Creation of necessary check-related postings will occur
- Batch input sessions created from the check deposit lists and have to be processed in SM35 or
- Posting will be completed directly (without batch input session) through utilization of special post-processing transaction
Lockbox File Formats
There are two lockbox file formats as mentioned in the previous process flow. The standard BAI or BAI2 will differ depending on the bank file configuration. Thus, the importance of testing.
BAI | BAI2 |
Customer MICR (Magnetic Ink Character Recognition) Check Amount Invoice Number | Customer MICR (Magnetic Ink Character Recognition) Check Amount Invoice Number Payment Amount per Invoice Deduction Amount per Invoice Customer Deduction Reason Code |
Note: In the case that file format processing needs to be adjusted on SAP side, a custom ABAP program will need to be developed such that it converts the banks file format to standard SAP readable format.
Configuration and Transaction Codes
A. CONFIG – OBAY – Control Parameters for Auto Cash
The entries below are sample procedures and formats in SAP. Select and entry and click on the magnifying glass.

Here you will notice more settings.

- Document Number Length: Only for BAI Record NOT BAI2.
- Num. of doc numbers in type 6: Only for BAI Record NOT BAI2.
- Num. of doc numbers in type 4: Only for BAI Record NOT BAI2.
- G/L account Postings: Activate this to allow SAP to create postings to your cash account in the G/L for deposits.
- Incoming Customer payments: Activate this to allow SAP to create postings to your A/R sub ledger. This will clear customer accounts and create residual postings as needed.
- Insert Bank Details: Activate this to allow SAP to create a batch input session to insert new bank details by changing the customer master record.
- “ADDBNKDETAIL” in this case serves as the name of the batch input session you will find in SM35 for creating new bank data by changing customer master records.
- G/L account posting type: Refer to the image for available options.
B. CONFIG – OBAX – Posting Data for Autocash with Lockbox
The entries below are sample destination and origins in SAP. Select and entry and click on the magnifying glass.
- Destination: Contains the destination code the bank submits to you in your lockbox file.
- Origin: Contains your lockbox number (bank account) number at the bank.

Here you will notice more settings.
In this screen, you should populate the necessary details such as the Company Code, House Bank, Account ID, Bank GL Account, Bank Clearing Account (AR), and the needed posting parameters.

C. CONFIG – SPRO – Define Lockboxes for House Banks
Follow the path provided or search for “Define Lockbox”.
Path: Financial Accounting > Bank Accounting > Bank Accounts > Define Lockboxes for House bank


Here you can create new entries for lockboxes.
Ensure that the Company Code and House Bank are in line with what was configured / setup previously.

D. TCODE – FLB2 – Main Lockbox Program (RFEBLB00)
This transaction code serves as the main lockbox program. You can also check SE38 to read the source code of program RFEBLB00. You will notice that this is the transaction for importing lockbox files.
Note that it is also in this transaction that you state the procedure and record format as seen previously in the configuration proper.

E. TCODE – FLB1 – Post Processing Lockbox Data
This transaction code allows you to do some post processing of lockbox data in case there are checks that have not posted successfully. This is also required when the lockbox program (FLB2) was not able to auto clear and apply all the checks included in the file.
You need to enter the necessary parameters or information to narrow down the search result. For more information, you can refer to SAP Help Document “Postprocess Lockbox Data”.

As an overview, you can expect the following check status:
Status | Meaning |
Applied | Customer and all corresponding document numbers are identified. Note that even if the amount is overpaid or underpaid, the status will be applied. It wont check the amount contained in the file against the invoice or document. |
Partially Applied | Customer is identified and check has cleared some document numbers. Not all document numbers are cleared / identified. |
On Account | Customer is identified but no document numbers have been found. Full amount included in the check is posted on customer account for further processing with payment advice. |
Unprocessed | Neither customer or document numbers were found. |
Lockbox H2H Connectivity
From the process discussion we have had so far on SAP Lockbox, recall that the banks do a data transfer from bank to SAP. This is not necessarily a direct connection where they have direct access to SAP.
Instead, there is such a thing as H2H or Host to Host Connectivity. You can associate this data transfer functionality with SFTP or Secured File Transfer Protocol.
In general, H2H is used by banks and their clients. Typically, this approach would be in line with preferred file formats, network protocols, and security standards. One example would be HSBC.

Notice that in the image above, we have purple boxes labelled “Host”. There are 2 hosts in the image namely the Bank and SAP (client). Thus, the term H2H.
We also have yellow boxes below labelled “SFTP”. This means that all lockbox files (or even EBS files) can be stored there. Recall that SFTP is a secured folder that both hosts know.
Inside that SFTP folder, we have folders such as “In”, “Out”, and their corresponding “Archived” folders.
- This means that if there are inbound files to SAP (for example: the bank sends a lockbox file to SAP), you will find them in the “IN” folder.
- If you are trying to send a file to the bank or the other host, that file must be saved in the “OUT” folder.
Lastly, the concept of “Archived” folders considers that if a file has been processed or has been picked up by the host system (for example SAP), then the file will be moved and/or copied to the archived folder for back up or reference purposes.
Note that the SFTP is not just a secured folder. You can expect application files to be present in that server. For example .jar files etc.
After all, the SFTP needs to be able to communicate with both hosts and so the concept is that there should be SFTP connector files in the concerned application server.
Moreover, if you recall transaction code FBL2, you can link that SFTP “IN” folder to the file path as variant.
Summary
- What is a Lockbox? Mailbox to collect check payments from customers + Special depository bank account of a company
- Why do companies use a Lockbox? Convenience + Minimize mail time
- How do Lockboxes relate to SAP?
- After the banks process the customer payments, they send a file (lockbox file) to the company
- Lockbox file is then uploaded and processed in SAP
- Lockbox Business Process
- Customers send their checks to the bank
- Bank processes the check and saves info in a file (lockbox file)
- File (lockbox file) is sent to the concerned company
- File (lockbox file) is processed in SAP
- SAP posting proper and clearing
- SAP Lockbox Process – Check Deposit
- Data transfer (i.e. EDI), Manual Input, etc.
- Batch Input Sessions (SM35), Post Processing
- Lockbox File Formats BAI + BAI2
- Configuration and Transaction Codes
- OBAY – Config
- OBAX – Config
- SPRO – Define Lockboxes for House Banks – Config
- FLB2 – TCode
- FLB1 – TCode
- SM35 – TCode (Batch Input Sessions)
- Lockbox H2H Connectivity
- SFTP, 2 Hosts, Connector Files, In, Out, Archived, HSBC
I hope this helps. Good luck! 🙂