Improve efficiency in bank statement processing with effective use of search strings. Review the process of electronic bank statements and how they complement the standard SAP interpretation algorithm with an illustration.
Key Concept
Search strings complement the SAP standard interpretation algorithm to better interpret the information in a bank statement and to determine the appropriate clearing transaction. An interpretation algorithm determines whether (and with which algorithms) the system should search the note to payee lines of the electronic bank statement for clearing information. They can do this even if the information is incomplete, altered, or in an unstructured format.
Imagine this scenario: Company A processes its order-to-cash cycle in its SAP system. Its process calls for the accounting document number (posted via transaction VF01) to store the billing document number (e.g., invoice number) BKPF_XBLNR in the Reference field on the header of the document. It advises its customers to include the invoice number in the payment instructions (note to payee line) to the bank whenever they make payments against the invoice. Company A needs to set up configuration to enable the system to interpret this information and perform clearing.
To do this, Company A needs to use search strings. They complement standard SAP interpretation algorithms to assess the information that is provided in a bank statement, in the processing of its electronic bank statements (EBS). (For more information on EBS, see “How to Use Electronic Bank Statements.”)
You might expect EBS to automatically assign payments received by or made from bank accounts to the appropriate customer/vendor open items (which have already been posted in the system) and post clearing documents. In most cases, the system uses the document number entered in the note to payee lines of the bank statement to determine the appropriate document numbers to perform the clearing transaction. Often, information in the note to payee in the statement is incomplete and the system cannot interpret the information received. This means a document is not cleared and you must post this transaction manually (using transaction FEBA).
I’ll show you how to make sure the documents clear properly by using search strings in your system. This happens in two phases: first defining the search strings, then using them. My example is with SAP ERP Central Component (SAP ECC) 6.0 and the SAP General Ledger (formerly called the new G/L), but it works in previous versions of the systems as well.
Define Search Strings
A search string consists of normal characters (that is, letters and digits) and other characters (Table 1). In this example, let’s assume the length of the invoice number is 10 digits and that it is included in the note to payee line either at the beginning or at the end. While processing bank statements, you require the system to search for this 10-digit invoice number within the note to payee string.

Table 1
Other characters considered by the search string
To create a new search string, follow menu path Financial Accounting (New) > Bank Accounting > Business Transactions > Payment Transactions > Electronic Bank Statement > Define Search String for Document Numbers (Figure 1). Create a new search string called REFERENCE with the Description as Reference invoice and with the string definition as (##########). I’m using # because I want to search for a number (10 digits) and use the parentheses to group as the number appears as part of the note to payee string. You can use parentheses even if the note to payee contains only the invoice number and nothing else.

Figure 1
Define the search string
Depending on the structure of information in the note to payee, you can define search strings using appropriate wild characters (such as those shown in Table 1). After you’ve entered the search string, you see the values under the Mapping section, which automatically populate. Here you assign a search string to a mapping string (boxed in Figure 2). You can either assign the same value or map a new value.
For example, if you define the search string # (source field; column 2 in the box) with the mapping string (target field; column 4 in the box) 1, then a character string a45C1 would be replaced with a11C1 — all #s are replaced with a 1.

Figure 2
Test the search string definitions
Now you should test the search string and mapping string. Let’s say the note to payee line has /REMI/2700009329 +10910,25 in the bank file, with 2700009329 being the invoice number. To test this, enter the information under Entry text in the Simulation section of Figure 2, click the Test button, and see if the interpretation hits this document number. The interpretation algorithm with search string (##########) interprets the information in the note to payee line (/REMI/2700009329 +10910,25) and searches for a 10-digit number. As you can see, the Test button has returned the 10-digit number 2700009329 under the Hit column (Figure 2). Further, as I’ve configured the source string (#) to be the same as the target string (#) within the Mapping section (circled in Figure 2), the test returns the same number in the Map column.
Use Search Strings
The search string Reference must be assigned to the company code and to the house bank and account ID of the bank statement to be processed. You have to maintain entries for every external transaction code (form of payment) for which the search is intended. Finally, the search string has to be set to Active status for it to work (by clicking the Act. check box shown in Figure 3).

Figure 3
Search string use
Several standard interpretation algorithms are available for use. For this example, I’ve selected 001: Standard algorithm (Figure 4).

Figure 4
Available interpretation algorithms
You have the option to simulate the search strings and mapping string for a particular set of bank details by following IMG menu path Financial Accounting (NEW) > Bank Accounting > Business Transactions > Payment Transactions > Electronic Bank Statement > Simulate Document Number Search Using Strings. This is particularly useful in initial implementations of search strings to determine the effectiveness of the setup.
Simulation makes it easier for you to find the search strings best suited to the document number search in your electronic bank statements. Note that you must have imported a bank statement first (via transaction FF.5) and data is updated in the SAP system.
Now that you have defined a search string, let’s look at an example that demonstrates this functionality. As detailed earlier, Company A had made sales to Customer X and had advised them to include the invoice number in the instructions to the bank under the note to payee field. Customer X has the open items shown in Figure 5 pending payment in the books of the company.

Figure 5
Customer line item display – customer X open items
You can see there are five open items and they have 10-digit invoice numbers stored under the Reference field. Customer X makes the payment with the necessary instructions and Company A receives the payment and processes it via EBS.
Let’s take a quick look at the bank file (MT940 statement, unstructured 86) received from the bank for better understanding (Figure 6). You can understand the information in the statement by looking at Table 2.

Figure 6
MT940 bank statement — unstructured 86
Note
The MT940 statement is provided by banks in two formats — structured 86 and unstructured 86. The difference lies in the way information in tag :86: is coded within the bank statement. This has not affected the way the process is carried out.

Table 2
Bank statement information
You can see Customer X has included the 10-digit invoice number (underlined) in his instructions to the bank and that information was transmitted via the bank statement. More information and technical details of the MT940 statement can be obtained from Company A’s bank.
Let’s now import this bank statement via EBS using transaction FF.5 (Figure 7). Select the I SWIFT MT940 international format option in the Elect. bank statement format dropdown and enter the appropriate path in the Statement File field.

Figure 7
Selection screen of transaction FF.5
Then under the Algorithms section, enter the intervals in which the values of your reference document numbers may be. Note that intervals are alphanumerically interpreted and values that are outside of these intervals are ignored by the program and open items would not be cleared.
Once the bank statement is processed, you can see in the posting log of transaction FF.5 that open items of Customer X have been cleared (Figure 8). The system was able to interpret the invoice number information in the bank statement, search corresponding open items with the help of search strings, and, finally, clear the open items.

Figure 8
Posting log of transaction FF.5 — subledger area
The posting log shows that the system triggered the standard SAP clearing transaction FB05 for the open items found by the search strings. It posted clearing documents with the amounts shown in tag :61: of the bank statement. Further, every bank statement processing session using transaction FF.5 is identified by a unique statement number (e.g., 303), and is used as reference for all subsequence post processing (e.g., FEBA). After processing the bank statement, you can see that all open items are now cleared (Figure 9).

Figure 9
Customer line item display — Customer X cleared items
Note
SAP Note 494777 provides an overview of customer enhancements that are available to further enhance the processing of EBS.
Karthik Tharkabhushanam
Karthik Tharkabhushanam is an SAP consultant at Infosys Technologies Limited with more than 11 years of consulting experience. As a certified SAP Financials consultant, he specializes in SAP implementations for the manufacturing industry domain. He has a bachelor’s degree in accounting and is a chartered accountant.
You may contact the author at karthikt9@yahoo.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.