You defined the manual number ranges for Materials in the fine-tuning phase of the project.
However, when entering some specific material IDs, the system raises an error message of incorrect ID.
Although the ID should be accepted, since it is between the minimum and the maximum value of the range, you are not able to proceed with the desired value.
SAP Cloud for Customer.
SAP Business ByDesign.
Reproducing the Issue
After defining a manual number range for Materials on the fine-tuning activity, Create a new Material following the below steps:
- Access "Product Portfolio" Work center
- Navigate to the Materials view
- Click on "New"
- Enter the ID of the material, and fulfill the needed information of the material
- When trying to save, the error message appears: Material ID XXX not valid. It does not fall within the allowed range ABC - XYZ (XXX represents the Material ID, ABC represents the minimum range number and XYZ represents the maximum range number)
This issue happens because of the comparing method used by the system to fetch the ID entered and number range.
The comparison is made for each character, by converting it to the ASCII table value. After converting the characters of each position, the ID value needs to be greater than the minimum range value and lower than the maximum range value.
What happens is that if one of the IDs to be compared (either the range or the Material ID value) is shorter in length compared to the other, the missing positions of the comparison are replaced with blank spaces. The blank space has ASCII value of 32, being a lower value than any other common characters.
This comparison may cause the input ID to be denied upon validation.
You have a range formatted as below:
From A000 to Z999
Now let’s consider the material ID C23 as the input.
As per the total value analysis, this ID should be valid.
By converting the Material range to ASCII codification, we receive the following code:
From 65 48 48 48 to 90 57 57 57
Now converting the input ID, we receive value 67 50 51
In this case, what will happen to the input is that the system will fulfill the remaining characters it needs to finish comparison with blank spaces, which are value 32 on ASCII. So, we will finish with this scenario:
Maximum range: 90 57 57 57
Input: 67 50 51 32(blank space)
Minimum range: 65 48 48 48
By lining up the input with the range and comparing each character, we can see that this input is not compatible with the range, since the 32 character (which is exactly the automatically fulfilled blank space) is not between the respective range values 48 and 57.
In order to use the Material ranges properly, make sure that both ID inputs and number range have the same length.
If a shorter ID is needed, you can either use "0" characters to balance the length, or analyze whether the desired IDs will be accepted considering the validation process.
material ID, number range, incorrect number range
KBA , SRD-SRM-PRP , Product Portfolio , How To