Symptom
When entering a tax number into the Tax Code field, you receive different error messages depending on the number of digits you are entering:
"Do not enter more than 20 characters"
"Entry in field Tax Code is longer than 16 Characters"
"Entry in field Tax Code is longer than 12 Characters"
Environment
SAP Cloud for Customer
Reproducing the Issue
- Go to the Customer workcenter.
- Go to the Accounts view.
- Open any Account.
- Go to the Tax Numbers facet.
- Click Add and enter:
- a) a number longer than 20 digits -> an error message is displayed: "Do not enter more than 20 characters"
- b) a number longer than 16 digits -> an error message is displayed: "Entry in field Tax Code 1 is longer than 16 characters"
- c) a number longer than 12 digits -> an error message is displayed: "Entry in field Tax Code 1 is longer than 12 characters" (for example for Account country = Russia)
Cause
Case a: When tax number length > 20 characters: In this case, the error message is raised based on the field properties, saying entry is longer than 20 characters.
Case b: When tax number length > 16 characters: In this case, the tax number is transferred to a field having length 16 characters in the backend only, which means it is truncated during the check of the tax number length. So, the programme checks for the length > 16 and accordingly throws an error that the tax number length is greater than 16 characters. This happens because this check appears first in the sequence of steps execution (compared to the check for 12 characters length, which appears later, as we see below in case c).
Case c: When tax number length > 12 characters: In this case, the check happens against the table field for the tax number length for the respective country of the account, which in our example is Russia; 12 is the defined permissible limit for the length of a tax number in Russia. This check happens later in the sequence of steps execution (compared to the check for 16 characters length as explained in case b above).
Keywords
tax number, tax code, length , KBA , LOD-CRM-ACC , Account , Problem