Skip to Content

Avoiding missing ranges error while creating Decision Table

This document is prepared based on SAP HANA Version SPS05 Revision 47.

While creating the decision table we will specify Conditions and Actions.

If the conditions on an attribute are not specified in proper order then while validating, we get error.

In one of my previous documents I showed how to create decision table  and used conditions in an order such that while validating it should not throw any error. I would like to request you to go through my previous document, if you had not seen before. Click here

In Step 9 of that document, there is a screenshot with number 5 enclosed in a circle, where the condition on attribute (SAL) is in proper order and the same screenshot is pasted below.

                   CondActions in Order.JPG

Now let us change the second condition to SAL > 9001 as shown below and validate the decision table. Below is the result of validation


The error is due to missing range found in second condition of SAL attribute.

What missing here is there is no condition for SAL = 9001 in the above two conditions.

While modeling for a requirement there is a chance that there will be no business rules for some of the scenarios and hence we can avoid those while creating decision table.

Actually while validating, in the background there are many validation rules which goes through and we can find those validation rules by navigating through Windows -> Preferences -> Expand Modeler -> Click Validation Rules.     ValRules.JPG 

We will observe that under Decision Table section, “Decision Table Check Consistency Rule” is checked. To avoid the validation error on missing range, uncheck this validation rule and click ok.

Now again validate our decision table and this time, status will be Completed Successfully.

Its just a small trick

Thank You.

You must be Logged on to comment or reply to a post.
  • But in this case, what happens in case you do have SAL = 9001 in your record?

    Does the proc throw an error, or it just reads null?

    Maybe forcing TOTAL_SAL to be '0' for these ranges would be the best compromise...

    Also isn't there an "ELSE" or "DEFAULT" condition you could force on SAL?

    • Hi Henrique,

      Thats a good question. Here is the partial proc

      CASE WHEN "SAL" <= 9000   THEN SAL+(COMM*1.5)

                WHEN "SAL" > 9001     THEN SAL+COMM

      ELSE 0


      If there is no record with SAL = 9001, it does not throw any error and as I used the parameter as action (table will not be used for update), it will create a Return value in _sys_bic and there will be no update to record as it does not exist.

      If the record exists, it will place default value (0 in this case) for TOTAL_SAL due to ELSE condition of 0.



      • Hi Raj,

        great, thanks for the reply.

        So, that "ELSE 0" was added manually by you or was it automatically added by HANA?

        If so, I don't see why it should block the activation at all; it could just be a warning.

        • Hi Enrique,

          The ELSE part was added automatically.

          The reason for blocking is simple. It just goes through the validation rules as defined in preferences. Thats why we are removing that validation check 🙂

          Its better if SAP makes that validation check optional, instead of mandatory.



  • Hi Raj,

    This is a very valid scenario and a solution to it but it should be noted that this is a global setting.

    But, there could be a scenario when a few decision tables (DT) need to have such validations and few others need not. In such a case, the solution proposed will 'always' skip the missing range check, which in turn doesn't help those decision table which needs the check.

    In those cases, the better way is to activate the DT, which doesnt need the missing range validation, by right clicking on the DT in 'Navigator' panel. In the activation pop-up, choose 'Bypass Validation'.



    (Developer, Decision Table on HANA)

    • Hi Sesh,

      I guess in the future releases SAP might come with better options with missing range error in Decision table, if someone might take initiative.