Have any question?
+2 0100 62 62 837
[email protected]
Register Login

Login with your site account

Lost your password?

Not a member yet? Register now

AppsLead | Learn Oracle From The LeadersAppsLead | Learn Oracle From The Leaders
  • Home
  • Courses
    • About Courses

      • Free Training
        • Oracle ebusiness suite Free
        • Oracle Fusion Free
      • Online Live Training
        • Oracle ebusiness suite
        • Oracle Fusion
        • Oracle Database
        • Java & Middleware
      • All Training Courses
      • Training Schedule
      • Register For Live Course
      • Join Our Team
      • Exam Request
  • Blog
    • Oracle ebusiness Suite
      • Oracle Financial
      • Oracle HCM
      • Oracle SCM
    • Oracle Fusion
      • Fusion Financial
      • Fusion HCM
    • Our Authors
    • Be an Author
  • Schedule
  • FAQs
  • About Us
    • About Us
    • Our Services
    • Our Authors
  • Contact Us
  • Home
  • Courses
    • About Courses

      • Free Training
        • Oracle ebusiness suite Free
        • Oracle Fusion Free
      • Online Live Training
        • Oracle ebusiness suite
        • Oracle Fusion
        • Oracle Database
        • Java & Middleware
      • All Training Courses
      • Training Schedule
      • Register For Live Course
      • Join Our Team
      • Exam Request
  • Blog
    • Oracle ebusiness Suite
      • Oracle Financial
      • Oracle HCM
      • Oracle SCM
    • Oracle Fusion
      • Fusion Financial
      • Fusion HCM
    • Our Authors
    • Be an Author
  • Schedule
  • FAQs
  • About Us
    • About Us
    • Our Services
    • Our Authors
  • Contact Us

Oracle ebusiness Suite

  • Home
  • Oracle ebusiness Suite
  • HRMS Employee Migration In Oracle Applications

HRMS Employee Migration In Oracle Applications

  • Posted by Sameh Bakkar
  • Categories Oracle ebusiness Suite, Oracle HCM
  • Date March 19, 2011
  • Comments 0 comment
Hello Appslead fans, I hope you are fine . In Oracle E-Business Suite some times we need to upload a huge amount  of employees without using the application Screens or when upgrading from system to another one. So today we will learn how to use APIs to create employees in Oracle applications .
DECLARE
V_API_ERROR                   VARCHAR2(500);
p_employee_number    varchar2(200);
V_ERROR_MSG                   VARCHAR2(500) := NULL; 
P_NATIONALITY                 VARCHAR2(200);
p_person_type_id              NUMBER; 
P_business_group_id           NUMBER ;
P_EMP_NO                      VARCHAR2(200);
P_LAST_NAME                   VARCHAR2(200);
P_FULL_NAME                   VARCHAR2(200);
P_PERSON_TYPE_ID              VARCHAR2(200);
P_SEX                         VARCHAR2(200);
P_RELIGION                    VARCHAR2(200);
P_NATIONAL_IDENTIFER          VARCHAR2(200);
P_DATE_OF_BIRTH               VARCHAR2(200);
P_TOWN_OF_BIRTH               VARCHAR2(200);
P_MARITAL_STATUS              VARCHAR2(200);
P_NATIONALITY                 VARCHAR2(200);
P_NATIONAL_ID_TYPE            VARCHAR2(200);
P_ID_NO                       VARCHAR2(200);
P_ID_START_DATE               VARCHAR2(200);
P_ID_END_DATE                 VARCHAR2(200);
P_ID_PLACE                    VARCHAR2(200);
P_ID_GOV                      VARCHAR2(200);
P_EFFECTIVE_START_DATE        VARCHAR2(200);
p_person_id                           number;
p_assignment_id                       number;
p_per_object_version_number           number;
p_asg_object_version_number           number;
p_per_effective_start_date            date;
p_per_effective_end_date              date;
p_per_comment_id                      number;
p_assignment_sequence                 number;
p_assignment_number                   varchar2(200);
p_name_combination_warning            boolean;
p_assign_payroll_warning              boolean;
p_orig_hire_warning                   boolean;
Gov_Date   varchar2(20);
cursor xx_emp is
select * 
FROM XX_HR_EMPLOYYE_API_INTERFACE
where ser between 7 and 7 ;

BEGIN
 
for HR_data in xx_emp loop
begin
Select h.H_DATE into  Gov_Date From   kfu_hijra h where  h.G_DATE = hr_data.gov_date   ;
exception
when others then null;
end;

BEGIN
hr_employee_api.create_employee ( 
p_hire_date                   =>HR_data.HIRE_DATE , 
p_business_group_id           => 81,
p_title                       => hr_data.emp_title,
p_email_address               => hr_data.email,
p_first_name                  => HR_data.first_name,
p_last_name                   => HR_data.LAST_NAME,
p_sex                         => HR_data.sex,
p_person_type_id              => HR_data.person_type_id,
p_date_of_birth               => HR_data.DATE_OF_BIRTH,
p_employee_number             => p_employee_number ,
p_marital_status              => HR_data.MARITAL_STATUS,
p_nationality                 => HR_data.NATIONALITY,
p_national_identifier         => HR_data.NATIONAL_IDENTIFIER ,
p_pre_name_adjunct            => NULL,
p_town_of_birth               => HR_data.TOWN_OF_BIRTH ,            
p_attribute1                  => hr_data.emp_old_no ,
p_attribute2                  => Gov_Date ,
p_person_id                   => p_person_id,
p_assignment_id               => p_assignment_id,
p_per_object_version_number   => p_per_object_version_number,
p_asg_object_version_number   => p_asg_object_version_number,
p_per_effective_start_date    => p_per_effective_start_date,
p_per_effective_end_date      => p_per_effective_end_date,
p_full_name                   => p_full_name,
p_per_comment_id              => p_per_comment_id,        
p_assignment_sequence         => p_assignment_sequence,          
p_assignment_number           => p_assignment_number,        
p_name_combination_warning    => p_name_combination_warning,      
p_assign_payroll_warning      => p_assign_payroll_warning,
p_per_information1            => hr_data.second_name , 
p_per_information2            => trim(hr_data.third_name),   
p_per_information7            => hr_data.RELIGION,        
p_orig_hire_warning           => p_orig_hire_warning);

commit;
begin
update  XX_HR_EMPLOYYE_API_INTERFACE
set Status =  'Done'  , PERSON_ID = p_person_id , new_number = p_employee_number , ERROR_MSG = null
where EMP_old_NO = HR_data.EMP_old_NO;                           

exception 
when others then null;
end;
COMMIT;
EXCEPTION
WHEN OTHERS THEN
V_API_ERROR  := SQLERRM;
V_ERROR_MSG  := V_ERROR_MSG||'   '||V_API_ERROR;

UPDATE XX_HR_EMPLOYYE_API_INTERFACE
SET ERROR_MSG = V_ERROR_MSG , Status =  'Error'
where EMP_old_NO = HR_data.EMP_old_NO;


COMMIT;
 

END;
end loop;
END ;
I hope this article achieve your needs. Please share and leave comment for any question.
  • Share:
Admin bar avatar
Sameh Bakkar
Sameh Bakkar has over 15 years Oracle Applications implementation experience (EBS/Fusion) and he is an Oracle authorized trainer. He has in-depth technical and Functional knowledge of Oracle Applications and Oracle HCM Cloud. Sameh has excellent experience in Team management, Man Power and resource planning, and Pre-Sales management Process. Additionally he has also given Best Practices seminars on Oracle e-business suite and Oracle Fusion.

Previous post

HRMS Update Employee's Hire Date
March 19, 2011

Next post

HRMS Delete Positions API
19 March, 2011

You may also like

  • How to call REST Web service from Oracle Scale System
    11 April, 2017
  • How To Set a Default Sequence For Invoice Number in Oracle Payables application
    8 April, 2017
  • How to use user hook on oracle applications (EBS)
    7 April, 2017

Leave A Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Categories

  • Blog
  • Oracle ebusiness Suite
  • Oracle Financial
  • Oracle HCM
  • Oracle SCM

Latest Courses

R12.x Oracle E-Business Suite Essentials for Implementers

R12.x Oracle E-Business Suite Essentials for Implementers

Free
R12.x Oracle HRMS Work Structures Fundamentals

R12.x Oracle HRMS Work Structures Fundamentals

Free
R12.x Oracle Payroll Fundamentals

R12.x Oracle Payroll Fundamentals

Free
AppsLead | Learn Oracle From The Leaders

+2 0100 62 62 837

[email protected]

Company

  • About Us
  • Blog
  • Contact Us

Links

  • Events

Copyright © 2017 AppsLead, All rights reserved. Developed by ECDSCS Co.

  • Privacy
  • Terms
  • Sitemap