3471: between ler.effective_start_date
3472: and ler.effective_end_date
3473: and ler.typ_cd = 'IREC';
3474: --
3475: cursor c_ben_pil_elctbl_chc_popl (p_per_in_ler_id number) is
3476: select pel.pil_elctbl_chc_popl_id,
3477: pel.object_version_number
3478: from ben_pil_elctbl_chc_popl pel,
3479: ben_per_in_ler pil
3474: --
3475: cursor c_ben_pil_elctbl_chc_popl (p_per_in_ler_id number) is
3476: select pel.pil_elctbl_chc_popl_id,
3477: pel.object_version_number
3478: from ben_pil_elctbl_chc_popl pel,
3479: ben_per_in_ler pil
3480: where pil.per_in_ler_id = p_per_in_ler_id
3481: and pil.business_group_id = p_business_group_id
3482: and pel.per_in_ler_id = pil.per_in_ler_id
3590: ,P_STRTD_DT => l_strtd_dt
3591: ,P_VOIDD_DT => l_voidd_dt );
3592:
3593: -- update PEL
3594: open c_ben_pil_elctbl_chc_popl(l_pil_rec.per_in_ler_id) ;
3595:
3596: loop
3597:
3598: fetch c_ben_pil_elctbl_chc_popl into l_pel_pk_id,
3594: open c_ben_pil_elctbl_chc_popl(l_pil_rec.per_in_ler_id) ;
3595:
3596: loop
3597:
3598: fetch c_ben_pil_elctbl_chc_popl into l_pel_pk_id,
3599: l_pel_object_version_number;
3600: exit when c_ben_pil_elctbl_chc_popl%notfound;
3601: --
3602: --
3596: loop
3597:
3598: fetch c_ben_pil_elctbl_chc_popl into l_pel_pk_id,
3599: l_pel_object_version_number;
3600: exit when c_ben_pil_elctbl_chc_popl%notfound;
3601: --
3602: --
3603: ben_pil_elctbl_chc_popl_api.update_pil_elctbl_chc_popl
3604: (p_validate => false,
3599: l_pel_object_version_number;
3600: exit when c_ben_pil_elctbl_chc_popl%notfound;
3601: --
3602: --
3603: ben_pil_elctbl_chc_popl_api.update_pil_elctbl_chc_popl
3604: (p_validate => false,
3605: p_pil_elctbl_chc_popl_id => l_pel_pk_id,
3606: p_pil_elctbl_popl_stat_cd => 'BCKDT',
3607: p_object_version_number => l_pel_object_version_number,
3608: p_effective_date => p_effective_date);
3609:
3610: end loop;
3611:
3612: close c_ben_pil_elctbl_chc_popl;
3613:
3614: -- update PPL
3615: --
3616: -- If lf event occured date is different then update the life event