Home » Applications » Oracle Fusion Apps & E-Business Suite » HRMS APIs to End Employment
HRMS APIs to End Employment [message #415258] Sun, 26 July 2009 21:04 Go to next message
Mauragon
Messages: 20
Registered: February 2007
Location: Philippines
Junior Member
Is there such an API to end an employment?

I'm working on a migration program that would automatically end the employment of an employee from a source instance to a target instance.

For example an employee from the source instance is already separated, there's also a record of that same employee to another instance that needs to end employment. The target instance by the way is for administrative employees whose salaries are confidential thus a separate instance for them while the source instance doesn't reflect the salaries. The entire purpose is to sync updates from the source to the target.

OR

Is this done using a number of APIs like hr_employee_api and hr_assignment_api?

TIA.
Re: HRMS APIs to End Employment [message #415300 is a reply to message #415258] Mon, 27 July 2009 02:49 Go to previous messageGo to next message
SanthoshKumar_s
Messages: 28
Registered: March 2005
Location: Hyderabad
Junior Member

Hi Mauragon,

Im not sure about your requirement.
But the below given piece of code end dates an existing employee and changes the current employee status to 'Ex-Employee'

Hope this may be of some use to you.


PROCEDURE delete_employee (
p_person_id IN NUMBER
,p_leaving_reasons IN VARCHAR2
,p_last_working_date IN DATE
,p_actual_notice_period_date IN DATE
)
IS
-- Purpose :Call the Terminate Employee API
-- Parameter :p_person_id,p_Leaving_Reason,
-- p_Last_Working_Date,p_Actual_Notice_Period_Date
l_business_group_id NUMBER
:= fnd_profile.VALUE ('PER_BUSINESS_GROUP_ID');
l_person_id per_all_people_f.person_id%TYPE;
l_start_date DATE;
l_end_date DATE;
l_object_version_number NUMBER;
l_period_of_service_id NUMBER;
l_validate BOOLEAN := FALSE;
l_supervisor_warning BOOLEAN;
l_event_warning BOOLEAN;
l_interview_warning BOOLEAN;
l_review_warning BOOLEAN;
l_recruiter_warning BOOLEAN;
l_asg_future_changes_warning BOOLEAN;
l_entries_changed_warning VARCHAR2 (30);
l_pay_proposal_warning BOOLEAN;
l_dod_warning BOOLEAN;
l_last_working_date DATE;
BEGIN
SELECT pps.period_of_service_id
,pps.object_version_number
INTO l_period_of_service_id
,l_object_version_number
FROM per_periods_of_service pps
WHERE person_id = p_person_id;

l_last_working_date := p_last_working_date;
hr_ex_employee_api.actual_termination_emp
(p_validate => l_validate
,p_effective_date => TRUNC (SYSDATE)
,p_period_of_service_id => l_period_of_service_id
,p_object_version_number => l_object_version_number
,p_actual_termination_date => p_actual_notice_period_date
,p_last_standard_process_date => l_last_working_date
,p_leaving_reason => p_leaving_reasons
,p_supervisor_warning => l_supervisor_warning
,p_event_warning => l_event_warning
,p_interview_warning => l_interview_warning
,p_review_warning => l_review_warning
,p_recruiter_warning => l_recruiter_warning
,p_asg_future_changes_warning => l_asg_future_changes_warning
,p_entries_changed_warning => l_entries_changed_warning
,p_pay_proposal_warning => l_pay_proposal_warning
,p_dod_warning => l_dod_warning
);
END delete_employee;


Cheers,
Santhosh
Re: HRMS APIs to End Employment [message #415360 is a reply to message #415258] Mon, 27 July 2009 06:41 Go to previous messageGo to next message
suman.g
Messages: 89
Registered: June 2009
Member
Hi,

In one of my requirement to terminate Employee, I have used the below API in my custom package:

hr_ex_employee_internal.terminate_employee	
(p_effective_date         	 => rec.effective_start_date
,p_period_of_service_id   	 => l_period_of_service_id
,p_object_version_number  	 => l_period_obj_ver_num
,p_actual_termination_date 	 => rec.effective_start_date 
,p_final_process_date          	 => l_final_process_date
,p_last_standard_process_date  	 => l_last_standard_process_date
,p_supervisor_warning            => l_supervisor_warning
,p_event_warning                 => l_event_warning
,p_interview_warning             => l_interview_warning
,p_review_warning                => l_review_warning
,p_recruiter_warning             => l_recruiter_warning
,p_asg_future_changes_warning    => l_asg_future_changes_warning
,p_entries_changed_warning       => l_entries_changed_warning
,p_pds_information_category      => l_pds_information_category
,p_pds_information10             => l_pds_information10
,p_pay_proposal_warning          => l_pay_proposal_warning
,p_dod_warning                   => l_dod_warning
,p_org_now_no_manager_warning    => l_org_now_no_manager_warning
);

where rec.effective_start_date is termination date of the Employee.

You can use this API in the procedure provided by Santhosh also.
I have used this API in one of our custom package, if you require will attach that also.

Cheers,
Suman

[Updated on: Mon, 27 July 2009 06:51]

Report message to a moderator

Re: HRMS APIs to End Employment [message #417860 is a reply to message #415258] Tue, 11 August 2009 21:14 Go to previous messageGo to next message
Mauragon
Messages: 20
Registered: February 2007
Location: Philippines
Junior Member
Thank you Santosh and Suman for those inputs. Pardon the delay in my thanks.

I'm looking now at the APIs.
Re: HRMS APIs to End Employment [message #427303 is a reply to message #415360] Wed, 21 October 2009 21:08 Go to previous message
Mauragon
Messages: 20
Registered: February 2007
Location: Philippines
Junior Member
Hi Suman,

I have used the API that you had for an example but it seems that the person type of the person to be terminated didn't change. I was hoping that an Employee would become Ex-employee. There's a parameter for person_type_id and I assigned it with the person_id for 'Ex-employee'.

Should I leave this parameter blank? I hope you could lead me to the correct use of this API.

Thank you.
Previous Topic: export apps output file to excel format
Next Topic: Limit users logon 11i
Goto Forum:
  


Current Time: Wed May 01 16:07:31 CDT 2024