58: */
59: --
60: --Globals
61: --
62: g_debug boolean := hr_utility.debug_enabled;
63: --
64: cursor c_pil(p_ler_id number,
65: p_life_event_date date,
66: p_person_id number) is
175: IF c_pil%NOTFOUND THEN
176: --
177: CLOSE c_pil;
178: if g_debug then
179: hr_utility.set_location('BEN_94534_PIL_NOT_FOUND'|| to_char(p_person_id),54);
180: end if;
181: fnd_message.set_name('BEN','BEN_94534_PIL_NOT_FOUND');
182: fnd_message.set_token('PROC',l_proc);
183: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
217: FETCH c_epe_oipl INTO l_epe;
218: IF c_epe_oipl%NOTFOUND THEN
219: CLOSE c_epe_oipl ;
220: if g_debug then
221: hr_utility.set_location('BEN_94612_NO_EPE_EU'|| to_char(p_person_id),54);
222: end if;
223: fnd_message.set_name('BEN','BEN_94612_NO_EPE_EU');
224: fnd_message.set_token('PROC',l_proc);
225: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
242: FETCH c_epe_pl INTO l_epe;
243: IF c_epe_pl%NOTFOUND THEN
244: CLOSE c_epe_pl ;
245: if g_debug then
246: hr_utility.set_location('BEN_94612_NO_EPE_EU'|| to_char(p_person_id),54);
247: end if;
248: fnd_message.set_name('BEN','BEN_94612_NO_EPE_EU');
249: fnd_message.set_token('PROC',l_proc);
250: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
287: --
288: IF c_egd%NOTFOUND THEN
289: CLOSE c_egd ;
290: if g_debug then
291: hr_utility.set_location('BEN_94616_DPNT_WRONG',54);
292: end if;
293: fnd_message.set_name('BEN','BEN_94616_DPNT_WRONG');
294: fnd_message.set_token('PROC',l_proc);
295: fnd_message.raise_error;
325: fetch c_pen into l_dummy;
326: IF c_pen%NOTFOUND THEN
327: CLOSE c_pen ;
328: if g_debug then
329: hr_utility.set_location('BEN_94617_DPNT_NO_PEN',54);
330: end if;
331: fnd_message.set_name('BEN','BEN_94617_DPNT_NO_PEN');
332: fnd_message.set_token('PROC',l_proc);
333: fnd_message.raise_error;
337: close c_pen ;
338: ELSE
339: --
340: if g_debug then
341: hr_utility.set_location('BEN_94617_DPNT_NO_PEN',54);
342: end if;
343: fnd_message.set_name('BEN','BEN_94617_DPNT_NO_PEN');
344: fnd_message.set_token('PROC',l_proc);
345: fnd_message.raise_error;
363: --
364: IF p_organization_id IS NULL AND p_bnf_person_id IS NULL THEN
365: --
366: if g_debug then
367: hr_utility.set_location('BEN_94617_NO_BNF_PERSON',54);
368: end if;
369: fnd_message.set_name('BEN','BEN_94617_NO_BNF_PERSON');
370: fnd_message.set_token('PROC',l_proc);
371: fnd_message.raise_error;
788: l_pl_opt_name varchar2(600) := null;
789: --
790: begin
791: --
792: hr_utility.set_location('Entering:'||l_proc, 20);
793: --
794: fnd_file.put_line
795: (which => fnd_file.log,
796: buff => 'Entering - BEN_ENROLLMENT_PROCESS.ENROLLMENT_INFORMATION_DETAIL' );
860: l_epe.enrt_cvg_strt_dt := p_enrt_cvg_strt_dt ;
861: ELSE
862: --Throw Error.. Coverage start date needs to be entered
863: if g_debug then
864: hr_utility.set_location('BEN_94552_NO_CVG_STRT_DT'|| to_char(p_person_id),54);
865: end if;
866: fnd_message.set_name('BEN','BEN_94552_NO_CVG_STRT_DT');
867: fnd_message.set_token('PACKAGE',l_proc);
868: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
876: --
877: ELSE
878: --
879: if g_debug then
880: hr_utility.set_location('No Coverage Start date is required '||p_enrt_cvg_strt_dt ,54);
881: end if;
882: --
883: END IF;
884: --
897: FETCH c_enb_with_amt INTO l_enb;
898: IF c_enb_with_amt%NOTFOUND THEN
899: CLOSE c_enb_with_amt ;
900: if g_debug then
901: hr_utility.set_location('BEN_91561_BENVRBRT_ENB_NF'|| to_char(p_person_id),54);
902: end if;
903: fnd_message.set_name('BEN','BEN_91561_BENVRBRT_ENB_NF');
904: fnd_message.set_token('PACKAGE',l_proc);
905: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
922: ELSE
923: --
924: CLOSE c_enb_with_amt ;
925: if g_debug then
926: hr_utility.set_location('BEN_94558_INVALID_BNFT_VAL'|| to_char(p_person_id),54);
927: end if;
928: fnd_message.set_name('BEN','BEN_91561_BENVRBRT_ENB_NF');
929: fnd_message.set_token('PROC',l_proc);
930: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
989: IF ((l_enb.entr_val_at_enrt_flag = 'Y' or l_enb.cvg_mlt_cd like '%RNG') and
990: p_bnft_val IS NULL) THEN
991: --
992: if g_debug then
993: hr_utility.set_location('BEN_94559_NO_BNFT_VAL'|| to_char(p_person_id),54);
994: end if;
995: CLOSE c_enb ;
996: fnd_message.set_name('BEN','BEN_94559_NO_BNFT_VAL');
997: fnd_message.set_token('PROC',l_proc);
1043: --
1044: ELSE
1045: --
1046: if g_debug then
1047: hr_utility.set_location('APP_94555_NO_RATE_VAL'|| to_char(p_person_id),54);
1048: end if;
1049: fnd_message.set_name('BEN','APP_94555_NO_RATE_VAL');
1050: fnd_message.set_token('PROC',l_proc);
1051: fnd_message.set_token('PERSON_ID', to_char(p_person_id));
1071: FETCH c_ecr_enb INTO l_ecr1; -- l_enrt_rt_id1;
1072: IF c_ecr_enb%NOTFOUND THEN
1073: CLOSE c_ecr_enb ;
1074: if g_debug then
1075: hr_utility.set_location('BEN_94535_ECR_NOT_FOUND'|| to_char(p_person_id),54);
1076: end if;
1077: fnd_message.set_name('BEN','BEN_94535_ECR_NOT_FOUND');
1078: fnd_message.set_token('PROC',l_proc);
1079: fnd_message.set_token('PERSON_ID', to_char(p_person_id));
1091: --
1092: ELSE
1093: --Throw Error
1094: if g_debug then
1095: hr_utility.set_location('BEN_94552_NO_RT_STRT_DT'|| to_char(p_person_id),54);
1096: end if;
1097: CLOSE c_ecr_enb;
1098: fnd_message.set_name('BEN','BEN_94552_NO_RT_STRT_DT');
1099: fnd_message.set_token('PACKAGE',l_proc);
1114: l_ecr1.ann_val := p_ann_rt_val1;
1115: ELSE
1116: --Throw error- rates need to be entered
1117: if g_debug then
1118: hr_utility.set_location('BEN_94555_NO_RATE_VAL'|| to_char(p_person_id),54);
1119: end if;
1120: CLOSE c_ecr_enb;
1121: fnd_message.set_name('BEN','BEN_94555_NO_RATE_VAL');
1122: fnd_message.set_token('PACKAGE',l_proc);
1142: FETCH c_ecr INTO l_ecr1; -- l_enrt_rt_id1;
1143: IF c_ecr%NOTFOUND THEN
1144: CLOSE c_ecr ;
1145: if g_debug then
1146: hr_utility.set_location('BEN_94535_ECR_NOT_FOUND'|| to_char(p_person_id),54);
1147: end if;
1148: fnd_message.set_name('BEN','BEN_94535_ECR_NOT_FOUND');
1149: fnd_message.set_token('PROC',l_proc);
1150: fnd_message.set_token('PERSON_ID', to_char(p_person_id));
1162: --
1163: ELSE
1164: --Throw Error
1165: if g_debug then
1166: hr_utility.set_location('BEN_94552_NO_RT_STRT_DT'|| to_char(p_person_id),54);
1167: end if;
1168: CLOSE c_ecr;
1169: fnd_message.set_name('BEN','BEN_94552_NO_RT_STRT_DT');
1170: fnd_message.set_token('PACKAGE',l_proc);
1185: l_ecr1.ann_val := p_ann_rt_val1;
1186: ELSE
1187: --Throw error- rates need to be entered
1188: if g_debug then
1189: hr_utility.set_location('BEN_94555_NO_RATE_VAL'|| to_char(p_person_id),54);
1190: end if;
1191: CLOSE c_ecr;
1192: fnd_message.set_name('BEN','BEN_94555_NO_RATE_VAL');
1193: fnd_message.set_token('PACKAGE',l_proc);
1221: FETCH c_ecr_enb INTO l_ecr2; -- l_enrt_rt_id2;
1222: IF c_ecr_enb%NOTFOUND THEN
1223: CLOSE c_ecr_enb ;
1224: if g_debug then
1225: hr_utility.set_location('BEN_94535_ECR_NOT_FOUND'|| to_char(p_person_id),54);
1226: end if;
1227: fnd_message.set_name('BEN','BEN_94535_ECR_NOT_FOUND');
1228: fnd_message.set_token('PROC',l_proc);
1229: fnd_message.set_token('PERSON_ID', to_char(p_person_id));
1241: --
1242: ELSE
1243: --Throw Error
1244: if g_debug then
1245: hr_utility.set_location('BEN_94552_NO_RT_STRT_DT'|| to_char(p_person_id),54);
1246: end if;
1247: CLOSE c_ecr_enb;
1248: fnd_message.set_name('BEN','BEN_94552_NO_RT_STRT_DT');
1249: fnd_message.set_token('PACKAGE',l_proc);
1264: l_ecr2.ann_val := p_ann_rt_val2;
1265: ELSE
1266: --Throw error- rates need to be entered
1267: if g_debug then
1268: hr_utility.set_location('BEN_94555_NO_RATE_VAL'|| to_char(p_person_id),54);
1269: end if;
1270: CLOSE c_ecr_enb;
1271: fnd_message.set_name('BEN','BEN_94555_NO_RATE_VAL');
1272: fnd_message.set_token('PACKAGE',l_proc);
1292: FETCH c_ecr INTO l_ecr2; -- l_enrt_rt_id2;
1293: IF c_ecr%NOTFOUND THEN
1294: CLOSE c_ecr ;
1295: if g_debug then
1296: hr_utility.set_location('BEN_94535_ECR_NOT_FOUND'|| to_char(p_person_id),54);
1297: end if;
1298: fnd_message.set_name('BEN','BEN_94535_ECR_NOT_FOUND');
1299: fnd_message.set_token('PROC',l_proc);
1300: fnd_message.set_token('PERSON_ID', to_char(p_person_id));
1312: --
1313: ELSE
1314: --Throw Error
1315: if g_debug then
1316: hr_utility.set_location('BEN_94552_NO_RT_STRT_DT'|| to_char(p_person_id),54);
1317: end if;
1318: CLOSE c_ecr;
1319: fnd_message.set_name('BEN','BEN_94552_NO_RT_STRT_DT');
1320: fnd_message.set_token('PACKAGE',l_proc);
1335: l_ecr2.ann_val := p_ann_rt_val2;
1336: ELSE
1337: --Throw error- rates need to be entered
1338: if g_debug then
1339: hr_utility.set_location('BEN_94555_NO_RATE_VAL'|| to_char(p_person_id),54);
1340: end if;
1341: CLOSE c_ecr;
1342: fnd_message.set_name('BEN','BEN_94555_NO_RATE_VAL');
1343: fnd_message.set_token('PACKAGE',l_proc);
1371: FETCH c_ecr_enb INTO l_ecr3; -- l_enrt_rt_id3;
1372: IF c_ecr_enb%NOTFOUND THEN
1373: CLOSE c_ecr_enb ;
1374: if g_debug then
1375: hr_utility.set_location('BEN_94535_ECR_NOT_FOUND'|| to_char(p_person_id),54);
1376: end if;
1377: fnd_message.set_name('BEN','BEN_94535_ECR_NOT_FOUND');
1378: fnd_message.set_token('PROC',l_proc);
1379: fnd_message.set_token('PERSON_ID', to_char(p_person_id));
1391: --
1392: ELSE
1393: --Throw Error
1394: if g_debug then
1395: hr_utility.set_location('BEN_94552_NO_RT_STRT_DT'|| to_char(p_person_id),54);
1396: end if;
1397: CLOSE c_ecr_enb;
1398: fnd_message.set_name('BEN','BEN_94552_NO_RT_STRT_DT');
1399: fnd_message.set_token('PACKAGE',l_proc);
1414: l_ecr3.ann_val := p_ann_rt_val3;
1415: ELSE
1416: --Throw error- rates need to be entered
1417: if g_debug then
1418: hr_utility.set_location('BEN_94555_NO_RATE_VAL'|| to_char(p_person_id),54);
1419: end if;
1420: CLOSE c_ecr_enb;
1421: fnd_message.set_name('BEN','BEN_94555_NO_RATE_VAL');
1422: fnd_message.set_token('PACKAGE',l_proc);
1442: FETCH c_ecr INTO l_ecr3; -- l_enrt_rt_id3;
1443: IF c_ecr%NOTFOUND THEN
1444: CLOSE c_ecr ;
1445: if g_debug then
1446: hr_utility.set_location('BEN_94535_ECR_NOT_FOUND'|| to_char(p_person_id),54);
1447: end if;
1448: fnd_message.set_name('BEN','BEN_94535_ECR_NOT_FOUND');
1449: fnd_message.set_token('PROC',l_proc);
1450: fnd_message.set_token('PERSON_ID', to_char(p_person_id));
1462: --
1463: ELSE
1464: --Throw Error
1465: if g_debug then
1466: hr_utility.set_location('BEN_94552_NO_RT_STRT_DT'|| to_char(p_person_id),54);
1467: end if;
1468: CLOSE c_ecr;
1469: fnd_message.set_name('BEN','BEN_94552_NO_RT_STRT_DT');
1470: fnd_message.set_token('PACKAGE',l_proc);
1485: l_ecr3.ann_val := p_ann_rt_val3;
1486: ELSE
1487: --Throw error- rates need to be entered
1488: if g_debug then
1489: hr_utility.set_location('BEN_94555_NO_RATE_VAL'|| to_char(p_person_id),54);
1490: end if;
1491: CLOSE c_ecr;
1492: fnd_message.set_name('BEN','BEN_94555_NO_RATE_VAL');
1493: fnd_message.set_token('PACKAGE',l_proc);
1521: FETCH c_ecr_enb INTO l_ecr4; -- l_enrt_rt_id4;
1522: IF c_ecr_enb%NOTFOUND THEN
1523: CLOSE c_ecr_enb ;
1524: if g_debug then
1525: hr_utility.set_location('BEN_94535_ECR_NOT_FOUND'|| to_char(p_person_id),54);
1526: end if;
1527: fnd_message.set_name('BEN','BEN_94535_ECR_NOT_FOUND');
1528: fnd_message.set_token('PROC',l_proc);
1529: fnd_message.set_token('PERSON_ID', to_char(p_person_id));
1541: --
1542: ELSE
1543: --Throw Error
1544: if g_debug then
1545: hr_utility.set_location('BEN_94552_NO_RT_STRT_DT'|| to_char(p_person_id),54);
1546: end if;
1547: CLOSE c_ecr_enb;
1548: fnd_message.set_name('BEN','BEN_94552_NO_RT_STRT_DT');
1549: fnd_message.set_token('PACKAGE',l_proc);
1564: l_ecr4.ann_val := p_ann_rt_val4;
1565: ELSE
1566: --Throw error- rates need to be entered
1567: if g_debug then
1568: hr_utility.set_location('BEN_94555_NO_RATE_VAL'|| to_char(p_person_id),54);
1569: end if;
1570: CLOSE c_ecr_enb;
1571: fnd_message.set_name('BEN','BEN_94555_NO_RATE_VAL');
1572: fnd_message.set_token('PACKAGE',l_proc);
1592: FETCH c_ecr INTO l_ecr4; -- l_enrt_rt_id4;
1593: IF c_ecr%NOTFOUND THEN
1594: CLOSE c_ecr ;
1595: if g_debug then
1596: hr_utility.set_location('BEN_94535_ECR_NOT_FOUND'|| to_char(p_person_id),54);
1597: end if;
1598: fnd_message.set_name('BEN','BEN_94535_ECR_NOT_FOUND');
1599: fnd_message.set_token('PROC',l_proc);
1600: fnd_message.set_token('PERSON_ID', to_char(p_person_id));
1612: --
1613: ELSE
1614: --Throw Error
1615: if g_debug then
1616: hr_utility.set_location('BEN_94552_NO_RT_STRT_DT'|| to_char(p_person_id),54);
1617: end if;
1618: CLOSE c_ecr;
1619: fnd_message.set_name('BEN','BEN_94552_NO_RT_STRT_DT');
1620: fnd_message.set_token('PACKAGE',l_proc);
1635: l_ecr4.ann_val := p_ann_rt_val4;
1636: ELSE
1637: --Throw error- rates need to be entered
1638: if g_debug then
1639: hr_utility.set_location('BEN_94555_NO_RATE_VAL'|| to_char(p_person_id),54);
1640: end if;
1641: CLOSE c_ecr;
1642: fnd_message.set_name('BEN','BEN_94555_NO_RATE_VAL');
1643: fnd_message.set_token('PACKAGE',l_proc);
1811: ,p_mode => null); --?
1812: --
1813: end if; --End of if(l_enroll_flag)
1814: --
1815: hr_utility.set_location('Leaving:'||l_proc, 20);
1816: --
1817: exception when others then
1818: raise ;
1819: end enrollment_information_detail;
1856: l_flx_cr_flag VARCHAR2(30) := 'N';
1857: --
1858: begin
1859: --
1860: hr_utility.set_location('Entering:'||l_proc, 20);
1861: --
1862: IF p_pgm_id IS NOT NULL THEN
1863: OPEN c_pgm ;
1864: FETCH c_pgm INTO l_pgm_typ_cd ;
1878: IF c_pil%NOTFOUND THEN
1879: CLOSE c_pil ;
1880: --
1881: if g_debug then
1882: hr_utility.set_location('BEN_94534_PIL_NOT_FOUND'|| to_char(p_person_id),54);
1883: end if;
1884: fnd_message.set_name('BEN','BEN_94534_PIL_NOT_FOUND');
1885: fnd_message.set_token('PROC',l_proc);
1886: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
1931: ,p_proc_cd => p_proc_cd
1932: ,p_business_group_id => p_business_group_id
1933: ,p_effective_date => p_effective_date);
1934: --
1935: hr_utility.set_location('Leaving:'||l_proc, 20);
1936: --
1937: exception when others then
1938: raise ;
1939: end post_enrollment ;
1981: l_proc varchar2(60) := 'ben_enrollment_process.create_enrollment' ;
1982: --
1983: begin
1984: --
1985: hr_utility.set_location('Entering:'||l_proc||':'||p_record_typ_cd, 20);
1986: --Bug 5259118
1987: -- IF fnd_global.conc_request_id = -1 THEN
1988: --
1989: ben_env_object.init(p_business_group_id => p_business_group_id,
2093: --
2094: ELSE
2095: --
2096: if g_debug then
2097: hr_utility.set_location('BEN_94536_RECORD_TYPE_ERROR'|| to_char(p_person_id),54);
2098: end if;
2099: fnd_message.set_name('BEN','BEN_94536_RECORD_TYPE_ERROR');
2100: fnd_message.set_token('PROC',l_proc);
2101: fnd_message.set_token('PERSON_ID',p_record_typ_cd);
2152:
2153: --
2154: begin
2155: --
2156: hr_utility.set_location('Entering:'||l_proc, 20);
2157: --
2158: --Bug 5259118
2159: -- IF fnd_global.conc_request_id = -1 THEN
2160: --
2342: */
2343: /* Added for Bug 10209116: Coverage start and end dates should be taken
2344: from the worksheet used for uploading the Dependent elections if the date values are not NULL*/
2345: if(l_cvg_strt_dt is NOT NULL and l_cvg_thru_dt is not NULL) then
2346: hr_utility.set_location('Condition 1', 20);
2347: l_cvg_strt_dt_dummy := l_cvg_strt_dt;
2348: l_cvg_end_dt_dummy := l_cvg_thru_dt;
2349: elsif(l_cvg_strt_dt is NOT NULL and l_cvg_thru_dt is NULL) then
2350: hr_utility.set_location('Condition 2', 20);
2346: hr_utility.set_location('Condition 1', 20);
2347: l_cvg_strt_dt_dummy := l_cvg_strt_dt;
2348: l_cvg_end_dt_dummy := l_cvg_thru_dt;
2349: elsif(l_cvg_strt_dt is NOT NULL and l_cvg_thru_dt is NULL) then
2350: hr_utility.set_location('Condition 2', 20);
2351: l_cvg_strt_dt_dummy := l_cvg_strt_dt;
2352: l_cvg_end_dt_dummy := NULL;
2353: elsif(l_cvg_strt_dt is NULL and l_cvg_thru_dt is not NULL) then
2354: hr_utility.set_location('Condition 3', 20);
2350: hr_utility.set_location('Condition 2', 20);
2351: l_cvg_strt_dt_dummy := l_cvg_strt_dt;
2352: l_cvg_end_dt_dummy := NULL;
2353: elsif(l_cvg_strt_dt is NULL and l_cvg_thru_dt is not NULL) then
2354: hr_utility.set_location('Condition 3', 20);
2355: l_cvg_strt_dt_dummy := l_returned_strt_dt;
2356: l_cvg_end_dt_dummy := l_cvg_thru_dt;
2357: elsif(l_cvg_strt_dt is NULL and l_cvg_thru_dt is NULL) then
2358: hr_utility.set_location('Condition 4', 20);
2354: hr_utility.set_location('Condition 3', 20);
2355: l_cvg_strt_dt_dummy := l_returned_strt_dt;
2356: l_cvg_end_dt_dummy := l_cvg_thru_dt;
2357: elsif(l_cvg_strt_dt is NULL and l_cvg_thru_dt is NULL) then
2358: hr_utility.set_location('Condition 4', 20);
2359: l_cvg_strt_dt_dummy := l_returned_strt_dt;
2360: l_cvg_end_dt_dummy := NULL;
2361: else
2362: NULL;
2458: --
2459: ELSE
2460: --Throw Error invalid record type
2461: if g_debug then
2462: hr_utility.set_location('BEN_94536_RECORD_TYPE_ERROR'|| to_char(p_person_id),54);
2463: end if;
2464: fnd_message.set_name('BEN','BEN_94536_RECORD_TYPE_ERROR');
2465: fnd_message.set_token('PROC',l_proc);
2466: fnd_message.set_token('PERSON_ID',l_record_typ_cd);
2470: --
2471: END IF;
2472: ELSE
2473: if g_debug then
2474: hr_utility.set_location('BEN_94534_PIL_NOT_FOUND'|| to_char(p_person_id),54);
2475: end if;
2476: fnd_message.set_name('BEN','BEN_94534_PIL_NOT_FOUND');
2477: fnd_message.set_token('PROC',l_proc);
2478: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
2555: and p_effective_date
2556: between effective_start_date and effective_end_date;
2557: --
2558: begin
2559: hr_utility.set_location('Entering:'||l_proc, 20);
2560: --
2561: --Bug 5259118
2562: -- IF fnd_global.conc_request_id = -1 THEN
2563: --
2678: --
2679: IF l_pil.per_in_ler_id IS NULL THEN
2680: --
2681: if g_debug then
2682: hr_utility.set_location('BEN_94534_PIL_NOT_FOUND'|| to_char(p_person_id),54);
2683: end if;
2684: fnd_message.set_name('BEN','BEN_94534_PIL_NOT_FOUND');
2685: fnd_message.set_token('PROC',l_proc);
2686: fnd_message.set_token('PERSON_ID',to_char(p_person_id));