Search string in EBS, part 3 – bank charges
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!
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!
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.
Ok, too bad, but thank you for your quick reply!
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.
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.
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:
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.
what about the default cost center for bank charges postings? should be defined in OKB9?
Hi Ewelina Czekaj,
Yes, you're right - standard OKB9 settings should be used for this purpose.
Thank you! 🙂
Hi Bohdan Petrushchak,
I have another problem. For outgoing payments the bank charges 2900 fee. For example, 10,000 is paid with F110, in the bank statement comes the amount incl. the fee of 2900, e.g.
:86:/PT/FT/PY/ADVANCED TELKOM USAGE/JAKARTA/Charge/IDR2900,
Using the search pattern, I can write the 2900 in the field SPESK. But since I only post in posting area 1, I want to post the expenses in a 3rd line:
Dr. incoming 10.000
Dr. Fees 2.900
Cr. Bank 12.900
How can this done with search pattern?
Hi Michael Heine,
Please check the first blog on the topic of bank charges (link). It describes a posting rule with two areas for incoming payment. But you can do it with one posting area if you remove clearing entry to account type "BANK_IN". I imagine that the same should be true for outgoing payments - just configure regular posting rule for outgoing payments, configure GL account for bank charges and fill the amount of bank charges. It should work.
Thanks Bohdan Petrushchak for the quick response.
Unfortunately, the solution you mentioned doesn't work, as in my example I don't have a sub ledger posting. The vendor invoice was clreared in F110. Therefore I need to do the fee posting in a 3rd line in posting area 1.
I have a similar issue. I was able to handle bank charges for outgoing payments using search string as described in this blog - many thanks to Bohdan Petrushchak !
As a result I'm able to clear the ''BANK_OUT'' (type 4) and post the bank charges in a separate line item, all in one single posting area 1 - Perfect !
However, if clearing fails we would like to post 'on account' (BSCAK) so that it is correctly posted, but not cleared - however this is not working due to the balance not being = 0.
Here are the postings:
Dt Vendor 100
Cr BANK_OUT 100
Dt Bank Costs 5
Dt BANK_OUT 105
Cr MAIN BANK 105
Correct posting would be:
Dt Bank Costs 5
Dt BANK_OUT 100
Cr MAIN BANK 105
Any clue how to achieve this ?
Thanks to you for this valuable inputs. Is there a way we can handle defaulting a transaction type for a G/L account just like how we handle cost centers? We have a requirement to default certain value in the field 'TTYP' when posting to a G/L. Thanks
Thank you, it's realy great support, I like it, it's nice article.
Bohdan PetrushchakBohdan Petrushchak
It is good article to me and know the functionary ,but i'd like to know how to define mapping rule,
so it is good if have the user manual for the customizing and user manual
Just one question: if I receive bank charges either with 1 decimal or 2 decimals as follow:
I have the current formula:
But if I receive a fee of 9,41, no map is detected.
If i changed my formula as follow:
It works with 9.41 but no map if I have 9.4
Do you have an idea on how to proceed this specific case ?
Many thanks for your feedback beforehand,
Hi Philippe Dubuisson,
Could you please to maintain search string as follows: CHGS/???#+,##|CHGS/???#+,# ? Symbol "|" means condition "OR" i.e. the program will try to search the amount of charges using both definitions.
Unfortunately, none are detected: 9,4 nor 9,42
I also tried to split these 2 possibilities into 2 different definitions:
But the system takes only the first into consideration and not the 2nd (with 2 decimals)...
Hi Philippe Dubuisson,
Yes, I tried to do that in the system as well, but got no results. The problem is that to capture this number dynamically i.e. with one or two decimal points, we will need to use regular expressions. These can be easily defined in ABAP, but are not supported via search string i.e. FM BSPS_PATTERN_SEARCH which is handling the search strings does not rely on regular expressions.
I'll check additionally if I can fine any other solution.
Thanks a lot Bodhan for your assistance.
But it is actually very strange that 2 search string definitions are not working.
I was thinking that if the first is not met, the system should try to match the second...but it seems not.
I have found out the solution which was in front of me and I did not see the evidence.
Here is the MT940 field 86 with bank charges:
I had just to mention the second "/" which ends this string in the formula itself as follow:
and now, it works perfectly.
Sorry for this but I wanted you to know the final solution. Thanks again for your help.
Do you have similar blogs for configurig ACH/Wire returns? That would be great help.
I was able to post one entry to reverse the bank amount. But I am struggling with reversing the clearing document and set the item as OPEN item for Vendors.
Hi Sudhakar Mallampalli,
No, I do not have experience with ACH/Wire return and I cannot share anything useful on this question. But that means that there is a room for improvement: if you will solve your issue, maybe you can also prepare a post and describe your experience.
With regards to reset of the clearing document: you need to play with the reversal reason & posting type in the settings of the posting rule for return payment. You can check my recent post, where I describe the procedure for return of direct debits. There is a similar requirement and I described the settings of my posting rules.
in my case, using a CAMT file, the bank fees information is on this tag. This is not copied to FEBRE, so cannot use in the search string. Any suggestions on how to get it included in FEBRE
<AddtlTxInf>Beräknade avgifter: SEK 1,85
Hi Tim Bown,
Yes, it looks like a typical problem. I've already received a couple of requests / questions of the same nature. So if I'll have some free time soon, maybe I'll publish a blog post on the topic.
In the meantime, you'll need to experiment with the XSLT-transformations for XML-based bank statements. You can check-out my previous post that explains the topic in more depth.