Very often we hear customers requesting to have a Position Head of Unit and not only the User Head of Unit. Also, this comes with an automation ask, where the position head incumbent changes, should reflect in the Unit. We know that currently the User Head of Unit field is the standard option and must be maintained manually, but there is one alternative and that is what this blog is about.
In this blog, you will find a way to maintain the Position Head of Unit and derive the incumbent of this position to a User Head of Unit field.
Create 2 custom fields to the Department object: Position Head of Unit and User Head of Unit.
Go to Configure Object Definitions, search for the Department Object and click Take Action > Make Correction
Go to the bottom of the fields section and create the two fields mentioned before. Please make sure that the Position Head of Unit must be ‘GO=Position’ type and the User Head of Unit must be ‘User’ type.
Another important aspect is to mark the User Head of Unit as a transient field, as per below, and this is because we will generate the Head of Unit value on a run time.
Remember to save the changes.
Now we need to create the business rule that will populate the User Head of Unit field. Go to Configure Business Rules and click to create a new MDF rule as per the below example:
Next, we need to create a UI for our Department Object where we will assign the new rule created.
Go to Manage Configuration UI > Create New.
Check if the two fields created before are visible in the UI:
Now go to the Edit Properties in the top left menu:
Add the created rule to the onload Business Rules section and click OK.
Remember to SAVE your changes in the UI screen:
To finalize, go to the Department Object and add the new UI created.
Navigate to Configure Object Definition, search for the Department object and click Take Action > Make Correction. Add the UI created in the Default Screen.
Now the solution is implemented so let’s test it!
Go to the Org Chart > Company Structure Overview and search for a Department. Once you select the Department click on the quick card to open this Department data. There you will see the new two fields and the User Head is now a transient field, so it means that it will be generated every time that you access the screen. If you terminate this employee (Jessica Smith in our example) and hire another one to the Position Head, it will automatically show the new employee’s name when you access the department data.
NOTE: Unfortunately, transient fields are not supported to be added in the card view (below image), and this is due to the performance of the system, as it would have to be generated/calculated on chart load for all affected objects to display the info. In any case, you can still have it when you access the department data from the Company Structure Overview or Manage Data transactions – both works.
SAP HCM Integration Considerations
For SAP HCM integration, integration transfers the position, which is assigned as head of the Department and when this position has an incumbent, this information is replicated with the job information of the incumbent. This means that you don’t need to take the User Head of Unit info for integration, but instead the Position Head of Unit.