SAP Knowledge Base Article - Public

2802699 - Incorrect Data type of custom field in Calculated Column

Symptom

Weight field (type 'number') of 'Goal Management Domain' is displayed under 'Text' type when creating a Calculated column in Live Data reporting.

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

Reproducing the Issue

  1. Create a new Report-Canvas
  2. Add List Report Component > Edit Query > Detailed Reporting > New
  3. Under Live Data > Fetch the Weight Field
  4. Try creating a Calculated Column by clicking Edit > Calculated Columns
  5. You will find 'Weight' under Text type but NOT Number type

Cause

Weight Field is a Custom field defined in the Goal Template. The fields with reportable attribute defined in template are all custom fields.

Custom fields can be of type text, number and so on. So the DB columns for these custom fields are pre-defined as "string" type. This is because we cannot predict the data type of custom fields.

Hence custom fields will be visible under Text type irrespective of their data type in the template.

Resolution

Only Standard Fields will be displayed under their respective data type.

As you see this is a custom field:

TemplateConfig.png

AdHoc report displays the right data type:

AdHocView.png

However, in Detailed Reporting Calculated Column, the field is displayed under Text type:

CalcColumn.png

Workaround: Design an If-else loop to convert String to number. You may even build a nested-if-loop to convert multiple values.

Logic:

If (String (Weight) == Text(10) ){

Then{

StrToNum = Number(10)

}

}else {

StrToNum = Number(0)

}

Design:

Workaround.png

Keywords

weight, goal, management, report, text, number, conversion, string, field, showing, wrong, data, type, ORD, format, canvas , KBA , LOD-SF-ANA-ORD , Online Report Designer , LOD-SF-ANA , Analytics & Reporting (Ad Hoc, ORD) , Problem

Product

SAP SuccessFactors HCM Suite all versions