Symptom
Sorting is not working for "User ID/Employee ID" field in Reporting i.e., for the fields where data type is stored as "String/Varchar"
"Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental."
Environment
- SAP SuccessFactors HCM Suite
- Analytics & Reporting (Ad Hoc, YouCalc, ORD)
Reproducing the Issue
- Login to SuccessFactors
- Create a new/run an existing report which includes "User ID/Employee ID" field.
- Apply "Sort" functionality to the field "User ID/Employee ID"
- Observe that the Sort is not as expected i.e., it is not sorting in Ascending or Descending order.
Below is an example for sorting in Ascending order.
Cause
For the fields where the data has integer/number value and is stored as data type "String/Varchar" in database, the application will perform the string sort, the length is not taken into consideration.
Resolution
It is an expected behavior as per the system functionality for the fields where the data has integer/number value and is stored as data type "String/Varchar" in database,the application will perform the string sort and sorting would not work as expected for these fields.
When comparing strings, the first character of each string will be compared. If it is the same character, it will continue to the next character. Once a difference is found, it will sort based on the particular value and the length is not taken into consideration and hence the output seen is an expected behavior.
However, please note that the sorting would work for data type field as "Number".
Keywords
Sort, Employee ID, Unable to sort, Number, String, Varchar, data type, string sort , KBA , LOD-SF-ANA , Analytics & Reporting (Ad Hoc, YouCalc, ORD) , LOD-SF-ANA-SAC , Stories in People Analytics , LOD-SF-ANA-ADH , Adhoc Reports & Report Builder , LOD-SF-ANA-ADV , Advanced Reporting (ODS) , Problem
Product
Attachments
Pasted image.png |