SAP Knowledge Base Article - Public

2676825 - Error in Territory Rules Activation: 'Invalid Range Parameters Defined for 'Is ( Not ) Between' Comparison'

Symptom

You maintained Territory Rules and want to activate them but receive the error 'Invalid range parameters defined for 'Is (Not) Between' comparison'.

Environment

SAP Hybris Cloud For Customer

Reproducing the Issue

Prerequisite: Maintain Territory Rules which contain alpha-numeric values for Postal codes for which you are using the Is Between operator.

  1. Go to the Sales workcenter.
  2. Go to the Realignment Runs view.
  • OR: Go to the Administration work centre.
  • Go to the Sales and Campaign settings view.
  1. Click Maintain Territory Rules.
  2. Click Actions > Activate Rules.

Cause

This error occurs when using the Is Between operator for postcodes, and the Low and High values calculated by the system don't fall in-between the parameters.

This happens for example when the same value is start and end point. E.g.: 12345 Is Between and 12345 (12345 represents the postal code value entered). Since 12345 is the same as 12345, there is no between value, hence the rule fails.

Further, postal code is alpha-numeric and the comparisons work with respect to ASCII (American Standard Code for Information Interchange) values. It is not possible to implement a comparison for alpha-numeric columns.
Since they are alpha-numeric, when we give a range A9*..A19* (example alpha numeric values), the system calculates ASCII comparison and hence it feels A9 > A19 and raises the error message that it is an invalid range.
If you look at this example, it would be difficult for the system to realize the difference between A9*..A19* and A90*..A19* because of it being alpha-numeric and can also have varied length and it can only continue with an ASCII comparison.

The system will see this range as A90 > A19.

Therefore, for technical reasons, for alpha-numeric columns you will have to make sure the in-between ranges you enter cover the length as needed. 

This is the same for all alpha-numeric columns irrespective of the application such as Lead, Opportunity or Territory.

Resolution

Please remove the Is Between operator for the postcode if the postcode is not a range but has a single code value.

For ranges with alpha-numeric characters, separate where necessary.

For example, create two rules:

Rule 1: [A9];

Rule 2: [A10 .. A19].

Here, A9 stands by itself and A10 has the same length of alpha-numeric characters as A19.

Keywords

territory rules, postcode, postal code, is between, alpha-numeric , KBA , LOD-CRM-TM , Territory Management , LOD-CRM-BRF , C4C BRF Configuration , Problem

Product

SAP Cloud for Customer add-ins all versions ; SAP Cloud for Customer core applications all versions