How to Create Search String in SAP S4 HANA, using T code: OTPM.
In bank reconciliation, identifying and correctly posting penalty charges—such as overdraft fees or late payment fines—can often require manual effort, especially when such charges are embedded within free-form bank statement texts.
To streamline the Electronic Bank Statement (EBS) process, SAP Bank Accounting provides a powerful feature called the Search String. This allows the system to scan the transaction text from the bank statement, recognize specific keywords or patterns (such as “PENY” for penalty charges), and automatically trigger a predefined posting logic—ensuring accurate and efficient bank statement reconciliation.”
Let’s explore how a search string was configured for identifying “penalty charges from bank” using the keyword 'PENY'.
🧾 What Is a Search String in SAP?
A search string in SAP is a rule that scans the note-to-payee or text fields of a bank statement and, when it detects a match (like a word or code), it triggers:
- A specific G/L account assignment
- A particular posting rule
- Or populates key fields automatically in the posting document
This eliminates the need for manual identification and ensures consistent, error-free postings during Electronic Bank Statement (EBS) processing.
🧩 Search String Used: PENY
Let’s assume that your bank includes penalty charges in the transaction description using the term “PENY”. Instead of manually identifying and posting these charges, a search string can be configured to handle this intelligently.
Go to T code: OTPM.

Click on New Entries.

Mapping: Now, enter the search string name, provide a meaningful description, and assign a shortcut name for easy identification during configuration.

Next, enter the text under the simulation and click the Test button to check the output and verify the configuration.

The output is displayed as expected, confirming that the configuration is working.

Click on save button.

Customizing request popup will come, select your request and click on continue.

Now Assign the Search string to Company Code, House Bank
After you create the search string in OTPM, navigate to the ‘Search String Use’ section on the same screen.

Click on New Entries button.

Now, enter the Company code, House bank, Account ID, external transaction type, and the search string name, then press the Enter button to proceed.

Click on save button.

Customizing request popup will come, select your request and click on continue.

SAP FICO Configuration topics:
- SAP Finance Enterprise structure: Click here
- SAP Finance GL Accounting: Click here
- SAP Finance Accounts Payable: Click here
- SAP Finance Accounts Receivable: Click here
- SAP Finance Bank Accounting: Click here
- SAP Finance New Asset Accounting: Click here
- How to Create a Controlling area in SAP: Click here
- SAP Controlling – Cost Element Accounting: Click here
- SAP Controlling – Cost Center Accounting: Click here
How to Create Search String in SAP S4 HANA
Discover more from sap96.com
Subscribe to get the latest posts sent to your email.

