3: --
4: -- Package Variables
5: --
6: g_package varchar2(33) := ' hr_person_internal.';
7: g_debug boolean := hr_utility.debug_enabled;
8: --
9: -- ----------------------------------------------------------------------------
10: -- |--------------------------< product_installed >---------------------------|
11: -- ----------------------------------------------------------------------------
19: --
20: BEGIN
21: --
22: if g_debug then
23: hr_utility.set_location('Entering:'|| l_proc, 10);
24: end if;
25: --
26: p_yes_no := 'N';
27: p_oracle_username := 'DUMMY';
41: when NO_DATA_FOUND then null;
42: end;
43: --
44: if g_debug then
45: hr_utility.set_location('Leaving:'|| l_proc, 100);
46: end if;
47: --
48: END product_installed;
49: --
69: --
70: EXCEPTION
71: when NO_DATA_FOUND then
72: --
73: hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');
74: hr_utility.set_message_token ('PROCEDURE','PERSON_EXISTANCE_CHECK');
75: hr_utility.set_message_token ('STEP', '1');
76: hr_utility.raise_error;
77: --
70: EXCEPTION
71: when NO_DATA_FOUND then
72: --
73: hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');
74: hr_utility.set_message_token ('PROCEDURE','PERSON_EXISTANCE_CHECK');
75: hr_utility.set_message_token ('STEP', '1');
76: hr_utility.raise_error;
77: --
78: END person_existance_check;
71: when NO_DATA_FOUND then
72: --
73: hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');
74: hr_utility.set_message_token ('PROCEDURE','PERSON_EXISTANCE_CHECK');
75: hr_utility.set_message_token ('STEP', '1');
76: hr_utility.raise_error;
77: --
78: END person_existance_check;
79: --
72: --
73: hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');
74: hr_utility.set_message_token ('PROCEDURE','PERSON_EXISTANCE_CHECK');
75: hr_utility.set_message_token ('STEP', '1');
76: hr_utility.raise_error;
77: --
78: END person_existance_check;
79: --
80: -- ----------------------------------------------------------------------------
102: );
103: --
104: exception
105: when NO_DATA_FOUND then
106: hr_utility.set_message (801,'HR_6274_ALL_AOL_PER_NO_DEL');
107: hr_utility.raise_error;
108: end;
109: --
110: END aol_predel_validation;
103: --
104: exception
105: when NO_DATA_FOUND then
106: hr_utility.set_message (801,'HR_6274_ALL_AOL_PER_NO_DEL');
107: hr_utility.raise_error;
108: end;
109: --
110: END aol_predel_validation;
111: --
143: );
144: --
145: EXCEPTION
146: when NO_DATA_FOUND then
147: hr_utility.set_message (801,'HR_6305_ALL_ASSGT_SET_NO_DEL');
148: hr_utility.raise_error;
149: --
150: END assignment_set_check;
151: --
144: --
145: EXCEPTION
146: when NO_DATA_FOUND then
147: hr_utility.set_message (801,'HR_6305_ALL_ASSGT_SET_NO_DEL');
148: hr_utility.raise_error;
149: --
150: END assignment_set_check;
151: --
152: -- ----------------------------------------------------------------------------
181: and ppa.action_type <> 'Z');
182: --
183: exception
184: when NO_DATA_FOUND then
185: hr_utility.set_message (801,'HR_6237_ALL_ASS_ACTIONS_EXIST');
186: hr_utility.raise_error;
187: end;
188: --
189: END pay_predel_validation;
182: --
183: exception
184: when NO_DATA_FOUND then
185: hr_utility.set_message (801,'HR_6237_ALL_ASS_ACTIONS_EXIST');
186: hr_utility.raise_error;
187: end;
188: --
189: END pay_predel_validation;
190: --
238: --
239: BEGIN
240: --
241: if g_debug then
242: hr_utility.set_location('Entering:'|| l_proc, 10);
243: end if;
244: --
245: FOR each_entry in csr_this_persons_ee LOOP
246: --
252: --
253: END LOOP;
254: --
255: if g_debug then
256: hr_utility.set_location('Leaving:'|| l_proc, 10);
257: end if;
258: --
259: END closed_element_entry_check;
260: --
291: and c.contact_relationship_id = e.contact_relationship_id);
292: --
293: exception
294: when NO_DATA_FOUND then
295: hr_utility.set_message (801,'HR_6981_ALL_CONT_COBRA_EXISTS');
296: hr_utility.raise_error;
297: end;
298: --
299: END contact_cobra_validation;
292: --
293: exception
294: when NO_DATA_FOUND then
295: hr_utility.set_message (801,'HR_6981_ALL_CONT_COBRA_EXISTS');
296: hr_utility.raise_error;
297: end;
298: --
299: END contact_cobra_validation;
300: --
315: --
316: begin
317: --
318: if g_debug then
319: hr_utility.set_location('Entering:'|| l_proc, 10);
320: end if;
321: --
322: -- Check that no child records exist for the
323: -- person on per_contracts_f when
332: where person_id = p_person_id);
333: --
334: exception
335: when NO_DATA_FOUND then
336: hr_utility.set_message(800,'PER_52851_PER_NO_DEL_CONTRACTS');
337: hr_utility.raise_error;
338: --
339: END contracts_check;
340: --
333: --
334: exception
335: when NO_DATA_FOUND then
336: hr_utility.set_message(800,'PER_52851_PER_NO_DEL_CONTRACTS');
337: hr_utility.raise_error;
338: --
339: END contracts_check;
340: --
341: -- ----------------------------------------------------------------------------
370: --
371: BEGIN
372: --
373: if g_debug then
374: hr_utility.set_location('Entering:'|| l_proc, 10);
375: end if;
376: --
377: hr_person_internal.person_existance_check(P_CONTACT_PERSON_ID);
378: --
376: --
377: hr_person_internal.person_existance_check(P_CONTACT_PERSON_ID);
378: --
379: if g_debug then
380: hr_utility.set_location(l_proc, 20);
381: end if;
382: --
383: begin
384: --
399: return;
400: end if;
401: --
402: if g_debug then
403: hr_utility.set_location(l_proc, 30);
404: end if;
405: --
406: begin
407: --
428: l_delete_contact := 'Y';
429: hr_person_internal.strong_predel_validation(P_CONTACT_PERSON_ID,
430: p_effective_date);
431: exception
432: when hr_utility.hr_error then
433: l_delete_contact := 'N';
434: end;
435: --
436: if l_delete_contact = 'Y' then
439: --
440: end;
441: --
442: if g_debug then
443: hr_utility.set_location('Leaving:'||l_proc, 99);
444: end if;
445: END check_contact;
446: --
447: -- ----------------------------------------------------------------------------
655: --
656: BEGIN
657: --
658: if g_debug then
659: hr_utility.set_location('Entering:'|| l_proc, 10);
660: end if;
661: --
662: hr_person_internal.person_existance_check(P_PERSON_ID);
663: --
661: --
662: hr_person_internal.person_existance_check(P_PERSON_ID);
663: --
664: if g_debug then
665: hr_utility.set_location(l_proc, 20);
666: end if;
667: --
668: hr_person_internal.product_installed('PAY'
669: ,l_pay_status
670: ,l_pay_installed
671: ,l_oracle_id);
672: --
673: if g_debug then
674: hr_utility.set_location(l_proc, 30);
675: end if;
676: --
677: hr_person_internal.aol_predel_validation(P_PERSON_ID);
678: --
676: --
677: hr_person_internal.aol_predel_validation(P_PERSON_ID);
678: --
679: if g_debug then
680: hr_utility.set_location(l_proc, 40);
681: end if;
682: --
683: hr_person_internal.assignment_set_check(P_PERSON_ID);
684: --
682: --
683: hr_person_internal.assignment_set_check(P_PERSON_ID);
684: --
685: if g_debug then
686: hr_utility.set_location(l_proc, 50);
687: end if;
688: --
689: if (l_pay_installed = 'Y') then
690: --
688: --
689: if (l_pay_installed = 'Y') then
690: --
691: if g_debug then
692: hr_utility.set_location(l_proc, 55);
693: end if;
694: --
695: hr_person_internal.pay_predel_validation(P_PERSON_ID);
696: --
719: --
720: hr_person_internal.ben_predel_validation(P_PERSON_ID,p_effective_date);
721: --
722: if g_debug then
723: hr_utility.set_location(l_proc, 60);
724: end if;
725: --
726: hr_person_internal.closed_element_entry_check(P_PERSON_ID, p_effective_date);
727: --
725: --
726: hr_person_internal.closed_element_entry_check(P_PERSON_ID, p_effective_date);
727: --
728: if g_debug then
729: hr_utility.set_location(l_proc, 70);
730: end if;
731: --
732: hr_person_internal.contact_cobra_validation(P_PERSON_ID);
733: --
731: --
732: hr_person_internal.contact_cobra_validation(P_PERSON_ID);
733: --
734: if g_debug then
735: hr_utility.set_location(l_proc, 80);
736: end if;
737: --
738: hr_person_internal.contracts_check(P_PERSON_ID);
739: --
737: --
738: hr_person_internal.contracts_check(P_PERSON_ID);
739: --
740: if g_debug then
741: hr_utility.set_location('Leaving:'||l_proc, 100);
742: end if;
743: --
744: END weak_predel_validation;
745: --
780: --
781: BEGIN
782: --
783: if g_debug then
784: hr_utility.set_location('Entering:'|| l_proc, 10);
785: end if;
786: --
787: -- check if person type changes exist.
788: --
810: and actual_termination_date is not null)); --fix for bug 6730008.
811: --
812: if l_person_types > 0 then
813: --
814: hr_utility.set_message (801,'HR_6324_ALL_PER_ADD_NO_DEL');
815: hr_utility.raise_error;
816: --
817: end if;
818: --
811: --
812: if l_person_types > 0 then
813: --
814: hr_utility.set_message (801,'HR_6324_ALL_PER_ADD_NO_DEL');
815: hr_utility.raise_error;
816: --
817: end if;
818: --
819: if g_debug then
816: --
817: end if;
818: --
819: if g_debug then
820: hr_utility.set_location(l_proc, 20);
821: end if;
822: --
823: begin
824: --
848: and a.assignment_id = r.assignment_id));
849: --
850: exception
851: when NO_DATA_FOUND then
852: hr_utility.set_message (801,'HR_6325_ALL_PER_RL_NO_DEL');
853: hr_utility.raise_error;
854: end;
855: --
856: if g_debug then
849: --
850: exception
851: when NO_DATA_FOUND then
852: hr_utility.set_message (801,'HR_6325_ALL_PER_RL_NO_DEL');
853: hr_utility.raise_error;
854: end;
855: --
856: if g_debug then
857: hr_utility.set_location(l_proc, 30);
853: hr_utility.raise_error;
854: end;
855: --
856: if g_debug then
857: hr_utility.set_location(l_proc, 30);
858: end if;
859: --
860: begin
861: --
869: or r.contact_person_id = P_PERSON_ID);
870: --
871: exception
872: when NO_DATA_FOUND then
873: hr_utility.set_message (801,'HR_6326_ALL_PER_CR_NO_DEL');
874: hr_utility.raise_error;
875: end;
876: --
877: if g_debug then
870: --
871: exception
872: when NO_DATA_FOUND then
873: hr_utility.set_message (801,'HR_6326_ALL_PER_CR_NO_DEL');
874: hr_utility.raise_error;
875: end;
876: --
877: if g_debug then
878: hr_utility.set_location(l_proc, 40);
874: hr_utility.raise_error;
875: end;
876: --
877: if g_debug then
878: hr_utility.set_location(l_proc, 40);
879: end if;
880: --
881: begin
882: --
889: where e.internal_contact_person_id = P_PERSON_ID);
890: --
891: exception
892: when NO_DATA_FOUND then
893: hr_utility.set_message (801,'HR_6328_ALL_PER_EVENT_NO_DEL');
894: hr_utility.raise_error;
895: end;
896: --
897: if g_debug then
890: --
891: exception
892: when NO_DATA_FOUND then
893: hr_utility.set_message (801,'HR_6328_ALL_PER_EVENT_NO_DEL');
894: hr_utility.raise_error;
895: end;
896: --
897: if g_debug then
898: hr_utility.set_location(l_proc, 50);
894: hr_utility.raise_error;
895: end;
896: --
897: if g_debug then
898: hr_utility.set_location(l_proc, 50);
899: end if;
900: --
901: begin
902: --
909: where b.person_id = P_PERSON_ID);
910: --
911: exception
912: when NO_DATA_FOUND then
913: hr_utility.set_message (801,'HR_6329_ALL_PER_BOOK_NO_DEL');
914: hr_utility.raise_error;
915: end;
916: --
917: if g_debug then
910: --
911: exception
912: when NO_DATA_FOUND then
913: hr_utility.set_message (801,'HR_6329_ALL_PER_BOOK_NO_DEL');
914: hr_utility.raise_error;
915: end;
916: --
917: if g_debug then
918: hr_utility.set_location(l_proc, 60);
914: hr_utility.raise_error;
915: end;
916: --
917: if g_debug then
918: hr_utility.set_location(l_proc, 60);
919: end if;
920: --
921: begin
922: --
930: and a.effective_start_date >= p_effective_date);
931: --
932: exception
933: when NO_DATA_FOUND then
934: hr_utility.set_message (801,'HR_6330_ALL_PER_ASSGT_NO_DEL');
935: hr_utility.raise_error;
936: end;
937: --
938: if g_debug then
931: --
932: exception
933: when NO_DATA_FOUND then
934: hr_utility.set_message (801,'HR_6330_ALL_PER_ASSGT_NO_DEL');
935: hr_utility.raise_error;
936: end;
937: --
938: if g_debug then
939: hr_utility.set_location(l_proc, 70);
935: hr_utility.raise_error;
936: end;
937: --
938: if g_debug then
939: hr_utility.set_location(l_proc, 70);
940: end if;
941: --
942: begin
943: --
951: or a.supervisor_id = P_PERSON_ID);
952: --
953: exception
954: when NO_DATA_FOUND then
955: hr_utility.set_message (801,'HR_6331_ALL_PER_RT_SUP_NO_DEL');
956: hr_utility.raise_error;
957: end;
958: --
959: if g_debug then
952: --
953: exception
954: when NO_DATA_FOUND then
955: hr_utility.set_message (801,'HR_6331_ALL_PER_RT_SUP_NO_DEL');
956: hr_utility.raise_error;
957: end;
958: --
959: if g_debug then
960: hr_utility.set_location(l_proc, 80);
956: hr_utility.raise_error;
957: end;
958: --
959: if g_debug then
960: hr_utility.set_location(l_proc, 80);
961: end if;
962: --
963: begin
964: --
971: where p.termination_accepted_person_id = P_PERSON_ID);
972: --
973: exception
974: when NO_DATA_FOUND then
975: hr_utility.set_message (801,'HR_6332_ALL_PER_TERM_NO_DEL');
976: hr_utility.raise_error;
977: end;
978: --
979: if g_debug then
972: --
973: exception
974: when NO_DATA_FOUND then
975: hr_utility.set_message (801,'HR_6332_ALL_PER_TERM_NO_DEL');
976: hr_utility.raise_error;
977: end;
978: --
979: if g_debug then
980: hr_utility.set_location(l_proc, 90);
976: hr_utility.raise_error;
977: end;
978: --
979: if g_debug then
980: hr_utility.set_location(l_proc, 90);
981: end if;
982: --
983: begin
984: --
991: where a.person_id = P_PERSON_ID);
992: --
993: exception
994: when NO_DATA_FOUND then
995: hr_utility.set_message (801,'HR_6334_ALL_PER_ANAL_NO_DEL');
996: hr_utility.raise_error;
997: end;
998: --
999: if g_debug then
992: --
993: exception
994: when NO_DATA_FOUND then
995: hr_utility.set_message (801,'HR_6334_ALL_PER_ANAL_NO_DEL');
996: hr_utility.raise_error;
997: end;
998: --
999: if g_debug then
1000: hr_utility.set_location(l_proc, 100);
996: hr_utility.raise_error;
997: end;
998: --
999: if g_debug then
1000: hr_utility.set_location(l_proc, 100);
1001: end if;
1002: --
1003: begin
1004: --
1011: where a.person_id = P_PERSON_ID);
1012: --
1013: exception
1014: when NO_DATA_FOUND then
1015: hr_utility.set_message (801,'HR_6335_ALL_PER_ABS_ATT_NO_DEL');
1016: hr_utility.raise_error;
1017: end;
1018: --
1019: if g_debug then
1012: --
1013: exception
1014: when NO_DATA_FOUND then
1015: hr_utility.set_message (801,'HR_6335_ALL_PER_ABS_ATT_NO_DEL');
1016: hr_utility.raise_error;
1017: end;
1018: --
1019: if g_debug then
1020: hr_utility.set_location(l_proc, 110);
1016: hr_utility.raise_error;
1017: end;
1018: --
1019: if g_debug then
1020: hr_utility.set_location(l_proc, 110);
1021: end if;
1022: --
1023: begin
1024: --
1032: or a.replacement_person_id = P_PERSON_ID);
1033: --
1034: exception
1035: when NO_DATA_FOUND then
1036: hr_utility.set_message (801,'HR_6336_ALL_PER_AUTH_NO_DEL');
1037: hr_utility.raise_error;
1038: end;
1039: --
1040: if g_debug then
1033: --
1034: exception
1035: when NO_DATA_FOUND then
1036: hr_utility.set_message (801,'HR_6336_ALL_PER_AUTH_NO_DEL');
1037: hr_utility.raise_error;
1038: end;
1039: --
1040: if g_debug then
1041: hr_utility.set_location(l_proc, 120);
1037: hr_utility.raise_error;
1038: end;
1039: --
1040: if g_debug then
1041: hr_utility.set_location(l_proc, 120);
1042: end if;
1043: --
1044: begin
1045: --
1053: or r.internal_contact_person_id = P_PERSON_ID);
1054: --
1055: exception
1056: when NO_DATA_FOUND then
1057: hr_utility.set_message (801,'HR_6337_ALL_PER_REC_NO_DEL');
1058: hr_utility.raise_error;
1059: end;
1060: --
1061: if g_debug then
1054: --
1055: exception
1056: when NO_DATA_FOUND then
1057: hr_utility.set_message (801,'HR_6337_ALL_PER_REC_NO_DEL');
1058: hr_utility.raise_error;
1059: end;
1060: --
1061: if g_debug then
1062: hr_utility.set_location(l_proc, 130);
1058: hr_utility.raise_error;
1059: end;
1060: --
1061: if g_debug then
1062: hr_utility.set_location(l_proc, 130);
1063: end if;
1064: --
1065: begin
1066: --
1079: fnd_message.raise_error;
1080: end;
1081: --
1082: if g_debug then
1083: hr_utility.set_location(l_proc, 140);
1084: end if;
1085: --
1086: begin
1087: --
1099: fnd_message.raise_error;
1100: end;
1101: --
1102: if g_debug then
1103: hr_utility.set_location(l_proc, 150);
1104: end if;
1105: --
1106: begin
1107: --
1114: where r.person_id = P_PERSON_ID);
1115: --
1116: exception
1117: when NO_DATA_FOUND then
1118: hr_utility.set_message (801,'HR_6338_ALL_PER_REQ_NO_DEL');
1119: hr_utility.raise_error;
1120: end;
1121: --
1122: if g_debug then
1115: --
1116: exception
1117: when NO_DATA_FOUND then
1118: hr_utility.set_message (801,'HR_6338_ALL_PER_REQ_NO_DEL');
1119: hr_utility.raise_error;
1120: end;
1121: --
1122: if g_debug then
1123: hr_utility.set_location(l_proc, 160);
1119: hr_utility.raise_error;
1120: end;
1121: --
1122: if g_debug then
1123: hr_utility.set_location(l_proc, 160);
1124: end if;
1125: --
1126: begin
1127: --
1134: where v.recruiter_id = P_PERSON_ID);
1135: --
1136: exception
1137: when NO_DATA_FOUND then
1138: hr_utility.set_message (801,'HR_6339_ALL_PER_VAC_NO_DEL');
1139: hr_utility.raise_error;
1140: end;
1141: --
1142: if g_debug then
1135: --
1136: exception
1137: when NO_DATA_FOUND then
1138: hr_utility.set_message (801,'HR_6339_ALL_PER_VAC_NO_DEL');
1139: hr_utility.raise_error;
1140: end;
1141: --
1142: if g_debug then
1143: hr_utility.set_location(l_proc, 170);
1139: hr_utility.raise_error;
1140: end;
1141: --
1142: if g_debug then
1143: hr_utility.set_location(l_proc, 170);
1144: end if;
1145: --
1146: -- Any discretionary link element entries?
1147: --
1161: and l.standard_link_flag = 'N');
1162: --
1163: exception
1164: when NO_DATA_FOUND then
1165: hr_utility.set_message (801,'HR_6340_ALL_PER_DISC_NO_DEL');
1166: hr_utility.raise_error;
1167: end;
1168: --
1169: if g_debug then
1162: --
1163: exception
1164: when NO_DATA_FOUND then
1165: hr_utility.set_message (801,'HR_6340_ALL_PER_DISC_NO_DEL');
1166: hr_utility.raise_error;
1167: end;
1168: --
1169: if g_debug then
1170: hr_utility.set_location(l_proc, 180);
1166: hr_utility.raise_error;
1167: end;
1168: --
1169: if g_debug then
1170: hr_utility.set_location(l_proc, 180);
1171: end if;
1172: --
1173: -- Any entry adjustments, overrides etc.?
1174: -- (We cannot capture manual enty of standard link entries)
1187: and e.entry_type <> 'E');
1188: --
1189: exception
1190: when NO_DATA_FOUND then
1191: hr_utility.set_message (801,'HR_6375_ALL_PER_ENTRY_NO_DEL');
1192: hr_utility.raise_error;
1193: end;
1194: --
1195: if g_debug then
1188: --
1189: exception
1190: when NO_DATA_FOUND then
1191: hr_utility.set_message (801,'HR_6375_ALL_PER_ENTRY_NO_DEL');
1192: hr_utility.raise_error;
1193: end;
1194: --
1195: if g_debug then
1196: hr_utility.set_location(l_proc, 190);
1192: hr_utility.raise_error;
1193: end;
1194: --
1195: if g_debug then
1196: hr_utility.set_location(l_proc, 190);
1197: end if;
1198: --
1199: begin
1200: --
1211: and a.assignment_id = i.assignment_id));
1212: --
1213: exception
1214: when NO_DATA_FOUND then
1215: hr_utility.set_message (801,'HR_6341_ALL_PER_ASS_INFO_DEL');
1216: hr_utility.raise_error;
1217: end;
1218: --
1219: if g_debug then
1212: --
1213: exception
1214: when NO_DATA_FOUND then
1215: hr_utility.set_message (801,'HR_6341_ALL_PER_ASS_INFO_DEL');
1216: hr_utility.raise_error;
1217: end;
1218: --
1219: if g_debug then
1220: hr_utility.set_location(l_proc, 200);
1216: hr_utility.raise_error;
1217: end;
1218: --
1219: if g_debug then
1220: hr_utility.set_location(l_proc, 200);
1221: end if;
1222: --
1223: begin
1224: --
1235: and a.assignment_id = s.assignment_id));
1236: --
1237: exception
1238: when NO_DATA_FOUND then
1239: hr_utility.set_message (801,'HR_6340_ALL_PER_DISC_NO_DEL');
1240: hr_utility.raise_error;
1241: end;
1242: --
1243: if g_debug then
1236: --
1237: exception
1238: when NO_DATA_FOUND then
1239: hr_utility.set_message (801,'HR_6340_ALL_PER_DISC_NO_DEL');
1240: hr_utility.raise_error;
1241: end;
1242: --
1243: if g_debug then
1244: hr_utility.set_location(l_proc, 210);
1240: hr_utility.raise_error;
1241: end;
1242: --
1243: if g_debug then
1244: hr_utility.set_location(l_proc, 210);
1245: end if;
1246: --
1247: begin
1248: --
1259: and a.assignment_id = e.assignment_id));
1260: --
1261: exception
1262: when NO_DATA_FOUND then
1263: hr_utility.set_message (801,'HR_6344_ALL_PER_INT_NO_DEL');
1264: hr_utility.raise_error;
1265: end;
1266: --
1267: if g_debug then
1260: --
1261: exception
1262: when NO_DATA_FOUND then
1263: hr_utility.set_message (801,'HR_6344_ALL_PER_INT_NO_DEL');
1264: hr_utility.raise_error;
1265: end;
1266: --
1267: if g_debug then
1268: hr_utility.set_location(l_proc, 220);
1264: hr_utility.raise_error;
1265: end;
1266: --
1267: if g_debug then
1268: hr_utility.set_location(l_proc, 220);
1269: end if;
1270: --
1271: begin
1272: --
1283: and a.assignment_id = p.assignment_id));
1284: --
1285: exception
1286: when NO_DATA_FOUND then
1287: hr_utility.set_message (801,'HR_6374_ALL_PER_SPINE_NO_DEL');
1288: hr_utility.raise_error;
1289: end;
1290: --
1291: if g_debug then
1284: --
1285: exception
1286: when NO_DATA_FOUND then
1287: hr_utility.set_message (801,'HR_6374_ALL_PER_SPINE_NO_DEL');
1288: hr_utility.raise_error;
1289: end;
1290: --
1291: if g_debug then
1292: hr_utility.set_location(l_proc, 230);
1288: hr_utility.raise_error;
1289: end;
1290: --
1291: if g_debug then
1292: hr_utility.set_location(l_proc, 230);
1293: end if;
1294: --
1295: begin
1296: --
1307: and a.assignment_id = t.assignment_id));
1308: --
1309: exception
1310: when NO_DATA_FOUND then
1311: hr_utility.set_message (801,'HR_6379_ALL_PER_QP_NO_DEL');
1312: hr_utility.raise_error;
1313: end;
1314: --
1315: if g_debug then
1308: --
1309: exception
1310: when NO_DATA_FOUND then
1311: hr_utility.set_message (801,'HR_6379_ALL_PER_QP_NO_DEL');
1312: hr_utility.raise_error;
1313: end;
1314: --
1315: if g_debug then
1316: hr_utility.set_location(l_proc, 240);
1312: hr_utility.raise_error;
1313: end;
1314: --
1315: if g_debug then
1316: hr_utility.set_location(l_proc, 240);
1317: end if;
1318: --
1319: begin
1320: --
1331: and a.assignment_id = c.assignment_id));
1332: --
1333: exception
1334: when NO_DATA_FOUND then
1335: hr_utility.set_message (801,'HR_6476_ALL_PER_COB_NO_DEL');
1336: hr_utility.raise_error;
1337: end;
1338: --
1339: if g_debug then
1332: --
1333: exception
1334: when NO_DATA_FOUND then
1335: hr_utility.set_message (801,'HR_6476_ALL_PER_COB_NO_DEL');
1336: hr_utility.raise_error;
1337: end;
1338: --
1339: if g_debug then
1340: hr_utility.set_location(l_proc, 250);
1336: hr_utility.raise_error;
1337: end;
1338: --
1339: if g_debug then
1340: hr_utility.set_location(l_proc, 250);
1341: end if;
1342: --
1343: OPEN ben_ext_chg_log (p_person_id);
1344: --
1358: --
1359: ben_person_delete.perform_ri_check(p_person_id);
1360: --
1361: if g_debug then
1362: hr_utility.set_location(l_proc, 260);
1363: end if;
1364: --
1365: -- Validation for OTA.
1366: --
1368: --
1369: -- validation for PA
1370: --
1371: if g_debug then
1372: hr_utility.set_location(l_proc, 270);
1373: end if;
1374: --
1375: pa_person.pa_predel_validation(P_PERSON_ID);
1376: --
1376: --
1377: -- validation for WIP
1378: --
1379: if g_debug then
1380: hr_utility.set_location(l_proc, 280);
1381: end if;
1382: --
1383: wip_person.wip_predel_validation(P_PERSON_ID);
1384: --
1384: --
1385: -- validation for ENG
1386: --
1387: if g_debug then
1388: hr_utility.set_location(l_proc, 290);
1389: end if;
1390: --
1391: eng_person.eng_predel_validation(P_PERSON_ID);
1392: --
1392: --
1393: -- validation for AP
1394: --
1395: if g_debug then
1396: hr_utility.set_location(l_proc, 300);
1397: end if;
1398: --
1399: ap_person.ap_predel_validation(P_PERSON_ID);
1400: --
1400: --
1401: -- validation for FA
1402: --
1403: if g_debug then
1404: hr_utility.set_location(l_proc, 310);
1405: end if;
1406: --
1407: fa_person.fa_predel_validation(P_PERSON_ID);
1408: --
1408: --
1409: -- validation for PO
1410: --
1411: if g_debug then
1412: hr_utility.set_location(l_proc, 320);
1413: end if;
1414: --
1415: po_person.po_predel_validation(P_PERSON_ID);
1416: --
1416: --
1417: -- validation for RCV
1418: --
1419: if g_debug then
1420: hr_utility.set_location(l_proc, 330);
1421: end if;
1422: --
1423: rcv_person.rcv_predel_validation(P_PERSON_ID);
1424: --
1422: --
1423: rcv_person.rcv_predel_validation(P_PERSON_ID);
1424: --
1425: if g_debug then
1426: hr_utility.set_location('Leaving:'||l_proc, 999);
1427: end if;
1428: --
1429: END strong_predel_validation;
1430: --
1475: --
1476: BEGIN
1477: --
1478: if g_debug then
1479: hr_utility.set_location('Entering:'||l_proc, 10);
1480: end if;
1481: --
1482: hr_person_internal.person_existance_check(P_PERSON_ID);
1483: --
1481: --
1482: hr_person_internal.person_existance_check(P_PERSON_ID);
1483: --
1484: if g_debug then
1485: hr_utility.set_location(l_proc, 20);
1486: end if;
1487: --
1488: open LOCK_PERSON_ROWS;
1489: --
1497: --
1498: -- End of Fix for WWBUG 1294400
1499: --
1500: if g_debug then
1501: hr_utility.set_location(l_proc, 30);
1502: end if;
1503: --
1504: hr_security.delete_per_from_list(P_PERSON_ID);
1505: --
1503: --
1504: hr_security.delete_per_from_list(P_PERSON_ID);
1505: --
1506: if g_debug then
1507: hr_utility.set_location(l_proc, 40);
1508: end if;
1509: --
1510: -- Lock assignments now, delete at end.
1511: -- Can select into a variable as max one assignment should exist (as
1523: when NO_DATA_FOUND then null;
1524: end;
1525: --
1526: if g_debug then
1527: hr_utility.set_location(l_proc, 50);
1528: end if;
1529: --
1530: begin
1531: --
1535: when NO_DATA_FOUND then null;
1536: end;
1537: --
1538: if g_debug then
1539: hr_utility.set_location(l_proc, 60);
1540: end if;
1541: --
1542: begin
1543: --
1547: when NO_DATA_FOUND then null;
1548: end;
1549: --
1550: if g_debug then
1551: hr_utility.set_location(l_proc, 70);
1552: end if;
1553: --
1554: begin
1555: delete from per_addresses a
1558: when NO_DATA_FOUND then null;
1559: end;
1560: --
1561: if g_debug then
1562: hr_utility.set_location(l_proc, 80);
1563: end if;
1564: --
1565: begin
1566: delete from per_phones a
1570: when NO_DATA_FOUND then null;
1571: end;
1572: --
1573: if g_debug then
1574: hr_utility.set_location(l_proc, 90);
1575: end if;
1576: --
1577: begin
1578: delete from pay_cost_allocations_f a
1581: when NO_DATA_FOUND then null;
1582: end;
1583: --
1584: if g_debug then
1585: hr_utility.set_location(l_proc, 100);
1586: end if;
1587: --
1588: begin
1589: delete from pay_element_entry_values_f v
1595: when NO_DATA_FOUND then null;
1596: end;
1597: --
1598: if g_debug then
1599: hr_utility.set_location(l_proc, 110);
1600: end if;
1601: --
1602: begin
1603: delete from pay_run_results r
1610: when NO_DATA_FOUND then null;
1611: end;
1612: --
1613: if g_debug then
1614: hr_utility.set_location(l_proc, 120);
1615: end if;
1616: --
1617: begin
1618: delete from pay_element_entries_f e
1621: when NO_DATA_FOUND then null;
1622: end;
1623: --
1624: if g_debug then
1625: hr_utility.set_location(l_proc, 130);
1626: end if;
1627: --
1628: -- No exception, should succeed.
1629: --
1632: where ass.assignment_id = l_assignment_id;
1633: end;
1634: --
1635: if g_debug then
1636: hr_utility.set_location(l_proc, 140);
1637: end if;
1638: --
1639: begin
1640: delete from per_periods_of_service p
1643: when NO_DATA_FOUND then null;
1644: end;
1645: --
1646: if g_debug then
1647: hr_utility.set_location(l_proc, 150);
1648: end if;
1649: --
1650: begin
1651: delete from per_applications a
1656: --
1657: -- Added this delete for quickhire checklists
1658: --
1659: if g_debug then
1660: hr_utility.set_location(l_proc, 160);
1661: end if;
1662: --
1663: begin
1664: delete from per_checklist_items
1670: -- End addition for quickhire checklists
1671: --
1672: --
1673: if g_debug then
1674: hr_utility.set_location(l_proc, 170);
1675: end if;
1676: --
1677: close LOCK_PERSON_ROWS;
1678: --
1676: --
1677: close LOCK_PERSON_ROWS;
1678: --
1679: if g_debug then
1680: hr_utility.set_location(l_proc, 180);
1681: end if;
1682: --
1683: begin
1684: delete from per_people_f
1687: when NO_DATA_FOUND then null;
1688: end;
1689: --
1690: if g_debug then
1691: hr_utility.set_location(l_proc, 190);
1692: end if;
1693: --
1694: begin
1695: delete from per_periods_of_placement p
1698: when NO_DATA_FOUND then null;
1699: end;
1700: --
1701: if g_debug then
1702: hr_utility.set_location('Leaving:'||l_proc, 999);
1703: end if;
1704: --
1705: begin
1706: for attached_docs_rec in attached_docs_cursor1
1723: exception
1724: when NO_DATA_FOUND then null;
1725: end;
1726: if g_debug then
1727: hr_utility.set_location('Leaving:'||l_proc, 999);
1728: end if;
1729: --
1730: END people_default_deletes;
1731: --
1771: --
1772: BEGIN
1773: --
1774: if g_debug then
1775: hr_utility.set_location('Entering:'||l_proc, 10);
1776: end if;
1777: --
1778: hr_person_internal.person_existance_check(P_PERSON_ID);
1779: --
1777: --
1778: hr_person_internal.person_existance_check(P_PERSON_ID);
1779: --
1780: if g_debug then
1781: hr_utility.set_location(l_proc, 10);
1782: end if;
1783: --
1784: open LOCK_PERSON_ROWS;
1785: --
1785: --
1786: -- Now start cascade.
1787: --
1788: if g_debug then
1789: hr_utility.set_location(l_proc, 20);
1790: end if;
1791: --
1792: begin
1793: delete from per_person_list l
1796: when NO_DATA_FOUND then null;
1797: end;
1798: --
1799: if g_debug then
1800: hr_utility.set_location(l_proc, 30);
1801: end if;
1802: --
1803: -- Can select into a variable as only one assignment should exist (as
1804: -- strong_predel_validation has already been performed).
1811: FOR UPDATE;
1812: end;
1813: --
1814: if g_debug then
1815: hr_utility.set_location(l_proc, 40);
1816: end if;
1817: --
1818: begin
1819: delete from per_addresses a
1822: when NO_DATA_FOUND then null;
1823: end;
1824: --
1825: if g_debug then
1826: hr_utility.set_location(l_proc, 50);
1827: end if;
1828: --
1829: begin
1830: delete from per_phones a
1834: when NO_DATA_FOUND then null;
1835: end;
1836: --
1837: if g_debug then
1838: hr_utility.set_location(l_proc, 60);
1839: end if;
1840: --
1841: begin
1842: delete from per_assignments_f ass
1843: where ass.assignment_id = l_assignment_id;
1844: end;
1845: --
1846: if g_debug then
1847: hr_utility.set_location(l_proc, 70);
1848: end if;
1849: --
1850: begin
1851: delete from per_applications a
1856: --
1857: -- Added this delete for quickhire checklists
1858: --
1859: if g_debug then
1860: hr_utility.set_location(l_proc, 80);
1861: end if;
1862: --
1863: begin
1864: delete from per_checklist_items
1871: --
1872: -- Added this delete for PTU
1873: --
1874: if g_debug then
1875: hr_utility.set_location(l_proc, 90);
1876: end if;
1877: --
1878: begin
1879: delete from per_person_type_usages_f
1884: --
1885: -- End addition for PTU
1886: --
1887: if g_debug then
1888: hr_utility.set_location(l_proc, 100);
1889: end if;
1890: --
1891: close LOCK_PERSON_ROWS;
1892: --
1890: --
1891: close LOCK_PERSON_ROWS;
1892: --
1893: if g_debug then
1894: hr_utility.set_location(l_proc, 110);
1895: end if;
1896: --
1897: begin
1898: delete from per_people_f
1901: when NO_DATA_FOUND then null;
1902: end;
1903: --
1904: if g_debug then
1905: hr_utility.set_location('Leaving:'||l_proc, 999);
1906: end if;
1907: --
1908: begin
1909: for attached_docs_rec in attached_docs_cursor2
1926: exception
1927: when NO_DATA_FOUND then null;
1928: end;
1929: if g_debug then
1930: hr_utility.set_location('Leaving:'||l_proc, 999);
1931: end if;
1932: --
1933: END applicant_default_deletes;
1934: --
2050: -- Fix for 4490489 ends here
2051: BEGIN
2052: --
2053: if g_debug then
2054: hr_utility.set_location('Entering:'||l_proc, 10);
2055: end if;
2056: --
2057: -- Lock person rows, delete at end of procedure.
2058: --
2060: --
2061: -- Now start cascade.
2062: --
2063: if g_debug then
2064: hr_utility.set_location(l_proc, 20);
2065: end if;
2066: --
2067: -- bug fix 3732129 starts here.
2068: -- fetching the assignment ids into a pl/sql table.
2073: --
2074: -- bug fix 3732129 ends here.
2075: --
2076: if g_debug then
2077: hr_utility.set_location(l_proc, 30);
2078: end if;
2079: --
2080: begin
2081: --
2085: --
2086: exception
2087: when NO_DATA_FOUND then
2088: if g_debug then
2089: hr_utility.set_location(l_proc, 40);
2090: end if;
2091: end;
2092: --
2093: if g_debug then
2090: end if;
2091: end;
2092: --
2093: if g_debug then
2094: hr_utility.set_location(l_proc, 50);
2095: end if;
2096: --
2097: begin
2098: -- bug fix 3732129.
2106: --
2107: exception
2108: when NO_DATA_FOUND then
2109: if g_debug then
2110: hr_utility.set_location(l_proc, 60);
2111: end if;
2112: end;
2113: --
2114: -- Leave per_letter_requests for the moment - may not be necessary to
2115: -- delete the parent with no children which requires some work with
2116: -- cursors.
2117: --
2118: if g_debug then
2119: hr_utility.set_location(l_proc, 70);
2120: end if;
2121: --
2122: begin
2123: --
2126: --
2127: exception
2128: when NO_DATA_FOUND then
2129: if g_debug then
2130: hr_utility.set_location(l_proc, 80);
2131: end if;
2132: end;
2133: --
2134: if g_debug then
2131: end if;
2132: end;
2133: --
2134: if g_debug then
2135: hr_utility.set_location(l_proc, 90);
2136: end if;
2137: --
2138: begin
2139: --
2143: --
2144: exception
2145: when NO_DATA_FOUND then
2146: if g_debug then
2147: hr_utility.set_location(l_proc, 100);
2148: end if;
2149: end;
2150: --
2151: if g_debug then
2148: end if;
2149: end;
2150: --
2151: if g_debug then
2152: hr_utility.set_location(l_proc, 110);
2153: end if;
2154: --
2155: begin
2156: --
2160: --
2161: exception
2162: when NO_DATA_FOUND then
2163: if g_debug then
2164: hr_utility.set_location(l_proc, 120);
2165: end if;
2166: end;
2167: --
2168: if g_debug then
2165: end if;
2166: end;
2167: --
2168: if g_debug then
2169: hr_utility.set_location(l_proc, 130);
2170: end if;
2171: --
2172: begin
2173: --
2176: --
2177: exception
2178: when NO_DATA_FOUND then
2179: if g_debug then
2180: hr_utility.set_location(l_proc, 140);
2181: end if;
2182: end;
2183: --
2184: if g_debug then
2181: end if;
2182: end;
2183: --
2184: if g_debug then
2185: hr_utility.set_location(l_proc, 150);
2186: end if;
2187: --
2188: -- Delete of per_periods_of_service at end after delete of
2189: -- per_assignments_f.
2196: --
2197: exception
2198: when NO_DATA_FOUND then
2199: if g_debug then
2200: hr_utility.set_location(l_proc, 160);
2201: end if;
2202: end;
2203: --
2204: if g_debug then
2201: end if;
2202: end;
2203: --
2204: if g_debug then
2205: hr_utility.set_location(l_proc, 170);
2206: end if;
2207: --
2208: begin
2209: --
2213: --
2214: exception
2215: when NO_DATA_FOUND then
2216: if g_debug then
2217: hr_utility.set_location(l_proc, 180);
2218: end if;
2219: end;
2220: --
2221: if g_debug then
2218: end if;
2219: end;
2220: --
2221: if g_debug then
2222: hr_utility.set_location(l_proc, 190);
2223: end if;
2224: --
2225: begin
2226: --
2230: --
2231: exception
2232: when NO_DATA_FOUND then
2233: if g_debug then
2234: hr_utility.set_location(l_proc, 200);
2235: end if;
2236: end;
2237: --
2238: if g_debug then
2235: end if;
2236: end;
2237: --
2238: if g_debug then
2239: hr_utility.set_location(l_proc, 210);
2240: end if;
2241: --
2242: -- Bug 4873360 fix for performance repository sql id 14960331.
2243: -- Rewrote the delete query commented out below (and already once tuned for
2260: exception
2261: when NO_DATA_FOUND then
2262: l_dummy := null;
2263: if g_debug then
2264: hr_utility.set_location(l_proc, 211);
2265: end if;
2266: end;
2267: if l_dummy = 1
2268: then
2278: and qsa.type = 'PARTICIPANT'
2279: and par.person_id = P_PERSON_ID);
2280: end if;
2281: if g_debug then
2282: hr_utility.set_location(l_proc, 215);
2283: end if;
2284: end; -- Delete from HR_QUEST_ANSWER_VALUES: PARTICIPANTS
2285: begin -- Delete from HR_QUEST_ANSWER_VALUES: APPRAISALS
2286: begin
2295: exception
2296: when NO_DATA_FOUND then
2297: l_dummy := null;
2298: if g_debug then
2299: hr_utility.set_location(l_proc, 220);
2300: end if;
2301: end;
2302: if l_dummy = 2
2303: then
2313: and qsa.type='APPRAISAL'
2314: and (apr.appraisee_person_id = P_PERSON_ID
2315: or apr.appraiser_person_id = P_PERSON_ID));
2316: if g_debug then
2317: hr_utility.set_location(l_proc, 221);
2318: end if;
2319: end if;
2320: end; -- Delete from HR_QUEST_ANSWER_VALUES: APPRAISALS
2321: end; -- Delete from HR_QUEST_ANSWER_VALUES
2339: ); -- Fix 3619599
2340: exception
2341: when NO_DATA_FOUND then
2342: if g_debug then
2343: hr_utility.set_location(l_proc, 220);
2344: end if;
2345: end; */
2346: -- Now delete from HR_QUEST_ANSWERS
2347: begin
2370: --
2371: exception
2372: when NO_DATA_FOUND then
2373: if g_debug then
2374: hr_utility.set_location(l_proc, 230);
2375: end if;
2376: end;
2377: --
2378: -- Now delete from per_participants
2399: --
2400: exception
2401: when NO_DATA_FOUND then
2402: if g_debug then
2403: hr_utility.set_location(l_proc, 240);
2404: end if;
2405: end;
2406: --
2407: -- Now delete from per_appraisals
2414: --
2415: exception
2416: when NO_DATA_FOUND then
2417: if g_debug then
2418: hr_utility.set_location(l_proc, 250);
2419: end if;
2420: end;
2421: --
2422: if g_debug then
2419: end if;
2420: end;
2421: --
2422: if g_debug then
2423: hr_utility.set_location(l_proc, 260);
2424: end if;
2425: --
2426: hr_security.delete_per_from_list(P_PERSON_ID);
2427: --
2425: --
2426: hr_security.delete_per_from_list(P_PERSON_ID);
2427: --
2428: if g_debug then
2429: hr_utility.set_location(l_proc, 270);
2430: end if;
2431: --
2432: begin
2433: --
2437: --
2438: exception
2439: when NO_DATA_FOUND then
2440: if g_debug then
2441: hr_utility.set_location(l_proc, 280);
2442: end if;
2443: end;
2444: --
2445: if g_debug then
2442: end if;
2443: end;
2444: --
2445: if g_debug then
2446: hr_utility.set_location(l_proc, 290);
2447: end if;
2448: --
2449: begin
2450: --
2454: --
2455: exception
2456: when NO_DATA_FOUND then
2457: if g_debug then
2458: hr_utility.set_location(l_proc, 300);
2459: end if;
2460: end;
2461: --
2462: if g_debug then
2459: end if;
2460: end;
2461: --
2462: if g_debug then
2463: hr_utility.set_location(l_proc, 310);
2464: end if;
2465: --
2466: begin
2467: --
2471: --
2472: exception
2473: when NO_DATA_FOUND then
2474: if g_debug then
2475: hr_utility.set_location(l_proc, 320);
2476: end if;
2477: end;
2478: --
2479: if g_debug then
2476: end if;
2477: end;
2478: --
2479: if g_debug then
2480: hr_utility.set_location(l_proc, 330);
2481: end if;
2482: --
2483: begin
2484: --
2488: --
2489: exception
2490: when NO_DATA_FOUND then
2491: if g_debug then
2492: hr_utility.set_location(l_proc, 340);
2493: end if;
2494: end;
2495: --
2496: if g_debug then
2493: end if;
2494: end;
2495: --
2496: if g_debug then
2497: hr_utility.set_location(l_proc, 350);
2498: end if;
2499: --
2500: -- LOCK ASSIGNMENTS NOW: have to use cursor as cannot return >1 row for
2501: -- 'into' part of PL/SQL.
2502: --
2503: OPEN csr_lock_assignment_rows;
2504: --
2505: if g_debug then
2506: hr_utility.set_location(l_proc, 360);
2507: end if;
2508: --
2509: begin
2510: --
2534: --
2535: exception
2536: when NO_DATA_FOUND then
2537: if g_debug then
2538: hr_utility.set_location(l_proc, 370);
2539: end if;
2540: end;
2541: --
2542: if g_debug then
2539: end if;
2540: end;
2541: --
2542: if g_debug then
2543: hr_utility.set_location(l_proc, 380);
2544: end if;
2545: --
2546: begin
2547: --
2553: --
2554: exception
2555: when NO_DATA_FOUND then
2556: if g_debug then
2557: hr_utility.set_location(l_proc, 390);
2558: end if;
2559: end;
2560: --
2561: if g_debug then
2558: end if;
2559: end;
2560: --
2561: if g_debug then
2562: hr_utility.set_location(l_proc, 400);
2563: end if;
2564: --
2565: begin
2566: --
2572: --
2573: exception
2574: when NO_DATA_FOUND then
2575: if g_debug then
2576: hr_utility.set_location(l_proc, 410);
2577: end if;
2578: end;
2579: --
2580: if g_debug then
2577: end if;
2578: end;
2579: --
2580: if g_debug then
2581: hr_utility.set_location(l_proc, 420);
2582: end if;
2583: --
2584: begin
2585: --
2591: --
2592: exception
2593: when NO_DATA_FOUND then
2594: if g_debug then
2595: hr_utility.set_location(l_proc, 430);
2596: end if;
2597: end;
2598: --
2599: if g_debug then
2596: end if;
2597: end;
2598: --
2599: if g_debug then
2600: hr_utility.set_location(l_proc, 440);
2601: end if;
2602: --
2603: begin
2604: --
2610: --
2611: exception
2612: when NO_DATA_FOUND then
2613: if g_debug then
2614: hr_utility.set_location(l_proc, 450);
2615: end if;
2616: end;
2617: --
2618: if g_debug then
2615: end if;
2616: end;
2617: --
2618: if g_debug then
2619: hr_utility.set_location(l_proc, 460);
2620: end if;
2621: --
2622: -- Delete COBRA references and then any contact relationships. COBRA
2623: -- must be deleted first as PER_COBRA_COV_ENROLLMENTS has a
2638: --
2639: exception
2640: when NO_DATA_FOUND then
2641: if g_debug then
2642: hr_utility.set_location(l_proc, 470);
2643: end if;
2644: end;
2645: --
2646: if g_debug then
2643: end if;
2644: end;
2645: --
2646: if g_debug then
2647: hr_utility.set_location(l_proc, 480);
2648: end if;
2649: --
2650: begin
2651: --
2665: --
2666: exception
2667: when NO_DATA_FOUND then
2668: if g_debug then
2669: hr_utility.set_location(l_proc, 490);
2670: end if;
2671: end;
2672: --
2673: if g_debug then
2670: end if;
2671: end;
2672: --
2673: if g_debug then
2674: hr_utility.set_location(l_proc, 500);
2675: end if;
2676: --
2677: begin
2678: --
2689: --
2690: exception
2691: when NO_DATA_FOUND then
2692: if g_debug then
2693: hr_utility.set_location(l_proc, 510);
2694: end if;
2695: end;
2696: --
2697: if g_debug then
2694: end if;
2695: end;
2696: --
2697: if g_debug then
2698: hr_utility.set_location(l_proc, 520);
2699: end if;
2700: --
2701: begin
2702: --
2716: --
2717: exception
2718: when NO_DATA_FOUND then
2719: if g_debug then
2720: hr_utility.set_location(l_proc, 530);
2721: end if;
2722: end;
2723: --
2724: if g_debug then
2721: end if;
2722: end;
2723: --
2724: if g_debug then
2725: hr_utility.set_location(l_proc, 540);
2726: end if;
2727: --
2728: begin
2729: --
2740: --
2741: exception
2742: when NO_DATA_FOUND then
2743: if g_debug then
2744: hr_utility.set_location(l_proc, 550);
2745: end if;
2746: end;
2747: --
2748: if g_debug then
2745: end if;
2746: end;
2747: --
2748: if g_debug then
2749: hr_utility.set_location(l_proc, 560);
2750: end if;
2751: --
2752: begin
2753: --
2767: --
2768: exception
2769: when NO_DATA_FOUND then
2770: if g_debug then
2771: hr_utility.set_location(l_proc, 570);
2772: end if;
2773: end;
2774: --
2775: if g_debug then
2772: end if;
2773: end;
2774: --
2775: if g_debug then
2776: hr_utility.set_location(l_proc, 580);
2777: end if;
2778: --
2779: begin
2780: --
2786: --
2787: exception
2788: when NO_DATA_FOUND then
2789: if g_debug then
2790: hr_utility.set_location(l_proc, 590);
2791: end if;
2792: end;
2793: --
2794: if g_debug then
2791: end if;
2792: end;
2793: --
2794: if g_debug then
2795: hr_utility.set_location(l_proc, 600);
2796: end if;
2797: --
2798: begin
2799: --
2812: --
2813: exception
2814: when NO_DATA_FOUND then
2815: if g_debug then
2816: hr_utility.set_location(l_proc, 610);
2817: end if;
2818: end;
2819: --
2820: --Bug# 3026024 Start Here
2822: -- contact person whom is getting deleted.
2823: --
2824: --
2825: if g_debug then
2826: hr_utility.set_location(l_proc, 620);
2827: end if;
2828: --
2829: begin
2830: --
2837: --
2838: exception
2839: when NO_DATA_FOUND then
2840: if g_debug then
2841: hr_utility.set_location(l_proc, 630);
2842: end if;
2843: end;
2844: --
2845: --Bug# 3026024 End Here
2854: -- are created: a,b and b,a so that they can be queried in either
2855: -- direction. Hence must delete both here.
2856: --
2857: if g_debug then
2858: hr_utility.set_location(l_proc, 640);
2859: end if;
2860: --
2861: begin
2862: --
2885: --
2886: exception
2887: when NO_DATA_FOUND then
2888: if g_debug then
2889: hr_utility.set_location(l_proc, 650);
2890: end if;
2891: end;
2892: --
2893: if g_debug then
2890: end if;
2891: end;
2892: --
2893: if g_debug then
2894: hr_utility.set_location(l_proc, 660);
2895: end if;
2896: --
2897: begin
2898: --
2901: --
2902: exception
2903: when NO_DATA_FOUND then
2904: if g_debug then
2905: hr_utility.set_location(l_proc, 670);
2906: end if;
2907: end;
2908: --
2909: if g_debug then
2906: end if;
2907: end;
2908: --
2909: if g_debug then
2910: hr_utility.set_location(l_proc, 680);
2911: end if;
2912: --
2913: begin
2914: --
2917: --
2918: exception
2919: when NO_DATA_FOUND then
2920: if g_debug then
2921: hr_utility.set_location(l_proc, 690);
2922: end if;
2923: end;
2924: --
2925: if g_debug then
2922: end if;
2923: end;
2924: --
2925: if g_debug then
2926: hr_utility.set_location(l_proc, 700);
2927: end if;
2928: --
2929: begin
2930: --
2934: --
2935: exception
2936: when NO_DATA_FOUND then
2937: if g_debug then
2938: hr_utility.set_location(l_proc, 710);
2939: end if;
2940: end;
2941: --
2942: if g_debug then
2939: end if;
2940: end;
2941: --
2942: if g_debug then
2943: hr_utility.set_location(l_proc, 720);
2944: end if;
2945: --
2946: -- we must do this delete in dynamic sql because the per_performance_reviews
2947: -- table will not exist if the database has not been upgraded to new salary
2968: end if;
2969: end;
2970: --
2971: if g_debug then
2972: hr_utility.set_location(l_proc, 730);
2973: end if;
2974: --
2975: -- About to delete interview events for assignments. However, must
2976: -- first delete bookings (interviewers) for those events.
2998: );*/
2999: exception
3000: when NO_DATA_FOUND then
3001: if g_debug then
3002: hr_utility.set_location(l_proc, 740);
3003: end if;
3004: end;
3005: --
3006: if g_debug then
3003: end if;
3004: end;
3005: --
3006: if g_debug then
3007: hr_utility.set_location(l_proc, 750);
3008: end if;
3009: --
3010: begin
3011: -- bug fix 3732129.
3022: where ass.person_id = P_PERSON_ID);*/
3023: exception
3024: when NO_DATA_FOUND then
3025: if g_debug then
3026: hr_utility.set_location(l_proc, 760);
3027: end if;
3028: end;
3029: --
3030: if g_debug then
3027: end if;
3028: end;
3029: --
3030: if g_debug then
3031: hr_utility.set_location(l_proc, 770);
3032: end if;
3033: --
3034: begin
3035: --
3039: --
3040: exception
3041: when NO_DATA_FOUND then
3042: if g_debug then
3043: hr_utility.set_location(l_proc, 780);
3044: end if;
3045: end;
3046: --
3047: if g_debug then
3044: end if;
3045: end;
3046: --
3047: if g_debug then
3048: hr_utility.set_location(l_proc, 790);
3049: end if;
3050: --
3051: begin
3052: --
3055: --
3056: exception
3057: when NO_DATA_FOUND then
3058: if g_debug then
3059: hr_utility.set_location(l_proc, 800);
3060: end if;
3061: end;
3062: --
3063: if g_debug then
3060: end if;
3061: end;
3062: --
3063: if g_debug then
3064: hr_utility.set_location(l_proc, 810);
3065: end if;
3066: --
3067: begin
3068: --
3074: --
3075: exception
3076: when NO_DATA_FOUND then
3077: if g_debug then
3078: hr_utility.set_location(l_proc, 820);
3079: end if;
3080: end;
3081: --
3082: if g_debug then
3079: end if;
3080: end;
3081: --
3082: if g_debug then
3083: hr_utility.set_location(l_proc, 830);
3084: end if;
3085: --
3086: -- Validation has already been performed against
3087: -- hr_assignment_set_amendments in weak_predel_validation.
3096: --
3097: exception
3098: when NO_DATA_FOUND then
3099: if g_debug then
3100: hr_utility.set_location(l_proc, 840);
3101: end if;
3102: end;
3103: --
3104: if g_debug then
3101: end if;
3102: end;
3103: --
3104: if g_debug then
3105: hr_utility.set_location(l_proc, 850);
3106: end if;
3107: --
3108: begin
3109: --
3115: --
3116: exception
3117: when NO_DATA_FOUND then
3118: if g_debug then
3119: hr_utility.set_location(l_proc, 860);
3120: end if;
3121: end;
3122: --
3123: if g_debug then
3120: end if;
3121: end;
3122: --
3123: if g_debug then
3124: hr_utility.set_location(l_proc, 870);
3125: end if;
3126: --
3127: begin
3128: --
3134: --
3135: exception
3136: when NO_DATA_FOUND then
3137: if g_debug then
3138: hr_utility.set_location(l_proc, 880);
3139: end if;
3140: end;
3141: --
3142: if g_debug then
3139: end if;
3140: end;
3141: --
3142: if g_debug then
3143: hr_utility.set_location(l_proc, 890);
3144: end if;
3145: --
3146: -- Validation has already been performed against
3147: -- pay_assignment_actions in weak_predel_validation.
3156: --
3157: exception
3158: when NO_DATA_FOUND then
3159: if g_debug then
3160: hr_utility.set_location(l_proc, 900);
3161: end if;
3162: end;
3163: --
3164: if g_debug then
3161: end if;
3162: end;
3163: --
3164: if g_debug then
3165: hr_utility.set_location(l_proc, 910);
3166: end if;
3167: --
3168: begin
3169: --
3175: --
3176: exception
3177: when NO_DATA_FOUND then
3178: if g_debug then
3179: hr_utility.set_location(l_proc, 920);
3180: end if;
3181: end;
3182: --
3183: if g_debug then
3180: end if;
3181: end;
3182: --
3183: if g_debug then
3184: hr_utility.set_location(l_proc, 930);
3185: end if;
3186: --
3187: begin
3188: -- bug fix 3732129
3200: where ass.person_id = P_PERSON_ID); */
3201: exception
3202: when NO_DATA_FOUND then
3203: if g_debug then
3204: hr_utility.set_location(l_proc, 940);
3205: end if;
3206: end;
3207: --
3208: if g_debug then
3205: end if;
3206: end;
3207: --
3208: if g_debug then
3209: hr_utility.set_location(l_proc, 950);
3210: end if;
3211: --
3212: begin
3213: --
3224: --
3225: exception
3226: when NO_DATA_FOUND then
3227: if g_debug then
3228: hr_utility.set_location(l_proc, 960);
3229: end if;
3230: end;
3231: --
3232: if g_debug then
3229: end if;
3230: end;
3231: --
3232: if g_debug then
3233: hr_utility.set_location(l_proc, 970);
3234: end if;
3235: --
3236: begin
3237: --
3249: --
3250: exception
3251: when NO_DATA_FOUND then
3252: if g_debug then
3253: hr_utility.set_location(l_proc, 980);
3254: end if;
3255: end;
3256: --
3257: if g_debug then
3254: end if;
3255: end;
3256: --
3257: if g_debug then
3258: hr_utility.set_location(l_proc, 990);
3259: end if;
3260: --
3261: begin
3262: --
3268: --
3269: exception
3270: when NO_DATA_FOUND then
3271: if g_debug then
3272: hr_utility.set_location(l_proc, 10);
3273: end if;
3274: end;
3275: --
3276: if g_debug then
3273: end if;
3274: end;
3275: --
3276: if g_debug then
3277: hr_utility.set_location(l_proc, 20);
3278: end if;
3279: --
3280: -- Rmonge Bug 1686922 22-FEB-2002
3281: -- Tax records were not being deleted. Therefore, there were orphans rows in
3292: --
3293: exception
3294: when no_data_found then
3295: if g_debug then
3296: hr_utility.set_location(l_proc, 30);
3297: end if;
3298: end;
3299: --
3300: begin
3299: --
3300: begin
3301: --
3302: if g_debug then
3303: hr_utility.set_location(l_proc, 40);
3304: end if;
3305: --
3306: Delete pay_us_emp_state_tax_rules_f pest
3307: Where pest.assignment_id in
3311: --
3312: exception
3313: when no_data_found then
3314: if g_debug then
3315: hr_utility.set_location(l_proc, 50);
3316: end if;
3317: end;
3318: --
3319: begin
3318: --
3319: begin
3320: --
3321: if g_debug then
3322: hr_utility.set_location(l_proc, 60);
3323: end if;
3324: --
3325: Delete pay_us_emp_county_tax_rules_f pect
3326: Where pect.assignment_id in
3330: --
3331: exception
3332: when no_data_found then
3333: if g_debug then
3334: hr_utility.set_location(l_proc, 70);
3335: end if;
3336: end;
3337: --
3338: begin
3337: --
3338: begin
3339: --
3340: if g_debug then
3341: hr_utility.set_location(l_proc, 80);
3342: end if;
3343: --
3344: Delete pay_us_emp_city_tax_rules_f pecit
3345: Where pecit.assignment_id in
3349: --
3350: exception
3351: when no_data_found then
3352: if g_debug then
3353: hr_utility.set_location(l_proc, 90);
3354: end if;
3355: end;
3356: -- Finished, now unlock assignments and delete them.
3357: --
3357: --
3358: close csr_lock_assignment_rows;
3359: --
3360: if g_debug then
3361: hr_utility.set_location(l_proc, 100);
3362: end if;
3363: --
3364: begin
3365: --
3368: --
3369: exception
3370: when NO_DATA_FOUND then
3371: if g_debug then
3372: hr_utility.set_location(l_proc, 110);
3373: end if;
3374: end;
3375: --
3376: if g_debug then
3373: end if;
3374: end;
3375: --
3376: if g_debug then
3377: hr_utility.set_location(l_proc, 120);
3378: end if;
3379: --
3380: begin
3381: --
3384: --
3385: exception
3386: when NO_DATA_FOUND then
3387: if g_debug then
3388: hr_utility.set_location(l_proc, 130);
3389: end if;
3390: end;
3391: --
3392: if g_debug then
3389: end if;
3390: end;
3391: --
3392: if g_debug then
3393: hr_utility.set_location(l_proc, 140);
3394: end if;
3395: --
3396: begin
3397: --
3400: --
3401: exception
3402: when NO_DATA_FOUND then
3403: if g_debug then
3404: hr_utility.set_location(l_proc, 150);
3405: end if;
3406: end;
3407: --
3408: -- 03/18/98 Bug #642566
3407: --
3408: -- 03/18/98 Bug #642566
3409: -- delete per_people_extra_info records
3410: if g_debug then
3411: hr_utility.set_location(l_proc, 160);
3412: end if;
3413: --
3414: begin
3415: --
3418: --
3419: exception
3420: when NO_DATA_FOUND then
3421: if g_debug then
3422: hr_utility.set_location(l_proc, 170);
3423: end if;
3424: end;
3425: -- 03/18/98 Change Ends
3426: --
3428: --
3429: -- 28/5/98
3430: -- Add delete from per_person_type_usages_f
3431: if g_debug then
3432: hr_utility.set_location(l_proc, 180);
3433: end if;
3434: --
3435: for ptu_rec in csr_ptu loop
3436: --
3446: and ptu2.effective_start_date = l_effective_date;
3447: --
3448: if g_debug then
3449: --
3450: hr_utility.set_location('l_person_type_usage_id = '||to_char(ptu_rec.person_type_usage_id),44);
3451: hr_utility.set_location('l_effective_date = '||to_char(l_effective_date,'DD/MM/YYYY'),44);
3452: hr_utility.set_location('l_object_version_number = '||to_char(l_object_version_number),44);
3453: --
3454: end if;
3447: --
3448: if g_debug then
3449: --
3450: hr_utility.set_location('l_person_type_usage_id = '||to_char(ptu_rec.person_type_usage_id),44);
3451: hr_utility.set_location('l_effective_date = '||to_char(l_effective_date,'DD/MM/YYYY'),44);
3452: hr_utility.set_location('l_object_version_number = '||to_char(l_object_version_number),44);
3453: --
3454: end if;
3455: begin
3448: if g_debug then
3449: --
3450: hr_utility.set_location('l_person_type_usage_id = '||to_char(ptu_rec.person_type_usage_id),44);
3451: hr_utility.set_location('l_effective_date = '||to_char(l_effective_date,'DD/MM/YYYY'),44);
3452: hr_utility.set_location('l_object_version_number = '||to_char(l_object_version_number),44);
3453: --
3454: end if;
3455: begin
3456: --
3480: end loop;
3481: --
3482: -- delete per_person_dlvry_methods
3483: if g_debug then
3484: hr_utility.set_location(l_proc, 190);
3485: end if;
3486: --
3487: begin
3488: --
3494: --
3495: -- Added this delete for quickhire checklists
3496: --
3497: if g_debug then
3498: hr_utility.set_location(l_proc, 200);
3499: end if;
3500: begin
3501: --
3502: delete from per_checklist_items
3508: -- End addition for quickhire checklists
3509: --
3510: -- delete per_qualification and per_subjects_taken records
3511: if g_debug then
3512: hr_utility.set_location(l_proc, 210);
3513: end if;
3514: --
3515: begin
3516: -- Fix for 4490489 starts here
3535: and s.qualification_id = q.qualification_id
3536: );
3537: --
3538: if g_debug then
3539: hr_utility.set_location(l_proc, 220);
3540: end if;
3541: --
3542: delete from per_subjects_taken s
3543: where s.qualification_id in
3545: from per_qualifications
3546: where party_id = l_party_id );
3547: --
3548: if g_debug then
3549: hr_utility.set_location(l_proc, 230);
3550: end if;
3551: --PMFLETCH Added delete from tl table
3552: delete from per_qualifications_tl qt
3553: where qt.qualification_id in
3555: from per_qualifications q
3556: where q.party_id = l_party_id);
3557: --
3558: if g_debug then
3559: hr_utility.set_location(l_proc, 240);
3560: end if;
3561: --
3562: delete from per_qualifications q
3563: where q.party_id = l_party_id;
3566: --
3567: exception
3568: when NO_DATA_FOUND then
3569: if g_debug then
3570: hr_utility.set_location(l_proc, 250);
3571: end if;
3572: end;
3573: --
3574: -- Fix for 4490489 ends here
3584: and s.qualification_id = q.qualification_id
3585: );
3586: --
3587: if g_debug then
3588: hr_utility.set_location(l_proc, 220);
3589: end if;
3590: --
3591: delete from per_subjects_taken s
3592: where s.qualification_id in
3594: from per_qualifications
3595: where person_id = P_PERSON_ID );
3596: --
3597: if g_debug then
3598: hr_utility.set_location(l_proc, 230);
3599: end if;
3600: --PMFLETCH Added delete from tl table
3601: delete from per_qualifications_tl qt
3602: where qt.qualification_id in
3604: from per_qualifications q
3605: where q.person_id = P_PERSON_ID);
3606: --
3607: if g_debug then
3608: hr_utility.set_location(l_proc, 240);
3609: end if;
3610: --
3611: delete from per_qualifications q
3612: where q.person_id = P_PERSON_ID;
3613: --
3614: exception
3615: when NO_DATA_FOUND then
3616: if g_debug then
3617: hr_utility.set_location(l_proc, 250);
3618: end if;
3619: end; */
3620: --
3621: close csr_lock_person_rows;
3620: --
3621: close csr_lock_person_rows;
3622: --
3623: if g_debug then
3624: hr_utility.set_location(l_proc, 260);
3625: end if;
3626:
3627: --changes for 5166353 starts here
3628: ben_person_delete.delete_ben_rows(P_PERSON_ID);
3634: where person_id = P_PERSON_ID;
3635: exception
3636: when NO_DATA_FOUND then
3637: if g_debug then
3638: hr_utility.set_location(l_proc, 270);
3639: end if;
3640: end;
3641: --
3642: -- Now remove contracts
3646: NULL,
3647: NULL);
3648: --
3649: if g_debug then
3650: hr_utility.set_location(l_proc, 280);
3651: end if;
3652: --
3653: -- Now remove Medical Assessments
3654: --
3661: --
3662: END LOOP;
3663: --
3664: if g_debug then
3665: hr_utility.set_location(l_proc, 290);
3666: end if;
3667: --
3668: --
3669: -- Now remove disabilities
3675: per_disability_api.delete_disability(false,p_effective_date ,'ZAP',l_disability_id, l_object_version_no, l_effective_start_date, l_effective_end_date);
3676: END LOOP;
3677: --
3678: if g_debug then
3679: hr_utility.set_location(l_proc, 300);
3680: end if;
3681: --
3682: --
3683: -- Now remove Work incidences
3689: per_work_incident_api.delete_work_incident(false,l_incident_id, l_object_version_number);
3690: END LOOP;
3691: --
3692: if g_debug then
3693: hr_utility.set_location(l_proc, 310);
3694: end if;
3695: --
3696: --
3697: -- Now remove Supplementary Roles
3703: per_supplementary_role_api.delete_supplementary_role(false, l_role_id, l_ovn_roles);
3704: END LOOP;
3705: --
3706: if g_debug then
3707: hr_utility.set_location(l_proc, 320);
3708: end if;
3709: --
3710: --
3711: begin
3713: where p.person_id = P_PERSON_ID;
3714: exception
3715: when NO_DATA_FOUND then
3716: if g_debug then
3717: hr_utility.set_location(l_proc, 330);
3718: end if;
3719: end;
3720: --
3721: --
3743: when NO_DATA_FOUND then null;
3744: end;
3745: --
3746: if g_debug then
3747: hr_utility.set_location('Leaving:'||l_proc, 999);
3748: end if;
3749: --
3750: END delete_person;
3751: end hr_person_internal;