Skip to Content
Technical Articles
Author's profile photo Bohdan Petrushchak

Search string in EBS, part 4 – account modification

Hello SAPers!

This is my second blog post covering the functionalities around use of account modifications in bank statement and the fourth post on the topics around search string in bank statement. I’ll provide the links to my previous posts related to this topic at the end of this post.

1. Introduction

In this blog I’ll explain how to configure search string to derive the account modification for bank statement. Potential business scenario for this blog post is as follows:
– Your bank is providing the information about bank fees with BTC 004, which is assigned to a posting rule (e.g., Z-01).
– There are two types of charges associated with this BTC: operational daily fee (e.g., 1 EUR for each outgoing payment) and monthly fee i.e., fixed amount charged at the end of the month.
– You want to post operational fee to one GL account, but monthly fee to another GL account.
– Monthly fee is provided in bank statement with a fixed text e.g.: “Month Fee”. Screenshot of a sample bank statement is provided below:

2. Customizing of account symbol & posting rule

Posting rule Z-01 for bank charges was defined in transaction OT83 and assigned to external BTC 004. The screenshots below provide the overview of the configuration:

Account symbol BANK_CHARGES has account modification MONTH:

If you can uniquely identify a line in bank statement with monthly charges and fill the value “MONTH” in the field FEBEP-KFMOD during upload of bank statement, the program will retrieve a dedicated GL account for monthly bank charges i.e., 119999.

There are several ways to achieve this. Please refer to my previous post which explains the enhancement approach and explores other alternative options. This blog will explain how the functionality of search string can be used for this purpose.

3. Configuration of search string

Search string was defined in transaction OTPM as follows:

The search string will analyze outgoing payments in bank statement with BTC code “004” and will search for a fixed text “MONTH” in the note to payee. Once this text is found, a fixed value “MONTH” will be updated in the target field FEBEP-KFMOD. Update scenario is EBKFMOD “Account modification”.

See the resulting application log after upload of bank statement for house bank KREAG. As you can see, the GL account for house bank was determined based on the account modification:

4. Conclusions

As I mentioned at the beginning of this post, this is the fourth post in the series on search string. Here are the links to other three blogs:

EBS: configuration of search string, part 1

EBS: configuration of search string, part 2

Search string in EBS, part 3 – bank charges

I hope that you have learn something useful once you reached this sentence. I’m looking forward to your comments and remarks.





Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Rok Jelovcan
      Rok Jelovcan

      Dear Mr. Petrushchak,

      Thank you for all the knowledge you have shared with the community so far. Your blogs are easily understandable and a true joy to read.

      I have managed to solve some recent customer challenges with the newly acquired knowledge.

      Thank you again!



      Author's profile photo Bohdan Petrushchak
      Bohdan Petrushchak
      Blog Post Author

      Hi Rok Jelovcan ,

      Thank you for appreciation ! I'm glad to contribute to the community 🙂



      Author's profile photo Andrea Innocenti
      Andrea Innocenti

      Hello Bohdan,

      Thanks a lot for your "knowledge transfer"

      In my company, we have the following case history.

      MT940 File
      The external transaction (line 86 of the MT490 file) is the same for payment and bank charges. (221 in our case).
      The string (line 20 of the MT940 file) defines whether it is a normal payment or a bank charge.

      However, we must make sure that the same external transaction (221) uses 2 different posting rules.
      - If normal payment posting rule A
      - If bank charge (identified by the string) posting rule B

      I have already identified the keywords for the string but I cannot get 2 different posting rules for the same External Transaction (221)

      Thanks a lot,


      Author's profile photo Bohdan Petrushchak
      Bohdan Petrushchak
      Blog Post Author

      Hi Andrea Innocenti,

      In your case, you do not need to use the account modification approach as it is explained in this post. You need to use conventional search string to replace a posting rule. Please check out my first blog post in the series on search strings (link), it explains how to change of posting rule depending on the fixed text in the line items.

      Hope it will help you !



      Author's profile photo Lisa Yang
      Lisa Yang

      Hi Bohdan

      Thank you for sharing all these knowledge in the community, they are very helpful!

      May I consult you some issues I run into related to search string set up? I am trying to set up a search string to populate Trading partner (BSEG-VBUND BDC field). The search string works for normal external transaction code like 150, C01, somehow doesn't work for unallocated external codes, any ideas why?



      Author's profile photo Bohdan Petrushchak
      Bohdan Petrushchak
      Blog Post Author

      Hi Lisa Yang,

      Yes, I have a plausible explanation for that. Well I did not have it before, because I did not try it, but now I realized that there might be a limitation with regards to processing of search strings for unallocated BTC-codes.

      Search strings are interpreted in FM BSPS_PATTERN_SEARCH. As you can see, when this FM analyzes whether or not a search string should be applied to a line of bank statement (represented by structure C_FEBEP), it checks if the BTC code of the operation (C_FEBEP-VGEXT) is the same as BTC code defined in search string use. Additionally, the program checks if the interpretation mechanisms (C_FEBEP-INTAG) are the same.

      So if these values in search string use and in C_FEBEP differ, the search string will not be triggered. Why they might differ: because when you use UNALLOCATED, you essentially do not know how many different BTC-codes there will be and you do not include them into customizing of the search string use.

      Anyway, the best way to check it, would be by debugging this FM.



      Author's profile photo John Vu
      John Vu

      Hi Bohdan,


      Just want to express my (and I am sure many others who read this) sincerest gratitude for this amazing 4-part series of Search String configuration breakdown. This is absolutely amazing and we are all very grateful for this awesome explanation. I will be sure to ask questions if I come across any.

      Author's profile photo Bohdan Petrushchak
      Bohdan Petrushchak
      Blog Post Author

      Hi John Vu,

      Thank you for a good feedback ! I'm glad that my efforts are appreciated !