Employee is having an assignment with some direct reportees, and user wants to change the legal employer hire date

A user wants to change the legal employer hire date from 1st Feb 2021 to 1st Jan 2021, but they are not able to change the hire date of an employee.
 
The employee we are trying to change the legal employer date is a line manager, and it is having some direct reportees, so when we are trying to change the legal employer hire date the system throws an error “You can’t select this date because some assignments in the work relationship are used in a manager relationship. Remove the manager relationship to continue. (PER-1531839)
 
1st we need to remove the direct reportees from the line manager and assign these direct reportees to some other line manager on the same date when these reportees are assigned to this line manager. Then try to change the legal employer hire date of the line manager.
 
Below is the SQL to find the manager and their direct reportees
select papf_Reportee.person_number, to_char(pasf.EFFECTIVE_START_DATE,'yyyy/dd/mm') start_dt_spr from per_all_people_f papf, per_All_assignments_m paam, PER_ASSIGNMENT_SUPERVISORS_F pasf, per_all_people_F papf_reportee where papf.person_id = paam.person_id and paam.assignment_id = pasf.MANAGER_ASSIGNMENT_ID and papf.person_number = '00000000' -- supervisor number and sysdate between trunc(papf.effective_start_Date) and trunc(papf.effective_End_Date) and sysdate between trunc(paam.effective_start_Date) and trunc(paam.effective_End_Date) and papf_Reportee.person_id = pasf.PERSON_ID and sysdate between trunc(papf_Reportee.effective_start_Date) and trunc(papf_Reportee.effective_End_Date)

I hope this blog post was helpful for you. If you have any questions or feedback, please leave a comment below.