152: and ((pen.pgm_id is null and c_pgm_id is null) or
153: pen.pgm_id = c_pgm_id )
154: and ( c_pl_id is null or
155: pen.pl_id = c_pl_id )
156: and (pen.effective_end_date = hr_api.g_eot or
157: pen.effective_end_date = (select max(effective_end_date)
158: from ben_prtt_enrt_rslt_f
159: where prtt_enrt_rslt_id =
160: pen.prtt_enrt_rslt_id))
158: from ben_prtt_enrt_rslt_f
159: where prtt_enrt_rslt_id =
160: pen.prtt_enrt_rslt_id))
161: and (pen.enrt_cvg_thru_dt is null or
162: pen.enrt_cvg_thru_dt = hr_api.g_eot
163: )
164: and pen.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
165: and pen.prtt_enrt_rslt_id not in (
166: select nvl(pen_inner.RPLCS_SSPNDD_RSLT_ID, -1)
169: where pil_inner.per_in_ler_id = c_bckdt_per_in_ler_id
170: and pil_inner.person_id = c_person_id
171: and pil_inner.per_in_ler_id = pen_inner.per_in_ler_id
172: and (pen_inner.enrt_cvg_thru_dt is null or
173: pen_inner.enrt_cvg_thru_dt = hr_api.g_eot
174: )
175: and pen_inner.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
176: union
177: select nvl(pen_inner.RPLCS_SSPNDD_RSLT_ID, -1)
181: and pil_inner.person_id = c_person_id
182: AND pil_inner.per_in_ler_id = pen_inner.per_in_ler_id
183: and pen_inner.bkup_tbl_typ_cd = 'BEN_PRTT_ENRT_RSLT_F'
184: and (pen_inner.enrt_cvg_thru_dt is null or
185: pen_inner.enrt_cvg_thru_dt = hr_api.g_eot
186: )
187: and pen_inner.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
188: )
189: union
284: pen.pgm_id = c_pgm_id )
285: and ( c_pl_id is null or
286: pen.pl_id = c_pl_id )
287: and ((pen.enrt_cvg_thru_dt is null or
288: pen.enrt_cvg_thru_dt = hr_api.g_eot) and
289: pen.effective_end_date = hr_api.g_eot
290: )
291: and pen.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
292: and pen.bkup_tbl_id not in (
285: and ( c_pl_id is null or
286: pen.pl_id = c_pl_id )
287: and ((pen.enrt_cvg_thru_dt is null or
288: pen.enrt_cvg_thru_dt = hr_api.g_eot) and
289: pen.effective_end_date = hr_api.g_eot
290: )
291: and pen.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
292: and pen.bkup_tbl_id not in (
293: select nvl(pen_inner.RPLCS_SSPNDD_RSLT_ID, -1)
296: where pil_inner.per_in_ler_id = c_bckdt_per_in_ler_id
297: and pil_inner.person_id = c_person_id
298: and pil_inner.per_in_ler_id = pen_inner.per_in_ler_id
299: and (pen_inner.enrt_cvg_thru_dt is null or
300: pen_inner.enrt_cvg_thru_dt = hr_api.g_eot
301: )
302: and pen_inner.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
303: union
304: select nvl(pen_inner.RPLCS_SSPNDD_RSLT_ID, -1)
308: and pil_inner.person_id = c_person_id
309: AND pil_inner.per_in_ler_id = pen_inner.per_in_ler_id
310: and pen_inner.bkup_tbl_typ_cd = 'BEN_PRTT_ENRT_RSLT_F'
311: and (pen_inner.enrt_cvg_thru_dt is null or
312: pen_inner.enrt_cvg_thru_dt = hr_api.g_eot
313: )
314: and pen_inner.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
315: )
316: order by 1;
635: and pil.person_id = p_person_id
636: and pil.business_group_id = p_business_group_id
637: AND pil.per_in_ler_id = pen.per_in_ler_id
638: and pen.prtt_enrt_rslt_stat_cd is null
639: and pen.enrt_cvg_thru_dt = hr_api.g_eot
640: and pen.comp_lvl_cd not in ('PLANFC', 'PLANIMP') ;
641: --
642: TYPE l_prev_pen_rec is TABLE OF c_pen_dat%rowtype INDEX BY BINARY_INTEGER;
643: --
847: ben_ler_f ler
848: where pen.per_in_ler_id <> p_bckdt_per_in_ler_id
849: and pen.person_id = p_person_id
850: and pen.prtt_enrt_rslt_stat_cd is null
851: -- and pen.enrt_cvg_thru_dt = hr_api.g_eot BUG 4642657
852: and pen.effective_end_date = hr_api.g_eot
853: and pen.ler_id = ler.ler_id
854: and p_effective_date between ler.effective_start_date and
855: ler.effective_end_date
848: where pen.per_in_ler_id <> p_bckdt_per_in_ler_id
849: and pen.person_id = p_person_id
850: and pen.prtt_enrt_rslt_stat_cd is null
851: -- and pen.enrt_cvg_thru_dt = hr_api.g_eot BUG 4642657
852: and pen.effective_end_date = hr_api.g_eot
853: and pen.ler_id = ler.ler_id
854: and p_effective_date between ler.effective_start_date and
855: ler.effective_end_date
856: and ler.typ_cd not in ('IREC','SCHEDDU', 'COMP', 'GSP', 'ABS')
1124: if nvl(bckdt_epe_egd_rec.DPNT_INELIG_FLAG, '$') =
1125: nvl(l_curr_epe_egd_table(l_curr_count).DPNT_INELIG_FLAG, '$') and
1126: nvl(bckdt_epe_egd_rec.INELG_RSN_CD, '$') =
1127: nvl(l_curr_epe_egd_table(l_curr_count).INELG_RSN_CD, '$') and
1128: nvl(bckdt_epe_egd_rec.ELIG_STRT_DT, hr_api.g_eot) =
1129: nvl(l_curr_epe_egd_table(l_curr_count).ELIG_STRT_DT, hr_api.g_eot) and
1130: nvl(bckdt_epe_egd_rec.ELIG_THRU_DT, hr_api.g_eot) =
1131: nvl(l_curr_epe_egd_table(l_curr_count).ELIG_THRU_DT, hr_api.g_eot) and
1132: nvl(bckdt_epe_egd_rec.DPNT_PERSON_ID, -1) =
1125: nvl(l_curr_epe_egd_table(l_curr_count).DPNT_INELIG_FLAG, '$') and
1126: nvl(bckdt_epe_egd_rec.INELG_RSN_CD, '$') =
1127: nvl(l_curr_epe_egd_table(l_curr_count).INELG_RSN_CD, '$') and
1128: nvl(bckdt_epe_egd_rec.ELIG_STRT_DT, hr_api.g_eot) =
1129: nvl(l_curr_epe_egd_table(l_curr_count).ELIG_STRT_DT, hr_api.g_eot) and
1130: nvl(bckdt_epe_egd_rec.ELIG_THRU_DT, hr_api.g_eot) =
1131: nvl(l_curr_epe_egd_table(l_curr_count).ELIG_THRU_DT, hr_api.g_eot) and
1132: nvl(bckdt_epe_egd_rec.DPNT_PERSON_ID, -1) =
1133: nvl(l_curr_epe_egd_table(l_curr_count).DPNT_PERSON_ID, -1)
1126: nvl(bckdt_epe_egd_rec.INELG_RSN_CD, '$') =
1127: nvl(l_curr_epe_egd_table(l_curr_count).INELG_RSN_CD, '$') and
1128: nvl(bckdt_epe_egd_rec.ELIG_STRT_DT, hr_api.g_eot) =
1129: nvl(l_curr_epe_egd_table(l_curr_count).ELIG_STRT_DT, hr_api.g_eot) and
1130: nvl(bckdt_epe_egd_rec.ELIG_THRU_DT, hr_api.g_eot) =
1131: nvl(l_curr_epe_egd_table(l_curr_count).ELIG_THRU_DT, hr_api.g_eot) and
1132: nvl(bckdt_epe_egd_rec.DPNT_PERSON_ID, -1) =
1133: nvl(l_curr_epe_egd_table(l_curr_count).DPNT_PERSON_ID, -1)
1134: then
1127: nvl(l_curr_epe_egd_table(l_curr_count).INELG_RSN_CD, '$') and
1128: nvl(bckdt_epe_egd_rec.ELIG_STRT_DT, hr_api.g_eot) =
1129: nvl(l_curr_epe_egd_table(l_curr_count).ELIG_STRT_DT, hr_api.g_eot) and
1130: nvl(bckdt_epe_egd_rec.ELIG_THRU_DT, hr_api.g_eot) =
1131: nvl(l_curr_epe_egd_table(l_curr_count).ELIG_THRU_DT, hr_api.g_eot) and
1132: nvl(bckdt_epe_egd_rec.DPNT_PERSON_ID, -1) =
1133: nvl(l_curr_epe_egd_table(l_curr_count).DPNT_PERSON_ID, -1)
1134: then
1135: l_found := TRUE;
1272: nvl(bckdt_enb_ecr_rec.MN_ELCN_VAL, -1) =
1273: nvl(l_curr_enb_ecr_table(l_curr_count).MN_ELCN_VAL, -1) and
1274: nvl(bckdt_enb_ecr_rec.INCRMT_ELCN_VAL, -1) =
1275: nvl(l_curr_enb_ecr_table(l_curr_count).INCRMT_ELCN_VAL, -1) and
1276: nvl(bckdt_enb_ecr_rec.RT_STRT_DT, hr_api.g_eot) =
1277: nvl(l_curr_enb_ecr_table(l_curr_count).RT_STRT_DT, hr_api.g_eot) and
1278: nvl(bckdt_enb_ecr_rec.RT_STRT_DT_CD, '$') =
1279: nvl(l_curr_enb_ecr_table(l_curr_count).RT_STRT_DT_CD, '$') and
1280: nvl(bckdt_enb_ecr_rec.RT_STRT_DT_RL, -1) =
1273: nvl(l_curr_enb_ecr_table(l_curr_count).MN_ELCN_VAL, -1) and
1274: nvl(bckdt_enb_ecr_rec.INCRMT_ELCN_VAL, -1) =
1275: nvl(l_curr_enb_ecr_table(l_curr_count).INCRMT_ELCN_VAL, -1) and
1276: nvl(bckdt_enb_ecr_rec.RT_STRT_DT, hr_api.g_eot) =
1277: nvl(l_curr_enb_ecr_table(l_curr_count).RT_STRT_DT, hr_api.g_eot) and
1278: nvl(bckdt_enb_ecr_rec.RT_STRT_DT_CD, '$') =
1279: nvl(l_curr_enb_ecr_table(l_curr_count).RT_STRT_DT_CD, '$') and
1280: nvl(bckdt_enb_ecr_rec.RT_STRT_DT_RL, -1) =
1281: nvl(l_curr_enb_ecr_table(l_curr_count).RT_STRT_DT_RL, -1) and
1441: nvl(bckdt_epe_ecr_rec.MN_ELCN_VAL, -1) =
1442: nvl(l_curr_epe_ecr_table(l_curr_count).MN_ELCN_VAL, -1) and
1443: nvl(bckdt_epe_ecr_rec.INCRMT_ELCN_VAL, -1) =
1444: nvl(l_curr_epe_ecr_table(l_curr_count).INCRMT_ELCN_VAL, -1) and
1445: nvl(bckdt_epe_ecr_rec.RT_STRT_DT, hr_api.g_eot) =
1446: nvl(l_curr_epe_ecr_table(l_curr_count).RT_STRT_DT, hr_api.g_eot) and
1447: nvl(bckdt_epe_ecr_rec.RT_STRT_DT_CD, '$') =
1448: nvl(l_curr_epe_ecr_table(l_curr_count).RT_STRT_DT_CD, '$') and
1449: nvl(bckdt_epe_ecr_rec.RT_STRT_DT_RL, -1) =
1442: nvl(l_curr_epe_ecr_table(l_curr_count).MN_ELCN_VAL, -1) and
1443: nvl(bckdt_epe_ecr_rec.INCRMT_ELCN_VAL, -1) =
1444: nvl(l_curr_epe_ecr_table(l_curr_count).INCRMT_ELCN_VAL, -1) and
1445: nvl(bckdt_epe_ecr_rec.RT_STRT_DT, hr_api.g_eot) =
1446: nvl(l_curr_epe_ecr_table(l_curr_count).RT_STRT_DT, hr_api.g_eot) and
1447: nvl(bckdt_epe_ecr_rec.RT_STRT_DT_CD, '$') =
1448: nvl(l_curr_epe_ecr_table(l_curr_count).RT_STRT_DT_CD, '$') and
1449: nvl(bckdt_epe_ecr_rec.RT_STRT_DT_RL, -1) =
1450: nvl(l_curr_epe_ecr_table(l_curr_count).RT_STRT_DT_RL, -1) and
1817: for l_curr_count in l_curr_ecd_table.first..l_curr_ecd_table.last loop
1818: --
1819: if nvl(bckdt_ecd_rec.dpnt_person_id, -1) =
1820: nvl(l_curr_ecd_table(l_curr_count).dpnt_person_id, -1) and
1821: nvl(bckdt_ecd_rec.effective_end_date, hr_api.g_eot) =
1822: nvl(l_curr_ecd_table(l_curr_count).effective_end_date, hr_api.g_eot) and
1823: nvl(bckdt_ecd_rec.cvg_thru_dt, hr_api.g_eot) =
1824: nvl(l_curr_ecd_table(l_curr_count).cvg_thru_dt, hr_api.g_eot)
1825: then
1818: --
1819: if nvl(bckdt_ecd_rec.dpnt_person_id, -1) =
1820: nvl(l_curr_ecd_table(l_curr_count).dpnt_person_id, -1) and
1821: nvl(bckdt_ecd_rec.effective_end_date, hr_api.g_eot) =
1822: nvl(l_curr_ecd_table(l_curr_count).effective_end_date, hr_api.g_eot) and
1823: nvl(bckdt_ecd_rec.cvg_thru_dt, hr_api.g_eot) =
1824: nvl(l_curr_ecd_table(l_curr_count).cvg_thru_dt, hr_api.g_eot)
1825: then
1826: l_found := TRUE;
1819: if nvl(bckdt_ecd_rec.dpnt_person_id, -1) =
1820: nvl(l_curr_ecd_table(l_curr_count).dpnt_person_id, -1) and
1821: nvl(bckdt_ecd_rec.effective_end_date, hr_api.g_eot) =
1822: nvl(l_curr_ecd_table(l_curr_count).effective_end_date, hr_api.g_eot) and
1823: nvl(bckdt_ecd_rec.cvg_thru_dt, hr_api.g_eot) =
1824: nvl(l_curr_ecd_table(l_curr_count).cvg_thru_dt, hr_api.g_eot)
1825: then
1826: l_found := TRUE;
1827: exit;
1820: nvl(l_curr_ecd_table(l_curr_count).dpnt_person_id, -1) and
1821: nvl(bckdt_ecd_rec.effective_end_date, hr_api.g_eot) =
1822: nvl(l_curr_ecd_table(l_curr_count).effective_end_date, hr_api.g_eot) and
1823: nvl(bckdt_ecd_rec.cvg_thru_dt, hr_api.g_eot) =
1824: nvl(l_curr_ecd_table(l_curr_count).cvg_thru_dt, hr_api.g_eot)
1825: then
1826: l_found := TRUE;
1827: exit;
1828: end if;
2011: hr_utility.set_location('ENRT_CVG_STRT_DT_RL = ' || nvl(l_bckdt_epe_table(l_count).ENRT_CVG_STRT_DT_RL, -1), 1234);
2012: hr_utility.set_location('DPNT_CVG_STRT_DT_CD = ' || nvl(l_bckdt_epe_table(l_count).DPNT_CVG_STRT_DT_CD, '$'), 1234);
2013: hr_utility.set_location('LER_CHG_DPNT_CVG_CD = ' || nvl(l_bckdt_epe_table(l_count).LER_CHG_DPNT_CVG_CD, '$'), 1234);
2014: hr_utility.set_location('DPNT_CVG_STRT_DT_RL = ' || nvl(l_bckdt_epe_table(l_count).DPNT_CVG_STRT_DT_RL, -1), 1234);
2015: hr_utility.set_location('ENRT_CVG_STRT_DT = ' || nvl(l_bckdt_epe_table(l_count).ENRT_CVG_STRT_DT, hr_api.g_eot), 1234);
2016: hr_utility.set_location('ERLST_DEENRT_DT = ' || nvl(l_bckdt_epe_table(l_count).ERLST_DEENRT_DT, hr_api.g_eot), 1234);
2017: */
2018: l_found := FALSE;
2019: l_diff_auto_flag := TRUE ;
2012: hr_utility.set_location('DPNT_CVG_STRT_DT_CD = ' || nvl(l_bckdt_epe_table(l_count).DPNT_CVG_STRT_DT_CD, '$'), 1234);
2013: hr_utility.set_location('LER_CHG_DPNT_CVG_CD = ' || nvl(l_bckdt_epe_table(l_count).LER_CHG_DPNT_CVG_CD, '$'), 1234);
2014: hr_utility.set_location('DPNT_CVG_STRT_DT_RL = ' || nvl(l_bckdt_epe_table(l_count).DPNT_CVG_STRT_DT_RL, -1), 1234);
2015: hr_utility.set_location('ENRT_CVG_STRT_DT = ' || nvl(l_bckdt_epe_table(l_count).ENRT_CVG_STRT_DT, hr_api.g_eot), 1234);
2016: hr_utility.set_location('ERLST_DEENRT_DT = ' || nvl(l_bckdt_epe_table(l_count).ERLST_DEENRT_DT, hr_api.g_eot), 1234);
2017: */
2018: l_found := FALSE;
2019: l_diff_auto_flag := TRUE ;
2020: --
2045: hr_utility.set_location('Curr ENRT_CVG_STRT_DT_RL = ' || nvl(l_curr_epe_table(l_curr_count).ENRT_CVG_STRT_DT_RL, -1), 1234);
2046: hr_utility.set_location('Curr DPNT_CVG_STRT_DT_CD = ' || nvl(l_curr_epe_table(l_curr_count).DPNT_CVG_STRT_DT_CD, '$'), 1234);
2047: hr_utility.set_location('Curr LER_CHG_DPNT_CVG_CD = ' || nvl(l_curr_epe_table(l_curr_count).LER_CHG_DPNT_CVG_CD, '$'), 1234);
2048: hr_utility.set_location('Curr DPNT_CVG_STRT_DT_RL = ' || nvl(l_curr_epe_table(l_curr_count).DPNT_CVG_STRT_DT_RL, -1), 1234);
2049: hr_utility.set_location('Curr ENRT_CVG_STRT_DT = ' || nvl(l_curr_epe_table(l_curr_count).ENRT_CVG_STRT_DT, hr_api.g_eot), 1234);
2050: hr_utility.set_location('Curr ERLST_DEENRT_DT = ' || nvl(l_curr_epe_table(l_curr_count).ERLST_DEENRT_DT, hr_api.g_eot) , 1234);
2051:
2052:
2053: if l_bckdt_epe_table(l_count).AUTO_ENRT_FLAG = 'Y' and
2046: hr_utility.set_location('Curr DPNT_CVG_STRT_DT_CD = ' || nvl(l_curr_epe_table(l_curr_count).DPNT_CVG_STRT_DT_CD, '$'), 1234);
2047: hr_utility.set_location('Curr LER_CHG_DPNT_CVG_CD = ' || nvl(l_curr_epe_table(l_curr_count).LER_CHG_DPNT_CVG_CD, '$'), 1234);
2048: hr_utility.set_location('Curr DPNT_CVG_STRT_DT_RL = ' || nvl(l_curr_epe_table(l_curr_count).DPNT_CVG_STRT_DT_RL, -1), 1234);
2049: hr_utility.set_location('Curr ENRT_CVG_STRT_DT = ' || nvl(l_curr_epe_table(l_curr_count).ENRT_CVG_STRT_DT, hr_api.g_eot), 1234);
2050: hr_utility.set_location('Curr ERLST_DEENRT_DT = ' || nvl(l_curr_epe_table(l_curr_count).ERLST_DEENRT_DT, hr_api.g_eot) , 1234);
2051:
2052:
2053: if l_bckdt_epe_table(l_count).AUTO_ENRT_FLAG = 'Y' and
2054: l_curr_epe_table(l_curr_count).AUTO_ENRT_FLAG = 'Y' and
2110: nvl(l_bckdt_epe_table(l_count).LER_CHG_DPNT_CVG_CD, '$') =
2111: nvl(l_curr_epe_table(l_curr_count).LER_CHG_DPNT_CVG_CD, '$') and
2112: nvl(l_bckdt_epe_table(l_count).DPNT_CVG_STRT_DT_RL, -1) =
2113: nvl(l_curr_epe_table(l_curr_count).DPNT_CVG_STRT_DT_RL, -1) and
2114: nvl(l_bckdt_epe_table(l_count).ENRT_CVG_STRT_DT, hr_api.g_eot) =
2115: nvl(l_curr_epe_table(l_curr_count).ENRT_CVG_STRT_DT, hr_api.g_eot) and
2116: nvl(l_bckdt_epe_table(l_count).ERLST_DEENRT_DT, hr_api.g_eot) =
2117: nvl(l_curr_epe_table(l_curr_count).ERLST_DEENRT_DT, hr_api.g_eot)
2118: then
2111: nvl(l_curr_epe_table(l_curr_count).LER_CHG_DPNT_CVG_CD, '$') and
2112: nvl(l_bckdt_epe_table(l_count).DPNT_CVG_STRT_DT_RL, -1) =
2113: nvl(l_curr_epe_table(l_curr_count).DPNT_CVG_STRT_DT_RL, -1) and
2114: nvl(l_bckdt_epe_table(l_count).ENRT_CVG_STRT_DT, hr_api.g_eot) =
2115: nvl(l_curr_epe_table(l_curr_count).ENRT_CVG_STRT_DT, hr_api.g_eot) and
2116: nvl(l_bckdt_epe_table(l_count).ERLST_DEENRT_DT, hr_api.g_eot) =
2117: nvl(l_curr_epe_table(l_curr_count).ERLST_DEENRT_DT, hr_api.g_eot)
2118: then
2119: --
2112: nvl(l_bckdt_epe_table(l_count).DPNT_CVG_STRT_DT_RL, -1) =
2113: nvl(l_curr_epe_table(l_curr_count).DPNT_CVG_STRT_DT_RL, -1) and
2114: nvl(l_bckdt_epe_table(l_count).ENRT_CVG_STRT_DT, hr_api.g_eot) =
2115: nvl(l_curr_epe_table(l_curr_count).ENRT_CVG_STRT_DT, hr_api.g_eot) and
2116: nvl(l_bckdt_epe_table(l_count).ERLST_DEENRT_DT, hr_api.g_eot) =
2117: nvl(l_curr_epe_table(l_curr_count).ERLST_DEENRT_DT, hr_api.g_eot)
2118: then
2119: --
2120: -- Now check elig_dpnt rows for any differences.
2113: nvl(l_curr_epe_table(l_curr_count).DPNT_CVG_STRT_DT_RL, -1) and
2114: nvl(l_bckdt_epe_table(l_count).ENRT_CVG_STRT_DT, hr_api.g_eot) =
2115: nvl(l_curr_epe_table(l_curr_count).ENRT_CVG_STRT_DT, hr_api.g_eot) and
2116: nvl(l_bckdt_epe_table(l_count).ERLST_DEENRT_DT, hr_api.g_eot) =
2117: nvl(l_curr_epe_table(l_curr_count).ERLST_DEENRT_DT, hr_api.g_eot)
2118: then
2119: --
2120: -- Now check elig_dpnt rows for any differences.
2121: --
2442: nvl(l_bckdt_epe_table(l_count).LER_CHG_DPNT_CVG_CD, '$') =
2443: nvl(l_curr_epe_table(l_curr_count).LER_CHG_DPNT_CVG_CD, '$') and
2444: nvl(l_bckdt_epe_table(l_count).DPNT_CVG_STRT_DT_RL, -1) =
2445: nvl(l_curr_epe_table(l_curr_count).DPNT_CVG_STRT_DT_RL, -1) and
2446: nvl(l_bckdt_epe_table(l_count).ENRT_CVG_STRT_DT, hr_api.g_eot) =
2447: nvl(l_curr_epe_table(l_curr_count).ENRT_CVG_STRT_DT, hr_api.g_eot) and
2448: nvl(l_bckdt_epe_table(l_count).ERLST_DEENRT_DT, hr_api.g_eot) =
2449: nvl(l_curr_epe_table(l_curr_count).ERLST_DEENRT_DT, hr_api.g_eot)
2450: then
2443: nvl(l_curr_epe_table(l_curr_count).LER_CHG_DPNT_CVG_CD, '$') and
2444: nvl(l_bckdt_epe_table(l_count).DPNT_CVG_STRT_DT_RL, -1) =
2445: nvl(l_curr_epe_table(l_curr_count).DPNT_CVG_STRT_DT_RL, -1) and
2446: nvl(l_bckdt_epe_table(l_count).ENRT_CVG_STRT_DT, hr_api.g_eot) =
2447: nvl(l_curr_epe_table(l_curr_count).ENRT_CVG_STRT_DT, hr_api.g_eot) and
2448: nvl(l_bckdt_epe_table(l_count).ERLST_DEENRT_DT, hr_api.g_eot) =
2449: nvl(l_curr_epe_table(l_curr_count).ERLST_DEENRT_DT, hr_api.g_eot)
2450: then
2451: --
2444: nvl(l_bckdt_epe_table(l_count).DPNT_CVG_STRT_DT_RL, -1) =
2445: nvl(l_curr_epe_table(l_curr_count).DPNT_CVG_STRT_DT_RL, -1) and
2446: nvl(l_bckdt_epe_table(l_count).ENRT_CVG_STRT_DT, hr_api.g_eot) =
2447: nvl(l_curr_epe_table(l_curr_count).ENRT_CVG_STRT_DT, hr_api.g_eot) and
2448: nvl(l_bckdt_epe_table(l_count).ERLST_DEENRT_DT, hr_api.g_eot) =
2449: nvl(l_curr_epe_table(l_curr_count).ERLST_DEENRT_DT, hr_api.g_eot)
2450: then
2451: --
2452: -- Now check elig_dpnt rows for any differences.
2445: nvl(l_curr_epe_table(l_curr_count).DPNT_CVG_STRT_DT_RL, -1) and
2446: nvl(l_bckdt_epe_table(l_count).ENRT_CVG_STRT_DT, hr_api.g_eot) =
2447: nvl(l_curr_epe_table(l_curr_count).ENRT_CVG_STRT_DT, hr_api.g_eot) and
2448: nvl(l_bckdt_epe_table(l_count).ERLST_DEENRT_DT, hr_api.g_eot) =
2449: nvl(l_curr_epe_table(l_curr_count).ERLST_DEENRT_DT, hr_api.g_eot)
2450: then
2451: --
2452: -- Now check elig_dpnt rows for any differences.
2453: --
2606: ,p_effective_end_date => l_effective_end_date
2607: ,p_per_cm_prvdd_stat_cd => 'VOID'
2608: ,p_object_version_number => per_cm_rec.object_version_number
2609: ,p_effective_date => p_effective_date
2610: ,p_datetrack_mode => hr_api.g_correction);
2611: --
2612: end loop;
2613: --
2614: hr_utility.set_location('Leaving:'|| l_proc, 10);
2666: ,p_resnd_rsn_cd => 'RPE' -- event reprocessed
2667: ,p_resnd_cmnt_txt => l_resnd_cmnt_txt
2668: ,p_object_version_number => per_cm_rec.object_version_number
2669: ,p_effective_date => p_effective_date
2670: ,p_datetrack_mode => hr_api.g_correction);
2671: --
2672: end loop;
2673: --
2674: hr_utility.set_location('Leaving:'|| l_proc, 10);
2931: loop
2932: --
2933: if nvl(bckdt_prv_rec.RT_TYP_CD, '$') =
2934: nvl(l_curr_prv_table(l_curr_count).RT_TYP_CD, '$') and
2935: nvl(bckdt_prv_rec.RT_STRT_DT, hr_api.g_eot) =
2936: nvl(l_curr_prv_table(l_curr_count).RT_STRT_DT, hr_api.g_eot) and
2937: (nvl(bckdt_prv_rec.RT_END_DT, hr_api.g_eot) =
2938: nvl(l_curr_prv_table(l_curr_count).RT_END_DT, hr_api.g_eot) or
2939: p_dont_check_cnt_flag = 'Y'
2932: --
2933: if nvl(bckdt_prv_rec.RT_TYP_CD, '$') =
2934: nvl(l_curr_prv_table(l_curr_count).RT_TYP_CD, '$') and
2935: nvl(bckdt_prv_rec.RT_STRT_DT, hr_api.g_eot) =
2936: nvl(l_curr_prv_table(l_curr_count).RT_STRT_DT, hr_api.g_eot) and
2937: (nvl(bckdt_prv_rec.RT_END_DT, hr_api.g_eot) =
2938: nvl(l_curr_prv_table(l_curr_count).RT_END_DT, hr_api.g_eot) or
2939: p_dont_check_cnt_flag = 'Y'
2940: ) and
2933: if nvl(bckdt_prv_rec.RT_TYP_CD, '$') =
2934: nvl(l_curr_prv_table(l_curr_count).RT_TYP_CD, '$') and
2935: nvl(bckdt_prv_rec.RT_STRT_DT, hr_api.g_eot) =
2936: nvl(l_curr_prv_table(l_curr_count).RT_STRT_DT, hr_api.g_eot) and
2937: (nvl(bckdt_prv_rec.RT_END_DT, hr_api.g_eot) =
2938: nvl(l_curr_prv_table(l_curr_count).RT_END_DT, hr_api.g_eot) or
2939: p_dont_check_cnt_flag = 'Y'
2940: ) and
2941: nvl(bckdt_prv_rec.TX_TYP_CD, '$') =
2934: nvl(l_curr_prv_table(l_curr_count).RT_TYP_CD, '$') and
2935: nvl(bckdt_prv_rec.RT_STRT_DT, hr_api.g_eot) =
2936: nvl(l_curr_prv_table(l_curr_count).RT_STRT_DT, hr_api.g_eot) and
2937: (nvl(bckdt_prv_rec.RT_END_DT, hr_api.g_eot) =
2938: nvl(l_curr_prv_table(l_curr_count).RT_END_DT, hr_api.g_eot) or
2939: p_dont_check_cnt_flag = 'Y'
2940: ) and
2941: nvl(bckdt_prv_rec.TX_TYP_CD, '$') =
2942: nvl(l_curr_prv_table(l_curr_count).TX_TYP_CD, '$') and
2965: nvl(bckdt_prv_rec.DSPLY_ON_ENRT_FLAG, '$') =
2966: nvl(l_curr_prv_table(l_curr_count).DSPLY_ON_ENRT_FLAG, '$') and
2967: nvl(bckdt_prv_rec.RT_OVRIDN_FLAG, '$') =
2968: nvl(l_curr_prv_table(l_curr_count).RT_OVRIDN_FLAG, '$') and
2969: nvl(bckdt_prv_rec.RT_OVRIDN_THRU_DT, hr_api.g_eot) =
2970: nvl(l_curr_prv_table(l_curr_count).RT_OVRIDN_THRU_DT, hr_api.g_eot) and
2971: nvl(bckdt_prv_rec.ELCTNS_MADE_DT, hr_api.g_eot) =
2972: nvl(l_curr_prv_table(l_curr_count).ELCTNS_MADE_DT, hr_api.g_eot) and
2973: nvl(bckdt_prv_rec.CVG_AMT_CALC_MTHD_ID, -1) =
2966: nvl(l_curr_prv_table(l_curr_count).DSPLY_ON_ENRT_FLAG, '$') and
2967: nvl(bckdt_prv_rec.RT_OVRIDN_FLAG, '$') =
2968: nvl(l_curr_prv_table(l_curr_count).RT_OVRIDN_FLAG, '$') and
2969: nvl(bckdt_prv_rec.RT_OVRIDN_THRU_DT, hr_api.g_eot) =
2970: nvl(l_curr_prv_table(l_curr_count).RT_OVRIDN_THRU_DT, hr_api.g_eot) and
2971: nvl(bckdt_prv_rec.ELCTNS_MADE_DT, hr_api.g_eot) =
2972: nvl(l_curr_prv_table(l_curr_count).ELCTNS_MADE_DT, hr_api.g_eot) and
2973: nvl(bckdt_prv_rec.CVG_AMT_CALC_MTHD_ID, -1) =
2974: nvl(l_curr_prv_table(l_curr_count).CVG_AMT_CALC_MTHD_ID, -1) and
2967: nvl(bckdt_prv_rec.RT_OVRIDN_FLAG, '$') =
2968: nvl(l_curr_prv_table(l_curr_count).RT_OVRIDN_FLAG, '$') and
2969: nvl(bckdt_prv_rec.RT_OVRIDN_THRU_DT, hr_api.g_eot) =
2970: nvl(l_curr_prv_table(l_curr_count).RT_OVRIDN_THRU_DT, hr_api.g_eot) and
2971: nvl(bckdt_prv_rec.ELCTNS_MADE_DT, hr_api.g_eot) =
2972: nvl(l_curr_prv_table(l_curr_count).ELCTNS_MADE_DT, hr_api.g_eot) and
2973: nvl(bckdt_prv_rec.CVG_AMT_CALC_MTHD_ID, -1) =
2974: nvl(l_curr_prv_table(l_curr_count).CVG_AMT_CALC_MTHD_ID, -1) and
2975: nvl(bckdt_prv_rec.ACTL_PREM_ID, -1) =
2968: nvl(l_curr_prv_table(l_curr_count).RT_OVRIDN_FLAG, '$') and
2969: nvl(bckdt_prv_rec.RT_OVRIDN_THRU_DT, hr_api.g_eot) =
2970: nvl(l_curr_prv_table(l_curr_count).RT_OVRIDN_THRU_DT, hr_api.g_eot) and
2971: nvl(bckdt_prv_rec.ELCTNS_MADE_DT, hr_api.g_eot) =
2972: nvl(l_curr_prv_table(l_curr_count).ELCTNS_MADE_DT, hr_api.g_eot) and
2973: nvl(bckdt_prv_rec.CVG_AMT_CALC_MTHD_ID, -1) =
2974: nvl(l_curr_prv_table(l_curr_count).CVG_AMT_CALC_MTHD_ID, -1) and
2975: nvl(bckdt_prv_rec.ACTL_PREM_ID, -1) =
2976: nvl(l_curr_prv_table(l_curr_count).ACTL_PREM_ID, -1) and
3322: hr_utility.set_location( 'SSPNDD_FLAG ' ||
3323: nvl(bckdt_pen_rec.SSPNDD_FLAG, '$r') ||'--'||
3324: nvl(l_curr_pen_table(l_curr_count).SSPNDD_FLAG, '$'),4987);
3325: hr_utility.set_location( 'ENRT_CVG_STRT_DT '
3326: || nvl(bckdt_pen_rec.ENRT_CVG_STRT_DT, hr_api.g_eot) ||'--'||
3327: nvl(l_curr_pen_table(l_curr_count).ENRT_CVG_STRT_DT, hr_api.g_eot),4987);
3328: hr_utility.set_location( 'ENRT_CVG_THRU_DT '
3329: || nvl(bckdt_pen_rec.ENRT_CVG_THRU_DT, hr_api.g_eot)||'--'||
3330: nvl(l_curr_pen_table(l_curr_count).ENRT_CVG_THRU_DT, hr_api.g_eot),4987);
3323: nvl(bckdt_pen_rec.SSPNDD_FLAG, '$r') ||'--'||
3324: nvl(l_curr_pen_table(l_curr_count).SSPNDD_FLAG, '$'),4987);
3325: hr_utility.set_location( 'ENRT_CVG_STRT_DT '
3326: || nvl(bckdt_pen_rec.ENRT_CVG_STRT_DT, hr_api.g_eot) ||'--'||
3327: nvl(l_curr_pen_table(l_curr_count).ENRT_CVG_STRT_DT, hr_api.g_eot),4987);
3328: hr_utility.set_location( 'ENRT_CVG_THRU_DT '
3329: || nvl(bckdt_pen_rec.ENRT_CVG_THRU_DT, hr_api.g_eot)||'--'||
3330: nvl(l_curr_pen_table(l_curr_count).ENRT_CVG_THRU_DT, hr_api.g_eot),4987);
3331: hr_utility.set_location( 'PRTT_IS_CVRD_FLA '
3325: hr_utility.set_location( 'ENRT_CVG_STRT_DT '
3326: || nvl(bckdt_pen_rec.ENRT_CVG_STRT_DT, hr_api.g_eot) ||'--'||
3327: nvl(l_curr_pen_table(l_curr_count).ENRT_CVG_STRT_DT, hr_api.g_eot),4987);
3328: hr_utility.set_location( 'ENRT_CVG_THRU_DT '
3329: || nvl(bckdt_pen_rec.ENRT_CVG_THRU_DT, hr_api.g_eot)||'--'||
3330: nvl(l_curr_pen_table(l_curr_count).ENRT_CVG_THRU_DT, hr_api.g_eot),4987);
3331: hr_utility.set_location( 'PRTT_IS_CVRD_FLA '
3332: || nvl(bckdt_pen_rec.PRTT_IS_CVRD_FLAG, '$') ||'--'||
3333: nvl(l_curr_pen_table(l_curr_count).PRTT_IS_CVRD_FLAG, '$'),4987);
3326: || nvl(bckdt_pen_rec.ENRT_CVG_STRT_DT, hr_api.g_eot) ||'--'||
3327: nvl(l_curr_pen_table(l_curr_count).ENRT_CVG_STRT_DT, hr_api.g_eot),4987);
3328: hr_utility.set_location( 'ENRT_CVG_THRU_DT '
3329: || nvl(bckdt_pen_rec.ENRT_CVG_THRU_DT, hr_api.g_eot)||'--'||
3330: nvl(l_curr_pen_table(l_curr_count).ENRT_CVG_THRU_DT, hr_api.g_eot),4987);
3331: hr_utility.set_location( 'PRTT_IS_CVRD_FLA '
3332: || nvl(bckdt_pen_rec.PRTT_IS_CVRD_FLAG, '$') ||'--'||
3333: nvl(l_curr_pen_table(l_curr_count).PRTT_IS_CVRD_FLAG, '$'),4987);
3334: hr_utility.set_location( 'PRTT_IS_CVRD_FLAG'
3342: nvl(l_curr_pen_table(l_curr_count).BNFT_TYP_CD, '$'),4987);
3343: hr_utility.set_location( 'UOM ' || nvl(bckdt_pen_rec.UOM, '$') ||'--'||
3344: nvl(l_curr_pen_table(l_curr_count).UOM, '$'),4987);
3345: hr_utility.set_location( 'ORGNL_ENRT_DT '
3346: || nvl(bckdt_pen_rec.ORGNL_ENRT_DT, hr_api.g_eot) ||'--'||
3347: nvl(l_curr_pen_table(l_curr_count).ORGNL_ENRT_DT, hr_api.g_eot),4987);
3348: hr_utility.set_location( 'ENRT_MTHD_CD '
3349: || nvl(bckdt_pen_rec.ENRT_MTHD_CD, '$') ||'--'||
3350: nvl(l_curr_pen_table(l_curr_count).ENRT_MTHD_CD, '$'),4987);
3343: hr_utility.set_location( 'UOM ' || nvl(bckdt_pen_rec.UOM, '$') ||'--'||
3344: nvl(l_curr_pen_table(l_curr_count).UOM, '$'),4987);
3345: hr_utility.set_location( 'ORGNL_ENRT_DT '
3346: || nvl(bckdt_pen_rec.ORGNL_ENRT_DT, hr_api.g_eot) ||'--'||
3347: nvl(l_curr_pen_table(l_curr_count).ORGNL_ENRT_DT, hr_api.g_eot),4987);
3348: hr_utility.set_location( 'ENRT_MTHD_CD '
3349: || nvl(bckdt_pen_rec.ENRT_MTHD_CD, '$') ||'--'||
3350: nvl(l_curr_pen_table(l_curr_count).ENRT_MTHD_CD, '$'),4987);
3351: hr_utility.set_location( 'ENRT_OVRIDN_FLAG '||
3354: hr_utility.set_location( 'ENRT_OVRID_RSN_CD '
3355: || nvl(bckdt_pen_rec.ENRT_OVRID_RSN_CD, '$')||'--'||
3356: nvl(l_curr_pen_table(l_curr_count).ENRT_OVRID_RSN_CD, '$'),4987);
3357: hr_utility.set_location( 'ERLST_DEENRT_DT '
3358: || nvl(bckdt_pen_rec.ERLST_DEENRT_DT, hr_api.g_eot)||'--'||
3359: nvl(l_curr_pen_table(l_curr_count).ERLST_DEENRT_DT, hr_api.g_eot),4987);
3360:
3361: hr_utility.set_location( 'ENRT_OVRID_THRU_DT'
3362: || nvl(bckdt_pen_rec.ENRT_OVRID_THRU_DT, hr_api.g_eot) ||'--'||
3355: || nvl(bckdt_pen_rec.ENRT_OVRID_RSN_CD, '$')||'--'||
3356: nvl(l_curr_pen_table(l_curr_count).ENRT_OVRID_RSN_CD, '$'),4987);
3357: hr_utility.set_location( 'ERLST_DEENRT_DT '
3358: || nvl(bckdt_pen_rec.ERLST_DEENRT_DT, hr_api.g_eot)||'--'||
3359: nvl(l_curr_pen_table(l_curr_count).ERLST_DEENRT_DT, hr_api.g_eot),4987);
3360:
3361: hr_utility.set_location( 'ENRT_OVRID_THRU_DT'
3362: || nvl(bckdt_pen_rec.ENRT_OVRID_THRU_DT, hr_api.g_eot) ||'--'||
3363: nvl(l_curr_pen_table(l_curr_count).ENRT_OVRID_THRU_DT, hr_api.g_eot),4987);
3358: || nvl(bckdt_pen_rec.ERLST_DEENRT_DT, hr_api.g_eot)||'--'||
3359: nvl(l_curr_pen_table(l_curr_count).ERLST_DEENRT_DT, hr_api.g_eot),4987);
3360:
3361: hr_utility.set_location( 'ENRT_OVRID_THRU_DT'
3362: || nvl(bckdt_pen_rec.ENRT_OVRID_THRU_DT, hr_api.g_eot) ||'--'||
3363: nvl(l_curr_pen_table(l_curr_count).ENRT_OVRID_THRU_DT, hr_api.g_eot),4987);
3364: hr_utility.set_location( 'NO_LNGR_ELIG_FLAG'
3365: || nvl(bckdt_pen_rec.NO_LNGR_ELIG_FLAG, '$')||'--'||
3366: nvl(l_curr_pen_table(l_curr_count).NO_LNGR_ELIG_FLAG, '$'),4987);
3359: nvl(l_curr_pen_table(l_curr_count).ERLST_DEENRT_DT, hr_api.g_eot),4987);
3360:
3361: hr_utility.set_location( 'ENRT_OVRID_THRU_DT'
3362: || nvl(bckdt_pen_rec.ENRT_OVRID_THRU_DT, hr_api.g_eot) ||'--'||
3363: nvl(l_curr_pen_table(l_curr_count).ENRT_OVRID_THRU_DT, hr_api.g_eot),4987);
3364: hr_utility.set_location( 'NO_LNGR_ELIG_FLAG'
3365: || nvl(bckdt_pen_rec.NO_LNGR_ELIG_FLAG, '$')||'--'||
3366: nvl(l_curr_pen_table(l_curr_count).NO_LNGR_ELIG_FLAG, '$'),4987);
3367: hr_utility.set_location( 'PRTT_ENRT_RSLT_STAT_CD'
3389:
3390: */
3391: if nvl(bckdt_pen_rec.SSPNDD_FLAG, '$') =
3392: nvl(l_curr_pen_table(l_curr_count).SSPNDD_FLAG, '$') and
3393: nvl(bckdt_pen_rec.ENRT_CVG_STRT_DT, hr_api.g_eot) =
3394: nvl(l_curr_pen_table(l_curr_count).ENRT_CVG_STRT_DT, hr_api.g_eot) and
3395: nvl(bckdt_pen_rec.ENRT_CVG_THRU_DT, hr_api.g_eot) =
3396: nvl(l_curr_pen_table(l_curr_count).ENRT_CVG_THRU_DT, hr_api.g_eot) and
3397: nvl(bckdt_pen_rec.PRTT_IS_CVRD_FLAG, '$') =
3390: */
3391: if nvl(bckdt_pen_rec.SSPNDD_FLAG, '$') =
3392: nvl(l_curr_pen_table(l_curr_count).SSPNDD_FLAG, '$') and
3393: nvl(bckdt_pen_rec.ENRT_CVG_STRT_DT, hr_api.g_eot) =
3394: nvl(l_curr_pen_table(l_curr_count).ENRT_CVG_STRT_DT, hr_api.g_eot) and
3395: nvl(bckdt_pen_rec.ENRT_CVG_THRU_DT, hr_api.g_eot) =
3396: nvl(l_curr_pen_table(l_curr_count).ENRT_CVG_THRU_DT, hr_api.g_eot) and
3397: nvl(bckdt_pen_rec.PRTT_IS_CVRD_FLAG, '$') =
3398: nvl(l_curr_pen_table(l_curr_count).PRTT_IS_CVRD_FLAG, '$') and
3391: if nvl(bckdt_pen_rec.SSPNDD_FLAG, '$') =
3392: nvl(l_curr_pen_table(l_curr_count).SSPNDD_FLAG, '$') and
3393: nvl(bckdt_pen_rec.ENRT_CVG_STRT_DT, hr_api.g_eot) =
3394: nvl(l_curr_pen_table(l_curr_count).ENRT_CVG_STRT_DT, hr_api.g_eot) and
3395: nvl(bckdt_pen_rec.ENRT_CVG_THRU_DT, hr_api.g_eot) =
3396: nvl(l_curr_pen_table(l_curr_count).ENRT_CVG_THRU_DT, hr_api.g_eot) and
3397: nvl(bckdt_pen_rec.PRTT_IS_CVRD_FLAG, '$') =
3398: nvl(l_curr_pen_table(l_curr_count).PRTT_IS_CVRD_FLAG, '$') and
3399: nvl(bckdt_pen_rec.BNFT_AMT, -1) =
3392: nvl(l_curr_pen_table(l_curr_count).SSPNDD_FLAG, '$') and
3393: nvl(bckdt_pen_rec.ENRT_CVG_STRT_DT, hr_api.g_eot) =
3394: nvl(l_curr_pen_table(l_curr_count).ENRT_CVG_STRT_DT, hr_api.g_eot) and
3395: nvl(bckdt_pen_rec.ENRT_CVG_THRU_DT, hr_api.g_eot) =
3396: nvl(l_curr_pen_table(l_curr_count).ENRT_CVG_THRU_DT, hr_api.g_eot) and
3397: nvl(bckdt_pen_rec.PRTT_IS_CVRD_FLAG, '$') =
3398: nvl(l_curr_pen_table(l_curr_count).PRTT_IS_CVRD_FLAG, '$') and
3399: nvl(bckdt_pen_rec.BNFT_AMT, -1) =
3400: nvl(l_curr_pen_table(l_curr_count).BNFT_AMT, -1) and
3403: nvl(bckdt_pen_rec.BNFT_TYP_CD, '$') =
3404: nvl(l_curr_pen_table(l_curr_count).BNFT_TYP_CD, '$') and
3405: nvl(bckdt_pen_rec.UOM, '$') =
3406: nvl(l_curr_pen_table(l_curr_count).UOM, '$') and
3407: nvl(bckdt_pen_rec.ORGNL_ENRT_DT, hr_api.g_eot) =
3408: nvl(l_curr_pen_table(l_curr_count).ORGNL_ENRT_DT, hr_api.g_eot) and
3409: nvl(bckdt_pen_rec.ENRT_MTHD_CD, '$') =
3410: nvl(l_curr_pen_table(l_curr_count).ENRT_MTHD_CD, '$') and
3411: nvl(bckdt_pen_rec.ENRT_OVRIDN_FLAG, '$') =
3404: nvl(l_curr_pen_table(l_curr_count).BNFT_TYP_CD, '$') and
3405: nvl(bckdt_pen_rec.UOM, '$') =
3406: nvl(l_curr_pen_table(l_curr_count).UOM, '$') and
3407: nvl(bckdt_pen_rec.ORGNL_ENRT_DT, hr_api.g_eot) =
3408: nvl(l_curr_pen_table(l_curr_count).ORGNL_ENRT_DT, hr_api.g_eot) and
3409: nvl(bckdt_pen_rec.ENRT_MTHD_CD, '$') =
3410: nvl(l_curr_pen_table(l_curr_count).ENRT_MTHD_CD, '$') and
3411: nvl(bckdt_pen_rec.ENRT_OVRIDN_FLAG, '$') =
3412: nvl(l_curr_pen_table(l_curr_count).ENRT_OVRIDN_FLAG, '$') and
3411: nvl(bckdt_pen_rec.ENRT_OVRIDN_FLAG, '$') =
3412: nvl(l_curr_pen_table(l_curr_count).ENRT_OVRIDN_FLAG, '$') and
3413: nvl(bckdt_pen_rec.ENRT_OVRID_RSN_CD, '$') =
3414: nvl(l_curr_pen_table(l_curr_count).ENRT_OVRID_RSN_CD, '$') and
3415: nvl(bckdt_pen_rec.ERLST_DEENRT_DT, hr_api.g_eot) =
3416: nvl(l_curr_pen_table(l_curr_count).ERLST_DEENRT_DT, hr_api.g_eot) and
3417: nvl(bckdt_pen_rec.ENRT_OVRID_THRU_DT, hr_api.g_eot) =
3418: nvl(l_curr_pen_table(l_curr_count).ENRT_OVRID_THRU_DT, hr_api.g_eot) and
3419: nvl(bckdt_pen_rec.NO_LNGR_ELIG_FLAG, '$') =
3412: nvl(l_curr_pen_table(l_curr_count).ENRT_OVRIDN_FLAG, '$') and
3413: nvl(bckdt_pen_rec.ENRT_OVRID_RSN_CD, '$') =
3414: nvl(l_curr_pen_table(l_curr_count).ENRT_OVRID_RSN_CD, '$') and
3415: nvl(bckdt_pen_rec.ERLST_DEENRT_DT, hr_api.g_eot) =
3416: nvl(l_curr_pen_table(l_curr_count).ERLST_DEENRT_DT, hr_api.g_eot) and
3417: nvl(bckdt_pen_rec.ENRT_OVRID_THRU_DT, hr_api.g_eot) =
3418: nvl(l_curr_pen_table(l_curr_count).ENRT_OVRID_THRU_DT, hr_api.g_eot) and
3419: nvl(bckdt_pen_rec.NO_LNGR_ELIG_FLAG, '$') =
3420: nvl(l_curr_pen_table(l_curr_count).NO_LNGR_ELIG_FLAG, '$') and
3413: nvl(bckdt_pen_rec.ENRT_OVRID_RSN_CD, '$') =
3414: nvl(l_curr_pen_table(l_curr_count).ENRT_OVRID_RSN_CD, '$') and
3415: nvl(bckdt_pen_rec.ERLST_DEENRT_DT, hr_api.g_eot) =
3416: nvl(l_curr_pen_table(l_curr_count).ERLST_DEENRT_DT, hr_api.g_eot) and
3417: nvl(bckdt_pen_rec.ENRT_OVRID_THRU_DT, hr_api.g_eot) =
3418: nvl(l_curr_pen_table(l_curr_count).ENRT_OVRID_THRU_DT, hr_api.g_eot) and
3419: nvl(bckdt_pen_rec.NO_LNGR_ELIG_FLAG, '$') =
3420: nvl(l_curr_pen_table(l_curr_count).NO_LNGR_ELIG_FLAG, '$') and
3421: /*
3414: nvl(l_curr_pen_table(l_curr_count).ENRT_OVRID_RSN_CD, '$') and
3415: nvl(bckdt_pen_rec.ERLST_DEENRT_DT, hr_api.g_eot) =
3416: nvl(l_curr_pen_table(l_curr_count).ERLST_DEENRT_DT, hr_api.g_eot) and
3417: nvl(bckdt_pen_rec.ENRT_OVRID_THRU_DT, hr_api.g_eot) =
3418: nvl(l_curr_pen_table(l_curr_count).ENRT_OVRID_THRU_DT, hr_api.g_eot) and
3419: nvl(bckdt_pen_rec.NO_LNGR_ELIG_FLAG, '$') =
3420: nvl(l_curr_pen_table(l_curr_count).NO_LNGR_ELIG_FLAG, '$') and
3421: /*
3422: Bug 1266433 : Do not compare the status codes.
3844: --
3845: if l_curr_pen_rec.effective_start_date = l_curr_bpl_rec.effective_start_date or
3846: l_curr_pen_rec.effective_start_date = l_curr_bpl_rec.effective_end_date
3847: then
3848: l_datetrack_mode := hr_api.g_correction;
3849: else
3850: l_datetrack_mode := hr_api.g_update;
3851: end if;
3852: --
3846: l_curr_pen_rec.effective_start_date = l_curr_bpl_rec.effective_end_date
3847: then
3848: l_datetrack_mode := hr_api.g_correction;
3849: else
3850: l_datetrack_mode := hr_api.g_update;
3851: end if;
3852: --
3853: ben_Benefit_Prvdd_Ledger_api.update_Benefit_Prvdd_Ledger (
3854: p_bnft_prvdd_ldgr_id => l_curr_bpl_rec.bnft_prvdd_ldgr_id
4107: ELSE
4108: IF l_curr_ppr.effective_start_date = l_old_ppr_rec.effective_start_date
4109: OR l_curr_ppr.effective_start_date = l_old_ppr_rec.effective_end_date
4110: THEN
4111: l_datetrack_mode := hr_api.g_correction;
4112: ELSE
4113: l_datetrack_mode := hr_api.g_update;
4114: END IF;
4115: hr_utility.set_location('Reinstate Provider by Updating in mode '||l_datetrack_mode,99099);
4109: OR l_curr_ppr.effective_start_date = l_old_ppr_rec.effective_end_date
4110: THEN
4111: l_datetrack_mode := hr_api.g_correction;
4112: ELSE
4113: l_datetrack_mode := hr_api.g_update;
4114: END IF;
4115: hr_utility.set_location('Reinstate Provider by Updating in mode '||l_datetrack_mode,99099);
4116: ben_prmry_care_prvdr_api.update_prmry_care_prvdr (p_validate => FALSE,
4117: p_prmry_care_prvdr_id => l_old_ppr_rec.prmry_care_prvdr_id,
4239: ELSE
4240: IF l_curr_ppr.effective_start_date = l_old_ppr_rec.effective_start_date
4241: OR l_curr_ppr.effective_start_date = l_old_ppr_rec.effective_end_date
4242: THEN
4243: l_datetrack_mode := hr_api.g_correction;
4244: ELSE
4245: l_datetrack_mode := hr_api.g_update;
4246: END IF;
4247: hr_utility.set_location('Reinstate Provider by Updating in mode '||l_datetrack_mode,99099);
4241: OR l_curr_ppr.effective_start_date = l_old_ppr_rec.effective_end_date
4242: THEN
4243: l_datetrack_mode := hr_api.g_correction;
4244: ELSE
4245: l_datetrack_mode := hr_api.g_update;
4246: END IF;
4247: hr_utility.set_location('Reinstate Provider by Updating in mode '||l_datetrack_mode,99099);
4248: ben_prmry_care_prvdr_api.update_prmry_care_prvdr (p_validate => FALSE,
4249: p_prmry_care_prvdr_id => l_old_ppr_rec.prmry_care_prvdr_id,
4333: and pea.prtt_enrt_rslt_id = p_bckdt_prtt_enrt_rslt_id
4334: and pea.business_group_id = p_business_group_id
4335: and nvl(pea.pl_bnf_id, -1) = nvl(p_old_pl_bnf_id, -1)
4336: and nvl(pea.elig_cvrd_dpnt_id, -1) = nvl(p_old_elig_cvrd_dpnt_id, -1)
4337: and pea.effective_end_date = hr_api.g_eot --BUG 4502165 fix
4338: -- and pea.PL_BNF_ID is null
4339: -- and pea.ELIG_CVRD_DPNT_ID is null
4340: union
4341: select pea.OVRDN_THRU_DT, -- used as pea.CMPLTD_DT
4388: open c_pea(l_old_pea_rec.actn_typ_id);
4389: fetch c_pea into l_pea_rec;
4390: if c_pea%found then
4391: --
4392: if nvl(l_old_pea_rec.CMPLTD_DT, hr_api.g_eot) <> nvl(l_pea_rec.CMPLTD_DT, hr_api.g_eot)
4393: then
4394: --
4395: -- Use the correction mode.
4396: l_datetrack_mode := hr_api.g_correction;
4392: if nvl(l_old_pea_rec.CMPLTD_DT, hr_api.g_eot) <> nvl(l_pea_rec.CMPLTD_DT, hr_api.g_eot)
4393: then
4394: --
4395: -- Use the correction mode.
4396: l_datetrack_mode := hr_api.g_correction;
4397: --
4398: -- update the action items.
4399: --
4400: -- If completion date is > p_effective_date .
4504: open c_cpp(l_old_cpp_rec.actn_typ_id, l_old_cpp_rec.dpnt_dsgn_ctfn_typ_cd);
4505: fetch c_cpp into l_cpp_rec;
4506: if c_cpp%found then
4507: --
4508: if nvl(l_old_cpp_rec.DPNT_DSGN_CTFN_RECD_DT, hr_api.g_eot) <>
4509: nvl(l_cpp_rec.DPNT_DSGN_CTFN_RECD_DT, hr_api.g_eot)
4510: then
4511: --
4512: -- Use the correction mode.
4505: fetch c_cpp into l_cpp_rec;
4506: if c_cpp%found then
4507: --
4508: if nvl(l_old_cpp_rec.DPNT_DSGN_CTFN_RECD_DT, hr_api.g_eot) <>
4509: nvl(l_cpp_rec.DPNT_DSGN_CTFN_RECD_DT, hr_api.g_eot)
4510: then
4511: --
4512: -- Use the correction mode.
4513: -- update the dependent certification received.
4511: --
4512: -- Use the correction mode.
4513: -- update the dependent certification received.
4514: --
4515: l_datetrack_mode := hr_api.g_correction;
4516: --
4517: if l_old_cpp_rec.DPNT_DSGN_CTFN_RECD_DT < p_effective_date then
4518: l_old_cpp_rec.DPNT_DSGN_CTFN_RECD_DT := p_effective_date;
4519: end if;
4737: select 'Y'
4738: from ben_elig_cvrd_dpnt_f pdp_old
4739: where pdp_old.elig_cvrd_dpnt_id = p_elig_cvrd_dpnt_id
4740: and pdp_old.prtt_enrt_rslt_id = p_bckdt_prtt_enrt_rslt_id
4741: and (pdp_old.effective_end_date = hr_api.g_eot or
4742: pdp_old.effective_end_date = (select max(effective_end_date)
4743: from ben_elig_cvrd_dpnt_f
4744: where elig_cvrd_dpnt_id = pdp_old.elig_cvrd_dpnt_id
4745: and prtt_enrt_rslt_id = pdp_old.prtt_enrt_rslt_id))
4742: pdp_old.effective_end_date = (select max(effective_end_date)
4743: from ben_elig_cvrd_dpnt_f
4744: where elig_cvrd_dpnt_id = pdp_old.elig_cvrd_dpnt_id
4745: and prtt_enrt_rslt_id = pdp_old.prtt_enrt_rslt_id))
4746: and (pdp_old.cvg_thru_dt is null or pdp_old.cvg_thru_dt = hr_api.g_eot)
4747: union
4748: select 'Y'
4749: from ben_le_clsn_n_rstr pdp_old
4750: where pdp_old.bkup_tbl_id = p_elig_cvrd_dpnt_id
4749: from ben_le_clsn_n_rstr pdp_old
4750: where pdp_old.bkup_tbl_id = p_elig_cvrd_dpnt_id
4751: and pdp_old.bkup_tbl_typ_cd = 'BEN_ELIG_CVRD_DPNT_F'
4752: and pdp_old.prtt_enrt_rslt_id = p_bckdt_prtt_enrt_rslt_id
4753: and ((pdp_old.cvg_thru_dt is null or pdp_old.cvg_thru_dt = hr_api.g_eot) and
4754: pdp_old.effective_end_date = hr_api.g_eot
4755: );
4756: --
4757: l_chk_valid_pdp char;
4750: where pdp_old.bkup_tbl_id = p_elig_cvrd_dpnt_id
4751: and pdp_old.bkup_tbl_typ_cd = 'BEN_ELIG_CVRD_DPNT_F'
4752: and pdp_old.prtt_enrt_rslt_id = p_bckdt_prtt_enrt_rslt_id
4753: and ((pdp_old.cvg_thru_dt is null or pdp_old.cvg_thru_dt = hr_api.g_eot) and
4754: pdp_old.effective_end_date = hr_api.g_eot
4755: );
4756: --
4757: l_chk_valid_pdp char;
4758: --
4761: from ben_elig_cvrd_dpnt_f pdp ,
4762: ben_per_in_ler pil
4763: where pdp.prtt_enrt_rslt_id = p_prtt_enrt_rslt_id
4764: and pdp.cvg_strt_dt is not null
4765: and nvl(pdp.cvg_thru_dt, hr_api.g_eot) = hr_api.g_eot
4766: and pdp.business_group_id = p_business_group_id
4767: and pdp.dpnt_person_id = cp_dpnt_person_id
4768: and p_effective_date between pdp.effective_start_date
4769: and pdp.effective_end_date
4871: p_effective_date => p_effective_date, -- Bug : 5124 As per Jeana, data
4872: -- should be reinstated with system date
4873: -- rather than p_effective_date,
4874: p_cvg_strt_dt => l_cvg_strt_dt,
4875: p_cvg_thru_dt => hr_api.g_eot,
4876: p_datetrack_mode => hr_api.g_insert,
4877: p_elig_cvrd_dpnt_id => l_elig_cvrd_dpnt_id,
4878: p_effective_start_date => l_effective_start_date,
4879: p_effective_end_date => l_effective_end_date,
4872: -- should be reinstated with system date
4873: -- rather than p_effective_date,
4874: p_cvg_strt_dt => l_cvg_strt_dt,
4875: p_cvg_thru_dt => hr_api.g_eot,
4876: p_datetrack_mode => hr_api.g_insert,
4877: p_elig_cvrd_dpnt_id => l_elig_cvrd_dpnt_id,
4878: p_effective_start_date => l_effective_start_date,
4879: p_effective_end_date => l_effective_end_date,
4880: p_object_version_number => l_pdp_object_version_number,
4882: end if;
4883: close c_epe_dpnt;
4884: --
4885: --
4886: elsif bckdt_pen_dpnts_rec.cvg_thru_dt <> hr_api.g_eot then
4887: hr_utility.set_location('End-dated row found - vvp', 7777);
4888:
4889: --5692797 Check whether backed out PDP record exists for the dependent in same enrollment
4890: --with valid coverage. If yes, no need to reinstate this end-dated record.
4906: -- should be reinstated with system date
4907: -- rather than p_effective_date,
4908: p_cvg_strt_dt => bckdt_pen_dpnts_rec.cvg_strt_dt,
4909: p_cvg_thru_dt => bckdt_pen_dpnts_rec.cvg_thru_dt,
4910: p_datetrack_mode => hr_api.g_update,
4911: p_elig_cvrd_dpnt_id => l_elig_cvrd_dpnt_id,
4912: p_effective_start_date => l_effective_start_date,
4913: p_effective_end_date => l_effective_end_date,
4914: p_object_version_number => l_pdp_object_version_number,
5049: open c_pbc(l_old_pbc_rec.actn_typ_id, l_old_pbc_rec.BNF_CTFN_TYP_CD);
5050: fetch c_pbc into l_pbc_rec;
5051: if c_pbc%found then
5052: --
5053: if nvl(l_old_pbc_rec.BNF_CTFN_RECD_DT, hr_api.g_eot) <>
5054: nvl(l_pbc_rec.BNF_CTFN_RECD_DT, hr_api.g_eot)
5055: then
5056: --
5057: -- Use the correction mode.
5050: fetch c_pbc into l_pbc_rec;
5051: if c_pbc%found then
5052: --
5053: if nvl(l_old_pbc_rec.BNF_CTFN_RECD_DT, hr_api.g_eot) <>
5054: nvl(l_pbc_rec.BNF_CTFN_RECD_DT, hr_api.g_eot)
5055: then
5056: --
5057: -- Use the correction mode.
5058: -- update the dependent certification received.
5056: --
5057: -- Use the correction mode.
5058: -- update the dependent certification received.
5059: --
5060: l_datetrack_mode := hr_api.g_correction;
5061: --
5062: if l_old_pbc_rec.BNF_CTFN_RECD_DT < p_effective_date then
5063: l_old_pbc_rec.BNF_CTFN_RECD_DT := p_effective_date;
5064: end if;
5361: else
5362: --
5363: if p_effective_date = l_bnf_rec.effective_start_date or
5364: p_effective_date = l_bnf_rec.effective_end_date then
5365: l_datetrack_mode := hr_api.g_correction;
5366: else
5367: l_datetrack_mode := hr_api.g_update;
5368: end if;
5369: --
5363: if p_effective_date = l_bnf_rec.effective_start_date or
5364: p_effective_date = l_bnf_rec.effective_end_date then
5365: l_datetrack_mode := hr_api.g_correction;
5366: else
5367: l_datetrack_mode := hr_api.g_update;
5368: end if;
5369: --
5370: ben_plan_beneficiary_api.update_PLAN_BENEFICIARY
5371: (p_validate => FALSE
5542: l_old_pcs_rec.ACTN_TYP_ID);
5543: fetch c_pcs into l_pcs_rec;
5544: if c_pcs%found then
5545: --
5546: if nvl(l_old_pcs_rec.ENRT_CTFN_RECD_DT, hr_api.g_eot) <>
5547: nvl(l_pcs_rec.ENRT_CTFN_RECD_DT, hr_api.g_eot) or
5548: nvl(l_old_pcs_rec.ENRT_CTFN_DND_DT, hr_api.g_eot) <>
5549: nvl(l_pcs_rec.ENRT_CTFN_DND_DT, hr_api.g_eot)
5550: then
5543: fetch c_pcs into l_pcs_rec;
5544: if c_pcs%found then
5545: --
5546: if nvl(l_old_pcs_rec.ENRT_CTFN_RECD_DT, hr_api.g_eot) <>
5547: nvl(l_pcs_rec.ENRT_CTFN_RECD_DT, hr_api.g_eot) or
5548: nvl(l_old_pcs_rec.ENRT_CTFN_DND_DT, hr_api.g_eot) <>
5549: nvl(l_pcs_rec.ENRT_CTFN_DND_DT, hr_api.g_eot)
5550: then
5551: --
5544: if c_pcs%found then
5545: --
5546: if nvl(l_old_pcs_rec.ENRT_CTFN_RECD_DT, hr_api.g_eot) <>
5547: nvl(l_pcs_rec.ENRT_CTFN_RECD_DT, hr_api.g_eot) or
5548: nvl(l_old_pcs_rec.ENRT_CTFN_DND_DT, hr_api.g_eot) <>
5549: nvl(l_pcs_rec.ENRT_CTFN_DND_DT, hr_api.g_eot)
5550: then
5551: --
5552: -- Use the correction mode.
5545: --
5546: if nvl(l_old_pcs_rec.ENRT_CTFN_RECD_DT, hr_api.g_eot) <>
5547: nvl(l_pcs_rec.ENRT_CTFN_RECD_DT, hr_api.g_eot) or
5548: nvl(l_old_pcs_rec.ENRT_CTFN_DND_DT, hr_api.g_eot) <>
5549: nvl(l_pcs_rec.ENRT_CTFN_DND_DT, hr_api.g_eot)
5550: then
5551: --
5552: -- Use the correction mode.
5553: l_datetrack_mode := hr_api.g_correction;
5549: nvl(l_pcs_rec.ENRT_CTFN_DND_DT, hr_api.g_eot)
5550: then
5551: --
5552: -- Use the correction mode.
5553: l_datetrack_mode := hr_api.g_correction;
5554: --
5555: -- update the action items.
5556: --
5557: -- If completion date is > p_effective_date .
5710: and pil.person_id = p_person_id
5711: and pil.business_group_id = p_business_group_id
5712: and pil.per_in_ler_id = pen.per_in_ler_id
5713: /*Pick up both end-dated and non-end-dated results*/
5714: and (pen.effective_end_date = hr_api.g_eot or
5715: pen.effective_end_date = (select max(effective_end_date)
5716: from ben_prtt_enrt_rslt_f
5717: where prtt_enrt_rslt_id =
5718: pen.prtt_enrt_rslt_id))
5716: from ben_prtt_enrt_rslt_f
5717: where prtt_enrt_rslt_id =
5718: pen.prtt_enrt_rslt_id))
5719: and (pen.enrt_cvg_thru_dt is null or
5720: pen.enrt_cvg_thru_dt = hr_api.g_eot
5721: )
5722: and pen.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
5723: and pen.prtt_enrt_rslt_id not in (
5724: select nvl(pen_inner.RPLCS_SSPNDD_RSLT_ID, -1)
5728: and pil_inner.person_id = p_person_id
5729: and pil_inner.business_group_id = p_business_group_id
5730: and pil_inner.per_in_ler_id = pen_inner.per_in_ler_id
5731: and (pen_inner.enrt_cvg_thru_dt is null or
5732: pen_inner.enrt_cvg_thru_dt = hr_api.g_eot
5733: )
5734: and pen_inner.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
5735: union
5736: select nvl(pen_inner.RPLCS_SSPNDD_RSLT_ID, -1)
5741: and pil_inner.business_group_id = p_business_group_id
5742: AND pil_inner.per_in_ler_id = pen_inner.per_in_ler_id
5743: and pen_inner.bkup_tbl_typ_cd = 'BEN_PRTT_ENRT_RSLT_F'
5744: and (pen_inner.enrt_cvg_thru_dt is null or
5745: pen_inner.enrt_cvg_thru_dt = hr_api.g_eot
5746: )
5747: and pen_inner.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
5748: )
5749: union
5832: and pil.business_group_id = p_business_group_id
5833: AND pil.per_in_ler_id = pen.per_in_ler_id
5834: and pen.bkup_tbl_typ_cd = 'BEN_PRTT_ENRT_RSLT_F'
5835: and ((pen.enrt_cvg_thru_dt is null or
5836: pen.enrt_cvg_thru_dt = hr_api.g_eot) and
5837: --bug#2604375 - added to control updated result rows for the same per_in_ler
5838: pen.effective_end_date = hr_api.g_eot
5839: )
5840: and pen.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
5834: and pen.bkup_tbl_typ_cd = 'BEN_PRTT_ENRT_RSLT_F'
5835: and ((pen.enrt_cvg_thru_dt is null or
5836: pen.enrt_cvg_thru_dt = hr_api.g_eot) and
5837: --bug#2604375 - added to control updated result rows for the same per_in_ler
5838: pen.effective_end_date = hr_api.g_eot
5839: )
5840: and pen.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
5841: and pen.bkup_tbl_id not in (
5842: select nvl(pen_inner.RPLCS_SSPNDD_RSLT_ID, -1)
5846: and pil_inner.person_id = p_person_id
5847: and pil_inner.business_group_id = p_business_group_id
5848: and pil_inner.per_in_ler_id = pen_inner.per_in_ler_id
5849: and (pen_inner.enrt_cvg_thru_dt is null or
5850: pen_inner.enrt_cvg_thru_dt = hr_api.g_eot
5851: )
5852: and pen_inner.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
5853: union
5854: select nvl(pen_inner.RPLCS_SSPNDD_RSLT_ID, -1)
5859: and pil_inner.business_group_id = p_business_group_id
5860: AND pil_inner.per_in_ler_id = pen_inner.per_in_ler_id
5861: and pen_inner.bkup_tbl_typ_cd = 'BEN_PRTT_ENRT_RSLT_F'
5862: and (pen_inner.enrt_cvg_thru_dt is null or
5863: pen_inner.enrt_cvg_thru_dt = hr_api.g_eot
5864: )
5865: and pen_inner.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
5866: )
5867: order by 1, 11 desc; -- pen.effective_end_date; -- Low to High
6019: and pen.per_in_ler_id = pil.per_in_ler_id
6020: and pen.business_group_id = p_business_group_id
6021: and pil.business_group_id = p_business_group_id
6022: and pen.prtt_enrt_rslt_stat_cd is null
6023: and pen.effective_end_date = hr_api.g_eot
6024: and pen.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
6025: and (pen.enrt_cvg_thru_dt is null or
6026: pen.enrt_cvg_thru_dt = hr_api.g_eot
6027: );
6022: and pen.prtt_enrt_rslt_stat_cd is null
6023: and pen.effective_end_date = hr_api.g_eot
6024: and pen.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
6025: and (pen.enrt_cvg_thru_dt is null or
6026: pen.enrt_cvg_thru_dt = hr_api.g_eot
6027: );
6028: type t_bckt_csd_pen_table is table of c_bckt_csd_pen%rowtype index by binary_integer;
6029: l_bckt_csd_pil_enrt_table t_bckt_csd_pen_table;
6030: l_bckt_csd_pen_esd date;
6039: where prv1.prtt_enrt_rslt_id = v_bckdt_pen_id
6040: and prv2.prtt_enrt_rslt_id = v_new_pen_id
6041: and prv1.acty_base_rt_id = prv2.acty_base_rt_id
6042: and prv1.rt_ovridn_flag = 'Y'
6043: and prv1.rt_end_dt <> hr_api.g_eot
6044: and prv1.rt_ovridn_thru_dt >= prv2.rt_strt_dt
6045: -- and prv1.prtt_rt_val_stat_cd is null
6046: and prv2.prtt_rt_val_stat_cd is null
6047: and prv2.per_in_ler_id = p_per_in_ler_id ;
6066: cursor c_ovn(v_prtt_enrt_rslt_id number) is
6067: select object_version_number
6068: from ben_prtt_enrt_rslt_f
6069: where prtt_enrt_rslt_id = v_prtt_enrt_rslt_id
6070: and effective_end_date = hr_api.g_eot;
6071: --
6072: cursor c_prv_ovn (v_prtt_rt_val_id number) is
6073: select prv.*
6074: ,abr.input_value_id
6189: close c_epe_pen;
6190: hr_utility.set_location('After epe fetch ' || l_proc,30);
6191: --
6192: g_sys_date := greatest(trunc(l_epe_pen_rec.enrt_perd_strt_dt),
6193: nvl(nvl(l_bckt_csd_pen_esd, g_bckt_csd_lf_evt_ocrd_dt), hr_api.g_sot),
6194: l_bckdt_pen_rec.effective_start_date);
6195: /*
6196: g_sys_date := greatest(trunc(sysdate),
6197: nvl(nvl(l_bckt_csd_pen_esd, g_bckt_csd_lf_evt_ocrd_dt), hr_api.g_sot) + 1,
6193: nvl(nvl(l_bckt_csd_pen_esd, g_bckt_csd_lf_evt_ocrd_dt), hr_api.g_sot),
6194: l_bckdt_pen_rec.effective_start_date);
6195: /*
6196: g_sys_date := greatest(trunc(sysdate),
6197: nvl(nvl(l_bckt_csd_pen_esd, g_bckt_csd_lf_evt_ocrd_dt), hr_api.g_sot) + 1,
6198: l_bckdt_pen_rec.effective_start_date);
6199: */
6200: --
6201: l_max_enrt_esd := greatest(g_sys_date, nvl(l_max_enrt_esd, hr_api.g_sot));
6197: nvl(nvl(l_bckt_csd_pen_esd, g_bckt_csd_lf_evt_ocrd_dt), hr_api.g_sot) + 1,
6198: l_bckdt_pen_rec.effective_start_date);
6199: */
6200: --
6201: l_max_enrt_esd := greatest(g_sys_date, nvl(l_max_enrt_esd, hr_api.g_sot));
6202: --
6203: --
6204: hr_utility.set_location('Date used to reinstate the enrollment = ' || g_sys_date, 333);
6205: if g_sys_date <= l_bckdt_pen_rec.effective_end_date
6388: p_ann_rt_val9 => l_rt_table(9).ann_rt_val,
6389: p_enrt_rt_id10 => l_rt_table(10).enrt_rt_id,
6390: p_rt_val10 => l_rt_table(10).dflt_val,
6391: p_ann_rt_val10 => l_rt_table(10).ann_rt_val,
6392: p_datetrack_mode => hr_api.g_insert, --
6393: p_suspend_flag => l_suspend_flag,
6394: p_called_from_sspnd => 'N',
6395: p_prtt_enrt_interim_id => l_prtt_enrt_interim_id,
6396: p_prtt_rt_val_id1 => l_prtt_rt_val_id1,
6935: ,p_enrt_cvg_thru_dt => l_enrt_table(i).bckdt_enrt_cvg_thru_dt
6936: ,p_enrt_ovridn_flag => 'Y'
6937: ,p_object_version_number => l_ovn
6938: ,p_effective_date => l_enrt_table(i).g_sys_date
6939: ,p_datetrack_mode => hr_api.g_correction
6940: ,p_multi_row_validate => FALSE);
6941: --
6942: end if;
6943: --
6989: ,p_cvg_thru_dt => l_dpnt_rec.cvg_thru_dt
6990: ,p_ovrdn_flag => l_dpnt_rec.ovrdn_flag
6991: ,p_ovrdn_thru_dt => l_dpnt_rec.ovrdn_thru_dt
6992: ,p_object_version_number => l_dpnt_rec.new_pdp_ovn
6993: ,p_datetrack_mode => hr_api.g_correction
6994: ,p_effective_date => l_enrt_table(i).g_sys_date);
6995: --
6996: end loop;
6997: --
7299: nvl(p_bckdt_epe_row.ENRT_CVG_STRT_DT_RL, -1) = nvl(p_current_epe_row.ENRT_CVG_STRT_DT_RL, -1) and
7300: nvl(p_bckdt_epe_row.DPNT_CVG_STRT_DT_CD, '$') = nvl(p_current_epe_row.DPNT_CVG_STRT_DT_CD, '$') and
7301: nvl(p_bckdt_epe_row.LER_CHG_DPNT_CVG_CD, '$') = nvl(p_current_epe_row.LER_CHG_DPNT_CVG_CD, '$') and
7302: nvl(p_bckdt_epe_row.DPNT_CVG_STRT_DT_RL, -1) = nvl(p_current_epe_row.DPNT_CVG_STRT_DT_RL, -1) and
7303: nvl(p_bckdt_epe_row.ENRT_CVG_STRT_DT, hr_api.g_eot) = nvl(p_current_epe_row.ENRT_CVG_STRT_DT, hr_api.g_eot) and
7304: nvl(p_bckdt_epe_row.ERLST_DEENRT_DT, hr_api.g_eot) = nvl(p_current_epe_row.ERLST_DEENRT_DT, hr_api.g_eot)
7305: then
7306: --
7307: -- Now check elig_dpnt rows for any differences.
7300: nvl(p_bckdt_epe_row.DPNT_CVG_STRT_DT_CD, '$') = nvl(p_current_epe_row.DPNT_CVG_STRT_DT_CD, '$') and
7301: nvl(p_bckdt_epe_row.LER_CHG_DPNT_CVG_CD, '$') = nvl(p_current_epe_row.LER_CHG_DPNT_CVG_CD, '$') and
7302: nvl(p_bckdt_epe_row.DPNT_CVG_STRT_DT_RL, -1) = nvl(p_current_epe_row.DPNT_CVG_STRT_DT_RL, -1) and
7303: nvl(p_bckdt_epe_row.ENRT_CVG_STRT_DT, hr_api.g_eot) = nvl(p_current_epe_row.ENRT_CVG_STRT_DT, hr_api.g_eot) and
7304: nvl(p_bckdt_epe_row.ERLST_DEENRT_DT, hr_api.g_eot) = nvl(p_current_epe_row.ERLST_DEENRT_DT, hr_api.g_eot)
7305: then
7306: --
7307: -- Now check elig_dpnt rows for any differences.
7308: --
7751: and pen.per_in_ler_id = pil.per_in_ler_id
7752: and pen.business_group_id = p_business_group_id
7753: and pil.business_group_id = p_business_group_id
7754: and pen.prtt_enrt_rslt_stat_cd is null
7755: and pen.effective_end_date = hr_api.g_eot
7756: and pen.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
7757: and (pen.enrt_cvg_thru_dt is null or
7758: pen.enrt_cvg_thru_dt = hr_api.g_eot
7759: );
7754: and pen.prtt_enrt_rslt_stat_cd is null
7755: and pen.effective_end_date = hr_api.g_eot
7756: and pen.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
7757: and (pen.enrt_cvg_thru_dt is null or
7758: pen.enrt_cvg_thru_dt = hr_api.g_eot
7759: );
7760: type t_bckt_csd_pen_table is table of c_bckt_csd_pen%rowtype index by binary_integer;
7761: l_bckt_csd_pil_enrt_table t_bckt_csd_pen_table;
7762: l_bckt_csd_pen_esd date;
7883: --
7884: hr_utility.set_location('After epe fetch ' || l_proc,30);
7885: --
7886: g_sys_date := greatest(trunc(p_enrt_perd_strt_dt),
7887: nvl(nvl(l_bckt_csd_pen_esd, g_bckt_csd_lf_evt_ocrd_dt), hr_api.g_sot),
7888: l_bckdt_pen_rec.effective_start_date);
7889: --
7890: l_max_enrt_esd := greatest(g_sys_date, nvl(l_max_enrt_esd, hr_api.g_sot));
7891: --
7886: g_sys_date := greatest(trunc(p_enrt_perd_strt_dt),
7887: nvl(nvl(l_bckt_csd_pen_esd, g_bckt_csd_lf_evt_ocrd_dt), hr_api.g_sot),
7888: l_bckdt_pen_rec.effective_start_date);
7889: --
7890: l_max_enrt_esd := greatest(g_sys_date, nvl(l_max_enrt_esd, hr_api.g_sot));
7891: --
7892: --
7893: hr_utility.set_location('Date used to reinstate the enrollment = ' || g_sys_date, 333);
7894: --
8079: p_ann_rt_val9 => l_rt_table(9).ann_rt_val,
8080: p_enrt_rt_id10 => l_rt_table(10).enrt_rt_id,
8081: p_rt_val10 => l_rt_table(10).dflt_val,
8082: p_ann_rt_val10 => l_rt_table(10).ann_rt_val,
8083: p_datetrack_mode => hr_api.g_insert,
8084: p_suspend_flag => l_suspend_flag,
8085: p_called_from_sspnd => 'N',
8086: p_prtt_enrt_interim_id => l_prtt_enrt_interim_id,
8087: p_prtt_rt_val_id1 => l_prtt_rt_val_id1,
8643: where prv1.prtt_enrt_rslt_id = v_bckdt_pen_id
8644: and prv2.prtt_enrt_rslt_id = v_new_pen_id
8645: and prv1.acty_base_rt_id = prv2.acty_base_rt_id
8646: and prv1.rt_ovridn_flag = 'Y'
8647: and nvl(prv1.rt_ovridn_thru_dt,hr_api.g_eot) >= prv2.rt_strt_dt -- Bug 4384574
8648: and prv1.prtt_rt_val_stat_cd = 'BCKDT'
8649: and prv2.prtt_rt_val_stat_cd is null
8650: and prv2.per_in_ler_id = p_per_in_ler_id
8651: and prv1.per_in_ler_id = p_bckdt_per_in_ler_id ;
8670: cursor c_ovn(v_prtt_enrt_rslt_id number) is
8671: select object_version_number
8672: from ben_prtt_enrt_rslt_f
8673: where prtt_enrt_rslt_id = v_prtt_enrt_rslt_id
8674: and effective_end_date = hr_api.g_eot;
8675: --
8676: cursor c_epe_enrt_rt(v_elig_per_elctbl_chc_id number,
8677: v_acty_base_rt_id number) is
8678: select ecr.elig_per_elctbl_chc_id
8854: ,p_enrt_ovrid_rsn_cd => p_enrt_table(i).enrt_ovrid_rsn_cd
8855: ,p_enrt_ovridn_flag => 'Y'
8856: ,p_object_version_number => l_ovn
8857: ,p_effective_date => p_enrt_table(i).g_sys_date
8858: ,p_datetrack_mode => hr_api.g_correction
8859: ,p_multi_row_validate => FALSE);
8860: --
8861: end if;
8862: --
9016: ,p_cvg_thru_dt => l_dpnt_rec.cvg_thru_dt
9017: ,p_ovrdn_flag => l_dpnt_rec.ovrdn_flag
9018: ,p_ovrdn_thru_dt => l_dpnt_rec.ovrdn_thru_dt
9019: ,p_object_version_number => l_dpnt_rec.new_pdp_ovn
9020: ,p_datetrack_mode => hr_api.g_correction
9021: ,p_effective_date => p_enrt_table(i).g_sys_date);
9022: --
9023: end loop;
9024: --
9207: AND pil_inner.person_id = p_person_id
9208: AND pil_inner.business_group_id = p_business_group_id
9209: AND pil_inner.per_in_ler_id = pen_inner.per_in_ler_id
9210: AND pen_inner.bkup_tbl_typ_cd = 'BEN_PRTT_ENRT_RSLT_F'
9211: AND ( (pen_inner.enrt_cvg_thru_dt IS NOT NULL and pen_inner.enrt_cvg_thru_dt <> hr_api.g_eot )
9212: and pen_inner.effective_end_date = hr_api.g_eot
9213: )
9214: AND pen_inner.comp_lvl_cd NOT IN('PLANFC','PLANIMP');
9215: --
9208: AND pil_inner.business_group_id = p_business_group_id
9209: AND pil_inner.per_in_ler_id = pen_inner.per_in_ler_id
9210: AND pen_inner.bkup_tbl_typ_cd = 'BEN_PRTT_ENRT_RSLT_F'
9211: AND ( (pen_inner.enrt_cvg_thru_dt IS NOT NULL and pen_inner.enrt_cvg_thru_dt <> hr_api.g_eot )
9212: and pen_inner.effective_end_date = hr_api.g_eot
9213: )
9214: AND pen_inner.comp_lvl_cd NOT IN('PLANFC','PLANIMP');
9215: --
9216: l_en_dtd_pen_bckdt_pil c_en_dtd_pen_bckdt_pil%ROWTYPE;
10053: and pil.business_group_id = p_business_group_id
10054: AND pil.per_in_ler_id = pen.per_in_ler_id
10055: and pen.bkup_tbl_typ_cd = 'BEN_PRTT_ENRT_RSLT_F'
10056: and ((pen.enrt_cvg_thru_dt is null or
10057: pen.enrt_cvg_thru_dt = hr_api.g_eot) and
10058: --bug#2604375 - added to control updated result rows for the same per_in_ler
10059: pen.effective_end_date = hr_api.g_eot
10060: )
10061: and pen.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
10055: and pen.bkup_tbl_typ_cd = 'BEN_PRTT_ENRT_RSLT_F'
10056: and ((pen.enrt_cvg_thru_dt is null or
10057: pen.enrt_cvg_thru_dt = hr_api.g_eot) and
10058: --bug#2604375 - added to control updated result rows for the same per_in_ler
10059: pen.effective_end_date = hr_api.g_eot
10060: )
10061: and pen.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
10062: and pen.bkup_tbl_id not in (
10063: select nvl(pen_inner.RPLCS_SSPNDD_RSLT_ID, -1)
10067: and pil_inner.person_id = p_person_id
10068: and pil_inner.business_group_id = p_business_group_id
10069: and pil_inner.per_in_ler_id = pen_inner.per_in_ler_id
10070: and (pen_inner.enrt_cvg_thru_dt is null or
10071: pen_inner.enrt_cvg_thru_dt = hr_api.g_eot
10072: )
10073: and pen_inner.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
10074: union
10075: select nvl(pen_inner.RPLCS_SSPNDD_RSLT_ID, -1)
10080: and pil_inner.business_group_id = p_business_group_id
10081: AND pil_inner.per_in_ler_id = pen_inner.per_in_ler_id
10082: and pen_inner.bkup_tbl_typ_cd = 'BEN_PRTT_ENRT_RSLT_F'
10083: and (pen_inner.enrt_cvg_thru_dt is null or
10084: pen_inner.enrt_cvg_thru_dt = hr_api.g_eot
10085: )
10086: and pen_inner.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
10087: )
10088: order by 1; -- pen.effective_end_date; -- Low to High
10248: and pen.per_in_ler_id = pil.per_in_ler_id
10249: and pen.business_group_id = p_business_group_id
10250: and pil.business_group_id = p_business_group_id
10251: and pen.prtt_enrt_rslt_stat_cd is null
10252: and pen.effective_end_date = hr_api.g_eot
10253: and pen.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
10254: and (pen.enrt_cvg_thru_dt is null or
10255: pen.enrt_cvg_thru_dt = hr_api.g_eot
10256: );
10251: and pen.prtt_enrt_rslt_stat_cd is null
10252: and pen.effective_end_date = hr_api.g_eot
10253: and pen.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
10254: and (pen.enrt_cvg_thru_dt is null or
10255: pen.enrt_cvg_thru_dt = hr_api.g_eot
10256: );
10257: type t_bckt_csd_pen_table is table of c_bckt_csd_pen%rowtype index by binary_integer;
10258: l_bckt_csd_pil_enrt_table t_bckt_csd_pen_table;
10259: l_bckt_csd_pen_esd date;
10268: where prv1.prtt_enrt_rslt_id = v_bckdt_pen_id
10269: and prv2.prtt_enrt_rslt_id = v_new_pen_id
10270: and prv1.acty_base_rt_id = prv2.acty_base_rt_id
10271: and prv1.rt_ovridn_flag = 'Y'
10272: and prv1.rt_end_dt <> hr_api.g_eot
10273: and prv1.rt_ovridn_thru_dt >= prv2.rt_strt_dt
10274: -- and prv1.prtt_rt_val_stat_cd is null
10275: and prv2.prtt_rt_val_stat_cd is null
10276: and prv2.per_in_ler_id = p_per_in_ler_id ;
10295: cursor c_ovn(v_prtt_enrt_rslt_id number) is
10296: select object_version_number
10297: from ben_prtt_enrt_rslt_f
10298: where prtt_enrt_rslt_id = v_prtt_enrt_rslt_id
10299: and effective_end_date = hr_api.g_eot;
10300: --
10301: cursor c_prv_ovn (v_prtt_rt_val_id number) is
10302: select prv.*
10303: ,abr.input_value_id
10318: where pen.person_id = p_person_id
10319: and pen.pl_id = p_pl_id
10320: and nvl(pen.oipl_id,-9999) = nvl(p_oipl_id,-9999) --5287988
10321: and pen.prtt_enrt_rslt_stat_cd is null
10322: and pen.enrt_cvg_thru_dt = hr_api.g_eot
10323: and pen.effective_end_date = hr_api.g_eot;
10324: --
10325: l_rslt_exists varchar2(30);
10326: --
10319: and pen.pl_id = p_pl_id
10320: and nvl(pen.oipl_id,-9999) = nvl(p_oipl_id,-9999) --5287988
10321: and pen.prtt_enrt_rslt_stat_cd is null
10322: and pen.enrt_cvg_thru_dt = hr_api.g_eot
10323: and pen.effective_end_date = hr_api.g_eot;
10324: --
10325: l_rslt_exists varchar2(30);
10326: --
10327: l_upd_rt_val boolean;
10453: --
10454: end if;
10455: --
10456: g_sys_date := greatest(trunc(sysdate),
10457: nvl(nvl(l_bckt_csd_pen_esd, g_bckt_csd_lf_evt_ocrd_dt), hr_api.g_sot) + 1,
10458: l_bckdt_pen_rec.effective_start_date);
10459: --
10460: l_max_enrt_esd := greatest(g_sys_date, nvl(l_max_enrt_esd, hr_api.g_sot));
10461: --
10456: g_sys_date := greatest(trunc(sysdate),
10457: nvl(nvl(l_bckt_csd_pen_esd, g_bckt_csd_lf_evt_ocrd_dt), hr_api.g_sot) + 1,
10458: l_bckdt_pen_rec.effective_start_date);
10459: --
10460: l_max_enrt_esd := greatest(g_sys_date, nvl(l_max_enrt_esd, hr_api.g_sot));
10461: --
10462: hr_utility.set_location('Date used to reinstate the enrollment = ' || g_sys_date, 333);
10463: if g_sys_date <= l_bckdt_pen_rec.effective_end_date
10464: then
10692: p_ann_rt_val9 => l_rt_table(9).ann_rt_val,
10693: p_enrt_rt_id10 => l_rt_table(10).enrt_rt_id,
10694: p_rt_val10 => l_rt_table(10).dflt_val,
10695: p_ann_rt_val10 => l_rt_table(10).ann_rt_val,
10696: p_datetrack_mode => hr_api.g_insert, -- 99999 l_datetrack_mode,
10697: p_suspend_flag => l_suspend_flag,
10698: p_called_from_sspnd => 'N',
10699: p_prtt_enrt_interim_id => l_prtt_enrt_interim_id,
10700: p_prtt_rt_val_id1 => l_prtt_rt_val_id1,
11224: ,p_enrt_cvg_thru_dt => l_enrt_table(i).bckdt_enrt_cvg_thru_dt
11225: ,p_enrt_ovridn_flag => 'Y'
11226: ,p_object_version_number => l_ovn
11227: ,p_effective_date => l_enrt_table(i).g_sys_date
11228: ,p_datetrack_mode => hr_api.g_correction
11229: ,p_multi_row_validate => FALSE);
11230: --
11231: end if;
11232: --
11275: ,p_cvg_thru_dt => l_dpnt_rec.cvg_thru_dt
11276: ,p_ovrdn_flag => l_dpnt_rec.ovrdn_flag
11277: ,p_ovrdn_thru_dt => l_dpnt_rec.ovrdn_thru_dt
11278: ,p_object_version_number => l_dpnt_rec.new_pdp_ovn
11279: ,p_datetrack_mode => hr_api.g_correction
11280: ,p_effective_date => l_enrt_table(i).g_sys_date);
11281: --
11282: end loop;
11283: --