Symptom
You wish to calculate a Service Length Using a Custom Field and maintain this information in the Employment Detail 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.
Environment
Employee Central - Business Rules
SAP SuccessFactors HCM Suite
Resolution
This kind of calculation is possible with Employee Central, on instances without Employee Central such calculation will not be possible.
Step 1:
- Go to Manage Business Configuration
- Click on employmentInfo
- Select Custom-double
- Save
As seen below
Step 2: Grant a Permission
- Open the Permission Role for user whom you like to grant access to all jobs.
- Click on Permission
- Under Employee Data: Grant Permission
- Click on Save Changes.
Step 3:
- Create Rule - View in Edit Mode
View Rule
Step: Add Rule to Manage Business configuration or BCUI
- Go to Manage Business Configuration
- Click on employmentInfo
- Select above rule
- Save
View Code in Succession Data Model XML
<hris-element id="employmentInfo">
<label>Employment Details</label>
<label xml:lang="en-US">Employment Details</label>
<trigger-rule event="onView" rule="Calculate_length_in_Service"/>
Example:
- Hire date: 24/05/2013
- Length of service Today:19/03/2018
PS: Do not use model rules, please use employmentInfo (Employment Details) base object.
See Also
Keywords
Business Rules, Calculate Service Length, Custom Field, custom-double, Employment Detail, Years of service, seniority, Age , KBA , LOD-SF-EC-EMP , Employment Information (Employment Details) , LOD-SF-PLT , Platform Foundational Capabilities , LOD-SF-EC-PER , Person Data (All Person Data Types) , LOD-SF-EC-ROD , Advanced Reporting (Employee Central ODS/ORD) , How To