241: - Enabled cache mode for rates_and_coverage
242: dates. This caches the per in ler.
243: 25-May-00 jcarpent 115.115 - Added logic to have crnt_enrt_prclds_chg
244: work for entire ptip. (5216,1308627)
245: 29-May-00 mhoyes 115.116 - Commented out nocopy hr_utility calls for
246: performance in highly executed logic.
247: - Tuning by dharris.
248: 31-May-00 mhoyes 115.117 - Passed through current comp object
249: row parameters to avoid cache calls.
284: defaults to change elctbl_flag also.
285: Needed for rules which use enrol/elig
286: in other plans for electablility.
287: 14-Sep-00 jcarpent 115.132 - Merged version of 115.131 with 130.
288: 25-Sep-00 mhoyes 115.133 - Removed hr_utility.set_locations.
289: 07-Nov-00 mhoyes 115.134 - Added hr_utility.set_locations for
290: profiling.
291: - Modified update_defaults to use the
292: electable choice performance API.
285: Needed for rules which use enrol/elig
286: in other plans for electablility.
287: 14-Sep-00 jcarpent 115.132 - Merged version of 115.131 with 130.
288: 25-Sep-00 mhoyes 115.133 - Removed hr_utility.set_locations.
289: 07-Nov-00 mhoyes 115.134 - Added hr_utility.set_locations for
290: profiling.
291: - Modified update_defaults to use the
292: electable choice performance API.
293: 15-dec-00 tilak 115.135 bug: 1527086 early denenrollment date carried forward
659: l_oipl_rec ben_cobj_cache.g_oipl_inst_row;
660: l_ler_dflt_flag varchar2(30); -- 3510229
661: BEGIN
662: --
663: g_debug := hr_utility.debug_enabled;
664: --
665: if g_debug then
666: hr_utility.set_location('Entering: ' || l_proc, 10);
667: end if;
662: --
663: g_debug := hr_utility.debug_enabled;
664: --
665: if g_debug then
666: hr_utility.set_location('Entering: ' || l_proc, 10);
667: end if;
668: --
669: l_dflt_enrt_cd := NULL;
670: --
702: --
703: -- 2
704: --
705: if g_debug then
706: hr_utility.set_location('In the case 2 ' , 100);
707: end if;
708: --
709: --l_dflt_enrt_cd := ben_cobj_cache.g_oipl_currow.dflt_enrt_cd;
710: --l_dflt_enrt_rl := ben_cobj_cache.g_oipl_currow.dflt_enrt_det_rl;
711: --
712: l_dflt_enrt_cd := p_oipl_rec.dflt_enrt_cd ;
713: l_dflt_enrt_rl := p_oipl_rec.dflt_enrt_det_rl ;
714:
715: --hr_utility.set_location(' p_oipl_rec.oipl_id '||p_oipl_rec.oipl_id ,110);
716: --hr_utility.set_location(' p_oipl_rec.dflt_enrt_cd '||p_oipl_rec.dflt_enrt_cd ,110);
717: --hr_utility.set_location(' p_oipl_rec.dflt_flag '||p_oipl_rec.dflt_flag, 110) ;
718: --
719: if l_dflt_enrt_cd is not null
712: l_dflt_enrt_cd := p_oipl_rec.dflt_enrt_cd ;
713: l_dflt_enrt_rl := p_oipl_rec.dflt_enrt_det_rl ;
714:
715: --hr_utility.set_location(' p_oipl_rec.oipl_id '||p_oipl_rec.oipl_id ,110);
716: --hr_utility.set_location(' p_oipl_rec.dflt_enrt_cd '||p_oipl_rec.dflt_enrt_cd ,110);
717: --hr_utility.set_location(' p_oipl_rec.dflt_flag '||p_oipl_rec.dflt_flag, 110) ;
718: --
719: if l_dflt_enrt_cd is not null
720: and p_level is null then -- 3510229
713: l_dflt_enrt_rl := p_oipl_rec.dflt_enrt_det_rl ;
714:
715: --hr_utility.set_location(' p_oipl_rec.oipl_id '||p_oipl_rec.oipl_id ,110);
716: --hr_utility.set_location(' p_oipl_rec.dflt_enrt_cd '||p_oipl_rec.dflt_enrt_cd ,110);
717: --hr_utility.set_location(' p_oipl_rec.dflt_flag '||p_oipl_rec.dflt_flag, 110) ;
718: --
719: if l_dflt_enrt_cd is not null
720: and p_level is null then -- 3510229
721: p_level:='OIPL';
742: -- p_ler_dflt_flag := l_ler_dflt_flag;
743: --end if;
744: --l_ler_dflt_flag := null ;
745: if g_debug then
746: hr_utility.set_location('after LER pNip chk p_ler_dflt_flag: '||p_ler_dflt_flag , 100);
747: end if;
748: -- 3510229 end
749:
750: end if;
752: if p_ler_dflt_flag is null and l_ler_dflt_flag is not null then
753: p_ler_dflt_flag := l_ler_dflt_flag ;
754: end if ;
755: if g_debug then
756: hr_utility.set_location('l_ler_dflt_flag ' || l_ler_dflt_flag ,40);
757: hr_utility.set_location(l_dflt_enrt_cd,40);
758: end if;
759:
760: ELSIF p_pgm_id IS NOT NULL
753: p_ler_dflt_flag := l_ler_dflt_flag ;
754: end if ;
755: if g_debug then
756: hr_utility.set_location('l_ler_dflt_flag ' || l_ler_dflt_flag ,40);
757: hr_utility.set_location(l_dflt_enrt_cd,40);
758: end if;
759:
760: ELSIF p_pgm_id IS NOT NULL
761: AND l_dflt_enrt_cd IS NULL THEN
775: --if p_ler_dflt_flag is null then
776: -- p_ler_dflt_flag := l_ler_dflt_flag;
777: --end if;
778: if g_debug then
779: hr_utility.set_location('after LER PLIP chk p_ler_dflt_flag: '||p_ler_dflt_flag , 100);
780: end if;
781: --l_ler_dflt_flag := null ;
782: -- 3510229 end
783:
786: if p_ler_dflt_flag is null and l_ler_dflt_flag is not null then
787: p_ler_dflt_flag := l_ler_dflt_flag ;
788: end if ;
789: if g_debug then
790: hr_utility.set_location('l_ler_dflt_flag ' || l_ler_dflt_flag ,50);
791: hr_utility.set_location(l_dflt_enrt_cd,50);
792: end if;
793: -- 4008380
794: -- there could be plip but the setup may be in plan ler level
787: p_ler_dflt_flag := l_ler_dflt_flag ;
788: end if ;
789: if g_debug then
790: hr_utility.set_location('l_ler_dflt_flag ' || l_ler_dflt_flag ,50);
791: hr_utility.set_location(l_dflt_enrt_cd,50);
792: end if;
793: -- 4008380
794: -- there could be plip but the setup may be in plan ler level
795: IF l_dflt_enrt_cd IS NULL THEN
801: if l_dflt_enrt_cd is not null
802: and p_level is null then -- 3510229
803: p_level:='LER_PL';
804: if g_debug then
805: hr_utility.set_location('after LER Plan chk p_ler_dflt_flag: '||p_ler_dflt_flag , 100);
806: end if;
807: end if;
808: -- there could be default flag without default code 4008380
809: if p_ler_dflt_flag is null and l_ler_dflt_flag is not null then
809: if p_ler_dflt_flag is null and l_ler_dflt_flag is not null then
810: p_ler_dflt_flag := l_ler_dflt_flag ;
811: end if ;
812: if g_debug then
813: hr_utility.set_location('l_ler_dflt_flag ' || l_ler_dflt_flag ,40);
814: hr_utility.set_location(l_dflt_enrt_cd,40);
815: end if;
816: end if ;
817:
810: p_ler_dflt_flag := l_ler_dflt_flag ;
811: end if ;
812: if g_debug then
813: hr_utility.set_location('l_ler_dflt_flag ' || l_ler_dflt_flag ,40);
814: hr_utility.set_location(l_dflt_enrt_cd,40);
815: end if;
816: end if ;
817:
818:
828: if l_dflt_enrt_cd is not null
829: and p_level is null then -- 3510229
830: p_level:='LER_PTIP';
831: end if;
832: -- hr_utility.set_location(l_dflt_enrt_cd,60);
833: IF l_dflt_enrt_cd IS NULL THEN
834: --
835: -- 5
836: --
850: IF l_dflt_enrt_cd IS NULL THEN
851: --
852: -- 6
853: --
854: hr_utility.set_location('In the case 2 ' , 100);
855: --
856: --l_dflt_enrt_cd := ben_cobj_cache.g_oipl_currow.dflt_enrt_cd;
857: --l_dflt_enrt_rl := ben_cobj_cache.g_oipl_currow.dflt_enrt_det_rl;
858: --
858: --
859: l_dflt_enrt_cd := p_oipl_rec.dflt_enrt_cd ;
860: l_dflt_enrt_rl := p_oipl_rec.dflt_enrt_det_rl ;
861:
862: --hr_utility.set_location(' p_oipl_rec.oipl_id '||p_oipl_rec.oipl_id ,110);
863: --hr_utility.set_location(' p_oipl_rec.dflt_enrt_cd '||p_oipl_rec.dflt_enrt_cd ,110);
864: --hr_utility.set_location(' p_oipl_rec.dflt_flag '||p_oipl_rec.dflt_flag, 110) ;
865: --
866: if l_dflt_enrt_cd is not null
859: l_dflt_enrt_cd := p_oipl_rec.dflt_enrt_cd ;
860: l_dflt_enrt_rl := p_oipl_rec.dflt_enrt_det_rl ;
861:
862: --hr_utility.set_location(' p_oipl_rec.oipl_id '||p_oipl_rec.oipl_id ,110);
863: --hr_utility.set_location(' p_oipl_rec.dflt_enrt_cd '||p_oipl_rec.dflt_enrt_cd ,110);
864: --hr_utility.set_location(' p_oipl_rec.dflt_flag '||p_oipl_rec.dflt_flag, 110) ;
865: --
866: if l_dflt_enrt_cd is not null
867: and p_level is null then -- 3510229
860: l_dflt_enrt_rl := p_oipl_rec.dflt_enrt_det_rl ;
861:
862: --hr_utility.set_location(' p_oipl_rec.oipl_id '||p_oipl_rec.oipl_id ,110);
863: --hr_utility.set_location(' p_oipl_rec.dflt_enrt_cd '||p_oipl_rec.dflt_enrt_cd ,110);
864: --hr_utility.set_location(' p_oipl_rec.dflt_flag '||p_oipl_rec.dflt_flag, 110) ;
865: --
866: if l_dflt_enrt_cd is not null
867: and p_level is null then -- 3510229
868: p_level:='OIPL';
871: END IF;
872: end if;
873: --End Bug 6061856
874:
875: -- hr_utility.set_location(l_dflt_enrt_cd,80);
876: IF p_pgm_id IS NULL
877: AND l_dflt_enrt_cd IS NULL THEN
878: --
879: -- 7
882: -- l_dflt_enrt_cd := ben_cobj_cache.g_pl_currow.nip_dflt_enrt_cd;
883: -- l_dflt_enrt_rl := ben_cobj_cache.g_pl_currow.nip_dflt_enrt_det_rl;
884: --
885: if g_debug then
886: hr_utility.set_location(' p_pl_rec.pl_id '||p_oipl_rec.oipl_id ,110);
887: hr_utility.set_location(' p_pl_rec.nip_dflt_enrt_cd '||p_pl_rec.nip_dflt_enrt_cd ,110);
888: hr_utility.set_location(' p_pl_rec.nip_dflt_flag '||p_pl_rec.nip_dflt_flag, 110) ;
889: end if;
890: --
883: -- l_dflt_enrt_rl := ben_cobj_cache.g_pl_currow.nip_dflt_enrt_det_rl;
884: --
885: if g_debug then
886: hr_utility.set_location(' p_pl_rec.pl_id '||p_oipl_rec.oipl_id ,110);
887: hr_utility.set_location(' p_pl_rec.nip_dflt_enrt_cd '||p_pl_rec.nip_dflt_enrt_cd ,110);
888: hr_utility.set_location(' p_pl_rec.nip_dflt_flag '||p_pl_rec.nip_dflt_flag, 110) ;
889: end if;
890: --
891: l_dflt_enrt_cd := p_pl_rec.nip_dflt_enrt_cd ;
884: --
885: if g_debug then
886: hr_utility.set_location(' p_pl_rec.pl_id '||p_oipl_rec.oipl_id ,110);
887: hr_utility.set_location(' p_pl_rec.nip_dflt_enrt_cd '||p_pl_rec.nip_dflt_enrt_cd ,110);
888: hr_utility.set_location(' p_pl_rec.nip_dflt_flag '||p_pl_rec.nip_dflt_flag, 110) ;
889: end if;
890: --
891: l_dflt_enrt_cd := p_pl_rec.nip_dflt_enrt_cd ;
892: l_dflt_enrt_rl := p_pl_rec.nip_dflt_enrt_det_rl ;
905: and p_level is null then -- 3510229
906: p_level:='PL';
907: end if;
908: --
909: -- hr_utility.set_location(l_dflt_enrt_cd,90);
910:
911: ELSIF p_pgm_id IS NOT NULL
912: AND l_dflt_enrt_cd IS NULL THEN
913: --
924: and p_level is null then -- 3510229
925: p_level:='PLIP';
926: end if;
927: if g_debug then
928: hr_utility.set_location(l_dflt_enrt_cd,100);
929: end if;
930: --
931: IF l_dflt_enrt_cd IS NULL THEN
932: --
943: and p_level is null then -- 3510229
944: p_level:='PTIP';
945: end if;
946: if g_debug then
947: hr_utility.set_location(l_dflt_enrt_cd,110);
948: end if;
949: --
950: END IF;
951: END IF;
950: END IF;
951: END IF;
952: --
953: if g_debug then
954: hr_utility.set_location(' p_pgm_id '||p_pgm_id||' pl_id '||p_pl_id||' oipl '||p_oipl_id||
955: ' plip '||p_plip_id||' ptip '||p_ptip_id,130);
956: hr_utility.set_location('dflt_enrt_cd= '||l_dflt_enrt_cd,130);
957: hr_utility.set_location('dflt_enrt_rl= '||l_dflt_enrt_rl,140);
958: hr_utility.set_location('p_ler_dflt_flag= '||p_ler_dflt_flag ,140);
952: --
953: if g_debug then
954: hr_utility.set_location(' p_pgm_id '||p_pgm_id||' pl_id '||p_pl_id||' oipl '||p_oipl_id||
955: ' plip '||p_plip_id||' ptip '||p_ptip_id,130);
956: hr_utility.set_location('dflt_enrt_cd= '||l_dflt_enrt_cd,130);
957: hr_utility.set_location('dflt_enrt_rl= '||l_dflt_enrt_rl,140);
958: hr_utility.set_location('p_ler_dflt_flag= '||p_ler_dflt_flag ,140);
959: end if;
960: p_dflt_enrt_cd := l_dflt_enrt_cd;
953: if g_debug then
954: hr_utility.set_location(' p_pgm_id '||p_pgm_id||' pl_id '||p_pl_id||' oipl '||p_oipl_id||
955: ' plip '||p_plip_id||' ptip '||p_ptip_id,130);
956: hr_utility.set_location('dflt_enrt_cd= '||l_dflt_enrt_cd,130);
957: hr_utility.set_location('dflt_enrt_rl= '||l_dflt_enrt_rl,140);
958: hr_utility.set_location('p_ler_dflt_flag= '||p_ler_dflt_flag ,140);
959: end if;
960: p_dflt_enrt_cd := l_dflt_enrt_cd;
961: p_dflt_enrt_rl := l_dflt_enrt_rl;
954: hr_utility.set_location(' p_pgm_id '||p_pgm_id||' pl_id '||p_pl_id||' oipl '||p_oipl_id||
955: ' plip '||p_plip_id||' ptip '||p_ptip_id,130);
956: hr_utility.set_location('dflt_enrt_cd= '||l_dflt_enrt_cd,130);
957: hr_utility.set_location('dflt_enrt_rl= '||l_dflt_enrt_rl,140);
958: hr_utility.set_location('p_ler_dflt_flag= '||p_ler_dflt_flag ,140);
959: end if;
960: p_dflt_enrt_cd := l_dflt_enrt_cd;
961: p_dflt_enrt_rl := l_dflt_enrt_rl;
962: if g_debug then
959: end if;
960: p_dflt_enrt_cd := l_dflt_enrt_cd;
961: p_dflt_enrt_rl := l_dflt_enrt_rl;
962: if g_debug then
963: hr_utility.set_location('Leaving: ' || l_proc, 150);
964: end if;
965: exception
966: --
967: when others then
1219: -- set: p_enrt_cd and p_enrt_rl
1220: -- ----------------------------
1221:
1222: ----
1223: hr_utility.set_location( 'oipl' || oipl_enrt_cd , 10) ;
1224: hr_utility.set_location( 'pl' || pnip_enrt_cd , 10) ;
1225: hr_utility.set_location( 'plip' || plip_enrt_cd , 10);
1226: hr_utility.set_location( 'ptip' || ptip_enrt_cd , 10) ;
1227:
1220: -- ----------------------------
1221:
1222: ----
1223: hr_utility.set_location( 'oipl' || oipl_enrt_cd , 10) ;
1224: hr_utility.set_location( 'pl' || pnip_enrt_cd , 10) ;
1225: hr_utility.set_location( 'plip' || plip_enrt_cd , 10);
1226: hr_utility.set_location( 'ptip' || ptip_enrt_cd , 10) ;
1227:
1228:
1221:
1222: ----
1223: hr_utility.set_location( 'oipl' || oipl_enrt_cd , 10) ;
1224: hr_utility.set_location( 'pl' || pnip_enrt_cd , 10) ;
1225: hr_utility.set_location( 'plip' || plip_enrt_cd , 10);
1226: hr_utility.set_location( 'ptip' || ptip_enrt_cd , 10) ;
1227:
1228:
1229:
1222: ----
1223: hr_utility.set_location( 'oipl' || oipl_enrt_cd , 10) ;
1224: hr_utility.set_location( 'pl' || pnip_enrt_cd , 10) ;
1225: hr_utility.set_location( 'plip' || plip_enrt_cd , 10);
1226: hr_utility.set_location( 'ptip' || ptip_enrt_cd , 10) ;
1227:
1228:
1229:
1230: hr_utility.set_location( 'oipl id ' || p_oipl_id , 10) ;
1226: hr_utility.set_location( 'ptip' || ptip_enrt_cd , 10) ;
1227:
1228:
1229:
1230: hr_utility.set_location( 'oipl id ' || p_oipl_id , 10) ;
1231: hr_utility.set_location( 'ptip id ' || p_ptip_id , 10) ;
1232: hr_utility.set_location( 'plip id ' || p_plip_id , 10) ;
1233: hr_utility.set_location( 'pl id ' || p_pl_id , 10) ;
1234: ---
1227:
1228:
1229:
1230: hr_utility.set_location( 'oipl id ' || p_oipl_id , 10) ;
1231: hr_utility.set_location( 'ptip id ' || p_ptip_id , 10) ;
1232: hr_utility.set_location( 'plip id ' || p_plip_id , 10) ;
1233: hr_utility.set_location( 'pl id ' || p_pl_id , 10) ;
1234: ---
1235:
1228:
1229:
1230: hr_utility.set_location( 'oipl id ' || p_oipl_id , 10) ;
1231: hr_utility.set_location( 'ptip id ' || p_ptip_id , 10) ;
1232: hr_utility.set_location( 'plip id ' || p_plip_id , 10) ;
1233: hr_utility.set_location( 'pl id ' || p_pl_id , 10) ;
1234: ---
1235:
1236:
1229:
1230: hr_utility.set_location( 'oipl id ' || p_oipl_id , 10) ;
1231: hr_utility.set_location( 'ptip id ' || p_ptip_id , 10) ;
1232: hr_utility.set_location( 'plip id ' || p_plip_id , 10) ;
1233: hr_utility.set_location( 'pl id ' || p_pl_id , 10) ;
1234: ---
1235:
1236:
1237: IF oipl_enrt_cd IS NULL THEN
1260: p_enrt_cd := oipl_enrt_cd;
1261: p_enrt_rl := oipl_enrt_rl;
1262: p_enrt_cd_level := 'OIPL' ;
1263: END IF;
1264: hr_utility.set_location( 'p_enrt_cd_level ' || p_enrt_cd_level , 10) ;
1265:
1266: IF p_just_prclds_chg_flag THEN
1267: RETURN;
1268: END IF;
1368: p_ler_chg_oipl_found_flag := 'Y';
1369: p_ler_chg_found_flag := 'Y';
1370: END IF;
1371: END IF;
1372: hr_utility.set_location( 'p_enrt_cd_level ' || p_enrt_cd_level , 10) ;
1373: exception
1374: --
1375: when others then
1376: --
1737:
1738:
1739: --
1740: BEGIN
1741: g_debug := hr_utility.debug_enabled;
1742: if g_debug then
1743: hr_utility.set_location('Entering: ' || l_proc, 10);
1744: end if;
1745: -- hr_utility.set_location('enrt_mthd_cd='||p_enrt_mthd_cd,11);
1739: --
1740: BEGIN
1741: g_debug := hr_utility.debug_enabled;
1742: if g_debug then
1743: hr_utility.set_location('Entering: ' || l_proc, 10);
1744: end if;
1745: -- hr_utility.set_location('enrt_mthd_cd='||p_enrt_mthd_cd,11);
1746: -- hr_utility.set_location('auto_enrt_mthd_rl='||p_auto_enrt_mthd_rl,13);
1747: -- hr_utility.set_location('enrt_cd='||p_enrt_cd,12);
1741: g_debug := hr_utility.debug_enabled;
1742: if g_debug then
1743: hr_utility.set_location('Entering: ' || l_proc, 10);
1744: end if;
1745: -- hr_utility.set_location('enrt_mthd_cd='||p_enrt_mthd_cd,11);
1746: -- hr_utility.set_location('auto_enrt_mthd_rl='||p_auto_enrt_mthd_rl,13);
1747: -- hr_utility.set_location('enrt_cd='||p_enrt_cd,12);
1748: --
1749: -- Get program record.
1742: if g_debug then
1743: hr_utility.set_location('Entering: ' || l_proc, 10);
1744: end if;
1745: -- hr_utility.set_location('enrt_mthd_cd='||p_enrt_mthd_cd,11);
1746: -- hr_utility.set_location('auto_enrt_mthd_rl='||p_auto_enrt_mthd_rl,13);
1747: -- hr_utility.set_location('enrt_cd='||p_enrt_cd,12);
1748: --
1749: -- Get program record.
1750: --
1743: hr_utility.set_location('Entering: ' || l_proc, 10);
1744: end if;
1745: -- hr_utility.set_location('enrt_mthd_cd='||p_enrt_mthd_cd,11);
1746: -- hr_utility.set_location('auto_enrt_mthd_rl='||p_auto_enrt_mthd_rl,13);
1747: -- hr_utility.set_location('enrt_cd='||p_enrt_cd,12);
1748: --
1749: -- Get program record.
1750: --
1751: IF p_pgm_id IS NOT NULL THEN
1750: --
1751: IF p_pgm_id IS NOT NULL THEN
1752: ben_comp_object.get_object(p_pgm_id => p_pgm_id, p_rec => l_pgm_rec);
1753: if g_debug then
1754: hr_utility.set_location('Done PGM NN: ' || l_proc, 10);
1755: end if;
1756: END IF;
1757: --
1758: -- Check the tco_chg_enrt_cd if this comp object can be changed
1777: IF p_person_id IS NOT NULL THEN
1778: OPEN c_state;
1779: FETCH c_state INTO l_state;
1780: CLOSE c_state;
1781: hr_utility.set_location('close c_state: ' || l_proc, 9999);
1782: --IF l_state.region_2 IS NOT NULL THEN
1783: -- l_jurisdiction_code :=
1784: -- pay_mag_utils.lookup_jurisdiction_code(p_state => l_state.region_2);
1785: --END IF;
1798: RAISE ben_manage_life_events.g_record_error;
1799: END IF;
1800: CLOSE c_asg;
1801: if g_debug then
1802: hr_utility.set_location('close c_asg: ' || l_proc, 10);
1803: end if;
1804: IF p_oipl_id IS NOT NULL THEN
1805: IF p_tco_chg_enrt_cd = 'CONP' THEN
1806: --
1831: --
1832: ELSIF p_tco_chg_enrt_cd = 'CPNO' THEN
1833: --
1834: if g_debug then
1835: hr_utility.set_location('pl_typ_id=' || p_pl_typ_id, 1963);
1836: hr_utility.set_location('opt_id=' || p_opt_id, 1963);
1837: hr_utility.set_location(
1838: 'crnt_opt_cvg_strt_dt=' || l_crnt_opt_cvg_strt_dt,
1839: 1963);
1832: ELSIF p_tco_chg_enrt_cd = 'CPNO' THEN
1833: --
1834: if g_debug then
1835: hr_utility.set_location('pl_typ_id=' || p_pl_typ_id, 1963);
1836: hr_utility.set_location('opt_id=' || p_opt_id, 1963);
1837: hr_utility.set_location(
1838: 'crnt_opt_cvg_strt_dt=' || l_crnt_opt_cvg_strt_dt,
1839: 1963);
1840: end if;
1833: --
1834: if g_debug then
1835: hr_utility.set_location('pl_typ_id=' || p_pl_typ_id, 1963);
1836: hr_utility.set_location('opt_id=' || p_opt_id, 1963);
1837: hr_utility.set_location(
1838: 'crnt_opt_cvg_strt_dt=' || l_crnt_opt_cvg_strt_dt,
1839: 1963);
1840: end if;
1841: OPEN c_enrolled_opts_in_pl_typ;
1840: end if;
1841: OPEN c_enrolled_opts_in_pl_typ;
1842: FETCH c_enrolled_opts_in_pl_typ INTO l_crnt_opt_cvg_strt_dt;
1843: if g_debug then
1844: hr_utility.set_location(
1845: 'crnt_opt_cvg_strt_dt=' || l_crnt_opt_cvg_strt_dt,
1846: 1963);
1847: end if;
1848: IF c_enrolled_opts_in_pl_typ%NOTFOUND THEN
1854: IF l_pgm_rec.pgm_typ_cd LIKE 'COBRA%' THEN
1855: OPEN c_cvrd_opts_in_pl_typ;
1856: FETCH c_cvrd_opts_in_pl_typ INTO l_crnt_opt_cvg_strt_dt;
1857: if g_debug then
1858: hr_utility.set_location(
1859: 'crnt_opt_cvg_strt_dt=' || l_crnt_opt_cvg_strt_dt,
1860: 1963);
1861: end if;
1862: CLOSE c_cvrd_opts_in_pl_typ;
1867: END IF;
1868: --
1869: END IF;
1870: if g_debug then
1871: hr_utility.set_location('Done p_oipl NN ' || l_proc, 10);
1872: end if;
1873: --
1874: IF NOT (
1875: ( -- eval oipl
1894: --
1895: p_electable_flag := 'N';
1896: --
1897: if g_debug then
1898: hr_utility.set_location(' Leaving:' || l_proc, 5);
1899: end if;
1900: --
1901: RETURN;
1902: --
1910: --
1911: p_electable_flag := 'N';
1912: --
1913: if g_debug then
1914: hr_utility.set_location(' Leaving:' || l_proc, 10);
1915: end if;
1916: --
1917: RETURN;
1918: --
1928: --
1929: p_electable_flag := 'N';
1930: --
1931: if g_debug then
1932: hr_utility.set_location(' Returning:' || l_proc, 15);
1933: end if;
1934: --
1935: RETURN;
1936: --
1961: p_ler_chg_found_flag => l_ler_chg_found_flag,
1962: p_enrt_cd_level => l_enrt_cd_level );
1963:
1964: if g_debug then
1965: hr_utility.set_location( 'l_enrt_cd_level ' || l_enrt_cd_level , 99 );
1966: hr_utility.set_location( 'enrt_cd ' || p_enrt_cd , 99 );
1967: end if;
1968: --- check the level of enrollment code and intialise the coverage date
1969: if l_enrt_cd_level = 'OIPL' then
1962: p_enrt_cd_level => l_enrt_cd_level );
1963:
1964: if g_debug then
1965: hr_utility.set_location( 'l_enrt_cd_level ' || l_enrt_cd_level , 99 );
1966: hr_utility.set_location( 'enrt_cd ' || p_enrt_cd , 99 );
1967: end if;
1968: --- check the level of enrollment code and intialise the coverage date
1969: if l_enrt_cd_level = 'OIPL' then
1970: l_enrt_cvg_date := p_crnt_enrt_cvg_strt_dt ;
1991: else
1992: l_enrt_cvg_date := p_crnt_enrt_cvg_strt_dt ;
1993: end if ;
1994: if g_debug then
1995: hr_utility.set_location( 'l_enrt_cvg_date ' || l_enrt_cvg_date , 99 );
1996: end if;
1997: ----
1998:
1999:
1998:
1999:
2000: -- check if enrolled in ptip
2001: if g_debug then
2002: hr_utility.set_location(' Op c_ptip_enr_inf'||l_proc, 15);
2003: end if;
2004: OPEN c_ptip_enrolment_info;
2005: FETCH c_ptip_enrolment_info INTO l_enrolled_ptip;
2006: if g_debug then
2003: end if;
2004: OPEN c_ptip_enrolment_info;
2005: FETCH c_ptip_enrolment_info INTO l_enrolled_ptip;
2006: if g_debug then
2007: hr_utility.set_location(' Dn Fet c_ptip_enr_inf'||l_proc, 15);
2008: end if;
2009: IF c_ptip_enrolment_info%FOUND THEN
2010: if g_debug then
2011: hr_utility.set_location('CHKPTIPENRT found', 10);
2007: hr_utility.set_location(' Dn Fet c_ptip_enr_inf'||l_proc, 15);
2008: end if;
2009: IF c_ptip_enrolment_info%FOUND THEN
2010: if g_debug then
2011: hr_utility.set_location('CHKPTIPENRT found', 10);
2012: end if;
2013: IF l_ptip_prclds_flag = 'Y' THEN
2014: if g_debug then
2015: hr_utility.set_location('CHKPTIPENRT prclds', 10);
2011: hr_utility.set_location('CHKPTIPENRT found', 10);
2012: end if;
2013: IF l_ptip_prclds_flag = 'Y' THEN
2014: if g_debug then
2015: hr_utility.set_location('CHKPTIPENRT prclds', 10);
2016: end if;
2017: p_electable_flag := 'N';
2018: --
2019: if g_debug then
2016: end if;
2017: p_electable_flag := 'N';
2018: --
2019: if g_debug then
2020: hr_utility.set_location(' Leaving:' || l_proc, 19);
2021: end if;
2022: --
2023: RETURN;
2024: --
2027: CLOSE c_ptip_enrolment_info;
2028: END IF;
2029: -- If the enrt_cd is rule
2030: if g_debug then
2031: hr_utility.set_location('EC=RL: ' || l_proc, 10);
2032: end if;
2033: IF (p_enrt_cd = 'RL') THEN
2034: -- 5092244 : commented the following code
2035: /* if p_update_def_elct_flag is not null then -- don't reevaluate the rule again
2060: --
2061: p_electable_flag := 'N';
2062: --
2063: if g_debug then
2064: hr_utility.set_location(' Leaving:' || l_proc, 20);
2065: end if;
2066: --
2067: RETURN;
2068: --
2071: -- L will be used for Lose only functionality.
2072: --
2073: p_electable_flag := 'L';
2074: if g_debug then
2075: hr_utility.set_location(' Leaving:' || l_proc, 21);
2076: end if;
2077: --
2078: RETURN;
2079: --
2094: RETURN;
2095: --
2096: ELSE -- p_enrt_cd = 'RL'
2097: if g_debug then
2098: hr_utility.set_location('Else EC=RL: ' || l_proc, 10);
2099: end if;
2100: -- If the combination of enrt_cd and eligibility status is YES in the
2101: -- following matrix then the choice is electable
2102: -- (continue to create choice),
2141: --
2142: p_electable_flag := 'N';
2143: --
2144: if g_debug then
2145: hr_utility.set_location(' Leaving:' || l_proc, 25);
2146: end if;
2147: --
2148: RETURN;
2149: --
2153: --
2154: p_electable_flag := 'Y';
2155: --
2156: if g_debug then
2157: hr_utility.set_location(' Leaving:' || l_proc, 30);
2158: end if;
2159: --
2160: RETURN;
2161: --
2221:
2222: l_position_id number(15);
2223: Begin
2224: --
2225: g_debug := hr_utility.debug_enabled;
2226: open c_get_assignment;
2227: fetch c_get_assignment into l_get_assignment;
2228: close c_get_assignment;
2229: --
2372: -- day after prior event elections start date
2373: -- and system date
2374: -------------------------------------------------------------------------
2375: -- if cd is L_EPSD_PEPD, use the old logic
2376: hr_utility.set_location(' Entering '||l_proc, 10);
2377: --
2378: -- remove all these debug messages
2379: hr_utility.set_location(' p_enrt_perd_det_ovrlp_bckdt_cd is '||p_enrt_perd_det_ovrlp_bckdt_cd, 987);
2380: hr_utility.set_location(' p_person_id '||p_person_id, 10);
2375: -- if cd is L_EPSD_PEPD, use the old logic
2376: hr_utility.set_location(' Entering '||l_proc, 10);
2377: --
2378: -- remove all these debug messages
2379: hr_utility.set_location(' p_enrt_perd_det_ovrlp_bckdt_cd is '||p_enrt_perd_det_ovrlp_bckdt_cd, 987);
2380: hr_utility.set_location(' p_person_id '||p_person_id, 10);
2381: hr_utility.set_location(' p_lf_evt_ocrd_dt '||p_lf_evt_ocrd_dt, 10);
2382: hr_utility.set_location(' p_ler_id '||p_ler_id, 10);
2383: hr_utility.set_location(' p_effective_date '||p_effective_date, 10);
2376: hr_utility.set_location(' Entering '||l_proc, 10);
2377: --
2378: -- remove all these debug messages
2379: hr_utility.set_location(' p_enrt_perd_det_ovrlp_bckdt_cd is '||p_enrt_perd_det_ovrlp_bckdt_cd, 987);
2380: hr_utility.set_location(' p_person_id '||p_person_id, 10);
2381: hr_utility.set_location(' p_lf_evt_ocrd_dt '||p_lf_evt_ocrd_dt, 10);
2382: hr_utility.set_location(' p_ler_id '||p_ler_id, 10);
2383: hr_utility.set_location(' p_effective_date '||p_effective_date, 10);
2384: hr_utility.set_location(' p_rec_enrt_perd_strt_dt '||p_rec_enrt_perd_strt_dt, 10);
2377: --
2378: -- remove all these debug messages
2379: hr_utility.set_location(' p_enrt_perd_det_ovrlp_bckdt_cd is '||p_enrt_perd_det_ovrlp_bckdt_cd, 987);
2380: hr_utility.set_location(' p_person_id '||p_person_id, 10);
2381: hr_utility.set_location(' p_lf_evt_ocrd_dt '||p_lf_evt_ocrd_dt, 10);
2382: hr_utility.set_location(' p_ler_id '||p_ler_id, 10);
2383: hr_utility.set_location(' p_effective_date '||p_effective_date, 10);
2384: hr_utility.set_location(' p_rec_enrt_perd_strt_dt '||p_rec_enrt_perd_strt_dt, 10);
2385: --
2378: -- remove all these debug messages
2379: hr_utility.set_location(' p_enrt_perd_det_ovrlp_bckdt_cd is '||p_enrt_perd_det_ovrlp_bckdt_cd, 987);
2380: hr_utility.set_location(' p_person_id '||p_person_id, 10);
2381: hr_utility.set_location(' p_lf_evt_ocrd_dt '||p_lf_evt_ocrd_dt, 10);
2382: hr_utility.set_location(' p_ler_id '||p_ler_id, 10);
2383: hr_utility.set_location(' p_effective_date '||p_effective_date, 10);
2384: hr_utility.set_location(' p_rec_enrt_perd_strt_dt '||p_rec_enrt_perd_strt_dt, 10);
2385: --
2386:
2379: hr_utility.set_location(' p_enrt_perd_det_ovrlp_bckdt_cd is '||p_enrt_perd_det_ovrlp_bckdt_cd, 987);
2380: hr_utility.set_location(' p_person_id '||p_person_id, 10);
2381: hr_utility.set_location(' p_lf_evt_ocrd_dt '||p_lf_evt_ocrd_dt, 10);
2382: hr_utility.set_location(' p_ler_id '||p_ler_id, 10);
2383: hr_utility.set_location(' p_effective_date '||p_effective_date, 10);
2384: hr_utility.set_location(' p_rec_enrt_perd_strt_dt '||p_rec_enrt_perd_strt_dt, 10);
2385: --
2386:
2387: IF nvl(p_enrt_perd_det_ovrlp_bckdt_cd, 'L_EPSD_PEPD') = 'L_EPSD_PEPD' THEN
2380: hr_utility.set_location(' p_person_id '||p_person_id, 10);
2381: hr_utility.set_location(' p_lf_evt_ocrd_dt '||p_lf_evt_ocrd_dt, 10);
2382: hr_utility.set_location(' p_ler_id '||p_ler_id, 10);
2383: hr_utility.set_location(' p_effective_date '||p_effective_date, 10);
2384: hr_utility.set_location(' p_rec_enrt_perd_strt_dt '||p_rec_enrt_perd_strt_dt, 10);
2385: --
2386:
2387: IF nvl(p_enrt_perd_det_ovrlp_bckdt_cd, 'L_EPSD_PEPD') = 'L_EPSD_PEPD' THEN
2388: --
2385: --
2386:
2387: IF nvl(p_enrt_perd_det_ovrlp_bckdt_cd, 'L_EPSD_PEPD') = 'L_EPSD_PEPD' THEN
2388: --
2389: hr_utility.set_location(' L_EPSD_PEPD', 987);
2390: OPEN c_get_latest_procd_dt;
2391: FETCH c_get_latest_procd_dt INTO l_latest_procd_dt;
2392: -- new epsd is greater of epsd or latest_procd_dt
2393: -- IF c_get_latest_procd_dt%FOUND THEN
2391: FETCH c_get_latest_procd_dt INTO l_latest_procd_dt;
2392: -- new epsd is greater of epsd or latest_procd_dt
2393: -- IF c_get_latest_procd_dt%FOUND THEN
2394: IF l_latest_procd_dt IS NOT NULL THEN
2395: hr_utility.set_location(' c_get_latest_procd_dt%found', 987);
2396: hr_utility.set_location('l_latest_procd_dt is '||l_latest_procd_dt, 987);
2397: -- jcarpent 1/4/2001 bug 1568555, removed +1 from line below
2398: IF p_rec_enrt_perd_strt_dt < l_latest_procd_dt THEN
2399: hr_utility.set_location('l_latest_procd_dt made enrt strt dt ', 987);
2392: -- new epsd is greater of epsd or latest_procd_dt
2393: -- IF c_get_latest_procd_dt%FOUND THEN
2394: IF l_latest_procd_dt IS NOT NULL THEN
2395: hr_utility.set_location(' c_get_latest_procd_dt%found', 987);
2396: hr_utility.set_location('l_latest_procd_dt is '||l_latest_procd_dt, 987);
2397: -- jcarpent 1/4/2001 bug 1568555, removed +1 from line below
2398: IF p_rec_enrt_perd_strt_dt < l_latest_procd_dt THEN
2399: hr_utility.set_location('l_latest_procd_dt made enrt strt dt ', 987);
2400: -- jcarpent 1/4/2001 bug 1568555, removed +1 from line below
2395: hr_utility.set_location(' c_get_latest_procd_dt%found', 987);
2396: hr_utility.set_location('l_latest_procd_dt is '||l_latest_procd_dt, 987);
2397: -- jcarpent 1/4/2001 bug 1568555, removed +1 from line below
2398: IF p_rec_enrt_perd_strt_dt < l_latest_procd_dt THEN
2399: hr_utility.set_location('l_latest_procd_dt made enrt strt dt ', 987);
2400: -- jcarpent 1/4/2001 bug 1568555, removed +1 from line below
2401: p_rec_enrt_perd_strt_dt := l_latest_procd_dt;
2402: -- if the enrollment exist for the previous LE
2403: -- start the window latest_procd_dt + 1
2428: OPEN c_backed_out_ler;
2429: FETCH c_backed_out_ler INTO l_backed_out_date;
2430: --IF c_backed_out_ler%FOUND THEN
2431: IF l_backed_out_date is NOT NULL THEN
2432: hr_utility.set_location(' c_backed_out_ler%found', 987);
2433: hr_utility.set_location('l_backed_out_date is '||l_backed_out_date, 987);
2434: -- 5a ... and is the backed-out date > than the new epsd?
2435: IF l_backed_out_date > p_rec_enrt_perd_strt_dt THEN
2436: hr_utility.set_location('l_backed_out_date made enrt strt dt ', 987);
2429: FETCH c_backed_out_ler INTO l_backed_out_date;
2430: --IF c_backed_out_ler%FOUND THEN
2431: IF l_backed_out_date is NOT NULL THEN
2432: hr_utility.set_location(' c_backed_out_ler%found', 987);
2433: hr_utility.set_location('l_backed_out_date is '||l_backed_out_date, 987);
2434: -- 5a ... and is the backed-out date > than the new epsd?
2435: IF l_backed_out_date > p_rec_enrt_perd_strt_dt THEN
2436: hr_utility.set_location('l_backed_out_date made enrt strt dt ', 987);
2437: -- 6 it is the new epsd.
2432: hr_utility.set_location(' c_backed_out_ler%found', 987);
2433: hr_utility.set_location('l_backed_out_date is '||l_backed_out_date, 987);
2434: -- 5a ... and is the backed-out date > than the new epsd?
2435: IF l_backed_out_date > p_rec_enrt_perd_strt_dt THEN
2436: hr_utility.set_location('l_backed_out_date made enrt strt dt ', 987);
2437: -- 6 it is the new epsd.
2438: p_rec_enrt_perd_strt_dt := l_backed_out_date;
2439: END IF;
2440: END IF;
2442: END IF;
2443: -- 2746865
2444: -- if cd is L_EPSD_PEESD%, use the new logic
2445: ELSIF p_enrt_perd_det_ovrlp_bckdt_cd like 'L_EPSD_PEESD%' THEN
2446: hr_utility.set_location(' L_EPSD_PEESD%', 987);
2447: -- get the person's latest enrollment start date +1
2448: OPEN c_get_latest_enrt_dt;
2449: FETCH c_get_latest_enrt_dt into l_latest_enrt_dt;
2450: -- IF c_get_latest_enrt_dt%FOUND THEN --changed as its always found
2448: OPEN c_get_latest_enrt_dt;
2449: FETCH c_get_latest_enrt_dt into l_latest_enrt_dt;
2450: -- IF c_get_latest_enrt_dt%FOUND THEN --changed as its always found
2451: IF l_latest_enrt_dt is not null THEN
2452: hr_utility.set_location(' c_get_latest_enrt_dt%FOUND', 987);
2453: hr_utility.set_location('l_latest_enrt_dt is '||l_latest_enrt_dt, 987);
2454: -- if latest enrt dt is greater than epsd, make it the epsd
2455: IF l_latest_enrt_dt > p_rec_enrt_perd_strt_dt THEN
2456: p_rec_enrt_perd_strt_dt := l_latest_enrt_dt;
2449: FETCH c_get_latest_enrt_dt into l_latest_enrt_dt;
2450: -- IF c_get_latest_enrt_dt%FOUND THEN --changed as its always found
2451: IF l_latest_enrt_dt is not null THEN
2452: hr_utility.set_location(' c_get_latest_enrt_dt%FOUND', 987);
2453: hr_utility.set_location('l_latest_enrt_dt is '||l_latest_enrt_dt, 987);
2454: -- if latest enrt dt is greater than epsd, make it the epsd
2455: IF l_latest_enrt_dt > p_rec_enrt_perd_strt_dt THEN
2456: p_rec_enrt_perd_strt_dt := l_latest_enrt_dt;
2457: hr_utility.set_location('l_latest_enrt_dt substituted', 987);
2453: hr_utility.set_location('l_latest_enrt_dt is '||l_latest_enrt_dt, 987);
2454: -- if latest enrt dt is greater than epsd, make it the epsd
2455: IF l_latest_enrt_dt > p_rec_enrt_perd_strt_dt THEN
2456: p_rec_enrt_perd_strt_dt := l_latest_enrt_dt;
2457: hr_utility.set_location('l_latest_enrt_dt substituted', 987);
2458: END IF;
2459: END IF;
2460: CLOSE c_get_latest_enrt_dt;
2461: -- cd is 2 find the bckdt out dt
2459: END IF;
2460: CLOSE c_get_latest_enrt_dt;
2461: -- cd is 2 find the bckdt out dt
2462: IF p_enrt_perd_det_ovrlp_bckdt_cd = 'L_EPSD_PEESD_BCKDT' THEN
2463: hr_utility.set_location('L_EPSD_PEESD_BCKDT entered', 987);
2464: -- get the backed out date
2465: OPEN c_backed_out_ler;
2466: FETCH c_backed_out_ler INTO l_backed_out_date;
2467: hr_utility.set_location('l_backed_out_date is '||l_backed_out_date, 987);
2463: hr_utility.set_location('L_EPSD_PEESD_BCKDT entered', 987);
2464: -- get the backed out date
2465: OPEN c_backed_out_ler;
2466: FETCH c_backed_out_ler INTO l_backed_out_date;
2467: hr_utility.set_location('l_backed_out_date is '||l_backed_out_date, 987);
2468: --IF c_backed_out_ler%FOUND THEN -- changed as its of no use
2469: IF l_backed_out_date is not null THEN
2470: hr_utility.set_location('bckdt%found', 987);
2471: -- if bckdt out dt is greater than epsd, make it the epsd
2466: FETCH c_backed_out_ler INTO l_backed_out_date;
2467: hr_utility.set_location('l_backed_out_date is '||l_backed_out_date, 987);
2468: --IF c_backed_out_ler%FOUND THEN -- changed as its of no use
2469: IF l_backed_out_date is not null THEN
2470: hr_utility.set_location('bckdt%found', 987);
2471: -- if bckdt out dt is greater than epsd, make it the epsd
2472: IF l_backed_out_date > p_rec_enrt_perd_strt_dt THEN
2473: p_rec_enrt_perd_strt_dt := l_backed_out_date;
2474: hr_utility.set_location('l_backed_out_date substituted', 987);
2470: hr_utility.set_location('bckdt%found', 987);
2471: -- if bckdt out dt is greater than epsd, make it the epsd
2472: IF l_backed_out_date > p_rec_enrt_perd_strt_dt THEN
2473: p_rec_enrt_perd_strt_dt := l_backed_out_date;
2474: hr_utility.set_location('l_backed_out_date substituted', 987);
2475: END IF;
2476: END IF;
2477: CLOSE c_backed_out_ler;
2478: -- if cd is 4, compare epsd with sysdate
2476: END IF;
2477: CLOSE c_backed_out_ler;
2478: -- if cd is 4, compare epsd with sysdate
2479: ELSIF p_enrt_perd_det_ovrlp_bckdt_cd = 'L_EPSD_PEESD_SYSDT' THEN
2480: hr_utility.set_location('L_EPSD_PEESD_SYSDT entered', 987);
2481: -- if sysdate is lis greater than epsd, make it the epsd
2482: IF l_sysdate > p_rec_enrt_perd_strt_dt THEN
2483: p_rec_enrt_perd_strt_dt := l_sysdate;
2484: hr_utility.set_location('sysdate substituted', 987);
2480: hr_utility.set_location('L_EPSD_PEESD_SYSDT entered', 987);
2481: -- if sysdate is lis greater than epsd, make it the epsd
2482: IF l_sysdate > p_rec_enrt_perd_strt_dt THEN
2483: p_rec_enrt_perd_strt_dt := l_sysdate;
2484: hr_utility.set_location('sysdate substituted', 987);
2485: END IF;
2486: END IF;
2487: -- end 2746865
2488: END IF;
3623: l_current_pl_typ_id number;
3624: --END BUG 6519487 fix
3625: BEGIN
3626: --
3627: g_debug := hr_utility.debug_enabled;
3628: hr_utility.set_location('Entering:' || l_proc, 10);
3629: --
3630: -- If the run_mode is not "life event" or "scheduled" DONE
3631: -- Bug 2200139 Added 'V' mode for override
3624: --END BUG 6519487 fix
3625: BEGIN
3626: --
3627: g_debug := hr_utility.debug_enabled;
3628: hr_utility.set_location('Entering:' || l_proc, 10);
3629: --
3630: -- If the run_mode is not "life event" or "scheduled" DONE
3631: -- Bug 2200139 Added 'V' mode for override
3632: -- ABSENCES - added absence mode. Added GRADE/STEP
3649: --
3650: -- get oipl information
3651: --
3652: if g_debug then
3653: hr_utility.set_location('OIPL NN: ' || l_proc, 10);
3654: end if;
3655: --
3656: -- Bug 2200139 For Override call the cache routine else call the benmnglecache
3657: -- this is not required as the data is fetched on the benovrrd.pkb
3681: l_oipl_trk_inelig_per_flag := l_oipl_rec.trk_inelig_per_flag;
3682: --
3683: -- l_oipl_name := ben_cobj_cache.g_opt_currow.name;
3684: if g_debug then
3685: hr_utility.set_location('DONE OIPL NN: ' || l_proc, 10);
3686: end if;
3687: --
3688: ELSE
3689: --
3694: -- get plan cache row
3695: --
3696: ben_comp_object.get_object(p_pl_id => l_pl_id, p_rec => l_plan_rec);
3697: if g_debug then
3698: hr_utility.set_location('Done PLN cac: ' || l_proc, 10);
3699: hr_utility.set_location(
3700: 'Plan name is ' || SUBSTR(l_plan_rec.name, 1, 30),
3701: 17);
3702: end if;
3695: --
3696: ben_comp_object.get_object(p_pl_id => l_pl_id, p_rec => l_plan_rec);
3697: if g_debug then
3698: hr_utility.set_location('Done PLN cac: ' || l_proc, 10);
3699: hr_utility.set_location(
3700: 'Plan name is ' || SUBSTR(l_plan_rec.name, 1, 30),
3701: 17);
3702: end if;
3703: --
3704: -- Get pgm cache row if needed
3705: --
3706: IF p_pgm_id IS NOT NULL THEN
3707: if g_debug then
3708: hr_utility.set_location('PGM NN 2: ' || l_proc, 10);
3709: end if;
3710: ben_comp_object.get_object(p_pgm_id => p_pgm_id, p_rec => l_pgm_rec);
3711: if g_debug then
3712: hr_utility.set_location('Done PGM NN 2: ' || l_proc, 10);
3708: hr_utility.set_location('PGM NN 2: ' || l_proc, 10);
3709: end if;
3710: ben_comp_object.get_object(p_pgm_id => p_pgm_id, p_rec => l_pgm_rec);
3711: if g_debug then
3712: hr_utility.set_location('Done PGM NN 2: ' || l_proc, 10);
3713: hr_utility.set_location(
3714: 'Pgm name is ' || SUBSTR(l_pgm_rec.name, 1, 30),
3715: 18);
3716: end if;
3709: end if;
3710: ben_comp_object.get_object(p_pgm_id => p_pgm_id, p_rec => l_pgm_rec);
3711: if g_debug then
3712: hr_utility.set_location('Done PGM NN 2: ' || l_proc, 10);
3713: hr_utility.set_location(
3714: 'Pgm name is ' || SUBSTR(l_pgm_rec.name, 1, 30),
3715: 18);
3716: end if;
3717: END IF;
3727: OR p_person_id IS NULL
3728: OR l_pl_id IS NULL) THEN
3729: --
3730: if g_debug then
3731: hr_utility.set_location('error', 19);
3732: end if;
3733: fnd_message.set_name('BEN', 'BEN_91737_ENRT_REQ_MISS_PARM');
3734: fnd_message.set_token('PROC', l_proc);
3735: fnd_message.set_token('MODE', p_run_mode);
3748: IF p_person_id IS NOT NULL THEN
3749: OPEN c_state;
3750: FETCH c_state INTO l_state;
3751: CLOSE c_state;
3752: hr_utility.set_location('close c_state: ' || l_proc, 10);
3753: --
3754: --IF l_state.region_2 IS NOT NULL THEN
3755: --
3756: -- l_jurisdiction_code :=
3764: OPEN c_asg;
3765: FETCH c_asg INTO l_rec_assignment_id, l_rec_organization_id;
3766: IF c_asg%NOTFOUND THEN
3767: CLOSE c_asg;
3768: hr_utility.set_location('error', 20);
3769: fnd_message.set_name('BEN', 'BEN_92106_PRTT_NO_ASGN');
3770: fnd_message.set_token('PROC', l_proc);
3771: fnd_message.set_token('PERSON_ID', TO_CHAR(p_person_id));
3772: fnd_message.set_token('LF_EVT_OCRD_DT', TO_CHAR(p_lf_evt_ocrd_dt));
3773: fnd_message.set_token('EFFECTIVE_DATE', TO_CHAR(p_effective_date));
3774: RAISE ben_manage_life_events.g_record_error;
3775: END IF;
3776: CLOSE c_asg;
3777: hr_utility.set_location('close c_asg: ' || l_proc, 10);
3778: --
3779: -- Determine if the person is currently enrolled and if so
3780: -- determine the coverage start date.
3781: --
3841: END IF;
3842: --
3843: CLOSE c_plan_enrolment_info;
3844: if g_debug then
3845: hr_utility.set_location('close c_PEI: ' || l_proc, 10);
3846: end if;
3847: --
3848: ELSE
3849: --
3896: END IF;
3897: --
3898: CLOSE c_oipl_enrolment_info;
3899: if g_debug then
3900: hr_utility.set_location('close c_OIEI: ' || l_proc, 10);
3901: end if;
3902: --
3903: END IF;
3904: --
3987: end if;
3988: --
3989: END IF;
3990: if g_debug then
3991: hr_utility.set_location('Got passed initial comp loads', 21);
3992: end if;
3993: --
3994: -- If the current_eligibility is N, DONE, no choice is required.
3995: -- ...(12/23/1998 except when overridden, and thru date >= ed jcarpent)
4014: --
4015: p_electable_flag := 'N';
4016: --
4017: if g_debug then
4018: hr_utility.set_location(' Leaving:' || l_proc, 15);
4019: end if;
4020: --
4021: RETURN;
4022: --
4051: --
4052: end if;
4053: --
4054: if g_debug then
4055: hr_utility.set_location('close c_PEFP: ' || l_proc, 10);
4056: end if;
4057: --
4058: ELSE
4059: --
4079: --
4080: end if;
4081: --
4082: if g_debug then
4083: hr_utility.set_location('close c_PEFO: ' || l_proc, 10);
4084: end if;
4085: --
4086: END IF;
4087: --
4086: END IF;
4087: --
4088: END IF; --'D' mode
4089: if g_debug then
4090: hr_utility.set_location('get plan info', 10);
4091: end if;
4092: --
4093: -- get plan_info
4094: --
4132: END IF;
4133: --
4134: CLOSE c_plip_info;
4135: if g_debug then
4136: hr_utility.set_location('close c_plip_info: ' || l_proc, 10);
4137: end if;
4138: --
4139: -- Find the ptip and get its needed attributes.
4140: --
4161: END IF;
4162: --
4163: CLOSE c_ptip_info;
4164: if g_debug then
4165: hr_utility.set_location('close c_ptip_info: ' || l_proc, 10);
4166: end if;
4167: --
4168: END IF;
4169: --
4181: --
4182: IF (p_pgm_id IS NULL) THEN
4183: l_alws_unrstrctd_enrt_flag := l_plan_rec.alws_unrstrctd_enrt_flag;
4184: if g_debug then
4185: hr_utility.set_location(
4186: 'alws_unres_flag=' || l_alws_unrstrctd_enrt_flag,
4187: 10);
4188: end if;
4189: END IF;
4193: IF p_run_mode in ('U','D') THEN
4194: IF l_alws_unrstrctd_enrt_flag = 'Y' THEN
4195: l_unrestricted_enrt_flag := 'Y';
4196: if g_debug then
4197: hr_utility.set_location(
4198: 'Unrestricted mode in force for this plan',
4199: 10);
4200: end if;
4201: ELSE
4200: end if;
4201: ELSE
4202: p_electable_flag := 'N';
4203: if g_debug then
4204: hr_utility.set_location('Unrestricted mode not for regular plans', 10);
4205: end if;
4206: RETURN;
4207: END IF;
4208: ELSE
4209: l_unrestricted_enrt_flag := 'N';
4210: END IF;
4211: --
4212: if g_debug then
4213: hr_utility.set_location('per in ler info', 20);
4214: end if;
4215: --
4216: -- Bug 2200139 this cursor is getting the Started Perinler info.
4217: -- for Override Mode we get the info of the p_ler_in_ler_id
4238: END IF;
4239: --
4240: CLOSE c_ovrd_per_in_ler_info;
4241: if g_debug then
4242: hr_utility.set_location('close c_PILI: ' || l_proc, 10);
4243: end if;
4244: --
4245: else
4246: --
4267: --
4268: CLOSE c_per_in_ler_info;
4269: end if;
4270: if g_debug then
4271: hr_utility.set_location('close c_PILI: ' || l_proc, 10);
4272: end if;
4273: --
4274:
4275: OPEN c_pl_popl_yr_period_current;
4289: END IF;
4290: --
4291: CLOSE c_pl_popl_yr_period_current;
4292: if g_debug then
4293: hr_utility.set_location('close c_PPYPC: ' || l_proc, 10);
4294: --
4295: hr_utility.set_location('oipl id is null', 20);
4296: end if;
4297: ben_epe_cache.get_pilcobjepe_dets
4291: CLOSE c_pl_popl_yr_period_current;
4292: if g_debug then
4293: hr_utility.set_location('close c_PPYPC: ' || l_proc, 10);
4294: --
4295: hr_utility.set_location('oipl id is null', 20);
4296: end if;
4297: ben_epe_cache.get_pilcobjepe_dets
4298: (p_per_in_ler_id => p_per_in_ler_id
4299: ,p_pgm_id => p_pgm_id
4309: fnd_message.set_name('BEN', 'BEN_91463_ELCTBL_CHC_EXISTS');
4310: fnd_message.set_token('PROC', l_proc);
4311: benutils.write(p_text => SUBSTR(fnd_message.get, 1, 128));
4312: if g_debug then
4313: hr_utility.set_location('Leaving: ' || l_proc, 20);
4314: end if;
4315: p_electable_flag := 'N';
4316: RETURN;
4317: --
4336: --
4337: -- do prerequisite check if not overridden.
4338: --
4339: if g_debug then
4340: hr_utility.set_location('enroll another plan', 20);
4341: end if;
4342: IF l_must_enrl_anthr_pl_id IS NOT NULL
4343: AND l_enrt_ovridn_flag = 'N'
4344: THEN
4374: ,p_electable_flag => l_prereq_electable_flag
4375: -- ,p_popl_enrt_typ_cycl_id => p_popl_enrt_typ_cycl_id
4376: );
4377: if g_debug then
4378: hr_utility.set_location('Dn Sub BENDENRR: ' || l_proc, 99);
4379: end if;
4380: --
4381: IF l_prereq_electable_flag = 'N' THEN
4382: --
4381: IF l_prereq_electable_flag = 'N' THEN
4382: --
4383: p_electable_flag := 'N';
4384: if g_debug then
4385: hr_utility.set_location('Not electable since prereq is not.', 10);
4386: end if;
4387: RETURN;
4388: --
4389: END IF;
4390: --
4391: END IF;
4392: --
4393: if g_debug then
4394: hr_utility.set_location('close c_CHEFP: ' || l_proc, 10);
4395: --
4396: hr_utility.set_location('found prereq plan choice', 10);
4397: --
4398: end if;
4392: --
4393: if g_debug then
4394: hr_utility.set_location('close c_CHEFP: ' || l_proc, 10);
4395: --
4396: hr_utility.set_location('found prereq plan choice', 10);
4397: --
4398: end if;
4399: END IF; -- prereq exists.
4400: --
4401: -- Determine if the compensation object requires or allows an election change
4402: -- If life event mode
4403: --
4404: if g_debug then
4405: hr_utility.set_location('ler change stuff', 20);
4406: end if;
4407: l_ler_chg_found_flag := 'N';
4408: l_ler_chg_oipl_found_flag := 'N';
4409: --
4409: --
4410: -- See if there is a life event reason to change
4411: --
4412: if g_debug then
4413: hr_utility.set_location('ler change stuff not null stuff', 20);
4414: hr_utility.set_location(' Op c_lce_info: ' || l_proc, 10);
4415: end if;
4416: --
4417: IF p_run_mode <> 'D' THEN
4410: -- See if there is a life event reason to change
4411: --
4412: if g_debug then
4413: hr_utility.set_location('ler change stuff not null stuff', 20);
4414: hr_utility.set_location(' Op c_lce_info: ' || l_proc, 10);
4415: end if;
4416: --
4417: IF p_run_mode <> 'D' THEN
4418: --
4437: p_ler_chg_found_flag => l_ler_chg_found_flag,
4438: p_enrt_cd_level => l_enrt_cd_level );
4439: --
4440: if g_debug then
4441: hr_utility.set_location(' Cl c_lce_info: ' || l_proc, 10);
4442: end if;
4443: --
4444: -- Determine enrt codes/rules method codes/rules then
4445: -- figure out if electable.
4540: --
4541: -- Use the results of the enrt_mthd_rl as the code
4542: --
4543: if g_debug then
4544: hr_utility.set_location(' Exe enrt rl: ' || l_proc, 10);
4545: end if;
4546: execute_auto_dflt_enrt_rule(
4547: p_opt_id => l_opt_id,
4548: p_pl_id => l_pl_id,
4561: p_enrt_mthd => l_pl_enrt_mthd_cd,
4562: p_reinstt_dpnt => l_reinstt_flag
4563: );
4564: if g_debug then
4565: hr_utility.set_location(' Dn Exe enrt rl: ' || l_proc, 10);
4566: end if;
4567: --
4568: l_reinstt_cd := l_reinstt_flag;
4569: --
4609: else
4610: --
4611: --
4612: if g_debug then
4613: hr_utility.set_location('H', 20);
4614: hr_utility.set_location('Call detenr 2: ' || l_proc, 10);
4615: end if;
4616: g_ptip_id := l_ptip_id;
4617: --
4610: --
4611: --
4612: if g_debug then
4613: hr_utility.set_location('H', 20);
4614: hr_utility.set_location('Call detenr 2: ' || l_proc, 10);
4615: end if;
4616: g_ptip_id := l_ptip_id;
4617: --
4618: --Bug 2677804 We dont need to get electable flag for the
4621: --
4622: if l_enrt_ovridn_flag = 'Y' then
4623: --
4624: if g_debug then
4625: hr_utility.set_location('First Electable Due to Override ' ,123);
4626: end if;
4627: l_rec_elctbl_flag := 'Y' ;
4628: --
4629: else
4652: p_electable_flag => l_rec_elctbl_flag,
4653: p_assignment_id => l_rec_assignment_id,
4654: p_run_mode => p_run_mode); -- iRec
4655: if g_debug then
4656: hr_utility.set_location('Dn detenr 2: ' || l_proc, 10);
4657: end if;
4658: end if;
4659: -- End Bug 2677804
4660: IF l_rec_elctbl_flag = 'Y' THEN
4677: p_ler_id => p_ler_id,
4678: p_effective_date => p_effective_date);
4679: p_electable_flag := 'N';
4680: if g_debug then
4681: hr_utility.set_location('Dn BNI_MN: ' || l_proc, 10);
4682: end if;
4683: RETURN;
4684: --
4685: ELSIF l_pl_enrt_mthd_cd = 'A' THEN
4719: --
4720: -- Check level jumping restrictions
4721: --
4722: if g_debug then
4723: hr_utility.set_location(l_proc || ' Lev Jump OIPL ', 12);
4724: end if;
4725: IF p_oipl_id IS NOT NULL AND p_run_mode <> 'D' THEN
4726: --
4727: if g_debug then
4724: end if;
4725: IF p_oipl_id IS NOT NULL AND p_run_mode <> 'D' THEN
4726: --
4727: if g_debug then
4728: hr_utility.set_location('get ler bnft_rstrns ', 12);
4729: hr_utility.set_location(l_proc || ' Op c_ler_bnft_rstrn ', 12);
4730: end if;
4731: OPEN c_ler_bnft_rstrn;
4732: FETCH c_ler_bnft_rstrn INTO l_tmp_level,
4725: IF p_oipl_id IS NOT NULL AND p_run_mode <> 'D' THEN
4726: --
4727: if g_debug then
4728: hr_utility.set_location('get ler bnft_rstrns ', 12);
4729: hr_utility.set_location(l_proc || ' Op c_ler_bnft_rstrn ', 12);
4730: end if;
4731: OPEN c_ler_bnft_rstrn;
4732: FETCH c_ler_bnft_rstrn INTO l_tmp_level,
4733: l_restriction_pgm_id,
4782: CLOSE c_ler_bnft_rstrn;
4783: --
4784: END IF;
4785: if g_debug then
4786: hr_utility.set_location(l_proc || ' c_ler_bnft_rstrn ', 12);
4787: end if;
4788: /* uncomment these for debuggin only
4789: hr_utility.set_location('l_plip_id -> '||l_plip_id,11);
4790: hr_utility.set_location('p_pgm_id -> '||p_pgm_id,11);
4785: if g_debug then
4786: hr_utility.set_location(l_proc || ' c_ler_bnft_rstrn ', 12);
4787: end if;
4788: /* uncomment these for debuggin only
4789: hr_utility.set_location('l_plip_id -> '||l_plip_id,11);
4790: hr_utility.set_location('p_pgm_id -> '||p_pgm_id,11);
4791: hr_utility.set_location('l_restriction_pgm_id -> '||l_restriction_pgm_id,11);
4792: hr_utility.set_location('l_tmp_level -> '||l_tmp_level,11);
4793: hr_utility.set_location('l_oipl_ordr_num -> '||l_oipl_ordr_num,12);
4786: hr_utility.set_location(l_proc || ' c_ler_bnft_rstrn ', 12);
4787: end if;
4788: /* uncomment these for debuggin only
4789: hr_utility.set_location('l_plip_id -> '||l_plip_id,11);
4790: hr_utility.set_location('p_pgm_id -> '||p_pgm_id,11);
4791: hr_utility.set_location('l_restriction_pgm_id -> '||l_restriction_pgm_id,11);
4792: hr_utility.set_location('l_tmp_level -> '||l_tmp_level,11);
4793: hr_utility.set_location('l_oipl_ordr_num -> '||l_oipl_ordr_num,12);
4794: hr_utility.set_location('l_boo_rstrctn_cd -> '||l_boo_rstrctn_cd,12);
4787: end if;
4788: /* uncomment these for debuggin only
4789: hr_utility.set_location('l_plip_id -> '||l_plip_id,11);
4790: hr_utility.set_location('p_pgm_id -> '||p_pgm_id,11);
4791: hr_utility.set_location('l_restriction_pgm_id -> '||l_restriction_pgm_id,11);
4792: hr_utility.set_location('l_tmp_level -> '||l_tmp_level,11);
4793: hr_utility.set_location('l_oipl_ordr_num -> '||l_oipl_ordr_num,12);
4794: hr_utility.set_location('l_boo_rstrctn_cd -> '||l_boo_rstrctn_cd,12);
4795: hr_utility.set_location('l_cvg_incr_r_decr_only_cd -> '||l_cvg_incr_r_decr_only_cd,12);
4788: /* uncomment these for debuggin only
4789: hr_utility.set_location('l_plip_id -> '||l_plip_id,11);
4790: hr_utility.set_location('p_pgm_id -> '||p_pgm_id,11);
4791: hr_utility.set_location('l_restriction_pgm_id -> '||l_restriction_pgm_id,11);
4792: hr_utility.set_location('l_tmp_level -> '||l_tmp_level,11);
4793: hr_utility.set_location('l_oipl_ordr_num -> '||l_oipl_ordr_num,12);
4794: hr_utility.set_location('l_boo_rstrctn_cd -> '||l_boo_rstrctn_cd,12);
4795: hr_utility.set_location('l_cvg_incr_r_decr_only_cd -> '||l_cvg_incr_r_decr_only_cd,12);
4796: hr_utility.set_location('l_mx_cvg_mlt_incr_num -> '||l_mx_cvg_mlt_incr_num,12);
4789: hr_utility.set_location('l_plip_id -> '||l_plip_id,11);
4790: hr_utility.set_location('p_pgm_id -> '||p_pgm_id,11);
4791: hr_utility.set_location('l_restriction_pgm_id -> '||l_restriction_pgm_id,11);
4792: hr_utility.set_location('l_tmp_level -> '||l_tmp_level,11);
4793: hr_utility.set_location('l_oipl_ordr_num -> '||l_oipl_ordr_num,12);
4794: hr_utility.set_location('l_boo_rstrctn_cd -> '||l_boo_rstrctn_cd,12);
4795: hr_utility.set_location('l_cvg_incr_r_decr_only_cd -> '||l_cvg_incr_r_decr_only_cd,12);
4796: hr_utility.set_location('l_mx_cvg_mlt_incr_num -> '||l_mx_cvg_mlt_incr_num,12);
4797: hr_utility.set_location('l_mx_cvg_mlt_incr_wcf_num -> '||l_mx_cvg_mlt_incr_wcf_num,12);
4790: hr_utility.set_location('p_pgm_id -> '||p_pgm_id,11);
4791: hr_utility.set_location('l_restriction_pgm_id -> '||l_restriction_pgm_id,11);
4792: hr_utility.set_location('l_tmp_level -> '||l_tmp_level,11);
4793: hr_utility.set_location('l_oipl_ordr_num -> '||l_oipl_ordr_num,12);
4794: hr_utility.set_location('l_boo_rstrctn_cd -> '||l_boo_rstrctn_cd,12);
4795: hr_utility.set_location('l_cvg_incr_r_decr_only_cd -> '||l_cvg_incr_r_decr_only_cd,12);
4796: hr_utility.set_location('l_mx_cvg_mlt_incr_num -> '||l_mx_cvg_mlt_incr_num,12);
4797: hr_utility.set_location('l_mx_cvg_mlt_incr_wcf_num -> '||l_mx_cvg_mlt_incr_wcf_num,12);
4798: */
4791: hr_utility.set_location('l_restriction_pgm_id -> '||l_restriction_pgm_id,11);
4792: hr_utility.set_location('l_tmp_level -> '||l_tmp_level,11);
4793: hr_utility.set_location('l_oipl_ordr_num -> '||l_oipl_ordr_num,12);
4794: hr_utility.set_location('l_boo_rstrctn_cd -> '||l_boo_rstrctn_cd,12);
4795: hr_utility.set_location('l_cvg_incr_r_decr_only_cd -> '||l_cvg_incr_r_decr_only_cd,12);
4796: hr_utility.set_location('l_mx_cvg_mlt_incr_num -> '||l_mx_cvg_mlt_incr_num,12);
4797: hr_utility.set_location('l_mx_cvg_mlt_incr_wcf_num -> '||l_mx_cvg_mlt_incr_wcf_num,12);
4798: */
4799: IF l_boo_rstrctn_cd IS NOT NULL THEN
4792: hr_utility.set_location('l_tmp_level -> '||l_tmp_level,11);
4793: hr_utility.set_location('l_oipl_ordr_num -> '||l_oipl_ordr_num,12);
4794: hr_utility.set_location('l_boo_rstrctn_cd -> '||l_boo_rstrctn_cd,12);
4795: hr_utility.set_location('l_cvg_incr_r_decr_only_cd -> '||l_cvg_incr_r_decr_only_cd,12);
4796: hr_utility.set_location('l_mx_cvg_mlt_incr_num -> '||l_mx_cvg_mlt_incr_num,12);
4797: hr_utility.set_location('l_mx_cvg_mlt_incr_wcf_num -> '||l_mx_cvg_mlt_incr_wcf_num,12);
4798: */
4799: IF l_boo_rstrctn_cd IS NOT NULL THEN
4800: --
4793: hr_utility.set_location('l_oipl_ordr_num -> '||l_oipl_ordr_num,12);
4794: hr_utility.set_location('l_boo_rstrctn_cd -> '||l_boo_rstrctn_cd,12);
4795: hr_utility.set_location('l_cvg_incr_r_decr_only_cd -> '||l_cvg_incr_r_decr_only_cd,12);
4796: hr_utility.set_location('l_mx_cvg_mlt_incr_num -> '||l_mx_cvg_mlt_incr_num,12);
4797: hr_utility.set_location('l_mx_cvg_mlt_incr_wcf_num -> '||l_mx_cvg_mlt_incr_wcf_num,12);
4798: */
4799: IF l_boo_rstrctn_cd IS NOT NULL THEN
4800: --
4801: OPEN c_oipl_enrt_in_pl;
4823: fetch c_opt_level into l_opt_level;
4824: if c_opt_level%Notfound then
4825: exit;
4826: end if;
4827: -- hr_utility.set_location('opt level'||l_opt_level,111);
4828:
4829: if l_opt_level = l_oipl_ordr_num then
4830: l_oipl_seq_num := l_cnt;
4831: l_found := TRUE;
4849: if c_opt_level%Notfound then
4850: exit;
4851: end if;
4852: if g_debug then
4853: hr_utility.set_location('Enrd Ord'||l_enrd_ordr_num,113);
4854: end if;
4855: if l_opt_level = l_enrd_ordr_num then
4856: l_enrd_seq_num := l_cnt;
4857: l_found := TRUE;
4878: CLOSE c_get_min_max_ordr_num;
4879: --
4880: IF l_oipl_ordr_num <> l_mn_ordr_num THEN
4881: if g_debug then
4882: hr_utility.set_location(
4883: 'Level jumping to this object not allowed',
4884: 12);
4885: end if;
4886: p_electable_flag := 'N';
4886: p_electable_flag := 'N';
4887: RETURN;
4888: END IF;
4889: if g_debug then
4890: hr_utility.set_location('min avail', 12);
4891: end if;
4892: --
4893: ELSIF l_cvg_incr_r_decr_only_cd = 'MXAVLO' THEN
4894: --
4899: CLOSE c_get_min_max_ordr_num;
4900: --
4901: IF l_oipl_ordr_num <> l_mx_ordr_num THEN
4902: if g_debug then
4903: hr_utility.set_location(
4904: 'Level jumping to this object not allowed',
4905: 12);
4906: end if;
4907: p_electable_flag := 'N';
4907: p_electable_flag := 'N';
4908: RETURN;
4909: END IF;
4910: if g_debug then
4911: hr_utility.set_location('max avail', 12);
4912: end if;
4913: --
4914: ELSIF l_enrd_ordr_num IS NULL THEN
4915: --
4915: --
4916: -- When person is not previously enrolled.
4917: --
4918: if g_debug then
4919: hr_utility.set_location('person not prev enrolled', 12);
4920: end if;
4921: p_electable_flag := 'Y';
4922: --
4923: ELSIF (
4934: l_cvg_incr_r_decr_only_cd = 'EQDECR'
4935: AND l_oipl_ordr_num > l_enrd_ordr_num)) THEN
4936: --
4937: if g_debug then
4938: hr_utility.set_location('incr or decr check failed, no choice', 12);
4939: end if;
4940: --
4941: p_electable_flag := 'N';
4942: --
4959: AND l_oipl_ordr_num <= l_enrd_ordr_num)
4960: OR l_cvg_incr_r_decr_only_cd IN ('INCRCTF', 'DECRCTF', 'DECINCCTF')) THEN
4961: --
4962: /* uncomment these for debugging only
4963: hr_utility.set_location('Level jumping passed incr or decr check',12);
4964: hr_utility.set_location('now check max incr and max wctfn incr',12);
4965: hr_utility.set_location('l_mx_cvg_mlt_incr_wcf_num -> '||l_mx_cvg_mlt_incr_wcf_num,12);
4966: hr_utility.set_location('l_mx_cvg_mlt_incr_num -> '||l_mx_cvg_mlt_incr_num,12);
4967: hr_utility.set_location('current enrolled order num -> '||l_enrd_ordr_num,12);
4960: OR l_cvg_incr_r_decr_only_cd IN ('INCRCTF', 'DECRCTF', 'DECINCCTF')) THEN
4961: --
4962: /* uncomment these for debugging only
4963: hr_utility.set_location('Level jumping passed incr or decr check',12);
4964: hr_utility.set_location('now check max incr and max wctfn incr',12);
4965: hr_utility.set_location('l_mx_cvg_mlt_incr_wcf_num -> '||l_mx_cvg_mlt_incr_wcf_num,12);
4966: hr_utility.set_location('l_mx_cvg_mlt_incr_num -> '||l_mx_cvg_mlt_incr_num,12);
4967: hr_utility.set_location('current enrolled order num -> '||l_enrd_ordr_num,12);
4968: */
4961: --
4962: /* uncomment these for debugging only
4963: hr_utility.set_location('Level jumping passed incr or decr check',12);
4964: hr_utility.set_location('now check max incr and max wctfn incr',12);
4965: hr_utility.set_location('l_mx_cvg_mlt_incr_wcf_num -> '||l_mx_cvg_mlt_incr_wcf_num,12);
4966: hr_utility.set_location('l_mx_cvg_mlt_incr_num -> '||l_mx_cvg_mlt_incr_num,12);
4967: hr_utility.set_location('current enrolled order num -> '||l_enrd_ordr_num,12);
4968: */
4969: -- logical ordr number is used rather database ordr num
4962: /* uncomment these for debugging only
4963: hr_utility.set_location('Level jumping passed incr or decr check',12);
4964: hr_utility.set_location('now check max incr and max wctfn incr',12);
4965: hr_utility.set_location('l_mx_cvg_mlt_incr_wcf_num -> '||l_mx_cvg_mlt_incr_wcf_num,12);
4966: hr_utility.set_location('l_mx_cvg_mlt_incr_num -> '||l_mx_cvg_mlt_incr_num,12);
4967: hr_utility.set_location('current enrolled order num -> '||l_enrd_ordr_num,12);
4968: */
4969: -- logical ordr number is used rather database ordr num
4970: --
4963: hr_utility.set_location('Level jumping passed incr or decr check',12);
4964: hr_utility.set_location('now check max incr and max wctfn incr',12);
4965: hr_utility.set_location('l_mx_cvg_mlt_incr_wcf_num -> '||l_mx_cvg_mlt_incr_wcf_num,12);
4966: hr_utility.set_location('l_mx_cvg_mlt_incr_num -> '||l_mx_cvg_mlt_incr_num,12);
4967: hr_utility.set_location('current enrolled order num -> '||l_enrd_ordr_num,12);
4968: */
4969: -- logical ordr number is used rather database ordr num
4970: --
4971: IF l_oipl_seq_num >
4974: l_enrd_seq_num)
4975: AND l_mx_cvg_mlt_incr_wcf_num IS NOT NULL THEN
4976: --
4977: if g_debug then
4978: hr_utility.set_location('can not jump here 1', 12);
4979: end if;
4980: p_electable_flag := 'N';
4981: RETURN;
4982: --
4988: AND l_mx_cvg_mlt_incr_num IS NOT NULL
4989: AND l_mx_cvg_mlt_incr_wcf_num IS NULL THEN
4990: --
4991: if g_debug then
4992: hr_utility.set_location('can not jump here 2', 12);
4993: end if;
4994: p_electable_flag := 'N';
4995: RETURN;
4996: --
5006: l_enrd_seq_num))
5007: AND l_mx_cvg_mlt_incr_wcf_num IS NOT NULL THEN
5008: --
5009: if g_debug then
5010: hr_utility.set_location('set ctfn rqd flag to true ', 12);
5011: end if;
5012: p_electable_flag := 'Y';
5013: l_ctfn_rqd_flag := 'Y';
5014: ELSE
5018: END IF;
5019: --
5020: -- 5736589: Increase/Decrease Requires certification for Option Restrictions
5021: if g_debug then
5022: hr_utility.set_location('Opt.Rest. Incr/Dec.Req.Cert. ' || l_cvg_incr_r_decr_only_cd, 12);
5023: end if;
5024: IF (l_cvg_incr_r_decr_only_cd = 'INCRCTF'
5025: and l_oipl_ordr_num > l_enrd_ordr_num) THEN
5026: --
5037: l_ctfn_rqd_flag := 'Y';
5038: END IF;
5039: --
5040: if g_debug then
5041: hr_utility.set_location('Opt.Rest. Cert Flag ' || l_ctfn_rqd_flag, 12);
5042: end if;
5043: --
5044: ELSE
5045: --
5043: --
5044: ELSE
5045: --
5046: if g_debug then
5047: hr_utility.set_location('Level jumping success', 0);
5048: end if;
5049: p_electable_flag := 'Y';
5050: --
5051: END IF;
5063: -- if not set get it from the pgm, if not set report and error.
5064: -- (end date is optional is used at the same level as the start)
5065: --
5066: if g_debug then
5067: hr_utility.set_location('J', 20);
5068: hr_utility.set_location(l_proc || ' RMODE=L ', 12);
5069: end if;
5070: --
5071: -- ABSENCES : absence processing is similar to life event processing
5064: -- (end date is optional is used at the same level as the start)
5065: --
5066: if g_debug then
5067: hr_utility.set_location('J', 20);
5068: hr_utility.set_location(l_proc || ' RMODE=L ', 12);
5069: end if;
5070: --
5071: -- ABSENCES : absence processing is similar to life event processing
5072: -- GRADE/STEP : GS progression process is similar to life event
5077: IF ( p_run_mode in ('L', 'M', 'G', 'I')
5078: AND l_unrestricted_enrt_flag = 'N') THEN
5079: --
5080: if g_debug then
5081: hr_utility.set_location('K', 20);
5082: hr_utility.set_location(l_proc || ' RMODE=L UEF=N ', 12);
5083: end if;
5084: OPEN c_lee_period_for_plan;
5085: --
5078: AND l_unrestricted_enrt_flag = 'N') THEN
5079: --
5080: if g_debug then
5081: hr_utility.set_location('K', 20);
5082: hr_utility.set_location(l_proc || ' RMODE=L UEF=N ', 12);
5083: end if;
5084: OPEN c_lee_period_for_plan;
5085: --
5086: FETCH c_lee_period_for_plan INTO l_ple_dys_aftr_end_to_dflt_num,
5112: END IF; -- found
5113: --
5114: CLOSE c_lee_period_for_plan;
5115: if g_debug then
5116: hr_utility.set_location(l_proc || ' Cl c_lpfpln ', 12);
5117: --
5118: hr_utility.set_location('L', 20);
5119: end if;
5120: -- Get pgm level enrt period if it is needed
5114: CLOSE c_lee_period_for_plan;
5115: if g_debug then
5116: hr_utility.set_location(l_proc || ' Cl c_lpfpln ', 12);
5117: --
5118: hr_utility.set_location('L', 20);
5119: end if;
5120: -- Get pgm level enrt period if it is needed
5121: -- Program must exist and
5122: -- Needed when can't find record at plan level or
5159: END IF; -- Found
5160: --
5161: CLOSE c_lee_period_for_program;
5162: if g_debug then
5163: hr_utility.set_location(l_proc || ' Cl c_lpfprg ', 12);
5164: end if;
5165: --
5166: -- If there is a plan level enrt_perd_for_pl use it's value (if not null)
5167: --
5180: ELSIF ( ( p_run_mode = 'C'or p_run_mode = 'W')
5181: AND l_unrestricted_enrt_flag = 'N') THEN
5182: --
5183: if g_debug then
5184: hr_utility.set_location(l_proc || ' RMODE=C UEF=N ', 12);
5185: end if;
5186: OPEN c_sched_enrol_period_for_plan;
5187: --
5188: FETCH c_sched_enrol_period_for_plan INTO l_ple_enrt_perd_id,
5267: --
5268: -- One of the levels must have been found
5269: --
5270: if g_debug then
5271: hr_utility.set_location('M', 20);
5272: hr_utility.set_location(
5273: 'l_perd_for_plan_found=' || l_perd_for_plan_found,
5274: 20);
5275: hr_utility.set_location(
5268: -- One of the levels must have been found
5269: --
5270: if g_debug then
5271: hr_utility.set_location('M', 20);
5272: hr_utility.set_location(
5273: 'l_perd_for_plan_found=' || l_perd_for_plan_found,
5274: 20);
5275: hr_utility.set_location(
5276: 'l_perd_for_program_found=' || l_perd_for_program_found,
5271: hr_utility.set_location('M', 20);
5272: hr_utility.set_location(
5273: 'l_perd_for_plan_found=' || l_perd_for_plan_found,
5274: 20);
5275: hr_utility.set_location(
5276: 'l_perd_for_program_found=' || l_perd_for_program_found,
5277: 20);
5278: hr_utility.set_location(
5279: 'l_unrestricted_enrt_flag=' || l_unrestricted_enrt_flag,
5274: 20);
5275: hr_utility.set_location(
5276: 'l_perd_for_program_found=' || l_perd_for_program_found,
5277: 20);
5278: hr_utility.set_location(
5279: 'l_unrestricted_enrt_flag=' || l_unrestricted_enrt_flag,
5280: 20);
5281: hr_utility.set_location('l_pfpf=N ' || l_proc, 10);
5282: end if;
5277: 20);
5278: hr_utility.set_location(
5279: 'l_unrestricted_enrt_flag=' || l_unrestricted_enrt_flag,
5280: 20);
5281: hr_utility.set_location('l_pfpf=N ' || l_proc, 10);
5282: end if;
5283: --Bug 2200139 Override Enrollment
5284: IF (
5285: l_perd_for_plan_found = 'N'
5290: -- ABSENCES : absence processing is similar to life event processing.
5291: -- iRec : Added mode 'I'
5292: IF p_run_mode in ('L', 'M','G', 'I') THEN
5293: if g_debug then
5294: hr_utility.set_location(' Leaving:' || l_proc, 981);
5295: end if;
5296: p_electable_flag := 'N';
5297: RETURN;
5298: ELSE
5296: p_electable_flag := 'N';
5297: RETURN;
5298: ELSE
5299: if g_debug then
5300: hr_utility.set_location('Did not find enrt_perd, raise error', 982);
5301: end if;
5302: fnd_message.set_name('BEN', 'BEN_91335_PLAN_YR_ENRT_PERD');
5303: fnd_message.set_token('PROC', l_proc);
5304: fnd_message.set_token('PGM_ID', TO_CHAR(p_pgm_id));
5310: --
5311: END IF; -- no enrt_perd info found.
5312: --
5313: if g_debug then
5314: hr_utility.set_location('P', 20);
5315: --
5316: -- Determine the mndtry_flag
5317: -- If the comp object is an OIPL
5318: --
5315: --
5316: -- Determine the mndtry_flag
5317: -- If the comp object is an OIPL
5318: --
5319: hr_utility.set_location('Ch oipl_id NN ' || l_proc, 10);
5320: end if;
5321: IF (p_oipl_id IS NOT NULL AND p_run_mode <> 'D') THEN
5322: --
5323: -- If the mndtry_rl is not null, execute it to determine
5358: -- Determine the elctbl_flag
5359: -- If the comp object is an OIPL
5360: --
5361: if g_debug then
5362: hr_utility.set_location('R', 20);
5363: hr_utility.set_location('Ch oipl_id1 NN ' || l_proc, 10);
5364: end if;
5365: --
5366: -- CWBITEM : do not check for CWB plans, goahead and create the epe.
5359: -- If the comp object is an OIPL
5360: --
5361: if g_debug then
5362: hr_utility.set_location('R', 20);
5363: hr_utility.set_location('Ch oipl_id1 NN ' || l_proc, 10);
5364: end if;
5365: --
5366: -- CWBITEM : do not check for CWB plans, goahead and create the epe.
5367: --
5375: OPEN c_any_oipl_for_plan;
5376: --
5377: FETCH c_any_oipl_for_plan INTO l_exists_flag;
5378: if g_debug then
5379: hr_utility.set_location('Fet c_aofp ' || l_proc, 10);
5380: end if;
5381: --
5382: IF c_any_oipl_for_plan%FOUND THEN
5383: --
5392: --
5393: END IF;
5394: --
5395: if g_debug then
5396: hr_utility.set_location('S', 20);
5397: -- Determine the enrt_typ_cycl_cd
5398: -- Find the lee_rsn_f and related popl_enrt_typ_cycl_f for the plan.
5399: --
5400: hr_utility.set_location('l_PFPF=Y ' || l_proc, 10);
5396: hr_utility.set_location('S', 20);
5397: -- Determine the enrt_typ_cycl_cd
5398: -- Find the lee_rsn_f and related popl_enrt_typ_cycl_f for the plan.
5399: --
5400: hr_utility.set_location('l_PFPF=Y ' || l_proc, 10);
5401: end if;
5402: IF p_run_mode <> 'D' THEN
5403: IF ( l_perd_for_plan_found = 'Y'
5404: AND l_ple_enrt_typ_cycl_cd IS NOT NULL) THEN
5441: --
5442: -- get the dflt_enrt_cd/rule
5443: --
5444: if g_debug then
5445: hr_utility.set_location('DrtDEC ' || l_proc, 10);
5446: -- start bug 5644451
5447: hr_utility.set_location('Determine with new call 5644451 ' || l_proc, 10);
5448: end if;
5449: IF (p_oipl_id IS NOT NULL)
5443: --
5444: if g_debug then
5445: hr_utility.set_location('DrtDEC ' || l_proc, 10);
5446: -- start bug 5644451
5447: hr_utility.set_location('Determine with new call 5644451 ' || l_proc, 10);
5448: end if;
5449: IF (p_oipl_id IS NOT NULL)
5450: THEN
5451: -- get oipl information
5504: );
5505:
5506: -- end bug 5644451
5507: if g_debug then
5508: hr_utility.set_location('Dn DrtDEC ' || l_proc, 10);
5509: end if;
5510: --
5511: -- Set the values for the dflt_flag
5512: --
5521: l_use_dflt_flag := l_ler_dflt_flag;
5522: END IF;
5523: END IF;
5524: if g_debug then
5525: hr_utility.set_location('U', 20);
5526: end if;
5527: --
5528: -- oipl level default code/flag
5529: --
5535: l_use_dflt_flag := l_oipl_dflt_flag;
5536: END IF;
5537: END IF;
5538: if g_debug then
5539: hr_utility.set_location('U3', 30);
5540: end if;
5541: --
5542: -- plip level default code/flag
5543: --
5547: END IF;
5548: END IF;
5549: --
5550: if g_debug then
5551: hr_utility.set_location('V', 20);
5552: end if;
5553: --
5554: -- If no default flag is set then make it not a default.
5555: --
5558: l_use_dflt_flag := 'N';
5559: --
5560: END IF;
5561: if g_debug then
5562: hr_utility.set_location(' l_use_dflt_flag ' || l_use_dflt_flag, 10);
5563: end if;
5564: determine_dflt_flag(
5565: l_use_dflt_flag,
5566: l_use_dflt_enrt_cd,
5588: if l_reinstt_cd is null then
5589: l_reinstt_cd := l_reinstt_flag;
5590: end if;
5591: if g_debug then
5592: hr_utility.set_location(' Dn det_dflt_flag ' || l_proc, 10);
5593: hr_utility.set_location(' l_dflt_flag ' || l_dflt_flag , 10);
5594: end if;
5595: --
5596: IF (l_dflt_flag = 'DEFER') THEN
5589: l_reinstt_cd := l_reinstt_flag;
5590: end if;
5591: if g_debug then
5592: hr_utility.set_location(' Dn det_dflt_flag ' || l_proc, 10);
5593: hr_utility.set_location(' l_dflt_flag ' || l_dflt_flag , 10);
5594: end if;
5595: --
5596: IF (l_dflt_flag = 'DEFER') THEN
5597: --
5621: -- If Life event mode, set dflt_asnmt_dt to the
5622: -- enrt_perd_end_dt + dys_aftr_end_to_dflt_num.
5623: --
5624: if g_debug then
5625: hr_utility.set_location(' RM L UEF N ' || l_proc, 10);
5626: end if;
5627: IF (
5628: l_perd_for_plan_found = 'Y'
5629: AND l_ple_enrt_perd_strt_dt_cd IS NOT NULL) THEN
5652: -- inline since we don't want to add additional function calls
5653: -- for performance reasons.
5654: --
5655: if g_debug then
5656: hr_utility.set_location(' PLS BLK 1 ' || l_proc, 10);
5657: end if;
5658: BEGIN
5659: if g_debug then
5660: hr_utility.set_location(' entering ' || l_proc, 10);
5656: hr_utility.set_location(' PLS BLK 1 ' || l_proc, 10);
5657: end if;
5658: BEGIN
5659: if g_debug then
5660: hr_utility.set_location(' entering ' || l_proc, 10);
5661: end if;
5662: -- jcarpent 1/4/2001 bug 1568555, removed +1 from line below
5663: -- 1 get latest processed date
5664: l_orig_epsd := l_rec_enrt_perd_strt_dt;
5670: -- call the enrt_perd_strt_dt procedure to compute the epsd and eped
5671: -- according to the enrt. period determination code
5672: -- removed inline code and made it a procedure
5673: if g_debug then
5674: hr_utility.set_location(' calling new proc ' , 20);
5675: end if;
5676: enrt_perd_strt_dt
5677: ( p_person_id => p_person_id
5678: , p_lf_evt_ocrd_dt => p_lf_evt_ocrd_dt
5683: , p_effective_date => p_effective_date
5684: );
5685: end if;
5686: if g_debug then
5687: hr_utility.set_location(' l_rec_enrt_perd_strt_dt is '|| l_rec_enrt_perd_strt_dt , 876);
5688: end if;
5689: END; -- of special epsd logic
5690: if g_debug then
5691: hr_utility.set_location(' Dn PLS BLK 1 ' || l_proc, 10);
5687: hr_utility.set_location(' l_rec_enrt_perd_strt_dt is '|| l_rec_enrt_perd_strt_dt , 876);
5688: end if;
5689: END; -- of special epsd logic
5690: if g_debug then
5691: hr_utility.set_location(' Dn PLS BLK 1 ' || l_proc, 10);
5692: end if;
5693: ben_determine_date.main(
5694: p_date_cd => l_ple_enrt_perd_end_dt_cd,
5695: p_start_date => l_orig_epsd,
5713: end if ;
5714:
5715: --
5716: if g_debug then
5717: hr_utility.set_location(' l_rec_enrt_perd_end_dt is '|| l_rec_enrt_perd_end_dt , 876);
5718: end if;
5719: --
5720: -- 2746865
5721:
5720: -- 2746865
5721:
5722: -- if cd is L_EPSD_PEPD or null, proceed as before
5723: IF ( nvl(l_enrt_perd_det_ovrlp_bckdt_cd,'L_EPSD_PEPD') = 'L_EPSD_PEPD') THEN
5724: hr_utility.set_location('L_EPSD_PEPD' , 765);
5725: l_rec_enrt_perd_end_dt :=
5726: l_rec_enrt_perd_end_dt + (l_rec_enrt_perd_strt_dt - l_orig_epsd);
5727: -- 2746865
5728: ELSE
5729: -- for other codes
5730: -- if end dt is less than the start dt, make the strt dt as the end dt
5731: IF l_rec_enrt_perd_end_dt < l_rec_enrt_perd_strt_dt THEN
5732: if g_debug then
5733: hr_utility.set_location(' end dt < strt dt ', 876);
5734: end if;
5735: l_rec_enrt_perd_end_dt := l_rec_enrt_perd_strt_dt;
5736: END IF;
5737: END IF;
5744: --
5745: l_rec_lee_rsn_id := l_ple_lee_rsn_id;
5746: --
5747: if g_debug then
5748: hr_utility.set_location(' Dn RM L UEF N ' || l_proc, 10);
5749: end if;
5750: ELSIF (
5751: l_perd_for_program_found = 'Y'
5752: AND l_pgme_enrt_perd_strt_dt_cd IS NOT NULL) THEN
5751: l_perd_for_program_found = 'Y'
5752: AND l_pgme_enrt_perd_strt_dt_cd IS NOT NULL) THEN
5753: --
5754: if g_debug then
5755: hr_utility.set_location(' BDD_MN PFPF=Y ' || l_proc, 10);
5756: end if;
5757: ben_determine_date.main(
5758: p_date_cd => l_pgme_enrt_perd_strt_dt_cd,
5759: p_per_in_ler_id => l_per_in_ler_id,
5801: --
5802: end if;
5803: END; -- of special epsd logic
5804: if g_debug then
5805: hr_utility.set_location(' Bef BDD_Mn ' || l_proc, 10);
5806: end if;
5807: ben_determine_date.main(
5808: p_date_cd => l_pgme_enrt_perd_end_dt_cd,
5809: p_start_date => l_orig_epsd,
5829:
5830: -- 2746865
5831: -- if cd is L_EPSD_PEPD, proceed as before
5832: IF ( nvl(l_enrt_perd_det_ovrlp_bckdt_cd,'L_EPSD_PEPD') = 'L_EPSD_PEPD') THEN
5833: hr_utility.set_location('L_EPSD_PEPD' , 765);
5834: l_rec_enrt_perd_end_dt :=
5835: l_rec_enrt_perd_end_dt + (l_rec_enrt_perd_strt_dt - l_orig_epsd);
5836: -- 2746865
5837: ELSE
5838: -- for other codes
5839: -- if end dt is less than the start dt, make the strt dt as the end dt
5840: IF l_rec_enrt_perd_end_dt < l_rec_enrt_perd_strt_dt THEN
5841: if g_debug then
5842: hr_utility.set_location(' end dt < strt dt ', 876);
5843: end if;
5844: l_rec_enrt_perd_end_dt := l_rec_enrt_perd_strt_dt;
5845: END IF;
5846: END IF;
5854: --
5855: l_rec_lee_rsn_id := l_pgme_lee_rsn_id;
5856: --
5857: if g_debug then
5858: hr_utility.set_location(' Dn PFPF=Y ' || l_proc, 10);
5859: end if;
5860: ELSE
5861: --
5862: fnd_message.set_name('BEN', 'BEN_91335_PLAN_YR_ENRT_PERD');
5911: --
5912: -- 2746865
5913: -- if cd is L_EPSD_PEPD, proceed as before
5914: if g_debug then
5915: hr_utility.set_location('l_ple_enrt_perd_end_dt ' ||l_ple_enrt_perd_end_dt, 765);
5916: hr_utility.set_location('l_rec_enrt_perd_end_dt ' ||l_rec_enrt_perd_end_dt, 765);
5917: end if;
5918:
5919: IF ( nvl(l_enrt_perd_det_ovrlp_bckdt_cd,'L_EPSD_PEPD') = 'L_EPSD_PEPD') THEN
5912: -- 2746865
5913: -- if cd is L_EPSD_PEPD, proceed as before
5914: if g_debug then
5915: hr_utility.set_location('l_ple_enrt_perd_end_dt ' ||l_ple_enrt_perd_end_dt, 765);
5916: hr_utility.set_location('l_rec_enrt_perd_end_dt ' ||l_rec_enrt_perd_end_dt, 765);
5917: end if;
5918:
5919: IF ( nvl(l_enrt_perd_det_ovrlp_bckdt_cd,'L_EPSD_PEPD') = 'L_EPSD_PEPD') THEN
5920: if g_debug then
5917: end if;
5918:
5919: IF ( nvl(l_enrt_perd_det_ovrlp_bckdt_cd,'L_EPSD_PEPD') = 'L_EPSD_PEPD') THEN
5920: if g_debug then
5921: hr_utility.set_location('L_EPSD_PEPD' , 765);
5922: end if;
5923: l_rec_enrt_perd_end_dt :=
5924: l_ple_enrt_perd_end_dt + (l_rec_enrt_perd_strt_dt - l_orig_epsd);
5925: --
5930: -- for other codes
5931:
5932: -- end dt is the greatest of start date and orig. end date
5933: /*IF l_ple_enrt_perd_end_dt < l_rec_enrt_perd_strt_dt THEN
5934: hr_utility.set_location(' end dt < strt dt ', 876);
5935: l_rec_enrt_perd_end_dt := l_rec_enrt_perd_strt_dt;
5936: ELSE
5937: l_rec_enrt_perd_end_dt := l_ple_enrt_perd_end_dt;
5938: END IF;
5939: */
5940:
5941: l_rec_enrt_perd_end_dt := greatest (l_rec_enrt_perd_strt_dt, l_ple_enrt_perd_end_dt);
5942: if g_debug then
5943: hr_utility.set_location('l_rec_enrt_perd_end_dt ' ||l_rec_enrt_perd_end_dt, 765);
5944: end if;
5945: --
5946: -- Bug 5650482. If the enrollment period end date is greater that the
5947: -- processing end date, set processing end date to the enrollment
5954: END IF;
5955: --
5956: END IF;
5957: if g_debug then
5958: hr_utility.set_location('l_rec_procg_end_dt ' ||l_rec_procg_end_dt, 765);
5959: end if;
5960: --
5961: l_rec_dflt_asnmt_dt :=
5962: l_ple_dflt_enrt_dt + (l_rec_enrt_perd_strt_dt - l_orig_epsd);
5998:
5999: -- 2746865
6000: -- if cd is L_EPSD_PEPD, proceed as before
6001: if g_debug then
6002: hr_utility.set_location('l_ple_enrt_perd_end_dt ' ||l_ple_enrt_perd_end_dt, 765);
6003: hr_utility.set_location('l_rec_enrt_perd_end_dt ' ||l_rec_enrt_perd_end_dt, 765);
6004: end if;
6005:
6006: IF ( nvl(l_enrt_perd_det_ovrlp_bckdt_cd,'L_EPSD_PEPD') = 'L_EPSD_PEPD') THEN
5999: -- 2746865
6000: -- if cd is L_EPSD_PEPD, proceed as before
6001: if g_debug then
6002: hr_utility.set_location('l_ple_enrt_perd_end_dt ' ||l_ple_enrt_perd_end_dt, 765);
6003: hr_utility.set_location('l_rec_enrt_perd_end_dt ' ||l_rec_enrt_perd_end_dt, 765);
6004: end if;
6005:
6006: IF ( nvl(l_enrt_perd_det_ovrlp_bckdt_cd,'L_EPSD_PEPD') = 'L_EPSD_PEPD') THEN
6007: if g_debug then
6004: end if;
6005:
6006: IF ( nvl(l_enrt_perd_det_ovrlp_bckdt_cd,'L_EPSD_PEPD') = 'L_EPSD_PEPD') THEN
6007: if g_debug then
6008: hr_utility.set_location('L_EPSD_PEPD' , 765);
6009: end if;
6010: l_rec_enrt_perd_end_dt :=
6011: l_pgme_enrt_perd_end_dt + (l_rec_enrt_perd_strt_dt - l_orig_epsd);
6012: l_rec_procg_end_dt :=
6028: END IF;
6029: --
6030: END IF;
6031: if g_debug then
6032: hr_utility.set_location('l_rec_procg_end_dt ' ||l_rec_procg_end_dt, 765);
6033: hr_utility.set_location('l_rec_enrt_perd_end_dt ' ||l_rec_enrt_perd_end_dt, 765);
6034: end if;
6035: --
6036: l_rec_dflt_asnmt_dt :=
6029: --
6030: END IF;
6031: if g_debug then
6032: hr_utility.set_location('l_rec_procg_end_dt ' ||l_rec_procg_end_dt, 765);
6033: hr_utility.set_location('l_rec_enrt_perd_end_dt ' ||l_rec_enrt_perd_end_dt, 765);
6034: end if;
6035: --
6036: l_rec_dflt_asnmt_dt :=
6037: l_pgme_dflt_enrt_dt + (l_rec_enrt_perd_strt_dt - l_orig_epsd);
6057: -- set dflt_asnmt_dt to the
6058: -- enrt_perd_end_dt + dys_aftr_end_to_dflt_num.
6059: --
6060: if g_debug then
6061: hr_utility.set_location(' RM L UEF N ' || l_proc, 20);
6062: end if;
6063: IF ( l_perd_for_plan_found = 'Y'
6064: AND l_ple_enrt_perd_strt_dt_cd IS NOT NULL) THEN
6065: --
6112: --
6113: l_rec_lee_rsn_id := l_ple_lee_rsn_id;
6114: --
6115: if g_debug then
6116: hr_utility.set_location(' Dn RM L UEF N ' || l_proc, 20);
6117: end if;
6118: ELSE
6119: --
6120: fnd_message.set_name('BEN', 'BEN_91335_PLAN_YR_ENRT_PERD');
6129: --
6130: END IF; -- run mode
6131: -- END IF;
6132: if g_debug then
6133: hr_utility.set_location(' start DATE ' || l_rec_enrt_perd_strt_dt, 92);
6134: hr_utility.set_location(' END DATE ' || l_rec_enrt_perd_end_dt, 92);
6135: end if;
6136: -- Check to see if the start date is before the end date
6137: IF l_rec_enrt_perd_strt_dt > l_rec_enrt_perd_end_dt THEN
6130: END IF; -- run mode
6131: -- END IF;
6132: if g_debug then
6133: hr_utility.set_location(' start DATE ' || l_rec_enrt_perd_strt_dt, 92);
6134: hr_utility.set_location(' END DATE ' || l_rec_enrt_perd_end_dt, 92);
6135: end if;
6136: -- Check to see if the start date is before the end date
6137: IF l_rec_enrt_perd_strt_dt > l_rec_enrt_perd_end_dt THEN
6138: --
6156: if p_run_mode='C' and
6157: l_crnt_enrt_cvg_strt_dt is not null then
6158: open c_regn_125_or_129;
6159: fetch c_regn_125_or_129 into l_regn_125_or_129_flag;
6160: hr_utility.set_location('regn_125_or_129='||l_regn_125_or_129_flag,10);
6161: close c_regn_125_or_129;
6162: end if;
6163: */
6164: --hr_utility.set_location('p_run_mode='||p_run_mode,1776);
6160: hr_utility.set_location('regn_125_or_129='||l_regn_125_or_129_flag,10);
6161: close c_regn_125_or_129;
6162: end if;
6163: */
6164: --hr_utility.set_location('p_run_mode='||p_run_mode,1776);
6165: --hr_utility.set_location('l_crnt_enrt_cvg_strt_dt='||l_crnt_enrt_cvg_strt_dt,1776);
6166: --hr_utility.set_location('l_regn_125_or_129_flag='||l_regn_125_or_129_flag,1776);
6167: --
6168: -- Determine the enrolment coverage codes/rules
6161: close c_regn_125_or_129;
6162: end if;
6163: */
6164: --hr_utility.set_location('p_run_mode='||p_run_mode,1776);
6165: --hr_utility.set_location('l_crnt_enrt_cvg_strt_dt='||l_crnt_enrt_cvg_strt_dt,1776);
6166: --hr_utility.set_location('l_regn_125_or_129_flag='||l_regn_125_or_129_flag,1776);
6167: --
6168: -- Determine the enrolment coverage codes/rules
6169: -- If currently enrolled get from old enrollment.
6162: end if;
6163: */
6164: --hr_utility.set_location('p_run_mode='||p_run_mode,1776);
6165: --hr_utility.set_location('l_crnt_enrt_cvg_strt_dt='||l_crnt_enrt_cvg_strt_dt,1776);
6166: --hr_utility.set_location('l_regn_125_or_129_flag='||l_regn_125_or_129_flag,1776);
6167: --
6168: -- Determine the enrolment coverage codes/rules
6169: -- If currently enrolled get from old enrollment.
6170: --
6175: -- 2982606 when the coverage start date of the prev LE is in future
6176: -- and current LE is current or earlier than previous one
6177: -- create new result and not currently enrolled - two plan
6178: if g_debug then
6179: hr_utility.set_location('l_crnt_enrt_cvg_strt_dt='||
6180: l_crnt_enrt_cvg_strt_dt,1777);
6181: end if;
6182: if l_crnt_enrt_cvg_strt_dt > p_lf_evt_ocrd_dt then
6183: ben_determine_date.rate_and_coverage_dates
6212: NVL(p_lf_evt_ocrd_dt, l_prtn_strt_dt),
6213: NVL(l_prtn_strt_dt, p_lf_evt_ocrd_dt))
6214: );
6215: if g_debug then
6216: hr_utility.set_location('Done RACD:' || l_proc, 11);
6217: end if;
6218:
6219: if l_rec_enrt_cvg_strt_dt >= l_crnt_enrt_cvg_strt_dt then
6220: l_rec_enrt_cvg_strt_dt := l_crnt_enrt_cvg_strt_dt;
6223: l_rec_enrt_cvg_strt_dt_rl := l_dummy_enrt_cvg_strt_dt_rl ;
6224: l_rec_crntly_enrd_flag := 'N' ;
6225: end if;
6226: if g_debug then
6227: hr_utility.set_location('l_rec_enrt_cvg_strt_dt RACD:'|| l_rec_enrt_cvg_strt_dt, 11);
6228: end if;
6229:
6230: end if ;
6231: ---2982606
6231: ---2982606
6232:
6233: ELSE
6234: if g_debug then
6235: hr_utility.set_location(' RACD:' || l_proc, 10);
6236: end if;
6237: ben_determine_date.rate_and_coverage_dates
6238: (p_cache_mode => TRUE
6239: ,p_per_in_ler_id => l_per_in_ler_id
6267: NVL(p_lf_evt_ocrd_dt, l_prtn_strt_dt),
6268: NVL(l_prtn_strt_dt, p_lf_evt_ocrd_dt))
6269: );
6270: if g_debug then
6271: hr_utility.set_location('Done RACD:' || l_proc, 10);
6272: end if;
6273: END IF;
6274: --
6275: -- Determine the erlst_deenrt_dt
6274: --
6275: -- Determine the erlst_deenrt_dt
6276: --
6277: if g_debug then
6278: hr_utility.set_location('AB', 20);
6279: end if;
6280: --
6281: IF p_run_mode <> 'D' THEN
6282: -- Find the required period of enrollment code/rule/uom/level defined at
6320: p_level => l_level,
6321: p_pen_rec => l_pen_rec);
6322: l_crnt_erlst_deenrt_dt := l_pen_rec.erlst_deenrt_dt;
6323: if g_debug then
6324: hr_utility.set_location('l_crnt_erlst_deenrt_dt' || l_crnt_erlst_deenrt_dt,8086.0);
6325: end if;
6326: END IF;
6327: --if elst_deenrt_dt is plan leven use original entrol date or
6328: -- option level use coverage date
6332: l_erlst_deenrt_calc_dt := nvl(l_orgnl_enrt_dt,l_rec_enrt_cvg_strt_dt );
6333: end if ;
6334: end if ;
6335: if g_debug then
6336: hr_utility.set_location('l_erlst_deenrt_calc_dt' || l_erlst_deenrt_calc_dt ,8086);
6337: hr_utility.set_location('l_rec_enrt_cvg_strt_dt' || l_rec_enrt_cvg_strt_dt ,8086);
6338: end if;
6339: --
6340: -- if the enrt_cvg_strt_dt cannot be determined or
6333: end if ;
6334: end if ;
6335: if g_debug then
6336: hr_utility.set_location('l_erlst_deenrt_calc_dt' || l_erlst_deenrt_calc_dt ,8086);
6337: hr_utility.set_location('l_rec_enrt_cvg_strt_dt' || l_rec_enrt_cvg_strt_dt ,8086);
6338: end if;
6339: --
6340: -- if the enrt_cvg_strt_dt cannot be determined or
6341: -- the current enrt erlst_deenrt_dt is not null then
6390: l_rec_erlst_deenrt_dt := NULL;
6391: --
6392: END IF;
6393: if g_debug then
6394: hr_utility.set_location('l_rec_erlst_deenrt_dt' || l_rec_erlst_deenrt_dt ,8086);
6395: end if;
6396: --
6397: END IF; --'D' Mode
6398: -- set the comp_lvl_cd
6446: open c_pgm_requery(p_pgm_id,l_rec_enrt_perd_strt_dt);
6447: fetch c_pgm_requery into l_dummy;
6448: if c_pgm_requery%notfound then
6449: if g_debug then
6450: hr_utility.set_location(
6451: 'Program not date effective on period start',
6452: 10);
6453: end if;
6454: fnd_message.set_name('BEN', 'BEN_92214_PGM_NOT_EFF_ON_STRT');
6475: open c_plip_requery(l_plip_id,l_rec_enrt_perd_strt_dt);
6476: fetch c_plip_requery into l_dummy;
6477: if c_plip_requery%notfound then
6478: if g_debug then
6479: hr_utility.set_location('Plip not date effective on period start', 10);
6480: end if;
6481: fnd_message.set_name('BEN', 'BEN_92208_PLIP_NOT_EFF_ON_STRT');
6482: fnd_message.set_token('PROC', l_proc);
6483: fnd_message.set_token(
6492: close c_plip_requery;
6493: END IF;
6494:
6495: if g_debug then
6496: hr_utility.set_location('NHK: l_lf_evt_ocrd_dt ' || l_lf_evt_ocrd_dt , 10);
6497: hr_utility.set_location('NHK: l_rec_enrt_perd_strt_dt ' || l_rec_enrt_perd_strt_dt , 20);
6498: hr_utility.set_location('NHK: l_ptip_esd ' || l_ptip_esd , 30);
6499: hr_utility.set_location('NHK: l_ptip_eed ' || l_ptip_eed , 40);
6500: hr_utility.set_location('NHK: p_electable_flag ' || p_electable_flag , 50);
6493: END IF;
6494:
6495: if g_debug then
6496: hr_utility.set_location('NHK: l_lf_evt_ocrd_dt ' || l_lf_evt_ocrd_dt , 10);
6497: hr_utility.set_location('NHK: l_rec_enrt_perd_strt_dt ' || l_rec_enrt_perd_strt_dt , 20);
6498: hr_utility.set_location('NHK: l_ptip_esd ' || l_ptip_esd , 30);
6499: hr_utility.set_location('NHK: l_ptip_eed ' || l_ptip_eed , 40);
6500: hr_utility.set_location('NHK: p_electable_flag ' || p_electable_flag , 50);
6501: --
6494:
6495: if g_debug then
6496: hr_utility.set_location('NHK: l_lf_evt_ocrd_dt ' || l_lf_evt_ocrd_dt , 10);
6497: hr_utility.set_location('NHK: l_rec_enrt_perd_strt_dt ' || l_rec_enrt_perd_strt_dt , 20);
6498: hr_utility.set_location('NHK: l_ptip_esd ' || l_ptip_esd , 30);
6499: hr_utility.set_location('NHK: l_ptip_eed ' || l_ptip_eed , 40);
6500: hr_utility.set_location('NHK: p_electable_flag ' || p_electable_flag , 50);
6501: --
6502: end if;
6495: if g_debug then
6496: hr_utility.set_location('NHK: l_lf_evt_ocrd_dt ' || l_lf_evt_ocrd_dt , 10);
6497: hr_utility.set_location('NHK: l_rec_enrt_perd_strt_dt ' || l_rec_enrt_perd_strt_dt , 20);
6498: hr_utility.set_location('NHK: l_ptip_esd ' || l_ptip_esd , 30);
6499: hr_utility.set_location('NHK: l_ptip_eed ' || l_ptip_eed , 40);
6500: hr_utility.set_location('NHK: p_electable_flag ' || p_electable_flag , 50);
6501: --
6502: end if;
6503: -- check ptip
6496: hr_utility.set_location('NHK: l_lf_evt_ocrd_dt ' || l_lf_evt_ocrd_dt , 10);
6497: hr_utility.set_location('NHK: l_rec_enrt_perd_strt_dt ' || l_rec_enrt_perd_strt_dt , 20);
6498: hr_utility.set_location('NHK: l_ptip_esd ' || l_ptip_esd , 30);
6499: hr_utility.set_location('NHK: l_ptip_eed ' || l_ptip_eed , 40);
6500: hr_utility.set_location('NHK: p_electable_flag ' || p_electable_flag , 50);
6501: --
6502: end if;
6503: -- check ptip
6504: --
6503: -- check ptip
6504: --
6505: IF (l_rec_enrt_perd_strt_dt NOT BETWEEN l_ptip_esd AND l_ptip_eed) THEN
6506: if g_debug then
6507: hr_utility.set_location('NHK: p_electable_flag ' || p_electable_flag , 60);
6508: end if;
6509: open c_ptip_requery(l_ptip_id,l_rec_enrt_perd_strt_dt);
6510: fetch c_ptip_requery into l_dummy;
6511: if c_ptip_requery%notfound then
6509: open c_ptip_requery(l_ptip_id,l_rec_enrt_perd_strt_dt);
6510: fetch c_ptip_requery into l_dummy;
6511: if c_ptip_requery%notfound then
6512: if g_debug then
6513: hr_utility.set_location('Ptip not date effective on period start', 10);
6514: end if;
6515: fnd_message.set_name('BEN', 'BEN_92213_PTIP_NOT_EFF_ON_STRT');
6516: fnd_message.set_token('PROC', l_proc);
6517: fnd_message.set_token(
6525: close c_ptip_requery;
6526: RETURN;
6527: -- End fix 2008871
6528: if g_debug then
6529: hr_utility.set_location('NHK: p_electable_flag ' || p_electable_flag , 70);
6530: end if;
6531: end if;
6532: close c_ptip_requery;
6533: if g_debug then
6530: end if;
6531: end if;
6532: close c_ptip_requery;
6533: if g_debug then
6534: hr_utility.set_location('NHK: p_electable_flag ' || p_electable_flag , 80);
6535: end if;
6536: -- Bug fix 2008871 -- hnarayan -- commented the return and included it above
6537: -- since it affects positive cases of electability
6538: -- when l_rec_enrt_perd_strt_dt is not between the
6554: open c_oipl_requery(p_oipl_id,l_rec_enrt_perd_strt_dt);
6555: fetch c_oipl_requery into l_dummy;
6556: if c_oipl_requery%notfound then
6557: if g_debug then
6558: hr_utility.set_location('Oipl not date effective on period start', 10);
6559: end if;
6560: fnd_message.set_name('BEN', 'BEN_92207_OIPL_NOT_EFF_ON_STRT');
6561: fnd_message.set_token('PROC', l_proc);
6562: fnd_message.set_token(
6583: open c_opt_requery(l_opt_id,l_rec_enrt_perd_strt_dt);
6584: fetch c_opt_requery into l_dummy;
6585: if c_opt_requery%notfound then
6586: if g_debug then
6587: hr_utility.set_location(
6588: 'Option not date effective on period start',
6589: 10);
6590: end if;
6591: fnd_message.set_name('BEN', 'BEN_92212_OPT_NOT_EFF_ON_STRT');
6615: open c_plan_requery(l_pl_id,l_rec_enrt_perd_strt_dt);
6616: fetch c_plan_requery into l_dummy;
6617: if c_plan_requery%notfound then
6618: if g_debug then
6619: hr_utility.set_location('Plan not date effective on period start', 10);
6620: hr_utility.set_location('perd_strt_dt=' || l_rec_enrt_perd_strt_dt, 1);
6621: hr_utility.set_location('strt_dt=' || l_plan_rec.effective_start_date, 1);
6622: hr_utility.set_location('end_dt=' || l_plan_rec.effective_end_date, 1);
6623: end if;
6616: fetch c_plan_requery into l_dummy;
6617: if c_plan_requery%notfound then
6618: if g_debug then
6619: hr_utility.set_location('Plan not date effective on period start', 10);
6620: hr_utility.set_location('perd_strt_dt=' || l_rec_enrt_perd_strt_dt, 1);
6621: hr_utility.set_location('strt_dt=' || l_plan_rec.effective_start_date, 1);
6622: hr_utility.set_location('end_dt=' || l_plan_rec.effective_end_date, 1);
6623: end if;
6624: fnd_message.set_name('BEN', 'BEN_92211_PLAN_NOT_EFF_ON_STRT');
6617: if c_plan_requery%notfound then
6618: if g_debug then
6619: hr_utility.set_location('Plan not date effective on period start', 10);
6620: hr_utility.set_location('perd_strt_dt=' || l_rec_enrt_perd_strt_dt, 1);
6621: hr_utility.set_location('strt_dt=' || l_plan_rec.effective_start_date, 1);
6622: hr_utility.set_location('end_dt=' || l_plan_rec.effective_end_date, 1);
6623: end if;
6624: fnd_message.set_name('BEN', 'BEN_92211_PLAN_NOT_EFF_ON_STRT');
6625: fnd_message.set_token('PROC', l_proc);
6618: if g_debug then
6619: hr_utility.set_location('Plan not date effective on period start', 10);
6620: hr_utility.set_location('perd_strt_dt=' || l_rec_enrt_perd_strt_dt, 1);
6621: hr_utility.set_location('strt_dt=' || l_plan_rec.effective_start_date, 1);
6622: hr_utility.set_location('end_dt=' || l_plan_rec.effective_end_date, 1);
6623: end if;
6624: fnd_message.set_name('BEN', 'BEN_92211_PLAN_NOT_EFF_ON_STRT');
6625: fnd_message.set_token('PROC', l_proc);
6626: fnd_message.set_token(
6644: OPEN c_pl_typ;
6645: FETCH c_pl_typ INTO l_pl_typ_esd, l_pl_typ_eed;
6646: CLOSE c_pl_typ;
6647: if g_debug then
6648: hr_utility.set_location('close c_pl_typ:' || l_proc, 10);
6649: end if;
6650: IF (l_rec_enrt_perd_strt_dt NOT BETWEEN l_pl_typ_esd AND l_pl_typ_eed) THEN
6651: open c_pl_typ_requery(l_pl_typ_id,l_rec_enrt_perd_strt_dt);
6652: fetch c_pl_typ_requery into l_dummy;
6651: open c_pl_typ_requery(l_pl_typ_id,l_rec_enrt_perd_strt_dt);
6652: fetch c_pl_typ_requery into l_dummy;
6653: if c_pl_typ_requery%notfound then
6654: if g_debug then
6655: hr_utility.set_location('Pl_typ not date effective on period start', 10);
6656: end if;
6657: fnd_message.set_name('BEN', 'BEN_92206_PL_TYP_NOT_EFF_ON_ST');
6658: fnd_message.set_token('PROC', l_proc);
6659: fnd_message.set_token(
6676: open c_lee_rsn_requery(l_rec_lee_rsn_id,l_rec_enrt_perd_strt_dt);
6677: fetch c_lee_rsn_requery into l_dummy;
6678: if c_lee_rsn_requery%notfound then
6679: if g_debug then
6680: hr_utility.set_location(
6681: 'Lee_rsn not date effective on period start',
6682: 10);
6683: end if;
6684: fnd_message.set_name('BEN', 'BEN_92210_LEE_RSN_NOT_EFF_ON_S');
6701: open c_ler_requery(p_ler_id,l_rec_enrt_perd_strt_dt);
6702: fetch c_ler_requery into l_dummy;
6703: if c_ler_requery%notfound then
6704: if g_debug then
6705: hr_utility.set_location('Ler not date effective on period start', 10);
6706: end if;
6707: fnd_message.set_name('BEN', 'BEN_92209_LER_NOT_EFF_ON_STRT');
6708: fnd_message.set_token('PROC', l_proc);
6709: fnd_message.set_token(
6773: -- Validate cls_enrt_dt_to_use_cd is defined
6774: --
6775: IF l_rec_cls_enrt_dt_to_use_cd IS NULL THEN
6776: --
6777: -- hr_utility.set_location('Invalid cls_enrt_dt_cd', 10);
6778: --
6779: fnd_message.set_name('BEN', 'BEN_91905_INVLD_CLS_ENRT_DT_CD');
6780: fnd_message.set_token('PROC', l_proc);
6781: fnd_message.set_token(
6786: END IF;
6787: --
6788: -- We need to determine if an electable choice has been written or not
6789: --
6790: -- hr_utility.set_location('AG', 20);
6791: IF p_ler_id IS NOT NULL THEN
6792: --
6793: g_any_choice_created := TRUE;
6794: IF l_rec_elctbl_flag = 'Y' THEN
6832: else
6833: l_elig_flag := 'N';
6834: end if;
6835: --
6836: -- hr_utility.set_location('Calling Create Api', 10);
6837: -- hr_utility.set_location('p_enrt_perd_id ' || l_rec_enrt_perd_id, 10);
6838: -- hr_utility.set_location('p_lee_rsn_id ' || l_rec_lee_rsn_id, 10);
6839: -- hr_utility.set_location('l_per_in_ler_id ' || l_per_in_ler_id, 10);
6840: -- hr_utility.set_location('l_prtt_enrt_rslt_id ' || l_prtt_enrt_rslt_id, 10);
6833: l_elig_flag := 'N';
6834: end if;
6835: --
6836: -- hr_utility.set_location('Calling Create Api', 10);
6837: -- hr_utility.set_location('p_enrt_perd_id ' || l_rec_enrt_perd_id, 10);
6838: -- hr_utility.set_location('p_lee_rsn_id ' || l_rec_lee_rsn_id, 10);
6839: -- hr_utility.set_location('l_per_in_ler_id ' || l_per_in_ler_id, 10);
6840: -- hr_utility.set_location('l_prtt_enrt_rslt_id ' || l_prtt_enrt_rslt_id, 10);
6841: --
6834: end if;
6835: --
6836: -- hr_utility.set_location('Calling Create Api', 10);
6837: -- hr_utility.set_location('p_enrt_perd_id ' || l_rec_enrt_perd_id, 10);
6838: -- hr_utility.set_location('p_lee_rsn_id ' || l_rec_lee_rsn_id, 10);
6839: -- hr_utility.set_location('l_per_in_ler_id ' || l_per_in_ler_id, 10);
6840: -- hr_utility.set_location('l_prtt_enrt_rslt_id ' || l_prtt_enrt_rslt_id, 10);
6841: --
6842: /* if p_run_mode = 'W'
6835: --
6836: -- hr_utility.set_location('Calling Create Api', 10);
6837: -- hr_utility.set_location('p_enrt_perd_id ' || l_rec_enrt_perd_id, 10);
6838: -- hr_utility.set_location('p_lee_rsn_id ' || l_rec_lee_rsn_id, 10);
6839: -- hr_utility.set_location('l_per_in_ler_id ' || l_per_in_ler_id, 10);
6840: -- hr_utility.set_location('l_prtt_enrt_rslt_id ' || l_prtt_enrt_rslt_id, 10);
6841: --
6842: /* if p_run_mode = 'W'
6843: then Bug 3502094 : For FP-F this flag do not have any significance.
6836: -- hr_utility.set_location('Calling Create Api', 10);
6837: -- hr_utility.set_location('p_enrt_perd_id ' || l_rec_enrt_perd_id, 10);
6838: -- hr_utility.set_location('p_lee_rsn_id ' || l_rec_lee_rsn_id, 10);
6839: -- hr_utility.set_location('l_per_in_ler_id ' || l_per_in_ler_id, 10);
6840: -- hr_utility.set_location('l_prtt_enrt_rslt_id ' || l_prtt_enrt_rslt_id, 10);
6841: --
6842: /* if p_run_mode = 'W'
6843: then Bug 3502094 : For FP-F this flag do not have any significance.
6844: For july FP : final functionality will be decided.
6846: ( (p_oipl_id is null and
6847: nvl(l_pl_trk_inelig_per_flag,'N') = 'N') or
6848: (p_oipl_id is not null and
6849: nvl(l_oipl_trk_inelig_per_flag,'N') = 'N') ) then
6850: hr_utility.set_location('By passing creation of epe for CWB'||l_proc,10);
6851: else
6852: */
6853: if ben_manage_life_events.fonm = 'Y' then
6854: if g_debug then
6851: else
6852: */
6853: if ben_manage_life_events.fonm = 'Y' then
6854: if g_debug then
6855: hr_utility.set_location('fonm cvr strt dt',100);
6856: end if;
6857: l_fonm_cvg_strt_dt := ben_manage_life_events.g_fonm_cvg_strt_dt;
6858: end if;
6859: if g_debug then
6856: end if;
6857: l_fonm_cvg_strt_dt := ben_manage_life_events.g_fonm_cvg_strt_dt;
6858: end if;
6859: if g_debug then
6860: hr_utility.set_location('EPEC_CRE: ' || l_proc, 10);
6861: end if;
6862: /* unrestricted Enh*/
6863: if p_run_mode in ('U','R') then
6864: if g_debug then
6861: end if;
6862: /* unrestricted Enh*/
6863: if p_run_mode in ('U','R') then
6864: if g_debug then
6865: hr_utility.set_location('before epe exists',11);
6866: end if;
6867: --
6868: l_epe_exists := ben_manage_unres_life_events.epe_exists
6869: (p_per_in_ler_id => l_per_in_ler_id,
6985: p_fonm_cvg_strt_dt => l_fonm_cvg_strt_dt,
6986: p_inelig_rsn_cd => l_inelg_rsn_cd); -- 2650247
6987:
6988: if g_debug then
6989: hr_utility.set_location('Done EPEC_CRE: ' || l_proc, 10);
6990: end if;
6991: end if;
6992: --
6993: -- As part GLOBALCWB populating data into heirachy table
7043: g_rec.effective_date := p_effective_date;
7044: --
7045: benutils.write(p_rec => g_rec);
7046: if g_debug then
7047: hr_utility.set_location('FND mess: ' || l_proc, 10);
7048: end if;
7049: --
7050: fnd_message.set_name('BEN', 'BEN_91736_EPE_CHC_CREATED');
7051: fnd_message.set_token('PERSON_ID', p_person_id);
7054: fnd_message.set_token('PLAN_NAME', l_pl_name);
7055: fnd_message.set_token('OIPL_NAME', l_oipl_name);
7056: --
7057: if g_debug then
7058: hr_utility.set_location('Dn FND mess: ' || l_proc, 10);
7059: end if;
7060: benutils.write(p_text => SUBSTR(fnd_message.get, 1, 128));
7061: --
7062: -- if choice is created for an oipl create one for plan it belongs to
7062: -- if choice is created for an oipl create one for plan it belongs to
7063: -- first find out if it already exists.
7064: --
7065: if g_debug then
7066: hr_utility.set_location('(p_oipl_id NN): ' || l_proc, 10);
7067: end if;
7068: IF (p_oipl_id IS NOT NULL) THEN
7069: --
7070: OPEN c_choice_exists_for_plan(l_pl_id);
7091: --
7092: END IF;
7093: --
7094: if g_debug then
7095: hr_utility.set_location('CREL=Y ' || l_proc, 10);
7096: end if;
7097: -- IF ( c_choice_exists_for_plan%NOTFOUND or p_run_mode not in ('U','R')) /* Bug 4023880 : Commented */
7098: IF ( c_choice_exists_for_plan%NOTFOUND or l_plan_rec.svgs_pl_flag = 'Y') -- Bug 4717052 added or
7099: AND l_current_eligibility = 'Y' THEN
7123: --
7124: l_epe_exists := null;
7125: if p_run_mode in ('U','R') then
7126: if g_debug then
7127: hr_utility.set_location('before epe exists',11);
7128: end if;
7129: --
7130: l_epe_exists := ben_manage_unres_life_events.epe_exists
7131: (p_per_in_ler_id => l_per_in_ler_id,
7249: p_cryfwd_elig_dpnt_cd => l_reinstt_cd,
7250: p_fonm_cvg_strt_dt => l_fonm_cvg_strt_dt,
7251: p_inelig_rsn_cd => l_inelg_rsn_cd); -- 2650247
7252: if g_debug then
7253: hr_utility.set_location('Done EPEC_CRE1: ' || l_proc, 10);
7254: end if;
7255: --
7256: end if;
7257: --
7273: --
7274: benutils.write(p_rec => g_rec);
7275: --
7276: if g_debug then
7277: hr_utility.set_location('FND Mess: ' || l_proc, 10);
7278: end if;
7279: fnd_message.set_name('BEN', 'BEN_91736_EPE_CHC_CREATED');
7280: fnd_message.set_token('PERSON_ID', p_person_id);
7281: fnd_message.set_token('LER_NAME', l_ler_name);
7282: fnd_message.set_token('COMP_LVL_CD', l_comp_lvl_cd);
7283: fnd_message.set_token('PLAN_NAME', l_pl_name);
7284: fnd_message.set_token('OIPL_NAME', ' ');
7285: if g_debug then
7286: hr_utility.set_location('Dn FND Mess: ' || l_proc, 10);
7287: end if;
7288: benutils.write(p_text => SUBSTR(fnd_message.get, 1, 128));
7289: if g_debug then
7290: hr_utility.set_location('Dn FND GetMess: ' || l_proc, 10);
7286: hr_utility.set_location('Dn FND Mess: ' || l_proc, 10);
7287: end if;
7288: benutils.write(p_text => SUBSTR(fnd_message.get, 1, 128));
7289: if g_debug then
7290: hr_utility.set_location('Dn FND GetMess: ' || l_proc, 10);
7291: end if;
7292: --
7293: END IF; -- found
7294: --
7293: END IF; -- found
7294: --
7295: CLOSE c_choice_exists_for_plan;
7296: if g_debug then
7297: hr_utility.set_location('close CEFP: ' || l_proc, 10);
7298: end if;
7299: --
7300: END IF;
7301: --
7303: -- Set return value
7304: p_electable_flag := l_rec_elctbl_flag;
7305: --
7306: if g_debug then
7307: hr_utility.set_location(' Leaving:' || l_proc, 70);
7308: end if;
7309: --
7310: exception -- nocopy changes
7311: --
7383: l_prev_prtt_enrt_rslt_id VARCHAR2(30);
7384: --
7385: BEGIN
7386: --
7387: g_debug := hr_utility.debug_enabled;
7388: if g_debug then
7389: hr_utility.set_location('Entering ' || l_package, 10);
7390: end if;
7391: --
7385: BEGIN
7386: --
7387: g_debug := hr_utility.debug_enabled;
7388: if g_debug then
7389: hr_utility.set_location('Entering ' || l_package, 10);
7390: end if;
7391: --
7392: IF p_rule_id IS NULL THEN
7393: --
7396: --
7397: END IF;
7398: --
7399: if g_debug then
7400: hr_utility.set_location(
7401: 'Organization_id ' || TO_CHAR(p_organization_id),
7402: 10);
7403: hr_utility.set_location('assignment_id ' || TO_CHAR(p_assignment_id), 15);
7404: hr_utility.set_location(
7399: if g_debug then
7400: hr_utility.set_location(
7401: 'Organization_id ' || TO_CHAR(p_organization_id),
7402: 10);
7403: hr_utility.set_location('assignment_id ' || TO_CHAR(p_assignment_id), 15);
7404: hr_utility.set_location(
7405: 'Business_group_id ' || TO_CHAR(p_business_group_id),
7406: 20);
7407: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
7400: hr_utility.set_location(
7401: 'Organization_id ' || TO_CHAR(p_organization_id),
7402: 10);
7403: hr_utility.set_location('assignment_id ' || TO_CHAR(p_assignment_id), 15);
7404: hr_utility.set_location(
7405: 'Business_group_id ' || TO_CHAR(p_business_group_id),
7406: 20);
7407: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
7408: hr_utility.set_location('pl_id ' || TO_CHAR(p_pl_id), 40);
7403: hr_utility.set_location('assignment_id ' || TO_CHAR(p_assignment_id), 15);
7404: hr_utility.set_location(
7405: 'Business_group_id ' || TO_CHAR(p_business_group_id),
7406: 20);
7407: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
7408: hr_utility.set_location('pl_id ' || TO_CHAR(p_pl_id), 40);
7409: hr_utility.set_location('pl_typ_id ' || TO_CHAR(p_pl_typ_id), 50);
7410: hr_utility.set_location('opt_id ' || TO_CHAR(p_opt_id), 60);
7411: hr_utility.set_location('ler_id ' || TO_CHAR(p_ler_id), 70);
7404: hr_utility.set_location(
7405: 'Business_group_id ' || TO_CHAR(p_business_group_id),
7406: 20);
7407: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
7408: hr_utility.set_location('pl_id ' || TO_CHAR(p_pl_id), 40);
7409: hr_utility.set_location('pl_typ_id ' || TO_CHAR(p_pl_typ_id), 50);
7410: hr_utility.set_location('opt_id ' || TO_CHAR(p_opt_id), 60);
7411: hr_utility.set_location('ler_id ' || TO_CHAR(p_ler_id), 70);
7412: end if;
7405: 'Business_group_id ' || TO_CHAR(p_business_group_id),
7406: 20);
7407: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
7408: hr_utility.set_location('pl_id ' || TO_CHAR(p_pl_id), 40);
7409: hr_utility.set_location('pl_typ_id ' || TO_CHAR(p_pl_typ_id), 50);
7410: hr_utility.set_location('opt_id ' || TO_CHAR(p_opt_id), 60);
7411: hr_utility.set_location('ler_id ' || TO_CHAR(p_ler_id), 70);
7412: end if;
7413: --
7406: 20);
7407: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
7408: hr_utility.set_location('pl_id ' || TO_CHAR(p_pl_id), 40);
7409: hr_utility.set_location('pl_typ_id ' || TO_CHAR(p_pl_typ_id), 50);
7410: hr_utility.set_location('opt_id ' || TO_CHAR(p_opt_id), 60);
7411: hr_utility.set_location('ler_id ' || TO_CHAR(p_ler_id), 70);
7412: end if;
7413: --
7414: -- Task 131 :If elig dependent rows are already crteated then
7407: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
7408: hr_utility.set_location('pl_id ' || TO_CHAR(p_pl_id), 40);
7409: hr_utility.set_location('pl_typ_id ' || TO_CHAR(p_pl_typ_id), 50);
7410: hr_utility.set_location('opt_id ' || TO_CHAR(p_opt_id), 60);
7411: hr_utility.set_location('ler_id ' || TO_CHAR(p_ler_id), 70);
7412: end if;
7413: --
7414: -- Task 131 :If elig dependent rows are already crteated then
7415: -- pass the elig dependent id as input values to
7535: --
7536: END IF;
7537: --
7538: if g_debug then
7539: hr_utility.set_location(' Fire Rule ' || l_package, 10);
7540: end if;
7541: l_outputs :=
7542: benutils.formula(
7543: p_opt_id => p_opt_id,
7596: p_param21_value => TO_CHAR(l_num_elig_dpnt),
7597: p_param22 => 'BEN_IV_PERSON_ID', -- Bug 5331889 : Added person_id param as well
7598: p_param22_value => to_char(p_person_id));
7599: if g_debug then
7600: hr_utility.set_location(' Dn Fire Rule ' || l_package, 10);
7601: end if;
7602: --
7603: for l_count in l_outputs.first..l_outputs.last loop
7604: begin
7609: p_reinstt_dpnt := l_outputs(l_count).VALUE;
7610: elsif l_outputs(l_count).name = 'AUTO_DFLT_ELCN_VAL' then
7611: g_dflt_elcn_val := l_outputs(l_count).VALUE;
7612: if g_debug then
7613: hr_utility.set_location ('formula default='||g_dflt_elcn_val,744);
7614: hr_utility.set_location ('formula default='||p_opt_id,744);
7615: end if;
7616: elsif l_outputs(l_count).name = 'PREV_PRTT_ENRT_RSLT_ID' then
7617: l_prev_prtt_enrt_rslt_id := l_outputs(l_count).VALUE ;
7610: elsif l_outputs(l_count).name = 'AUTO_DFLT_ELCN_VAL' then
7611: g_dflt_elcn_val := l_outputs(l_count).VALUE;
7612: if g_debug then
7613: hr_utility.set_location ('formula default='||g_dflt_elcn_val,744);
7614: hr_utility.set_location ('formula default='||p_opt_id,744);
7615: end if;
7616: elsif l_outputs(l_count).name = 'PREV_PRTT_ENRT_RSLT_ID' then
7617: l_prev_prtt_enrt_rslt_id := l_outputs(l_count).VALUE ;
7618: if g_debug then
7615: end if;
7616: elsif l_outputs(l_count).name = 'PREV_PRTT_ENRT_RSLT_ID' then
7617: l_prev_prtt_enrt_rslt_id := l_outputs(l_count).VALUE ;
7618: if g_debug then
7619: hr_utility.set_location ('formula PREV_PRTT_ENRT_RSLT_ID ='||l_prev_prtt_enrt_rslt_id,744);
7620: end if;
7621:
7622: end if;
7623: end;
7628: end if ;
7629:
7630: --
7631: if g_debug then
7632: hr_utility.set_location(' Leaving ' || l_package, 10);
7633: end if;
7634:
7635: exception -- nocopy changes
7636: --
7706: --
7707: BEGIN
7708: --
7709: if g_debug then
7710: hr_utility.set_location('Entering ' || l_package, 10);
7711: end if;
7712: --
7713: IF p_rule_id IS NULL THEN
7714: --
7716: --
7717: END IF;
7718: --
7719: if g_debug then
7720: hr_utility.set_location(
7721: 'Organization_id ' || TO_CHAR(p_organization_id),
7722: 10);
7723: hr_utility.set_location('assignment_id ' || TO_CHAR(p_assignment_id), 15);
7724: hr_utility.set_location(
7719: if g_debug then
7720: hr_utility.set_location(
7721: 'Organization_id ' || TO_CHAR(p_organization_id),
7722: 10);
7723: hr_utility.set_location('assignment_id ' || TO_CHAR(p_assignment_id), 15);
7724: hr_utility.set_location(
7725: 'Business_group_id ' || TO_CHAR(p_business_group_id),
7726: 20);
7727: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
7720: hr_utility.set_location(
7721: 'Organization_id ' || TO_CHAR(p_organization_id),
7722: 10);
7723: hr_utility.set_location('assignment_id ' || TO_CHAR(p_assignment_id), 15);
7724: hr_utility.set_location(
7725: 'Business_group_id ' || TO_CHAR(p_business_group_id),
7726: 20);
7727: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
7728: hr_utility.set_location('pl_id ' || TO_CHAR(p_pl_id), 40);
7723: hr_utility.set_location('assignment_id ' || TO_CHAR(p_assignment_id), 15);
7724: hr_utility.set_location(
7725: 'Business_group_id ' || TO_CHAR(p_business_group_id),
7726: 20);
7727: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
7728: hr_utility.set_location('pl_id ' || TO_CHAR(p_pl_id), 40);
7729: hr_utility.set_location('pl_typ_id ' || TO_CHAR(p_pl_typ_id), 50);
7730: hr_utility.set_location('opt_id ' || TO_CHAR(p_opt_id), 60);
7731: hr_utility.set_location('ler_id ' || TO_CHAR(p_ler_id), 70);
7724: hr_utility.set_location(
7725: 'Business_group_id ' || TO_CHAR(p_business_group_id),
7726: 20);
7727: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
7728: hr_utility.set_location('pl_id ' || TO_CHAR(p_pl_id), 40);
7729: hr_utility.set_location('pl_typ_id ' || TO_CHAR(p_pl_typ_id), 50);
7730: hr_utility.set_location('opt_id ' || TO_CHAR(p_opt_id), 60);
7731: hr_utility.set_location('ler_id ' || TO_CHAR(p_ler_id), 70);
7732: end if;
7725: 'Business_group_id ' || TO_CHAR(p_business_group_id),
7726: 20);
7727: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
7728: hr_utility.set_location('pl_id ' || TO_CHAR(p_pl_id), 40);
7729: hr_utility.set_location('pl_typ_id ' || TO_CHAR(p_pl_typ_id), 50);
7730: hr_utility.set_location('opt_id ' || TO_CHAR(p_opt_id), 60);
7731: hr_utility.set_location('ler_id ' || TO_CHAR(p_ler_id), 70);
7732: end if;
7733: --
7726: 20);
7727: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
7728: hr_utility.set_location('pl_id ' || TO_CHAR(p_pl_id), 40);
7729: hr_utility.set_location('pl_typ_id ' || TO_CHAR(p_pl_typ_id), 50);
7730: hr_utility.set_location('opt_id ' || TO_CHAR(p_opt_id), 60);
7731: hr_utility.set_location('ler_id ' || TO_CHAR(p_ler_id), 70);
7732: end if;
7733: --
7734: -- Task 131 :If elig dependent rows are already crteated then
7727: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
7728: hr_utility.set_location('pl_id ' || TO_CHAR(p_pl_id), 40);
7729: hr_utility.set_location('pl_typ_id ' || TO_CHAR(p_pl_typ_id), 50);
7730: hr_utility.set_location('opt_id ' || TO_CHAR(p_opt_id), 60);
7731: hr_utility.set_location('ler_id ' || TO_CHAR(p_ler_id), 70);
7732: end if;
7733: --
7734: -- Task 131 :If elig dependent rows are already crteated then
7735: -- pass the elig dependent id as input values to
8055: l_proc VARCHAR2(80) := g_package ||
8056: '.determine_dflt_flag';
8057: --
8058: BEGIN
8059: g_debug := hr_utility.debug_enabled;
8060: if g_debug then
8061: hr_utility.set_location('Entering: ' || l_proc, 10);
8062: hr_utility.set_location('p_dflt_flag' || p_dflt_flag, 121.121);
8063: hr_utility.set_location('p_dflt_enrt_cd' || p_dflt_enrt_cd, 121.121);
8057: --
8058: BEGIN
8059: g_debug := hr_utility.debug_enabled;
8060: if g_debug then
8061: hr_utility.set_location('Entering: ' || l_proc, 10);
8062: hr_utility.set_location('p_dflt_flag' || p_dflt_flag, 121.121);
8063: hr_utility.set_location('p_dflt_enrt_cd' || p_dflt_enrt_cd, 121.121);
8064: hr_utility.set_location('p_oipl_id' || p_oipl_id, 121.121);
8065: hr_utility.set_location('p_pl_id' || p_pl_id, 121.121);
8058: BEGIN
8059: g_debug := hr_utility.debug_enabled;
8060: if g_debug then
8061: hr_utility.set_location('Entering: ' || l_proc, 10);
8062: hr_utility.set_location('p_dflt_flag' || p_dflt_flag, 121.121);
8063: hr_utility.set_location('p_dflt_enrt_cd' || p_dflt_enrt_cd, 121.121);
8064: hr_utility.set_location('p_oipl_id' || p_oipl_id, 121.121);
8065: hr_utility.set_location('p_pl_id' || p_pl_id, 121.121);
8066: hr_utility.set_location('p_ptip_id' || p_ptip_id, 121.121);
8059: g_debug := hr_utility.debug_enabled;
8060: if g_debug then
8061: hr_utility.set_location('Entering: ' || l_proc, 10);
8062: hr_utility.set_location('p_dflt_flag' || p_dflt_flag, 121.121);
8063: hr_utility.set_location('p_dflt_enrt_cd' || p_dflt_enrt_cd, 121.121);
8064: hr_utility.set_location('p_oipl_id' || p_oipl_id, 121.121);
8065: hr_utility.set_location('p_pl_id' || p_pl_id, 121.121);
8066: hr_utility.set_location('p_ptip_id' || p_ptip_id, 121.121);
8067: hr_utility.set_location('p_default_level' || p_default_level, 121.121);
8060: if g_debug then
8061: hr_utility.set_location('Entering: ' || l_proc, 10);
8062: hr_utility.set_location('p_dflt_flag' || p_dflt_flag, 121.121);
8063: hr_utility.set_location('p_dflt_enrt_cd' || p_dflt_enrt_cd, 121.121);
8064: hr_utility.set_location('p_oipl_id' || p_oipl_id, 121.121);
8065: hr_utility.set_location('p_pl_id' || p_pl_id, 121.121);
8066: hr_utility.set_location('p_ptip_id' || p_ptip_id, 121.121);
8067: hr_utility.set_location('p_default_level' || p_default_level, 121.121);
8068: end if;
8061: hr_utility.set_location('Entering: ' || l_proc, 10);
8062: hr_utility.set_location('p_dflt_flag' || p_dflt_flag, 121.121);
8063: hr_utility.set_location('p_dflt_enrt_cd' || p_dflt_enrt_cd, 121.121);
8064: hr_utility.set_location('p_oipl_id' || p_oipl_id, 121.121);
8065: hr_utility.set_location('p_pl_id' || p_pl_id, 121.121);
8066: hr_utility.set_location('p_ptip_id' || p_ptip_id, 121.121);
8067: hr_utility.set_location('p_default_level' || p_default_level, 121.121);
8068: end if;
8069:
8062: hr_utility.set_location('p_dflt_flag' || p_dflt_flag, 121.121);
8063: hr_utility.set_location('p_dflt_enrt_cd' || p_dflt_enrt_cd, 121.121);
8064: hr_utility.set_location('p_oipl_id' || p_oipl_id, 121.121);
8065: hr_utility.set_location('p_pl_id' || p_pl_id, 121.121);
8066: hr_utility.set_location('p_ptip_id' || p_ptip_id, 121.121);
8067: hr_utility.set_location('p_default_level' || p_default_level, 121.121);
8068: end if;
8069:
8070: -- If the dflt_enrt_cd and enrollment status combination in the following
8063: hr_utility.set_location('p_dflt_enrt_cd' || p_dflt_enrt_cd, 121.121);
8064: hr_utility.set_location('p_oipl_id' || p_oipl_id, 121.121);
8065: hr_utility.set_location('p_pl_id' || p_pl_id, 121.121);
8066: hr_utility.set_location('p_ptip_id' || p_ptip_id, 121.121);
8067: hr_utility.set_location('p_default_level' || p_default_level, 121.121);
8068: end if;
8069:
8070: -- If the dflt_enrt_cd and enrollment status combination in the following
8071: -- matrix is YES set the dflt_flag to Y, if it is NO set it to N,
8159: -- Note: for plans not in program don't have next level so
8160: -- not enrolled means not enrolled, set next level='N'
8161: --
8162: if g_debug then
8163: hr_utility.set_location(l_proc, 50);
8164: end if;
8165: /*
8166: IF p_dflt_enrt_cd IN ('RL', 'NSDCSD', 'NNCS', 'NNCSEDR', 'NNCN') THEN
8167: l_next_level_enrt_flag := 'Y';
8184: l_next_level_enrt_flag := 'Y';
8185: ELSE
8186: if p_oipl_id IS NOT NULL THEN
8187: if g_debug then
8188: hr_utility.set_location('p_oipl_id IS NOT NULL THEN',121.121);
8189: end if;
8190: OPEN c_plan_enrolment_info;
8191: FETCH c_plan_enrolment_info INTO l_next_level_enrt_flag;
8192: CLOSE c_plan_enrolment_info;
8190: OPEN c_plan_enrolment_info;
8191: FETCH c_plan_enrolment_info INTO l_next_level_enrt_flag;
8192: CLOSE c_plan_enrolment_info;
8193: if g_debug then
8194: hr_utility.set_location('l_next_level_enrt_flag '||nvl(l_next_level_enrt_flag,'-')|| ' ' ,121.121);
8195: end if;
8196: end if;
8197: if l_next_level_enrt_flag <>'Y' then
8198: if g_debug then
8195: end if;
8196: end if;
8197: if l_next_level_enrt_flag <>'Y' then
8198: if g_debug then
8199: hr_utility.set_location('l_next_level_enrt_flag <>Y ',121.121);
8200: end if;
8201: if p_ptip_id IS NOT NULL THEN
8202: if g_debug then
8203: hr_utility.set_location('p_ptip_id IS NOT NULL ',121.121);
8199: hr_utility.set_location('l_next_level_enrt_flag <>Y ',121.121);
8200: end if;
8201: if p_ptip_id IS NOT NULL THEN
8202: if g_debug then
8203: hr_utility.set_location('p_ptip_id IS NOT NULL ',121.121);
8204: hr_utility.set_location('Checking p_default level ' || p_default_level,121.121);
8205: end if;
8206: IF p_default_level IN('PTIP','LER_PTIP')
8207: THEN
8200: end if;
8201: if p_ptip_id IS NOT NULL THEN
8202: if g_debug then
8203: hr_utility.set_location('p_ptip_id IS NOT NULL ',121.121);
8204: hr_utility.set_location('Checking p_default level ' || p_default_level,121.121);
8205: end if;
8206: IF p_default_level IN('PTIP','LER_PTIP')
8207: THEN
8208: OPEN c_ptip_enrolment_info;
8221: --
8222: -- Enrolled in plan/ptip and not oipl/plan
8223: --
8224: if g_debug then
8225: hr_utility.set_location('l_next_level_enrt_flag = Y 2 ',121.121);
8226: end if;
8227: IF p_dflt_enrt_cd IN (
8228: 'NSDCS',
8229: 'NDCSEDR',
8252: --
8253: IF p_dflt_enrt_cd = 'RL' THEN
8254: --
8255: if g_debug then
8256: hr_utility.set_location(' EER ' || l_proc, 190);
8257: end if;
8258: execute_auto_dflt_enrt_rule(
8259: p_opt_id => p_opt_id,
8260: p_pl_id => p_pl_id,
8272: p_enrt_mthd => l_dflt_flag,
8273: p_reinstt_dpnt => l_reinstt_flag
8274: );
8275: if g_debug then
8276: hr_utility.set_location(' Dn EER ' || l_proc, 190);
8277: end if;
8278: --
8279: l_defer_flag := 'N';
8280: ELSIF ( p_dflt_enrt_cd IS NULL
8287: l_defer_flag := 'N';
8288: --
8289: END IF;
8290: if g_debug then
8291: hr_utility.set_location(l_proc, 200);
8292: end if;
8293: --
8294: IF l_defer_flag = 'Y' THEN
8295: --
8296: l_dflt_flag := 'DEFER';
8297: --
8298: END IF;
8299: if g_debug then
8300: hr_utility.set_location('Leaving: ' || l_proc, 235);
8301: end if;
8302: --
8303: p_deflt_flag := l_dflt_flag;
8304: p_reinstt_flag := l_reinstt_flag;
8358: --
8359: BEGIN
8360: IF p_rqd_perd_enrt_nenrt_rl IS NOT NULL THEN
8361: if g_debug then
8362: hr_utility.set_location(
8363: 'Organization_id ' || TO_CHAR(p_organization_id),
8364: 10);
8365: hr_utility.set_location(
8366: 'assignment_id ' || TO_CHAR(p_assignment_id),
8361: if g_debug then
8362: hr_utility.set_location(
8363: 'Organization_id ' || TO_CHAR(p_organization_id),
8364: 10);
8365: hr_utility.set_location(
8366: 'assignment_id ' || TO_CHAR(p_assignment_id),
8367: 15);
8368: hr_utility.set_location(
8369: 'Business_group_id ' || TO_CHAR(p_business_group_id),
8364: 10);
8365: hr_utility.set_location(
8366: 'assignment_id ' || TO_CHAR(p_assignment_id),
8367: 15);
8368: hr_utility.set_location(
8369: 'Business_group_id ' || TO_CHAR(p_business_group_id),
8370: 20);
8371: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
8372: hr_utility.set_location('pl_id ' || TO_CHAR(p_pl_id), 40);
8367: 15);
8368: hr_utility.set_location(
8369: 'Business_group_id ' || TO_CHAR(p_business_group_id),
8370: 20);
8371: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
8372: hr_utility.set_location('pl_id ' || TO_CHAR(p_pl_id), 40);
8373: hr_utility.set_location('pl_typ_id ' || TO_CHAR(p_pl_typ_id), 50);
8374: hr_utility.set_location('opt_id ' || TO_CHAR(p_opt_id), 60);
8375: hr_utility.set_location('ler_id ' || TO_CHAR(p_ler_id), 70);
8368: hr_utility.set_location(
8369: 'Business_group_id ' || TO_CHAR(p_business_group_id),
8370: 20);
8371: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
8372: hr_utility.set_location('pl_id ' || TO_CHAR(p_pl_id), 40);
8373: hr_utility.set_location('pl_typ_id ' || TO_CHAR(p_pl_typ_id), 50);
8374: hr_utility.set_location('opt_id ' || TO_CHAR(p_opt_id), 60);
8375: hr_utility.set_location('ler_id ' || TO_CHAR(p_ler_id), 70);
8376: end if;
8369: 'Business_group_id ' || TO_CHAR(p_business_group_id),
8370: 20);
8371: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
8372: hr_utility.set_location('pl_id ' || TO_CHAR(p_pl_id), 40);
8373: hr_utility.set_location('pl_typ_id ' || TO_CHAR(p_pl_typ_id), 50);
8374: hr_utility.set_location('opt_id ' || TO_CHAR(p_opt_id), 60);
8375: hr_utility.set_location('ler_id ' || TO_CHAR(p_ler_id), 70);
8376: end if;
8377: l_outputs :=
8370: 20);
8371: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
8372: hr_utility.set_location('pl_id ' || TO_CHAR(p_pl_id), 40);
8373: hr_utility.set_location('pl_typ_id ' || TO_CHAR(p_pl_typ_id), 50);
8374: hr_utility.set_location('opt_id ' || TO_CHAR(p_opt_id), 60);
8375: hr_utility.set_location('ler_id ' || TO_CHAR(p_ler_id), 70);
8376: end if;
8377: l_outputs :=
8378: benutils.formula(
8371: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
8372: hr_utility.set_location('pl_id ' || TO_CHAR(p_pl_id), 40);
8373: hr_utility.set_location('pl_typ_id ' || TO_CHAR(p_pl_typ_id), 50);
8374: hr_utility.set_location('opt_id ' || TO_CHAR(p_opt_id), 60);
8375: hr_utility.set_location('ler_id ' || TO_CHAR(p_ler_id), 70);
8376: end if;
8377: l_outputs :=
8378: benutils.formula(
8379: p_formula_id => p_rqd_perd_enrt_nenrt_rl,
8528: ELSE
8529: IF l_dpnt_cvg_cd = 'RL' THEN
8530: -- Evaluate the rule
8531: if g_debug then
8532: hr_utility.set_location(
8533: 'Organization_id ' || TO_CHAR(p_organization_id),
8534: 10);
8535: hr_utility.set_location(
8536: 'assignment_id ' || TO_CHAR(p_assignment_id),
8531: if g_debug then
8532: hr_utility.set_location(
8533: 'Organization_id ' || TO_CHAR(p_organization_id),
8534: 10);
8535: hr_utility.set_location(
8536: 'assignment_id ' || TO_CHAR(p_assignment_id),
8537: 15);
8538: hr_utility.set_location(
8539: 'Business_group_id ' || TO_CHAR(p_business_group_id),
8534: 10);
8535: hr_utility.set_location(
8536: 'assignment_id ' || TO_CHAR(p_assignment_id),
8537: 15);
8538: hr_utility.set_location(
8539: 'Business_group_id ' || TO_CHAR(p_business_group_id),
8540: 20);
8541: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
8542: hr_utility.set_location('pl_id ' || TO_CHAR(p_pl_id), 40);
8537: 15);
8538: hr_utility.set_location(
8539: 'Business_group_id ' || TO_CHAR(p_business_group_id),
8540: 20);
8541: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
8542: hr_utility.set_location('pl_id ' || TO_CHAR(p_pl_id), 40);
8543: hr_utility.set_location('pl_typ_id ' || TO_CHAR(p_pl_typ_id), 50);
8544: hr_utility.set_location('opt_id ' || TO_CHAR(p_opt_id), 60);
8545: hr_utility.set_location('ler_id ' || TO_CHAR(p_ler_id), 70);
8538: hr_utility.set_location(
8539: 'Business_group_id ' || TO_CHAR(p_business_group_id),
8540: 20);
8541: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
8542: hr_utility.set_location('pl_id ' || TO_CHAR(p_pl_id), 40);
8543: hr_utility.set_location('pl_typ_id ' || TO_CHAR(p_pl_typ_id), 50);
8544: hr_utility.set_location('opt_id ' || TO_CHAR(p_opt_id), 60);
8545: hr_utility.set_location('ler_id ' || TO_CHAR(p_ler_id), 70);
8546: end if;
8539: 'Business_group_id ' || TO_CHAR(p_business_group_id),
8540: 20);
8541: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
8542: hr_utility.set_location('pl_id ' || TO_CHAR(p_pl_id), 40);
8543: hr_utility.set_location('pl_typ_id ' || TO_CHAR(p_pl_typ_id), 50);
8544: hr_utility.set_location('opt_id ' || TO_CHAR(p_opt_id), 60);
8545: hr_utility.set_location('ler_id ' || TO_CHAR(p_ler_id), 70);
8546: end if;
8547: l_outputs :=
8540: 20);
8541: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
8542: hr_utility.set_location('pl_id ' || TO_CHAR(p_pl_id), 40);
8543: hr_utility.set_location('pl_typ_id ' || TO_CHAR(p_pl_typ_id), 50);
8544: hr_utility.set_location('opt_id ' || TO_CHAR(p_opt_id), 60);
8545: hr_utility.set_location('ler_id ' || TO_CHAR(p_ler_id), 70);
8546: end if;
8547: l_outputs :=
8548: benutils.formula(
8541: hr_utility.set_location('pgm_id ' || TO_CHAR(p_pgm_id), 30);
8542: hr_utility.set_location('pl_id ' || TO_CHAR(p_pl_id), 40);
8543: hr_utility.set_location('pl_typ_id ' || TO_CHAR(p_pl_typ_id), 50);
8544: hr_utility.set_location('opt_id ' || TO_CHAR(p_opt_id), 60);
8545: hr_utility.set_location('ler_id ' || TO_CHAR(p_ler_id), 70);
8546: end if;
8547: l_outputs :=
8548: benutils.formula(
8549: p_formula_id => l_dpnt_cvg_rl,
8669: l_plan_rec ben_pl_f%ROWTYPE;
8670: l_oipl_rec ben_cobj_cache.g_oipl_inst_row;
8671: l_pl_rec ben_cobj_cache.g_pl_inst_row;
8672: BEGIN
8673: g_debug := hr_utility.debug_enabled;
8674: if g_debug then
8675: hr_utility.set_location('Entering: ' || l_proc, 10);
8676: end if;
8677: --
8671: l_pl_rec ben_cobj_cache.g_pl_inst_row;
8672: BEGIN
8673: g_debug := hr_utility.debug_enabled;
8674: if g_debug then
8675: hr_utility.set_location('Entering: ' || l_proc, 10);
8676: end if;
8677: --
8678: l_dflt_enrt_cd := NULL;
8679: --
8699: OPEN c_ler_oipl_dflt_cd;
8700: FETCH c_ler_oipl_dflt_cd INTO l_dflt_enrt_cd, l_dflt_enrt_rl;
8701: CLOSE c_ler_oipl_dflt_cd;
8702: --
8703: -- hr_utility.set_location(l_dflt_enrt_cd,20);
8704: IF l_dflt_enrt_cd IS NULL THEN
8705: --
8706: -- 2
8707: -- Bug 5569758
8716: l_dflt_enrt_rl := l_oipl_rec.dflt_enrt_det_rl;
8717: --
8718: END IF;
8719: END IF;
8720: -- hr_utility.set_location(l_dflt_enrt_cd,30);
8721: IF p_pgm_id IS NULL
8722: AND l_dflt_enrt_cd IS NULL THEN
8723: --
8724: -- 3
8725: --
8726: OPEN c_ler_pl_nip_dflt_cd;
8727: FETCH c_ler_pl_nip_dflt_cd INTO l_dflt_enrt_cd, l_dflt_enrt_rl;
8728: CLOSE c_ler_pl_nip_dflt_cd;
8729: -- hr_utility.set_location(l_dflt_enrt_cd,40);
8730: ELSIF p_pgm_id IS NOT NULL
8731: AND l_dflt_enrt_cd IS NULL THEN
8732: --
8733: -- 4
8734: --
8735: OPEN c_ler_plip_dflt_cd;
8736: FETCH c_ler_plip_dflt_cd INTO l_dflt_enrt_cd, l_dflt_enrt_rl;
8737: CLOSE c_ler_plip_dflt_cd;
8738: -- hr_utility.set_location(l_dflt_enrt_cd,50);
8739: -- Bug 5555402
8740: IF l_dflt_enrt_cd IS NULL THEN
8741: --
8742: -- 4.5
8751: --
8752: OPEN c_ler_ptip_dflt_cd;
8753: FETCH c_ler_ptip_dflt_cd INTO l_dflt_enrt_cd, l_dflt_enrt_rl;
8754: CLOSE c_ler_ptip_dflt_cd;
8755: -- hr_utility.set_location(l_dflt_enrt_cd,60);
8756: IF l_dflt_enrt_cd IS NULL THEN
8757: --
8758: -- 6
8759: --
8765: --
8766: END IF;
8767: --
8768: END IF;
8769: -- hr_utility.set_location(l_dflt_enrt_cd,80);
8770: IF p_pgm_id IS NULL
8771: AND l_dflt_enrt_cd IS NULL THEN
8772: --
8773: -- 7
8780: --
8781: l_dflt_enrt_cd := l_pl_rec.nip_dflt_enrt_cd;
8782: l_dflt_enrt_rl := l_pl_rec.nip_dflt_enrt_det_rl;
8783: --
8784: -- hr_utility.set_location(l_dflt_enrt_cd,90);
8785: ELSIF p_pgm_id IS NOT NULL
8786: AND l_dflt_enrt_cd IS NULL THEN
8787: --
8788: -- 8
8789: --
8790: OPEN c_plip_dflt_cd;
8791: FETCH c_plip_dflt_cd INTO l_dflt_enrt_cd, l_dflt_enrt_rl;
8792: CLOSE c_plip_dflt_cd;
8793: -- hr_utility.set_location(l_dflt_enrt_cd,100);
8794: --
8795: IF l_dflt_enrt_cd IS NULL THEN
8796: --
8797: -- 9
8798: --
8799: OPEN c_ptip_dflt_cd;
8800: FETCH c_ptip_dflt_cd INTO l_dflt_enrt_cd, l_dflt_enrt_rl;
8801: CLOSE c_ptip_dflt_cd;
8802: -- hr_utility.set_location(l_dflt_enrt_cd,110);
8803: --
8804: END IF;
8805: END IF;
8806: --
8807: p_dflt_enrt_cd := l_dflt_enrt_cd;
8808: p_dflt_enrt_rl := l_dflt_enrt_rl;
8809: --
8810: if g_debug then
8811: hr_utility.set_location(l_dflt_enrt_cd,145);
8812: hr_utility.set_location('Leaving: ' || l_proc, 150);
8813: end if;
8814: --
8815: exception
8808: p_dflt_enrt_rl := l_dflt_enrt_rl;
8809: --
8810: if g_debug then
8811: hr_utility.set_location(l_dflt_enrt_cd,145);
8812: hr_utility.set_location('Leaving: ' || l_proc, 150);
8813: end if;
8814: --
8815: exception
8816: --
8935: l_plan_rec ben_pl_f%ROWTYPE;
8936: l_oipl_rec ben_cobj_cache.g_oipl_inst_row;
8937: l_ler_dflt_flag varchar2(30); -- 3510229
8938: BEGIN
8939: hr_utility.set_location('Entering: ' || l_proc, 10);
8940: --
8941: l_dflt_enrt_cd := NULL;
8942: --
8943: -- Hierarchy
8973: IF l_dflt_enrt_cd IS NULL THEN
8974: --
8975: -- 2
8976: --
8977: hr_utility.set_location('In the case 2 ' , 100);
8978: --
8979: --l_dflt_enrt_cd := ben_cobj_cache.g_oipl_currow.dflt_enrt_cd;
8980: --l_dflt_enrt_rl := ben_cobj_cache.g_oipl_currow.dflt_enrt_det_rl;
8981: --
8981: --
8982: l_dflt_enrt_cd := p_oipl_rec.dflt_enrt_cd ;
8983: l_dflt_enrt_rl := p_oipl_rec.dflt_enrt_det_rl ;
8984:
8985: --hr_utility.set_location(' p_oipl_rec.oipl_id '||p_oipl_rec.oipl_id ,110);
8986: --hr_utility.set_location(' p_oipl_rec.dflt_enrt_cd '||p_oipl_rec.dflt_enrt_cd ,110);
8987: --hr_utility.set_location(' p_oipl_rec.dflt_flag '||p_oipl_rec.dflt_flag, 110) ;
8988: --
8989: if l_dflt_enrt_cd is not null
8982: l_dflt_enrt_cd := p_oipl_rec.dflt_enrt_cd ;
8983: l_dflt_enrt_rl := p_oipl_rec.dflt_enrt_det_rl ;
8984:
8985: --hr_utility.set_location(' p_oipl_rec.oipl_id '||p_oipl_rec.oipl_id ,110);
8986: --hr_utility.set_location(' p_oipl_rec.dflt_enrt_cd '||p_oipl_rec.dflt_enrt_cd ,110);
8987: --hr_utility.set_location(' p_oipl_rec.dflt_flag '||p_oipl_rec.dflt_flag, 110) ;
8988: --
8989: if l_dflt_enrt_cd is not null
8990: and p_level is null then -- 3510229
8983: l_dflt_enrt_rl := p_oipl_rec.dflt_enrt_det_rl ;
8984:
8985: --hr_utility.set_location(' p_oipl_rec.oipl_id '||p_oipl_rec.oipl_id ,110);
8986: --hr_utility.set_location(' p_oipl_rec.dflt_enrt_cd '||p_oipl_rec.dflt_enrt_cd ,110);
8987: --hr_utility.set_location(' p_oipl_rec.dflt_flag '||p_oipl_rec.dflt_flag, 110) ;
8988: --
8989: if l_dflt_enrt_cd is not null
8990: and p_level is null then -- 3510229
8991: p_level:='OIPL';
9011: --if p_ler_dflt_flag is null then
9012: -- p_ler_dflt_flag := l_ler_dflt_flag;
9013: --end if;
9014: --l_ler_dflt_flag := null ;
9015: hr_utility.set_location('after LER pNip chk p_ler_dflt_flag: '||p_ler_dflt_flag , 100);
9016: -- 3510229 end
9017:
9018: end if;
9019: -- there could be default flag without default code 4008380
9019: -- there could be default flag without default code 4008380
9020: if p_ler_dflt_flag is null and l_ler_dflt_flag is not null then
9021: p_ler_dflt_flag := l_ler_dflt_flag ;
9022: end if ;
9023: hr_utility.set_location('l_ler_dflt_flag ' || l_ler_dflt_flag ,40);
9024: hr_utility.set_location(l_dflt_enrt_cd,40);
9025:
9026:
9027: ELSIF p_pgm_id IS NOT NULL
9020: if p_ler_dflt_flag is null and l_ler_dflt_flag is not null then
9021: p_ler_dflt_flag := l_ler_dflt_flag ;
9022: end if ;
9023: hr_utility.set_location('l_ler_dflt_flag ' || l_ler_dflt_flag ,40);
9024: hr_utility.set_location(l_dflt_enrt_cd,40);
9025:
9026:
9027: ELSIF p_pgm_id IS NOT NULL
9028: AND l_dflt_enrt_cd IS NULL THEN
9041: -- 4008380
9042: --if p_ler_dflt_flag is null then
9043: -- p_ler_dflt_flag := l_ler_dflt_flag;
9044: --end if;
9045: hr_utility.set_location('after LER PLIP chk p_ler_dflt_flag: '||p_ler_dflt_flag , 100);
9046: --l_ler_dflt_flag := null ;
9047: -- 3510229 end
9048:
9049: end if;
9050: -- 4008380
9051: if p_ler_dflt_flag is null and l_ler_dflt_flag is not null then
9052: p_ler_dflt_flag := l_ler_dflt_flag ;
9053: end if ;
9054: hr_utility.set_location('l_ler_dflt_flag ' || l_ler_dflt_flag ,50);
9055: hr_utility.set_location(l_dflt_enrt_cd,50);
9056:
9057: -- 4008380
9058: -- there could be plip but the setup may be in plan ler level
9051: if p_ler_dflt_flag is null and l_ler_dflt_flag is not null then
9052: p_ler_dflt_flag := l_ler_dflt_flag ;
9053: end if ;
9054: hr_utility.set_location('l_ler_dflt_flag ' || l_ler_dflt_flag ,50);
9055: hr_utility.set_location(l_dflt_enrt_cd,50);
9056:
9057: -- 4008380
9058: -- there could be plip but the setup may be in plan ler level
9059: IF l_dflt_enrt_cd IS NULL THEN
9064:
9065: if l_dflt_enrt_cd is not null
9066: and p_level is null then -- 3510229
9067: p_level:='LER_PL';
9068: hr_utility.set_location('after LER Plan chk p_ler_dflt_flag: '||p_ler_dflt_flag , 100);
9069: end if;
9070: -- there could be default flag without default code 4008380
9071: if p_ler_dflt_flag is null and l_ler_dflt_flag is not null then
9072: p_ler_dflt_flag := l_ler_dflt_flag ;
9070: -- there could be default flag without default code 4008380
9071: if p_ler_dflt_flag is null and l_ler_dflt_flag is not null then
9072: p_ler_dflt_flag := l_ler_dflt_flag ;
9073: end if ;
9074: hr_utility.set_location('l_ler_dflt_flag ' || l_ler_dflt_flag ,40);
9075: hr_utility.set_location(l_dflt_enrt_cd,40);
9076: end if ;
9077:
9078:
9071: if p_ler_dflt_flag is null and l_ler_dflt_flag is not null then
9072: p_ler_dflt_flag := l_ler_dflt_flag ;
9073: end if ;
9074: hr_utility.set_location('l_ler_dflt_flag ' || l_ler_dflt_flag ,40);
9075: hr_utility.set_location(l_dflt_enrt_cd,40);
9076: end if ;
9077:
9078:
9079:
9088: if l_dflt_enrt_cd is not null
9089: and p_level is null then -- 3510229
9090: p_level:='LER_PTIP';
9091: end if;
9092: -- hr_utility.set_location(l_dflt_enrt_cd,60);
9093: IF l_dflt_enrt_cd IS NULL THEN
9094: --
9095: -- 6
9096: --
9103: end if;
9104: END IF;
9105: END IF;
9106: END IF;
9107: -- hr_utility.set_location(l_dflt_enrt_cd,80);
9108: IF p_pgm_id IS NULL
9109: AND l_dflt_enrt_cd IS NULL THEN
9110: --
9111: -- 7
9113: -- Bug 1895874
9114: -- l_dflt_enrt_cd := ben_cobj_cache.g_pl_currow.nip_dflt_enrt_cd;
9115: -- l_dflt_enrt_rl := ben_cobj_cache.g_pl_currow.nip_dflt_enrt_det_rl;
9116: --
9117: hr_utility.set_location(' p_pl_rec.pl_id '||p_oipl_rec.oipl_id ,110);
9118: hr_utility.set_location(' p_pl_rec.nip_dflt_enrt_cd '||p_pl_rec.nip_dflt_enrt_cd ,110);
9119: hr_utility.set_location(' p_pl_rec.nip_dflt_flag '||p_pl_rec.nip_dflt_flag, 110) ;
9120: --
9121: l_dflt_enrt_cd := p_pl_rec.nip_dflt_enrt_cd ;
9114: -- l_dflt_enrt_cd := ben_cobj_cache.g_pl_currow.nip_dflt_enrt_cd;
9115: -- l_dflt_enrt_rl := ben_cobj_cache.g_pl_currow.nip_dflt_enrt_det_rl;
9116: --
9117: hr_utility.set_location(' p_pl_rec.pl_id '||p_oipl_rec.oipl_id ,110);
9118: hr_utility.set_location(' p_pl_rec.nip_dflt_enrt_cd '||p_pl_rec.nip_dflt_enrt_cd ,110);
9119: hr_utility.set_location(' p_pl_rec.nip_dflt_flag '||p_pl_rec.nip_dflt_flag, 110) ;
9120: --
9121: l_dflt_enrt_cd := p_pl_rec.nip_dflt_enrt_cd ;
9122: l_dflt_enrt_rl := p_pl_rec.nip_dflt_enrt_det_rl ;
9115: -- l_dflt_enrt_rl := ben_cobj_cache.g_pl_currow.nip_dflt_enrt_det_rl;
9116: --
9117: hr_utility.set_location(' p_pl_rec.pl_id '||p_oipl_rec.oipl_id ,110);
9118: hr_utility.set_location(' p_pl_rec.nip_dflt_enrt_cd '||p_pl_rec.nip_dflt_enrt_cd ,110);
9119: hr_utility.set_location(' p_pl_rec.nip_dflt_flag '||p_pl_rec.nip_dflt_flag, 110) ;
9120: --
9121: l_dflt_enrt_cd := p_pl_rec.nip_dflt_enrt_cd ;
9122: l_dflt_enrt_rl := p_pl_rec.nip_dflt_enrt_det_rl ;
9123: if p_ler_dflt_flag is null then -- 3510229
9135: and p_level is null then -- 3510229
9136: p_level:='PL';
9137: end if;
9138: --
9139: -- hr_utility.set_location(l_dflt_enrt_cd,90);
9140:
9141: ELSIF p_pgm_id IS NOT NULL
9142: AND l_dflt_enrt_cd IS NULL THEN
9143: --
9153: if l_dflt_enrt_cd is not null
9154: and p_level is null then -- 3510229
9155: p_level:='PLIP';
9156: end if;
9157: hr_utility.set_location(l_dflt_enrt_cd,100);
9158: --
9159: IF l_dflt_enrt_cd IS NULL THEN
9160: --
9161: -- 9
9170: if l_dflt_enrt_cd is not null
9171: and p_level is null then -- 3510229
9172: p_level:='PTIP';
9173: end if;
9174: hr_utility.set_location(l_dflt_enrt_cd,110);
9175: --
9176: END IF;
9177: END IF;
9178: --
9175: --
9176: END IF;
9177: END IF;
9178: --
9179: hr_utility.set_location(' p_pgm_id '||p_pgm_id||' pl_id '||p_pl_id||' oipl '||p_oipl_id||
9180: ' plip '||p_plip_id||' ptip '||p_ptip_id,130);
9181: hr_utility.set_location('dflt_enrt_cd= '||l_dflt_enrt_cd,130);
9182: hr_utility.set_location('dflt_enrt_rl= '||l_dflt_enrt_rl,140);
9183: hr_utility.set_location('p_ler_dflt_flag= '||p_ler_dflt_flag ,140);
9177: END IF;
9178: --
9179: hr_utility.set_location(' p_pgm_id '||p_pgm_id||' pl_id '||p_pl_id||' oipl '||p_oipl_id||
9180: ' plip '||p_plip_id||' ptip '||p_ptip_id,130);
9181: hr_utility.set_location('dflt_enrt_cd= '||l_dflt_enrt_cd,130);
9182: hr_utility.set_location('dflt_enrt_rl= '||l_dflt_enrt_rl,140);
9183: hr_utility.set_location('p_ler_dflt_flag= '||p_ler_dflt_flag ,140);
9184: p_dflt_enrt_cd := l_dflt_enrt_cd;
9185: p_dflt_enrt_rl := l_dflt_enrt_rl;
9178: --
9179: hr_utility.set_location(' p_pgm_id '||p_pgm_id||' pl_id '||p_pl_id||' oipl '||p_oipl_id||
9180: ' plip '||p_plip_id||' ptip '||p_ptip_id,130);
9181: hr_utility.set_location('dflt_enrt_cd= '||l_dflt_enrt_cd,130);
9182: hr_utility.set_location('dflt_enrt_rl= '||l_dflt_enrt_rl,140);
9183: hr_utility.set_location('p_ler_dflt_flag= '||p_ler_dflt_flag ,140);
9184: p_dflt_enrt_cd := l_dflt_enrt_cd;
9185: p_dflt_enrt_rl := l_dflt_enrt_rl;
9186: hr_utility.set_location('Leaving: ' || l_proc, 150);
9179: hr_utility.set_location(' p_pgm_id '||p_pgm_id||' pl_id '||p_pl_id||' oipl '||p_oipl_id||
9180: ' plip '||p_plip_id||' ptip '||p_ptip_id,130);
9181: hr_utility.set_location('dflt_enrt_cd= '||l_dflt_enrt_cd,130);
9182: hr_utility.set_location('dflt_enrt_rl= '||l_dflt_enrt_rl,140);
9183: hr_utility.set_location('p_ler_dflt_flag= '||p_ler_dflt_flag ,140);
9184: p_dflt_enrt_cd := l_dflt_enrt_cd;
9185: p_dflt_enrt_rl := l_dflt_enrt_rl;
9186: hr_utility.set_location('Leaving: ' || l_proc, 150);
9187: exception
9182: hr_utility.set_location('dflt_enrt_rl= '||l_dflt_enrt_rl,140);
9183: hr_utility.set_location('p_ler_dflt_flag= '||p_ler_dflt_flag ,140);
9184: p_dflt_enrt_cd := l_dflt_enrt_cd;
9185: p_dflt_enrt_rl := l_dflt_enrt_rl;
9186: hr_utility.set_location('Leaving: ' || l_proc, 150);
9187: exception
9188: --
9189: when others then
9190: --
9357: END IF;
9358: --
9359: end if;
9360: if g_debug then
9361: hr_utility.set_location('level ' || p_level , 8086);
9362: end if;
9363: --
9364: exception
9365: --
9853: l_next_row NUMBER;
9854: --
9855: begin
9856: --
9857: g_debug := hr_utility.debug_enabled;
9858: --
9859: if g_debug then
9860: hr_utility.set_location('Entering: '||l_proc,10);
9861: end if;
9856: --
9857: g_debug := hr_utility.debug_enabled;
9858: --
9859: if g_debug then
9860: hr_utility.set_location('Entering: '||l_proc,10);
9861: end if;
9862: --l_effective_date_1:=p_effective_date-1;
9863: --Bug#2328029
9864: l_effective_date_1:=
9908: )
9909: loop
9910: */
9911: if g_debug then
9912: hr_utility.set_location(l_proc||' ST c_choices loop: ',10);
9913: end if;
9914: --
9915: -- init flags
9916: --
9964: --
9965: -- get the dflt_enrt_cd/rule
9966: --
9967: if g_debug then
9968: hr_utility.set_location('DDEC: '||l_proc,10);
9969: end if;
9970: determine_dflt_enrt_cd
9971: (p_oipl_id => l_oipl_id
9972: ,p_oipl_rec => l_oipl_rec
9985: ,p_effective_date => l_lf_evt_ocrd_dt -- Bug 2404008 p_effective_date
9986: ,p_level => l_dflt_level
9987: ,p_ler_dflt_flag => l_ler_dflt_flag
9988: );
9989: --hr_utility.set_location('After call to determine_dflt_enrt_cd ' , 5553);
9990: --hr_utility.set_location('l_pgm_id '||l_pgm_id,5554);
9991: if g_debug then
9992: hr_utility.set_location('l_oipl_id '||l_oipl_id ,5555);
9993: hr_utility.set_location('l_pl_id '||l_pl_id ,5556);
9986: ,p_level => l_dflt_level
9987: ,p_ler_dflt_flag => l_ler_dflt_flag
9988: );
9989: --hr_utility.set_location('After call to determine_dflt_enrt_cd ' , 5553);
9990: --hr_utility.set_location('l_pgm_id '||l_pgm_id,5554);
9991: if g_debug then
9992: hr_utility.set_location('l_oipl_id '||l_oipl_id ,5555);
9993: hr_utility.set_location('l_pl_id '||l_pl_id ,5556);
9994: --hr_utility.set_location('l_dflt_flag='||l_dflt_flag,5557);
9988: );
9989: --hr_utility.set_location('After call to determine_dflt_enrt_cd ' , 5553);
9990: --hr_utility.set_location('l_pgm_id '||l_pgm_id,5554);
9991: if g_debug then
9992: hr_utility.set_location('l_oipl_id '||l_oipl_id ,5555);
9993: hr_utility.set_location('l_pl_id '||l_pl_id ,5556);
9994: --hr_utility.set_location('l_dflt_flag='||l_dflt_flag,5557);
9995: hr_utility.set_location('l_ler_dflt_flag '||l_ler_dflt_flag ,5555);
9996: hr_utility.set_location(' l_epe_dflt_flag='|| l_epe_dflt_flag,5558);
9989: --hr_utility.set_location('After call to determine_dflt_enrt_cd ' , 5553);
9990: --hr_utility.set_location('l_pgm_id '||l_pgm_id,5554);
9991: if g_debug then
9992: hr_utility.set_location('l_oipl_id '||l_oipl_id ,5555);
9993: hr_utility.set_location('l_pl_id '||l_pl_id ,5556);
9994: --hr_utility.set_location('l_dflt_flag='||l_dflt_flag,5557);
9995: hr_utility.set_location('l_ler_dflt_flag '||l_ler_dflt_flag ,5555);
9996: hr_utility.set_location(' l_epe_dflt_flag='|| l_epe_dflt_flag,5558);
9997: hr_utility.set_location(' l_dflt_level ='|| l_dflt_level ,5558);
9990: --hr_utility.set_location('l_pgm_id '||l_pgm_id,5554);
9991: if g_debug then
9992: hr_utility.set_location('l_oipl_id '||l_oipl_id ,5555);
9993: hr_utility.set_location('l_pl_id '||l_pl_id ,5556);
9994: --hr_utility.set_location('l_dflt_flag='||l_dflt_flag,5557);
9995: hr_utility.set_location('l_ler_dflt_flag '||l_ler_dflt_flag ,5555);
9996: hr_utility.set_location(' l_epe_dflt_flag='|| l_epe_dflt_flag,5558);
9997: hr_utility.set_location(' l_dflt_level ='|| l_dflt_level ,5558);
9998: end if;
9991: if g_debug then
9992: hr_utility.set_location('l_oipl_id '||l_oipl_id ,5555);
9993: hr_utility.set_location('l_pl_id '||l_pl_id ,5556);
9994: --hr_utility.set_location('l_dflt_flag='||l_dflt_flag,5557);
9995: hr_utility.set_location('l_ler_dflt_flag '||l_ler_dflt_flag ,5555);
9996: hr_utility.set_location(' l_epe_dflt_flag='|| l_epe_dflt_flag,5558);
9997: hr_utility.set_location(' l_dflt_level ='|| l_dflt_level ,5558);
9998: end if;
9999: --hr_utility.set_location(' ---- ' ,5559);
9992: hr_utility.set_location('l_oipl_id '||l_oipl_id ,5555);
9993: hr_utility.set_location('l_pl_id '||l_pl_id ,5556);
9994: --hr_utility.set_location('l_dflt_flag='||l_dflt_flag,5557);
9995: hr_utility.set_location('l_ler_dflt_flag '||l_ler_dflt_flag ,5555);
9996: hr_utility.set_location(' l_epe_dflt_flag='|| l_epe_dflt_flag,5558);
9997: hr_utility.set_location(' l_dflt_level ='|| l_dflt_level ,5558);
9998: end if;
9999: --hr_utility.set_location(' ---- ' ,5559);
10000: --
9993: hr_utility.set_location('l_pl_id '||l_pl_id ,5556);
9994: --hr_utility.set_location('l_dflt_flag='||l_dflt_flag,5557);
9995: hr_utility.set_location('l_ler_dflt_flag '||l_ler_dflt_flag ,5555);
9996: hr_utility.set_location(' l_epe_dflt_flag='|| l_epe_dflt_flag,5558);
9997: hr_utility.set_location(' l_dflt_level ='|| l_dflt_level ,5558);
9998: end if;
9999: --hr_utility.set_location(' ---- ' ,5559);
10000: --
10001: -- Set the values for the dflt_flag
9995: hr_utility.set_location('l_ler_dflt_flag '||l_ler_dflt_flag ,5555);
9996: hr_utility.set_location(' l_epe_dflt_flag='|| l_epe_dflt_flag,5558);
9997: hr_utility.set_location(' l_dflt_level ='|| l_dflt_level ,5558);
9998: end if;
9999: --hr_utility.set_location(' ---- ' ,5559);
10000: --
10001: -- Set the values for the dflt_flag
10002: --
10003: --
10055: FETCH c_asg INTO l_rec_assignment_id, l_rec_organization_id;
10056: IF c_asg%NOTFOUND THEN
10057: CLOSE c_asg;
10058: if g_debug then
10059: hr_utility.set_location('error', 20);
10060: end if;
10061: fnd_message.set_name('BEN', 'BEN_92106_PRTT_NO_ASGN');
10062: fnd_message.set_token('PROC', l_proc);
10063: fnd_message.set_token('PERSON_ID', TO_CHAR(p_person_id));
10065: fnd_message.set_token('EFFECTIVE_DATE', TO_CHAR(p_effective_date));
10066: RAISE ben_manage_life_events.g_record_error;
10067: END IF;
10068: CLOSE c_asg;
10069: --hr_utility.set_location('Before call to l_use_dflt_flag ',5550);
10070: if g_debug then
10071: hr_utility.set_location(' l_use_dflt_flag ',5550);
10072: hr_utility.set_location(' l_use_dflt_enrt_cd ',5550);
10073: end if;
10067: END IF;
10068: CLOSE c_asg;
10069: --hr_utility.set_location('Before call to l_use_dflt_flag ',5550);
10070: if g_debug then
10071: hr_utility.set_location(' l_use_dflt_flag ',5550);
10072: hr_utility.set_location(' l_use_dflt_enrt_cd ',5550);
10073: end if;
10074: determine_dflt_flag(
10075: l_use_dflt_flag,
10068: CLOSE c_asg;
10069: --hr_utility.set_location('Before call to l_use_dflt_flag ',5550);
10070: if g_debug then
10071: hr_utility.set_location(' l_use_dflt_flag ',5550);
10072: hr_utility.set_location(' l_use_dflt_enrt_cd ',5550);
10073: end if;
10074: determine_dflt_flag(
10075: l_use_dflt_flag,
10076: l_use_dflt_enrt_cd,
10096: p_run_mode /* iRec : Added p_run_mode */
10097: );
10098: --
10099: if g_debug then
10100: hr_utility.set_location(' l_dflt_flag '|| l_dflt_flag ,5550);
10101: end if;
10102: IF (l_dflt_flag = 'DEFER') THEN
10103: --
10104: l_dflt_flag := l_use_dflt_flag;
10103: --
10104: l_dflt_flag := l_use_dflt_flag;
10105: --
10106: END IF;
10107: --hr_utility.set_location('After call to determine_dflt_flag ' , 5553);
10108: --hr_utility.set_location('l_pgm_id '||l_pgm_id,5554);
10109: --hr_utility.set_location('l_oipl_id '||l_oipl_id ,5555);
10110: if g_debug then
10111: hr_utility.set_location('l_pl_id '||l_pl_id ,5556);
10104: l_dflt_flag := l_use_dflt_flag;
10105: --
10106: END IF;
10107: --hr_utility.set_location('After call to determine_dflt_flag ' , 5553);
10108: --hr_utility.set_location('l_pgm_id '||l_pgm_id,5554);
10109: --hr_utility.set_location('l_oipl_id '||l_oipl_id ,5555);
10110: if g_debug then
10111: hr_utility.set_location('l_pl_id '||l_pl_id ,5556);
10112: hr_utility.set_location('l_dflt_flag='||l_dflt_flag,5557);
10105: --
10106: END IF;
10107: --hr_utility.set_location('After call to determine_dflt_flag ' , 5553);
10108: --hr_utility.set_location('l_pgm_id '||l_pgm_id,5554);
10109: --hr_utility.set_location('l_oipl_id '||l_oipl_id ,5555);
10110: if g_debug then
10111: hr_utility.set_location('l_pl_id '||l_pl_id ,5556);
10112: hr_utility.set_location('l_dflt_flag='||l_dflt_flag,5557);
10113: hr_utility.set_location(' l_epe_dflt_flag='|| l_epe_dflt_flag,5558);
10107: --hr_utility.set_location('After call to determine_dflt_flag ' , 5553);
10108: --hr_utility.set_location('l_pgm_id '||l_pgm_id,5554);
10109: --hr_utility.set_location('l_oipl_id '||l_oipl_id ,5555);
10110: if g_debug then
10111: hr_utility.set_location('l_pl_id '||l_pl_id ,5556);
10112: hr_utility.set_location('l_dflt_flag='||l_dflt_flag,5557);
10113: hr_utility.set_location(' l_epe_dflt_flag='|| l_epe_dflt_flag,5558);
10114: end if;
10115: --
10108: --hr_utility.set_location('l_pgm_id '||l_pgm_id,5554);
10109: --hr_utility.set_location('l_oipl_id '||l_oipl_id ,5555);
10110: if g_debug then
10111: hr_utility.set_location('l_pl_id '||l_pl_id ,5556);
10112: hr_utility.set_location('l_dflt_flag='||l_dflt_flag,5557);
10113: hr_utility.set_location(' l_epe_dflt_flag='|| l_epe_dflt_flag,5558);
10114: end if;
10115: --
10116: -- Done with default flag now see if electable flag should be changed
10109: --hr_utility.set_location('l_oipl_id '||l_oipl_id ,5555);
10110: if g_debug then
10111: hr_utility.set_location('l_pl_id '||l_pl_id ,5556);
10112: hr_utility.set_location('l_dflt_flag='||l_dflt_flag,5557);
10113: hr_utility.set_location(' l_epe_dflt_flag='|| l_epe_dflt_flag,5558);
10114: end if;
10115: --
10116: -- Done with default flag now see if electable flag should be changed
10117: --
10146: END IF;
10147: --
10148: CLOSE c_plan_enrolment_info;
10149: if g_debug then
10150: hr_utility.set_location('close c_PEI: ' || l_proc, 10);
10151: end if;
10152: --
10153: ELSE
10154: --
10177: END IF;
10178: --
10179: CLOSE c_oipl_enrolment_info;
10180: if g_debug then
10181: hr_utility.set_location('close c_OIEI: ' || l_proc, 10);
10182: end if;
10183: --
10184: END IF;
10185: if g_debug then
10182: end if;
10183: --
10184: END IF;
10185: if g_debug then
10186: hr_utility.set_location('determine prev elig', 10);
10187: end if;
10188: --
10189: -- Bug 2677804 We need to see the override case here.
10190: IF ( l_enrt_ovridn_flag = 'Y' AND l_enrt_ovrid_thru_dt >= l_lf_evt_ocrd_dt) THEN
10219: --
10220: end if;
10221: --
10222: if g_debug then
10223: hr_utility.set_location('close c_PEFP: ' || l_proc, 10);
10224: end if;
10225: --
10226: ELSE
10227: --
10247: --
10248: end if;
10249: --
10250: if g_debug then
10251: hr_utility.set_location('close c_PEFO: ' || l_proc, 10);
10252: end if;
10253: --
10254: END IF;
10255: l_pl_enrt_cd := l_plan_rec.enrt_cd;
10258: -- Determine if the compensation object requires or allows
10259: -- an election change If life event mode
10260: --
10261: if g_debug then
10262: hr_utility.set_location('ler change stuff', 20);
10263: end if;
10264: l_ler_chg_found_flag := 'N';
10265: l_ler_chg_oipl_found_flag := 'N';
10266: --
10266: --
10267: -- See if there is a life event reason to change
10268: --
10269: if g_debug then
10270: hr_utility.set_location('ler change stuff not null stuff', 20);
10271: hr_utility.set_location(' Op c_lce_info: ' || l_proc, 10);
10272: end if;
10273: --
10274: determine_ben_settings(
10267: -- See if there is a life event reason to change
10268: --
10269: if g_debug then
10270: hr_utility.set_location('ler change stuff not null stuff', 20);
10271: hr_utility.set_location(' Op c_lce_info: ' || l_proc, 10);
10272: end if;
10273: --
10274: determine_ben_settings(
10275: p_pl_id => l_pl_id,
10291: p_ler_chg_oipl_found_flag => l_ler_chg_oipl_found_flag,
10292: p_ler_chg_found_flag => l_ler_chg_found_flag,
10293: p_enrt_cd_level => l_enrt_cd_level);
10294: if g_debug then
10295: hr_utility.set_location(' Cl c_lce_info: ' || l_proc, 10);
10296: end if;
10297: --
10298: -- Determine enrt codes/rules method codes/rules then
10299: -- figure out if electable.
10383: l_pl_auto_enrt_rl := l_pgm_rec.auto_enrt_mthd_rl;
10384: END IF;
10385:
10386: g_ptip_id := l_ptip_id;
10387: -- hr_utility.set_location('l_previous_eligibility='||l_previous_eligibility,1064);
10388: -- hr_utility.set_location('l_crnt_enrt_cvg_strt_dt='||l_crnt_enrt_cvg_strt_dt,1064);
10389: -- hr_utility.set_location('l_dpnt_cvrd_flag='||l_dpnt_cvrd_flag,1064);
10390: -- hr_utility.set_location('p_person_id='||p_person_id,1064);
10391: -- hr_utility.set_location('p_ler_id='||p_ler_id,1064);
10384: END IF;
10385:
10386: g_ptip_id := l_ptip_id;
10387: -- hr_utility.set_location('l_previous_eligibility='||l_previous_eligibility,1064);
10388: -- hr_utility.set_location('l_crnt_enrt_cvg_strt_dt='||l_crnt_enrt_cvg_strt_dt,1064);
10389: -- hr_utility.set_location('l_dpnt_cvrd_flag='||l_dpnt_cvrd_flag,1064);
10390: -- hr_utility.set_location('p_person_id='||p_person_id,1064);
10391: -- hr_utility.set_location('p_ler_id='||p_ler_id,1064);
10392: -- hr_utility.set_location('l_pl_enrt_cd='||l_pl_enrt_cd,1064);
10385:
10386: g_ptip_id := l_ptip_id;
10387: -- hr_utility.set_location('l_previous_eligibility='||l_previous_eligibility,1064);
10388: -- hr_utility.set_location('l_crnt_enrt_cvg_strt_dt='||l_crnt_enrt_cvg_strt_dt,1064);
10389: -- hr_utility.set_location('l_dpnt_cvrd_flag='||l_dpnt_cvrd_flag,1064);
10390: -- hr_utility.set_location('p_person_id='||p_person_id,1064);
10391: -- hr_utility.set_location('p_ler_id='||p_ler_id,1064);
10392: -- hr_utility.set_location('l_pl_enrt_cd='||l_pl_enrt_cd,1064);
10393: -- hr_utility.set_location('l_pl_enrt_rl='||l_pl_enrt_rl,1064);
10386: g_ptip_id := l_ptip_id;
10387: -- hr_utility.set_location('l_previous_eligibility='||l_previous_eligibility,1064);
10388: -- hr_utility.set_location('l_crnt_enrt_cvg_strt_dt='||l_crnt_enrt_cvg_strt_dt,1064);
10389: -- hr_utility.set_location('l_dpnt_cvrd_flag='||l_dpnt_cvrd_flag,1064);
10390: -- hr_utility.set_location('p_person_id='||p_person_id,1064);
10391: -- hr_utility.set_location('p_ler_id='||p_ler_id,1064);
10392: -- hr_utility.set_location('l_pl_enrt_cd='||l_pl_enrt_cd,1064);
10393: -- hr_utility.set_location('l_pl_enrt_rl='||l_pl_enrt_rl,1064);
10394: -- hr_utility.set_location('p_effective_date='||p_effective_date,1064);
10387: -- hr_utility.set_location('l_previous_eligibility='||l_previous_eligibility,1064);
10388: -- hr_utility.set_location('l_crnt_enrt_cvg_strt_dt='||l_crnt_enrt_cvg_strt_dt,1064);
10389: -- hr_utility.set_location('l_dpnt_cvrd_flag='||l_dpnt_cvrd_flag,1064);
10390: -- hr_utility.set_location('p_person_id='||p_person_id,1064);
10391: -- hr_utility.set_location('p_ler_id='||p_ler_id,1064);
10392: -- hr_utility.set_location('l_pl_enrt_cd='||l_pl_enrt_cd,1064);
10393: -- hr_utility.set_location('l_pl_enrt_rl='||l_pl_enrt_rl,1064);
10394: -- hr_utility.set_location('p_effective_date='||p_effective_date,1064);
10395: -- hr_utility.set_location('p_lf_evt_ocrd_dt='||p_lf_evt_ocrd_dt,1064);
10388: -- hr_utility.set_location('l_crnt_enrt_cvg_strt_dt='||l_crnt_enrt_cvg_strt_dt,1064);
10389: -- hr_utility.set_location('l_dpnt_cvrd_flag='||l_dpnt_cvrd_flag,1064);
10390: -- hr_utility.set_location('p_person_id='||p_person_id,1064);
10391: -- hr_utility.set_location('p_ler_id='||p_ler_id,1064);
10392: -- hr_utility.set_location('l_pl_enrt_cd='||l_pl_enrt_cd,1064);
10393: -- hr_utility.set_location('l_pl_enrt_rl='||l_pl_enrt_rl,1064);
10394: -- hr_utility.set_location('p_effective_date='||p_effective_date,1064);
10395: -- hr_utility.set_location('p_lf_evt_ocrd_dt='||p_lf_evt_ocrd_dt,1064);
10396: -- hr_utility.set_location('l_ler_enrt_prclds_chg_flag='||l_ler_enrt_prclds_chg_flag,1064);
10389: -- hr_utility.set_location('l_dpnt_cvrd_flag='||l_dpnt_cvrd_flag,1064);
10390: -- hr_utility.set_location('p_person_id='||p_person_id,1064);
10391: -- hr_utility.set_location('p_ler_id='||p_ler_id,1064);
10392: -- hr_utility.set_location('l_pl_enrt_cd='||l_pl_enrt_cd,1064);
10393: -- hr_utility.set_location('l_pl_enrt_rl='||l_pl_enrt_rl,1064);
10394: -- hr_utility.set_location('p_effective_date='||p_effective_date,1064);
10395: -- hr_utility.set_location('p_lf_evt_ocrd_dt='||p_lf_evt_ocrd_dt,1064);
10396: -- hr_utility.set_location('l_ler_enrt_prclds_chg_flag='||l_ler_enrt_prclds_chg_flag,1064);
10397: -- hr_utility.set_location('l_ler_stl_elig_cant_chg_flag='||l_ler_stl_elig_cant_chg_flag,1064);
10390: -- hr_utility.set_location('p_person_id='||p_person_id,1064);
10391: -- hr_utility.set_location('p_ler_id='||p_ler_id,1064);
10392: -- hr_utility.set_location('l_pl_enrt_cd='||l_pl_enrt_cd,1064);
10393: -- hr_utility.set_location('l_pl_enrt_rl='||l_pl_enrt_rl,1064);
10394: -- hr_utility.set_location('p_effective_date='||p_effective_date,1064);
10395: -- hr_utility.set_location('p_lf_evt_ocrd_dt='||p_lf_evt_ocrd_dt,1064);
10396: -- hr_utility.set_location('l_ler_enrt_prclds_chg_flag='||l_ler_enrt_prclds_chg_flag,1064);
10397: -- hr_utility.set_location('l_ler_stl_elig_cant_chg_flag='||l_ler_stl_elig_cant_chg_flag,1064);
10398: -- hr_utility.set_location('l_tco_chg_enrt_cd='||l_tco_chg_enrt_cd,1064);
10391: -- hr_utility.set_location('p_ler_id='||p_ler_id,1064);
10392: -- hr_utility.set_location('l_pl_enrt_cd='||l_pl_enrt_cd,1064);
10393: -- hr_utility.set_location('l_pl_enrt_rl='||l_pl_enrt_rl,1064);
10394: -- hr_utility.set_location('p_effective_date='||p_effective_date,1064);
10395: -- hr_utility.set_location('p_lf_evt_ocrd_dt='||p_lf_evt_ocrd_dt,1064);
10396: -- hr_utility.set_location('l_ler_enrt_prclds_chg_flag='||l_ler_enrt_prclds_chg_flag,1064);
10397: -- hr_utility.set_location('l_ler_stl_elig_cant_chg_flag='||l_ler_stl_elig_cant_chg_flag,1064);
10398: -- hr_utility.set_location('l_tco_chg_enrt_cd='||l_tco_chg_enrt_cd,1064);
10399: -- hr_utility.set_location('l_pl_id='||l_pl_id,1064);
10392: -- hr_utility.set_location('l_pl_enrt_cd='||l_pl_enrt_cd,1064);
10393: -- hr_utility.set_location('l_pl_enrt_rl='||l_pl_enrt_rl,1064);
10394: -- hr_utility.set_location('p_effective_date='||p_effective_date,1064);
10395: -- hr_utility.set_location('p_lf_evt_ocrd_dt='||p_lf_evt_ocrd_dt,1064);
10396: -- hr_utility.set_location('l_ler_enrt_prclds_chg_flag='||l_ler_enrt_prclds_chg_flag,1064);
10397: -- hr_utility.set_location('l_ler_stl_elig_cant_chg_flag='||l_ler_stl_elig_cant_chg_flag,1064);
10398: -- hr_utility.set_location('l_tco_chg_enrt_cd='||l_tco_chg_enrt_cd,1064);
10399: -- hr_utility.set_location('l_pl_id='||l_pl_id,1064);
10400: -- hr_utility.set_location('l_pgm_id='||l_pgm_id,1064);
10393: -- hr_utility.set_location('l_pl_enrt_rl='||l_pl_enrt_rl,1064);
10394: -- hr_utility.set_location('p_effective_date='||p_effective_date,1064);
10395: -- hr_utility.set_location('p_lf_evt_ocrd_dt='||p_lf_evt_ocrd_dt,1064);
10396: -- hr_utility.set_location('l_ler_enrt_prclds_chg_flag='||l_ler_enrt_prclds_chg_flag,1064);
10397: -- hr_utility.set_location('l_ler_stl_elig_cant_chg_flag='||l_ler_stl_elig_cant_chg_flag,1064);
10398: -- hr_utility.set_location('l_tco_chg_enrt_cd='||l_tco_chg_enrt_cd,1064);
10399: -- hr_utility.set_location('l_pl_id='||l_pl_id,1064);
10400: -- hr_utility.set_location('l_pgm_id='||l_pgm_id,1064);
10401: -- hr_utility.set_location('l_oipl_id='||l_oipl_id,1064);
10394: -- hr_utility.set_location('p_effective_date='||p_effective_date,1064);
10395: -- hr_utility.set_location('p_lf_evt_ocrd_dt='||p_lf_evt_ocrd_dt,1064);
10396: -- hr_utility.set_location('l_ler_enrt_prclds_chg_flag='||l_ler_enrt_prclds_chg_flag,1064);
10397: -- hr_utility.set_location('l_ler_stl_elig_cant_chg_flag='||l_ler_stl_elig_cant_chg_flag,1064);
10398: -- hr_utility.set_location('l_tco_chg_enrt_cd='||l_tco_chg_enrt_cd,1064);
10399: -- hr_utility.set_location('l_pl_id='||l_pl_id,1064);
10400: -- hr_utility.set_location('l_pgm_id='||l_pgm_id,1064);
10401: -- hr_utility.set_location('l_oipl_id='||l_oipl_id,1064);
10402: -- hr_utility.set_location('l_oipl_rec.opt_id='||l_oipl_rec.opt_id,1064);
10395: -- hr_utility.set_location('p_lf_evt_ocrd_dt='||p_lf_evt_ocrd_dt,1064);
10396: -- hr_utility.set_location('l_ler_enrt_prclds_chg_flag='||l_ler_enrt_prclds_chg_flag,1064);
10397: -- hr_utility.set_location('l_ler_stl_elig_cant_chg_flag='||l_ler_stl_elig_cant_chg_flag,1064);
10398: -- hr_utility.set_location('l_tco_chg_enrt_cd='||l_tco_chg_enrt_cd,1064);
10399: -- hr_utility.set_location('l_pl_id='||l_pl_id,1064);
10400: -- hr_utility.set_location('l_pgm_id='||l_pgm_id,1064);
10401: -- hr_utility.set_location('l_oipl_id='||l_oipl_id,1064);
10402: -- hr_utility.set_location('l_oipl_rec.opt_id='||l_oipl_rec.opt_id,1064);
10403: -- hr_utility.set_location('l_plan_rec.pl_typ_id='||l_plan_rec.pl_typ_id,1064);
10396: -- hr_utility.set_location('l_ler_enrt_prclds_chg_flag='||l_ler_enrt_prclds_chg_flag,1064);
10397: -- hr_utility.set_location('l_ler_stl_elig_cant_chg_flag='||l_ler_stl_elig_cant_chg_flag,1064);
10398: -- hr_utility.set_location('l_tco_chg_enrt_cd='||l_tco_chg_enrt_cd,1064);
10399: -- hr_utility.set_location('l_pl_id='||l_pl_id,1064);
10400: -- hr_utility.set_location('l_pgm_id='||l_pgm_id,1064);
10401: -- hr_utility.set_location('l_oipl_id='||l_oipl_id,1064);
10402: -- hr_utility.set_location('l_oipl_rec.opt_id='||l_oipl_rec.opt_id,1064);
10403: -- hr_utility.set_location('l_plan_rec.pl_typ_id='||l_plan_rec.pl_typ_id,1064);
10404: -- hr_utility.set_location('p_business_group_id='||p_business_group_id,1064);
10397: -- hr_utility.set_location('l_ler_stl_elig_cant_chg_flag='||l_ler_stl_elig_cant_chg_flag,1064);
10398: -- hr_utility.set_location('l_tco_chg_enrt_cd='||l_tco_chg_enrt_cd,1064);
10399: -- hr_utility.set_location('l_pl_id='||l_pl_id,1064);
10400: -- hr_utility.set_location('l_pgm_id='||l_pgm_id,1064);
10401: -- hr_utility.set_location('l_oipl_id='||l_oipl_id,1064);
10402: -- hr_utility.set_location('l_oipl_rec.opt_id='||l_oipl_rec.opt_id,1064);
10403: -- hr_utility.set_location('l_plan_rec.pl_typ_id='||l_plan_rec.pl_typ_id,1064);
10404: -- hr_utility.set_location('p_business_group_id='||p_business_group_id,1064);
10405: -- hr_utility.set_location('l_new_elctbl_flag='||l_new_elctbl_flag,1064);
10398: -- hr_utility.set_location('l_tco_chg_enrt_cd='||l_tco_chg_enrt_cd,1064);
10399: -- hr_utility.set_location('l_pl_id='||l_pl_id,1064);
10400: -- hr_utility.set_location('l_pgm_id='||l_pgm_id,1064);
10401: -- hr_utility.set_location('l_oipl_id='||l_oipl_id,1064);
10402: -- hr_utility.set_location('l_oipl_rec.opt_id='||l_oipl_rec.opt_id,1064);
10403: -- hr_utility.set_location('l_plan_rec.pl_typ_id='||l_plan_rec.pl_typ_id,1064);
10404: -- hr_utility.set_location('p_business_group_id='||p_business_group_id,1064);
10405: -- hr_utility.set_location('l_new_elctbl_flag='||l_new_elctbl_flag,1064);
10406: -- hr_utility.set_location('l_rec_assignment_id='||l_rec_assignment_id,1064);
10399: -- hr_utility.set_location('l_pl_id='||l_pl_id,1064);
10400: -- hr_utility.set_location('l_pgm_id='||l_pgm_id,1064);
10401: -- hr_utility.set_location('l_oipl_id='||l_oipl_id,1064);
10402: -- hr_utility.set_location('l_oipl_rec.opt_id='||l_oipl_rec.opt_id,1064);
10403: -- hr_utility.set_location('l_plan_rec.pl_typ_id='||l_plan_rec.pl_typ_id,1064);
10404: -- hr_utility.set_location('p_business_group_id='||p_business_group_id,1064);
10405: -- hr_utility.set_location('l_new_elctbl_flag='||l_new_elctbl_flag,1064);
10406: -- hr_utility.set_location('l_rec_assignment_id='||l_rec_assignment_id,1064);
10407: -- hr_utility.set_location('l_previous_eligibility='||l_previous_eligibility,1064);
10400: -- hr_utility.set_location('l_pgm_id='||l_pgm_id,1064);
10401: -- hr_utility.set_location('l_oipl_id='||l_oipl_id,1064);
10402: -- hr_utility.set_location('l_oipl_rec.opt_id='||l_oipl_rec.opt_id,1064);
10403: -- hr_utility.set_location('l_plan_rec.pl_typ_id='||l_plan_rec.pl_typ_id,1064);
10404: -- hr_utility.set_location('p_business_group_id='||p_business_group_id,1064);
10405: -- hr_utility.set_location('l_new_elctbl_flag='||l_new_elctbl_flag,1064);
10406: -- hr_utility.set_location('l_rec_assignment_id='||l_rec_assignment_id,1064);
10407: -- hr_utility.set_location('l_previous_eligibility='||l_previous_eligibility,1064);
10408: if g_debug then
10401: -- hr_utility.set_location('l_oipl_id='||l_oipl_id,1064);
10402: -- hr_utility.set_location('l_oipl_rec.opt_id='||l_oipl_rec.opt_id,1064);
10403: -- hr_utility.set_location('l_plan_rec.pl_typ_id='||l_plan_rec.pl_typ_id,1064);
10404: -- hr_utility.set_location('p_business_group_id='||p_business_group_id,1064);
10405: -- hr_utility.set_location('l_new_elctbl_flag='||l_new_elctbl_flag,1064);
10406: -- hr_utility.set_location('l_rec_assignment_id='||l_rec_assignment_id,1064);
10407: -- hr_utility.set_location('l_previous_eligibility='||l_previous_eligibility,1064);
10408: if g_debug then
10409: hr_utility.set_location(' Dn Det 1: ' || l_proc, 10);
10402: -- hr_utility.set_location('l_oipl_rec.opt_id='||l_oipl_rec.opt_id,1064);
10403: -- hr_utility.set_location('l_plan_rec.pl_typ_id='||l_plan_rec.pl_typ_id,1064);
10404: -- hr_utility.set_location('p_business_group_id='||p_business_group_id,1064);
10405: -- hr_utility.set_location('l_new_elctbl_flag='||l_new_elctbl_flag,1064);
10406: -- hr_utility.set_location('l_rec_assignment_id='||l_rec_assignment_id,1064);
10407: -- hr_utility.set_location('l_previous_eligibility='||l_previous_eligibility,1064);
10408: if g_debug then
10409: hr_utility.set_location(' Dn Det 1: ' || l_proc, 10);
10410: end if;
10403: -- hr_utility.set_location('l_plan_rec.pl_typ_id='||l_plan_rec.pl_typ_id,1064);
10404: -- hr_utility.set_location('p_business_group_id='||p_business_group_id,1064);
10405: -- hr_utility.set_location('l_new_elctbl_flag='||l_new_elctbl_flag,1064);
10406: -- hr_utility.set_location('l_rec_assignment_id='||l_rec_assignment_id,1064);
10407: -- hr_utility.set_location('l_previous_eligibility='||l_previous_eligibility,1064);
10408: if g_debug then
10409: hr_utility.set_location(' Dn Det 1: ' || l_proc, 10);
10410: end if;
10411: -- Bug 2677804
10405: -- hr_utility.set_location('l_new_elctbl_flag='||l_new_elctbl_flag,1064);
10406: -- hr_utility.set_location('l_rec_assignment_id='||l_rec_assignment_id,1064);
10407: -- hr_utility.set_location('l_previous_eligibility='||l_previous_eligibility,1064);
10408: if g_debug then
10409: hr_utility.set_location(' Dn Det 1: ' || l_proc, 10);
10410: end if;
10411: -- Bug 2677804
10412: if l_enrt_ovridn_flag = 'Y' then
10413: --
10411: -- Bug 2677804
10412: if l_enrt_ovridn_flag = 'Y' then
10413: --
10414: if g_debug then
10415: hr_utility.set_location(' Electable Due to Override ' ,123);
10416: end if;
10417: l_new_elctbl_flag := 'Y' ;
10418: --
10419: else
10425: ben_determine_dpnt_eligibility.g_egd_table :=
10426: ben_determine_dpnt_eligibility.g_egd_table_temp;
10427: OPEN c_elig_dpnt (l_epe_id);
10428: if g_debug then
10429: hr_utility.set_location('SS Populating g_egd_table',9909);
10430: end if;
10431: LOOP
10432: FETCH c_elig_dpnt INTO l_elig_dpnt;
10433: EXIT WHEN c_elig_dpnt%NOTFOUND;
10471: );
10472: end if ;
10473: --
10474: if g_debug then
10475: hr_utility.set_location(' Dn Det Enr 1: ' || l_proc, 10);
10476: end if;
10477: IF l_new_elctbl_flag = 'Y' THEN
10478: --
10479: -- continue
10493: p_business_group_id => p_business_group_id,
10494: p_ler_id => p_ler_id,
10495: p_effective_date => p_effective_date);
10496: if g_debug then
10497: hr_utility.set_location(' BNI_MN 1: ' || l_proc, 10);
10498: end if;
10499: l_new_elctbl_flag := 'N';
10500: end if;
10501: else
10501: else
10502: l_new_elctbl_flag:='N';
10503: end if;
10504: if g_debug then
10505: hr_utility.set_location(' Bef dflt flag chk: ' || l_proc, 10);
10506: end if;
10507: -- hr_utility.set_location('l_new_elctbl_flag='||l_new_elctbl_flag,1064);
10508: --
10509: -- update the choice if it needs it.
10503: end if;
10504: if g_debug then
10505: hr_utility.set_location(' Bef dflt flag chk: ' || l_proc, 10);
10506: end if;
10507: -- hr_utility.set_location('l_new_elctbl_flag='||l_new_elctbl_flag,1064);
10508: --
10509: -- update the choice if it needs it.
10510: --
10511: if g_debug then
10508: --
10509: -- update the choice if it needs it.
10510: --
10511: if g_debug then
10512: hr_utility.set_location('Dflt flag is '|| l_epe_dflt_flag,2121);
10513: hr_utility.set_location('l_dflt_flag is '||l_dflt_flag,2121);
10514: end if;
10515: if l_dflt_flag<> l_epe_dflt_flag or
10516: l_new_elctbl_flag <> l_ELCTBL_FLAG then
10509: -- update the choice if it needs it.
10510: --
10511: if g_debug then
10512: hr_utility.set_location('Dflt flag is '|| l_epe_dflt_flag,2121);
10513: hr_utility.set_location('l_dflt_flag is '||l_dflt_flag,2121);
10514: end if;
10515: if l_dflt_flag<> l_epe_dflt_flag or
10516: l_new_elctbl_flag <> l_ELCTBL_FLAG then
10517: -- hr_utility.set_location('Dflt flag changed to '||l_dflt_flag,2121);
10513: hr_utility.set_location('l_dflt_flag is '||l_dflt_flag,2121);
10514: end if;
10515: if l_dflt_flag<> l_epe_dflt_flag or
10516: l_new_elctbl_flag <> l_ELCTBL_FLAG then
10517: -- hr_utility.set_location('Dflt flag changed to '||l_dflt_flag,2121);
10518: -- hr_utility.set_location('Elct flag changed to '||l_new_elctbl_flag,2121);
10519: -- hr_utility.set_location('l_pl_id='||l_pl_id,2121);
10520: -- hr_utility.set_location('l_oipl_id='||l_oipl_id,2121);
10521: IF p_ler_id IS NOT NULL and
10514: end if;
10515: if l_dflt_flag<> l_epe_dflt_flag or
10516: l_new_elctbl_flag <> l_ELCTBL_FLAG then
10517: -- hr_utility.set_location('Dflt flag changed to '||l_dflt_flag,2121);
10518: -- hr_utility.set_location('Elct flag changed to '||l_new_elctbl_flag,2121);
10519: -- hr_utility.set_location('l_pl_id='||l_pl_id,2121);
10520: -- hr_utility.set_location('l_oipl_id='||l_oipl_id,2121);
10521: IF p_ler_id IS NOT NULL and
10522: l_new_elctbl_flag = 'Y' and
10515: if l_dflt_flag<> l_epe_dflt_flag or
10516: l_new_elctbl_flag <> l_ELCTBL_FLAG then
10517: -- hr_utility.set_location('Dflt flag changed to '||l_dflt_flag,2121);
10518: -- hr_utility.set_location('Elct flag changed to '||l_new_elctbl_flag,2121);
10519: -- hr_utility.set_location('l_pl_id='||l_pl_id,2121);
10520: -- hr_utility.set_location('l_oipl_id='||l_oipl_id,2121);
10521: IF p_ler_id IS NOT NULL and
10522: l_new_elctbl_flag = 'Y' and
10523: l_ELCTBL_FLAG = 'N' THEN
10516: l_new_elctbl_flag <> l_ELCTBL_FLAG then
10517: -- hr_utility.set_location('Dflt flag changed to '||l_dflt_flag,2121);
10518: -- hr_utility.set_location('Elct flag changed to '||l_new_elctbl_flag,2121);
10519: -- hr_utility.set_location('l_pl_id='||l_pl_id,2121);
10520: -- hr_utility.set_location('l_oipl_id='||l_oipl_id,2121);
10521: IF p_ler_id IS NOT NULL and
10522: l_new_elctbl_flag = 'Y' and
10523: l_ELCTBL_FLAG = 'N' THEN
10524: g_electable_choice_created := TRUE;
10523: l_ELCTBL_FLAG = 'N' THEN
10524: g_electable_choice_created := TRUE;
10525: END IF;
10526: if g_debug then
10527: hr_utility.set_location(' BEPECA_UEPEC 1: ' || l_proc, 10);
10528: end if;
10529: ben_elig_per_elc_chc_api.update_perf_elig_per_elc_chc
10530: (p_elig_per_elctbl_chc_id => l_epe_id,
10531: p_dflt_flag => l_dflt_flag,
10537: p_request_id => fnd_global.conc_request_id,
10538: p_program_update_date => sysdate
10539: );
10540: if g_debug then
10541: hr_utility.set_location(' Dn BEPECA_UEPEC 1: ' || l_proc, 10);
10542: end if;
10543: --
10544: --bug#3726552 - update the default flag on benefit row
10545: l_enrt_bnft.enrt_bnft_id := null;
10556: end if;
10557: --
10558: end if;
10559: if g_debug then
10560: hr_utility.set_location(l_proc||' End c_choices loop: ',10);
10561: end if;
10562: end loop;
10563: --
10564: end if;
10562: end loop;
10563: --
10564: end if;
10565: if g_debug then
10566: hr_utility.set_location('Leaving: '||l_proc,10);
10567: end if;
10568: END update_defaults;
10569: -- end of package, below
10570: END ben_enrolment_requirements;