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

Blog

  • Home
  • Blog
  • HRMS Update Employee API

HRMS Update Employee API

  • Posted by Sameh Bakkar
  • Categories Blog
  • Date March 19, 2011
  • Comments 0 comment

DECLARE
/* Out Variables*/
l_object_version_number   number;
l_date_of_birth                date;
l_effective_start_date      date;
l_effective_end_date      date;
l_full_name         varchar2(250);
l_comment_id         number;
l_name_combination_warning   boolean;
l_assign_payroll_warning   boolean;
l_orig_hire_warning      boolean;
l_employee_number              varchar2(20);
l_person_id                    number;

/*   Local Variables   */
l_validate_cnt         number;
l_status         varchar2(10) := 'True';
l_errmsg         varchar2(1000);

l_total_records      number := 0;
l_success_records      number := 0;
l_failure_records      number := 0;

BEGIN

FOR hr_data IN ( SELECT  * From  xx_emps )
LOOP
l_errmsg   := '';
l_status   := 'True';
l_object_version_number := null;
l_person_id     := null;
l_employee_number := '';

l_total_records := l_total_records + 1;

BEGIN
/* Get Date Of Birth */
--p_original_date_of_hire := to_date (hr_data.hire_date , 'DD-MM-RRRR');
L_employee_number := null;

<hr class="system-pagebreak" />

SELECT person_id, object_version_number , employee_number
INTO l_person_id, l_object_version_number , l_employee_number
FROM per_all_people_f f
WHERE f.attribute1 = hr_data.EMP_OLD_NO
AND effective_end_date = TO_DATE ('31/12/4712', 'DD/MM/RRRR');

hr_person_api.update_person
(p_effective_date                => TRUNC(SYSDATE)
,p_datetrack_update_mode         => 'CORRECTION'
,p_person_id                     => l_person_id
,p_object_version_number         => l_object_version_number
,p_date_of_birth                 => to_date(hr_data.DATE_OF_BIRTH, 'DD-MM-RRRR')
,p_employee_number               => l_employee_number
,p_effective_start_date          => l_effective_start_date
,p_effective_end_date            => l_effective_end_date
,p_full_name                     => l_full_name
,p_comment_id                    => l_comment_id
,p_name_combination_warning      => l_name_combination_warning
,p_assign_payroll_warning        => l_assign_payroll_warning
,p_orig_hire_warning             => l_orig_hire_warning
);

l_success_records := l_success_records + 1;

UPDATE xx_emps
SET status = 'I',
error_msg = ''
WHERE emp_old_no = hr_data.emp_old_no;
COMMIT;
EXCEPTION
WHEN OTHERS THEN
l_failure_records := l_failure_records + 1;
l_errmsg := SUBSTR(SQLERRM,1,200);

UPDATE xx_emps
SET status = 'E',
error_msg = l_errmsg
WHERE emp_old_no = hr_data.emp_old_no;
COMMIT;
END;
END LOOP;


dbms_output.put_line('Total Records To Be Loaded : ' || l_total_records);
dbms_output.put_line('Total Success Records      : ' || l_success_records);
dbms_output.put_line('Total Failure Records      : ' || l_failure_records);

END;
/

Tag:API, HRMS, HRMS Update Employee API, Update Employee API

  • 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 Employee's Qualification API
March 19, 2011

Next post

HRMS Delete Employee API
19 March, 2011

You may also like

  • Entering Request for Quotations (RFQ)
    19 June, 2012
  • HRMS Assignment Migration – API
    9 March, 2011

Leave A Reply Cancel reply

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

Search

Categories

  • Blog
  • Fusion HCM
  • Oracle ebusiness Suite
  • Oracle Financial
  • Oracle Fusion
  • 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