Once a worker record is terminated, it is expected that the associated user account will get inactive. However, it depends upon the configuration on Enterprise Level and auto provisioning rules setup. If there is even on role assigned to user name, the user account will not get terminated in HCM.
To help the business to get a list of active user accounts even if the associated worker record is terminated, below query is created:
SELECT DISTINCT papf.person_number
,ppos.actual_termination_date
FROM PER_ALL_PEOPLE_F papf
,PER_PERIODS_OF_SERVICE ppos
,PER_USERS pu
,PER_USER_ROLES pur
WHERE papf.person_id = ppos.person_id
AND TRUNC(SYSDATE) BETWEEN papf.effective_start_date AND papf.effective_end_date
AND papf.person_id = pu.person_id
AND pu.user_id = pur.user_id
AND ppos.actual_termination_date IS NOT NULL
AND ppos.actual_termination_date < TRUNC(SYSDATE) /*Check only for past dated terminations*/
AND NOT EXISTS (SELECT 1 FROM PER_PERIODS_OF_SERVICE ppos2
WHERE ppos2.person_id = ppos.person_id
AND ppos2.actual_termination_date IS NULL)
ORDER BY 1,2
There are scenarios when we want to delete a future dated row from an object. Please note that for objects like Positions/Locations etc which are date tracked, one can make use of HDL with SET command to delete the future dated row.
Let us take an example, where we have below data on Position:
Position Name – Test Position
Effective Start Date – 01- Jan-2023 – Record creation
Effective Start Date – 01-Oct-2023 – Record updated (let us say Standard working hours).
Now the requirement is to delete the row with effective start date – 01-Oct-2023.
In such cases, below HDL can be used:
SET PURGE_FUTURE_CHANGES Y
METADATA|Position|BusinessUnitName|PositionCode|EffectiveStartDate|EffectiveEndDate
MERGE|Position|BU Name|Pos Code|2023/01/01|4712/12/31
Any locations for which the value of the field will be selected as “Yes”, will be only available to be used in Manage Employment screen. This is a great feature to segregate locations which can be used on employee assignments vs locations which are used as training centers/ supplier locations etc.
By default, this field is hidden on Location Details quick action.
One needs to enable a sandbox and then from transaction design studio, make it visible.
From Quick actions under My Client Groups, choose Location Details:
If you still don’t see the attribute, create a new sandbox, add Experience Design Tool in it:
Choose Location Details as Action:
Click on Add,
under Page attributes, you see Employee Location is hidden OOTB:
P.S. – Please note this field can’t be used in classic locations page. Also, the default value is set to No.
There are cases where we need to use functions like days between to get difference between two dates. These functions can not be used from Transaction console. One has to login to BPM Worklist to access the functions.