540: -- END OF BEN_LER_CHG_PL_NIP_ENRT_F ----------------------
541: ---------------------------------------------------------------
542: ---
543: ---------------------------------------------------------------
544: -- START OF BEN_LER_RQRS_ENRT_CTFN_F ----------------------
545: ---------------------------------------------------------------
546: cursor c_lre_from_parent(c_PL_ID number) is
547: select distinct ler_rqrs_enrt_ctfn_id
548: from BEN_LER_RQRS_ENRT_CTFN_F
544: -- START OF BEN_LER_RQRS_ENRT_CTFN_F ----------------------
545: ---------------------------------------------------------------
546: cursor c_lre_from_parent(c_PL_ID number) is
547: select distinct ler_rqrs_enrt_ctfn_id
548: from BEN_LER_RQRS_ENRT_CTFN_F
549: where PL_ID = c_PL_ID ;
550: --
551: cursor c_lre(c_ler_rqrs_enrt_ctfn_id number,c_mirror_src_entity_result_id number,c_table_alias varchar2) is
552: select lre.*
549: where PL_ID = c_PL_ID ;
550: --
551: cursor c_lre(c_ler_rqrs_enrt_ctfn_id number,c_mirror_src_entity_result_id number,c_table_alias varchar2) is
552: select lre.*
553: from BEN_LER_RQRS_ENRT_CTFN_F lre
554: where lre.ler_rqrs_enrt_ctfn_id = c_ler_rqrs_enrt_ctfn_id
555: -- and lre.business_group_id = p_business_group_id
556: and not exists (
557: select /*+ */ null
560: where copy_entity_txn_id = p_copy_entity_txn_id
561: -- and trt.table_route_id = cpe.table_route_id
562: and ( -- c_mirror_src_entity_result_id is null or
563: mirror_src_entity_result_id = c_mirror_src_entity_result_id )
564: -- and trt.where_clause = 'BEN_LER_RQRS_ENRT_CTFN_F'
565: and cpe.table_alias = c_table_alias
566: and information1 = c_ler_rqrs_enrt_ctfn_id
567: -- and information4 = lre.business_group_id
568: and information2 = lre.effective_start_date
574: -- ,pqh_table_route trt
575: where copy_entity_txn_id = p_copy_entity_txn_id
576: -- and trt.table_route_id = cpe.table_route_id
577: and mirror_src_entity_result_id = c_mirror_src_entity_result_id
578: -- and trt.where_clause = 'BEN_LER_RQRS_ENRT_CTFN_F'
579: and cpe.table_alias = c_table_alias
580: and information1 = c_ler_rqrs_enrt_ctfn_id
581: -- and information4 = p_business_group_id
582: ;
582: ;
583:
584: l_out_lre_result_id number(15);
585: ---------------------------------------------------------------
586: -- END OF BEN_LER_RQRS_ENRT_CTFN_F ----------------------
587: ---------------------------------------------------------------
588: ---------------------------------------------------------------
589: -- START OF BEN_PL_PCP ----------------------
590: ---------------------------------------------------------------
4694: ---------------------------------------------------------------
4695: -- END OF BEN_LER_CHG_PL_NIP_ENRT_F ----------------------
4696: ---------------------------------------------------------------
4697: ---------------------------------------------------------------
4698: -- START OF BEN_LER_RQRS_ENRT_CTFN_F ----------------------
4699: ---------------------------------------------------------------
4700: --
4701: --
4702: for l_parent_rec in c_lre_from_parent(l_PL_ID) loop
4930: -- END OF BEN_LER_ENRT_CTFN_F ----------------------
4931: ---------------------------------------------------------------
4932: end loop;
4933: ---------------------------------------------------------------
4934: -- END OF BEN_LER_RQRS_ENRT_CTFN_F ----------------------
4935: ---------------------------------------------------------------
4936: ---------------------------------------------------------------
4937: -- START OF BEN_PL_PCP ----------------------
4938: ---------------------------------------------------------------
10295: ---------------------------------------------------------------
10296: -- END OF BEN_ENRT_CTFN_F ----------------------
10297: ---------------------------------------------------------------
10298: ---------------------------------------------------------------
10299: -- START OF BEN_LER_RQRS_ENRT_CTFN_F ----------------------
10300: ---------------------------------------------------------------
10301: cursor c_lre1_from_parent(c_OIPL_ID number) is
10302: select distinct ler_rqrs_enrt_ctfn_id
10303: from BEN_LER_RQRS_ENRT_CTFN_F
10299: -- START OF BEN_LER_RQRS_ENRT_CTFN_F ----------------------
10300: ---------------------------------------------------------------
10301: cursor c_lre1_from_parent(c_OIPL_ID number) is
10302: select distinct ler_rqrs_enrt_ctfn_id
10303: from BEN_LER_RQRS_ENRT_CTFN_F
10304: where OIPL_ID = c_OIPL_ID ;
10305: --
10306: cursor c_lre1(c_ler_rqrs_enrt_ctfn_id number,c_mirror_src_entity_result_id number,c_table_alias varchar2) is
10307: select lre.*
10304: where OIPL_ID = c_OIPL_ID ;
10305: --
10306: cursor c_lre1(c_ler_rqrs_enrt_ctfn_id number,c_mirror_src_entity_result_id number,c_table_alias varchar2) is
10307: select lre.*
10308: from BEN_LER_RQRS_ENRT_CTFN_F lre
10309: where lre.ler_rqrs_enrt_ctfn_id = c_ler_rqrs_enrt_ctfn_id
10310: -- and lre.business_group_id = p_business_group_id
10311: and not exists (
10312: select /*+ */ null
10315: where copy_entity_txn_id = p_copy_entity_txn_id
10316: -- and trt.table_route_id = cpe.table_route_id
10317: and ( -- c_mirror_src_entity_result_id is null or
10318: mirror_src_entity_result_id = c_mirror_src_entity_result_id )
10319: -- and trt.where_clause = 'BEN_LER_RQRS_ENRT_CTFN_F'
10320: and cpe.table_alias = c_table_alias
10321: and information1 = c_ler_rqrs_enrt_ctfn_id
10322: -- and information4 = lre.business_group_id
10323: and information2 = lre.effective_start_date
10330: -- pqh_table_route trt
10331: where copy_entity_txn_id = p_copy_entity_txn_id
10332: -- and trt.table_route_id = cpe.table_route_id
10333: and mirror_src_entity_result_id = c_mirror_src_entity_result_id
10334: -- and trt.where_clause = 'BEN_LER_RQRS_ENRT_CTFN_F'
10335: and cpe.table_alias = c_table_alias
10336: and information1 = c_ler_rqrs_enrt_ctfn_id
10337: -- and information4 = p_business_group_id
10338: ;
10336: and information1 = c_ler_rqrs_enrt_ctfn_id
10337: -- and information4 = p_business_group_id
10338: ;
10339: ---------------------------------------------------------------
10340: -- END OF BEN_LER_RQRS_ENRT_CTFN_F ----------------------
10341: ---------------------------------------------------------------
10342: ---------------------------------------------------------------
10343: -- START OF BEN_LER_ENRT_CTFN_F ----------------------
10344: ---------------------------------------------------------------
11300: ---------------------------------------------------------------
11301: -- END OF BEN_ENRT_CTFN_F ----------------------
11302: ---------------------------------------------------------------
11303: ---------------------------------------------------------------
11304: -- START OF BEN_LER_RQRS_ENRT_CTFN_F ----------------------
11305: ---------------------------------------------------------------
11306: --
11307: for l_parent_rec in c_lre1_from_parent(l_OIPL_ID) loop
11308: --
11510: -- END OF BEN_LER_ENRT_CTFN_F ----------------------
11511: ---------------------------------------------------------------
11512: end loop;
11513: ---------------------------------------------------------------
11514: -- END OF BEN_LER_RQRS_ENRT_CTFN_F ----------------------
11515: ---------------------------------------------------------------
11516:
11517: for l_parent_rec in c_opt1_from_parent(l_OIPL_ID) loop
11518: create_opt_result