182: --
183: close c1;
184: /* END OF WWBUG 1975359 */
185: hr_utility.set_location('Entering : per_people_v7_pkg.update_row',50);
186: UPDATE PER_PEOPLE_F
187: SET
188: person_id = X_Person_Id,
189: party_id = l_Party_Id,
190: effective_start_date = X_Effective_Start_Date,
410: END Update_Row;
411: --
412: PROCEDURE Delete_Row(X_Rowid VARCHAR2) IS
413: BEGIN
414: DELETE FROM PER_PEOPLE_F
415: WHERE rowid = X_Rowid;
416: if (SQL%NOTFOUND) then
417: RAISE NO_DATA_FOUND;
418: end if;
750: and pst.system_person_type = 'EX_EMP';
751: cursor person
752: is
753: select *
754: from per_people_f
755: where rowid = chartorowid(X_Rowid);
756: --
757: l_proc varchar2(20) := 'terminate_employment';
758: --
1291: l_proc varchar2(16) := 'modify_hire_date';
1292: --
1293: cursor ex_emp_rec
1294: is select Effective_End_Date
1295: from per_people_f
1296: where person_id = X_Person_Id
1297: and nvl(Effective_End_Date,X_S_Hire_Date) = (X_S_Hire_Date - 1)
1298: and nvl(Current_Employee_Flag,'N') <> 'Y'
1299: for update of Effective_End_Date;
1299: for update of Effective_End_Date;
1300: --
1301: cursor emp_rec
1302: is select person_id
1303: from per_people_f
1304: where person_id = X_Person_Id
1305: and effective_start_date = X_S_Hire_Date
1306: for update of Person_Id;
1307: --
1402: open ex_emp_rec;
1403: fetch ex_emp_rec into l_dummy_date;
1404: if ex_emp_rec%found then
1405: --
1406: update per_people_f
1407: set Effective_End_Date = X_Hire_Date - 1
1408: where Effective_End_Date = l_dummy_date
1409: and person_id = X_Person_Id
1410: and nvl(Current_Employee_Flag,'N') <> 'Y';
1421: fetch emp_rec into l_dummy_num;
1422: if emp_rec%found then
1423: --
1424: -- Added updation of start date for bug fix 5525333
1425: update per_people_f
1426: set effective_start_date = X_Hire_Date,
1427: start_date = X_hire_Date
1428: where effective_start_date = X_S_Hire_Date
1429: and person_id = X_person_id;
1602: --changes for bug 5857638 here
1603: --is select person_id
1604: is select *
1605: --changes for bug 5857638 here
1606: from per_people_f
1607: where person_id = X_Person_Id
1608: for update of Person_Id;
1609: --
1610: cursor assignment
1634: --
1635: l_dummy_date VARCHAR2(30);
1636: l_business_group_id number(15);
1637: --changes for bug 5857638 here
1638: l_person_record per_people_f%rowtype;
1639: l_EFFECTIVE_START_DATE per_people_f.EFFECTIVE_START_DATE%type;
1640: l_CURRENT_EMP_OR_APL_FLAG per_people_f.CURRENT_EMP_OR_APL_FLAG%type;
1641: l_CURRENT_EMPLOYEE_FLAG per_people_f.CURRENT_EMPLOYEE_FLAG%type;
1642: l_PERSON_TYPE_ID per_people_f.PERSON_TYPE_ID%type;
1635: l_dummy_date VARCHAR2(30);
1636: l_business_group_id number(15);
1637: --changes for bug 5857638 here
1638: l_person_record per_people_f%rowtype;
1639: l_EFFECTIVE_START_DATE per_people_f.EFFECTIVE_START_DATE%type;
1640: l_CURRENT_EMP_OR_APL_FLAG per_people_f.CURRENT_EMP_OR_APL_FLAG%type;
1641: l_CURRENT_EMPLOYEE_FLAG per_people_f.CURRENT_EMPLOYEE_FLAG%type;
1642: l_PERSON_TYPE_ID per_people_f.PERSON_TYPE_ID%type;
1643: --
1636: l_business_group_id number(15);
1637: --changes for bug 5857638 here
1638: l_person_record per_people_f%rowtype;
1639: l_EFFECTIVE_START_DATE per_people_f.EFFECTIVE_START_DATE%type;
1640: l_CURRENT_EMP_OR_APL_FLAG per_people_f.CURRENT_EMP_OR_APL_FLAG%type;
1641: l_CURRENT_EMPLOYEE_FLAG per_people_f.CURRENT_EMPLOYEE_FLAG%type;
1642: l_PERSON_TYPE_ID per_people_f.PERSON_TYPE_ID%type;
1643: --
1644: l_proc varchar2(20) := 'cancel_termination';
1637: --changes for bug 5857638 here
1638: l_person_record per_people_f%rowtype;
1639: l_EFFECTIVE_START_DATE per_people_f.EFFECTIVE_START_DATE%type;
1640: l_CURRENT_EMP_OR_APL_FLAG per_people_f.CURRENT_EMP_OR_APL_FLAG%type;
1641: l_CURRENT_EMPLOYEE_FLAG per_people_f.CURRENT_EMPLOYEE_FLAG%type;
1642: l_PERSON_TYPE_ID per_people_f.PERSON_TYPE_ID%type;
1643: --
1644: l_proc varchar2(20) := 'cancel_termination';
1645: --
1638: l_person_record per_people_f%rowtype;
1639: l_EFFECTIVE_START_DATE per_people_f.EFFECTIVE_START_DATE%type;
1640: l_CURRENT_EMP_OR_APL_FLAG per_people_f.CURRENT_EMP_OR_APL_FLAG%type;
1641: l_CURRENT_EMPLOYEE_FLAG per_people_f.CURRENT_EMPLOYEE_FLAG%type;
1642: l_PERSON_TYPE_ID per_people_f.PERSON_TYPE_ID%type;
1643: --
1644: l_proc varchar2(20) := 'cancel_termination';
1645: --
1646:
1711: --
1712: IF g_debug THEN
1713: hr_utility.set_location('Entering: '|| g_package || l_proc, 30);
1714: END IF;
1715: delete from per_people_f
1716: --changes for bug 5857638 here
1717: -- where effective_start_date = X_s_termination_date + 1
1718: where effective_end_date = X_s_termination_date
1719: --changes for bug 5857638 here
1721: IF g_debug THEN
1722: hr_utility.set_location('Entering: '|| g_package || l_proc, 40);
1723: END IF;
1724: --
1725: update per_people_f
1726: -- set effective_end_date = hr_general.end_of_time
1727: --changes for bug 5857638 here
1728: set EFFECTIVE_START_DATE =l_EFFECTIVE_START_DATE,
1729: CURRENT_EMP_OR_APL_FLAG =l_CURRENT_EMP_OR_APL_FLAG,
1815: ,X_Hire_Date DATE)
1816: IS
1817: cursor person
1818: is select *
1819: from per_people_f
1820: where person_id = X_Person_Id
1821: and X_Hire_date between
1822: effective_start_Date and effective_end_date
1823: for update of effective_end_date;
1893: open person;
1894: fetch person into per_rec;
1895:
1896: -- Start of Fix for Bug 2438403
1897: -- update per_people_f
1898: -- set effective_end_date = X_Hire_date - 1
1899: -- where current of person;
1900: -- End of Fix for Bug 2438403
1901:
2075: END IF;
2076:
2077: open person;
2078: fetch person into per_rec;
2079: update per_people_f
2080: set effective_end_date = X_Hire_date - 1
2081: where current of person;
2082: close person;
2083:
2339:
2340: cursor future_exists
2341: IS
2342: select 'Y'
2343: from per_people_f ppf
2344: ,per_person_types ppt
2345: ,per_startup_person_types pst
2346: where ppf.person_type_id = ppt.person_type_id
2347: and ppf.person_id = p_person_id
2395: IS
2396: cursor get_future_changes
2397: is
2398: select 'Y'
2399: from per_people_f p
2400: where p.effective_start_date > p_hire_date
2401: and p.person_id = p_person_id;
2402: --
2403: cursor check_person
2402: --
2403: cursor check_person
2404: is
2405: select 'Y'
2406: from per_people_f p
2407: where p.effective_start_date > p_hire_date - 1
2408: and p.effective_start_date <> p_s_hire_date
2409: and p.person_id = p_person_id;
2410: --