Symptom
Attempt to purge an employment fails and the Job result reads:
"User X could not be purged because it is a Main Assignment. You have several options. You can change the person’s Main Assignment in Manage Data, or you can purge the Main Assignment along with all other users for the person, or you can purge all other users for this person before the Main Assignment."
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 Employee Central
Reproducing the Issue
Example Scenario 1:
- A user has two assignment - a standard employment and a contingent one.
- The contingent record was created by mistake with no employment details
- Attempt to purge the contingent worker failed.
Example Scenario 2:
- Create a contingent worker
- Terminate contingent Worker
- Create standard employment
- Attempt to purge contingent employment failed.
Example Scenario 3:
- How to Switch Employment Type?
- How to make one of the employment as the main (In case of Concurrent Employment)
Example Scenario 4:
- We mistakenly selected "Rehire with New Employment" instead of doing a normal rehire for an employee
- After this, a new employment was created which generated a new UserID
- We want to delete the incorrect employment, purge the new userID, and continue the employment of the user via the old userID
- However, when initiating a purge, we're getting an error indicating that the new generated userID cannot be deleted as it is tied to a Main Assignment / Employment
Cause
The "Main Assignment" or "Main Employment" is automatically set in cases of Concurrent Employment.
For cases of "Rehire with New Employment" or conversion of a Contingent Worker to Regular Worker and vice versa, the same principle applies as technically all of these processes result to separate and distinct employment for employees in the system.
As of the moment, there are certain limitations on determining which is the Main Assignment especially in scenarios where Concurrent Employment Management is not enabled in an instance. This is because the "Secondary Assignment" object in Manage Data, where you can set which should be the secondary employment, is not available when the feature is disabled.
This scenario requires a code enhancement, but in the meantime below is the documented workaround.
Resolution
A. If you have "Concurrent Employment" enabled in your system.
Make the employment that is failing to purge a concurrent employment by adding it as secondary assignments:
- Navigate to Manage Data
- Create New --> Secondary Assignments.
- Enter Effective Start Date: The Hire/Rehire date of employment (the active one or that you want to be the main)
- Define Person Id external, this can be found in the biographical info, sometimes it is named personId on the UI (the active one or that you want to be the main)
- Define Externalcode, can be any unique string (Any text or/and number string that will make sense to your business scenario)
- Enter Employment/UserId, select employment (the inactive one or the one to become secondary)
Below are UI details:
Example
Result: This transaction will convert current employment into a concurrent employment scenario and set the "Yes" employment as primary/main employment.
Purge KBA: 2088065 - Data Retention Management - Purge Data - Platform
Having completed the above steps, The purge should work now and remove the Secondary Assignments object employment that was failed previously for scenario 1 and 2 above.
Contact support if need any help.
B. If Concurrent Employment Management is disabled, additional steps have to be performed
- Go to "Manage Employee Central Settings" in Admin Center
- Enable the "Concurrent Employment Management"
- Wait for a few minutes for the feature settings to refresh
- Apply the same steps in Option A
- Once the purge is successful, you can disable the feature : Concurrent Employment Management
- Go to admin center
- Manage Employee Central Settings
- enable or disable: Concurrent Employment Management
Note: If you have enabled Concurrent Employment Management and the "Secondary Assignment" is still not available in Manage Data after more than 10 minutes, please do the following:
- If you are a customer (No Provisioning Access) - Please raise a support case and we will assist you with refreshing some backend settings
- If you are an Implementation Partner (w/ Provisioning Access)
- Go to Provisioning
- Perform the MDF Clear Cache
- Log into BizX > Admin Center
- Perform the OData Metadata API Refresh and Export
- Check if the object is now available in Manage Data
FAQ - Additional Information
Q) Where can I get information on this from the Guide?
A) Implementing and Managing the Employment Lifecycle (from Hiring to Termination)
Chapter:
Q) Please provide us another purge example for User XXXX could not be purged because it is a Main Assignment. You have several options. You can change the person’s Main Assignment in Manage Data, or you can purge the Main Assignment along with all other users for the person, or you can purge all other users for this person before the Main Assignment?
A) As customer has enabled concurrent employment and secondary assignment data looks properly maintained, please let customer try below steps:
For the given employee whose person_id_external, there are 2 users:
- 0XXXX
- XXXX
Both are inactive but XXXX is not properly terminated.
As of now, XXXX has been set as main assignment and therefore can't be purged alone.
Could you please let customer try below steps?
- Go to user 0XXXX's profile
- Employment Details -> Edit
- Primary or Secondary Employment Information -> Change to Yes
- Save
- Retry the purge of user XXXX and It should work
See Also
- 2479753 - Terminating Main Employment for Concurrent Employment
- 2088065 - Data Retention Management - Purge Data - Platform
- 2824594 - System does not sync Employee's concurrent employment with MDF Secondary assignments
- 2545988 - How to Purge/Delete users in SuccessFactors
- 3375924 - How To check User Status Via Data inspector
Keywords
INC9693582, Purge Contingent Employment, DRTM, Delete Contingent Worker, ECT-116569, Secondary employment, Main employment, could not be purged because it is a Main Assignment, User xxxxx could not be purged because it is a Main Assignment You have several options. You can change the person’s Main Assignment in Manage Data, or you can purge the Main Assignment along with all other users for the person, or you can purge all other users for this person before the Main Assignment, Manage Employee Central Settings, could not be purged because it is a Main Assignment You have several options. You can change the person’s Main Assignment in Manage Data, or you can purge the Main Assignment along with all other users for the person, or you can purge all other users for this person before the Main Assignment , KBA , LOD-SF-EC-EMP , Employment Information (Employment Details) , LOD-SF-EC-HIR , Hire & Rehire Wizards , LOD-SF-EC-CWF , Contingent Workforce , LOD-SF-EC-CGA , DO NOT USE - Use EC-CON or EC-GA , Problem