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

To report this post you need to login first.


You must be Logged on to comment or reply to a post.

  1. Swastik Ranjan

    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, ‘-‘ , ‘_’   ?



    1. Bohdan Petrushchak Post author

      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

        1. Nikhil Kothari

          Hi Swastik,

          I doubt if you can clear documents which contains ‘-‘ or ‘_’ as for clearing documents using standard algorithms you need to fill the interval of XREF or BELNR in the selection screen of transaction FF_5 and I don’t think we can enter any special characters in those intervals.

          Correct me if you I am wrong.

          Thanks & Regards

          Nikhil Kothari

  2. Philip Davison

    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.



  3. Joao Pereira

    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


Leave a Reply