
In my previous blog, you saw that introduction of Decision table in SAP HANA, is a begining of new radical approach to model decision table in database layer and consume in application based on the database. With this foundation, let us start from scratch as I will guide you how to create decision table with simple and easy steps.
Create Decision Table
Figure 9.1 : Create package from context menu
Figure 9.2 : Create decision table from context menu
Figure 9.3 : Create Parameters using context menu in Output panel
Figure 9.4 : Dialog to create new Parameter
Model Decision Table
Figure 9.5 : Adding Parameter as Condition of decision table using context menu
Figure 9.6 : Adding Parameter as Action of decision table using context menu
Figure 9.7 : Decision table overview with Parameters added as Condition and Action
Figure 9.8 : Decision table populated with data
Validate and Activate Decision Table
Figure 9.9 : Validate button to perform validate operation on decision table
Figure 9.10 : Activate button to perform activate decision table for consumption
Hint: Check Job Log view are success or failure of Validate and Activate operations
Figure 9.11 : Job Log view showing succesful execution of validate and activate action
Figure 9.12 : Decision table procedure generated after activation
Consume Decision Table
Figute 9.13 : Decision table procedure definition
call "_SYS_BIC"."simple-decisiontable/SIMPLE" (40, 300000, ?)
[ Note that 40 is entered as IN parameter value for QUANTITY, similarly 300000 is entered as IN parameter value for ORDER_AMOUNT, ? in entered for OUT parameter ]
Figure 9.14: Exeucte button in SQL Editor
Figure 9.15 : Result view after execution of decision table procedure
Analyse Decision Table Execution
Here you see how the evaluation of the decision table happened for input value of QUANTITY and ORDER_AMOUNT to return the value of DISCOUNT as 10
Figure 9.16: Decision table exeuction trace
Having seen how to model decision table and consume the results in your application, you can start using this new capability of business rules management in SAP HANA and let us know of your use cases where we can support you. Me and my team would be happy to help you !
Other Related Blogs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
15 | |
14 | |
13 | |
10 | |
9 | |
9 | |
8 | |
7 | |
7 | |
7 |