1156: and a.effective_end_date = (select max(b.effective_end_date)
1157: from BEN_ELIG_DPNT_CVRD_OTHR_PGM_F b
1158: where a.elig_dpnt_cvrd_othr_pgm_id = b.elig_dpnt_cvrd_othr_pgm_id);
1159:
1160: cursor BEN_ELIG_DPNT_CVRD_OTHR_PL_F is
1161: select a.elig_dpnt_cvrd_othr_pl_id, a.object_version_number, a.effective_end_date eed
1162: from BEN_ELIG_DPNT_CVRD_OTHR_PL_F a
1163: where a.eligy_prfl_id = p_eligy_prfl_id
1164: and a.effective_end_date = (select max(b.effective_end_date)
1158: where a.elig_dpnt_cvrd_othr_pgm_id = b.elig_dpnt_cvrd_othr_pgm_id);
1159:
1160: cursor BEN_ELIG_DPNT_CVRD_OTHR_PL_F is
1161: select a.elig_dpnt_cvrd_othr_pl_id, a.object_version_number, a.effective_end_date eed
1162: from BEN_ELIG_DPNT_CVRD_OTHR_PL_F a
1163: where a.eligy_prfl_id = p_eligy_prfl_id
1164: and a.effective_end_date = (select max(b.effective_end_date)
1165: from BEN_ELIG_DPNT_CVRD_OTHR_PL_F b
1166: where a.elig_dpnt_cvrd_othr_pl_id = b.elig_dpnt_cvrd_othr_pl_id);
1161: select a.elig_dpnt_cvrd_othr_pl_id, a.object_version_number, a.effective_end_date eed
1162: from BEN_ELIG_DPNT_CVRD_OTHR_PL_F a
1163: where a.eligy_prfl_id = p_eligy_prfl_id
1164: and a.effective_end_date = (select max(b.effective_end_date)
1165: from BEN_ELIG_DPNT_CVRD_OTHR_PL_F b
1166: where a.elig_dpnt_cvrd_othr_pl_id = b.elig_dpnt_cvrd_othr_pl_id);
1167:
1168: cursor BEN_ELIG_DPNT_CVRD_OTHR_PTIP_F is
1169: select a.elig_dpnt_cvrd_othr_ptip_id, a.object_version_number, a.effective_end_date eed
1734: ,p_effective_date => l_effective_date
1735: ,p_datetrack_mode => p_datetrack_mode);
1736: end if;
1737: end loop;
1738: for l_row in BEN_ELIG_DPNT_CVRD_OTHR_PL_F loop
1739: if (p_datetrack_mode = hr_api.g_delete and l_row.eed > p_effective_date)
1740: or p_datetrack_mode <> hr_api.g_delete then
1741: if p_datetrack_mode = hr_api.g_zap then
1742: l_effective_date := l_row.eed;