Skip to Content
Technical Articles

EBS: configuration of search string, part 2

Hello SAPers!

Here is the second document on configuration of search string functionality. The first document can be found under this link EBS: configuration of search string, part 1. In this document, I’ll try to explain how we can use the search string functionality to override the default account assignment of cost elements.

When you post bank commission or other similar expenses via automatic bank statement, you might want to change the automatic account assignment for these expenses depending on some conditions. For instance, if you’re configuring the EBS for several house banks you might want to post bank expenses using one cost element but different cost centers for different house banks. This requirement might be useful for the tracking of bank expenses of different house banks. Search string for EBS provides a nice functionality that enables you to meet this requirement.

Let’s first discuss the possibilities of default account assignment for bank related expenses. The first option is to specify the default assignment directly in master record of cost element in transaction KA01. As you can see on the picture below, cost center 500 is specified as default cost center for cost element 479000 (“Bank charge costs”).


Another option to configure the default account assignment is to use the transaction OKB9 e.g. as you can see from the picture below cost center 200 is assigned to the same cost element. The settings in the transaction OKB9 override those in the master record of cost elements.


If you configure the settings for several company codes, you can assign different cost centers to the same cost element depending on the company code. You cannot assign several cost centers for the same cost element in this transaction. However, you can configure the functionality of search string for EBS that will override both settings.

Suppose you would like to specify cost center 400 for one of your company codes as default cost centers for bank expenses. Suppose also that there is a fixed text “COMMISSION” (or some other text) in the text of note to payee that can be used for configuration of search string. In order to meet the requirement stated above you have to do the following configuration of search string.

2) String definition.jpg

Afterwards, you have to configure the use of search string on the respective tab.

2) Search string use.png

The combination of company code, house bank and account ID for which this search string will be applicable was specified. Afterwards 004 was specified as external transaction code and + as transaction sign. There was no interpretation algorithm assigned to posting rule associated with bank charges, therefore the respective column was left blank. Afterwards search string name was specified in the respective column and “Cost Center” was chosen in the Target field column. Check box “Active” was activated. The columns Mapping prefix and Partner ID were left blank.

Thus, the logic behind this search string functionality is as follows: when search string finds the fixed text “COMMISSION” in the text of note to payee, it triggers the posting rule assigned to the business transaction code 004 and uses cost center 400 instead of cost centers defined as default in the master record of cost element or in the transaction OKB9 (screenshot of the financial document that was posted using this configuration can be found below).


You can find an example of bank statement that was used for the configuration of this functionality below.

Bank statement.jpg

The same logic can be configured for overriding the default assignment of business areas and profit centers.

     I hope this post will be useful for some of you. All suggestions are welcome.

Best regards,

The Wirtschaftsmann

P.S. You can find two more documents on this topic under the following links:

You must be Logged on to comment or reply to a post.
  • Hello Wirtschaftsmann,

    A very useful document. Thanks for sharing.

    Could you please provide an insight as to how the search string would be useful, when the document number, or reference number to be pulled out from tag 86, contains characters like, '-' , '_'   ?



    • Hello, Swastik!

      Thank you for feedback. You can configure search string to look for document numbers insinde of note to payee text. In order to define the text of search string taking into account the conditions you specified above, you can use the following examples ###-#### or ####_####, where # represents any natural number (0-9). If there is a letter in the document number, for example A-000134, you can configure more precise search strings e.g. A-######.

      As a matter of fact, use of document numbers retrieved from note to payee is a bit difficult. If everything will be ok, I will try to prepare another document on search string functionality and post it in near future.

      Best regards,

      The Wirtschaftsmann

  • Thanks for the article.  In your experience is there a way to ignore trailing zeroes in a piece of text?

    I have a situation where the note to payee contains a customer reference number which is always preceded by the text EI/ but contains trailing 0's after the text.


    I want to pick up the text DIAMOND HOMEWARE but ignore the 00000000000.  The text is a customer payment reference so is variable length.  I have created a search string looking for EI/??????????????????????????? which picks up all 30 characters, but I would like to only pick up the text but ignore the 0's.



  • Hello Bohdan,

    Thanks for great explanation.
    I'm actually working for an SWIFTMT940 implementation and facing an issue with virtual accounts.
    Bank is sending us a virtual customer IBAN on tag :86: -> after INFO/PT#####

    So we need to match this with virtual account on customer's master data.
    I defined the following search string but is not finding the customer number:

    The first 12 positions are fixed + bank account + check digit of customer's. And the string use:

    Do you know what could be wrong?

    Thank you

    Best regards,
    Joao Pereira


    Hello Bohdan,

    We have read yours explanations in "EBS: configuration of search string 1 and 2" which are very useful, in particular for EBS in Russia. Now we are facing the EBS files comming from the Deutche Bank, even we apparently understood your explanations, we can not find a key word in order to determine the document number or reference number of the documents. Have you got any experience with EBS files from the Deutche Bank, check the example below, perhaps you can give us some additional explanations. Thanks a lot in advance. Regards.
    M. Sepulveda


    :86:051?00CLEARING IN?106IC0?200007200199942 Îïëàòà ïî ñ÷.?21¹ 254535
    5 ÂÊËÞ×Àß ÍÄÑ 468.6?224, DOC-REF: 11.09.2017, CHR?23G:BEN?30BIK04
    4525202?3140702810900700299015?32INN7101006354 ÏÐÎÊÒÅÐ ÝÍÄ Ã?33ÝÌ
    :86:051?00CLEARING IN?106IC0?20Îïëàòà ïî ñ÷åòó ¹ 2650497 î?21ò 06.09.
    2017 çà ðàñõîäíûå ì?22àòåðèàëû.  òîì ÷èñëå ÍÄÑ 1?238.00 . - 522.
    00, DOC-REF: 1?241.09.2017, CHRG:BEN?30BIK044525700?3140702810800
    001425223?32INN5031042730 ÇÀÎ ÝËÜÔ ÔÈËË?33ÈÍÃ
    :86:051?00CLEARING IN?106IC0?20Îïëàòà çà ðåìîíò ïðèíòåðà ï?21î ñ÷åòó
    ¹2629277 îò 11.08.2?22017 Ïî äîã.1422 îò 01.06.17?23 Â ò.÷. ÍÄÑ(1
    8.) 1680-48, D?24OC-REF: 11.09.2017, CHRG:BE?25N?30BIK044525225?3
    140702810838120002021?32INN7722743350 ÎÎÎ .Çàâîä Ìî?33ñêàáåëü.
    :86:051?00CLEARING IN?106IC0?20Ïðåäîïëàòà 50. ïî ñ÷åòó ¹26?2145704 îò
    31.08.2017 çà ëåíòó?22 Â ò.÷. ÍÄÑ  (1 8.) 4367-70?23, DOC-REF: 11
    .09.2017, CHRG?24:BEN?30BIK044525225?3130302810000006001300?32INN
    7017286512 ÎÎÎ.ÊÄÂ Âîðîí?33åæ. ð/ñ 4070281001300007397


  • Hello Bohdan,

    Your articles are very good and were usefull many time.

    I have quite not common issue with search string and I am sure field Mapping prefix can help but I do not know how to.

    Situation is following:
    1. We have document that has line item on OI GL account with assignment (ZUONR) i.e. 123456789
    2. We receive from bank EBS with payment and with information where Note to payee contains i.e. 3456789 X:0987564321 (that is whole of Note to payee) - as you can see information from bank contains only last 7 characters of assignment field's value.
    3. Now we need to to find item from point 1 and clear with payment from point 2.

    I use interpretation algorithm 15 (posting rule is derived properly using also external transaction) and all works if ZUONR contains 3456789. BUt I cannot force system to find just last digits (maybe we shall say characters) of assignment field and clear the item.

    I'll be greatful for help as it is first time I face such problem.

    Of course we could write interpretation algorithm but I think we could use Mapping prefix to add two missing characters and look for proper assignemnt. But it does not work. I put 120000000 in Mapping prefix where hit was ####### and it did not work.