3911: and cer.dml_operation = 'DELETE'
3912: and table_alias in ('CPP','CEP','EPA','COP','OPT','ABR');
3913:
3914: -- Set for same Business Group
3915: BEN_PD_COPY_TO_BEN_ONE.g_mapping_done := false ;
3916:
3917: -- Copied the following 4 calls from ben_plan_design_copy_process.process
3918: -- Populate table_route_id in staging table
3919: ben_plan_design_wizard_api.write_route_and_hierarchy(p_copy_entity_txn_id);
3930: and nvl(information3,p_effective_date)
3931: and cer.dml_operation = 'DELETE';
3932:
3933: -- Initialise
3934: ben_pd_copy_to_ben_one.init_table_data_in_cer(p_copy_entity_txn_id);
3935:
3936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl.delete;
3937: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(0) := null ;
3938: BEN_PD_COPY_TO_BEN_ONE.g_count := 1 ;
3932:
3933: -- Initialise
3934: ben_pd_copy_to_ben_one.init_table_data_in_cer(p_copy_entity_txn_id);
3935:
3936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl.delete;
3937: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(0) := null ;
3938: BEN_PD_COPY_TO_BEN_ONE.g_count := 1 ;
3939:
3940: -- Create all derived factors first
3933: -- Initialise
3934: ben_pd_copy_to_ben_one.init_table_data_in_cer(p_copy_entity_txn_id);
3935:
3936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl.delete;
3937: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(0) := null ;
3938: BEN_PD_COPY_TO_BEN_ONE.g_count := 1 ;
3939:
3940: -- Create all derived factors first
3941:
3934: ben_pd_copy_to_ben_one.init_table_data_in_cer(p_copy_entity_txn_id);
3935:
3936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl.delete;
3937: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(0) := null ;
3938: BEN_PD_COPY_TO_BEN_ONE.g_count := 1 ;
3939:
3940: -- Create all derived factors first
3941:
3942: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CLF') then
3938: BEN_PD_COPY_TO_BEN_ONE.g_count := 1 ;
3939:
3940: -- Create all derived factors first
3941:
3942: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CLF') then
3943: hr_utility.set_location(' Calling create CLF rows ',999);
3944: BEN_PD_COPY_TO_BEN_ONE.create_CLF_rows(
3945: p_copy_entity_txn_id => p_copy_entity_txn_id
3946: ,p_effective_date => p_effective_date
3940: -- Create all derived factors first
3941:
3942: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CLF') then
3943: hr_utility.set_location(' Calling create CLF rows ',999);
3944: BEN_PD_COPY_TO_BEN_ONE.create_CLF_rows(
3945: p_copy_entity_txn_id => p_copy_entity_txn_id
3946: ,p_effective_date => p_effective_date
3947: ,p_reuse_object_flag => 'Y'
3948: ,p_target_business_group_id => p_business_group_id
3948: ,p_target_business_group_id => p_business_group_id
3949: );
3950: end if;
3951: --
3952: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('HWF') then
3953: hr_utility.set_location(' Calling create HWF rows ',999);
3954: BEN_PD_COPY_TO_BEN_ONE.create_HWF_rows(
3955: p_copy_entity_txn_id => p_copy_entity_txn_id
3956: ,p_effective_date => p_effective_date
3950: end if;
3951: --
3952: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('HWF') then
3953: hr_utility.set_location(' Calling create HWF rows ',999);
3954: BEN_PD_COPY_TO_BEN_ONE.create_HWF_rows(
3955: p_copy_entity_txn_id => p_copy_entity_txn_id
3956: ,p_effective_date => p_effective_date
3957: ,p_reuse_object_flag => 'Y'
3958: ,p_target_business_group_id => p_business_group_id
3958: ,p_target_business_group_id => p_business_group_id
3959: );
3960: end if;
3961: --
3962: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('AGF') then
3963: hr_utility.set_location(' Calling create AGF rows ',999);
3964: BEN_PD_COPY_TO_BEN_ONE.create_AGF_rows(
3965: p_copy_entity_txn_id => p_copy_entity_txn_id
3966: ,p_effective_date => p_effective_date
3960: end if;
3961: --
3962: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('AGF') then
3963: hr_utility.set_location(' Calling create AGF rows ',999);
3964: BEN_PD_COPY_TO_BEN_ONE.create_AGF_rows(
3965: p_copy_entity_txn_id => p_copy_entity_txn_id
3966: ,p_effective_date => p_effective_date
3967: ,p_reuse_object_flag => 'Y'
3968: ,p_target_business_group_id => p_business_group_id
3968: ,p_target_business_group_id => p_business_group_id
3969: );
3970: end if;
3971: --
3972: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LSF') then
3973: hr_utility.set_location(' Calling create LSF rows ',999);
3974: BEN_PD_COPY_TO_BEN_ONE.create_LSF_rows(
3975: p_copy_entity_txn_id => p_copy_entity_txn_id
3976: ,p_effective_date => p_effective_date
3970: end if;
3971: --
3972: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LSF') then
3973: hr_utility.set_location(' Calling create LSF rows ',999);
3974: BEN_PD_COPY_TO_BEN_ONE.create_LSF_rows(
3975: p_copy_entity_txn_id => p_copy_entity_txn_id
3976: ,p_effective_date => p_effective_date
3977: ,p_reuse_object_flag => 'Y'
3978: ,p_target_business_group_id => p_business_group_id
3978: ,p_target_business_group_id => p_business_group_id
3979: );
3980: end if;
3981: --
3982: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PFF') then
3983: hr_utility.set_location(' Calling create PFF rows ',999);
3984: BEN_PD_COPY_TO_BEN_ONE.create_PFF_rows(
3985: p_copy_entity_txn_id => p_copy_entity_txn_id
3986: ,p_effective_date => p_effective_date
3980: end if;
3981: --
3982: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PFF') then
3983: hr_utility.set_location(' Calling create PFF rows ',999);
3984: BEN_PD_COPY_TO_BEN_ONE.create_PFF_rows(
3985: p_copy_entity_txn_id => p_copy_entity_txn_id
3986: ,p_effective_date => p_effective_date
3987: ,p_reuse_object_flag => 'Y'
3988: ,p_target_business_group_id => p_business_group_id
3988: ,p_target_business_group_id => p_business_group_id
3989: );
3990: end if;
3991: --
3992: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CLA') then
3993: hr_utility.set_location(' Calling create CLA rows ',999);
3994: BEN_PD_COPY_TO_BEN_ONE.create_CLA_rows(
3995: p_copy_entity_txn_id => p_copy_entity_txn_id
3996: ,p_effective_date => p_effective_date
3990: end if;
3991: --
3992: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CLA') then
3993: hr_utility.set_location(' Calling create CLA rows ',999);
3994: BEN_PD_COPY_TO_BEN_ONE.create_CLA_rows(
3995: p_copy_entity_txn_id => p_copy_entity_txn_id
3996: ,p_effective_date => p_effective_date
3997: ,p_reuse_object_flag => 'Y'
3998: ,p_target_business_group_id => p_business_group_id
4002: --
4003: -- Create ELP Row
4004: --
4005:
4006: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ELP') then
4007: hr_utility.set_location(' Calling create ELP rows ',999);
4008: BEN_PD_COPY_TO_BEN_ONE.create_ELP_rows(
4009: p_copy_entity_txn_id => p_copy_entity_txn_id
4010: ,p_effective_date => p_effective_date
4004: --
4005:
4006: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ELP') then
4007: hr_utility.set_location(' Calling create ELP rows ',999);
4008: BEN_PD_COPY_TO_BEN_ONE.create_ELP_rows(
4009: p_copy_entity_txn_id => p_copy_entity_txn_id
4010: ,p_effective_date => p_effective_date
4011: ,p_reuse_object_flag => 'Y'
4012: ,p_target_business_group_id => p_business_group_id