SAP Knowledge Base Article - Public

2345108 - How to - Creating a Business Rule to Calculate Age


You wish to calculate the age of an employee and maintain this information in the biographical information Portlet

"Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental."

Outcome Bio Info.PNG


Employee Central - Biographical Information


There are two different ways in which the age of your employees can be displayed.

They are YY/MM/DD or the value in years (Rounded Down).

  • In order to use the YY/MM/DD format you must ensure the age field is a custom string field.
  • In order to use the value in years (rounded down) you must ensure the age field is a custom double (Numeric) field.


To Create the rule:

Go to Admin Centre> Configure Business Rules

Create a Basic Rule with Base component Biographical information, and use either one of the SET conditions in the below example (not both) -:

  • For YY/MM/DD create a rule using the "Convert to YY/MM/DD" function
  • For the age value (rounded down) use the "Difference in Years Round Down" function

AGE 2 version.png

Set the Rule as onView on the Biographical Information element - either via xml or the Manage Business Configuration tool.

Manage Bsuienss Config.jpg


NOTE: onView, Calculated fields are transient fields and so no data is saved to the system. The Values will dynamically calculate each time that you visit the users Biographical Information. You will not be able to report on the value, so long as the rule is set to trigger onView.

See Also

2364155 - Age field not displaying values in Advanced Reporting

2577292 - How to calculate age on a specific event date in Online Report Designer?


Business Rules, Calculating Age, Calculate Age, Age Field, age , KBA , LOD-SF-EC-PER-BIO , Biographical Info - Config, Rules, RBP, UI , LOD-SF-EC , Employee Central , How To


SAP SuccessFactors HXM Suite all versions