Since the introduction of decision table in HANA 1.0 SP 05, the object has been enhanced with several features to improve the Decision making process with complex business rules configurations. It has been a best use case for real time data processing with user maintained rules, widely used in the native HANA modeling projects.
In the recent months, SAP delivering all new features mostly in HANA XS advanced, considering that XS classic is going way soon, at that point all the XS classic objects will be migrated to advanced. Therefore, Web IDE for HANA is the modeling and Develop application for XSA objects. In Web IDE, I can’t find an option to create HANA decision table in Database module, So it means that, decision table object is not available any more. I am using HANA 2.0 SP 02.
So what happens to existing decision tables in my project?
If you are not migrating to XS advanced, Decision tables are still supported and can be used for modeling in XS classic HANA 2.0 SP 2. But if you are working on XS Advanced server using web IDE for HANA these objects are not available, however, the concept of decision table is incorporated in HANA Rule Framework (HRF) service.
HANA rules Framework provides simple tools for Business rule configuration, also provides SAPUI5 interface for business users to maintain business rules. the introduction and learning material of HRF can be found in this link, HRF Blogs and Tutorials
So now, If you wanted to build a new business rule in XS advanced, HRF is place to do, SAP help document on how to configure HANA rule framework can be found here XSA HRF
If you are migrating the existing decision tables to XS advanced, then you can use the migration tool provided by SAP. After migration to XSA, decision table can be created as a calculation view or a stored procedure. The details on migration process can be found in SAP help document XSA migration
Notes/challenges on XS classic decision table:
In this section, I also describe few notes on my experience with decision tables in XS classic in which some of them are currently being described as challenges to me, however some of them can be addressed in a better way in HANA rule framework. Before getting to the notes, if you have not seen the blog series on decision table, please take a look at Archana’s Blog Series
- User interface for configuring business rules are not so effective, it still needs a technical developer presence to maintain it.
- If * value (Wild card) is used in a business rule for any condition column, it acts as match any value except NULL. So NULL is considered as NOT part of *, for that you will need to convert the NULL values to blank before using the column as condition in DT.
- Order of the Columns/Conditions is very important in deriving the business rule value, the higher level characteristic should be in the first place and then lower levels to the right. So that CASE statement in Procedure will work to meet the business rules.
- The order of the business rules also important in deriving the rule value, * should be always a last value to that characteristic, in case if it is in the first rule, the rest of the rules coming next will be ignored because it is a match found with *.
- While deriving a new column in the decision table, formula being used in that, must be created only from the available columns and operators. Any custom formula copy pasted will not work and result as constant text.
- While configuring the decision table, the modeling options are very limited. I mean, filtering the data, joining etc can’t be done in this object configuration.
- Using Native HANA transport, you can’t import the decision table and it’s dependent objects together. It requires, dependencies to be preexist in the target system.
Summary: Concluding that HANA Decision table has been consolidated into HANA rules framework, it is the future direction going forward. Looks like some point in time, there will be a consolidation of HRF and BRF+ together into one framework in HANA to support business rules processing in real time.