[Home] [Help]
13218: --
13219: l_CVG_STRT_RL number;
13220: l_CVG_THRU_RL number;
13221: l_DPNT_CVG_ELIGY_PRFL_ID number;
13222: l_STDNT_STAT_CD ben_elig_stdnt_stat_cvg_f.stdnt_stat_cd%type;
13223: cursor c_unique_ESC(l_table_alias varchar2) is
13224: select distinct cpe.information1,
13225: cpe.information2,
13226: cpe.information3,
13229: from ben_copy_entity_results cpe,
13230: pqh_table_route tr
13231: where cpe.copy_entity_txn_id = p_copy_entity_txn_id
13232: and cpe.table_route_id = tr.table_route_id
13233: -- and tr.where_clause = l_BEN_ELIG_STDNT_STAT_CVG_F
13234: and tr.table_alias = l_table_alias
13235: and cpe.number_of_copies = 1 -- ADDITION
13236: group by cpe.information1,cpe.information2,cpe.information3,cpe.table_route_id,cpe.dml_operation,cpe.datetrack_mode
13237: order by information1, information2; --added for bug: 5151945
13267: c_business_group_id number,
13268: c_new_pk_id number) is
13269: select
13270: ESC.elig_stdnt_stat_cvg_id new_value
13271: from BEN_ELIG_STDNT_STAT_CVG_F ESC
13272: where
13273: nvl(ESC.DPNT_CVG_ELIGY_PRFL_ID,-999) = nvl(l_DPNT_CVG_ELIGY_PRFL_ID,-999) and
13274: ESC.STDNT_STAT_CD = l_STDNT_STAT_CD and
13275: ESC.business_group_id = c_business_group_id
13279: and effective_end_date ;
13280: --END TEMPIK
13281: /*TEMPIK
13282: and exists ( select null
13283: from BEN_ELIG_STDNT_STAT_CVG_F ESC1
13284: where
13285: nvl(ESC1.DPNT_CVG_ELIGY_PRFL_ID,-999) = nvl(l_DPNT_CVG_ELIGY_PRFL_ID,-999) and
13286: ESC1.STDNT_STAT_CD = l_STDNT_STAT_CD and
13287: ESC1.business_group_id = c_business_group_id
13286: ESC1.STDNT_STAT_CD = l_STDNT_STAT_CD and
13287: ESC1.business_group_id = c_business_group_id
13288: and ESC1.effective_start_date <= c_effective_start_date )
13289: and exists ( select null
13290: from BEN_ELIG_STDNT_STAT_CVG_F ESC2
13291: where
13292: nvl(ESC2.DPNT_CVG_ELIGY_PRFL_ID,-999) = nvl(l_DPNT_CVG_ELIGY_PRFL_ID,-999) and
13293: ESC2.STDNT_STAT_CD = l_STDNT_STAT_CD and
13294: ESC2.business_group_id = c_business_group_id
13436: fetch c_find_ESC_in_target into l_new_value ;
13437: if c_find_ESC_in_target%found then
13438: --TEMPIK
13439: l_dt_rec_found := dt_api.check_min_max_dates
13440: (p_base_table_name => 'BEN_ELIG_STDNT_STAT_CVG_F',
13441: p_base_key_column => 'ELIG_STDNT_STAT_CVG_ID',
13442: p_base_key_value => l_new_value,
13443: p_from_date => l_min_esd,
13444: p_to_date => l_max_eed );
13498:
13499: --if l_first_rec then
13500: if l_first_rec and not l_update then
13501: -- Call Create routine.
13502: hr_utility.set_location(' BEN_ELIG_STDNT_STAT_CVG_F CREATE_ELIG_STDNT_STAT_CVG ',20);
13503: BEN_ELIG_STDNT_STAT_CVG_API.CREATE_ELIG_STDNT_STAT_CVG(
13504: --
13505: P_VALIDATE => false
13506: ,P_EFFECTIVE_DATE => l_effective_date
13567: else
13568: --
13569: -- Call Update routine for the pk_id created in prev run .
13570: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
13571: hr_utility.set_location(' BEN_ELIG_STDNT_STAT_CVG_F UPDATE_ELIG_STDNT_STAT_CVG ',30);
13572: --UPD START
13573: hr_utility.set_location('Before call to get_dt_modes l_dt_mode'||l_datetrack_mode,5);
13574: --
13575: if l_update then