SAP Knowledge Base Article - Public

2788892 - Unable to Purge User / Employment Because it is a Main Assignment

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:

  1. Navigate to Manage Data
  2. Create New --> Secondary Assignments.
  3. Enter Effective Start Date: The Hire/Rehire date of employment (the active one or that you want to be the main)
  4. 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)
  5. Define Externalcode, can be any unique string (Any text or/and number string that will make sense to your business scenario)
  6. Enter Employment/UserId, select employment (the inactive one or the one to become secondary)

Below are UI details:

2019-05-30_14-42-23.png

Example

VPN_issue1ooo1.png

Result: This transaction will convert current employment into a concurrent employment scenario and set the "Yes" employment as primary/main employment.

 

2019-05-30_15-32-29.png

 

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

  1. Go to "Manage Employee Central Settings" in Admin Center
  2. Enable the "Concurrent Employment Management"
  3. Wait for a few minutes for the feature settings to refresh
  4. Apply the same steps in Option A
  5. 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)
    1. Go to Provisioning
    2. Perform the MDF Clear Cache
    3. Log into BizX > Admin Center
    4. Perform the OData Metadata API Refresh and Export
    5. Check if the object is now available in Manage Data

 Please refer to guide: Implementing and Configuring Concurrent Employment in Employee Central

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

Keywords

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-CGA , DO NOT USE - Use EC-CON or EC-GA , LOD-SF-EC-CWF , Contingent Workforce , Problem

Product

SAP SuccessFactors Employee Central all versions ; SAP SuccessFactors HCM suite all versions