Apps To Fusion

.......contents copyright protected by FocusThread UK Ltd

 
  • Increase font size
  • Default font size
  • Decrease font size
We are glad to announce the launch of Forum for Customizations and Extensions. Click here to visit http://apps2fusion.com/forums
Our OA Framework, BPEL Development & Apps DBA Trainings from USD 299 only [on weekends] . Click here for details.
Also see here fully verifiable feedbacks/testimonials


Oracle HRMS API Employee People Migration

In this article, I will explain how to migrate or interface Employees / People records in Oracle HRMS application.


This article uses the GB (United Kingdom) verion of the API. The name of this API is hr_employee_api.create_gb_employee.

There is a bit of uncertainty whether fusion will use Oracle HRMS or Peoplesoft HRMS & Payroll.
Yet, most of the readers request me to write about Oracle HRMS.

First lets begin with questions and answers....

Question : Where is people data stored in Oracle HRMS?
Answer : It is stored in table named per_all_people_f

Question: But there is a table named per_people_f too?
Answer : WRONG. Per_people_f is a view on top of per_all_people_f. This view filters the list of records from  per_all_people_f.
This filtration happens in the where clause of view, based on security profile of the responsibility being used by user.

Question : What then is per_people_x?
Answer : This is a view on top of per_people_f, and it displays only those date tracked records that are effective as of sysdate.

Lets say you wish to create a person record of following data
Last name : Passi
First name : Anil
Title : MR.
NI Number : PX374383D
Date of birth 12-jan-1982
Person type : Employee
Employee number 90909090


Please note the following:-
1. This example demonstrates creation of Employee named Anil Passi with Employee Number 90909090.
In your case, you will be looping through the Legacy data and calling the below Oracle HRMS API to create Employee.
2. You may need to map following codes of Legacy system with values in Oracle HRMS
          Nationality
          Ethinicity
          Sex
          Title
3. This migration activity will most probably be followed by creation or migration of Assignment records.
4. Copy past the code below, and run in your environment to see this work. However, do not forget to change the business group name.
5. For non-UK implementers, you will need to use non GB version of the API.


DECLARE
  x_emp_num VARCHAR2(200) := '90909090' ;
  x_business_id INTEGER;
  x_person_type_id    INTEGER;
  x_validate_mode     BOOLEAN := FALSE; 
  x_person_id INTEGER ;
  x_assignment_id INTEGER ;
  x_per_object_version_number NUMBER;
  x_asg_object_version_number NUMBER;
  x_per_effective_start_date  DATE;
  x_per_effective_end_date    DATE;
  x_full_name                 VARCHAR2(300);
  x_per_comment_id            NUMBER;
  x_assignment_sequence       NUMBER;
  x_assignment_number         VARCHAR2(10);
  x_name_combination_warning  BOOLEAN := FALSE;
  x_assign_payroll_warning    BOOLEAN := FALSE;
  x_orig_hire_warning         BOOLEAN := FALSE;

BEGIN
  SELECT business_id
  INTO x_business_id
  FROM per_business_groups
  WHERE NAME = '<<Your Business Group name or Setup Business Group>>';

  SELECT ppt.person_type_id
  INTO x_person_type_id
  FROM per_person_types ppt
  WHERE ppt.business_id = x_business_id
  AND ppt.user_person_type = 'Employee';

  hr_employee_api.create_gb_employee(p_validate                  => x_validate_mode
                                    ,p_hire_date                 => SYSDATE -- In this case
                                    ,p_business_id         => x_business_id
                                    ,p_last_name                 => 'Passi'
                                    ,p_sex                       => 'M'
                                    ,p_person_type_id            => x_person_type_id
                                    ,p_date_of_birth             => '12-JAN-1982'
                                    ,p_employee_number           => x_emp_num
                                    ,p_first_name                => 'Anil'
                                    ,p_known_as                  => ''
                                    ,p_marital_status            => ''
                                    ,p_middle_names              => ''
                                    ,p_ni_number                 => 'PX374383D'
                                    ,p_previous_last_name        => ''
                                    ,p_title                     => 'MR.'
                                    ,p_original_date_of_hire     => SYSDATE
                                    ,p_person_id                 => x_person_id
                                    ,p_assignment_id             => x_assignment_id
                                    ,p_per_object_version_number => x_per_object_version_number
                                    ,p_asg_object_version_number => x_asg_object_version_number
                                    ,p_per_effective_start_date  => x_per_effective_start_date
                                    ,p_per_effective_end_date    => x_per_effective_end_date
                                    ,p_full_name                 => x_full_name
                                    ,p_per_comment_id            => x_per_comment_id
                                    ,p_assignment_sequence       => x_assignment_sequence
                                    ,p_assignment_number         => x_assignment_number
                                    ,p_name_combination_warning  => x_name_combination_warning
                                    ,p_assign_payroll_warning    => x_assign_payroll_warning
                                    ,p_orig_hire_warning         => x_orig_hire_warning
                                    );
COMMIT ;
END;

Now, lets check the results, by running the below SQL
SELECT person_id
      ,employee_number
      ,first_name
      ,last_name
      ,full_name
      ,date_of_birth
FROM per_all_people_f
WHERE creation_date > SYSDATE - 1;
 Image

Now, lets have a look at this record from the Oracle HRMS People Entry Screen
Image

Comments (36)add
...
written by Sunil , November 19, 2006
I appreciate this. Pls is it possible to have your email id. I have got some other questions to ask you. eg Fast formular

manny thanks
report abuse
vote down
vote up
Votes: +0
...
written by Sunil , November 19, 2006
I appreciate this. Pls is it possible to have your email id. I have got some other questions to ask you. eg Fast formular

manny thanks
report abuse
vote down
vote up
Votes: +0
...
written by mukesh , December 15, 2006
Hi Anil,

I am doing Employee assignment conversion. after your people migration.So I am updating default assignment but in some cases one person having more than one assignment also so how i can handle history recrods and multiple assignments.
I know that APIs for this but wanna know how hisotry record will be picked up or how i need to handle it.

Rgds
Mukesh
report abuse
vote down
vote up
Votes: +1
...
written by Supriya , December 22, 2006
Hi Anil,

I am trying to upload employee data into per_all_people_f and per_all_assignments_f using hr_in_employee_api and hr_in_assignment_api for India Localization. On using create_in_employee a default primary assignment is created automatically. Now how do I update the primary assignment created by hr_in_employee_api.

In hr_in_assignment_api there are two procedure to create a secondary assignment or to update the primary assignment. I do not want to create a secondary assignment but in update procedure jobs, position, grade and payroll are not given. Then how do i go updating the primary assignment.

Your inputs would be higly appriciated.

Regards,
Supriya
report abuse
vote down
vote up
Votes: +0
...
written by venkat , February 05, 2007
Anil,
I am starting the career in apps. I am having a generic question.How to know what are the mandatory parameters that are required to be passed for an api. Most of the times even though we pass all the parameters which are not defaulted, i am getting this error

thanks
venkat
report abuse
vote down
vote up
Votes: +0
...
written by Anil Passi , February 06, 2007
.
.
Hi Madhu

You are seeing a ORA error for passed parameters, which means the issue is with syntax rather than business validation.

Email me your script, I will have a look.


Thanks,
Anil Passi
report abuse
vote down
vote up
Votes: +0
...
written by chunnu , March 08, 2007
For non-UK implementers, you will need to use non GB version of the API.i am in US i want to know what does it mean?
report abuse
vote down
vote up
Votes: +0
...
written by devi , March 09, 2007
hi anil,
im new to oracle HRMS, could you please send me any interface examples with the validations, to practice
report abuse
vote down
vote up
Votes: +0
...
written by seema , March 14, 2007
Hi Anil,
i am new to oracle apps.
I had a doubt.
usually in migration or conversion,we have an interface table which we populate before the data is populate in base tables through open interfaces.rt?
here in people data migration which is the interface table,open interface?
is per_all_people_f the base table?
report abuse
vote down
vote up
Votes: +0
...
written by seema , March 16, 2007
Hi Anil,
Thanks for the early response.I did understand the use of API but a little confused about the sequence of operation.
Considering the case of multiple records to be populated ,correct me if i am wrong.
1.load data onto temporary table using sql loader .
2.load data from temporary table onto base table(per_all_people_f) using hr_employee_api.create_us_employee.

the confusion is:
1.Is this the sequence?
2. Dont we use any interface table here?

Please help me out on this.Every input of yours would be highly appreciated.

thanks in advance
--seema
report abuse
vote down
vote up
Votes: -1
...
written by Debbie , March 21, 2007
Hi
I am trying to move qualifications for staff from our legacy system to Oracle HRMS. How do I go about uploading:
a) Schools / Colleges
b) Qualification Types
c) qualifications
d) Schools and Colleges attended
thanks
Debbie
report abuse
vote down
vote up
Votes: -1
...
written by Anil Passi , March 24, 2007
Chunnu

Please post the error message that you are getting.

Thanks,
Anil
report abuse
vote down
vote up
Votes: +0
...
written by Anil Passi , June 04, 2007
Indeed for high volumes, you can use data pump

Refer to Metalink White paper Note 72564.1

This also contains examples for Data Pump

Thanks
Anil Passi
report abuse
vote down
vote up
Votes: +0
...
written by Pravin , June 16, 2007
Hi Anil,

I am working on a project where i have to copy the employee data which is available in SQL server database to the ORACLE HRMS. PLease let me know how i can do it at the earliest.

Thanks in advance

Pravin
report abuse
vote down
vote up
Votes: +0
...
written by sreenivas , June 26, 2007
Iam new to Oracle HRMS.Can you explain me an US employee(New hire) creation through backend and as wellas front end
report abuse
vote down
vote up
Votes: +0
...
written by Shivakumar , September 07, 2007
Hi Anil,
Name the diferent API's we used in Core HRMS and Payroll systems.
Thanks
report abuse
vote down
vote up
Votes: +0
...
written by Krishna Juturi , September 28, 2007
It is a good one. i learn new things from this.

Could you please provide the validations for DOB(Date of Birth) & Date of Join



Thanks & Regards,
Krishna
report abuse
vote down
vote up
Votes: +0
...
written by avni , October 09, 2007
Hi Anil

Wat if i have more than one Assignment?Say i have three Assignments.Now the moment i'l create an Employee ,automatically an assignment wd be created for him,and i need to update this assignment..right.
But out of my three assignments how can i choose which assignment shoud be updated which two shd be created as secondary assignments..

Ur help wd be Appreciated
report abuse
vote down
vote up
Votes: +0
...
written by Anil Passi , October 09, 2007
Hi Avni,

Ans 1
----------
Yes thats correct, you will have to update the default assignment.

Ans 2
----------
This will be driven by your business requirement. In case you are migrating data, there must be some equivalent column/attribute in the legacy data to indicate which assignment is primary.


Further related info
-----------------------
Secondary assignments can be created using API as below [use the API specific to your localization]
hr_assignment_api.create_gb_secondary_emp_asg

Also, you can alter the primary flag on assignment, by calling below API
hr_assignment_api.set_new_primary_asg(p_validate => p_validate,
p_effective_date => :p_effective_date,
p_person_id => :p_person_id,
p_assignment_id => :p_assignment_id,
p_object_version_number => :p_object_version_number,
p_effective_start_date => :p_effective_start_date,
p_effective_end_date => :p_effective_end_date);


Thanks,
Anil Passi
report abuse
vote down
vote up
Votes: +0
...
written by avni , October 09, 2007
Thanks Anil
report abuse
vote down
vote up
Votes: +0
Question on API
written by kp , October 16, 2007
Hi Anil
I have one question regarding the API's. Why we have 2 update procedures in HR_ASSIGNMENT_API. Like HR_ASSIGNMENT_API.UPDATE_EMP_ASG and HR_ASSIGNMENT_API.UPDATE_EMP_ASG_CRITERIA ?

report abuse
vote down
vote up
Votes: +0
...
written by AK , October 19, 2007
Hi Anil,
one of my requirement in HRMS is to send an alert message to a group of users,
whenever user updates the "projected" column on end employment form.
(In HRMS the Navigation path is FASTPATH -> end employment)

i can create an "after update" event alert to achieve the desired result.which fires
when they update the record. but i need to send an alert only when they update the
"projected" column on the End employment form(IN HRMS fastpath->end employment form).
but not when they update other columns on the End employment form.

"After update alert" fires when they update the record. but how to identify whether
they modified the "projected" column on End employment form.
(which is "PROJECTED_TERMINATION_DATE" column in per_periods_of_service).
Keep up your good work
Thanks for your help. highly Appreciated.




report abuse
vote down
vote up
Votes: +0
...
written by Saira B. , November 21, 2007
Anil
Excellent startup article. I am a beginner with oracle apps & its architecture and currently working on an Oracle HRMS implementation. Your article has helped alot.

I would need some more insight to Data Conversion Analysis Exercise.

Regards

- Saira
report abuse
vote down
vote up
Votes: +0
excellent articles
written by pran , December 11, 2007
hi Anil,
I am new to HRMS. your website is very helpful.
Could u pls post in the API's for HR and payroll as well.

thanks
report abuse
vote down
vote up
Votes: -1
ORA-20001: YOU CANNOT UPDATE AN APPROVED SALARY DATE.HR_MAINTAIN_PROPOSAL_API
written by Vamsi , January 24, 2008
Hi Anil,

I am trying to update an employees salary using HR_MAINTAIN_PROPOSAL_API.update_salary_proposal. But I am getting ORA-20001: YOU CANNOT UPDATE AN APPROVED SALARY DATE.

Could you please let me know if there is any way of updating an emloyees salary.

Thanks In Advance,
Vamsi.
report abuse
vote down
vote up
Votes: -1
DELETION OF AN EMPLOYEE DETAILS
written by Buvi , February 26, 2008
Hi,
If any employee is terminated, I want to delete the records of him in UK Business Group and the same details should be deleted in INDIA BG also for that employee. Could u suggest me to which API I can use to do this?
report abuse
vote down
vote up
Votes: +0
How to verify the employee records in HR Tables ??
written by Ameetha , March 03, 2008
Hi Anil..
This is an excellent site. Really thank you for updating useful information for us.

I am working for HR module and i have a query..
How to know the data in the per_all_people_f , per-all_assignments_f and per_periods_of_service are in Sync.

Regards,
Ameetha
report abuse
vote down
vote up
Votes: +0
...
written by Durvesh , May 11, 2008
hr_person_api.delete_person to delete the person
report abuse
vote down
vote up
Votes: +0
Developer Consultant
written by Mohamed Ibrahim , May 29, 2008
Dear Anil,
Could you tell me if there is an API that take user_id and return employees that belong to this user ??
i wait your answer,
thanks in advance,
report abuse
vote down
vote up
Votes: +0
...
written by Anil Passi , May 29, 2008
You can try wf_directory api or do select employee_id from fnd_user where user_id=9999, where 9999 may be the userid
report abuse
vote down
vote up
Votes: +0
how to upload 100 numbers of employee in to hrms using api at a time with out hard cord
written by zakkam , June 20, 2008
plz tell me that i want up load at a time 100 employee in to hrms, and have that data in a excel sheet
format it is very urgent plz help me
report abuse
vote down
vote up
Votes: +0
update
written by graeme , September 23, 2008
that api is great for creating an employee. what about updating some details such as email_address? i can't find anything.
report abuse
vote down
vote up
Votes: +1
Update descriptive ff on the Assignment screen
written by abhilasha , October 22, 2008
Hello Anil,
I need some urgent help from you please, am leaving to India this weekend and have to finish this API task before I leave.I'm no too familiar with HR ,I know its very complex mainly because of date tracking functionality.

My question is I need to write an API that would replace the existing manual process in place :

HR once a year manually populate the Assignment screen the Descriptive ff (salary Manager Descriptive FF --> ASS_ATTRIBUTE10 column of Per_assignments_f table).
I need to write an API that can up upload that field from the spreadsheet (Spread sheet provides Employee Number, Salary Manager and Effective Date information and with that information the API should be able topopulate the descriptive ff column).

Effective Date is the key when writing the API.Based on the effective date ,the API must be able to "update" and not "correct" the existing record-- this will create a new assignment starting on the effective date of the change.In addition ,if there is a new assignment record that began after the effective date of this change,the program must be able to"Insert" a new assignment record and not "Replace" any future records.

Thanks a lot for your help ,I just have two days to finish this ,and have minimal knowledge on HR tables.Your help would be greate appreciated.


report abuse
vote down
vote up
Votes: +0
Updating Salary
written by Alvaro Quinones , July 14, 2009
Hello Anil:

There is any way of updating an emloyees salary.

Thanks.

report abuse
vote down
vote up
Votes: +0
...
written by Shimin , December 23, 2009
I'm new to HR, This website is very helpful . Thanks alot.
report abuse
vote down
vote up
Votes: +0
Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
smile
wink
laugh
grin
angry
sad
shocked
cool
tongue
kiss
cry
smaller | bigger

security image
Write the displayed characters


busy
 

Search apps2fusion