SAP ISH - medical center, hospital

SAP ISH F.13 (Automatic Clearing) on Steroids

OrganizationHadassah Medical Center


Sector – Health Care




SAP transaction code F.13 (Automatic Clearing without Currency) only allows document cleaning according to predefined standard variables. However, the hospital needed to clear FI documents based on matching multiple parameters from different SAP entities (some of them from the logistics world). 


Using InsightZAP, the hospital built a new Creation based on FBL5N that was enhanced with the needed content from other SAP entities. Using Formula Functions, multiple variables were compared. A new Checkbox Column- For Clearing– was introduced. The checkbox For Clearing was set whenever any of the variables of a specific FI doc returned a match. A new Toolbar Function (button), Clear Documents, was developed and added to the Creation. This button gets a list of FI documents, groups them by Company Code, Year, and Assignment, then sends them, group by group, for F.13 automatic clearing.


The entire process was automated, and now it periodically calls the above InsightZAP Creation with a display layout that filters only the records For Clearing and pressing the Clear Documents button.




Hadassah Medical Center is one of the biggest medical centers in Israel, treating approx. 1,000,000 patients every year. The hospital gets its payments from various local and foreign insurance companies and private patients (mostly tourists). 



The hospital went live with S/4 in 2019, and they are using SAP ISH (SAP Industrial Solution for Health).



The Problem


The ISH personnel asked the SAP finance department to ease the FI document-clearing process, which was very complicated and time-consuming. The information needed to clear documents is added throughout medical care and resides in a plethora of entities from ISH, Logistics, and Finance. The indicators for clearing were keyed in different places depending on the type of patient, the type of medical care, and the specific medical institute the procedure is taking place in. Some examples could be patients that don’t have the financial approval from their medical insurance company or a mass casualty incident, where the hospital is taking care of people without medical insurance altogether. Let alone medical tourism, which is handled (financially-wise), from start to end, in a very unique way.  


Moreover, in many cases, due to business rules, the reference FI document numbers were padded with various suffix digits to indicate a specific process, leaving these documents dangled off the promised land of SAP automatic clearing.


The hospital could not use the standard F.13 TCode since it uses predefined standard fields such as Company code, Fiscal year, and Assignment (SAP field ZUONR). However, as explained, the clearing process in the hospital is based on many input indicators that are keyed in many SAP entities with different variations throughout the medical case lifecycle. 


All in all, the process of FI documents clearing costs the hospital dearly. It starts with a very long training process for the FI clerks, it goes through a waste of time and money on a lengthy and inefficient clearing process, and it ends with way too many errors that force the hospital to spend more time and money.


The Solution


The solution is based on a pre-analysis of the uncleared documents. Using a highly dynamic and flexible mechanism, documents with business common denominators are grouped based on the various business rules. In case a match is found, the group of Good For Clearing documents is sent- together- into SAP automatic clearing process. 

The baseline – The InsightZAP Creation derives its initial data from the standard SAP report FBL5N (Customer Line Items) with the flag “Open item” checked. The yielded list is the superset of those FI customer documents that are not yet cleared.



Then, they started working on sending every recipient the relevant data.

Content enhancement – Using DB lookup, the information from related documents was fetched into the newly created InsightZAP Creation. Using this concept, data from other SAP entities related to the same medical case and the patient is fetched. Some business rules, originally saved in the hospital as Excel files (hence do not exist in SAP), were added to SAP as snapshots- Snapshots which the InsightZAP Creation VlookUp from. All in all, every shred of needed information was brought in- from/outside SAP- to enrich the list of the uncleared (open) FI document list. 

Applying Business Rules – With all the needed data in hand, Formula Function columns could be employed to search for matches. For example, suffixes were stripped off Reference documents, and the reference original number could now be compared with other documents. The details of the ISH data could now be compared with those in the FI documents to look for patterns. 

This part is where the business logic is being applied in the search for sweet-smelling (in contrast to bad smells) signals. It is characterized by the need for easy-to-implement rules (mostly based on string manipulation), which could be enhanced and perfected with time. 

The last business rule needed is the one that collects all the good signs found and evaluates whether the SAP auto-clearing process could be applied. This Checkbox- named For clearing–  is set in case a sufficient set of positive signs were found.

 Setting a Display Variant – Using the standard ALV filter, those records with the flag For Clearing set were filtered. The filter was then saved into a display variant (named /Clear) that shows only records that are ready to be auto-cleared- at least according to the business rules applied. 


Clear Documents – InsightZAP Toolbar Function is manifested as push buttons at the Insight Creation toolbar. Toolbar Function implements a predefined interface, executes ABAP code, and could be added to any Creation. In many cases, Toolbar Functions invoke standard SAP BAPIs (Business API) to manipulate (create/update/delete) SAP entities. Creating new material, blocking a vendor, or updating delivery dates are some examples. 

The Clear Documents Toolbar Function uses the fields: Company code, year, assignment, and doc number as its interface. It gets a list of records, group them by Company code, year, and assignment (several doc numbers in each group) and submits the set to F.13 as if the user did it manually.

Note that the specific list of documents that were sent together to the Auto Clearing Tcode, was not set randomly- It is a result of the pre-analysis implemented in the InsightZAP Creation. 


Automation – An InsightZAP standard utility allows creators to call a specific Creation with a given Display Variant; it then selects all displayed records and presses a specific Toolbar Function. This utility, manifested using SAP Program, could be scheduled periodically in the background. 



  1. Once a day, around midnight, the automation calls the Creation with the display variant /Clear and the Toolbar Function Clear Documents- in the background. 

  2. Upon execution, the creation invokes the relevant records from FBL5N and enriches them with the instructions given by the Creator. It then applies the set of business rules to decide if the records (FI documents) are good candidates for the auto Clear by setting them For clearing Checkbox. Because the Creation is called with the /Clear Display variant, only records with the field For clearing checked are displayed. 

  3. The automation then presses the Clear Documents Button, and all records are sent, group by group, to SAP F.13 automatic clearing. 

In a fully automated process, the majority of the customer FI documents are automatically cleared following the rules defined by the SAP ISH and FI business users and the SAP FI experts. Whenever a new pattern that allows auto clearing is recognized, it is added to the InsightZAP Creation, and the newly added records to For clearing are now part of the Auto Clearing processes.

 In Conclusion


The project was defined as a big success since it stood up to the predefined challenges. The FI team no longer needs the logic behind the process since it’s automatically implemented time and time again without human interference and human mistakes. Time and money are no longer wasted, and no errors backfired from the processes anymore. 

From a business perspective, before implementing the Auto Clearing process, FI clerks spent 100% of their time on 100% of the open FI documents. With the process in place, FI clerks can now spend 100% of their time manually clear only those 10% of the FI documents which could not be automatically cleared and represent real problems. 

From a technical point of view, the only code involved in the process is the code behind the Toolbar Function- roughly 100 lines of code that sort the selected records and submit them, group by group, to the standard SAP program for auto-clearing.

Do you have any questions about InsightZAP? Contact Us if you have any questions or requests.

Why Choose InsightZAP?

  • Unique and Patented Technology: Setting it apart from the rest.
  • Unmatched Flexibility: Achieve your goals within SAP without the need for coding.
  • Unparalleled Time Savings: Transform tasks that once took days or weeks into mere minutes or hours.
  • Stay within SAP: See real-time data while minimizing security risks.
  • Collaboration: sharing and collaborating SAP data with your team or vendors.
  • IDoc Management Reimagined: Embrace a simpler and more innovative approach to IDoc management.
  • SAP Change Logs: Easily track and review all past changes related to business objects.
  • Built-in Fiori App
  • Extensive Support: Benefit from 70 hours of support, including a free 24-hour onboarding course to help you maximize the potential of InsightZAP.

And the list of benefits continues; it’s just challenging to capture all of InsightZAP’s advantages on a single page.

Ready to learn more? Please don’t hesitate to contact us to explore how InsightZAP can transform your SAP experience:

Visit our Contact US page or email us: