[Home] [Help]
3560: from ben_copy_entity_results cpe,
3561: pqh_table_route tr
3562: where cpe.copy_entity_txn_id = p_copy_entity_txn_id
3563: and cpe.table_route_id = tr.table_route_id
3564: -- and tr.where_clause = l_BEN_ACTY_RT_PTD_LMT_F
3565: and tr.table_alias = l_table_alias
3566: and cpe.number_of_copies = 1 -- ADDITION
3567: group by cpe.information1,cpe.information2,cpe.information3, cpe.table_route_id ,cpe.dml_operation,cpe.datetrack_mode
3568: order by information1, information2; --added for bug: 5151945
3598: c_business_group_id number,
3599: c_new_pk_id number) is
3600: select
3601: APL1.acty_rt_ptd_lmt_id new_value
3602: from BEN_ACTY_RT_PTD_LMT_F APL1
3603: where
3604: APL1.ACTY_BASE_RT_ID = l_ACTY_BASE_RT_ID and
3605: APL1.PTD_LMT_ID = l_PTD_LMT_ID and
3606: APL1.business_group_id = c_business_group_id
3610: and effective_end_date ;
3611: --END TEMPIK
3612: /* TEMPIK
3613: and exists ( select null
3614: from BEN_ACTY_RT_PTD_LMT_F APL11
3615: where
3616: APL11.ACTY_BASE_RT_ID = l_ACTY_BASE_RT_ID and
3617: APL11.PTD_LMT_ID = l_PTD_LMT_ID and
3618: APL11.business_group_id = c_business_group_id
3617: APL11.PTD_LMT_ID = l_PTD_LMT_ID and
3618: APL11.business_group_id = c_business_group_id
3619: and APL11.effective_start_date <= c_effective_start_date )
3620: and exists ( select null
3621: from BEN_ACTY_RT_PTD_LMT_F APL12
3622: where
3623: APL12.ACTY_BASE_RT_ID = l_ACTY_BASE_RT_ID and
3624: APL12.PTD_LMT_ID = l_PTD_LMT_ID and
3625: APL12.business_group_id = c_business_group_id
3767: fetch c_find_APL1_in_target into l_new_value ;
3768: if c_find_APL1_in_target%found then
3769: --TEMPIK
3770: l_dt_rec_found := dt_api.check_min_max_dates
3771: (p_base_table_name => 'BEN_ACTY_RT_PTD_LMT_F',
3772: p_base_key_column => 'ACTY_RT_PTD_LMT_ID',
3773: p_base_key_value => l_new_value,
3774: p_from_date => l_min_esd,
3775: p_to_date => l_max_eed );
3834: -- if l_first_rec then
3835: if l_first_rec and not l_update then
3836: -- UPD END
3837: -- Call Create routine.
3838: hr_utility.set_location(' BEN_ACTY_RT_PTD_LMT_F CREATE_ACTY_RT_PTD_LMT ',20);
3839: BEN_ACTY_RT_PTD_LMT_API.CREATE_ACTY_RT_PTD_LMT(
3840: --
3841: P_VALIDATE => false
3842: ,P_EFFECTIVE_DATE => l_effective_date
3899: else
3900: --
3901: -- Call Update routine for the pk_id created in prev run .
3902: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
3903: hr_utility.set_location(' BEN_ACTY_RT_PTD_LMT_F UPDATE_ACTY_RT_PTD_LMT ',30);
3904:
3905: --UPD START
3906: hr_utility.set_location('Before call to get_dt_modes l_dt_mode'||l_datetrack_mode,5);
3907: --