752: ,pea.object_version_number
753: ,pea.effective_start_date
754: ,pea.effective_end_date
755: ,pil.lf_evt_ocrd_dt
756: from ben_prtt_enrt_actn_f pea,
757: ben_per_in_ler pil
758: where pea.prtt_enrt_rslt_id = p_prtt_enrt_rslt_id
759: and pea.business_group_id = p_business_group_id
760: and p_effective_date
765:
766: cursor c_min_max_dt(p_prtt_enrt_actn_id number) is
767: select min(effective_start_date),
768: max(effective_end_date)
769: from ben_prtt_enrt_actn_f
770: where prtt_enrt_actn_id = p_prtt_enrt_actn_id;
771: --
772: cursor c_pea_ovn(p_prtt_enrt_actn_id number,
773: p_effective_date date) is
771: --
772: cursor c_pea_ovn(p_prtt_enrt_actn_id number,
773: p_effective_date date) is
774: select pea.object_version_number
775: from ben_prtt_enrt_actn_f pea
776: where pea.prtt_enrt_actn_id = p_prtt_enrt_actn_id
777: and p_effective_date between pea.effective_start_date
778: and pea.effective_end_date ;
779: --
778: and pea.effective_end_date ;
779: --
780: cursor c_future_pea(p_prtt_enrt_actn_id number,p_effective_date date ) is
781: select *
782: from ben_prtt_enrt_actn_f
783: where prtt_enrt_actn_id = p_prtt_enrt_actn_id
784: and effective_start_date > p_effective_date
785: order by effective_start_date desc ;
786:
853: --
854: --Find if there are any future action items. If exists
855: --backup those rows.
856: --
857: --ben_prtt_enrt_actn_f
858: --
859: for l_pea in c_future_pea(l_bnf_types.prtt_enrt_actn_id,l_effective_date) loop
860: --
861: insert into BEN_LE_CLSN_N_RSTR (
914: PROGRAM_UPDATE_DATE,
915: OBJECT_VERSION_NUMBER,
916: PER_IN_LER_ENDED_ID)
917: values (
918: 'BEN_PRTT_ENRT_ACTN_F_UPD'
919: ,l_pea.PRTT_ENRT_ACTN_ID
920: ,l_pea.EFFECTIVE_START_DATE
921: ,l_pea.EFFECTIVE_END_DATE
922: ,l_pea.RQD_FLAG