4: -- Package Variables
5: --
6: g_package varchar2(33) := ' ben_dt_trgr_handle.';
7: --
8: g_debug boolean := hr_utility.debug_enabled;
9: --
10: --
11: procedure person(p_rowid in VARCHAR2
12: ,p_business_group_id in NUMBER
137: benutils.set_data_migrator_mode;
138: --
139: -- Bug : 3320133
140: --
141: g_debug := hr_utility.debug_enabled;
142: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
143: if g_debug then
144: hr_utility.set_location('Entering: '|| l_proc, 10);
145: hr_utility.set_location('p_mar_stat: '||p_marital_status||' '||l_proc, 10);
140: --
141: g_debug := hr_utility.debug_enabled;
142: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
143: if g_debug then
144: hr_utility.set_location('Entering: '|| l_proc, 10);
145: hr_utility.set_location('p_mar_stat: '||p_marital_status||' '||l_proc, 10);
146: hr_utility.set_location('p_per_esd: '||p_effective_start_date||' '||l_proc, 10);
147: hr_utility.set_location('rowid: '||p_rowid||' '||l_proc, 10);
148: end if;
141: g_debug := hr_utility.debug_enabled;
142: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
143: if g_debug then
144: hr_utility.set_location('Entering: '|| l_proc, 10);
145: hr_utility.set_location('p_mar_stat: '||p_marital_status||' '||l_proc, 10);
146: hr_utility.set_location('p_per_esd: '||p_effective_start_date||' '||l_proc, 10);
147: hr_utility.set_location('rowid: '||p_rowid||' '||l_proc, 10);
148: end if;
149: --
142: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
143: if g_debug then
144: hr_utility.set_location('Entering: '|| l_proc, 10);
145: hr_utility.set_location('p_mar_stat: '||p_marital_status||' '||l_proc, 10);
146: hr_utility.set_location('p_per_esd: '||p_effective_start_date||' '||l_proc, 10);
147: hr_utility.set_location('rowid: '||p_rowid||' '||l_proc, 10);
148: end if;
149: --
150: ben_assignment_internal.copy_empasg_to_benasg
143: if g_debug then
144: hr_utility.set_location('Entering: '|| l_proc, 10);
145: hr_utility.set_location('p_mar_stat: '||p_marital_status||' '||l_proc, 10);
146: hr_utility.set_location('p_per_esd: '||p_effective_start_date||' '||l_proc, 10);
147: hr_utility.set_location('rowid: '||p_rowid||' '||l_proc, 10);
148: end if;
149: --
150: ben_assignment_internal.copy_empasg_to_benasg
151: (p_person_id => p_person_id
214: --Bug 2215549 added p_effective_start_date parameter
215: --
216: ben_ppf_ler.ler_chk(l_old_rec,l_new_rec,p_effective_start_date );
217: if g_debug then
218: hr_utility.set_location('Leaving:'|| l_proc, 100);
219: end if;
220: end if;
221:
222: end person;
344: benutils.set_data_migrator_mode;
345: --
346: -- Bug : 3320133
347: --
348: g_debug := hr_utility.debug_enabled;
349: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
350: if g_debug then
351: hr_utility.set_location('Entering: '|| l_proc, 10);
352: hr_utility.set_location('p_mar_stat: '||p_marital_status||' '||l_proc, 10);
347: --
348: g_debug := hr_utility.debug_enabled;
349: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
350: if g_debug then
351: hr_utility.set_location('Entering: '|| l_proc, 10);
352: hr_utility.set_location('p_mar_stat: '||p_marital_status||' '||l_proc, 10);
353: hr_utility.set_location('p_per_esd: '||p_effective_start_date||' '||l_proc, 10);
354: hr_utility.set_location('rowid: '||p_rowid||' '||l_proc, 10);
355: end if;
348: g_debug := hr_utility.debug_enabled;
349: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
350: if g_debug then
351: hr_utility.set_location('Entering: '|| l_proc, 10);
352: hr_utility.set_location('p_mar_stat: '||p_marital_status||' '||l_proc, 10);
353: hr_utility.set_location('p_per_esd: '||p_effective_start_date||' '||l_proc, 10);
354: hr_utility.set_location('rowid: '||p_rowid||' '||l_proc, 10);
355: end if;
356:
349: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
350: if g_debug then
351: hr_utility.set_location('Entering: '|| l_proc, 10);
352: hr_utility.set_location('p_mar_stat: '||p_marital_status||' '||l_proc, 10);
353: hr_utility.set_location('p_per_esd: '||p_effective_start_date||' '||l_proc, 10);
354: hr_utility.set_location('rowid: '||p_rowid||' '||l_proc, 10);
355: end if;
356:
357: --
350: if g_debug then
351: hr_utility.set_location('Entering: '|| l_proc, 10);
352: hr_utility.set_location('p_mar_stat: '||p_marital_status||' '||l_proc, 10);
353: hr_utility.set_location('p_per_esd: '||p_effective_start_date||' '||l_proc, 10);
354: hr_utility.set_location('rowid: '||p_rowid||' '||l_proc, 10);
355: end if;
356:
357: --
358: ben_assignment_internal.copy_empasg_to_benasg
421: l_new_rec.attribute30 := p_attribute30;
422: l_new_rec.person_id := p_person_id;
423: ben_ppf_ler.ler_chk(l_old_rec,l_new_rec,p_effective_start_date );
424: if g_debug then
425: hr_utility.set_location('Leaving:'|| l_proc, 100);
426: end if;
427: end if;
428:
429:
555: where rowid = p_rowid;
556: --
557: begin
558: --
559: g_debug := hr_utility.debug_enabled;
560: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
561: if g_debug then
562: hr_utility.set_location('Entering:'|| l_proc, 10);
563: hr_utility.set_location('p_per_esd: '||p_effective_start_date||' '||l_proc, 10);
558: --
559: g_debug := hr_utility.debug_enabled;
560: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
561: if g_debug then
562: hr_utility.set_location('Entering:'|| l_proc, 10);
563: hr_utility.set_location('p_per_esd: '||p_effective_start_date||' '||l_proc, 10);
564: hr_utility.set_location('rowid: '||p_rowid||' '||l_proc, 10);
565: end if;
566: --
559: g_debug := hr_utility.debug_enabled;
560: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
561: if g_debug then
562: hr_utility.set_location('Entering:'|| l_proc, 10);
563: hr_utility.set_location('p_per_esd: '||p_effective_start_date||' '||l_proc, 10);
564: hr_utility.set_location('rowid: '||p_rowid||' '||l_proc, 10);
565: end if;
566: --
567: open get_old_asg(p_rowid);
560: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
561: if g_debug then
562: hr_utility.set_location('Entering:'|| l_proc, 10);
563: hr_utility.set_location('p_per_esd: '||p_effective_start_date||' '||l_proc, 10);
564: hr_utility.set_location('rowid: '||p_rowid||' '||l_proc, 10);
565: end if;
566: --
567: open get_old_asg(p_rowid);
568: fetch get_old_asg into l_old_rec;
623: l_new_rec.ass_attribute29 := p_ass_attribute29;
624: l_new_rec.ass_attribute30 := p_ass_attribute30;
625: ben_asg_ler.ler_chk(l_old_rec,l_new_rec,p_effective_start_date);
626: if g_debug then
627: hr_utility.set_location('Leaving:'|| l_proc, 100);
628: end if;
629: end if;
630: --
631: end assignment;
654: l_old_rec ben_ptu_ler.g_ptu_ler_rec;
655: l_new_rec ben_ptu_ler.g_ptu_ler_rec;
656: --
657: begin
658: g_debug := hr_utility.debug_enabled;
659: if g_debug then
660: hr_utility.set_location('MUPPET',10);
661: end if;
662: --
656: --
657: begin
658: g_debug := hr_utility.debug_enabled;
659: if g_debug then
660: hr_utility.set_location('MUPPET',10);
661: end if;
662: --
663: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
664: if g_debug then
661: end if;
662: --
663: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
664: if g_debug then
665: hr_utility.set_location('Entering:'|| l_proc, 10);
666: end if;
667: -- get old record
668: open get_old_ptu(p_rowid);
669: fetch get_old_ptu into l_old_rec;
678: -- l_new_rec.effective_end_date := p_effective_end_date;
679: --
680: ben_ptu_ler.ler_chk(l_old_rec,l_new_rec);
681: if g_debug then
682: hr_utility.set_location('Leaving:'|| l_proc, 100);
683: end if;
684: end if;
685: end person_type_usages;
686: */
763: --
764: begin
765: --
766:
767: g_debug := hr_utility.debug_enabled;
768: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
769: if g_debug then
770: hr_utility.set_location('Entering:'|| l_proc, 10);
771: end if;
766:
767: g_debug := hr_utility.debug_enabled;
768: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
769: if g_debug then
770: hr_utility.set_location('Entering:'|| l_proc, 10);
771: end if;
772: --
773: -- Only create a benefit assignment if the actual termination date
774: -- is not null. When the hr apis are called to terminate an employee, we
774: -- is not null. When the hr apis are called to terminate an employee, we
775: -- do not want the benefit assignment created twice.
776: --
777: if g_debug then
778: hr_utility.set_location('p_pds_old_atd: '|| p_pds_old_atd, 10);
779: end if;
780: --
781: if (p_pds_old_atd is null and
782: p_pds_atd is not null) then
816:
817: begin
818:
819: if g_debug then
820: hr_utility.set_location('To cancel ptu s for reverse termination : ', 1010);
821: end if;
822: if p_pds_atd is null and
823: p_pds_old_atd is not null
824: then
822: if p_pds_atd is null and
823: p_pds_old_atd is not null
824: then
825: if g_debug then
826: hr_utility.set_location('Cancel ptu s for reverse termination Started : ', 1011);
827: end if;
828:
829: for l_ptu_index in c1_revterm_ptu
830: loop
828:
829: for l_ptu_index in c1_revterm_ptu
830: loop
831: if g_debug then
832: hr_utility.set_location('Cancel ptu s for contact_id : '||l_ptu_index.person_id
833: ||' Of Type : '||l_ptu_index.system_person_type, 1012);
834: end if;
835: hr_per_type_usage_internal.cancel_person_type_usage
836: ( p_effective_date =>(p_pds_old_atd+1)
839: );
840:
841: end loop;
842: if g_debug then
843: hr_utility.set_location('Cancel ptu s for reverse termination Completed Normal: ', 1013);
844: end if;
845:
846: end if;
847: exception when others then
845:
846: end if;
847: exception when others then
848: if g_debug then
849: hr_utility.set_location('Cancel ptu s for reverse termination Completed with Exception: ', 1014);
850: end if;
851: raise;
852: end;
853:
863: --
864: close c1;
865: --
866: if g_debug then
867: hr_utility.set_location('Number of records:'|| l_num_recs, 10);
868: end if;
869: --
870: if l_num_recs > 1 then
871: --
873: --
874: l_delete_benass := false;
875: --
876: if g_debug then
877: hr_utility.set_location('Assignment not being deleted', 10);
878: end if;
879: --
880: else
881: --
882: -- Check if what we are updating has been nullified, in other words a
883: -- reverse termination.
884: --
885: if g_debug then
886: hr_utility.set_location('ATD'||p_pds_atd, 10);
887: end if;
888: --
889: if p_pds_atd is null and
890: p_pds_old_atd is not null -- Bug 1854968
890: p_pds_old_atd is not null -- Bug 1854968
891: then
892: --
893: if g_debug then
894: hr_utility.set_location('Assignment being deleted', 10);
895: end if;
896: l_delete_benass := true;
897: --
898: end if;
949: --
950: end if;
951: --
952: if g_debug then
953: hr_utility.set_location('Leaving:'|| l_proc, 100);
954: end if;
955: end if;
956: --
957: end periods_of_service;
988: --
989: begin
990:
991: --
992: g_debug := hr_utility.debug_enabled;
993: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
994: if g_debug then
995: hr_utility.set_location('Entering:'|| l_proc, 10);
996: end if;
991: --
992: g_debug := hr_utility.debug_enabled;
993: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
994: if g_debug then
995: hr_utility.set_location('Entering:'|| l_proc, 10);
996: end if;
997: -- get old record
998: open get_old_pbb(p_rowid);
999: fetch get_old_pbb into l_old_rec;
1007: l_new_rec.bnfts_bal_id := p_bnfts_bal_id;
1008: --
1009: ben_pbb_ler.ler_chk(l_old_rec,l_new_rec,p_effective_start_date );
1010: if g_debug then
1011: hr_utility.set_location('Leaving:'|| l_proc, 100);
1012: end if;
1013: end if;
1014: --
1015: end bnfts_bal;
1043: l_old_rec ben_pbb_ler.g_pbb_ler_rec;
1044: l_new_rec ben_pbb_ler.g_pbb_ler_rec;
1045: begin
1046: --
1047: g_debug := hr_utility.debug_enabled;
1048: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
1049: if g_debug then
1050: hr_utility.set_location('Entering:'|| l_proc, 10);
1051: end if;
1046: --
1047: g_debug := hr_utility.debug_enabled;
1048: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
1049: if g_debug then
1050: hr_utility.set_location('Entering:'|| l_proc, 10);
1051: end if;
1052: -- get old record
1053: open get_old_pbb(p_rowid);
1054: fetch get_old_pbb into l_old_rec;
1064: l_new_rec.per_bnfts_bal_id := p_bnfts_bal_id;
1065: --
1066: ben_pbb_ler.ler_chk(l_old_rec,l_new_rec,p_effective_start_date );
1067: if g_debug then
1068: hr_utility.set_location('Leaving:'|| l_proc, 100);
1069: end if;
1070: end if;
1071: --
1072: end bnfts_bal;
1108: l_new_rec ben_ecd_ler.g_ecd_ler_rec;
1109: --
1110: begin
1111: --
1112: g_debug := hr_utility.debug_enabled;
1113: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
1114: if g_debug then
1115: hr_utility.set_location('Entering:'|| l_proc, 10);
1116: end if;
1111: --
1112: g_debug := hr_utility.debug_enabled;
1113: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
1114: if g_debug then
1115: hr_utility.set_location('Entering:'|| l_proc, 10);
1116: end if;
1117: -- get old record
1118: open get_old_ecd(p_rowid);
1119: fetch get_old_ecd into l_old_rec;
1130: l_new_rec.ovrdn_thru_dt := p_ovrdn_thru_dt;
1131: --
1132: ben_ecd_ler.ler_chk(l_old_rec,l_new_rec,p_effective_start_date );
1133: if g_debug then
1134: hr_utility.set_location('Leaving:'|| l_proc, 100);
1135: end if;
1136: end if;
1137: --
1138: end elig_cvrd_dpnt;
1174: --
1175: begin
1176: --
1177: --
1178: g_debug := hr_utility.debug_enabled;
1179: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
1180: if g_debug then
1181: hr_utility.set_location('Entering:'|| l_proc, 10);
1182: end if;
1177: --
1178: g_debug := hr_utility.debug_enabled;
1179: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
1180: if g_debug then
1181: hr_utility.set_location('Entering:'|| l_proc, 10);
1182: end if;
1183: -- get old record
1184: open get_old_ecd(p_rowid);
1185: fetch get_old_ecd into l_old_rec;
1198: -- 9999 l_new_rec.elig_cvrd_dpnt_id := l_old_rec.elig_cvrd_dpnt_id;
1199: --
1200: ben_ecd_ler.ler_chk(l_old_rec,l_new_rec,p_effective_start_date );
1201: if g_debug then
1202: hr_utility.set_location('Leaving:'|| l_proc, 100);
1203: end if;
1204: end if;
1205: --
1206: end elig_cvrd_dpnt;
1239: --
1240: begin
1241: --
1242: --
1243: g_debug := hr_utility.debug_enabled;
1244: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
1245: if g_debug then
1246: hr_utility.set_location('Entering:'|| l_proc, 10);
1247: end if;
1242: --
1243: g_debug := hr_utility.debug_enabled;
1244: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
1245: if g_debug then
1246: hr_utility.set_location('Entering:'|| l_proc, 10);
1247: end if;
1248: -- get old record
1249: open get_old_pen(p_rowid);
1250: fetch get_old_pen into l_old_rec;
1259: l_new_rec.effective_end_date := p_effective_end_date;
1260: --
1261: ben_pen_ler.ler_chk(l_old_rec,l_new_rec,p_effective_start_date);
1262: if g_debug then
1263: hr_utility.set_location('Leaving:'|| l_proc, 100);
1264: end if;
1265: end if;
1266: --
1267: end prtt_enrt_rslt;
1299: l_new_rec ben_pen_ler.g_pen_ler_rec;
1300: --
1301: begin
1302: --
1303: g_debug := hr_utility.debug_enabled;
1304: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
1305: if g_debug then
1306: hr_utility.set_location('Entering:'|| l_proc, 10);
1307: end if;
1302: --
1303: g_debug := hr_utility.debug_enabled;
1304: if hr_general.g_data_migrator_mode not in ( 'Y','P') then
1305: if g_debug then
1306: hr_utility.set_location('Entering:'|| l_proc, 10);
1307: end if;
1308: -- get old record
1309: open get_old_pen(p_rowid);
1310: fetch get_old_pen into l_old_rec;
1321: l_new_rec.PRTT_ENRT_RSLT_ID := p_PRTT_ENRT_RSLT_ID;
1322: --
1323: ben_pen_ler.ler_chk(l_old_rec,l_new_rec,p_effective_start_date);
1324: if g_debug then
1325: hr_utility.set_location('Leaving:'|| l_proc, 100);
1326: end if;
1327: end if;
1328: --
1329: end prtt_enrt_rslt;
1348: l_new_rec ben_eev_ler.g_eev_ler_rec;
1349: --
1350: begin
1351: if g_debug then
1352: hr_utility.set_location('Entering:'|| l_proc, 10);
1353: end if;
1354: -- get old record
1355: open get_old_eev(p_rowid);
1356: fetch get_old_eev into l_old_rec;
1360: l_new_rec.screen_entry_value := p_screen_entry_value;
1361: --
1362: ben_eev_ler.ler_chk(l_old_rec,l_new_rec);
1363: if g_debug then
1364: hr_utility.set_location('Leaving:'|| l_proc, 100);
1365: end if;
1366: end elem_entry_values: ******************/
1367:
1368: /*******procedure asgn_budget_values
1392: l_old_rec ben_abv_ler.g_abv_ler_rec;
1393: l_new_rec ben_abv_ler.g_abv_ler_rec;
1394: --
1395: begin
1396: g_debug := hr_utility.debug_enabled;
1397: if g_debug then
1398: hr_utility.set_location('Entering:'|| l_proc, 10);
1399: end if;
1400: -- get old record
1394: --
1395: begin
1396: g_debug := hr_utility.debug_enabled;
1397: if g_debug then
1398: hr_utility.set_location('Entering:'|| l_proc, 10);
1399: end if;
1400: -- get old record
1401: open get_old_abv(p_rowid);
1402: fetch get_old_abv into l_old_rec;
1410: l_new_rec.effective_end_date := p_effective_end_date; ******
1411: --
1412: ben_abv_ler.ler_chk(l_old_rec,l_new_rec);
1413: if g_debug then
1414: hr_utility.set_location('Leaving:'|| l_proc, 100);
1415: end if;
1416: end asgn_budget_values;
1417: ********************************/
1418: