477: pr('Mass Realignment id is '||p_mass_realignment_id,' Action is '|| p_action);
478:
479: g_proc := 'execute_mre';
480:
481: hr_utility.set_location('Entering ' || l_proc,5);
482: l_ind := 10;
483:
484: BEGIN
485: FOR mre IN ghr_mre (p_mass_realignment_id)
504: exit;
505: END LOOP;
506: EXCEPTION
507: when REC_BUSY then
508: hr_utility.set_location('Mass Realignment is in use',1);
509: l_mslerrbuf := 'Error in '||l_proc||' Sql Err is '|| sqlerrm(sqlcode);
510: hr_utility.set_message(8301, 'GHR_38477_LOCK_ON_MRE');
511: hr_utility.raise_error;
512: when others then
506: EXCEPTION
507: when REC_BUSY then
508: hr_utility.set_location('Mass Realignment is in use',1);
509: l_mslerrbuf := 'Error in '||l_proc||' Sql Err is '|| sqlerrm(sqlcode);
510: hr_utility.set_message(8301, 'GHR_38477_LOCK_ON_MRE');
511: hr_utility.raise_error;
512: when others then
513: hr_utility.set_location
514: ('Error in '||l_proc||' Sql err is '||sqlerrm(sqlcode),1);
507: when REC_BUSY then
508: hr_utility.set_location('Mass Realignment is in use',1);
509: l_mslerrbuf := 'Error in '||l_proc||' Sql Err is '|| sqlerrm(sqlcode);
510: hr_utility.set_message(8301, 'GHR_38477_LOCK_ON_MRE');
511: hr_utility.raise_error;
512: when others then
513: hr_utility.set_location
514: ('Error in '||l_proc||' Sql err is '||sqlerrm(sqlcode),1);
515: l_mslerrbuf := 'Error in '||l_proc||' Sql Err is '|| sqlerrm(sqlcode);
509: l_mslerrbuf := 'Error in '||l_proc||' Sql Err is '|| sqlerrm(sqlcode);
510: hr_utility.set_message(8301, 'GHR_38477_LOCK_ON_MRE');
511: hr_utility.raise_error;
512: when others then
513: hr_utility.set_location
514: ('Error in '||l_proc||' Sql err is '||sqlerrm(sqlcode),1);
515: l_mslerrbuf := 'Error in '||l_proc||' Sql Err is '|| sqlerrm(sqlcode);
516: raise mass_error;
517: END;
524:
525: l_ind := 20;
526: IF UPPER(p_action) = 'CREATE' then
527: if l_pa_request_id is null then
528: hr_utility.set_message(8301, 'GHR_38567_SELECT_LAC_REMARKS');
529: hr_utility.raise_error;
530: END IF;
531: END IF;
532:
525: l_ind := 20;
526: IF UPPER(p_action) = 'CREATE' then
527: if l_pa_request_id is null then
528: hr_utility.set_message(8301, 'GHR_38567_SELECT_LAC_REMARKS');
529: hr_utility.raise_error;
530: END IF;
531: END IF;
532:
533: ghr_msl_pkg.get_lac_dtls(l_pa_request_id,
536: --purge_old_data(p_mass_realignment_id);
537:
538: l_ind := 30;
539:
540: hr_utility.set_location('After fetch mre '||to_char(l_effective_DATE),1);
541:
542: if p_old_organization_id is not null then
543: l_check_org_pos := 'O';
544: l_org_pos_id := p_old_organization_id;
683: l_part_time_hour);
684: EXCEPTION
685: when others then
686: pr('Error in Ghr_pa_requests_pkg.get_sf52_asg_ddf_details');
687: hr_utility.set_location('Error in Ghr_pa_requests_pkg.get_sf52_asg_ddf_details'||
688: 'Err is '||sqlerrm(sqlcode),20);
689: l_mslerrbuf := 'Error in get_sf52_asgddf_details Sql Err is '||
690: sqlerrm(sqlcode);
691: raise mass_error;
701: l_pay_basis);
702: EXCEPTION
703: --Bug#4179270,4126137,4086677 Added the get_message call.
704: when ghr_msl_pkg.msl_error then
705: l_mslerrbuf := hr_utility.get_message;
706: raise mass_error;
707: END;
708: l_ind := 70;
709: BEGIN
712: ,p_duty_station_id => l_duty_station_id);
713: EXCEPTION
714: when others then
715: pr('Error in Ghr_pa_requests_pkg.get_sf52_asg_ddf_details');
716: hr_utility.set_location('Error in Ghr_pa_requests_pkg.get_sf52_loc_ddf_details'||
717: 'Err is '||sqlerrm(sqlcode),20);
718: -- Bug 3718167 Added Person,SSN in the message instead of person_id
719: l_mslerrbuf := 'Error in get_sf52_loc_ddf_details Sql Err is '||
720: sqlerrm(sqlcode);
737: ,p_duty_station_desc => l_duty_station_desc);
738: EXCEPTION
739: when others then
740: pr('Error in Ghr_pa_requests_pkg.get_duty_station_details');
741: hr_utility.set_location('Error in Ghr_pa_requests_pkg.get_duty_station_details'||
742: 'Err is '||sqlerrm(sqlcode),20);
743: l_mslerrbuf := 'Error in get_duty_station_details Sql Err is '||
744: sqlerrm(sqlcode);
745: raise mass_error;
862: l_pay_basis);
863: EXCEPTION
864: --Bug#4179270,4126137,4086677 Added the get_message call.
865: when ghr_msl_pkg.msl_error then
866: l_mslerrbuf := hr_utility.get_message;
867: raise mass_error;
868: END;
869: l_ind := 200;
870: pr('Bef assign to sf52 rec');
965: ghr_pc_basic_pay.get_retained_grade_details
966: ( per.person_id,
967: l_effective_DATE);
968: l_pay_calc_in_data.pay_basis := p_retained_grade.pay_basis;
969: hr_utility.set_location('l_pay_calc_in_data.pay_basis ' || l_pay_calc_in_data.pay_basis,1000);
970: EXCEPTION
971: WHEN OTHERS THEN
972: l_mslerrbuf := 'Preview - Others error in Get retained grade '||
973: 'Error is '||' Sql Err is '|| sqlerrm(sqlcode);
982: ,l_message_set
983: ,l_calculated);
984:
985: IF l_message_set THEN
986: hr_utility.set_location( l_proc, 40);
987: l_calculated := FALSE;
988: --Begin Bug#4114068
989: hr_utility.get_message_details(l_mslerrbuf,l_appl_id);
990: IF l_mslerrbuf = 'GHR_38254_NO_CALC_PRD' THEN
985: IF l_message_set THEN
986: hr_utility.set_location( l_proc, 40);
987: l_calculated := FALSE;
988: --Begin Bug#4114068
989: hr_utility.get_message_details(l_mslerrbuf,l_appl_id);
990: IF l_mslerrbuf = 'GHR_38254_NO_CALC_PRD' THEN
991: raise ghr_pay_calc.unable_to_calculate;
992: ELSE
993: raise mass_error;
1042: l_new_other_pay_amount := null;
1043: END IF;
1044: --end Bug#4114068
1045: when others then
1046: hr_utility.set_location('Error in Ghr_pay_calc.sql_main_pay_calc '||
1047: 'Err is '||sqlerrm(sqlcode),20);
1048: l_mslerrbuf := 'Error in ghr_pay_calc Sql Err is '||
1049: sqlerrm(sqlcode);
1050: raise mass_error;
1112: EXCEPTION
1113: when mass_error then
1114: raise;
1115: when others then
1116: hr_utility.set_location('Error in ghr_pay_caps.do_pay_caps_main ' ||
1117: 'Err is '||sqlerrm(sqlcode),23);
1118: l_mslerrbuf := 'Error in do_pay_caps_main Sql Err is '|| sqlerrm(sqlcode);
1119: raise mass_error;
1120: END;
1163: pr('Create sf52 success');
1164:
1165: if l_errbuf is null then
1166: pr('No error in create sf52 sel flg is '||l_sel_flg);
1167: hr_utility.set_location('Before COMMITing',2);
1168:
1169: ghr_mto_int.log_message(
1170: p_procedure => 'Successful Completion',
1171: p_message => 'Name: '||per.full_name ||
1178: upd_ext_info_to_null(per.position_id,l_effective_DATE);
1179: COMMIT;
1180: ELSE
1181: pr('Error in create sf52',l_errbuf);
1182: hr_utility.set_location('Error in '||to_char(per.position_id),20);
1183: l_mslerrbuf := 'Error in create sf52 '|| l_errbuf;
1184: --l_recs_failed := l_recs_failed + 1;
1185: raise mass_error;
1186: END IF;
1357: END IF;
1358: END IF;
1359: EXCEPTION
1360: WHEN mass_ERROR THEN
1361: HR_UTILITY.SET_LOCATION('Error occurred in '||l_proc||' Sql error '||sqlerrm(sqlcode),10);
1362:
1363: BEGIN
1364: ROLLBACK TO EXECUTE_MRE_SP;
1365: EXCEPTION
1371: ' For Mass Realignment Name : '||p_mass_realignment_name||
1372: ' for Name : '||per.full_name ||
1373: ' SSN: ' ||per.national_identifier||
1374: l_mslerrbuf;
1375: hr_utility.set_location('before creating entry in log file',10);
1376: l_recs_failed := l_recs_failed + 1;
1377:
1378: BEGIN
1379: ghr_mto_int.log_message(
1381: p_message => l_log_text);
1382: COMMIT;
1383: EXCEPTION
1384: when others then
1385: hr_utility.set_message(8301, 'GHR_38475_ERROR_LOG_FAILURE');
1386: hr_utility.raise_error;
1387: END;
1388:
1389: --6997689
1382: COMMIT;
1383: EXCEPTION
1384: when others then
1385: hr_utility.set_message(8301, 'GHR_38475_ERROR_LOG_FAILURE');
1386: hr_utility.raise_error;
1387: END;
1388:
1389: --6997689
1390: BEGIN
1398: null;
1399: END;
1400: --6997689
1401: WHEN others then
1402: hr_utility.set_location('Error (Others) occurred in '||l_proc||
1403: ' Sql error '||sqlerrm(sqlcode),20);
1404:
1405: BEGIN
1406: ROLLBACK TO EXECUTE_MRE_SP;
1413: ' For Mass Realignment Name : '||p_mass_realignment_name||
1414: ' for Name : '||per.full_name ||
1415: ' SSN: ' ||per.national_identifier||
1416: ' Sql Err is '||sqlerrm(sqlcode);
1417: hr_utility.set_location('before creating entry in log file',20);
1418: l_recs_failed := l_recs_failed + 1;
1419: p_retcode := 2;
1420: p_errbuf := 'Error in '||l_proc || ' Details in GHR_PROCESS_LOG';
1421:
1425: p_message => l_log_text);
1426: COMMIT;
1427: EXCEPTION
1428: when others then
1429: hr_utility.set_message(8301, 'Create Error Log failed');
1430: hr_utility.raise_error;
1431: END;
1432: END;
1433: END IF;
1426: COMMIT;
1427: EXCEPTION
1428: when others then
1429: hr_utility.set_message(8301, 'Create Error Log failed');
1430: hr_utility.raise_error;
1431: END;
1432: END;
1433: END IF;
1434: END LOOP;
1583: p_procedure => 'Invalid_Duty_Station',
1584: p_message => l_log_text);
1585: EXCEPTION
1586: when others then
1587: hr_utility.set_message(8301, 'GHR_38475_ERROR_LOG_FAILURE');
1588: hr_utility.raise_error;
1589: END;
1590: l_log_text := NULL;
1591: l_recs_failed := l_recs_failed + 1;
1584: p_message => l_log_text);
1585: EXCEPTION
1586: when others then
1587: hr_utility.set_message(8301, 'GHR_38475_ERROR_LOG_FAILURE');
1588: hr_utility.raise_error;
1589: END;
1590: l_log_text := NULL;
1591: l_recs_failed := l_recs_failed + 1;
1592: ELSE
1734: ,p_duty_station_desc => l_duty_station_desc);
1735: END;
1736: -- Bug#4388288
1737:
1738: hr_utility.set_location('Vac.POS-l_position_title ' || l_position_title,5);
1739: hr_utility.set_location('Vac.POS-l_personnel_office_id ' || l_personnel_office_id,5);
1740: hr_utility.set_location('Vac.POS-l_org_structure_id ' || l_org_structure_id,5);
1741: hr_utility.set_location('Vac.POS-l_office_symbol ' || l_office_symbol,5);
1742: hr_utility.set_location('Vac.POS-l_sub_element_code ' || l_sub_element_code,5);
1735: END;
1736: -- Bug#4388288
1737:
1738: hr_utility.set_location('Vac.POS-l_position_title ' || l_position_title,5);
1739: hr_utility.set_location('Vac.POS-l_personnel_office_id ' || l_personnel_office_id,5);
1740: hr_utility.set_location('Vac.POS-l_org_structure_id ' || l_org_structure_id,5);
1741: hr_utility.set_location('Vac.POS-l_office_symbol ' || l_office_symbol,5);
1742: hr_utility.set_location('Vac.POS-l_sub_element_code ' || l_sub_element_code,5);
1743:
1736: -- Bug#4388288
1737:
1738: hr_utility.set_location('Vac.POS-l_position_title ' || l_position_title,5);
1739: hr_utility.set_location('Vac.POS-l_personnel_office_id ' || l_personnel_office_id,5);
1740: hr_utility.set_location('Vac.POS-l_org_structure_id ' || l_org_structure_id,5);
1741: hr_utility.set_location('Vac.POS-l_office_symbol ' || l_office_symbol,5);
1742: hr_utility.set_location('Vac.POS-l_sub_element_code ' || l_sub_element_code,5);
1743:
1744: IF check_eligibility(
1737:
1738: hr_utility.set_location('Vac.POS-l_position_title ' || l_position_title,5);
1739: hr_utility.set_location('Vac.POS-l_personnel_office_id ' || l_personnel_office_id,5);
1740: hr_utility.set_location('Vac.POS-l_org_structure_id ' || l_org_structure_id,5);
1741: hr_utility.set_location('Vac.POS-l_office_symbol ' || l_office_symbol,5);
1742: hr_utility.set_location('Vac.POS-l_sub_element_code ' || l_sub_element_code,5);
1743:
1744: IF check_eligibility(
1745: p_org_structure_id,
1738: hr_utility.set_location('Vac.POS-l_position_title ' || l_position_title,5);
1739: hr_utility.set_location('Vac.POS-l_personnel_office_id ' || l_personnel_office_id,5);
1740: hr_utility.set_location('Vac.POS-l_org_structure_id ' || l_org_structure_id,5);
1741: hr_utility.set_location('Vac.POS-l_office_symbol ' || l_office_symbol,5);
1742: hr_utility.set_location('Vac.POS-l_sub_element_code ' || l_sub_element_code,5);
1743:
1744: IF check_eligibility(
1745: p_org_structure_id,
1746: p_office_symbol,
1754: null,
1755: l_effective_DATE,
1756: null) THEN
1757: -----AVR
1758: hr_utility.set_location('Vac Pos Selected ' || l_position_title,5);
1759: ---dbms_output.put_line('After assigning agency code');
1760:
1761: -- Added by Dinkar for Updating Position details for vacant positions
1762:
1825: p_procedure => 'Invalid_Duty_Station',
1826: p_message => l_log_text);
1827: EXCEPTION
1828: when others then
1829: hr_utility.set_message(8301, 'GHR_38475_ERROR_LOG_FAILURE');
1830: hr_utility.raise_error;
1831: END;
1832: l_log_text := NULL;
1833: l_recs_failed := l_recs_failed + 1;
1826: p_message => l_log_text);
1827: EXCEPTION
1828: when others then
1829: hr_utility.set_message(8301, 'GHR_38475_ERROR_LOG_FAILURE');
1830: hr_utility.raise_error;
1831: END;
1832: l_log_text := NULL;
1833: l_recs_failed := l_recs_failed + 1;
1834: ELSE
1927: set status = 'P'
1928: WHERE mass_realignment_id = p_mass_realignment_id;
1929: EXCEPTION
1930: when others then
1931: HR_UTILITY.SET_LOCATION('Error in UpDATE ghr_mre Sql error '||sqlerrm(sqlcode),30);
1932: hr_utility.set_message(8301, 'GHR_38570_UPD_GHR_MRE_FAILURE');
1933: hr_utility.raise_error;
1934: END;
1935: END IF;
1928: WHERE mass_realignment_id = p_mass_realignment_id;
1929: EXCEPTION
1930: when others then
1931: HR_UTILITY.SET_LOCATION('Error in UpDATE ghr_mre Sql error '||sqlerrm(sqlcode),30);
1932: hr_utility.set_message(8301, 'GHR_38570_UPD_GHR_MRE_FAILURE');
1933: hr_utility.raise_error;
1934: END;
1935: END IF;
1936: END IF;
1929: EXCEPTION
1930: when others then
1931: HR_UTILITY.SET_LOCATION('Error in UpDATE ghr_mre Sql error '||sqlerrm(sqlcode),30);
1932: hr_utility.set_message(8301, 'GHR_38570_UPD_GHR_MRE_FAILURE');
1933: hr_utility.raise_error;
1934: END;
1935: END IF;
1936: END IF;
1937: COMMIT;
1951: END IF;
1952: END IF;
1953: EXCEPTION
1954: WHEN mass_ERROR THEN
1955: HR_UTILITY.SET_LOCATION('Error occurred in '||l_proc||' Sql error '||sqlerrm(sqlcode),10);
1956: BEGIN
1957: ROLLBACK TO EXECUTE_MRE_SP;
1958: EXCEPTION
1959: WHEN OTHERS THEN NULL;
1966: END IF;
1967: l_log_text := 'Error in '||l_proc||' '||
1968: ' For Mass Realignment Name : '||p_mass_realignment_name||
1969: l_mslerrbuf;
1970: hr_utility.set_location('before creating entry in log file',10);
1971: l_recs_failed := l_recs_failed + 1;
1972: p_retcode := 2;
1973: p_errbuf := 'Error in '||l_proc || ' Details in GHR_PROCESS_LOG';
1974:
1977: p_procedure => g_proc,
1978: p_message => l_log_text);
1979: EXCEPTION
1980: when others then
1981: hr_utility.set_message(8301, 'GHR_38475_ERROR_LOG_FAILURE');
1982: hr_utility.raise_error;
1983: END;
1984:
1985:
1978: p_message => l_log_text);
1979: EXCEPTION
1980: when others then
1981: hr_utility.set_message(8301, 'GHR_38475_ERROR_LOG_FAILURE');
1982: hr_utility.raise_error;
1983: END;
1984:
1985:
1986: WHEN OTHERS THEN
1983: END;
1984:
1985:
1986: WHEN OTHERS THEN
1987: HR_UTILITY.SET_LOCATION('Error (Others2) occurred in '||l_proc||' Sql error '||sqlerrm(sqlcode),30);
1988: BEGIN
1989: ROLLBACK TO EXECUTE_MRE_SP;
1990: EXCEPTION
1991: WHEN OTHERS THEN NULL;
1993: l_log_text := 'Error in '||l_proc||
1994: ' For Mass Realignment Name : '||p_mass_realignment_name||
1995: ' Sql Err is '||sqlerrm(sqlcode);
1996: l_recs_failed := l_recs_failed + 1;
1997: hr_utility.set_location('before creating entry in log file',30);
1998:
1999: p_errbuf := 'Error in '||l_proc || ' Details in GHR_PROCESS_LOG';
2000: p_retcode := 2;
2001: IF UPPER(p_action) = 'CREATE' THEN
2010: p_procedure => g_proc,
2011: p_message => l_log_text);
2012: EXCEPTION
2013: when others then
2014: hr_utility.set_message(8301, 'Create Error Log failed');
2015: hr_utility.raise_error;
2016: END;
2017: END EXECUTE_MRE;
2018:
2011: p_message => l_log_text);
2012: EXCEPTION
2013: when others then
2014: hr_utility.set_message(8301, 'Create Error Log failed');
2015: hr_utility.raise_error;
2016: END;
2017: END EXECUTE_MRE;
2018:
2019: --
2088: := g_package || '.pop_dtls_from_pa_req';
2089: BEGIN
2090: g_proc := 'pop_dtls_from_pa_req';
2091:
2092: hr_utility.set_location('Entering ' || l_proc,5);
2093: for pa_req_rec in ghr_pa_req_cur
2094: loop
2095: create_mass_act_prev (p_effective_DATE,
2096: pa_req_rec.employee_DATE_of_birth,
2122: pa_req_rec.EMPLOYEE_ASSIGNMENT_ID,
2123: pa_req_rec.PAY_RATE_DETERMINANT);
2124: exit;
2125: END LOOP;
2126: hr_utility.set_location('Exiting ' || l_proc,10);
2127: EXCEPTION
2128: when mass_error then raise;
2129: when others then
2130: pr('Error in '||l_proc);
2127: EXCEPTION
2128: when mass_error then raise;
2129: when others then
2130: pr('Error in '||l_proc);
2131: hr_utility.set_location('Error in '||l_proc||' Err is '||sqlerrm(sqlcode),20);
2132: l_mslerrbuf := 'Error in '||l_proc||' Sql Err is '|| sqlerrm(sqlcode);
2133: raise mass_error;
2134: END pop_dtls_from_pa_req;
2135:
2157: --Initilization for NOCOPY Changes
2158: --
2159: l_sel_flg := p_sel_flg;
2160: --
2161: hr_utility.set_location('Entering ' || l_proc,5);
2162: pr('in '||l_proc);
2163: l_line := 5;
2164: get_extra_info_comments(p_position_id,p_effective_DATE,l_sel_flg,
2165: l_comments,l_mre_id);
2209: -- Reset IN OUT params and Set OUT params to null
2210: p_sel_flg := l_sel_flg;
2211: --
2212: pr('Error in '||l_proc);
2213: hr_utility.set_location('Error in '||l_proc||' Err is '||sqlerrm(sqlcode),20);
2214: l_mslerrbuf := 'Error in '||l_proc||' @'||to_char(l_line)||' Sql Err is '|| sqlerrm(sqlcode);
2215:
2216: raise mass_error;
2217: END;
2240: l_proc VARCHAR2(72) := g_package || '.ins_upd_pos_extra_info';
2241: l_eff_DATE DATE;
2242:
2243: BEGIN
2244: hr_utility.set_location('Entering ' || l_proc,5);
2245: g_proc := 'ins_upd_pos_extra_info';
2246:
2247: if p_effective_DATE > sysDATE then
2248: l_eff_DATE := sysDATE;
2281: ,p_poei_INFORMATION4 => p_comment
2282: ,p_poei_INFORMATION14 => to_char(p_mre_id)
2283: ,P_POEI_INFORMATION_CATEGORY => 'GHR_US_POS_MASS_ACTIONS');
2284: EXCEPTION when others then
2285: hr_utility.set_location('UPDATE posei error 1' || l_proc,10);
2286: hr_utility.set_location('Error in '||l_proc||' Err is '||sqlerrm(sqlcode),20);
2287: END;
2288: ----- Reset the global variable
2289: ghr_api.g_api_dml := FALSE;
2282: ,p_poei_INFORMATION14 => to_char(p_mre_id)
2283: ,P_POEI_INFORMATION_CATEGORY => 'GHR_US_POS_MASS_ACTIONS');
2284: EXCEPTION when others then
2285: hr_utility.set_location('UPDATE posei error 1' || l_proc,10);
2286: hr_utility.set_location('Error in '||l_proc||' Err is '||sqlerrm(sqlcode),20);
2287: END;
2288: ----- Reset the global variable
2289: ghr_api.g_api_dml := FALSE;
2290:
2305: --Bug#4215231 Reset the global variable
2306: ghr_api.g_api_dml := FALSE;
2307:
2308: END IF;
2309: hr_utility.set_location('Exiting ' || l_proc,30);
2310:
2311: -- There is a trigger on Position extra Info. Whenever UPDATEd/created the
2312: -- main position associated with it becomes invalid.
2313: -- We shall call valiDATE_perwsdpo procedure to set the status = VALID.
2322: EXCEPTION
2323: when mass_error then raise;
2324: when others then
2325: pr('Error in '||l_proc);
2326: hr_utility.set_location('Error in '||l_proc||' Err is '||sqlerrm(sqlcode),20);
2327: l_mslerrbuf := 'Error in '||l_proc||' Sql Err is '|| sqlerrm(sqlcode);
2328: raise mass_error;
2329: END ins_upd_pos_extra_info;
2330:
2342: l_mre_name VARCHAR2(150);
2343: l_proc VARCHAR2(72) := g_package || '.get_mre_name';
2344: BEGIN
2345: g_proc := 'get_mre_name';
2346: hr_utility.set_location('Entering ' || l_proc,5);
2347: FOR mre_REC IN mre_cur
2348: LOOP
2349: l_mre_name := mre_rec.name;
2350: exit;
2361: := g_package || '.purge_old_data';
2362: BEGIN
2363: g_proc := 'purge_old_data';
2364:
2365: hr_utility.set_location('Entering ' || l_proc,5);
2366: delete from ghr_mass_actions_preview
2367: WHERE mass_action_type = 'REALIGNMENT'
2368: and session_id = userenv('sessionid');
2369: COMMIT;
2366: delete from ghr_mass_actions_preview
2367: WHERE mass_action_type = 'REALIGNMENT'
2368: and session_id = userenv('sessionid');
2369: COMMIT;
2370: hr_utility.set_location('Exiting ' || l_proc,10);
2371: EXCEPTION
2372: when mass_error then raise;
2373: when others then
2374: pr('Error in '||l_proc);
2371: EXCEPTION
2372: when mass_error then raise;
2373: when others then
2374: pr('Error in '||l_proc);
2375: hr_utility.set_location('Error in '||l_proc||' Err is '||sqlerrm(sqlcode),20);
2376: l_mslerrbuf := 'Error in '||l_proc||' Sql Err is '|| sqlerrm(sqlcode);
2377: raise mass_error;
2378: END;
2379:
2390: l_eff_DATE DATE;
2391: BEGIN
2392: g_proc := 'UPDATE_sel_flg';
2393:
2394: hr_utility.set_location('Entering ' || l_proc,5);
2395: if p_effective_DATE > sysDATE then
2396: l_eff_DATE := sysDATE;
2397: ELSE
2398: l_eff_DATE := p_effective_DATE;
2420: ,p_poei_INFORMATION5 => NULL
2421: ,p_poei_INFORMATION6 => NULL
2422: ,P_POEI_INFORMATION_CATEGORY => 'GHR_US_POS_MASS_ACTIONS');
2423: EXCEPTION when others then
2424: hr_utility.set_location('UPDATE posei error 2' || l_proc,10);
2425: hr_utility.set_location('Error in '||l_proc||' Err is '||sqlerrm(sqlcode),20);
2426: END;
2427:
2428: ----- Reset the global variable
2421: ,p_poei_INFORMATION6 => NULL
2422: ,P_POEI_INFORMATION_CATEGORY => 'GHR_US_POS_MASS_ACTIONS');
2423: EXCEPTION when others then
2424: hr_utility.set_location('UPDATE posei error 2' || l_proc,10);
2425: hr_utility.set_location('Error in '||l_proc||' Err is '||sqlerrm(sqlcode),20);
2426: END;
2427:
2428: ----- Reset the global variable
2429: ghr_api.g_api_dml := FALSE;
2433: ---- ghr_valiDATE_perwsdpo.valiDATE_perwsdpo(p_position_id);
2434: ---- ghr_valiDATE_perwsdpo.UPDATE_posn_status(p_position_id);
2435:
2436: END IF;
2437: hr_utility.set_location('Exiting ' || l_proc,30);
2438: EXCEPTION
2439: when mass_error then raise;
2440: when others then
2441: hr_utility.set_location('Error in '||l_proc||' Err is '||sqlerrm(sqlcode),20);
2437: hr_utility.set_location('Exiting ' || l_proc,30);
2438: EXCEPTION
2439: when mass_error then raise;
2440: when others then
2441: hr_utility.set_location('Error in '||l_proc||' Err is '||sqlerrm(sqlcode),20);
2442: l_mslerrbuf := 'Error in '||l_proc||' Sql Err is '|| sqlerrm(sqlcode);
2443: raise mass_error;
2444: END UPDATE_sel_flg;
2445:
2463: l_row_cnt NUMBER := 0;
2464: l_proc VARCHAR2(72) := g_package || '.check_eligibility';
2465: BEGIN
2466: g_proc := 'check_eligibility';
2467: hr_utility.set_location('Entering ' || l_proc,5);
2468:
2469: if p_org_structure_id is not null then
2470: if p_org_structure_id <> nvl(p_l_org_structure_id,'NULL!~') then
2471: return false;
2529: EXCEPTION
2530: when mass_error then raise;
2531: when others then
2532: pr('Error in '||l_proc);
2533: hr_utility.set_location('Error in '||l_proc||' Err is '||sqlerrm(sqlcode),20);
2534: l_mslerrbuf := 'Error in '||l_proc||' Sql Err is '|| sqlerrm(sqlcode);
2535: raise mass_error;
2536: END check_eligibility;
2537:
2683:
2684: BEGIN
2685: g_proc := 'get_pos_grp1_ddf';
2686:
2687: hr_utility.set_location('Entering ' || l_proc,5);
2688: ghr_history_fetch.fetch_positionei
2689: (p_position_id => p_position_id
2690: ,p_information_type => 'GHR_US_POS_GRP1'
2691: ,p_DATE_effective => p_effective_DATE
2695: p_office_symbol := p_pos_ei_data.poei_information4;
2696: p_org_structure_id := p_pos_ei_data.poei_information5;
2697: p_position_organization := p_pos_ei_data.poei_information21;
2698:
2699: hr_utility.set_location('Exiting ' || l_proc,10);
2700: EXCEPTION
2701: when mass_error then raise;
2702: when others then
2703: -- NOCOPY changes
2708: p_position_organization := NULL;
2709: p_pos_ei_data := NULL;
2710:
2711: pr('Error in '||l_proc);
2712: hr_utility.set_location('Error in '||l_proc||' Err is '||sqlerrm(sqlcode),20);
2713: l_mslerrbuf := 'Error in '||l_proc||' Sql Err is '|| sqlerrm(sqlcode);
2714: raise mass_error;
2715: END get_pos_grp1_ddf;
2716:
2732: l_pos_ei_data per_position_extra_info%rowtype;
2733:
2734: BEGIN
2735: g_proc := 'get_pos_grp2_ddf';
2736: hr_utility.set_location('Entering ' || l_proc,5);
2737: ghr_history_fetch.fetch_positionei
2738: (p_position_id => p_position_id
2739: ,p_information_type => 'GHR_US_POS_GRP2'
2740: ,p_DATE_effective => p_effective_DATE
2743: p_org_func_code := l_pos_ei_data.poei_information4;
2744: p_appropriation_code1 := l_pos_ei_data.poei_information13;
2745: p_appropriation_code2 := l_pos_ei_data.poei_information14;
2746:
2747: hr_utility.set_location('Exiting ' || l_proc,10);
2748: EXCEPTION
2749: when mass_error then raise;
2750: when others then
2751: -- NOCOPY changes
2754: p_appropriation_code1 := NULL;
2755: p_appropriation_code2 := NULL;
2756: --
2757: pr('Error in '||l_proc);
2758: hr_utility.set_location('Error in '||l_proc||' Err is '||sqlerrm(sqlcode),20);
2759: l_mslerrbuf := 'Error in '||l_proc||' Sql Err is '|| sqlerrm(sqlcode);
2760: raise mass_error;
2761: END get_pos_grp2_ddf;
2762:
2788: := g_package || '.get_field_desc';
2789: BEGIN
2790: g_proc := 'GET_FIELD_DESC';
2791:
2792: hr_utility.set_location('Entering ' || l_proc,5);
2793: p_agency_desc := GET_FND_COMMON_LOOKUP (p_agency_code,'GHR_US_AGENCY_CODE');
2794: p_to_agency_desc := GET_FND_COMMON_LOOKUP (p_to_agency_code,
2795: 'GHR_US_AGENCY_CODE');
2796: p_approp_code1_desc := GET_FND_COMMON_LOOKUP (p_approp_code1,
2841: l_proc VARCHAR2(72) := g_package || '.get_fnd_common_lookup';
2842: BEGIN
2843: g_proc := 'GET_FND_COMMON_LOOKUP';
2844:
2845: hr_utility.set_location('Entering ' || l_proc,5);
2846: FOR lookup_rec IN CUR_lookup
2847: LOOP
2848: l_meaning := lookup_rec.meaning;
2849: exit;
2865: l_pp_desc VARCHAR2(150);
2866: l_proc VARCHAR2(72) := g_package || '.get_pp_name';
2867: BEGIN
2868: g_proc := 'GET_PP_NAME';
2869: hr_utility.set_location('Entering ' || l_proc,5);
2870: FOR PP_REC IN CUR_PP
2871: LOOP
2872: l_pp_desc := pp_rec.description;
2873: exit;
2889: l_poi_desc VARCHAR2(150);
2890: l_proc VARCHAR2(72) := g_package || '.get_poi_name';
2891: BEGIN
2892: g_proc := 'GET_POI_NAME';
2893: hr_utility.set_location('Entering ' || l_proc,5);
2894: FOR POI_REC IN CUR_POI
2895: LOOP
2896: l_poi_desc := poi_rec.description;
2897: exit;
2920: l_proc VARCHAR2(72)
2921: := g_package || '.get_organization_name';
2922: BEGIN
2923: g_proc := 'get_organization_name';
2924: hr_utility.set_location('Entering ' || l_proc,5);
2925: for mre_rec in mre_org_cur (p_org_id)
2926: LOOP
2927: l_org_name := mre_rec.name;
2928: l_org_id := mre_rec.organization_id;
2951: l_char_mre_id VARCHAR2(30);
2952:
2953: BEGIN
2954: g_proc := 'get_extra_info_comments';
2955: hr_utility.set_location('Entering ' || l_proc,5);
2956: pr('In '||l_proc);
2957:
2958: -- Initialization for NOCOPY Changes
2959: l_sel_flag := p_sel_flag;
3005: p_comments := l_comments;
3006: p_mre_id := l_mre_id;
3007: --
3008: pr('Error in '||l_proc);
3009: hr_utility.set_location('Error in '||l_proc||' Err is '||sqlerrm(sqlcode),20);
3010: l_mslerrbuf := 'Error in '||l_proc||' Sql Err is '|| sqlerrm(sqlcode);
3011: raise mass_error;
3012: END;
3013:
3078:
3079: BEGIN
3080: g_proc := 'create_mass_act_prev';
3081:
3082: hr_utility.set_location('Entering ' || l_proc,5);
3083:
3084: pr('Inside ghr_cpdf_temp insert realign id ',to_char(p_mass_realignment_id),null);
3085: pr('t_pos_org is',t_position_organization);
3086:
3118: p_cust_rec => l_cust_rec);
3119:
3120: EXCEPTION
3121: when others then
3122: hr_utility.set_location('Error in Mass Act Custom '||
3123: 'Err is '||sqlerrm(sqlcode),20);
3124: l_mslerrbuf := 'Error in Mass Act Custom '||
3125: 'Err is '|| sqlerrm(sqlcode);
3126: raise mass_error;
3313: l_cust_rec.user_attribute29,
3314: l_cust_rec.user_attribute30
3315: );
3316:
3317: hr_utility.set_location('Exiting ' || l_proc,10);
3318: EXCEPTION
3319: when mass_error then raise;
3320: when others then
3321: pr('Error in '||l_proc);
3319: when mass_error then raise;
3320: when others then
3321: pr('Error in '||l_proc);
3322: pr('Position title is '||p_position_title||' Length is '||to_char(length(p_position_title)));
3323: hr_utility.set_location('Error in '||l_proc||' Err is '||sqlerrm(sqlcode),20);
3324: l_mslerrbuf := 'Error in '||l_proc||' Sql Err is '|| sqlerrm(sqlcode);
3325: raise mass_error;
3326: END create_mass_act_prev;
3327:
3651: BEGIN
3652:
3653: g_proc := 'assign_to_sf52_rec';
3654:
3655: hr_utility.set_location('Entering ' || l_proc,5);
3656: p_sf52_rec.person_id := p_person_id;
3657: p_sf52_rec.employee_first_name := p_first_name;
3658: p_sf52_rec.employee_last_name := p_last_name;
3659: p_sf52_rec.employee_middle_names := p_middle_names;
3695: p_sf52_rec.FIRST_ACTION_LA_CODE2 := p_lac_sf52_rec.FIRST_ACTION_LA_CODE2;
3696: p_sf52_rec.FIRST_ACTION_LA_DESC1 := p_lac_sf52_rec.FIRST_ACTION_LA_DESC1;
3697: p_sf52_rec.FIRST_ACTION_LA_DESC2 := p_lac_sf52_rec.FIRST_ACTION_LA_DESC2;
3698:
3699: hr_utility.set_location('Exiting ' || l_proc,10);
3700:
3701: EXCEPTION
3702: when mass_error then raise;
3703: when others then
3706: --
3707: p_sf52_rec := null;
3708: --
3709: pr('Error in '||l_proc);
3710: hr_utility.set_location('Error in '||l_proc||' Err is '||sqlerrm(sqlcode),20);
3711: l_mslerrbuf := 'Error in '||l_proc||' Sql Err is '|| sqlerrm(sqlcode);
3712: raise mass_error;
3713: END assign_to_sf52_rec;
3714:
3772: ,P_POEI_INFORMATION13 => null
3773: ,P_POEI_INFORMATION14 => null
3774: ,P_POEI_INFORMATION18 => null);
3775: EXCEPTION when others then
3776: hr_utility.set_location('UPDATE posei error 3' || l_proc,10);
3777: hr_utility.set_location('Error in '||l_proc||' Err is '||sqlerrm(sqlcode),20);
3778: END;
3779:
3780: ----- Reset the global variable
3773: ,P_POEI_INFORMATION14 => null
3774: ,P_POEI_INFORMATION18 => null);
3775: EXCEPTION when others then
3776: hr_utility.set_location('UPDATE posei error 3' || l_proc,10);
3777: hr_utility.set_location('Error in '||l_proc||' Err is '||sqlerrm(sqlcode),20);
3778: END;
3779:
3780: ----- Reset the global variable
3781: ghr_api.g_api_dml := FALSE;
3814: l_eff_DATE DATE;
3815:
3816: BEGIN
3817: g_proc := 'upd_ext_info_api';
3818: hr_utility.set_location('Entering ' || l_proc,5);
3819: if p_effective_DATE > sysDATE then
3820: l_eff_DATE := sysDATE;
3821: ELSE
3822: l_eff_DATE := p_effective_DATE;
3879: ,P_POEI_INFORMATION12 => info12
3880: ,P_POEI_INFORMATION13 => info13
3881: ,P_POEI_INFORMATION18 => info18);
3882: EXCEPTION when others then
3883: hr_utility.set_location('UPDATE posei error 4' || l_proc,10);
3884: hr_utility.set_location('Error in '||l_proc||' Err is '||sqlerrm(sqlcode),20);
3885: END;
3886:
3887: ----- Reset the global variable
3880: ,P_POEI_INFORMATION13 => info13
3881: ,P_POEI_INFORMATION18 => info18);
3882: EXCEPTION when others then
3883: hr_utility.set_location('UPDATE posei error 4' || l_proc,10);
3884: hr_utility.set_location('Error in '||l_proc||' Err is '||sqlerrm(sqlcode),20);
3885: END;
3886:
3887: ----- Reset the global variable
3888: ghr_api.g_api_dml := FALSE;
3906: ---DBMS_OUTPUT.PUT_LINE(msg||'-'||par1||' -'||par2||'-');
3907: EXCEPTION
3908: when others then
3909: pr('Error in '||'pr');
3910: hr_utility.set_location('Error in pr '||' Err is '||sqlerrm(sqlcode),20);
3911: l_mslerrbuf := 'Error in pr Sql Err is '|| sqlerrm(sqlcode);
3912: raise mass_error;
3913: END;
3914:
3915: Procedure UPDATE_position_info
3916: (p_position_data_rec ghr_sf52_pos_UPDATE.position_data_rec_type) is
3917: l_proc VARCHAR2(30):='UPDATE_position_info';
3918: Begin
3919: hr_utility.set_location('Entering ' || l_proc, 10);
3920: hr_utility.set_location('Vacant Position ID ' || to_char(p_position_data_rec.position_id), 10);
3921: ghr_session.set_session_var_for_core( p_position_data_rec.effective_END_DATE );
3922: ghr_sf52_pos_UPDATE.UPDATE_position_info
3923: ( p_pos_data_rec => p_position_data_rec);
3916: (p_position_data_rec ghr_sf52_pos_UPDATE.position_data_rec_type) is
3917: l_proc VARCHAR2(30):='UPDATE_position_info';
3918: Begin
3919: hr_utility.set_location('Entering ' || l_proc, 10);
3920: hr_utility.set_location('Vacant Position ID ' || to_char(p_position_data_rec.position_id), 10);
3921: ghr_session.set_session_var_for_core( p_position_data_rec.effective_END_DATE );
3922: ghr_sf52_pos_UPDATE.UPDATE_position_info
3923: ( p_pos_data_rec => p_position_data_rec);
3924: hr_utility.set_location('Calling Pust_UPDATE_process ' || l_proc, 50);
3920: hr_utility.set_location('Vacant Position ID ' || to_char(p_position_data_rec.position_id), 10);
3921: ghr_session.set_session_var_for_core( p_position_data_rec.effective_END_DATE );
3922: ghr_sf52_pos_UPDATE.UPDATE_position_info
3923: ( p_pos_data_rec => p_position_data_rec);
3924: hr_utility.set_location('Calling Pust_UPDATE_process ' || l_proc, 50);
3925: ghr_history_api.post_UPDATE_process;
3926: hr_utility.set_location('Leaving ' || l_proc, 100);
3927:
3928: END;
3922: ghr_sf52_pos_UPDATE.UPDATE_position_info
3923: ( p_pos_data_rec => p_position_data_rec);
3924: hr_utility.set_location('Calling Pust_UPDATE_process ' || l_proc, 50);
3925: ghr_history_api.post_UPDATE_process;
3926: hr_utility.set_location('Leaving ' || l_proc, 100);
3927:
3928: END;
3929:
3930: