SAP Knowledge Base Article - Public

2084142 - Manage Data - Calculations - Using toNumber Function to Prevent N/A Result - Compensation

Symptom

  • You have a field which uses a lookup table value. In this example we are using "Parking Allowance".
  • This field is also used within a calculation of another field. In this example we are using "Say Extra Parking Allowance".
  • The correct data is populating within field "Parking Allowance field" however "Extra Parking allowance" is showing N/A.

          example formula.jpg

          N A Values in Worksheet.jpg

Per the above configuration if “Parking Allowance” is <2000 then “Extra Parking Allowance” should this should return 10% of Parking Allowance, however we instead see N/A.

 

**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 HXM Suite
  • SAP SuccessFactors Compensation

Resolution

  • Please remember the return type of Lookup tables are ALWAYS string values. 
  • So if you have any field which is using lookup table (Parking allowance in this example) and the field ia used in calculation of other fields, then you would need to wrap the lookup table entry with toNumber.
  • For example if the current formula is lookup('parkingAllowance',jobLevel,1) so we need to add toNumber at the start which would become toNumber(lookup('parkingAllowance',jobLevel,1)).

Please see the following example where we changed the formula on the lookup table.

Before formula change:

        before lookup change.jpg

After formula change:

        after formula change.jpg

Please also note to check the lookup table(s) and make sure you do not have any spaces before/after enteries as this can cause N/A to populate within worksheets while calculating.

Keywords

lookup tables, custom forumlas, compensation lookup, N/A values, CompaRatio, Range Penetration, Compa , KBA , sf compensation calculations , LOD-SF-CMP , Compensation Management , LOD-SF-VRP , Variable Pay Programs , How To

Product

SAP SuccessFactors Compensation all versions ; SAP SuccessFactors HCM Core all versions