Skip to Content
Technical Articles

Search string in EBS, part 3 – bank charges

Hello SAPers!

6 years ago I’ve published two posts on use of search string for bank statement in SAP (you can find them following these links: part 1, part 2). These posts became quite popular, reaching over 65 thousand views in total. So I’ve decided to write another post describing the option of this functionality, which is probably the least used in community. What’s worse, I could not find any proper documentation describing at least the basic scenario for this option.

You can find another post of mine, where I describe the business scenario behind handling of bank charges. This post will explore how search string can be used to determine the amount of bank fees and update this information for a line of bank statement into field FEBEP-SPESK. Once the amount of bank charges will be updated in this field, SAP will be able to post bank charges as a separate line item in accounting document in subledger posting area.

Let’s assume that bank statement MT940 line item looks as follows:

The purpose of the search string would be to find the amount of 10.00 and save it as fees amount.

Go to transaction code OTPM and define search string as follows – CHARGES #+.##. This entry means that SAP will look for any number that is proceed by fixed word “charges” and has two decimals.

Define search string use by assigning it to an appropriate combination of company code, house bank and account ID. Make sure to indicate correct external transaction code and the same interpretation mechanism that is used in mapping of external business transaction code to posting rule (i.e. in OT83, under “Assign External Transaction Types to Posting Rules”). Use target field “EBSPESK – Fees in account currency” – this is an update mechanism that will trigger saving of fees amount into FEBEP-SPESK.

Load bank statement and check the result in FEBAN to make sure that bank fee amount is not empty:

Check appropriate value in FEBEP :

Well… that’s basically it – easy and elegant way to extract bank charges information for a bank statement line item. What’s more important it doesn’t require any complicated development efforts. However, end result depends on the quality of bank statement information. If information is presented in a consistent manner, the chances are that this solution will work very well.

Your suggestions and comments are welcome!


Bohdan Petrushchak


You must be Logged on to comment or reply to a post.
  • Thank you! I was surprised – all of a sudden I saw a third blog, where I was used to your part 1 & 2. Nice.

    I’m actually looking for a way to use the incoming amount without any information in the note to payee to post it in a certain way. All the amounts of 10 and 20 which come in have to be posted in a certain way. There is no other way of identifying them (notes to payee are all the same, as well for the other amounts). Is there a way to use the amount as a source field for a search string? Again thanks for your blogs!

    Regards, Alexis

    • Hi Alexis Otto,


      Thanks for your interest in my blogs. I actually think that I might prepare another post about search strings, but so far I’m not sure I have enough material:)

      With regards to your question – you can use only information that is part of note to payee i.e. information stored in table FEBRE and linked to specific item of bank statement. If payment amount is available in this table, you can use it. Otherwise, it is not possible – at least to my knowledge.


      Regards, Bohdan

  • Hi Bohdan Petrushchak,

    Thank you for the nice article.

    We have a similar kind of requirement for Treasury deals for forward products where we exchange (buy and sell) currencies

    Actual FX Deal Amount is 10453500.10

    The total amount in the Bank statement including Bank charges  (4 euros) is 10453504.10

    after we process the FX Confirmation (MT300) directly the bank will pay in our account and in the bank statement, we receive an additional bank charge 4 euros with the total amount.

    In this scenario how can we handle bank charges and auto-clear the bank statements?

    how search string can be used to determine the amount of bank fees and update this information for a line of bank statement into field FEBEP-SPESK? Once the amount of bank charges will be updated in this field?

    is it possible SAP will be able to post bank charges as a separate line item in the accounting document in the sub-ledger posting area?

    Could you please help us in this scenario how can we approach.



  • Hi Bohdan,

    Thanks for this wonderful documents. All 3 parts I have read and these are really informative.

    Currently I am working on a project where they will use CAMT.053.001.02 format (xml) for EBS. So this search string functionality will work for this format?

    My scenario is, we want to post the customer receipt entry in Customer Line item. Our Bank will provide us the SAP Customer Code in Payment Reference Field (CdtrRefInf > Ref). Therefore I tried to pick the customer code via Search String but its not working for me.

    Could you please suggest how to configure the same.

    Thanks in advance.



    • Hi Subrata,

      I’m not sure if search string will work for XML-based bank statement, because as a matter of fact, I never tried search string for this purpose. But you can check yourself if it works. But bear in mind, that search string works based on the data of note to payee i.e. entries that you see for bank statement line in table FEBRE. If you not able to see payment reference field (i.e. CdtrRefInf > Ref) in this table, than it’s not possible to use search string.


      But you can do it via enhancement. Check out the following suggestions:



  • Hi


    BTC 491 posting Key KR01— we using bank clearing GL account based on document search

    same BTC 491 can we use to clear payment amounts based on search string with different posting rule.