[Home] [Help]
PACKAGE BODY: APPS.BEN_PLAN_DESIGN_ELPRO_MODULE
Source
1 Package Body ben_plan_design_elpro_module as
2 /* $Header: bepdcprf.pkb 120.5 2006/02/28 03:29:19 rgajula noship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' ben_plan_design_elpro_module.';
7
8 --
9 -- Bug No: 3451872
10 --
11 function get_subj_to_cobra_message
12 (
13 p_subj_flag in varchar2
14 ) return varchar2 is
15 l_subj_message fnd_new_messages.message_text%type := null;
16 begin
17 if p_subj_flag = 'Y' then
18 l_subj_message := fnd_message.get_string('BEN','BEN_93608_PDC_SUBJ_TO_COBRA');
19 end if;
20 --
21 return l_subj_message;
22 end get_subj_to_cobra_message;
23 --
24
25 --
26 -- Bug No: 3451872
27 --
28 function get_quald_bnf_message
29 (
30 p_bnf_flag in varchar2
31 ) return varchar2 is
32 l_bnf_message fnd_new_messages.message_text%type := null;
33 begin
34 if p_bnf_flag = 'Y' then
35 l_bnf_message := fnd_message.get_string('BEN','BEN_93607_PDC_COBRA_BEN');
36 end if;
37 --
38 return l_bnf_message;
39 end get_quald_bnf_message;
40 --
41
42 --
43 -- Bug No: 3451872
44 --
45 function get_det_enrl_det_dt_name
46 (
47 p_lookup_code in varchar2
48 ,p_lookup_type in varchar2
49 ) return varchar2 is
50 cursor c_lookup_meaning(c_lookup_code in varchar2,c_lookup_type in varchar2) is
51 select hl.meaning
52 from hr_lookups hl
53 where hl.lookup_code = c_lookup_code
54 and hl.lookup_type = c_lookup_type;
55 l_det_dt_meaning hr_lookups.meaning%type;
56 begin
57 -- Begin: Fetch Lookup Meaning for determination or enrollment date code
58 l_det_dt_meaning := null ;
59 open c_lookup_meaning(p_lookup_code,p_lookup_type);
60 fetch c_lookup_meaning into l_det_dt_meaning;
61 close c_lookup_meaning;
62 --
63 return l_det_dt_meaning;
64 end get_det_enrl_det_dt_name;
65 --
66 -- Bug 4169120 : Rate By Criteria
67 ---------------------------------------------------------------
68 -----------------< map_org_pos_hierarchy >---------------------
69 ---------------------------------------------------------------
70 --
71 PROCEDURE map_org_pos_hierarchy (
72 p_val_type_cd IN VARCHAR2,
73 p_number1 IN NUMBER,
74 p_number2 IN NUMBER,
75 p_org_stru_name OUT NOCOPY VARCHAR2,
76 p_start_org_name OUT NOCOPY VARCHAR2,
77 p_pos_stru_name OUT NOCOPY VARCHAR2,
78 p_start_pos_name OUT NOCOPY VARCHAR2,
79 p_effective_date IN DATE,
80 p_business_group_id IN NUMBER
81 )
82 IS
83 --
84 CURSOR c_org_stru_name (
85 cv_org_stru_ver_id NUMBER,
86 cv_effective_date DATE,
87 cv_business_group_id NUMBER
88 )
89 IS
90 SELECT os.NAME
91 FROM per_organization_structures_v os,
92 per_org_structure_versions osv
93 WHERE os.business_group_id = p_business_group_id
94 AND os.organization_structure_id = osv.organization_structure_id
95 AND osv.org_structure_version_id = cv_org_stru_ver_id
96 AND p_effective_date BETWEEN osv.date_from
97 AND NVL (osv.date_to, p_effective_date);
98 --
99 CURSOR c_start_org_name (
100 cv_start_org_id NUMBER,
101 cv_business_group_id NUMBER
102 )
103 IS
104 SELECT NAME
105 FROM hr_all_organization_units org
106 WHERE org.organization_id = cv_start_org_id
107 AND business_group_id = p_business_group_id;
108 --
109 CURSOR c_pos_stru_name (
110 cv_pos_stru_ver_id NUMBER,
111 cv_effective_date DATE,
112 cv_business_group_id NUMBER
113 )
114 IS
115 SELECT ps.NAME
116 FROM per_position_structures_v ps, per_pos_structure_versions psv
117 WHERE ps.business_group_id = p_business_group_id
118 AND ps.position_structure_id = psv.position_structure_id
119 AND psv.pos_structure_version_id = cv_pos_stru_ver_id
120 AND p_effective_date BETWEEN psv.date_from
121 AND NVL (psv.date_to, p_effective_date);
122 --
123 CURSOR c_start_pos_name (
124 cv_start_pos_id NUMBER,
125 cv_business_group_id NUMBER,
126 cv_effective_date DATE
127 )
128 IS
129 SELECT NAME
130 FROM hr_all_positions_f_vl pos
131 WHERE position_id = cv_start_pos_id
132 AND business_group_id = cv_business_group_id
133 AND cv_effective_date between pos.effective_start_date
134 and pos.effective_end_date;
135 --
136 BEGIN
137 --
138 if p_val_type_cd = 'ORG_HIER'
139 then
140 --
141 open c_org_stru_name ( cv_org_stru_ver_id => p_number1,
142 cv_effective_date => p_effective_date,
143 cv_business_group_id => p_business_group_id);
144 --
145 fetch c_org_stru_name into p_org_stru_name;
146 --
147 close c_org_stru_name;
148 --
149 open c_start_org_name ( cv_start_org_id => p_number2,
150 cv_business_group_id => p_business_group_id);
151 --
152 fetch c_start_org_name into p_start_org_name;
153 --
154 close c_start_org_name;
155 --
156 elsif p_val_type_cd = 'POS_HIER'
157 then
158 --
159 open c_pos_stru_name ( cv_pos_stru_ver_id => p_number1,
160 cv_effective_date => p_effective_date,
161 cv_business_group_id => p_business_group_id);
162 --
163 fetch c_pos_stru_name into p_pos_stru_name;
164 --
165 close c_pos_stru_name;
166 --
167 open c_start_pos_name ( cv_start_pos_id => p_number2,
168 cv_business_group_id => p_business_group_id,
169 cv_effective_date => p_effective_date);
170 --
171 fetch c_start_pos_name into p_start_pos_name;
172 --
173 close c_start_pos_name;
174 --
175 end if;
176 --
177 END map_org_pos_hierarchy;
178 --
179
180
181 --
182 -- This procedure is used to create a row for each of the comp objects
183 -- selected by the end user on search page into
184 -- pqh_copy_entity_txn table.
185 -- This procedure should also copy all the child table data into
186 -- above table as well.
187 --
188 procedure create_elpro_results
189 (
190 p_validate in number default 0 -- false
191 ,p_copy_entity_result_id in number -- Source Elpro
192 ,p_copy_entity_txn_id in number default null
193 ,p_pgm_id in number default null
194 ,p_ptip_id in number default null
195 ,p_plip_id in number default null
196 ,p_pl_id in number default null
197 ,p_oipl_id in number default null
198 ,p_business_group_id in number default null
199 ,p_number_of_copies in number default 0
200 ,p_object_version_number out nocopy number
201 ,p_effective_date in date
202 ,p_parent_entity_result_id in number
203 ) is
204 l_copy_entity_result_id ben_copy_entity_results.copy_entity_result_id%TYPE;
205 l_proc varchar2(72) := g_package||'create_elpro_results';
206 l_object_version_number ben_copy_entity_results.object_version_number%TYPE;
207 --
208 l_cv_result_type_cd varchar2(30) := 'DISPLAY' ;
209 --
210 --
211
212 --
213 cursor c_parent_result(c_parent_pk_id number,
214 -- c_parent_table_name varchar2,
215 c_parent_table_alias varchar2,
216 c_copy_entity_txn_id number) is
217 select copy_entity_result_id mirror_src_entity_result_id
218 from ben_copy_entity_results cpe
219 -- pqh_table_route trt
220 where cpe.information1= c_parent_pk_id
221 -- and cpe.result_type_cd = 'DISPLAY'
222 and cpe.result_type_cd = l_cv_result_type_cd
223 and cpe.copy_entity_txn_id = c_copy_entity_txn_id
224 -- and cpe.table_route_id = trt.table_route_id
225 --and trt.from_clause = 'OAB'
226 --and trt.where_clause = upper(c_parent_table_name) ;
227 and cpe.table_alias = c_parent_table_alias ;
228 ---
229 -- Bug : 3752407 : Global cursor g_table_route will now be used
230 -- Cursor to get table_route_id
231 --cursor c_table_route(c_parent_table_name varchar2) is
232 -- cursor c_table_route(c_parent_table_alias varchar2) is
233 -- select table_route_id
234 -- from pqh_table_route trt
235 -- where --trt.from_clause = 'OAB'
236 --and trt.where_clause = upper(c_parent_table_name) ;
237 -- trt.table_alias = c_parent_table_alias ;
238 ---
239 ---------------------------------------------------------------
240 -- START OF BEN_PRTN_ELIG_F ----------------------
241 ---------------------------------------------------------------
242 cursor c_epa_from_parent(c_pgm_id number,c_ptip_id number,c_plip_id number,
243 c_pl_id number,c_oipl_id number) is
244 select distinct prtn_elig_id
245 from BEN_PRTN_ELIG_F
246 where (c_pgm_id is not null and pgm_id = c_pgm_id ) or
247 (c_ptip_id is not null and ptip_id = c_ptip_id ) or
248 (c_plip_id is not null and plip_id = c_plip_id ) or
249 (c_pl_id is not null and pl_id = c_pl_id ) or
250 (c_oipl_id is not null and oipl_id = c_oipl_id ) ;
251 --
252 cursor c_epa(c_prtn_elig_id number,c_mirror_src_entity_result_id number,
253 c_table_alias varchar2 ) is
254 select epa.*
255 from BEN_PRTN_ELIG_F epa
256 where epa.prtn_elig_id = c_prtn_elig_id
257 -- and epa.business_group_id = p_business_group_id
258 and not exists (
259 select /* */ null
260 from ben_copy_entity_results cpe
261 -- pqh_table_route trt
262 where copy_entity_txn_id = p_copy_entity_txn_id
263 -- and trt.table_route_id = cpe.table_route_id
264 and ( -- c_mirror_src_entity_result_id is null or
265 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
266 -- and trt.where_clause = 'BEN_PRTN_ELIG_F'
267 and cpe.table_alias = c_table_alias
268 and information1 = c_prtn_elig_id
269 -- and information4 = epa.business_group_id
270 and information2 = epa.effective_start_date
271 and information3 = epa.effective_end_date
272 );
273 l_prtn_elig_id number(15);
274 l_out_epa_result_id number(15);
275 ---------------------------------------------------------------
276 -- END OF BEN_PRTN_ELIG_F ----------------------
277 ---------------------------------------------------------------
278 ---------------------------------------------------------------
279 -- START OF BEN_PRTN_ELIG_PRFL_F ----------------------
280 ---------------------------------------------------------------
281 cursor c_cep_from_parent(c_PRTN_ELIG_ID number) is
282 select distinct prtn_elig_prfl_id
283 from BEN_PRTN_ELIG_PRFL_F
284 where PRTN_ELIG_ID = c_PRTN_ELIG_ID;
285 --
286 cursor c_cep(c_prtn_elig_prfl_id number,c_mirror_src_entity_result_id number ,
287 c_table_alias varchar2 ) is
288 select cep.*
289 from BEN_PRTN_ELIG_PRFL_F cep
290 where cep.prtn_elig_prfl_id = c_prtn_elig_prfl_id
291 -- and cep.business_group_id = p_business_group_id
292 and not exists (
293 select /* */ null
294 from ben_copy_entity_results cpe
295 -- pqh_table_route trt
296 where copy_entity_txn_id = p_copy_entity_txn_id
297 -- and trt.table_route_id = cpe.table_route_id
298 and ( -- c_mirror_src_entity_result_id is null or
299 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
300 -- and trt.where_clause = 'BEN_PRTN_ELIG_PRFL_F'
301 and cpe.table_alias = c_table_alias
302 and information1 = c_prtn_elig_prfl_id
303 -- and information4 = cep.business_group_id
304 and information2 = cep.effective_start_date
305 and information3 = cep.effective_end_date
306 );
307 l_prtn_elig_prfl_id number(15);
308 l_out_cep_result_id number(15);
309 ---------------------------------------------------------------
310 -- END OF BEN_PRTN_ELIG_PRFL_F ----------------------
311 ---------------------------------------------------------------
312
313 cursor c_elp_from_parent(c_PRTN_ELIG_PRFL_ID number) is
314 select distinct eligy_prfl_id
315 from BEN_PRTN_ELIG_PRFL_F
316 where PRTN_ELIG_PRFL_ID = c_PRTN_ELIG_PRFL_ID;
317
318 ---------------------------------------------------------------
319 -- START OF BEN_PRTN_ELIGY_RL_F ----------------------
320 ---------------------------------------------------------------
321 cursor c_cer_from_parent(c_PRTN_ELIG_ID number) is
322 select prtn_eligy_rl_id
323 from BEN_PRTN_ELIGY_RL_F
324 where PRTN_ELIG_ID = c_PRTN_ELIG_ID ;
325 --
326 cursor c_cer(c_prtn_eligy_rl_id number,c_mirror_src_entity_result_id number ,
327 c_table_alias varchar2 ) is
328 select cer.*
329 from BEN_PRTN_ELIGY_RL_F cer
330 where cer.prtn_eligy_rl_id = c_prtn_eligy_rl_id
331 -- and cpe.business_group_id = p_business_group_id
332 and not exists (
333 select /* */ null
334 from ben_copy_entity_results cpe1
335 -- pqh_table_route trt
336 where copy_entity_txn_id = p_copy_entity_txn_id
337 -- and trt.table_route_id = cpe1.table_route_id
338 and ( -- c_mirror_src_entity_result_id is null or
339 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
340 -- and trt.where_clause = 'BEN_PRTN_ELIGY_RL_F'
341 and cpe1.table_alias = c_table_alias
342 and information1 = c_prtn_eligy_rl_id
343 -- and information4 = cpe.business_group_id
344 and information2 = cer.effective_start_date
345 and information3 = cer.effective_end_date
346 );
347 l_prtn_eligy_rl_id number(15);
348 l_out_cer_result_id number(15);
349 ---------------------------------------------------------------
350 -- END OF BEN_PRTN_ELIGY_RL_F ----------------------
351 ---------------------------------------------------------------
352 --
353 l_mirror_src_entity_result_id number(15);
354 l_table_route_id number(15);
355 l_result_type_cd varchar2(30);
356 l_information5 ben_copy_entity_results.information5%type;
357 l_number_of_copies number(15);
358
359 l_mndtry_flag ben_prtn_elig_prfl_f.mndtry_flag%type;
360
361 TYPE rt_ref_csr_typ IS REF CURSOR;
362 c_parent_rec rt_ref_csr_typ;
363 l_parent_rec BEN_PRTN_ELIG_F%ROWTYPE;
364 l_Sql Varchar2(2000) := NULL;
365 l_Bind_Value Ben_Pgm_F.Pgm_Id%TYPE := NULL;
366 l_parent_prtn_elig_id number;
367
368 --ENH Avoid duplicate ELPRO's
369 --Bug 5059695
370 l_mirror_g_pdw_allow_dup_rslt varchar2(30);
371 l_dummy_g_pdw_allow_dup_rslt varchar2(30);
372 l_dummy_parent_entity_rslt_id number(15);
373 --End Bug 5059695
374 --ENH Avoid duplicate ELPRO's
375
376 begin
377 --
378 l_number_of_copies := p_number_of_copies ;
379
380 -- Bug 5059695 : Fetch the transaction category
381 if(ben_plan_design_elpro_module.g_copy_entity_txn_id <> p_copy_entity_txn_id) then
382
383 ben_plan_design_elpro_module.g_copy_entity_txn_id := p_copy_entity_txn_id;
384
385 open g_trasaction_categories(p_copy_entity_txn_id) ;
386 fetch g_trasaction_categories into ben_plan_design_elpro_module.g_trasaction_category;
387 close g_trasaction_categories;
388
389 end if;
390 --End Bug 5059695
391
392 ---------------------------------------------------------------
393 -- START OF BEN_PRTN_ELIG_F ----------------------
394 ---------------------------------------------------------------
395 --
396 If p_pgm_id is NOT NULL then
397
398 l_Sql := 'select distinct prtn_elig_id from BEN_PRTN_ELIG_F where pgm_id = :pgm_id';
399
400 l_Bind_Value := p_Pgm_id;
401
402 Elsif p_ptip_id is NOT NULL then
403
404 l_sql := 'select distinct prtn_elig_id from BEN_PRTN_ELIG_F where ptip_id = :ptip_id';
405
406 l_Bind_Value := p_ptip_id;
407
408 Elsif p_plip_id is NOT NULL then
409
410 l_sql := 'select distinct prtn_elig_id from BEN_PRTN_ELIG_F where plip_id = :plip_id';
411
412 l_Bind_Value := p_plip_id;
413
414 Elsif p_pl_id is NOT NULL then
415
416 l_sql := 'select distinct prtn_elig_id from BEN_PRTN_ELIG_F where pl_id = :pl_id';
417
418 l_Bind_Value := p_pl_id;
419
420 Elsif P_oipl_id is NOT NULL then
421
422 l_sql := 'select distinct prtn_elig_id from BEN_PRTN_ELIG_F where Oipl_Id = :Oipl_Id';
423
424 l_Bind_Value := P_oipl_id;
425 Else
426
427 Return;
428
429 End If;
430 hr_utility.set_location('qu 1'||substr(l_sql,1,40),10);
431 hr_utility.set_location('qu 2'||substr(l_sql,41,40),10);
432 hr_utility.set_location('qu 3'||substr(l_sql,81,40),10);
433
434 /* for l_parent_rec in c_epa_from_parent( p_pgm_id,p_ptip_id,p_plip_id,p_pl_id,p_oipl_id ) loop */
435
436 --
437 If l_sql is Null Then
438 return;
439 end If;
440
441 OPEN c_parent_rec FOR l_sql Using l_Bind_Value;
442 -- Fetch c_Parent_rec into l_prtn_elig_id;
443 Loop
444
445 Fetch c_Parent_rec into l_prtn_elig_id;
446
447 hr_utility.set_location('data pulled '||l_prtn_elig_id,10);
448
449 If c_Parent_Rec%NOTFOUND Then
450 Close c_Parent_Rec;
451 Exit;
452
453 End If;
454
455 --
456 l_mirror_src_entity_result_id := p_copy_entity_result_id ;
457 --
458 for l_epa_rec in c_epa(l_prtn_elig_id,l_mirror_src_entity_result_id,'EPA' ) loop
459 --
460 l_table_route_id := null ;
461 open ben_plan_design_program_module.g_table_route('EPA');
462 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
463 close ben_plan_design_program_module.g_table_route ;
464 --
465 l_information5 := hr_general.decode_lookup('BEN_PRTN_ELIG_STRT',l_epa_rec.prtn_eff_strt_dt_cd)||' '||
466 hr_general.decode_lookup('BEN_PRTN_ELIG_END',l_epa_rec.prtn_eff_end_dt_cd);
467 --'Intersection';
468 --
469 if p_effective_date between l_epa_rec.effective_start_date and l_epa_rec.effective_end_date then
470 --
471 l_result_type_cd := 'DISPLAY';
472 else
473 l_result_type_cd := 'NO DISPLAY';
474 end if;
475 --
476 l_copy_entity_result_id := null;
477 l_object_version_number := null;
478 ben_copy_entity_results_api.create_copy_entity_results(
479 p_copy_entity_result_id => l_copy_entity_result_id,
480 p_copy_entity_txn_id => p_copy_entity_txn_id,
481 p_result_type_cd => l_result_type_cd,
482 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
483 p_parent_entity_result_id => null, -- Hide BEN_PRTN_ELIG_F for HGrid
484 p_number_of_copies => l_number_of_copies,
485 p_table_route_id => l_table_route_id,
486 P_TABLE_ALIAS => 'EPA',
487 p_information1 => l_epa_rec.prtn_elig_id,
488 p_information2 => l_epa_rec.EFFECTIVE_START_DATE,
489 p_information3 => l_epa_rec.EFFECTIVE_END_DATE,
490 p_information4 => l_epa_rec.business_group_id,
491 p_information5 => l_information5 , -- 9999 put name for h-grid
492 p_information18 => l_epa_rec.trk_scr_for_inelg_flag, -- BugNo 4242438
493 p_information111 => l_epa_rec.epa_attribute1,
494 p_information120 => l_epa_rec.epa_attribute10,
495 p_information121 => l_epa_rec.epa_attribute11,
496 p_information122 => l_epa_rec.epa_attribute12,
497 p_information123 => l_epa_rec.epa_attribute13,
498 p_information124 => l_epa_rec.epa_attribute14,
499 p_information125 => l_epa_rec.epa_attribute15,
500 p_information126 => l_epa_rec.epa_attribute16,
501 p_information127 => l_epa_rec.epa_attribute17,
502 p_information128 => l_epa_rec.epa_attribute18,
503 p_information129 => l_epa_rec.epa_attribute19,
504 p_information112 => l_epa_rec.epa_attribute2,
505 p_information130 => l_epa_rec.epa_attribute20,
506 p_information131 => l_epa_rec.epa_attribute21,
507 p_information132 => l_epa_rec.epa_attribute22,
508 p_information133 => l_epa_rec.epa_attribute23,
509 p_information134 => l_epa_rec.epa_attribute24,
510 p_information135 => l_epa_rec.epa_attribute25,
511 p_information136 => l_epa_rec.epa_attribute26,
512 p_information137 => l_epa_rec.epa_attribute27,
513 p_information138 => l_epa_rec.epa_attribute28,
514 p_information139 => l_epa_rec.epa_attribute29,
515 p_information113 => l_epa_rec.epa_attribute3,
516 p_information140 => l_epa_rec.epa_attribute30,
517 p_information114 => l_epa_rec.epa_attribute4,
518 p_information115 => l_epa_rec.epa_attribute5,
519 p_information116 => l_epa_rec.epa_attribute6,
520 p_information117 => l_epa_rec.epa_attribute7,
521 p_information118 => l_epa_rec.epa_attribute8,
522 p_information119 => l_epa_rec.epa_attribute9,
523 p_information110 => l_epa_rec.epa_attribute_category,
524 p_information17 => l_epa_rec.mx_poe_apls_cd,
525 p_information13 => l_epa_rec.mx_poe_det_dt_cd,
526 p_information269 => l_epa_rec.mx_poe_det_dt_rl,
527 p_information267 => l_epa_rec.mx_poe_rl,
528 p_information11 => l_epa_rec.mx_poe_uom,
529 p_information266 => l_epa_rec.mx_poe_val,
530 p_information258 => l_epa_rec.oipl_id,
531 p_information260 => l_epa_rec.pgm_id,
532 p_information261 => l_epa_rec.pl_id,
533 p_information256 => l_epa_rec.plip_id,
534 p_information16 => l_epa_rec.prtn_eff_end_dt_cd,
535 p_information271 => l_epa_rec.prtn_eff_end_dt_rl,
536 p_information15 => l_epa_rec.prtn_eff_strt_dt_cd,
537 p_information270 => l_epa_rec.prtn_eff_strt_dt_rl,
538 p_information259 => l_epa_rec.ptip_id,
539 p_information12 => l_epa_rec.wait_perd_dt_to_use_cd,
540 p_information264 => l_epa_rec.wait_perd_dt_to_use_rl,
541 p_information268 => l_epa_rec.wait_perd_rl,
542 p_information14 => l_epa_rec.wait_perd_uom,
543 p_information287 => l_epa_rec.wait_perd_val,
544 p_information265 => l_epa_rec.object_version_number,
545 --
546
547 -- END REPLACE PARAMETER LINES
548
549 p_object_version_number => l_object_version_number,
550 p_effective_date => p_effective_date );
551 --
552
553 if l_out_epa_result_id is null then
554 l_out_epa_result_id := l_copy_entity_result_id;
555 end if;
556
557 if l_result_type_cd = 'DISPLAY' then
558 l_out_epa_result_id := l_copy_entity_result_id ;
559 end if;
560 --
561 if (l_epa_rec.mx_poe_det_dt_rl is not null) then
562 ben_plan_design_program_module.create_formula_result(
563 p_validate => p_validate
564 ,p_copy_entity_result_id => l_copy_entity_result_id
565 ,p_copy_entity_txn_id => p_copy_entity_txn_id
566 ,p_formula_id => l_epa_rec.mx_poe_det_dt_rl
567 ,p_business_group_id => l_epa_rec.business_group_id
568 ,p_number_of_copies => l_number_of_copies
569 ,p_object_version_number => l_object_version_number
570 ,p_effective_date => p_effective_date);
571 end if;
572
573 if (l_epa_rec.mx_poe_rl is not null) then
574 ben_plan_design_program_module.create_formula_result(
575 p_validate => p_validate
576 ,p_copy_entity_result_id => l_copy_entity_result_id
577 ,p_copy_entity_txn_id => p_copy_entity_txn_id
578 ,p_formula_id => l_epa_rec.mx_poe_rl
579 ,p_business_group_id => l_epa_rec.business_group_id
580 ,p_number_of_copies => l_number_of_copies
581 ,p_object_version_number => l_object_version_number
582 ,p_effective_date => p_effective_date);
583 end if;
584
585 if (l_epa_rec.prtn_eff_end_dt_rl is not null) then
586 ben_plan_design_program_module.create_formula_result(
587 p_validate => p_validate
588 ,p_copy_entity_result_id => l_copy_entity_result_id
589 ,p_copy_entity_txn_id => p_copy_entity_txn_id
590 ,p_formula_id => l_epa_rec.prtn_eff_end_dt_rl
591 ,p_business_group_id => l_epa_rec.business_group_id
592 ,p_number_of_copies => l_number_of_copies
593 ,p_object_version_number => l_object_version_number
594 ,p_effective_date => p_effective_date);
595 end if;
596
597 if (l_epa_rec.prtn_eff_strt_dt_rl is not null) then
598 ben_plan_design_program_module.create_formula_result(
599 p_validate => p_validate
600 ,p_copy_entity_result_id => l_copy_entity_result_id
601 ,p_copy_entity_txn_id => p_copy_entity_txn_id
602 ,p_formula_id => l_epa_rec.prtn_eff_strt_dt_rl
603 ,p_business_group_id => l_epa_rec.business_group_id
604 ,p_number_of_copies => l_number_of_copies
605 ,p_object_version_number => l_object_version_number
606 ,p_effective_date => p_effective_date);
607 end if;
608
609 if (l_epa_rec.wait_perd_dt_to_use_rl is not null) then
610 ben_plan_design_program_module.create_formula_result(
611 p_validate => p_validate
612 ,p_copy_entity_result_id => l_copy_entity_result_id
613 ,p_copy_entity_txn_id => p_copy_entity_txn_id
614 ,p_formula_id => l_epa_rec.wait_perd_dt_to_use_rl
615 ,p_business_group_id => l_epa_rec.business_group_id
616 ,p_number_of_copies => l_number_of_copies
617 ,p_object_version_number => l_object_version_number
618 ,p_effective_date => p_effective_date);
619 end if;
620
621 if (l_epa_rec.wait_perd_rl is not null) then
622 ben_plan_design_program_module.create_formula_result(
623 p_validate => p_validate
624 ,p_copy_entity_result_id => l_copy_entity_result_id
625 ,p_copy_entity_txn_id => p_copy_entity_txn_id
626 ,p_formula_id => l_epa_rec.wait_perd_rl
627 ,p_business_group_id => l_epa_rec.business_group_id
628 ,p_number_of_copies => l_number_of_copies
629 ,p_object_version_number => l_object_version_number
630 ,p_effective_date => p_effective_date);
631 end if;
632
633 end loop;
634 --
635 ---------------------------------------------------------------
636 -- START OF BEN_PRTN_ELIG_PRFL_F ----------------------
637 ---------------------------------------------------------------
638 --
639 for l_parent_rec in c_cep_from_parent(l_PRTN_ELIG_ID) loop
640 --
641 l_mirror_src_entity_result_id := l_out_epa_result_id ;
642 --
643 l_prtn_elig_prfl_id := l_parent_rec.prtn_elig_prfl_id ;
644 --
645 for l_cep_rec in c_cep(l_parent_rec.prtn_elig_prfl_id,l_mirror_src_entity_result_id, 'CEP' ) loop
646 --
647 l_table_route_id := null ;
648 open ben_plan_design_program_module.g_table_route('CEP');
649 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
650 close ben_plan_design_program_module.g_table_route ;
651 --
652 l_information5 := ben_plan_design_program_module.get_eligy_prfl_name(l_cep_rec.eligy_prfl_id
653 ,p_effective_date); --'Intersection';
654 --
655 if p_effective_date between l_cep_rec.effective_start_date
656 and l_cep_rec.effective_end_date then
657 --
658 l_result_type_cd := 'DISPLAY';
659 else
660 l_result_type_cd := 'NO DISPLAY';
661 end if;
662 --
663 -- Bug 5059695
664 if(ben_plan_design_elpro_module.g_trasaction_category = 'PQHGSP') then
665 l_dummy_parent_entity_rslt_id := null;
666 else
667 l_dummy_parent_entity_rslt_id := p_parent_entity_result_id;
668 end if;
669 -- End Bug 5059695
670
671 l_copy_entity_result_id := null;
672 l_object_version_number := null;
673 ben_copy_entity_results_api.create_copy_entity_results(
674 p_copy_entity_result_id => l_copy_entity_result_id,
675 p_copy_entity_txn_id => p_copy_entity_txn_id,
676 p_result_type_cd => l_result_type_cd,
677 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
678 p_parent_entity_result_id => l_dummy_parent_entity_rslt_id, -- 4990825 SHOW BEN_PRTN_ELIG_PRFL_F as child for HGrid
679 p_number_of_copies => l_number_of_copies,
680 p_table_route_id => l_table_route_id,
681 P_TABLE_ALIAS => 'CEP',
682 p_information1 => l_cep_rec.prtn_elig_prfl_id,
683 p_information2 => l_cep_rec.EFFECTIVE_START_DATE,
684 p_information3 => l_cep_rec.EFFECTIVE_END_DATE,
685 p_information4 => l_cep_rec.business_group_id,
686 p_information5 => l_information5 , -- 9999 put name for h-grid
687 p_information111 => l_cep_rec.cep_attribute1,
688 p_information120 => l_cep_rec.cep_attribute10,
689 p_information121 => l_cep_rec.cep_attribute11,
690 p_information122 => l_cep_rec.cep_attribute12,
691 p_information123 => l_cep_rec.cep_attribute13,
692 p_information124 => l_cep_rec.cep_attribute14,
693 p_information125 => l_cep_rec.cep_attribute15,
694 p_information126 => l_cep_rec.cep_attribute16,
695 p_information127 => l_cep_rec.cep_attribute17,
696 p_information128 => l_cep_rec.cep_attribute18,
697 p_information129 => l_cep_rec.cep_attribute19,
698 p_information112 => l_cep_rec.cep_attribute2,
699 p_information130 => l_cep_rec.cep_attribute20,
700 p_information131 => l_cep_rec.cep_attribute21,
701 p_information132 => l_cep_rec.cep_attribute22,
702 p_information133 => l_cep_rec.cep_attribute23,
703 p_information134 => l_cep_rec.cep_attribute24,
704 p_information135 => l_cep_rec.cep_attribute25,
705 p_information136 => l_cep_rec.cep_attribute26,
706 p_information137 => l_cep_rec.cep_attribute27,
707 p_information138 => l_cep_rec.cep_attribute28,
708 p_information139 => l_cep_rec.cep_attribute29,
709 p_information113 => l_cep_rec.cep_attribute3,
710 p_information140 => l_cep_rec.cep_attribute30,
711 p_information114 => l_cep_rec.cep_attribute4,
712 p_information115 => l_cep_rec.cep_attribute5,
713 p_information116 => l_cep_rec.cep_attribute6,
714 p_information117 => l_cep_rec.cep_attribute7,
715 p_information118 => l_cep_rec.cep_attribute8,
716 p_information119 => l_cep_rec.cep_attribute9,
717 p_information110 => l_cep_rec.cep_attribute_category,
718 p_information11 => l_cep_rec.elig_prfl_type_cd,
719 p_information263 => l_cep_rec.eligy_prfl_id,
720 p_information12 => l_cep_rec.mndtry_flag,
721 p_information229 => l_cep_rec.prtn_elig_id,
722 p_information13 => l_cep_rec.compute_score_flag, -- Bug 4242438
723 p_information265 => l_cep_rec.object_version_number,
724 --
725
726 -- END REPLACE PARAMETER LINES
727
728 p_object_version_number => l_object_version_number,
729 p_effective_date => p_effective_date );
730 --
731
732 if l_out_cep_result_id is null then
733 l_out_cep_result_id := l_copy_entity_result_id;
734 end if;
735
736 if l_result_type_cd = 'DISPLAY' then
737 l_out_cep_result_id := l_copy_entity_result_id ;
738 l_mndtry_flag := l_cep_rec.mndtry_flag ;
739 end if;
740 --
741 end loop;
742 --
743
744 l_mirror_g_pdw_allow_dup_rslt := ben_plan_design_program_module.g_pdw_allow_dup_rslt;
745 -- Create Eligibility Profiles and Criteria
746
747 -- Bug 5059695
748 if(ben_plan_design_elpro_module.g_trasaction_category = 'PQHGSP') then
749 l_dummy_g_pdw_allow_dup_rslt := null;
750 else
751 l_dummy_g_pdw_allow_dup_rslt := ben_plan_design_program_module.g_pdw_no_dup_rslt;
752 end if;
753 -- End Bug 5059695
754
755 for l_parent_rec in c_elp_from_parent(l_PRTN_ELIG_PRFL_ID) loop
756 create_elig_prfl_results
757 (
758 p_validate => p_validate
759 ,p_mirror_src_entity_result_id => l_out_cep_result_id
760 ,p_parent_entity_result_id => p_parent_entity_result_id
761 ,p_copy_entity_txn_id => p_copy_entity_txn_id
762 ,p_eligy_prfl_id => l_parent_rec.eligy_prfl_id
763 ,p_mndtry_flag => l_mndtry_flag
764 ,p_business_group_id => p_business_group_id
765 ,p_number_of_copies => p_number_of_copies
766 ,p_object_version_number => l_object_version_number
767 ,p_effective_date => p_effective_date
768 ,p_no_dup_rslt => l_dummy_g_pdw_allow_dup_rslt
769 );
770 -- ENH Avoid duplicates in Eligibility Profiles
771 --Passed the value PDW_NO_DUP_RSLT to create_elig_prfl_results so that
772 --no duplicate results are created
773 end loop;
774
775 ben_plan_design_program_module.g_pdw_allow_dup_rslt := l_mirror_g_pdw_allow_dup_rslt;
776 -- ENH Avoid duplicates in Eligibility Profiles
777 --reset the global allow dup results to as it was before
778
779 end loop;
780 ---------------------------------------------------------------
781 -- END OF BEN_PRTN_ELIG_PRFL_F ----------------------
782 ---------------------------------------------------------------
783 ---------------------------------------------------------------
784 -- START OF BEN_PRTN_ELIGY_RL_F ----------------------
785 ---------------------------------------------------------------
786 --
787 for l_parent_rec in c_cer_from_parent(l_PRTN_ELIG_ID) loop
788 --
789 l_mirror_src_entity_result_id := l_out_epa_result_id ;
790 --
791 l_prtn_eligy_rl_id := l_parent_rec.prtn_eligy_rl_id ;
792 --
793 for l_cer_rec in c_cer(l_parent_rec.prtn_eligy_rl_id,l_mirror_src_entity_result_id,'CER' ) loop
794 --
795 l_table_route_id := null ;
796 open ben_plan_design_program_module.g_table_route('CER');
797 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
798 close ben_plan_design_program_module.g_table_route ;
799 --
800 l_information5 := ben_plan_design_program_module.get_formula_name(l_cer_rec.formula_id
801 ,p_effective_date); --'Intersection';
802 --
803 if p_effective_date between l_cer_rec.effective_start_date
804 and l_cer_rec.effective_end_date then
805 --
806 l_result_type_cd := 'DISPLAY';
807 else
808 l_result_type_cd := 'NO DISPLAY';
809 end if;
810 --
811 l_copy_entity_result_id := null;
812 l_object_version_number := null;
813 ben_copy_entity_results_api.create_copy_entity_results(
814 p_copy_entity_result_id => l_copy_entity_result_id,
815 p_copy_entity_txn_id => p_copy_entity_txn_id,
816 p_result_type_cd => l_result_type_cd,
817 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
818 p_parent_entity_result_id => p_parent_entity_result_id, -- Result id of Pgm,Ptip,Plip or Oipl
819 p_number_of_copies => l_number_of_copies,
820 p_table_route_id => l_table_route_id,
821 P_TABLE_ALIAS => 'CER',
822 p_information1 => l_cer_rec.prtn_eligy_rl_id,
823 p_information2 => l_cer_rec.EFFECTIVE_START_DATE,
824 p_information3 => l_cer_rec.EFFECTIVE_END_DATE,
825 p_information4 => l_cer_rec.business_group_id,
826 p_information5 => l_information5 , -- 9999 put name for h-grid
827 p_information111 => l_cer_rec.cer_attribute1,
828 p_information120 => l_cer_rec.cer_attribute10,
829 p_information121 => l_cer_rec.cer_attribute11,
830 p_information122 => l_cer_rec.cer_attribute12,
831 p_information123 => l_cer_rec.cer_attribute13,
832 p_information124 => l_cer_rec.cer_attribute14,
833 p_information125 => l_cer_rec.cer_attribute15,
834 p_information126 => l_cer_rec.cer_attribute16,
835 p_information127 => l_cer_rec.cer_attribute17,
836 p_information128 => l_cer_rec.cer_attribute18,
837 p_information129 => l_cer_rec.cer_attribute19,
838 p_information112 => l_cer_rec.cer_attribute2,
839 p_information130 => l_cer_rec.cer_attribute20,
840 p_information131 => l_cer_rec.cer_attribute21,
841 p_information132 => l_cer_rec.cer_attribute22,
842 p_information133 => l_cer_rec.cer_attribute23,
843 p_information134 => l_cer_rec.cer_attribute24,
844 p_information135 => l_cer_rec.cer_attribute25,
845 p_information136 => l_cer_rec.cer_attribute26,
846 p_information137 => l_cer_rec.cer_attribute27,
847 p_information138 => l_cer_rec.cer_attribute28,
848 p_information139 => l_cer_rec.cer_attribute29,
849 p_information113 => l_cer_rec.cer_attribute3,
850 p_information140 => l_cer_rec.cer_attribute30,
851 p_information114 => l_cer_rec.cer_attribute4,
852 p_information115 => l_cer_rec.cer_attribute5,
853 p_information116 => l_cer_rec.cer_attribute6,
854 p_information117 => l_cer_rec.cer_attribute7,
855 p_information118 => l_cer_rec.cer_attribute8,
856 p_information119 => l_cer_rec.cer_attribute9,
857 p_information110 => l_cer_rec.cer_attribute_category,
858 p_information11 => l_cer_rec.drvbl_fctr_apls_flag,
859 p_information251 => l_cer_rec.formula_id,
860 p_information12 => l_cer_rec.mndtry_flag,
861 p_information260 => l_cer_rec.ordr_to_aply_num,
862 p_information229 => l_cer_rec.prtn_elig_id,
863 p_information265 => l_cer_rec.object_version_number,
864 --
865
866 -- END REPLACE PARAMETER LINES
867
868 p_object_version_number => l_object_version_number,
869 p_effective_date => p_effective_date );
870 --
871
872 if l_out_cer_result_id is null then
873 l_out_cer_result_id := l_copy_entity_result_id;
874 end if;
875
876 if l_result_type_cd = 'DISPLAY' then
877 l_out_cer_result_id := l_copy_entity_result_id ;
878 end if;
879 --
880 if (l_cer_rec.formula_id is not null) then
881 ben_plan_design_program_module.create_formula_result(
882 p_validate => p_validate
883 ,p_copy_entity_result_id => l_copy_entity_result_id
884 ,p_copy_entity_txn_id => p_copy_entity_txn_id
885 ,p_formula_id => l_cer_rec.formula_id
886 ,p_business_group_id => l_cer_rec.business_group_id
887 ,p_number_of_copies => l_number_of_copies
888 ,p_object_version_number => l_object_version_number
889 ,p_effective_date => p_effective_date);
890 end if;
891 --
892 end loop;
893 --
894 hr_utility.set_location('end of per',10);
895 end loop;
896 ---------------------------------------------------------------
897 -- END OF BEN_PRTN_ELIGY_RL_F ----------------------
898 ---------------------------------------------------------------
899 hr_utility.set_location('end of pe',10);
900 end loop;
901 ---------------------------------------------------------------
902 -- END OF BEN_PRTN_ELIG_F ----------------------
903 ---------------------------------------------------------------
904 hr_utility.set_location('out of routine',10);
905 end ;
906 --
907 procedure create_dep_elpro_result
908 (
909 p_validate in number default 0 -- false
910 ,p_copy_entity_result_id in number
911 ,p_copy_entity_txn_id in number default null
912 ,p_pgm_id in number default null
913 ,p_ptip_id in number default null
914 ,p_pl_id in number default null
915 ,p_business_group_id in number default null
916 ,p_number_of_copies in number default 0
917 ,p_object_version_number out nocopy number
918 ,p_effective_date in date
919 ,p_parent_entity_result_id in number
920 ) is
921 l_copy_entity_result_id ben_copy_entity_results.copy_entity_result_id%TYPE;
922 l_proc varchar2(72) := g_package||'create_dep_elpro_result';
923 l_object_version_number ben_copy_entity_results.object_version_number%TYPE;
924 --
925 l_cv_result_type_cd varchar2(30) := 'DISPLAY' ;
926 --
927 cursor c_parent_result(c_parent_pk_id number,
928 c_parent_table_alias varchar2,
929 c_copy_entity_txn_id number) is
930 select copy_entity_result_id mirror_src_entity_result_id
931 from ben_copy_entity_results cpe
932 -- pqh_table_route trt
933 where cpe.information1= c_parent_pk_id
934 and cpe.result_type_cd = l_cv_result_type_cd
935 and cpe.copy_entity_txn_id = c_copy_entity_txn_id
936 -- and cpe.table_route_id = trt.table_route_id
937 and cpe.table_alias = c_parent_table_alias ;
938 ---
939 -- Bug : 3752407 : Global cursor g_table_route will now be used
940 -- Cursor to get table_route_id
941 --
942 -- cursor c_table_route(c_parent_table_alias varchar2) is
943 -- select table_route_id
944 -- from pqh_table_route trt
945 -- where -- trt.from_clause = 'OAB'
946 -- trt.table_alias = c_parent_table_alias ;
947 ---
948 ---------------------------------------------------------------
949 -- START OF BEN_APLD_DPNT_CVG_ELIG_PRFL_F ----------------------
950 ---------------------------------------------------------------
951 cursor c_ade_from_parent(c_pgm_id number,c_ptip_id number,c_pl_id number ) is
952 select distinct apld_dpnt_cvg_elig_prfl_id
953 from BEN_APLD_DPNT_CVG_ELIG_PRFL_F
954 where (c_pgm_id is not null and pgm_id = c_pgm_id ) or
955 (c_ptip_id is not null and ptip_id = c_ptip_id) or
956 (c_pl_id is not null and pl_id = c_pl_id) ;
957 --
958 cursor c_ade(c_apld_dpnt_cvg_elig_prfl_id number,c_mirror_src_entity_result_id number ,
959 c_table_alias varchar2 ) is
960 select ade.*
961 from BEN_APLD_DPNT_CVG_ELIG_PRFL_F ade
962 where ade.apld_dpnt_cvg_elig_prfl_id = c_apld_dpnt_cvg_elig_prfl_id
963 -- and ade.business_group_id = p_business_group_id
964 and not exists (
965 select /* */ null
966 from ben_copy_entity_results cpe
967 -- pqh_table_route trt
968 where copy_entity_txn_id = p_copy_entity_txn_id
969 -- and trt.table_route_id = cpe.table_route_id
970 and ( -- c_mirror_src_entity_result_id is null or
971 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
972 -- and trt.where_clause = 'BEN_APLD_DPNT_CVG_ELIG_PRFL_F'
973 and cpe.table_alias = c_table_alias
974 and information1 = c_apld_dpnt_cvg_elig_prfl_id
975 -- and information4 = ade.business_group_id
976 and information2 = ade.effective_start_date
977 and information3 = ade.effective_end_date
978 );
979 l_apld_dpnt_cvg_elig_prfl_id number(15);
980 l_out_ade_result_id number(15);
981 ---------------------------------------------------------------
982 -- END OF BEN_APLD_DPNT_CVG_ELIG_PRFL_F ----------------------
983 ---------------------------------------------------------------
984 ---------------------------------------------------------------
985 -- START OF BEN_DPNT_CVG_ELIGY_PRFL_F ----------------------
986 ---------------------------------------------------------------
987 cursor c_dce_from_parent(c_APLD_DPNT_CVG_ELIG_PRFL_ID number) is
988 select distinct dpnt_cvg_eligy_prfl_id
989 from BEN_APLD_DPNT_CVG_ELIG_PRFL_F
990 where APLD_DPNT_CVG_ELIG_PRFL_ID = c_APLD_DPNT_CVG_ELIG_PRFL_ID ;
991 --
992 ---------------------------------------------------------------
993 -- END OF BEN_DPNT_CVG_ELIGY_PRFL_F ----------------------
994 ---------------------------------------------------------------
995
996 l_mirror_src_entity_result_id number(15);
997 l_table_route_id number(15);
998 l_result_type_cd varchar2(30);
999 l_information5 ben_copy_entity_results.information5%type;
1000 l_number_of_copies number(15);
1001
1002 begin
1003 l_number_of_copies := p_number_of_copies ;
1004 ---------------------------------------------------------------
1005 -- START OF BEN_APLD_DPNT_CVG_ELIG_PRFL_F ----------------------
1006 ---------------------------------------------------------------
1007 --
1008 for l_parent_rec in c_ade_from_parent(p_pgm_id,p_ptip_id,p_pl_id) loop
1009 --
1010 l_mirror_src_entity_result_id := p_copy_entity_result_id ;
1011 --
1012 l_apld_dpnt_cvg_elig_prfl_id := l_parent_rec.apld_dpnt_cvg_elig_prfl_id ;
1013 --
1014 for l_ade_rec in c_ade(l_parent_rec.apld_dpnt_cvg_elig_prfl_id,l_mirror_src_entity_result_id,'ADE' ) loop
1015 --
1016 l_table_route_id := null ;
1017 open ben_plan_design_program_module.g_table_route('ADE');
1018 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
1019 close ben_plan_design_program_module.g_table_route ;
1020 --
1021 l_information5 := ben_plan_design_program_module.get_dpnt_cvg_eligy_prfl_name
1022 (l_ade_rec.dpnt_cvg_eligy_prfl_id
1023 ,p_effective_date); --'Intersection';
1024 --
1025 if p_effective_date between l_ade_rec.effective_start_date
1026 and l_ade_rec.effective_end_date then
1027 --
1028 l_result_type_cd := 'DISPLAY';
1029 else
1030 l_result_type_cd := 'NO DISPLAY';
1031 end if;
1032 --
1033 l_copy_entity_result_id := null;
1034 l_object_version_number := null;
1035 ben_copy_entity_results_api.create_copy_entity_results(
1036 p_copy_entity_result_id => l_copy_entity_result_id,
1037 p_copy_entity_txn_id => p_copy_entity_txn_id,
1038 p_result_type_cd => l_result_type_cd,
1039 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
1040 p_parent_entity_result_id => null, -- Hide BEN_APLD_DPNT_CVG_ELIG_PRFL_F for HGrid
1041 p_number_of_copies => l_number_of_copies,
1042 p_table_route_id => l_table_route_id,
1043 P_TABLE_ALIAS => 'ADE',
1044 p_information1 => l_ade_rec.apld_dpnt_cvg_elig_prfl_id,
1045 p_information2 => l_ade_rec.EFFECTIVE_START_DATE,
1046 p_information3 => l_ade_rec.EFFECTIVE_END_DATE,
1047 p_information4 => l_ade_rec.business_group_id,
1048 p_information5 => l_information5 , -- 9999 put name for h-grid
1049 p_information111 => l_ade_rec.ade_attribute1,
1050 p_information120 => l_ade_rec.ade_attribute10,
1051 p_information121 => l_ade_rec.ade_attribute11,
1052 p_information122 => l_ade_rec.ade_attribute12,
1053 p_information123 => l_ade_rec.ade_attribute13,
1054 p_information124 => l_ade_rec.ade_attribute14,
1055 p_information125 => l_ade_rec.ade_attribute15,
1056 p_information126 => l_ade_rec.ade_attribute16,
1057 p_information127 => l_ade_rec.ade_attribute17,
1058 p_information128 => l_ade_rec.ade_attribute18,
1059 p_information129 => l_ade_rec.ade_attribute19,
1060 p_information112 => l_ade_rec.ade_attribute2,
1061 p_information130 => l_ade_rec.ade_attribute20,
1062 p_information131 => l_ade_rec.ade_attribute21,
1063 p_information132 => l_ade_rec.ade_attribute22,
1064 p_information133 => l_ade_rec.ade_attribute23,
1065 p_information134 => l_ade_rec.ade_attribute24,
1066 p_information135 => l_ade_rec.ade_attribute25,
1067 p_information136 => l_ade_rec.ade_attribute26,
1068 p_information137 => l_ade_rec.ade_attribute27,
1069 p_information138 => l_ade_rec.ade_attribute28,
1070 p_information139 => l_ade_rec.ade_attribute29,
1071 p_information113 => l_ade_rec.ade_attribute3,
1072 p_information140 => l_ade_rec.ade_attribute30,
1073 p_information114 => l_ade_rec.ade_attribute4,
1074 p_information115 => l_ade_rec.ade_attribute5,
1075 p_information116 => l_ade_rec.ade_attribute6,
1076 p_information117 => l_ade_rec.ade_attribute7,
1077 p_information118 => l_ade_rec.ade_attribute8,
1078 p_information119 => l_ade_rec.ade_attribute9,
1079 p_information110 => l_ade_rec.ade_attribute_category,
1080 p_information263 => l_ade_rec.apld_dpnt_cvg_elig_rl,
1081 p_information255 => l_ade_rec.dpnt_cvg_eligy_prfl_id,
1082 p_information11 => l_ade_rec.mndtry_flag,
1083 p_information260 => l_ade_rec.pgm_id,
1084 p_information261 => l_ade_rec.pl_id,
1085 p_information259 => l_ade_rec.ptip_id,
1086 p_information265 => l_ade_rec.object_version_number,
1087 --
1088
1089 -- END REPLACE PARAMETER LINES
1090
1091 p_object_version_number => l_object_version_number,
1092 p_effective_date => p_effective_date );
1093 --
1094
1095 if l_out_ade_result_id is null then
1096 l_out_ade_result_id := l_copy_entity_result_id;
1097 end if;
1098
1099 if l_result_type_cd = 'DISPLAY' then
1100 l_out_ade_result_id := l_copy_entity_result_id ;
1101 end if;
1102 --
1103 if (l_ade_rec.apld_dpnt_cvg_elig_rl is not null) then
1104 ben_plan_design_program_module.create_formula_result(
1105 p_validate => p_validate
1106 ,p_copy_entity_result_id => l_copy_entity_result_id
1107 ,p_copy_entity_txn_id => p_copy_entity_txn_id
1108 ,p_formula_id => l_ade_rec.apld_dpnt_cvg_elig_rl
1109 ,p_business_group_id => l_ade_rec.business_group_id
1110 ,p_number_of_copies => l_number_of_copies
1111 ,p_object_version_number => l_object_version_number
1112 ,p_effective_date => p_effective_date);
1113 end if;
1114
1115
1116 end loop;
1117
1118 -- Create Dependent Eligibility Profiles and Criteria
1119
1120 for l_parent_rec in c_dce_from_parent(l_apld_dpnt_cvg_elig_prfl_id) loop
1121 create_dep_elig_prfl_results
1122 (
1123 p_validate => p_validate
1124 ,p_mirror_src_entity_result_id => l_out_ade_result_id
1125 ,p_parent_entity_result_id => p_parent_entity_result_id
1126 ,p_copy_entity_txn_id => p_copy_entity_txn_id
1127 ,p_dpnt_cvg_eligy_prfl_id => l_parent_rec.dpnt_cvg_eligy_prfl_id
1128 ,p_business_group_id => p_business_group_id
1129 ,p_number_of_copies => p_number_of_copies
1130 ,p_object_version_number => l_object_version_number
1131 ,p_effective_date => p_effective_date
1132 );
1133 end loop;
1134 --
1135 end loop;
1136 ---------------------------------------------------------------
1137 -- END OF BEN_APLD_DPNT_CVG_ELIG_PRFL_F ----------------------
1138 ---------------------------------------------------------------
1139 null ;
1140 end ;
1141
1142 procedure create_elig_prfl_results
1143 (
1144 p_validate in number default 0 -- false
1145 ,p_mirror_src_entity_result_id in number
1146 ,p_parent_entity_result_id in number
1147 ,p_copy_entity_txn_id in number
1148 ,p_eligy_prfl_id in number
1149 ,p_mndtry_flag in varchar2 default null
1150 ,p_business_group_id in number default null
1151 ,p_number_of_copies in number default 0
1152 ,p_object_version_number out nocopy number
1153 ,p_effective_date in date
1154 ,p_no_dup_rslt in varchar2 default null
1155 ) is
1156 l_copy_entity_result_id ben_copy_entity_results.copy_entity_result_id%TYPE;
1157 l_proc varchar2(72) := g_package||'create_elig_prfl_results';
1158 l_object_version_number ben_copy_entity_results.object_version_number%TYPE;
1159 --
1160 l_cv_result_type_cd varchar2(30) := 'DISPLAY' ;
1161 --
1162 cursor c_parent_result(c_parent_pk_id number,
1163 -- c_parent_table_name varchar2,
1164 c_parent_table_alias varchar2,
1165 c_copy_entity_txn_id number) is
1166 select copy_entity_result_id mirror_src_entity_result_id
1167 from ben_copy_entity_results cpe
1168 -- pqh_table_route trt
1169 where cpe.information1= c_parent_pk_id
1170 -- and cpe.result_type_cd = 'DISPLAY'
1171 and cpe.result_type_cd = l_cv_result_type_cd
1172 and cpe.copy_entity_txn_id = c_copy_entity_txn_id
1173 -- and cpe.table_route_id = trt.table_route_id
1174 --and trt.from_clause = 'OAB'
1175 --and trt.where_clause = upper(c_parent_table_name) ;
1176 and cpe.table_alias = c_parent_table_alias ;
1177 ---
1178 -- Bug : 3752407 : Global cursor g_table_route will now be used
1179 -- Cursor to get table_route_id
1180 --cursor c_table_route(c_parent_table_name varchar2) is
1181 -- cursor c_table_route(c_parent_table_alias varchar2) is
1182 -- select table_route_id
1183 -- from pqh_table_route trt
1184 -- where --trt.from_clause = 'OAB'
1185 --and trt.where_clause = upper(c_parent_table_name) ;
1186 -- trt.table_alias = c_parent_table_alias ;
1187 ---
1188
1189 ---------------------------------------------------------------
1190 -- START OF BEN_ELIGY_PRFL_F ----------------------
1191 ---------------------------------------------------------------
1192
1193 --
1194 cursor c_elp(c_eligy_prfl_id number,c_mirror_src_entity_result_id number ,
1195 c_table_alias varchar2 ) is
1196 select elp.*
1197 from BEN_ELIGY_PRFL_F elp
1198 where elp.eligy_prfl_id = c_eligy_prfl_id
1199 -- and elp.business_group_id = p_business_group_id
1200 and not exists (
1201 select /* */ null
1202 from ben_copy_entity_results cpe
1203 -- pqh_table_route trt
1204 where copy_entity_txn_id = p_copy_entity_txn_id
1205 -- and trt.table_route_id = cpe.table_route_id
1206 and ( -- c_mirror_src_entity_result_id is null or
1207 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
1208 -- and trt.where_clause = 'BEN_ELIGY_PRFL_F'
1209 and cpe.table_alias = c_table_alias
1210 and information1 = c_eligy_prfl_id
1211 -- and information4 = elp.business_group_id
1212 and information2 = elp.effective_start_date
1213 and information3 = elp.effective_end_date
1214 );
1215 l_eligy_prfl_id number(15);
1216 l_out_elp_result_id number(15);
1217 ---------------------------------------------------------------
1218 -- END OF BEN_ELIGY_PRFL_F ----------------------
1219 ---------------------------------------------------------------
1220 ---------------------------------------------------------------
1221 -- START OF BEN_CNTNG_PRTN_ELIG_PRFL_F ----------------------
1222 ---------------------------------------------------------------
1223 cursor c_cgp_from_parent(c_ELIGY_PRFL_ID number) is
1224 select cntng_prtn_elig_prfl_id
1225 from BEN_CNTNG_PRTN_ELIG_PRFL_F
1226 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
1227 --
1228 cursor c_cgp(c_cntng_prtn_elig_prfl_id number,c_mirror_src_entity_result_id number ,
1229 c_table_alias varchar2 ) is
1230 select cgp.*
1231 from BEN_CNTNG_PRTN_ELIG_PRFL_F cgp
1232 where cgp.cntng_prtn_elig_prfl_id = c_cntng_prtn_elig_prfl_id
1233 -- and cgp.business_group_id = p_business_group_id
1234 and not exists (
1235 select /* */ null
1236 from ben_copy_entity_results cpe
1237 -- pqh_table_route trt
1238 where copy_entity_txn_id = p_copy_entity_txn_id
1239 -- and trt.table_route_id = cpe.table_route_id
1240 and ( -- c_mirror_src_entity_result_id is null or
1241 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
1242 -- and trt.where_clause = 'BEN_CNTNG_PRTN_ELIG_PRFL_F'
1243 and cpe.table_alias = c_table_alias
1244 and information1 = c_cntng_prtn_elig_prfl_id
1245 -- and information4 = cgp.business_group_id
1246 and information2 = cgp.effective_start_date
1247 and information3 = cgp.effective_end_date
1248 );
1249 l_cntng_prtn_elig_prfl_id number(15);
1250 l_out_cgp_result_id number(15);
1251 ---------------------------------------------------------------
1252 -- END OF BEN_CNTNG_PRTN_ELIG_PRFL_F ----------------------
1253 ---------------------------------------------------------------
1254 ---------------------------------------------------------------
1255 -- START OF BEN_ELIGY_PRFL_RL_F ----------------------
1256 ---------------------------------------------------------------
1257 cursor c_erl_from_parent(c_ELIGY_PRFL_ID number) is
1258 select eligy_prfl_rl_id
1259 from BEN_ELIGY_PRFL_RL_F
1260 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
1261 --
1262 cursor c_erl(c_eligy_prfl_rl_id number,c_mirror_src_entity_result_id number ,
1263 c_table_alias varchar2 ) is
1264 select erl.*
1265 from BEN_ELIGY_PRFL_RL_F erl
1266 where erl.eligy_prfl_rl_id = c_eligy_prfl_rl_id
1267 -- and erl.business_group_id = p_business_group_id
1268 and not exists (
1269 select /* */ null
1270 from ben_copy_entity_results cpe
1271 -- pqh_table_route trt
1272 where copy_entity_txn_id = p_copy_entity_txn_id
1273 -- and trt.table_route_id = cpe.table_route_id
1274 and ( -- c_mirror_src_entity_result_id is null or
1275 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
1276 -- and trt.where_clause = 'BEN_ELIGY_PRFL_RL_F'
1277 and cpe.table_alias = c_table_alias
1278 and information1 = c_eligy_prfl_rl_id
1279 -- and information4 = erl.business_group_id
1280 and information2 = erl.effective_start_date
1281 and information3 = erl.effective_end_date
1282 );
1283 l_eligy_prfl_rl_id number(15);
1284 l_out_erl_result_id number(15);
1285 ---------------------------------------------------------------
1286 -- END OF BEN_ELIGY_PRFL_RL_F ----------------------
1287 ---------------------------------------------------------------
1288 ---------------------------------------------------------------
1289 -- START OF BEN_ELIG_AGE_PRTE_F ----------------------
1290 ---------------------------------------------------------------
1291 cursor c_eap_from_parent(c_ELIGY_PRFL_ID number) is
1292 select distinct elig_age_prte_id
1293 from BEN_ELIG_AGE_PRTE_F
1294 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
1295 --
1296 cursor c_eap(c_elig_age_prte_id number,c_mirror_src_entity_result_id number ,
1297 c_table_alias varchar2 ) is
1298 select eap.*
1299 from BEN_ELIG_AGE_PRTE_F eap
1300 where eap.elig_age_prte_id = c_elig_age_prte_id
1301 -- and eap.business_group_id = p_business_group_id
1302 and not exists (
1303 select /* */ null
1304 from ben_copy_entity_results cpe
1305 -- pqh_table_route trt
1306 where copy_entity_txn_id = p_copy_entity_txn_id
1307 -- and trt.table_route_id = cpe.table_route_id
1308 and ( -- c_mirror_src_entity_result_id is null or
1309 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
1310 -- and trt.where_clause = 'BEN_ELIG_AGE_PRTE_F'
1311 and cpe.table_alias = c_table_alias
1312 and information1 = c_elig_age_prte_id
1313 -- and information4 = eap.business_group_id
1314 and information2 = eap.effective_start_date
1315 and information3 = eap.effective_end_date
1316 );
1317 l_elig_age_prte_id number(15);
1318 l_out_eap_result_id number(15);
1319 --
1320 cursor c_eap_drp(c_elig_age_prte_id number,c_mirror_src_entity_result_id number ,
1321 c_table_alias varchar2 ) is
1322 select distinct cpe.information246 age_fctr_id
1323 from ben_copy_entity_results cpe
1324 -- pqh_table_route trt
1325 where copy_entity_txn_id = p_copy_entity_txn_id
1326 -- and trt.table_route_id = cpe.table_route_id
1327 and mirror_src_entity_result_id = c_mirror_src_entity_result_id
1328 -- and trt.where_clause = 'BEN_ELIG_AGE_PRTE_F'
1329 and cpe.table_alias = c_table_alias
1330 and information1 = c_elig_age_prte_id
1331 -- and information4 = p_business_group_id
1332 ;
1333 ---------------------------------------------------------------
1334 -- END OF BEN_ELIG_AGE_PRTE_F ----------------------
1335 ---------------------------------------------------------------
1336 ---------------------------------------------------------------
1337 -- START OF BEN_ELIG_ASNT_SET_PRTE_F ----------------------
1338 ---------------------------------------------------------------
1339 cursor c_ean_from_parent(c_ELIGY_PRFL_ID number) is
1340 select elig_asnt_set_prte_id
1341 from BEN_ELIG_ASNT_SET_PRTE_F
1342 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
1343 --
1344 cursor c_ean(c_elig_asnt_set_prte_id number,c_mirror_src_entity_result_id number ,
1345 c_table_alias varchar2 ) is
1346 select ean.*
1347 from BEN_ELIG_ASNT_SET_PRTE_F ean
1348 where ean.elig_asnt_set_prte_id = c_elig_asnt_set_prte_id
1349 -- and ean.business_group_id = p_business_group_id
1350 and not exists (
1351 select /* */ null
1352 from ben_copy_entity_results cpe
1353 -- pqh_table_route trt
1354 where copy_entity_txn_id = p_copy_entity_txn_id
1355 -- and trt.table_route_id = cpe.table_route_id
1356 and ( -- c_mirror_src_entity_result_id is null or
1357 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
1358 -- and trt.where_clause = 'BEN_ELIG_ASNT_SET_PRTE_F'
1359 and cpe.table_alias = c_table_alias
1360 and information1 = c_elig_asnt_set_prte_id
1361 -- and information4 = ean.business_group_id
1362 and information2 = ean.effective_start_date
1363 and information3 = ean.effective_end_date
1364 );
1365 l_elig_asnt_set_prte_id number(15);
1366 l_out_ean_result_id number(15);
1367 --
1368 -- pabodla : mapping data
1369 --
1370 cursor c_get_mapping_name(p_id in number) is
1371 select assignment_set_name
1372 from hr_assignment_sets
1373 where business_group_id = p_business_group_id
1374 and assignment_set_id = p_id;
1375 --
1376 l_mapping_id number;
1377 l_mapping_name varchar2(600);
1378 l_mapping_column_name1 pqh_attributes.attribute_name%type;
1379 l_mapping_column_name2 pqh_attributes.attribute_name%type;
1380 l_information172 varchar2(300);
1381 --
1382 ---------------------------------------------------------------
1383 -- END OF BEN_ELIG_ASNT_SET_PRTE_F ----------------------
1384 ---------------------------------------------------------------
1385 ---------------------------------------------------------------
1386 -- START OF BEN_ELIG_BENFTS_GRP_PRTE_F ----------------------
1387 ---------------------------------------------------------------
1388 cursor c_ebn_from_parent(c_ELIGY_PRFL_ID number) is
1389 select distinct elig_benfts_grp_prte_id
1390 from BEN_ELIG_BENFTS_GRP_PRTE_F
1391 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
1392 --
1393 cursor c_ebn(c_elig_benfts_grp_prte_id number,c_mirror_src_entity_result_id number ,
1394 c_table_alias varchar2 ) is
1395 select ebn.*
1396 from BEN_ELIG_BENFTS_GRP_PRTE_F ebn
1397 where ebn.elig_benfts_grp_prte_id = c_elig_benfts_grp_prte_id
1398 -- and ebn.business_group_id = p_business_group_id
1399 and not exists (
1400 select /* */ null
1401 from ben_copy_entity_results cpe
1402 -- pqh_table_route trt
1403 where copy_entity_txn_id = p_copy_entity_txn_id
1404 -- and trt.table_route_id = cpe.table_route_id
1405 and ( -- c_mirror_src_entity_result_id is null or
1406 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
1407 -- and trt.where_clause = 'BEN_ELIG_BENFTS_GRP_PRTE_F'
1408 and cpe.table_alias = c_table_alias
1409 and information1 = c_elig_benfts_grp_prte_id
1410 -- and information4 = ebn.business_group_id
1411 and information2 = ebn.effective_start_date
1412 and information3 = ebn.effective_end_date
1413 );
1414 l_elig_benfts_grp_prte_id number(15);
1415 l_out_ebn_result_id number(15);
1416 --
1417 cursor c_ebn_bg(c_elig_benfts_grp_prte_id number,c_mirror_src_entity_result_id number ,
1418 c_table_alias varchar2 ) is
1419 select distinct cpe.information222 benfts_grp_id
1420 from ben_copy_entity_results cpe
1421 -- pqh_table_route trt
1422 where copy_entity_txn_id = p_copy_entity_txn_id
1423 -- and trt.table_route_id = cpe.table_route_id
1424 and mirror_src_entity_result_id = c_mirror_src_entity_result_id
1425 -- and trt.where_clause = 'BEN_ELIG_BENFTS_GRP_PRTE_F'
1426 and cpe.table_alias = c_table_alias
1427 and information1 = c_elig_benfts_grp_prte_id
1428 -- and information4 = p_business_group_id
1429 ;
1430 ---------------------------------------------------------------
1431 -- END OF BEN_ELIG_BENFTS_GRP_PRTE_F ----------------------
1432 ---------------------------------------------------------------
1433 ---------------------------------------------------------------
1434 -- START OF BEN_ELIG_BRGNG_UNIT_PRTE_F ----------------------
1435 ---------------------------------------------------------------
1436 cursor c_ebu_from_parent(c_ELIGY_PRFL_ID number) is
1437 select elig_brgng_unit_prte_id
1438 from BEN_ELIG_BRGNG_UNIT_PRTE_F
1439 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
1440 --
1441 cursor c_ebu(c_elig_brgng_unit_prte_id number,c_mirror_src_entity_result_id number ,
1442 c_table_alias varchar2 ) is
1443 select ebu.*
1444 from BEN_ELIG_BRGNG_UNIT_PRTE_F ebu
1445 where ebu.elig_brgng_unit_prte_id = c_elig_brgng_unit_prte_id
1446 -- and ebu.business_group_id = p_business_group_id
1447 and not exists (
1448 select /* */ null
1449 from ben_copy_entity_results cpe
1450 -- pqh_table_route trt
1451 where copy_entity_txn_id = p_copy_entity_txn_id
1452 -- and trt.table_route_id = cpe.table_route_id
1453 and ( -- c_mirror_src_entity_result_id is null or
1454 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
1455 -- and trt.where_clause = 'BEN_ELIG_BRGNG_UNIT_PRTE_F'
1456 and cpe.table_alias = c_table_alias
1457 and information1 = c_elig_brgng_unit_prte_id
1458 -- and information4 = ebu.business_group_id
1459 and information2 = ebu.effective_start_date
1460 and information3 = ebu.effective_end_date
1461 );
1462 l_elig_brgng_unit_prte_id number(15);
1463 l_out_ebu_result_id number(15);
1464 ---------------------------------------------------------------
1465 -- END OF BEN_ELIG_BRGNG_UNIT_PRTE_F ----------------------
1466 ---------------------------------------------------------------
1467 ---------------------------------------------------------------
1468 -- START OF BEN_ELIG_CBR_QUALD_BNF_F ----------------------
1469 ---------------------------------------------------------------
1470 cursor c_ecq_from_parent(c_ELIGY_PRFL_ID number) is
1471 select elig_cbr_quald_bnf_id
1472 from BEN_ELIG_CBR_QUALD_BNF_F
1473 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
1474 --
1475 cursor c_ecq(c_elig_cbr_quald_bnf_id number,c_mirror_src_entity_result_id number ,
1476 c_table_alias varchar2 ) is
1477 select ecq.*
1478 from BEN_ELIG_CBR_QUALD_BNF_F ecq
1479 where ecq.elig_cbr_quald_bnf_id = c_elig_cbr_quald_bnf_id
1480 -- and ecq.business_group_id = p_business_group_id
1481 and not exists (
1482 select /* */ null
1483 from ben_copy_entity_results cpe
1484 -- pqh_table_route trt
1485 where copy_entity_txn_id = p_copy_entity_txn_id
1486 -- and trt.table_route_id = cpe.table_route_id
1487 and ( -- c_mirror_src_entity_result_id is null or
1488 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
1489 -- and trt.where_clause = 'BEN_ELIG_CBR_QUALD_BNF_F'
1490 and cpe.table_alias = c_table_alias
1491 and information1 = c_elig_cbr_quald_bnf_id
1492 -- and information4 = ecq.business_group_id
1493 and information2 = ecq.effective_start_date
1494 and information3 = ecq.effective_end_date
1495 );
1496 l_elig_cbr_quald_bnf_id number(15);
1497 l_out_ecq_result_id number(15);
1498 ---------------------------------------------------------------
1499 -- END OF BEN_ELIG_CBR_QUALD_BNF_F ----------------------
1500 ---------------------------------------------------------------
1501 ---------------------------------------------------------------
1502 -- START OF BEN_ELIG_CMBN_AGE_LOS_PRTE_F ----------------------
1503 ---------------------------------------------------------------
1504 cursor c_ecp_from_parent(c_ELIGY_PRFL_ID number) is
1505 select distinct elig_cmbn_age_los_prte_id
1506 from BEN_ELIG_CMBN_AGE_LOS_PRTE_F
1507 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
1508 --
1509 cursor c_ecp(c_elig_cmbn_age_los_prte_id number,c_mirror_src_entity_result_id number ,
1510 c_table_alias varchar2 ) is
1511 select ecp.*
1512 from BEN_ELIG_CMBN_AGE_LOS_PRTE_F ecp
1513 where ecp.elig_cmbn_age_los_prte_id = c_elig_cmbn_age_los_prte_id
1514 -- and ecp.business_group_id = p_business_group_id
1515 and not exists (
1516 select /* */ null
1517 from ben_copy_entity_results cpe
1518 -- pqh_table_route trt
1519 where copy_entity_txn_id = p_copy_entity_txn_id
1520 -- and trt.table_route_id = cpe.table_route_id
1521 and ( -- c_mirror_src_entity_result_id is null or
1522 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
1523 -- and trt.where_clause = 'BEN_ELIG_CMBN_AGE_LOS_PRTE_F'
1524 and cpe.table_alias = c_table_alias
1525 and information1 = c_elig_cmbn_age_los_prte_id
1526 -- and information4 = ecp.business_group_id
1527 and information2 = ecp.effective_start_date
1528 and information3 = ecp.effective_end_date
1529 );
1530 l_elig_cmbn_age_los_prte_id number(15);
1531 l_out_ecp_result_id number(15);
1532 --
1533 cursor c_ecp_drp(c_elig_cmbn_age_los_prte_id number,c_mirror_src_entity_result_id number ,
1534 c_table_alias varchar2 ) is
1535 select distinct cpe.information223 cmbn_age_los_fctr_id
1536 from ben_copy_entity_results cpe
1537 -- pqh_table_route trt
1538 where copy_entity_txn_id = p_copy_entity_txn_id
1539 -- and trt.table_route_id = cpe.table_route_id
1540 and mirror_src_entity_result_id = c_mirror_src_entity_result_id
1541 -- and trt.where_clause = 'BEN_ELIG_CMBN_AGE_LOS_PRTE_F'
1542 and cpe.table_alias = c_table_alias
1543 and information1 = c_elig_cmbn_age_los_prte_id
1544 -- and information4 = p_business_group_id
1545 ;
1546 ---------------------------------------------------------------
1547 -- END OF BEN_ELIG_CMBN_AGE_LOS_PRTE_F ----------------------
1548 ---------------------------------------------------------------
1549 ---------------------------------------------------------------
1550 -- START OF BEN_ELIG_COMP_LVL_PRTE_F ----------------------
1551 ---------------------------------------------------------------
1552 cursor c_ecl_from_parent(c_ELIGY_PRFL_ID number) is
1553 select distinct elig_comp_lvl_prte_id
1554 from BEN_ELIG_COMP_LVL_PRTE_F
1555 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
1556 --
1557 cursor c_ecl(c_elig_comp_lvl_prte_id number,c_mirror_src_entity_result_id number ,
1558 c_table_alias varchar2 ) is
1559 select ecl.*
1560 from BEN_ELIG_COMP_LVL_PRTE_F ecl
1561 where ecl.elig_comp_lvl_prte_id = c_elig_comp_lvl_prte_id
1562 -- and ecl.business_group_id = p_business_group_id
1563 and not exists (
1564 select /* */ null
1565 from ben_copy_entity_results cpe
1566 -- pqh_table_route trt
1567 where copy_entity_txn_id = p_copy_entity_txn_id
1568 -- and trt.table_route_id = cpe.table_route_id
1569 and ( -- c_mirror_src_entity_result_id is null or
1570 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
1571 -- and trt.where_clause = 'BEN_ELIG_COMP_LVL_PRTE_F'
1572 and cpe.table_alias = c_table_alias
1573 and information1 = c_elig_comp_lvl_prte_id
1574 -- and information4 = ecl.business_group_id
1575 and information2 = ecl.effective_start_date
1576 and information3 = ecl.effective_end_date
1577 );
1578 l_elig_comp_lvl_prte_id number(15);
1579 l_out_ecl_result_id number(15);
1580 --
1581 cursor c_ecl_drp(c_elig_comp_lvl_prte_id number,c_mirror_src_entity_result_id number ,
1582 c_table_alias varchar2 ) is
1583 select distinct cpe.information254 comp_lvl_fctr_id
1584 from ben_copy_entity_results cpe
1585 -- pqh_table_route trt
1586 where copy_entity_txn_id = p_copy_entity_txn_id
1587 -- and trt.table_route_id = cpe.table_route_id
1588 and mirror_src_entity_result_id = c_mirror_src_entity_result_id
1589 -- and trt.where_clause = 'BEN_ELIG_COMP_LVL_PRTE_F'
1590 and cpe.table_alias = c_table_alias
1591 and information1 = c_elig_comp_lvl_prte_id
1592 -- and information4 = p_business_group_id
1593 ;
1594 --
1595 ---------------------------------------------------------------
1596 -- END OF BEN_ELIG_COMP_LVL_PRTE_F ----------------------
1597 ---------------------------------------------------------------
1598 ---------------------------------------------------------------
1599 -- START OF BEN_ELIG_DPNT_CVRD_OTHR_PGM_F ----------------------
1600 ---------------------------------------------------------------
1601 cursor c_edg_from_parent(c_ELIGY_PRFL_ID number) is
1602 select elig_dpnt_cvrd_othr_pgm_id
1603 from BEN_ELIG_DPNT_CVRD_OTHR_PGM_F
1604 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
1605 --
1606 cursor c_edg(c_elig_dpnt_cvrd_othr_pgm_id number,c_mirror_src_entity_result_id number ,
1607 c_table_alias varchar2 ) is
1608 select edg.*
1609 from BEN_ELIG_DPNT_CVRD_OTHR_PGM_F edg
1610 where edg.elig_dpnt_cvrd_othr_pgm_id = c_elig_dpnt_cvrd_othr_pgm_id
1611 -- and edg.business_group_id = p_business_group_id
1612 and not exists (
1613 select /* */ null
1614 from ben_copy_entity_results cpe
1615 -- pqh_table_route trt
1616 where copy_entity_txn_id = p_copy_entity_txn_id
1617 -- and trt.table_route_id = cpe.table_route_id
1618 and ( -- c_mirror_src_entity_result_id is null or
1619 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
1620 -- and trt.where_clause = 'BEN_ELIG_DPNT_CVRD_OTHR_PGM_F'
1621 and cpe.table_alias = c_table_alias
1622 and information1 = c_elig_dpnt_cvrd_othr_pgm_id
1623 -- and information4 = edg.business_group_id
1624 and information2 = edg.effective_start_date
1625 and information3 = edg.effective_end_date
1626 );
1627 l_elig_dpnt_cvrd_othr_pgm_id number(15);
1628 l_out_edg_result_id number(15);
1629 ---------------------------------------------------------------
1630 -- END OF BEN_ELIG_DPNT_CVRD_OTHR_PGM_F ----------------------
1631 ---------------------------------------------------------------
1632 ---------------------------------------------------------------
1633 -- START OF BEN_ELIG_DPNT_CVRD_OTHR_PL_F ----------------------
1634 ---------------------------------------------------------------
1635 cursor c_edp_from_parent(c_ELIGY_PRFL_ID number) is
1636 select elig_dpnt_cvrd_othr_pl_id
1637 from BEN_ELIG_DPNT_CVRD_OTHR_PL_F
1638 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
1639 --
1640 cursor c_edp(c_elig_dpnt_cvrd_othr_pl_id number,c_mirror_src_entity_result_id number ,
1641 c_table_alias varchar2 ) is
1642 select edp.*
1643 from BEN_ELIG_DPNT_CVRD_OTHR_PL_F edp
1644 where edp.elig_dpnt_cvrd_othr_pl_id = c_elig_dpnt_cvrd_othr_pl_id
1645 -- and edp.business_group_id = p_business_group_id
1646 and not exists (
1647 select /* */ null
1648 from ben_copy_entity_results cpe
1649 -- pqh_table_route trt
1650 where copy_entity_txn_id = p_copy_entity_txn_id
1651 -- and trt.table_route_id = cpe.table_route_id
1652 and ( -- c_mirror_src_entity_result_id is null or
1653 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
1654 -- and trt.where_clause = 'BEN_ELIG_DPNT_CVRD_OTHR_PL_F'
1655 and cpe.table_alias = c_table_alias
1656 and information1 = c_elig_dpnt_cvrd_othr_pl_id
1657 -- and information4 = edp.business_group_id
1658 and information2 = edp.effective_start_date
1659 and information3 = edp.effective_end_date
1660 );
1661 l_elig_dpnt_cvrd_othr_pl_id number(15);
1662 l_out_edp_result_id number(15);
1663 ---------------------------------------------------------------
1664 -- END OF BEN_ELIG_DPNT_CVRD_OTHR_PL_F ----------------------
1665 ---------------------------------------------------------------
1666 ---------------------------------------------------------------
1667 -- START OF BEN_ELIG_DPNT_CVRD_OTHR_PTIP_F ----------------------
1668 ---------------------------------------------------------------
1669 cursor c_edt_from_parent(c_ELIGY_PRFL_ID number) is
1670 select elig_dpnt_cvrd_othr_ptip_id
1671 from BEN_ELIG_DPNT_CVRD_OTHR_PTIP_F
1672 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
1673 --
1674 cursor c_edt(c_elig_dpnt_cvrd_othr_ptip_id number,c_mirror_src_entity_result_id number ,
1675 c_table_alias varchar2 ) is
1676 select edt.*
1677 from BEN_ELIG_DPNT_CVRD_OTHR_PTIP_F edt
1678 where edt.elig_dpnt_cvrd_othr_ptip_id = c_elig_dpnt_cvrd_othr_ptip_id
1679 -- and edt.business_group_id = p_business_group_id
1680 and not exists (
1681 select /* */ null
1682 from ben_copy_entity_results cpe
1683 -- pqh_table_route trt
1684 where copy_entity_txn_id = p_copy_entity_txn_id
1685 -- and trt.table_route_id = cpe.table_route_id
1686 and ( -- c_mirror_src_entity_result_id is null or
1687 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
1688 -- and trt.where_clause = 'BEN_ELIG_DPNT_CVRD_OTHR_PTIP_F'
1689 and cpe.table_alias = c_table_alias
1690 and information1 = c_elig_dpnt_cvrd_othr_ptip_id
1691 -- and information4 = edt.business_group_id
1692 and information2 = edt.effective_start_date
1693 and information3 = edt.effective_end_date
1694 );
1695 l_elig_dpnt_cvrd_othr_ptip_id number(15);
1696 l_out_edt_result_id number(15);
1697 ---------------------------------------------------------------
1698 -- END OF BEN_ELIG_DPNT_CVRD_OTHR_PTIP_F ----------------------
1699 ---------------------------------------------------------------
1700 ---------------------------------------------------------------
1701 -- START OF BEN_ELIG_DPNT_CVRD_PLIP_F ----------------------
1702 ---------------------------------------------------------------
1703 cursor c_edi_from_parent(c_ELIGY_PRFL_ID number) is
1704 select elig_dpnt_cvrd_plip_id
1705 from BEN_ELIG_DPNT_CVRD_PLIP_F
1706 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
1707 --
1708 cursor c_edi(c_elig_dpnt_cvrd_plip_id number,c_mirror_src_entity_result_id number ,
1709 c_table_alias varchar2 ) is
1710 select edi.*
1711 from BEN_ELIG_DPNT_CVRD_PLIP_F edi
1712 where edi.elig_dpnt_cvrd_plip_id = c_elig_dpnt_cvrd_plip_id
1713 -- and edi.business_group_id = p_business_group_id
1714 and not exists (
1715 select /* */ null
1716 from ben_copy_entity_results cpe
1717 -- pqh_table_route trt
1718 where copy_entity_txn_id = p_copy_entity_txn_id
1719 -- and trt.table_route_id = cpe.table_route_id
1720 and ( -- c_mirror_src_entity_result_id is null or
1721 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
1722 -- and trt.where_clause = 'BEN_ELIG_DPNT_CVRD_PLIP_F'
1723 and cpe.table_alias = c_table_alias
1724 and information1 = c_elig_dpnt_cvrd_plip_id
1725 -- and information4 = edi.business_group_id
1726 and information2 = edi.effective_start_date
1727 and information3 = edi.effective_end_date
1728 );
1729 l_elig_dpnt_cvrd_plip_id number(15);
1730 l_out_edi_result_id number(15);
1731 ---------------------------------------------------------------
1732 -- END OF BEN_ELIG_DPNT_CVRD_PLIP_F ----------------------
1733 ---------------------------------------------------------------
1734 ---------------------------------------------------------------
1735 -- START OF BEN_ELIG_DPNT_OTHR_PTIP_F ----------------------
1736 ---------------------------------------------------------------
1737 cursor c_etd_from_parent(c_ELIGY_PRFL_ID number) is
1738 select elig_dpnt_othr_ptip_id
1739 from BEN_ELIG_DPNT_OTHR_PTIP_F
1740 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
1741 --
1742 cursor c_etd(c_elig_dpnt_othr_ptip_id number,c_mirror_src_entity_result_id number ,
1743 c_table_alias varchar2 ) is
1744 select etd.*
1745 from BEN_ELIG_DPNT_OTHR_PTIP_F etd
1746 where etd.elig_dpnt_othr_ptip_id = c_elig_dpnt_othr_ptip_id
1747 -- and etd.business_group_id = p_business_group_id
1748 and not exists (
1749 select /* */ null
1750 from ben_copy_entity_results cpe
1751 -- pqh_table_route trt
1752 where copy_entity_txn_id = p_copy_entity_txn_id
1753 -- and trt.table_route_id = cpe.table_route_id
1754 and ( -- c_mirror_src_entity_result_id is null or
1755 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
1756 -- and trt.where_clause = 'BEN_ELIG_DPNT_OTHR_PTIP_F'
1757 and cpe.table_alias = c_table_alias
1758 and information1 = c_elig_dpnt_othr_ptip_id
1759 -- and information4 = etd.business_group_id
1760 and information2 = etd.effective_start_date
1761 and information3 = etd.effective_end_date
1762 );
1763 l_elig_dpnt_othr_ptip_id number(15);
1764 l_out_etd_result_id number(15);
1765 ---------------------------------------------------------------
1766 -- END OF BEN_ELIG_DPNT_OTHR_PTIP_F ----------------------
1767 ---------------------------------------------------------------
1768 ---------------------------------------------------------------
1769 -- START OF BEN_ELIG_DSBLD_STAT_PRTE_F ----------------------
1770 ---------------------------------------------------------------
1771 cursor c_eds_from_parent(c_ELIGY_PRFL_ID number) is
1772 select elig_dsbld_stat_prte_id
1773 from BEN_ELIG_DSBLD_STAT_PRTE_F
1774 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
1775 --
1776 cursor c_eds(c_elig_dsbld_stat_prte_id number,c_mirror_src_entity_result_id number ,
1777 c_table_alias varchar2 ) is
1778 select eds.*
1779 from BEN_ELIG_DSBLD_STAT_PRTE_F eds
1780 where eds.elig_dsbld_stat_prte_id = c_elig_dsbld_stat_prte_id
1781 -- and eds.business_group_id = p_business_group_id
1782 and not exists (
1783 select /* */ null
1784 from ben_copy_entity_results cpe
1785 -- pqh_table_route trt
1786 where copy_entity_txn_id = p_copy_entity_txn_id
1787 -- and trt.table_route_id = cpe.table_route_id
1788 and ( -- c_mirror_src_entity_result_id is null or
1789 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
1790 -- and trt.where_clause = 'BEN_ELIG_DSBLD_STAT_PRTE_F'
1791 and cpe.table_alias = c_table_alias
1792 and information1 = c_elig_dsbld_stat_prte_id
1793 -- and information4 = eds.business_group_id
1794 and information2 = eds.effective_start_date
1795 and information3 = eds.effective_end_date
1796 );
1797 l_elig_dsbld_stat_prte_id number(15);
1798 l_out_eds_result_id number(15);
1799 ---------------------------------------------------------------
1800 -- END OF BEN_ELIG_DSBLD_STAT_PRTE_F ----------------------
1801 ---------------------------------------------------------------
1802 ---------------------------------------------------------------
1803 -- START OF BEN_ELIG_EE_STAT_PRTE_F ----------------------
1804 ---------------------------------------------------------------
1805 cursor c_ees_from_parent(c_ELIGY_PRFL_ID number) is
1806 select elig_ee_stat_prte_id
1807 from BEN_ELIG_EE_STAT_PRTE_F
1808 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
1809 --
1810 cursor c_ees(c_elig_ee_stat_prte_id number,c_mirror_src_entity_result_id number ,
1811 c_table_alias varchar2 ) is
1812 select ees.*
1813 from BEN_ELIG_EE_STAT_PRTE_F ees
1814 where ees.elig_ee_stat_prte_id = c_elig_ee_stat_prte_id
1815 -- and ees.business_group_id = p_business_group_id
1816 and not exists (
1817 select /* */ null
1818 from ben_copy_entity_results cpe
1819 -- pqh_table_route trt
1820 where copy_entity_txn_id = p_copy_entity_txn_id
1821 -- and trt.table_route_id = cpe.table_route_id
1822 and ( -- c_mirror_src_entity_result_id is null or
1823 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
1824 -- and trt.where_clause = 'BEN_ELIG_EE_STAT_PRTE_F'
1825 and cpe.table_alias = c_table_alias
1826 and information1 = c_elig_ee_stat_prte_id
1827 -- and information4 = ees.business_group_id
1828 and information2 = ees.effective_start_date
1829 and information3 = ees.effective_end_date
1830 );
1831 l_elig_ee_stat_prte_id number(15);
1832 l_out_ees_result_id number(15);
1833 --
1834 -- pabodla : mapping data
1835 --
1836 cursor c_get_mapping_name1(p_id in number) is
1837 select nvl(atl.user_status, stl.user_status) dsp_meaning
1838 from per_assignment_status_types s,
1839 per_ass_status_type_amends a ,
1840 per_business_groups bus ,
1841 per_assignment_status_types_tl stl ,
1842 per_ass_status_type_amends_tl atl
1843 where a.assignment_status_type_id (+) = s.assignment_status_type_id
1844 and a.business_group_id (+) = p_business_group_id
1845 and nvl(s.business_group_id, p_business_group_id) = p_business_group_id
1846 and nvl(s.legislation_code, bus.legislation_code) = bus.legislation_code
1847 -- and bus.business_group_id = p_business_group_id
1848 and bus.business_group_id = nvl(s.business_group_id, p_business_group_id)
1849 and s.assignment_status_type_id = p_id
1850 and nvl(a.active_flag, s.active_flag) = 'Y'
1851 and atl.ass_status_type_amend_id (+) = a.ass_status_type_amend_id
1852 and atl.language (+) = userenv('LANG')
1853 and stl.assignment_status_type_id = s.assignment_status_type_id
1854 and stl.language = userenv('LANG');
1855 --
1856 ---------------------------------------------------------------
1857 -- END OF BEN_ELIG_EE_STAT_PRTE_F ----------------------
1858 ---------------------------------------------------------------
1859 ---------------------------------------------------------------
1860 -- START OF BEN_ELIG_ENRLD_ANTHR_OIPL_F ----------------------
1861 ---------------------------------------------------------------
1862 cursor c_eei_from_parent(c_ELIGY_PRFL_ID number) is
1863 select elig_enrld_anthr_oipl_id
1864 from BEN_ELIG_ENRLD_ANTHR_OIPL_F
1865 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
1866 --
1867 cursor c_eei(c_elig_enrld_anthr_oipl_id number,c_mirror_src_entity_result_id number ,
1868 c_table_alias varchar2 ) is
1869 select eei.*
1870 from BEN_ELIG_ENRLD_ANTHR_OIPL_F eei
1871 where eei.elig_enrld_anthr_oipl_id = c_elig_enrld_anthr_oipl_id
1872 -- and eei.business_group_id = p_business_group_id
1873 and not exists (
1874 select /* */ null
1875 from ben_copy_entity_results cpe
1876 -- pqh_table_route trt
1877 where copy_entity_txn_id = p_copy_entity_txn_id
1878 -- and trt.table_route_id = cpe.table_route_id
1879 and ( -- c_mirror_src_entity_result_id is null or
1880 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
1881 -- and trt.where_clause = 'BEN_ELIG_ENRLD_ANTHR_OIPL_F'
1882 and cpe.table_alias = c_table_alias
1883 and information1 = c_elig_enrld_anthr_oipl_id
1884 -- and information4 = eei.business_group_id
1885 and information2 = eei.effective_start_date
1886 and information3 = eei.effective_end_date
1887 );
1888 l_elig_enrld_anthr_oipl_id number(15);
1889 l_out_eei_result_id number(15);
1890 ---------------------------------------------------------------
1891 -- END OF BEN_ELIG_ENRLD_ANTHR_OIPL_F ----------------------
1892 ---------------------------------------------------------------
1893 ---------------------------------------------------------------
1894 -- START OF BEN_ELIG_ENRLD_ANTHR_PGM_F ----------------------
1895 ---------------------------------------------------------------
1896 cursor c_eeg_from_parent(c_ELIGY_PRFL_ID number) is
1897 select elig_enrld_anthr_pgm_id
1898 from BEN_ELIG_ENRLD_ANTHR_PGM_F
1899 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
1900 --
1901 cursor c_eeg(c_elig_enrld_anthr_pgm_id number,c_mirror_src_entity_result_id number ,
1902 c_table_alias varchar2 ) is
1903 select eeg.*
1904 from BEN_ELIG_ENRLD_ANTHR_PGM_F eeg
1905 where eeg.elig_enrld_anthr_pgm_id = c_elig_enrld_anthr_pgm_id
1906 -- and eeg.business_group_id = p_business_group_id
1907 and not exists (
1908 select /* */ null
1909 from ben_copy_entity_results cpe
1910 -- pqh_table_route trt
1911 where copy_entity_txn_id = p_copy_entity_txn_id
1912 -- and trt.table_route_id = cpe.table_route_id
1913 and ( -- c_mirror_src_entity_result_id is null or
1914 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
1915 -- and trt.where_clause = 'BEN_ELIG_ENRLD_ANTHR_PGM_F'
1916 and cpe.table_alias = c_table_alias
1917 and information1 = c_elig_enrld_anthr_pgm_id
1918 -- and information4 = eeg.business_group_id
1919 and information2 = eeg.effective_start_date
1920 and information3 = eeg.effective_end_date
1921 );
1922 l_elig_enrld_anthr_pgm_id number(15);
1923 l_out_eeg_result_id number(15);
1924 ---------------------------------------------------------------
1925 -- END OF BEN_ELIG_ENRLD_ANTHR_PGM_F ----------------------
1926 ---------------------------------------------------------------
1927 ---------------------------------------------------------------
1928 -- START OF BEN_ELIG_ENRLD_ANTHR_PLIP_F ----------------------
1929 ---------------------------------------------------------------
1930 cursor c_eai_from_parent(c_ELIGY_PRFL_ID number) is
1931 select elig_enrld_anthr_plip_id
1932 from BEN_ELIG_ENRLD_ANTHR_PLIP_F
1933 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
1934 --
1935 cursor c_eai(c_elig_enrld_anthr_plip_id number,c_mirror_src_entity_result_id number ,
1936 c_table_alias varchar2 ) is
1937 select eai.*
1938 from BEN_ELIG_ENRLD_ANTHR_PLIP_F eai
1939 where eai.elig_enrld_anthr_plip_id = c_elig_enrld_anthr_plip_id
1940 -- and eai.business_group_id = p_business_group_id
1941 and not exists (
1942 select /* */ null
1943 from ben_copy_entity_results cpe
1944 -- pqh_table_route trt
1945 where copy_entity_txn_id = p_copy_entity_txn_id
1946 -- and trt.table_route_id = cpe.table_route_id
1947 and ( -- c_mirror_src_entity_result_id is null or
1948 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
1949 -- and trt.where_clause = 'BEN_ELIG_ENRLD_ANTHR_PLIP_F'
1950 and cpe.table_alias = c_table_alias
1951 and information1 = c_elig_enrld_anthr_plip_id
1952 -- and information4 = eai.business_group_id
1953 and information2 = eai.effective_start_date
1954 and information3 = eai.effective_end_date
1955 );
1956 l_elig_enrld_anthr_plip_id number(15);
1957 l_out_eai_result_id number(15);
1958 ---------------------------------------------------------------
1959 -- END OF BEN_ELIG_ENRLD_ANTHR_PLIP_F ----------------------
1960 ---------------------------------------------------------------
1961 ---------------------------------------------------------------
1962 -- START OF BEN_ELIG_ENRLD_ANTHR_PL_F ----------------------
1963 ---------------------------------------------------------------
1964 cursor c_eep_from_parent(c_ELIGY_PRFL_ID number) is
1965 select elig_enrld_anthr_pl_id
1966 from BEN_ELIG_ENRLD_ANTHR_PL_F
1967 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
1968 --
1969 cursor c_eep(c_elig_enrld_anthr_pl_id number,c_mirror_src_entity_result_id number ,
1970 c_table_alias varchar2 ) is
1971 select eep.*
1972 from BEN_ELIG_ENRLD_ANTHR_PL_F eep
1973 where eep.elig_enrld_anthr_pl_id = c_elig_enrld_anthr_pl_id
1974 -- and eep.business_group_id = p_business_group_id
1975 and not exists (
1976 select /* */ null
1977 from ben_copy_entity_results cpe
1978 -- pqh_table_route trt
1979 where copy_entity_txn_id = p_copy_entity_txn_id
1980 -- and trt.table_route_id = cpe.table_route_id
1981 and ( -- c_mirror_src_entity_result_id is null or
1982 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
1983 -- and trt.where_clause = 'BEN_ELIG_ENRLD_ANTHR_PL_F'
1984 and cpe.table_alias = c_table_alias
1985 and information1 = c_elig_enrld_anthr_pl_id
1986 -- and information4 = eep.business_group_id
1987 and information2 = eep.effective_start_date
1988 and information3 = eep.effective_end_date
1989 );
1990 l_elig_enrld_anthr_pl_id number(15);
1991 l_out_eep_result_id number(15);
1992 ---------------------------------------------------------------
1993 -- END OF BEN_ELIG_ENRLD_ANTHR_PL_F ----------------------
1994 ---------------------------------------------------------------
1995 ---------------------------------------------------------------
1996 -- START OF BEN_ELIG_ENRLD_ANTHR_PTIP_F ----------------------
1997 ---------------------------------------------------------------
1998 cursor c_eet_from_parent(c_ELIGY_PRFL_ID number) is
1999 select elig_enrld_anthr_ptip_id
2000 from BEN_ELIG_ENRLD_ANTHR_PTIP_F
2001 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
2002 --
2003 cursor c_eet(c_elig_enrld_anthr_ptip_id number,c_mirror_src_entity_result_id number ,
2004 c_table_alias varchar2 ) is
2005 select eet.*
2006 from BEN_ELIG_ENRLD_ANTHR_PTIP_F eet
2007 where eet.elig_enrld_anthr_ptip_id = c_elig_enrld_anthr_ptip_id
2008 -- and eet.business_group_id = p_business_group_id
2009 and not exists (
2010 select /* */ null
2011 from ben_copy_entity_results cpe
2012 -- pqh_table_route trt
2013 where copy_entity_txn_id = p_copy_entity_txn_id
2014 -- and trt.table_route_id = cpe.table_route_id
2015 and ( -- c_mirror_src_entity_result_id is null or
2016 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
2017 -- and trt.where_clause = 'BEN_ELIG_ENRLD_ANTHR_PTIP_F'
2018 and cpe.table_alias = c_table_alias
2019 and information1 = c_elig_enrld_anthr_ptip_id
2020 -- and information4 = eet.business_group_id
2021 and information2 = eet.effective_start_date
2022 and information3 = eet.effective_end_date
2023 );
2024 l_elig_enrld_anthr_ptip_id number(15);
2025 l_out_eet_result_id number(15);
2026 ---------------------------------------------------------------
2027 -- END OF BEN_ELIG_ENRLD_ANTHR_PTIP_F ----------------------
2028 ---------------------------------------------------------------
2029 ---------------------------------------------------------------
2030 -- START OF BEN_ELIG_FL_TM_PT_TM_PRTE_F ----------------------
2031 ---------------------------------------------------------------
2032 cursor c_efp_from_parent(c_ELIGY_PRFL_ID number) is
2033 select elig_fl_tm_pt_tm_prte_id
2034 from BEN_ELIG_FL_TM_PT_TM_PRTE_F
2035 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
2036 --
2037 cursor c_efp(c_elig_fl_tm_pt_tm_prte_id number,c_mirror_src_entity_result_id number ,
2038 c_table_alias varchar2 ) is
2039 select efp.*
2040 from BEN_ELIG_FL_TM_PT_TM_PRTE_F efp
2041 where efp.elig_fl_tm_pt_tm_prte_id = c_elig_fl_tm_pt_tm_prte_id
2042 -- and efp.business_group_id = p_business_group_id
2043 and not exists (
2044 select /* */ null
2045 from ben_copy_entity_results cpe
2046 -- pqh_table_route trt
2047 where copy_entity_txn_id = p_copy_entity_txn_id
2048 -- and trt.table_route_id = cpe.table_route_id
2049 and ( -- c_mirror_src_entity_result_id is null or
2050 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
2051 -- and trt.where_clause = 'BEN_ELIG_FL_TM_PT_TM_PRTE_F'
2052 and cpe.table_alias = c_table_alias
2053 and information1 = c_elig_fl_tm_pt_tm_prte_id
2054 -- and information4 = efp.business_group_id
2055 and information2 = efp.effective_start_date
2056 and information3 = efp.effective_end_date
2057 );
2058 l_elig_fl_tm_pt_tm_prte_id number(15);
2059 l_out_efp_result_id number(15);
2060 ---------------------------------------------------------------
2061 -- END OF BEN_ELIG_FL_TM_PT_TM_PRTE_F ----------------------
2062 ---------------------------------------------------------------
2063 ---------------------------------------------------------------
2064 -- START OF BEN_ELIG_GRD_PRTE_F ----------------------
2065 ---------------------------------------------------------------
2066 cursor c_egr_from_parent(c_ELIGY_PRFL_ID number) is
2067 select elig_grd_prte_id
2068 from BEN_ELIG_GRD_PRTE_F
2069 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
2070 --
2071 cursor c_egr(c_elig_grd_prte_id number,c_mirror_src_entity_result_id number ,
2072 c_table_alias varchar2 ) is
2073 select egr.*
2074 from BEN_ELIG_GRD_PRTE_F egr
2075 where egr.elig_grd_prte_id = c_elig_grd_prte_id
2076 -- and egr.business_group_id = p_business_group_id
2077 and not exists (
2078 select /* */ null
2079 from ben_copy_entity_results cpe
2080 -- pqh_table_route trt
2081 where copy_entity_txn_id = p_copy_entity_txn_id
2082 -- and trt.table_route_id = cpe.table_route_id
2083 and ( -- c_mirror_src_entity_result_id is null or
2084 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
2085 -- and trt.where_clause = 'BEN_ELIG_GRD_PRTE_F'
2086 and cpe.table_alias = c_table_alias
2087 and information1 = c_elig_grd_prte_id
2088 -- and information4 = egr.business_group_id
2089 and information2 = egr.effective_start_date
2090 and information3 = egr.effective_end_date
2091 );
2092 l_elig_grd_prte_id number(15);
2093 l_out_egr_result_id number(15);
2094 --
2095 -- pabodla : mapping data
2096 --
2097 cursor c_get_mapping_name2(p_id in number,p_date in date) is
2098 select gra.name dsp_name
2099 from per_grades_vl gra
2100 where business_group_id = p_business_group_id
2101 and gra.grade_id = p_id
2102 and p_date between date_from and nvl(date_to, p_date) ;
2103 --
2104 cursor c_grade_start_date(c_grade_id number) is
2105 select date_from
2106 from per_grades
2107 where grade_id = c_grade_id;
2108
2109 l_grade_start_date per_grades.date_from%type;
2110 ---------------------------------------------------------------
2111 -- END OF BEN_ELIG_GRD_PRTE_F ----------------------
2112 ---------------------------------------------------------------
2113 ---------------------------------------------------------------
2114 -- START OF BEN_ELIG_HRLY_SLRD_PRTE_F ----------------------
2115 ---------------------------------------------------------------
2116 cursor c_ehs_from_parent(c_ELIGY_PRFL_ID number) is
2117 select elig_hrly_slrd_prte_id
2118 from BEN_ELIG_HRLY_SLRD_PRTE_F
2119 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
2120 --
2121 cursor c_ehs(c_elig_hrly_slrd_prte_id number,c_mirror_src_entity_result_id number ,
2122 c_table_alias varchar2 ) is
2123 select ehs.*
2124 from BEN_ELIG_HRLY_SLRD_PRTE_F ehs
2125 where ehs.elig_hrly_slrd_prte_id = c_elig_hrly_slrd_prte_id
2126 -- and ehs.business_group_id = p_business_group_id
2127 and not exists (
2128 select /* */ null
2129 from ben_copy_entity_results cpe
2130 -- pqh_table_route trt
2131 where copy_entity_txn_id = p_copy_entity_txn_id
2132 -- and trt.table_route_id = cpe.table_route_id
2133 and ( -- c_mirror_src_entity_result_id is null or
2134 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
2135 -- and trt.where_clause = 'BEN_ELIG_HRLY_SLRD_PRTE_F'
2136 and cpe.table_alias = c_table_alias
2137 and information1 = c_elig_hrly_slrd_prte_id
2138 -- and information4 = ehs.business_group_id
2139 and information2 = ehs.effective_start_date
2140 and information3 = ehs.effective_end_date
2141 );
2142 l_elig_hrly_slrd_prte_id number(15);
2143 l_out_ehs_result_id number(15);
2144 ---------------------------------------------------------------
2145 -- END OF BEN_ELIG_HRLY_SLRD_PRTE_F ----------------------
2146 ---------------------------------------------------------------
2147 ---------------------------------------------------------------
2148 -- START OF BEN_ELIG_HRS_WKD_PRTE_F ----------------------
2149 ---------------------------------------------------------------
2150 cursor c_ehw_from_parent(c_ELIGY_PRFL_ID number) is
2151 select distinct elig_hrs_wkd_prte_id
2152 from BEN_ELIG_HRS_WKD_PRTE_F
2153 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
2154 --
2155 cursor c_ehw(c_elig_hrs_wkd_prte_id number,c_mirror_src_entity_result_id number ,
2156 c_table_alias varchar2 ) is
2157 select ehw.*
2158 from BEN_ELIG_HRS_WKD_PRTE_F ehw
2159 where ehw.elig_hrs_wkd_prte_id = c_elig_hrs_wkd_prte_id
2160 -- and ehw.business_group_id = p_business_group_id
2161 and not exists (
2162 select /* */ null
2163 from ben_copy_entity_results cpe
2164 -- pqh_table_route trt
2165 where copy_entity_txn_id = p_copy_entity_txn_id
2166 -- and trt.table_route_id = cpe.table_route_id
2167 and ( -- c_mirror_src_entity_result_id is null or
2168 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
2169 -- and trt.where_clause = 'BEN_ELIG_HRS_WKD_PRTE_F'
2170 and cpe.table_alias = c_table_alias
2171 and information1 = c_elig_hrs_wkd_prte_id
2172 -- and information4 = ehw.business_group_id
2173 and information2 = ehw.effective_start_date
2174 and information3 = ehw.effective_end_date
2175 );
2176 l_elig_hrs_wkd_prte_id number(15);
2177 l_out_ehw_result_id number(15);
2178 --
2179 cursor c_ehw_drp(c_elig_hrs_wkd_prte_id number,c_mirror_src_entity_result_id number ,
2180 c_table_alias varchar2 ) is
2181 select distinct cpe.information224 hrs_wkd_in_perd_fctr_id
2182 from ben_copy_entity_results cpe
2183 -- pqh_table_route trt
2184 where copy_entity_txn_id = p_copy_entity_txn_id
2185 -- and trt.table_route_id = cpe.table_route_id
2186 and mirror_src_entity_result_id = c_mirror_src_entity_result_id
2187 -- and trt.where_clause = 'BEN_ELIG_HRS_WKD_PRTE_F'
2188 and cpe.table_alias = c_table_alias
2189 and information1 = c_elig_hrs_wkd_prte_id
2190 -- and information4 = p_business_group_id
2191 ;
2192 ---------------------------------------------------------------
2193 -- END OF BEN_ELIG_HRS_WKD_PRTE_F ----------------------
2194 ---------------------------------------------------------------
2195 ---------------------------------------------------------------
2196 -- START OF BEN_ELIG_JOB_PRTE_F ----------------------
2197 ---------------------------------------------------------------
2198 cursor c_ejp_from_parent(c_ELIGY_PRFL_ID number) is
2199 select elig_job_prte_id
2200 from BEN_ELIG_JOB_PRTE_F
2201 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
2202 --
2203 cursor c_ejp(c_elig_job_prte_id number,c_mirror_src_entity_result_id number ,
2204 c_table_alias varchar2 ) is
2205 select ejp.*
2206 from BEN_ELIG_JOB_PRTE_F ejp
2207 where ejp.elig_job_prte_id = c_elig_job_prte_id
2208 -- and ejp.business_group_id = p_business_group_id
2209 and not exists (
2210 select /* */ null
2211 from ben_copy_entity_results cpe
2212 -- pqh_table_route trt
2213 where copy_entity_txn_id = p_copy_entity_txn_id
2214 -- and trt.table_route_id = cpe.table_route_id
2215 and ( -- c_mirror_src_entity_result_id is null or
2216 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
2217 -- and trt.where_clause = 'BEN_ELIG_JOB_PRTE_F'
2218 and cpe.table_alias = c_table_alias
2219 and information1 = c_elig_job_prte_id
2220 -- and information4 = ejp.business_group_id
2221 and information2 = ejp.effective_start_date
2222 and information3 = ejp.effective_end_date
2223 );
2224 l_elig_job_prte_id number(15);
2225 l_out_ejp_result_id number(15);
2226
2227 --
2228 -- pabodla : mapping data
2229 --
2230 cursor c_get_mapping_name3(p_id in number,p_date in date) is
2231 select job.name dsp_name
2232 from per_jobs_vl job
2233 where job.business_group_id = p_business_group_id
2234 and job.job_id = p_id
2235 and p_date between date_from and nvl(date_to,p_date);
2236
2237 cursor c_job_start_date(c_job_id number) is
2238 select date_from
2239 from per_jobs
2240 where job_id = c_job_id;
2241
2242 l_job_start_date per_jobs.date_from%type;
2243 ---------------------------------------------------------------
2244 -- END OF BEN_ELIG_JOB_PRTE_F ----------------------
2245 ---------------------------------------------------------------
2246 ---------------------------------------------------------------
2247 -- START OF BEN_ELIG_LBR_MMBR_PRTE_F ----------------------
2248 ---------------------------------------------------------------
2249 cursor c_elu_from_parent(c_ELIGY_PRFL_ID number) is
2250 select elig_lbr_mmbr_prte_id
2251 from BEN_ELIG_LBR_MMBR_PRTE_F
2252 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
2253 --
2254 cursor c_elu(c_elig_lbr_mmbr_prte_id number,c_mirror_src_entity_result_id number ,
2255 c_table_alias varchar2 ) is
2256 select elu.*
2257 from BEN_ELIG_LBR_MMBR_PRTE_F elu
2258 where elu.elig_lbr_mmbr_prte_id = c_elig_lbr_mmbr_prte_id
2259 -- and elu.business_group_id = p_business_group_id
2260 and not exists (
2261 select /* */ null
2262 from ben_copy_entity_results cpe
2263 -- pqh_table_route trt
2264 where copy_entity_txn_id = p_copy_entity_txn_id
2265 -- and trt.table_route_id = cpe.table_route_id
2266 and ( -- c_mirror_src_entity_result_id is null or
2267 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
2268 -- and trt.where_clause = 'BEN_ELIG_LBR_MMBR_PRTE_F'
2269 and cpe.table_alias = c_table_alias
2270 and information1 = c_elig_lbr_mmbr_prte_id
2271 -- and information4 = elu.business_group_id
2272 and information2 = elu.effective_start_date
2273 and information3 = elu.effective_end_date
2274 );
2275 l_elig_lbr_mmbr_prte_id number(15);
2276 l_out_elu_result_id number(15);
2277 ---------------------------------------------------------------
2278 -- END OF BEN_ELIG_LBR_MMBR_PRTE_F ----------------------
2279 ---------------------------------------------------------------
2280 ---------------------------------------------------------------
2281 -- START OF BEN_ELIG_LGL_ENTY_PRTE_F ----------------------
2282 ---------------------------------------------------------------
2283 cursor c_eln_from_parent(c_ELIGY_PRFL_ID number) is
2284 select elig_lgl_enty_prte_id
2285 from BEN_ELIG_LGL_ENTY_PRTE_F
2286 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
2287 --
2288 cursor c_eln(c_elig_lgl_enty_prte_id number,c_mirror_src_entity_result_id number ,
2289 c_table_alias varchar2 ) is
2290 select eln.*
2291 from BEN_ELIG_LGL_ENTY_PRTE_F eln
2292 where eln.elig_lgl_enty_prte_id = c_elig_lgl_enty_prte_id
2293 -- and eln.business_group_id = p_business_group_id
2294 and not exists (
2295 select /* */ null
2296 from ben_copy_entity_results cpe
2297 -- pqh_table_route trt
2298 where copy_entity_txn_id = p_copy_entity_txn_id
2299 -- and trt.table_route_id = cpe.table_route_id
2300 and ( -- c_mirror_src_entity_result_id is null or
2301 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
2302 -- and trt.where_clause = 'BEN_ELIG_LGL_ENTY_PRTE_F'
2303 and cpe.table_alias = c_table_alias
2304 and information1 = c_elig_lgl_enty_prte_id
2305 -- and information4 = eln.business_group_id
2306 and information2 = eln.effective_start_date
2307 and information3 = eln.effective_end_date
2308 );
2309 l_elig_lgl_enty_prte_id number(15);
2310 l_out_eln_result_id number(15);
2311 --
2312 -- pabodla : mapping data
2313 --
2314 cursor c_get_mapping_name4(p_id in number,p_date in date) is
2315 select hou.name dsp_name
2316 from hr_organization_units_v hou ,
2317 hr_organization_information hoi
2318 where business_group_id = p_business_group_id
2319 and hou.organization_id = p_id
2320 and p_date between date_from and nvl(date_to, p_date)
2321 and hou.organization_id = hoi.organization_id
2322 and hoi.org_information2 = 'Y'
2323 and hoi.org_information1 = 'HR_LEGAL'
2324 and hoi.org_information_context || '' ='CLASS' ;
2325
2326 cursor c_organization_start_date(c_organization_id number) is
2327 select date_from
2328 from hr_all_organization_units
2329 where organization_id = c_organization_id;
2330
2331 l_organization_start_date hr_all_organization_units.date_from%type;
2332 ---------------------------------------------------------------
2333 -- END OF BEN_ELIG_LGL_ENTY_PRTE_F ----------------------
2334 ---------------------------------------------------------------
2335 ---------------------------------------------------------------
2336 -- START OF BEN_ELIG_LOA_RSN_PRTE_F ----------------------
2337 ---------------------------------------------------------------
2338 cursor c_elr_from_parent(c_ELIGY_PRFL_ID number) is
2339 select elig_loa_rsn_prte_id
2340 from BEN_ELIG_LOA_RSN_PRTE_F
2341 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
2342 --
2343 cursor c_elr(c_elig_loa_rsn_prte_id number,c_mirror_src_entity_result_id number ,
2344 c_table_alias varchar2 ) is
2345 select elr.*
2346 from BEN_ELIG_LOA_RSN_PRTE_F elr
2347 where elr.elig_loa_rsn_prte_id = c_elig_loa_rsn_prte_id
2348 -- and elr.business_group_id = p_business_group_id
2349 and not exists (
2350 select /* */ null
2351 from ben_copy_entity_results cpe
2352 -- pqh_table_route trt
2353 where copy_entity_txn_id = p_copy_entity_txn_id
2354 -- and trt.table_route_id = cpe.table_route_id
2355 and ( -- c_mirror_src_entity_result_id is null or
2356 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
2357 -- and trt.where_clause = 'BEN_ELIG_LOA_RSN_PRTE_F'
2358 and cpe.table_alias = c_table_alias
2359 and information1 = c_elig_loa_rsn_prte_id
2360 -- and information4 = elr.business_group_id
2361 and information2 = elr.effective_start_date
2362 and information3 = elr.effective_end_date
2363 );
2364 l_elig_loa_rsn_prte_id number(15);
2365 l_out_elr_result_id number(15);
2366 --
2367 -- pabodla : mapping data
2368 --
2369 cursor c_get_mapping_name6(p_id in number,p_id1 in number,p_date in date) is
2370 select hl.meaning name
2371 from per_abs_attendance_reasons abr,
2372 hr_leg_lookups hl
2373 where abr.business_group_id = p_business_group_id
2374 and abr.absence_attendance_type_id = p_id
2375 and abr.abs_attendance_reason_id = p_id1
2376 and abr.name = hl.lookup_code
2377 and hl.lookup_type = 'ABSENCE_REASON'
2378 and hl.enabled_flag = 'Y'
2379 and p_date between
2380 nvl(hl.start_date_active, p_date)
2381 and nvl(hl.end_date_active, p_date);
2382 --
2383 cursor c_get_mapping_name5(p_id in number,p_date in date) is
2384 select abt.name
2385 from per_absence_attendance_types abt
2386 where abt.business_group_id = p_business_group_id
2387 and abt.absence_attendance_type_id = p_id
2388 and p_date between abt.date_effective
2389 and nvl(abt.date_end, p_date);
2390 --
2391
2392 cursor c_absence_type_start_date(c_absence_attendance_type_id number) is
2393 select date_effective
2394 from per_absence_attendance_types
2395 where absence_attendance_type_id = c_absence_attendance_type_id;
2396
2397 l_absence_type_start_date per_absence_attendance_types.date_effective%type;
2398 l_mapping_id1 number;
2399 l_mapping_name1 varchar2(600);
2400 --l_mapping_column_name1 pqh_attributes.attribute_name%type;
2401 --l_mapping_column_name2 pqh_attributes.attribute_name%type;
2402 l_information175 varchar2(600);
2403 ---------------------------------------------------------------
2404 -- END OF BEN_ELIG_LOA_RSN_PRTE_F ----------------------
2405 ---------------------------------------------------------------
2406 ---------------------------------------------------------------
2407 -- START OF BEN_ELIG_LOS_PRTE_F ----------------------
2408 ---------------------------------------------------------------
2409 cursor c_els_from_parent(c_ELIGY_PRFL_ID number) is
2410 select distinct elig_los_prte_id
2411 from BEN_ELIG_LOS_PRTE_F
2412 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
2413 --
2414 cursor c_els(c_elig_los_prte_id number,c_mirror_src_entity_result_id number ,
2415 c_table_alias varchar2 ) is
2416 select els.*
2417 from BEN_ELIG_LOS_PRTE_F els
2418 where els.elig_los_prte_id = c_elig_los_prte_id
2419 -- and els.business_group_id = p_business_group_id
2420 and not exists (
2421 select /* */ null
2422 from ben_copy_entity_results cpe
2423 -- pqh_table_route trt
2424 where copy_entity_txn_id = p_copy_entity_txn_id
2425 -- and trt.table_route_id = cpe.table_route_id
2426 and ( -- c_mirror_src_entity_result_id is null or
2427 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
2428 -- and trt.where_clause = 'BEN_ELIG_LOS_PRTE_F'
2429 and cpe.table_alias = c_table_alias
2430 and information1 = c_elig_los_prte_id
2431 -- and information4 = els.business_group_id
2432 and information2 = els.effective_start_date
2433 and information3 = els.effective_end_date
2434 );
2435 --
2436 l_elig_los_prte_id number(15);
2437 l_out_els_result_id number(15);
2438 --
2439 cursor c_els_drp(c_elig_los_prte_id number,c_mirror_src_entity_result_id number ,
2440 c_table_alias varchar2 ) is
2441 select distinct cpe.information243 los_fctr_id
2442 from ben_copy_entity_results cpe
2443 -- pqh_table_route trt
2444 where copy_entity_txn_id = p_copy_entity_txn_id
2445 -- and trt.table_route_id = cpe.table_route_id
2446 and mirror_src_entity_result_id = c_mirror_src_entity_result_id
2447 -- and trt.where_clause = 'BEN_ELIG_LOS_PRTE_F'
2448 and cpe.table_alias = c_table_alias
2449 and information1 = c_elig_los_prte_id
2450 -- and information4 = p_business_group_id
2451 ;
2452 ---------------------------------------------------------------
2453 -- END OF BEN_ELIG_LOS_PRTE_F ----------------------
2454 ---------------------------------------------------------------
2455 ---------------------------------------------------------------
2456 -- START OF BEN_ELIG_LVG_RSN_PRTE_F ----------------------
2457 ---------------------------------------------------------------
2458 cursor c_elv_from_parent(c_ELIGY_PRFL_ID number) is
2459 select elig_lvg_rsn_prte_id
2460 from BEN_ELIG_LVG_RSN_PRTE_F
2461 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
2462 --
2463 cursor c_elv(c_elig_lvg_rsn_prte_id number,c_mirror_src_entity_result_id number ,
2464 c_table_alias varchar2 ) is
2465 select elv.*
2466 from BEN_ELIG_LVG_RSN_PRTE_F elv
2467 where elv.elig_lvg_rsn_prte_id = c_elig_lvg_rsn_prte_id
2468 -- and elv.business_group_id = p_business_group_id
2469 and not exists (
2470 select /* */ null
2471 from ben_copy_entity_results cpe
2472 -- pqh_table_route trt
2473 where copy_entity_txn_id = p_copy_entity_txn_id
2474 -- and trt.table_route_id = cpe.table_route_id
2475 and ( -- c_mirror_src_entity_result_id is null or
2476 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
2477 -- and trt.where_clause = 'BEN_ELIG_LVG_RSN_PRTE_F'
2478 and cpe.table_alias = c_table_alias
2479 and information1 = c_elig_lvg_rsn_prte_id
2480 -- and information4 = elv.business_group_id
2481 and information2 = elv.effective_start_date
2482 and information3 = elv.effective_end_date
2483 );
2484 l_elig_lvg_rsn_prte_id number(15);
2485 l_out_elv_result_id number(15);
2486 ---------------------------------------------------------------
2487 -- END OF BEN_ELIG_LVG_RSN_PRTE_F ----------------------
2488 ---------------------------------------------------------------
2489 ---------------------------------------------------------------
2490 -- START OF BEN_ELIG_NO_OTHR_CVG_PRTE_F ----------------------
2491 ---------------------------------------------------------------
2492 cursor c_eno_from_parent(c_ELIGY_PRFL_ID number) is
2493 select elig_no_othr_cvg_prte_id
2494 from BEN_ELIG_NO_OTHR_CVG_PRTE_F
2495 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
2496 --
2497 cursor c_eno(c_elig_no_othr_cvg_prte_id number,c_mirror_src_entity_result_id number ,
2498 c_table_alias varchar2 ) is
2499 select eno.*
2500 from BEN_ELIG_NO_OTHR_CVG_PRTE_F eno
2501 where eno.elig_no_othr_cvg_prte_id = c_elig_no_othr_cvg_prte_id
2502 -- and eno.business_group_id = p_business_group_id
2503 and not exists (
2504 select /* */ null
2505 from ben_copy_entity_results cpe
2506 -- pqh_table_route trt
2507 where copy_entity_txn_id = p_copy_entity_txn_id
2508 -- and trt.table_route_id = cpe.table_route_id
2509 and ( -- c_mirror_src_entity_result_id is null or
2510 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
2511 -- and trt.where_clause = 'BEN_ELIG_NO_OTHR_CVG_PRTE_F'
2512 and cpe.table_alias = c_table_alias
2513 and information1 = c_elig_no_othr_cvg_prte_id
2514 -- and information4 = eno.business_group_id
2515 and information2 = eno.effective_start_date
2516 and information3 = eno.effective_end_date
2517 );
2518 l_elig_no_othr_cvg_prte_id number(15);
2519 l_out_eno_result_id number(15);
2520 ---------------------------------------------------------------
2521 -- END OF BEN_ELIG_NO_OTHR_CVG_PRTE_F ----------------------
2522 ---------------------------------------------------------------
2523 ---------------------------------------------------------------
2524 -- START OF BEN_ELIG_OPTD_MDCR_PRTE_F ----------------------
2525 ---------------------------------------------------------------
2526 cursor c_eom_from_parent(c_ELIGY_PRFL_ID number) is
2527 select elig_optd_mdcr_prte_id
2528 from BEN_ELIG_OPTD_MDCR_PRTE_F
2529 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
2530 --
2531 cursor c_eom(c_elig_optd_mdcr_prte_id number,c_mirror_src_entity_result_id number ,
2532 c_table_alias varchar2 ) is
2533 select eom.*
2534 from BEN_ELIG_OPTD_MDCR_PRTE_F eom
2535 where eom.elig_optd_mdcr_prte_id = c_elig_optd_mdcr_prte_id
2536 -- and eom.business_group_id = p_business_group_id
2537 and not exists (
2538 select /* */ null
2539 from ben_copy_entity_results cpe
2540 -- pqh_table_route trt
2541 where copy_entity_txn_id = p_copy_entity_txn_id
2542 -- and trt.table_route_id = cpe.table_route_id
2543 and ( -- c_mirror_src_entity_result_id is null or
2544 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
2545 -- and trt.where_clause = 'BEN_ELIG_OPTD_MDCR_PRTE_F'
2546 and cpe.table_alias = c_table_alias
2547 and information1 = c_elig_optd_mdcr_prte_id
2548 -- and information4 = eom.business_group_id
2549 and information2 = eom.effective_start_date
2550 and information3 = eom.effective_end_date
2551 );
2552 l_elig_optd_mdcr_prte_id number(15);
2553 l_out_eom_result_id number(15);
2554 ---------------------------------------------------------------
2555 -- END OF BEN_ELIG_OPTD_MDCR_PRTE_F ----------------------
2556 ---------------------------------------------------------------
2557 ---------------------------------------------------------------
2558 -- START OF BEN_ELIG_ORG_UNIT_PRTE_F ----------------------
2559 ---------------------------------------------------------------
2560 cursor c_eou_from_parent(c_ELIGY_PRFL_ID number) is
2561 select elig_org_unit_prte_id
2562 from BEN_ELIG_ORG_UNIT_PRTE_F
2563 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
2564 --
2565 cursor c_eou(c_elig_org_unit_prte_id number,c_mirror_src_entity_result_id number ,
2566 c_table_alias varchar2 ) is
2567 select eou.*
2568 from BEN_ELIG_ORG_UNIT_PRTE_F eou
2569 where eou.elig_org_unit_prte_id = c_elig_org_unit_prte_id
2570 -- and eou.business_group_id = p_business_group_id
2571 and not exists (
2572 select /* */ null
2573 from ben_copy_entity_results cpe
2574 -- pqh_table_route trt
2575 where copy_entity_txn_id = p_copy_entity_txn_id
2576 -- and trt.table_route_id = cpe.table_route_id
2577 and ( -- c_mirror_src_entity_result_id is null or
2578 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
2579 -- and trt.where_clause = 'BEN_ELIG_ORG_UNIT_PRTE_F'
2580 and cpe.table_alias = c_table_alias
2581 and information1 = c_elig_org_unit_prte_id
2582 -- and information4 = eou.business_group_id
2583 and information2 = eou.effective_start_date
2584 and information3 = eou.effective_end_date
2585 );
2586 l_elig_org_unit_prte_id number(15);
2587 l_out_eou_result_id number(15);
2588
2589 --
2590 -- pabodla : mapping data - Bug 2716749
2591 --
2592 cursor c_get_mapping_name7(p_id in number,p_date in date) is
2593 select name
2594 from hr_all_organization_units_vl
2595 where business_group_id = business_group_id
2596 and organization_id = p_id
2597 and internal_external_flag = 'INT'
2598 and p_date between nvl(date_from, p_date)
2599 and nvl(date_to, p_date)
2600 order by name;
2601
2602 --
2603 ---------------------------------------------------------------
2604 -- END OF BEN_ELIG_ORG_UNIT_PRTE_F ----------------------
2605 ---------------------------------------------------------------
2606 ---------------------------------------------------------------
2607 -- START OF BEN_ELIG_OTHR_PTIP_PRTE_F ----------------------
2608 ---------------------------------------------------------------
2609 cursor c_eoy_from_parent(c_ELIGY_PRFL_ID number) is
2610 select elig_othr_ptip_prte_id
2611 from BEN_ELIG_OTHR_PTIP_PRTE_F
2612 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
2613 --
2614 cursor c_eoy(c_elig_othr_ptip_prte_id number,c_mirror_src_entity_result_id number ,
2615 c_table_alias varchar2 ) is
2616 select eoy.*
2617 from BEN_ELIG_OTHR_PTIP_PRTE_F eoy
2618 where eoy.elig_othr_ptip_prte_id = c_elig_othr_ptip_prte_id
2619 -- and eoy.business_group_id = p_business_group_id
2620 and not exists (
2621 select /* */ null
2622 from ben_copy_entity_results cpe
2623 -- pqh_table_route trt
2624 where copy_entity_txn_id = p_copy_entity_txn_id
2625 -- and trt.table_route_id = cpe.table_route_id
2626 and ( -- c_mirror_src_entity_result_id is null or
2627 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
2628 -- and trt.where_clause = 'BEN_ELIG_OTHR_PTIP_PRTE_F'
2629 and cpe.table_alias = c_table_alias
2630 and information1 = c_elig_othr_ptip_prte_id
2631 -- and information4 = eoy.business_group_id
2632 and information2 = eoy.effective_start_date
2633 and information3 = eoy.effective_end_date
2634 );
2635 l_elig_othr_ptip_prte_id number(15);
2636 l_out_eoy_result_id number(15);
2637 ---------------------------------------------------------------
2638 -- END OF BEN_ELIG_OTHR_PTIP_PRTE_F ----------------------
2639 ---------------------------------------------------------------
2640 ---------------------------------------------------------------
2641 -- START OF BEN_ELIG_PCT_FL_TM_PRTE_F ----------------------
2642 ---------------------------------------------------------------
2643 cursor c_epf_from_parent(c_ELIGY_PRFL_ID number) is
2644 select distinct elig_pct_fl_tm_prte_id
2645 from BEN_ELIG_PCT_FL_TM_PRTE_F
2646 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
2647 --
2648 cursor c_epf(c_elig_pct_fl_tm_prte_id number,c_mirror_src_entity_result_id number ,
2649 c_table_alias varchar2 ) is
2650 select epf.*
2651 from BEN_ELIG_PCT_FL_TM_PRTE_F epf
2652 where epf.elig_pct_fl_tm_prte_id = c_elig_pct_fl_tm_prte_id
2653 -- and epf.business_group_id = p_business_group_id
2654 and not exists (
2655 select /* */ null
2656 from ben_copy_entity_results cpe
2657 -- pqh_table_route trt
2658 where copy_entity_txn_id = p_copy_entity_txn_id
2659 -- and trt.table_route_id = cpe.table_route_id
2660 and ( -- c_mirror_src_entity_result_id is null or
2661 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
2662 -- and trt.where_clause = 'BEN_ELIG_PCT_FL_TM_PRTE_F'
2663 and cpe.table_alias = c_table_alias
2664 and information1 = c_elig_pct_fl_tm_prte_id
2665 -- and information4 = epf.business_group_id
2666 and information2 = epf.effective_start_date
2667 and information3 = epf.effective_end_date
2668 );
2669 l_elig_pct_fl_tm_prte_id number(15);
2670 l_out_epf_result_id number(15);
2671 --
2672 cursor c_epf_drp(c_elig_pct_fl_tm_prte_id number,c_mirror_src_entity_result_id number ,
2673 c_table_alias varchar2 ) is
2674 select distinct cpe.information233 pct_fl_tm_fctr_id
2675 from ben_copy_entity_results cpe
2676 -- pqh_table_route trt
2677 where copy_entity_txn_id = p_copy_entity_txn_id
2678 -- and trt.table_route_id = cpe.table_route_id
2679 and mirror_src_entity_result_id = c_mirror_src_entity_result_id
2680 -- and trt.where_clause = 'BEN_ELIG_PCT_FL_TM_PRTE_F'
2681 and cpe.table_alias = c_table_alias
2682 and information1 = c_elig_pct_fl_tm_prte_id
2683 -- and information4 = p_business_group_id
2684 ;
2685 ---------------------------------------------------------------
2686 -- END OF BEN_ELIG_PCT_FL_TM_PRTE_F ----------------------
2687 ---------------------------------------------------------------
2688 ---------------------------------------------------------------
2689 -- START OF BEN_ELIG_PER_TYP_PRTE_F ----------------------
2690 ---------------------------------------------------------------
2691 cursor c_ept_from_parent(c_ELIGY_PRFL_ID number) is
2692 select elig_per_typ_prte_id
2693 from BEN_ELIG_PER_TYP_PRTE_F
2694 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
2695 --
2696 cursor c_ept(c_elig_per_typ_prte_id number,c_mirror_src_entity_result_id number ,
2697 c_table_alias varchar2 ) is
2698 select ept.*
2699 from BEN_ELIG_PER_TYP_PRTE_F ept
2700 where ept.elig_per_typ_prte_id = c_elig_per_typ_prte_id
2701 -- and ept.business_group_id = p_business_group_id
2702 and not exists (
2703 select /* */ null
2704 from ben_copy_entity_results cpe
2705 -- pqh_table_route trt
2706 where copy_entity_txn_id = p_copy_entity_txn_id
2707 -- and trt.table_route_id = cpe.table_route_id
2708 and ( -- c_mirror_src_entity_result_id is null or
2709 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
2710 -- and trt.where_clause = 'BEN_ELIG_PER_TYP_PRTE_F'
2711 and cpe.table_alias = c_table_alias
2712 and information1 = c_elig_per_typ_prte_id
2713 -- and information4 = ept.business_group_id
2714 and information2 = ept.effective_start_date
2715 and information3 = ept.effective_end_date
2716 );
2717 l_elig_per_typ_prte_id number(15);
2718 l_out_ept_result_id number(15);
2719 --
2720 -- pabodla : mapping data
2721 --
2722 cursor c_get_person_type_name(p_person_typ_id in number) is
2723 select ptl.user_person_type
2724 from per_person_types ppt,
2725 hr_leg_lookups hrlkup,
2726 per_person_types_tl ptl
2727 where active_flag = 'Y'
2728 -- and business_group_id = p_business_group_id
2729 and hrlkup.lookup_type = 'PERSON_TYPE'
2730 and hrlkup.lookup_code = ppt.system_person_type
2731 and ppt.active_flag = 'Y'
2732 and ppt.person_type_id = p_person_typ_id
2733 and ppt.person_type_id = ptl.person_type_id
2734 and ptl.language = userenv('LANG');
2735 --
2736 l_mapping_person_type_id number;
2737 l_mapping_person_type_name varchar2(600);
2738 l_information172 varchar2(300);
2739 ---------------------------------------------------------------
2740 -- END OF BEN_ELIG_PER_TYP_PRTE_F ----------------------
2741 ---------------------------------------------------------------
2742 ---------------------------------------------------------------
2743 -- START OF BEN_ELIG_PPL_GRP_PRTE_F ----------------------
2744 ---------------------------------------------------------------
2745 cursor c_epg_from_parent(c_ELIGY_PRFL_ID number) is
2746 select elig_ppl_grp_prte_id
2747 from BEN_ELIG_PPL_GRP_PRTE_F
2748 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
2749 --
2750 cursor c_epg(c_elig_ppl_grp_prte_id number,c_mirror_src_entity_result_id number ,
2751 c_table_alias varchar2 ) is
2752 select epg.*
2753 from BEN_ELIG_PPL_GRP_PRTE_F epg
2754 where epg.elig_ppl_grp_prte_id = c_elig_ppl_grp_prte_id
2755 -- and epg.business_group_id = p_business_group_id
2756 and not exists (
2757 select /* */ null
2758 from ben_copy_entity_results cpe
2759 -- pqh_table_route trt
2760 where copy_entity_txn_id = p_copy_entity_txn_id
2761 -- and trt.table_route_id = cpe.table_route_id
2762 and ( -- c_mirror_src_entity_result_id is null or
2763 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
2764 -- and trt.where_clause = 'BEN_ELIG_PPL_GRP_PRTE_F'
2765 and cpe.table_alias = c_table_alias
2766 and information1 = c_elig_ppl_grp_prte_id
2767 -- and information4 = epg.business_group_id
2768 and information2 = epg.effective_start_date
2769 and information3 = epg.effective_end_date
2770 );
2771 l_elig_ppl_grp_prte_id number(15);
2772 l_out_epg_result_id number(15);
2773 ---------------------------------------------------------------
2774 -- END OF BEN_ELIG_PPL_GRP_PRTE_F ----------------------
2775 ---------------------------------------------------------------
2776 ---------------------------------------------------------------
2777 -- START OF BEN_ELIG_PRTT_ANTHR_PL_PRTE_F ----------------------
2778 ---------------------------------------------------------------
2779 cursor c_epp_from_parent(c_ELIGY_PRFL_ID number) is
2780 select elig_prtt_anthr_pl_prte_id
2781 from BEN_ELIG_PRTT_ANTHR_PL_PRTE_F
2782 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
2783 --
2784 cursor c_epp(c_elig_prtt_anthr_pl_prte_id number,c_mirror_src_entity_result_id number ,
2785 c_table_alias varchar2 ) is
2786 select epp.*
2787 from BEN_ELIG_PRTT_ANTHR_PL_PRTE_F epp
2788 where epp.elig_prtt_anthr_pl_prte_id = c_elig_prtt_anthr_pl_prte_id
2789 -- and epp.business_group_id = p_business_group_id
2790 and not exists (
2791 select /* */ null
2792 from ben_copy_entity_results cpe
2793 -- pqh_table_route trt
2794 where copy_entity_txn_id = p_copy_entity_txn_id
2795 -- and trt.table_route_id = cpe.table_route_id
2796 and ( -- c_mirror_src_entity_result_id is null or
2797 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
2798 -- and trt.where_clause = 'BEN_ELIG_PRTT_ANTHR_PL_PRTE_F'
2799 and cpe.table_alias = c_table_alias
2800 and information1 = c_elig_prtt_anthr_pl_prte_id
2801 -- and information4 = epp.business_group_id
2802 and information2 = epp.effective_start_date
2803 and information3 = epp.effective_end_date
2804 );
2805 l_elig_prtt_anthr_pl_prte_id number(15);
2806 l_out_epp_result_id number(15);
2807 ---------------------------------------------------------------
2808 -- END OF BEN_ELIG_PRTT_ANTHR_PL_PRTE_F ----------------------
2809 ---------------------------------------------------------------
2810 ---------------------------------------------------------------
2811 -- START OF BEN_ELIG_PSTL_CD_R_RNG_PRTE_F ----------------------
2812 ---------------------------------------------------------------
2813 cursor c_epz_from_parent(c_ELIGY_PRFL_ID number) is
2814 select distinct elig_pstl_cd_r_rng_prte_id
2815 from BEN_ELIG_PSTL_CD_R_RNG_PRTE_F
2816 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
2817 --
2818 cursor c_epz(c_elig_pstl_cd_r_rng_prte_id number,c_mirror_src_entity_result_id number ,
2819 c_table_alias varchar2 ) is
2820 select epz.*
2821 from BEN_ELIG_PSTL_CD_R_RNG_PRTE_F epz
2822 where epz.elig_pstl_cd_r_rng_prte_id = c_elig_pstl_cd_r_rng_prte_id
2823 -- and epz.business_group_id = p_business_group_id
2824 and not exists (
2825 select /* */ null
2826 from ben_copy_entity_results cpe
2827 -- pqh_table_route trt
2828 where copy_entity_txn_id = p_copy_entity_txn_id
2829 -- and trt.table_route_id = cpe.table_route_id
2830 and ( -- c_mirror_src_entity_result_id is null or
2831 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
2832 -- and trt.where_clause = 'BEN_ELIG_PSTL_CD_R_RNG_PRTE_F'
2833 and cpe.table_alias = c_table_alias
2834 and information1 = c_elig_pstl_cd_r_rng_prte_id
2835 -- and information4 = epz.business_group_id
2836 and information2 = epz.effective_start_date
2837 and information3 = epz.effective_end_date
2838 );
2839 l_elig_pstl_cd_r_rng_prte_id number(15);
2840 l_out_epz_result_id number(15);
2841 --
2842 cursor c_epz_pstl(c_elig_pstl_cd_r_rng_prte_id number,c_mirror_src_entity_result_id number ,
2843 c_table_alias varchar2 ) is
2844 select distinct cpe.information245 pstl_zip_rng_id
2845 from ben_copy_entity_results cpe
2846 -- pqh_table_route trt
2847 where copy_entity_txn_id = p_copy_entity_txn_id
2848 -- and trt.table_route_id = cpe.table_route_id
2849 and mirror_src_entity_result_id = c_mirror_src_entity_result_id
2850 -- and trt.where_clause = 'BEN_ELIG_PSTL_CD_R_RNG_PRTE_F'
2851 and cpe.table_alias = c_table_alias
2852 and information1 = c_elig_pstl_cd_r_rng_prte_id
2853 -- and information4 = p_business_group_id
2854 ;
2855 ---------------------------------------------------------------
2856 -- END OF BEN_ELIG_PSTL_CD_R_RNG_PRTE_F ----------------------
2857 ---------------------------------------------------------------
2858 ---------------------------------------------------------------
2859 -- START OF BEN_ELIG_PYRL_PRTE_F ----------------------
2860 ---------------------------------------------------------------
2861 cursor c_epy_from_parent(c_ELIGY_PRFL_ID number) is
2862 select elig_pyrl_prte_id
2863 from BEN_ELIG_PYRL_PRTE_F
2864 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
2865 --
2866 cursor c_epy(c_elig_pyrl_prte_id number,c_mirror_src_entity_result_id number ,
2867 c_table_alias varchar2 ) is
2868 select epy.*
2869 from BEN_ELIG_PYRL_PRTE_F epy
2870 where epy.elig_pyrl_prte_id = c_elig_pyrl_prte_id
2871 -- and epy.business_group_id = p_business_group_id
2872 and not exists (
2873 select /* */ null
2874 from ben_copy_entity_results cpe
2875 -- pqh_table_route trt
2876 where copy_entity_txn_id = p_copy_entity_txn_id
2877 -- and trt.table_route_id = cpe.table_route_id
2878 and ( -- c_mirror_src_entity_result_id is null or
2879 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
2880 -- and trt.where_clause = 'BEN_ELIG_PYRL_PRTE_F'
2881 and cpe.table_alias = c_table_alias
2882 and information1 = c_elig_pyrl_prte_id
2883 -- and information4 = epy.business_group_id
2884 and information2 = epy.effective_start_date
2885 and information3 = epy.effective_end_date
2886 );
2887 l_elig_pyrl_prte_id number(15);
2888 l_out_epy_result_id number(15);
2889 --
2890 cursor c_get_mapping_name9(p_id in number,p_date date) is
2891 select prl.payroll_name dsp_payroll_name
2892 from pay_all_payrolls_f prl
2893 where prl.business_group_id = p_business_group_id
2894 and prl.payroll_id = p_id
2895 and p_date between prl.effective_start_date and prl.effective_end_date ;
2896 --
2897
2898 cursor c_payroll_start_date(c_payroll_id number) is
2899 select min(effective_start_date) effective_start_date
2900 from pay_all_payrolls_f
2901 where payroll_id = c_payroll_id;
2902
2903 l_payroll_start_date pay_all_payrolls_f.effective_start_date%type;
2904 ---------------------------------------------------------------
2905 -- END OF BEN_ELIG_PYRL_PRTE_F ----------------------
2906 ---------------------------------------------------------------
2907 ---------------------------------------------------------------
2908 -- START OF BEN_ELIG_PY_BSS_PRTE_F ----------------------
2909 ---------------------------------------------------------------
2910 cursor c_epb_from_parent(c_ELIGY_PRFL_ID number) is
2911 select elig_py_bss_prte_id
2912 from BEN_ELIG_PY_BSS_PRTE_F
2913 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
2914 --
2915 cursor c_epb(c_elig_py_bss_prte_id number,c_mirror_src_entity_result_id number ,
2916 c_table_alias varchar2 ) is
2917 select epb.*
2918 from BEN_ELIG_PY_BSS_PRTE_F epb
2919 where epb.elig_py_bss_prte_id = c_elig_py_bss_prte_id
2920 -- and epb.business_group_id = p_business_group_id
2921 and not exists (
2922 select /* */ null
2923 from ben_copy_entity_results cpe
2924 -- pqh_table_route trt
2925 where copy_entity_txn_id = p_copy_entity_txn_id
2926 -- and trt.table_route_id = cpe.table_route_id
2927 and ( -- c_mirror_src_entity_result_id is null or
2928 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
2929 -- and trt.where_clause = 'BEN_ELIG_PY_BSS_PRTE_F'
2930 and cpe.table_alias = c_table_alias
2931 and information1 = c_elig_py_bss_prte_id
2932 -- and information4 = epb.business_group_id
2933 and information2 = epb.effective_start_date
2934 and information3 = epb.effective_end_date
2935 );
2936 l_elig_py_bss_prte_id number(15);
2937 l_out_epb_result_id number(15);
2938 --
2939 -- pabodla : mapping data
2940 --
2941 cursor c_get_mapping_name10(p_id in number) is
2942 select name from per_pay_bases
2943 where business_group_id = p_business_group_id
2944 and pay_basis_id = p_id;
2945 ---------------------------------------------------------------
2946 -- END OF BEN_ELIG_PY_BSS_PRTE_F ----------------------
2947 ---------------------------------------------------------------
2948 ---------------------------------------------------------------
2949 -- START OF BEN_ELIG_SCHEDD_HRS_PRTE_F ----------------------
2950 ---------------------------------------------------------------
2951 cursor c_esh_from_parent(c_ELIGY_PRFL_ID number) is
2952 select elig_schedd_hrs_prte_id
2953 from BEN_ELIG_SCHEDD_HRS_PRTE_F
2954 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
2955 --
2956 cursor c_esh(c_elig_schedd_hrs_prte_id number,c_mirror_src_entity_result_id number ,
2957 c_table_alias varchar2 ) is
2958 select esh.*
2959 from BEN_ELIG_SCHEDD_HRS_PRTE_F esh
2960 where esh.elig_schedd_hrs_prte_id = c_elig_schedd_hrs_prte_id
2961 -- and esh.business_group_id = p_business_group_id
2962 and not exists (
2963 select /* */ null
2964 from ben_copy_entity_results cpe
2965 -- pqh_table_route trt
2966 where copy_entity_txn_id = p_copy_entity_txn_id
2967 -- and trt.table_route_id = cpe.table_route_id
2968 and ( -- c_mirror_src_entity_result_id is null or
2969 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
2970 -- and trt.where_clause = 'BEN_ELIG_SCHEDD_HRS_PRTE_F'
2971 and cpe.table_alias = c_table_alias
2972 and information1 = c_elig_schedd_hrs_prte_id
2973 -- and information4 = esh.business_group_id
2974 and information2 = esh.effective_start_date
2975 and information3 = esh.effective_end_date
2976 );
2977 l_elig_schedd_hrs_prte_id number(15);
2978 l_out_esh_result_id number(15);
2979 ---------------------------------------------------------------
2980 -- END OF BEN_ELIG_SCHEDD_HRS_PRTE_F ----------------------
2981 ---------------------------------------------------------------
2982 ---------------------------------------------------------------
2983 -- START OF BEN_ELIG_SVC_AREA_PRTE_F ----------------------
2984 ---------------------------------------------------------------
2985 cursor c_esa_from_parent(c_ELIGY_PRFL_ID number) is
2986 select distinct elig_svc_area_prte_id
2987 from BEN_ELIG_SVC_AREA_PRTE_F
2988 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
2989 --
2990 cursor c_esa(c_elig_svc_area_prte_id number,c_mirror_src_entity_result_id number ,
2991 c_table_alias varchar2 ) is
2992 select esa.*
2993 from BEN_ELIG_SVC_AREA_PRTE_F esa
2994 where esa.elig_svc_area_prte_id = c_elig_svc_area_prte_id
2995 -- and esa.business_group_id = p_business_group_id
2996 and not exists (
2997 select /* */ null
2998 from ben_copy_entity_results cpe
2999 -- pqh_table_route trt
3000 where copy_entity_txn_id = p_copy_entity_txn_id
3001 -- and trt.table_route_id = cpe.table_route_id
3002 and ( -- c_mirror_src_entity_result_id is null or
3003 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
3004 -- and trt.where_clause = 'BEN_ELIG_SVC_AREA_PRTE_F'
3005 and cpe.table_alias = c_table_alias
3006 and information1 = c_elig_svc_area_prte_id
3007 -- and information4 = esa.business_group_id
3008 and information2 = esa.effective_start_date
3009 and information3 = esa.effective_end_date
3010 );
3011 l_elig_svc_area_prte_id number(15);
3012 l_out_esa_result_id number(15);
3013 --
3014 cursor c_esa_svc(c_elig_svc_area_prte_id number,c_mirror_src_entity_result_id number ,
3015 c_table_alias varchar2 ) is
3016 select distinct cpe.information241 svc_area_id
3017 from ben_copy_entity_results cpe
3018 -- pqh_table_route trt
3019 where copy_entity_txn_id = p_copy_entity_txn_id
3020 -- and trt.table_route_id = cpe.table_route_id
3021 and mirror_src_entity_result_id = c_mirror_src_entity_result_id
3022 -- and trt.where_clause = 'BEN_ELIG_SVC_AREA_PRTE_F'
3023 and cpe.table_alias = c_table_alias
3024 and information1 = c_elig_svc_area_prte_id
3025 -- and information4 = p_business_group_id
3026 ;
3027 ---------------------------------------------------------------
3028 -- END OF BEN_ELIG_SVC_AREA_PRTE_F ----------------------
3029 ---------------------------------------------------------------
3030 ---------------------------------------------------------------
3031 -- START OF BEN_ELIG_WK_LOC_PRTE_F ----------------------
3032 ---------------------------------------------------------------
3033 cursor c_ewl_from_parent(c_ELIGY_PRFL_ID number) is
3034 select elig_wk_loc_prte_id
3035 from BEN_ELIG_WK_LOC_PRTE_F
3036 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
3037 --
3038 cursor c_ewl(c_elig_wk_loc_prte_id number,c_mirror_src_entity_result_id number ,
3039 c_table_alias varchar2 ) is
3040 select ewl.*
3041 from BEN_ELIG_WK_LOC_PRTE_F ewl
3042 where ewl.elig_wk_loc_prte_id = c_elig_wk_loc_prte_id
3043 -- and ewl.business_group_id = p_business_group_id
3044 and not exists (
3045 select /* */ null
3046 from ben_copy_entity_results cpe
3047 -- pqh_table_route trt
3048 where copy_entity_txn_id = p_copy_entity_txn_id
3049 -- and trt.table_route_id = cpe.table_route_id
3050 and ( -- c_mirror_src_entity_result_id is null or
3051 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
3052 -- and trt.where_clause = 'BEN_ELIG_WK_LOC_PRTE_F'
3053 and cpe.table_alias = c_table_alias
3054 and information1 = c_elig_wk_loc_prte_id
3055 -- and information4 = ewl.business_group_id
3056 and information2 = ewl.effective_start_date
3057 and information3 = ewl.effective_end_date
3058 );
3059 l_elig_wk_loc_prte_id number(15);
3060 l_out_ewl_result_id number(15);
3061 --
3062 -- pabodla : mapping data
3063 --
3064 cursor c_get_mapping_name15(p_id in number,p_date date) is
3065 select loc.location_code dsp_location_code
3066 from hr_locations loc
3067 where loc.location_id = p_id
3068 and p_date <= nvl( loc.inactive_date, p_date);
3069
3070 cursor c_location_inactive_date(c_location_id number) is
3071 select inactive_date
3072 from hr_locations
3073 where location_id = c_location_id;
3074
3075 l_location_inactive_date hr_locations.inactive_date%type;
3076 ---------------------------------------------------------------
3077 -- END OF BEN_ELIG_WK_LOC_PRTE_F ----------------------
3078 ---------------------------------------------------------------
3079 ---------------------------------------------------------------
3080 -- START OF BEN_ELIG_SP_CLNG_PRG_PRTE_F ----------------------
3081 ---------------------------------------------------------------
3082 cursor c_esp_from_parent(c_ELIGY_PRFL_ID number) is
3083 select elig_sp_clng_prg_prte_id
3084 from BEN_ELIG_SP_CLNG_PRG_PRTE_F
3085 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
3086 --
3087 cursor c_esp(c_elig_sp_clng_prg_prte_id number,c_mirror_src_entity_result_id number ,
3088 c_table_alias varchar2 ) is
3089 select esp.*
3090 from BEN_ELIG_SP_CLNG_PRG_PRTE_F esp
3091 where esp.elig_sp_clng_prg_prte_id = c_elig_sp_clng_prg_prte_id
3092 -- and esp.business_group_id = p_business_group_id
3093 and not exists (
3094 select /* */ null
3095 from ben_copy_entity_results cpe
3096 -- pqh_table_route trt
3097 where copy_entity_txn_id = p_copy_entity_txn_id
3098 -- and trt.table_route_id = cpe.table_route_id
3099 and ( -- c_mirror_src_entity_result_id is null or
3100 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
3101 -- and trt.where_clause = 'BEN_ELIG_SP_CLNG_PRG_PRTE_F'
3102 and cpe.table_alias = c_table_alias
3103 and information1 = c_elig_sp_clng_prg_prte_id
3104 -- and information4 = esp.business_group_id
3105 and information2 = esp.effective_start_date
3106 and information3 = esp.effective_end_date
3107 );
3108 l_elig_sp_clng_prg_prte_id number(15);
3109 l_out_esp_result_id number(15);
3110 --
3111 -- pabodla : mapping data
3112 -- 9999 resolve the sql
3113 cursor c_get_mapping_name12(p_id in number,p_date in date) is
3114 select a.name grade
3115 , d.step_id
3116 from per_grades_vl a,
3117 per_parent_spines b,
3118 per_spinal_points c,
3119 per_spinal_point_steps_f d,
3120 per_grade_spines e
3121 where d.spinal_point_id = c.spinal_point_id
3122 and d.grade_spine_id = e.grade_spine_id
3123 and e.grade_id = a.grade_id
3124 and e.parent_spine_id = b.parent_spine_id
3125 and p_date between
3126 nvl(d.effective_start_date,p_date)
3127 and nvl(d.effective_end_date,p_date);
3128 --
3129
3130 cursor c_step_start_date(c_step_id number) is
3131 select min(effective_start_date) effective_start_date
3132 from per_spinal_point_steps_f
3133 where step_id = c_step_id;
3134
3135 l_step_start_date per_spinal_point_steps_f.effective_start_date%type;
3136 ---------------------------------------------------------------
3137 -- END OF BEN_ELIG_SP_CLNG_PRG_PRTE_F ----------------------
3138 ---------------------------------------------------------------
3139 ---------------------------------------------------------------
3140 -- START OF BEN_ELIG_PSTN_PRTE_F ----------------------
3141 ---------------------------------------------------------------
3142 cursor c_eps_from_parent(c_ELIGY_PRFL_ID number) is
3143 select elig_pstn_prte_id
3144 from BEN_ELIG_PSTN_PRTE_F
3145 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
3146 --
3147 cursor c_eps(c_elig_pstn_prte_id number,c_mirror_src_entity_result_id number ,
3148 c_table_alias varchar2 ) is
3149 select eps.*
3150 from BEN_ELIG_PSTN_PRTE_F eps
3151 where eps.elig_pstn_prte_id = c_elig_pstn_prte_id
3152 -- and eps.business_group_id = p_business_group_id
3153 and not exists (
3154 select /* */ null
3155 from ben_copy_entity_results cpe
3156 -- pqh_table_route trt
3157 where copy_entity_txn_id = p_copy_entity_txn_id
3158 -- and trt.table_route_id = cpe.table_route_id
3159 and ( -- c_mirror_src_entity_result_id is null or
3160 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
3161 -- and trt.where_clause = 'BEN_ELIG_PSTN_PRTE_F'
3162 and cpe.table_alias = c_table_alias
3163 and information1 = c_elig_pstn_prte_id
3164 -- and information4 = eps.business_group_id
3165 and information2 = eps.effective_start_date
3166 and information3 = eps.effective_end_date
3167 );
3168 l_elig_pstn_prte_id number(15);
3169 l_out_eps_result_id number(15);
3170 --
3171 -- pabodla : mapping data
3172 --
3173 cursor c_get_mapping_name8(p_id in number) is
3174 select name
3175 from per_positions
3176 where business_group_id = p_business_group_id
3177 and position_id = p_id;
3178
3179 cursor c_position_start_date(c_position_id number) is
3180 select date_effective
3181 from per_positions
3182 where position_id = c_position_id;
3183
3184 l_position_start_date per_positions.date_effective%type;
3185 ---------------------------------------------------------------
3186 -- END OF BEN_ELIG_PSTN_PRTE_F ----------------------
3187 ---------------------------------------------------------------
3188 ---------------------------------------------------------------
3189 -- START OF BEN_ELIG_PRBTN_PERD_PRTE_F ----------------------
3190 ---------------------------------------------------------------
3191 cursor c_epn_from_parent(c_ELIGY_PRFL_ID number) is
3192 select elig_prbtn_perd_prte_id
3193 from BEN_ELIG_PRBTN_PERD_PRTE_F
3194 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
3195 --
3196 cursor c_epn(c_elig_prbtn_perd_prte_id number,c_mirror_src_entity_result_id number ,
3197 c_table_alias varchar2 ) is
3198 select epn.*
3199 from BEN_ELIG_PRBTN_PERD_PRTE_F epn
3200 where epn.elig_prbtn_perd_prte_id = c_elig_prbtn_perd_prte_id
3201 -- and epn.business_group_id = p_business_group_id
3202 and not exists (
3203 select /* */ null
3204 from ben_copy_entity_results cpe
3205 -- pqh_table_route trt
3206 where copy_entity_txn_id = p_copy_entity_txn_id
3207 -- and trt.table_route_id = cpe.table_route_id
3208 and ( -- c_mirror_src_entity_result_id is null or
3209 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
3210 -- and trt.where_clause = 'BEN_ELIG_PRBTN_PERD_PRTE_F'
3211 and cpe.table_alias = c_table_alias
3212 and information1 = c_elig_prbtn_perd_prte_id
3213 -- and information4 = epn.business_group_id
3214 and information2 = epn.effective_start_date
3215 and information3 = epn.effective_end_date
3216 );
3217 l_elig_prbtn_perd_prte_id number(15);
3218 l_out_epn_result_id number(15);
3219 ---------------------------------------------------------------
3220 -- END OF BEN_ELIG_PRBTN_PERD_PRTE_F ----------------------
3221 ---------------------------------------------------------------
3222 ---------------------------------------------------------------
3223 -- START OF BEN_ELIG_MRTL_STS_PRTE_F ----------------------
3224 ---------------------------------------------------------------
3225 cursor c_emp_from_parent(c_ELIGY_PRFL_ID number) is
3226 select elig_mrtl_sts_prte_id
3227 from BEN_ELIG_MRTL_STS_PRTE_F
3228 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
3229 --
3230 cursor c_emp(c_elig_mrtl_sts_prte_id number,c_mirror_src_entity_result_id number ,
3231 c_table_alias varchar2 ) is
3232 select emp.*
3233 from BEN_ELIG_MRTL_STS_PRTE_F emp
3234 where emp.elig_mrtl_sts_prte_id = c_elig_mrtl_sts_prte_id
3235 -- and emp.business_group_id = p_business_group_id
3236 and not exists (
3237 select /* */ null
3238 from ben_copy_entity_results cpe
3239 -- pqh_table_route trt
3240 where copy_entity_txn_id = p_copy_entity_txn_id
3241 -- and trt.table_route_id = cpe.table_route_id
3242 and ( -- c_mirror_src_entity_result_id is null or
3243 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
3244 -- and trt.where_clause = 'BEN_ELIG_MRTL_STS_PRTE_F'
3245 and cpe.table_alias = c_table_alias
3246 and information1 = c_elig_mrtl_sts_prte_id
3247 -- and information4 = emp.business_group_id
3248 and information2 = emp.effective_start_date
3249 and information3 = emp.effective_end_date
3250 );
3251 l_elig_mrtl_sts_prte_id number(15);
3252 l_out_emp_result_id number(15);
3253 ---------------------------------------------------------------
3254 -- END OF BEN_ELIG_MRTL_STS_PRTE_F ----------------------
3255 ---------------------------------------------------------------
3256 ---------------------------------------------------------------
3257 -- START OF BEN_ELIG_GNDR_PRTE_F ----------------------
3258 ---------------------------------------------------------------
3259 cursor c_egn_from_parent(c_ELIGY_PRFL_ID number) is
3260 select elig_gndr_prte_id
3261 from BEN_ELIG_GNDR_PRTE_F
3262 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
3263 --
3264 cursor c_egn(c_elig_gndr_prte_id number,c_mirror_src_entity_result_id number ,
3265 c_table_alias varchar2 ) is
3266 select egn.*
3267 from BEN_ELIG_GNDR_PRTE_F egn
3268 where egn.elig_gndr_prte_id = c_elig_gndr_prte_id
3269 -- and egn.business_group_id = p_business_group_id
3270 and not exists (
3271 select /* */ null
3272 from ben_copy_entity_results cpe
3273 -- pqh_table_route trt
3274 where copy_entity_txn_id = p_copy_entity_txn_id
3275 -- and trt.table_route_id = cpe.table_route_id
3276 and ( -- c_mirror_src_entity_result_id is null or
3277 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
3278 -- and trt.where_clause = 'BEN_ELIG_GNDR_PRTE_F'
3279 and cpe.table_alias = c_table_alias
3280 and information1 = c_elig_gndr_prte_id
3281 -- and information4 = egn.business_group_id
3282 and information2 = egn.effective_start_date
3283 and information3 = egn.effective_end_date
3284 );
3285 l_elig_gndr_prte_id number(15);
3286 l_out_egn_result_id number(15);
3287 ---------------------------------------------------------------
3288 -- END OF BEN_ELIG_GNDR_PRTE_F ----------------------
3289 ---------------------------------------------------------------
3290 ---------------------------------------------------------------
3291 -- START OF BEN_ELIG_DSBLTY_RSN_PRTE_F ----------------------
3292 ---------------------------------------------------------------
3293 cursor c_edr_from_parent(c_ELIGY_PRFL_ID number) is
3294 select elig_dsblty_rsn_prte_id
3295 from BEN_ELIG_DSBLTY_RSN_PRTE_F
3296 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
3297 --
3298 cursor c_edr(c_elig_dsblty_rsn_prte_id number,c_mirror_src_entity_result_id number ,
3299 c_table_alias varchar2 ) is
3300 select edr.*
3301 from BEN_ELIG_DSBLTY_RSN_PRTE_F edr
3302 where edr.elig_dsblty_rsn_prte_id = c_elig_dsblty_rsn_prte_id
3303 -- and edr.business_group_id = p_business_group_id
3304 and not exists (
3305 select /* */ null
3306 from ben_copy_entity_results cpe
3307 -- pqh_table_route trt
3308 where copy_entity_txn_id = p_copy_entity_txn_id
3309 -- and trt.table_route_id = cpe.table_route_id
3310 and ( -- c_mirror_src_entity_result_id is null or
3311 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
3312 -- and trt.where_clause = 'BEN_ELIG_DSBLTY_RSN_PRTE_F'
3313 and cpe.table_alias = c_table_alias
3314 and information1 = c_elig_dsblty_rsn_prte_id
3315 -- and information4 = edr.business_group_id
3316 and information2 = edr.effective_start_date
3317 and information3 = edr.effective_end_date
3318 );
3319 l_elig_dsblty_rsn_prte_id number(15);
3320 l_out_edr_result_id number(15);
3321 ---------------------------------------------------------------
3322 -- END OF BEN_ELIG_DSBLTY_RSN_PRTE_F ----------------------
3323 ---------------------------------------------------------------
3324 ---------------------------------------------------------------
3325 -- START OF BEN_ELIG_DSBLTY_DGR_PRTE_F ----------------------
3326 ---------------------------------------------------------------
3327 cursor c_edd_from_parent(c_ELIGY_PRFL_ID number) is
3328 select elig_dsblty_dgr_prte_id
3329 from BEN_ELIG_DSBLTY_DGR_PRTE_F
3330 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
3331 --
3332 cursor c_edd(c_elig_dsblty_dgr_prte_id number,c_mirror_src_entity_result_id number ,
3333 c_table_alias varchar2 ) is
3334 select edd.*
3335 from BEN_ELIG_DSBLTY_DGR_PRTE_F edd
3336 where edd.elig_dsblty_dgr_prte_id = c_elig_dsblty_dgr_prte_id
3337 -- and edd.business_group_id = p_business_group_id
3338 and not exists (
3339 select /* */ null
3340 from ben_copy_entity_results cpe
3341 -- pqh_table_route trt
3342 where copy_entity_txn_id = p_copy_entity_txn_id
3343 -- and trt.table_route_id = cpe.table_route_id
3344 and ( -- c_mirror_src_entity_result_id is null or
3345 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
3346 -- and trt.where_clause = 'BEN_ELIG_DSBLTY_DGR_PRTE_F'
3347 and cpe.table_alias = c_table_alias
3348 and information1 = c_elig_dsblty_dgr_prte_id
3349 -- and information4 = edd.business_group_id
3350 and information2 = edd.effective_start_date
3351 and information3 = edd.effective_end_date
3352 );
3353 l_elig_dsblty_dgr_prte_id number(15);
3354 l_out_edd_result_id number(15);
3355 ---------------------------------------------------------------
3356 -- END OF BEN_ELIG_DSBLTY_DGR_PRTE_F ----------------------
3357 ---------------------------------------------------------------
3358 ---------------------------------------------------------------
3359 -- START OF BEN_ELIG_QUAL_TITL_PRTE_F ----------------------
3360 ---------------------------------------------------------------
3361 cursor c_eqt_from_parent(c_ELIGY_PRFL_ID number) is
3362 select elig_qual_titl_prte_id
3363 from BEN_ELIG_QUAL_TITL_PRTE_F
3364 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
3365 --
3366 cursor c_eqt(c_elig_qual_titl_prte_id number,c_mirror_src_entity_result_id number ,
3367 c_table_alias varchar2 ) is
3368 select eqt.*
3369 from BEN_ELIG_QUAL_TITL_PRTE_F eqt
3370 where eqt.elig_qual_titl_prte_id = c_elig_qual_titl_prte_id
3371 -- and eqt.business_group_id = p_business_group_id
3372 and not exists (
3373 select /* */ null
3374 from ben_copy_entity_results cpe
3375 -- pqh_table_route trt
3376 where copy_entity_txn_id = p_copy_entity_txn_id
3377 -- and trt.table_route_id = cpe.table_route_id
3378 and ( -- c_mirror_src_entity_result_id is null or
3379 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
3380 -- and trt.where_clause = 'BEN_ELIG_QUAL_TITL_PRTE_F'
3381 and cpe.table_alias = c_table_alias
3382 and information1 = c_elig_qual_titl_prte_id
3383 -- and information4 = eqt.business_group_id
3384 and information2 = eqt.effective_start_date
3385 and information3 = eqt.effective_end_date
3386 );
3387 l_elig_qual_titl_prte_id number(15);
3388 l_out_eqt_result_id number(15);
3389 --
3390 -- pabodla : mapping data
3391 --
3392 cursor c_get_mapping_name11(p_id in number) is
3393 select name
3394 from per_qualification_types_vl
3395 where qualification_type_id = p_id;
3396
3397 ---------------------------------------------------------------
3398 -- END OF BEN_ELIG_QUAL_TITL_PRTE_F ----------------------
3399 ---------------------------------------------------------------
3400 ---------------------------------------------------------------
3401 -- START OF BEN_ELIG_SUPPL_ROLE_PRTE_F ----------------------
3402 ---------------------------------------------------------------
3403 cursor c_est_from_parent(c_ELIGY_PRFL_ID number) is
3404 select elig_suppl_role_prte_id
3405 from BEN_ELIG_SUPPL_ROLE_PRTE_F
3406 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
3407 --
3408 cursor c_est(c_elig_suppl_role_prte_id number,c_mirror_src_entity_result_id number ,
3409 c_table_alias varchar2 ) is
3410 select est.*
3411 from BEN_ELIG_SUPPL_ROLE_PRTE_F est
3412 where est.elig_suppl_role_prte_id = c_elig_suppl_role_prte_id
3413 -- and est.business_group_id = p_business_group_id
3414 and not exists (
3415 select /* */ null
3416 from ben_copy_entity_results cpe
3417 -- pqh_table_route trt
3418 where copy_entity_txn_id = p_copy_entity_txn_id
3419 -- and trt.table_route_id = cpe.table_route_id
3420 and ( -- c_mirror_src_entity_result_id is null or
3421 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
3422 -- and trt.where_clause = 'BEN_ELIG_SUPPL_ROLE_PRTE_F'
3423 and cpe.table_alias = c_table_alias
3424 and information1 = c_elig_suppl_role_prte_id
3425 -- and information4 = est.business_group_id
3426 and information2 = est.effective_start_date
3427 and information3 = est.effective_end_date
3428 );
3429 l_elig_suppl_role_prte_id number(15);
3430 l_out_est_result_id number(15);
3431 --
3432 --
3433 -- pabodla : mapping data
3434 --
3435 cursor c_get_mapping_name13(p_id in number) is
3436 select displayed_name
3437 from per_job_groups
3438 where business_group_id = p_business_group_id
3439 and job_group_id = p_id;
3440
3441 --
3442 cursor c_get_mapping_name14(p_id in number, p_id1 in number) is
3443 select name
3444 from per_jobs_vl
3445 where business_group_id = p_business_group_id
3446 and job_id = p_id
3447 and job_group_id = p_id1;
3448
3449 ---------------------------------------------------------------
3450 -- END OF BEN_ELIG_SUPPL_ROLE_PRTE_F ----------------------
3451 ---------------------------------------------------------------
3452 ---------------------------------------------------------------
3453 -- START OF BEN_ELIG_DSBLTY_CTG_PRTE_F ----------------------
3454 ---------------------------------------------------------------
3455 cursor c_ect_from_parent(c_ELIGY_PRFL_ID number) is
3456 select elig_dsblty_ctg_prte_id
3457 from BEN_ELIG_DSBLTY_CTG_PRTE_F
3458 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
3459 --
3460 cursor c_ect(c_elig_dsblty_ctg_prte_id number,c_mirror_src_entity_result_id number ,
3461 c_table_alias varchar2 ) is
3462 select ect.*
3463 from BEN_ELIG_DSBLTY_CTG_PRTE_F ect
3464 where ect.elig_dsblty_ctg_prte_id = c_elig_dsblty_ctg_prte_id
3465 -- and ect.business_group_id = p_business_group_id
3466 and not exists (
3467 select /* */ null
3468 from ben_copy_entity_results cpe
3469 -- pqh_table_route trt
3470 where copy_entity_txn_id = p_copy_entity_txn_id
3471 -- and trt.table_route_id = cpe.table_route_id
3472 and ( -- c_mirror_src_entity_result_id is null or
3473 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
3474 -- and trt.where_clause = 'BEN_ELIG_DSBLTY_CTG_PRTE_F'
3475 and cpe.table_alias = c_table_alias
3476 and information1 = c_elig_dsblty_ctg_prte_id
3477 -- and information4 = ect.business_group_id
3478 and information2 = ect.effective_start_date
3479 and information3 = ect.effective_end_date
3480 );
3481 l_elig_dsblty_ctg_prte_id number(15);
3482 l_out_ect_result_id number(15);
3483 ---------------------------------------------------------------
3484 -- END OF BEN_ELIG_DSBLTY_CTG_PRTE_F ----------------------
3485 ---------------------------------------------------------------
3486 ---------------------------------------------------------------
3487 -- START OF BEN_ELIG_COMPTNCY_PRTE_F ----------------------
3488 ---------------------------------------------------------------
3489 cursor c_ecy_from_parent(c_ELIGY_PRFL_ID number) is
3490 select elig_comptncy_prte_id
3491 from BEN_ELIG_COMPTNCY_PRTE_F
3492 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
3493 --
3494 cursor c_ecy(c_elig_comptncy_prte_id number,c_mirror_src_entity_result_id number ,
3495 c_table_alias varchar2 ) is
3496 select ecy.*
3497 from BEN_ELIG_COMPTNCY_PRTE_F ecy
3498 where ecy.elig_comptncy_prte_id = c_elig_comptncy_prte_id
3499 -- and ecy.business_group_id = p_business_group_id
3500 and not exists (
3501 select /* */ null
3502 from ben_copy_entity_results cpe
3503 -- pqh_table_route trt
3504 where copy_entity_txn_id = p_copy_entity_txn_id
3505 -- and trt.table_route_id = cpe.table_route_id
3506 and ( -- c_mirror_src_entity_result_id is null or
3507 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
3508 -- and trt.where_clause = 'BEN_ELIG_COMPTNCY_PRTE_F'
3509 and cpe.table_alias = c_table_alias
3510 and information1 = c_elig_comptncy_prte_id
3511 -- and information4 = ecy.business_group_id
3512 and information2 = ecy.effective_start_date
3513 and information3 = ecy.effective_end_date
3514 );
3515 l_elig_comptncy_prte_id number(15);
3516 l_out_ecy_result_id number(15);
3517 --
3518 cursor c_get_mapping_name16(p_COMPETENCE_ID number,p_date date) is
3519 select name
3520 from per_competences_vl
3521 where competence_id = p_competence_id
3522 and p_date
3523 between Date_from and nvl(Date_to, p_date);
3524 --
3525 cursor c_get_mapping_name17(p_rating_level_id number,
3526 p_business_group_id number
3527 ) is
3528 select rtl.name name
3529 from per_rating_levels_vl rtl
3530 where nvl(rtl.business_group_id, p_business_group_id) = p_business_group_id
3531 and rtl.rating_level_id = p_rating_level_id;
3532 --
3533 cursor c_competence_start_date(c_competence_id number) is
3534 select date_from
3535 from per_competences
3536 where competence_id = c_competence_id;
3537
3538 l_competence_start_date per_competences.date_from%type;
3539 ---------------------------------------------------------------
3540 -- END OF BEN_ELIG_COMPTNCY_PRTE_F ----------------------
3541 ---------------------------------------------------------------
3542
3543 ---------------------------------------------------------------
3544 -- START OF BEN_ELIG_PERF_RTNG_PRTE_F ----------------------
3545 ---------------------------------------------------------------
3546 cursor c_erg_from_parent(c_ELIGY_PRFL_ID number) is
3547 select elig_perf_rtng_prte_id
3548 from BEN_ELIG_PERF_RTNG_PRTE_F
3549 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
3550 --
3551 cursor c_erg(c_elig_perf_rtng_prte_id number,c_mirror_src_entity_result_id number ,
3552 c_table_alias varchar2 ) is
3553 select erg.*
3554 from BEN_ELIG_PERF_RTNG_PRTE_F erg
3555 where erg.elig_perf_rtng_prte_id = c_elig_perf_rtng_prte_id
3556 -- and erg.business_group_id = p_business_group_id
3557 and not exists (
3558 select /* */ null
3559 from ben_copy_entity_results cpe
3560 -- pqh_table_route trt
3561 where copy_entity_txn_id = p_copy_entity_txn_id
3562 -- and trt.table_route_id = cpe.table_route_id
3563 and ( -- c_mirror_src_entity_result_id is null or
3564 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
3565 -- and trt.where_clause = 'BEN_ELIG_PERF_RTNG_PRTE_F'
3566 and cpe.table_alias = c_table_alias
3567 and information1 = c_elig_perf_rtng_prte_id
3568 -- and information4 = erg.business_group_id
3569 and information2 = erg.effective_start_date
3570 and information3 = erg.effective_end_date
3571 );
3572 l_elig_perf_rtng_prte_id number(15);
3573 l_out_erg_result_id number(15);
3574 ---------------------------------------------------------------
3575 -- END OF BEN_ELIG_PERF_RTNG_PRTE_F ----------------------
3576 ---------------------------------------------------------------
3577 ---------------------------------------------------------------
3578 -- START OF BEN_ELIG_QUA_IN_GR_PRTE_F ----------------------
3579 ---------------------------------------------------------------
3580 cursor c_eqg_from_parent(c_ELIGY_PRFL_ID number) is
3581 select elig_qua_in_gr_prte_id
3582 from BEN_ELIG_QUA_IN_GR_PRTE_F
3583 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
3584 --
3585 cursor c_eqg(c_elig_qua_in_gr_prte_id number,c_mirror_src_entity_result_id number ,
3586 c_table_alias varchar2 ) is
3587 select eqg.*
3588 from BEN_ELIG_QUA_IN_GR_PRTE_F eqg
3589 where eqg.elig_qua_in_gr_prte_id = c_elig_qua_in_gr_prte_id
3590 -- and eqg.business_group_id = p_business_group_id
3591 and not exists (
3592 select /* */ null
3593 from ben_copy_entity_results cpe
3594 -- pqh_table_route trt
3595 where copy_entity_txn_id = p_copy_entity_txn_id
3596 -- and trt.table_route_id = cpe.table_route_id
3597 and ( -- c_mirror_src_entity_result_id is null or
3598 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
3599 -- and trt.where_clause = 'BEN_ELIG_QUA_IN_GR_PRTE_F'
3600 and cpe.table_alias = c_table_alias
3601 and information1 = c_elig_qua_in_gr_prte_id
3602 -- and information4 = eqg.business_group_id
3603 and information2 = eqg.effective_start_date
3604 and information3 = eqg.effective_end_date
3605 );
3606 l_elig_qua_in_gr_prte_id number(15);
3607 l_out_eqg_result_id number(15);
3608 ---------------------------------------------------------------
3609 -- END OF BEN_ELIG_QUA_IN_GR_PRTE_F ----------------------
3610 ---------------------------------------------------------------
3611 ---------------------------------------------------------------
3612 -- START OF BEN_ELIG_TBCO_USE_PRTE_F ----------------------
3613 ---------------------------------------------------------------
3614 cursor c_etu_from_parent(c_ELIGY_PRFL_ID number) is
3615 select elig_tbco_use_prte_id
3616 from BEN_ELIG_TBCO_USE_PRTE_F
3617 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
3618 --
3619 cursor c_etu(c_elig_tbco_use_prte_id number,c_mirror_src_entity_result_id number ,
3620 c_table_alias varchar2 ) is
3621 select etu.*
3622 from BEN_ELIG_TBCO_USE_PRTE_F etu
3623 where etu.elig_tbco_use_prte_id = c_elig_tbco_use_prte_id
3624 -- and etu.business_group_id = p_business_group_id
3625 and not exists (
3626 select /* */ null
3627 from ben_copy_entity_results cpe
3628 -- pqh_table_route trt
3629 where copy_entity_txn_id = p_copy_entity_txn_id
3630 -- and trt.table_route_id = cpe.table_route_id
3631 and ( -- c_mirror_src_entity_result_id is null or
3632 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
3633 -- and trt.where_clause = 'BEN_ELIG_TBCO_USE_PRTE_F'
3634 and cpe.table_alias = c_table_alias
3635 and information1 = c_elig_tbco_use_prte_id
3636 -- and information4 = etu.business_group_id
3637 and information2 = etu.effective_start_date
3638 and information3 = etu.effective_end_date
3639 );
3640 l_elig_tbco_use_prte_id number(15);
3641 l_out_etu_result_id number(15);
3642 ---------------------------------------------------------------
3643 -- END OF BEN_ELIG_TBCO_USE_PRTE_F ----------------------
3644 ---------------------------------------------------------------
3645 ---------------------------------------------------------------
3646 -- START OF BEN_ELIG_TTL_CVG_VOL_PRTE_F ----------------------
3647 ---------------------------------------------------------------
3648 cursor c_etc_from_parent(c_ELIGY_PRFL_ID number) is
3649 select elig_ttl_cvg_vol_prte_id
3650 from BEN_ELIG_TTL_CVG_VOL_PRTE_F
3651 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
3652 --
3653 cursor c_etc(c_elig_ttl_cvg_vol_prte_id number,c_mirror_src_entity_result_id number ,
3654 c_table_alias varchar2 ) is
3655 select etc.*
3656 from BEN_ELIG_TTL_CVG_VOL_PRTE_F etc
3657 where etc.elig_ttl_cvg_vol_prte_id = c_elig_ttl_cvg_vol_prte_id
3658 -- and etc.business_group_id = p_business_group_id
3659 and not exists (
3660 select /* */ null
3661 from ben_copy_entity_results cpe
3662 -- pqh_table_route trt
3663 where copy_entity_txn_id = p_copy_entity_txn_id
3664 -- and trt.table_route_id = cpe.table_route_id
3665 and ( -- c_mirror_src_entity_result_id is null or
3666 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
3667 -- and trt.where_clause = 'BEN_ELIG_TTL_CVG_VOL_PRTE_F'
3668 and cpe.table_alias = c_table_alias
3669 and information1 = c_elig_ttl_cvg_vol_prte_id
3670 -- and information4 = etc.business_group_id
3671 and information2 = etc.effective_start_date
3672 and information3 = etc.effective_end_date
3673 );
3674 l_elig_ttl_cvg_vol_prte_id number(15);
3675 l_out_etc_result_id number(15);
3676 ---------------------------------------------------------------
3677 -- END OF BEN_ELIG_TTL_CVG_VOL_PRTE_F ----------------------
3678 ---------------------------------------------------------------
3679 ---------------------------------------------------------------
3680 -- START OF BEN_ELIG_TTL_PRTT_PRTE_F ----------------------
3681 ---------------------------------------------------------------
3682 cursor c_etp_from_parent(c_ELIGY_PRFL_ID number) is
3683 select elig_ttl_prtt_prte_id
3684 from BEN_ELIG_TTL_PRTT_PRTE_F
3685 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
3686 --
3687 cursor c_etp(c_elig_ttl_prtt_prte_id number,c_mirror_src_entity_result_id number ,
3688 c_table_alias varchar2 ) is
3689 select etp.*
3690 from BEN_ELIG_TTL_PRTT_PRTE_F etp
3691 where etp.elig_ttl_prtt_prte_id = c_elig_ttl_prtt_prte_id
3692 -- and etp.business_group_id = p_business_group_id
3693 and not exists (
3694 select /* */ null
3695 from ben_copy_entity_results cpe
3696 -- pqh_table_route trt
3697 where copy_entity_txn_id = p_copy_entity_txn_id
3698 -- and trt.table_route_id = cpe.table_route_id
3699 and ( -- c_mirror_src_entity_result_id is null or
3700 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
3701 -- and trt.where_clause = 'BEN_ELIG_TTL_PRTT_PRTE_F'
3702 and cpe.table_alias = c_table_alias
3703 and information1 = c_elig_ttl_prtt_prte_id
3704 -- and information4 = etp.business_group_id
3705 and information2 = etp.effective_start_date
3706 and information3 = etp.effective_end_date
3707 );
3708 l_elig_ttl_prtt_prte_id number(15);
3709 l_out_etp_result_id number(15);
3710 ---------------------------------------------------------------
3711 -- END OF BEN_ELIG_TTL_PRTT_PRTE_F ----------------------
3712 ---------------------------------------------------------------
3713 ---------------------------------------------------------------
3714 -- START OF BEN_ELIG_DSBLD_PRTE_F ----------------------
3715 ---------------------------------------------------------------
3716 cursor c_edb_from_parent(c_ELIGY_PRFL_ID number) is
3717 select elig_dsbld_prte_id
3718 from BEN_ELIG_DSBLD_PRTE_F
3719 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
3720 --
3721 cursor c_edb(c_elig_dsbld_prte_id number,c_mirror_src_entity_result_id number ,
3722 c_table_alias varchar2 ) is
3723 select edb.*
3724 from BEN_ELIG_DSBLD_PRTE_F edb
3725 where edb.elig_dsbld_prte_id = c_elig_dsbld_prte_id
3726 -- and edb.business_group_id = p_business_group_id
3727 and not exists (
3728 select /* */ null
3729 from ben_copy_entity_results cpe
3730 -- pqh_table_route trt
3731 where copy_entity_txn_id = p_copy_entity_txn_id
3732 -- and trt.table_route_id = cpe.table_route_id
3733 and ( -- c_mirror_src_entity_result_id is null or
3734 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
3735 -- and trt.where_clause = 'BEN_ELIG_DSBLD_PRTE_F'
3736 and cpe.table_alias = c_table_alias
3737 and information1 = c_elig_dsbld_prte_id
3738 -- and information4 = edb.business_group_id
3739 and information2 = edb.effective_start_date
3740 and information3 = edb.effective_end_date
3741 );
3742 l_elig_dsbld_prte_id number(15);
3743 l_out_edb_result_id number(15);
3744 ---------------------------------------------------------------
3745 -- END OF BEN_ELIG_DSBLD_PRTE_F ----------------------
3746 ---------------------------------------------------------------
3747 ---------------------------------------------------------------
3748 -- START OF BEN_ELIG_HLTH_CVG_PRTE_F ----------------------
3749 ---------------------------------------------------------------
3750 cursor c_ehc_from_parent(c_ELIGY_PRFL_ID number) is
3751 select elig_hlth_cvg_prte_id
3752 from BEN_ELIG_HLTH_CVG_PRTE_F
3753 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
3754 --
3755 cursor c_ehc(c_elig_hlth_cvg_prte_id number,c_mirror_src_entity_result_id number ,
3756 c_table_alias varchar2 ) is
3757 select ehc.*
3758 from BEN_ELIG_HLTH_CVG_PRTE_F ehc
3759 where ehc.elig_hlth_cvg_prte_id = c_elig_hlth_cvg_prte_id
3760 -- and ehc.business_group_id = p_business_group_id
3761 and not exists (
3762 select /* */ null
3763 from ben_copy_entity_results cpe
3764 -- pqh_table_route trt
3765 where copy_entity_txn_id = p_copy_entity_txn_id
3766 -- and trt.table_route_id = cpe.table_route_id
3767 and ( -- c_mirror_src_entity_result_id is null or
3768 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
3769 -- and trt.where_clause = 'BEN_ELIG_HLTH_CVG_PRTE_F'
3770 and cpe.table_alias = c_table_alias
3771 and information1 = c_elig_hlth_cvg_prte_id
3772 -- and information4 = ehc.business_group_id
3773 and information2 = ehc.effective_start_date
3774 and information3 = ehc.effective_end_date
3775 );
3776 l_elig_hlth_cvg_prte_id number(15);
3777 l_out_ehc_result_id number(15);
3778 ---------------------------------------------------------------
3779 -- END OF BEN_ELIG_HLTH_CVG_PRTE_F ----------------------
3780 ---------------------------------------------------------------
3781 ---------------------------------------------------------------
3782 -- START OF BEN_ELIG_ANTHR_PL_PRTE_F ----------------------
3783 ---------------------------------------------------------------
3784 cursor c_eop_from_parent(c_ELIGY_PRFL_ID number) is
3785 select elig_anthr_pl_prte_id
3786 from BEN_ELIG_ANTHR_PL_PRTE_F
3787 where ELIGY_PRFL_ID = c_ELIGY_PRFL_ID ;
3788 --
3789 cursor c_eop(c_elig_anthr_pl_prte_id number,c_mirror_src_entity_result_id number ,
3790 c_table_alias varchar2 ) is
3791 select eop.*
3792 from BEN_ELIG_ANTHR_PL_PRTE_F eop
3793 where eop.elig_anthr_pl_prte_id = c_elig_anthr_pl_prte_id
3794 -- and eop.business_group_id = p_business_group_id
3795 and not exists (
3796 select /* */ null
3797 from ben_copy_entity_results cpe
3798 -- pqh_table_route trt
3799 where copy_entity_txn_id = p_copy_entity_txn_id
3800 -- and trt.table_route_id = cpe.table_route_id
3801 and ( -- c_mirror_src_entity_result_id is null or
3802 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
3803 -- and trt.where_clause = 'BEN_ELIG_ANTHR_PL_PRTE_F'
3804 and cpe.table_alias = c_table_alias
3805 and information1 = c_elig_anthr_pl_prte_id
3806 -- and information4 = eop.business_group_id
3807 and information2 = eop.effective_start_date
3808 and information3 = eop.effective_end_date
3809 );
3810 l_elig_anthr_pl_prte_id number(15);
3811 l_out_eop_result_id number(15);
3812 ---------------------------------------------------------------
3813 -- END OF BEN_ELIG_ANTHR_PL_PRTE_F ----------------------
3814 ---------------------------------------------------------------
3815
3816 ---------------------------------------------------------------
3817 ------------- START OF BEN_ELIGY_CRIT_VALUES_F ----------------
3818 ---------------------------------------------------------------
3819 CURSOR c_ecv_from_parent (cv_eligy_prfl_id NUMBER)
3820 IS
3821 SELECT eligy_crit_values_id
3822 FROM ben_eligy_crit_values_f
3823 WHERE eligy_prfl_id = cv_eligy_prfl_id;
3824 --
3825 CURSOR c_ecv (
3826 cv_eligy_crit_values_id NUMBER,
3827 cv_mirror_src_entity_result_id NUMBER,
3828 cv_table_alias VARCHAR2
3829 )
3830 IS
3831 SELECT ecv.*
3832 FROM ben_eligy_crit_values_f ecv
3833 WHERE ecv.eligy_crit_values_id = cv_eligy_crit_values_id
3834 AND NOT EXISTS (
3835 SELECT NULL
3836 FROM ben_copy_entity_results cpe
3837 WHERE copy_entity_txn_id = p_copy_entity_txn_id
3838 AND mirror_src_entity_result_id =
3839 cv_mirror_src_entity_result_id
3840 AND cpe.table_alias = cv_table_alias
3841 AND information1 = cv_eligy_crit_values_id
3842 AND information2 = ecv.effective_start_date
3843 AND information3 = ecv.effective_end_date);
3844 --
3845 CURSOR c_egl_val_type_cd (cv_eligy_criteria_id NUMBER)
3846 IS
3847 SELECT crit_col1_val_type_cd
3848 FROM ben_eligy_criteria egl
3849 WHERE eligy_criteria_id = cv_eligy_criteria_id;
3850 --
3851 l_eligy_crit_values_id number(15);
3852 l_out_ecv_result_id number(15);
3853 l_crit_col1_val_type_cd varchar2(30);
3854 l_org_stru_name varchar2(30);
3855 l_start_org_name varchar2(240);
3856 l_pos_stru_name varchar2(30);
3857 l_start_pos_name varchar2(240);
3858 l_eligy_criteria_id NUMBER (15);
3859 --
3860 ---------------------------------------------------------------
3861 -------------- END OF BEN_ELIGY_CRIT_VALUES_F -----------------
3862 ---------------------------------------------------------------
3863 /*
3864 Bug : 4347039. Moved the code to copy BEN_ELIGY_CRITERIA data
3865 into the procedure create_eligy_criteria_result
3866 ---------------------------------------------------------------
3867 --------------- START OF BEN_ELIGY_CRITERIA -------------------
3868 ---------------------------------------------------------------
3869 CURSOR c_egl (
3870 cv_eligy_criteria_id NUMBER,
3871 cv_mirror_src_entity_result_id NUMBER,
3872 cv_table_alias VARCHAR2
3873 )
3874 IS
3875 SELECT egl.*
3876 FROM ben_eligy_criteria egl
3877 WHERE egl.eligy_criteria_id = cv_eligy_criteria_id
3878 AND NOT EXISTS (
3879 SELECT NULL
3880 FROM ben_copy_entity_results cpe
3881 WHERE copy_entity_txn_id = p_copy_entity_txn_id
3882 AND mirror_src_entity_result_id =
3883 cv_mirror_src_entity_result_id
3884 AND cpe.table_alias = cv_table_alias
3885 AND information1 = cv_eligy_criteria_id);
3886
3887 --
3888 CURSOR c_value_set_name (cv_flex_value_set_id NUMBER)
3889 IS
3890 SELECT flex_value_set_name
3891 FROM fnd_flex_value_sets
3892 WHERE flex_value_set_id = cv_flex_value_set_id;
3893 --
3894 l_out_egl_result_id NUMBER (15);
3895 l_egl_table_route_id NUMBER (15);
3896 l_egl_result_type_cd VARCHAR2 (30);
3897
3898 l_egl_copy_entity_result_id ben_copy_entity_results.copy_entity_result_id%TYPE;
3899 l_egl_object_version_number ben_copy_entity_results.object_version_number%TYPE;
3900 l_flex_value_set_name fnd_flex_value_sets.flex_value_set_name%TYPE;
3901 --
3902 ---------------------------------------------------------------
3903 ------------------ END OF BEN_ELIGY_CRITERIA ------------------
3904 ---------------------------------------------------------------
3905 */
3906 cursor c_object_exists(c_pk_id number,
3907 c_table_alias varchar2) is
3908 select null
3909 from ben_copy_entity_results cpe
3910 -- pqh_table_route trt
3911 where copy_entity_txn_id = p_copy_entity_txn_id
3912 -- and trt.table_route_id = cpe.table_route_id
3913 and cpe.table_alias = c_table_alias
3914 and information1 = c_pk_id;
3915
3916 l_dummy varchar2(1);
3917
3918 --Bug 5059695
3919 l_dummy_parent_entity_rslt_id number(15);
3920 l_dummy_table_alias varchar2(30);
3921 --End Bug 5059695
3922
3923 l_mirror_src_entity_result_id number(15);
3924 l_table_route_id number(15);
3925 l_result_type_cd varchar2(30);
3926 l_information5 ben_copy_entity_results.information5%type;
3927 l_number_of_copies number(15);
3928 begin
3929
3930 ---------------------------------------------------------------
3931 -- START OF BEN_ELIGY_PRFL_F ----------------------
3932 ---------------------------------------------------------------
3933
3934 -- Bug 5059695 : Fetch the transaction category
3935 if(ben_plan_design_elpro_module.g_copy_entity_txn_id <> p_copy_entity_txn_id) then
3936
3937 ben_plan_design_elpro_module.g_copy_entity_txn_id := p_copy_entity_txn_id;
3938
3939 open g_trasaction_categories(p_copy_entity_txn_id) ;
3940 fetch g_trasaction_categories into ben_plan_design_elpro_module.g_trasaction_category;
3941 close g_trasaction_categories;
3942
3943 end if;
3944 --End Bug 5059695
3945
3946 if p_no_dup_rslt = ben_plan_design_program_module.g_pdw_no_dup_rslt then
3947 ben_plan_design_program_module.g_pdw_allow_dup_rslt := ben_plan_design_program_module.g_pdw_no_dup_rslt;
3948 end if;
3949
3950 if ben_plan_design_program_module.g_pdw_allow_dup_rslt = ben_plan_design_program_module.g_pdw_no_dup_rslt then
3951 open c_object_exists(p_eligy_prfl_id,'ELP');
3952 fetch c_object_exists into l_dummy;
3953 if c_object_exists%found then
3954 close c_object_exists;
3955 return;
3956 end if;
3957 close c_object_exists;
3958 end if;
3959
3960 l_number_of_copies := p_number_of_copies;
3961 l_mirror_src_entity_result_id := p_mirror_src_entity_result_id ;
3962
3963 --
3964 l_eligy_prfl_id := p_eligy_prfl_id ;
3965 --
3966 for l_elp_rec in c_elp(p_eligy_prfl_id,l_mirror_src_entity_result_id,'ELP' ) loop
3967 --
3968 l_table_route_id := null ;
3969 open ben_plan_design_program_module.g_table_route('ELP');
3970 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
3971 close ben_plan_design_program_module.g_table_route ;
3972 --
3973 l_information5 := l_elp_rec.name; --'Intersection';
3974 --
3975 -- Display the text (Required) if mndtry_flag = 'Y'
3976 --
3977 if p_mndtry_flag = 'Y' then
3978 l_information5 := l_information5
3979 || fnd_message.get_string('BEN','BEN_93295_PDC_MNDTRY_FLAG');
3980 end if;
3981 --
3982 if p_effective_date between l_elp_rec.effective_start_date
3983 and l_elp_rec.effective_end_date then
3984 --
3985 l_result_type_cd := 'DISPLAY';
3986 else
3987 l_result_type_cd := 'NO DISPLAY';
3988 end if;
3989 --
3990 l_copy_entity_result_id := null;
3991 l_object_version_number := null;
3992
3993
3994 -- Bug 5059695
3995 if(ben_plan_design_elpro_module.g_trasaction_category = 'PQHGSP') then
3996 l_dummy_parent_entity_rslt_id := p_parent_entity_result_id;
3997 l_dummy_table_alias := null;
3998 else
3999 l_dummy_parent_entity_rslt_id := null;
4000 l_dummy_table_alias := 'ELP';
4001 end if;
4002 -- End Bug 5059695
4003
4004
4005 ben_copy_entity_results_api.create_copy_entity_results(
4006 p_copy_entity_result_id => l_copy_entity_result_id,
4007 p_copy_entity_txn_id => p_copy_entity_txn_id,
4008 p_result_type_cd => l_result_type_cd,
4009 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
4010 p_parent_entity_result_id => l_dummy_parent_entity_rslt_id, -- 4990825 : dont Display ELP as child node
4011 p_number_of_copies => l_number_of_copies,
4012 p_table_route_id => l_table_route_id,
4013 P_TABLE_ALIAS => 'ELP',
4014 p_information1 => l_elp_rec.eligy_prfl_id,
4015 p_information2 => l_elp_rec.EFFECTIVE_START_DATE,
4016 p_information3 => l_elp_rec.EFFECTIVE_END_DATE,
4017 p_information4 => l_elp_rec.business_group_id,
4018 p_information5 => l_information5 , -- 9999 put name for h-grid
4019 p_information8 => l_dummy_table_alias, -- 4990825 : TO display ELP as TOP-node
4020 p_information75 => l_elp_rec.asg_typ_cd,
4021 p_information76 => l_elp_rec.asmt_to_use_cd,
4022 p_information20 => l_elp_rec.bnft_cagr_prtn_cd,
4023 p_information62 => l_elp_rec.cntng_prtn_elig_prfl_flag,
4024 p_information219 => l_elp_rec.description,
4025 p_information45 => l_elp_rec.elig_age_flag,
4026 p_information16 => l_elp_rec.elig_anthr_pl_flag,
4027 p_information52 => l_elp_rec.elig_asnt_set_flag,
4028 p_information42 => l_elp_rec.elig_benfts_grp_flag,
4029 p_information44 => l_elp_rec.elig_brgng_unit_flag,
4030 p_information32 => l_elp_rec.elig_cbr_quald_bnf_flag,
4031 p_information61 => l_elp_rec.elig_cmbn_age_los_flag,
4032 p_information54 => l_elp_rec.elig_comp_lvl_flag,
4033 p_information14 => l_elp_rec.elig_comptncy_flag,
4034 p_information36 => l_elp_rec.elig_dpnt_cvrd_pgm_flag,
4035 p_information71 => l_elp_rec.elig_dpnt_cvrd_pl_flag,
4036 p_information34 => l_elp_rec.elig_dpnt_cvrd_plip_flag,
4037 p_information35 => l_elp_rec.elig_dpnt_cvrd_ptip_flag,
4038 p_information77 => l_elp_rec.elig_dpnt_othr_ptip_flag,
4039 p_information11 => l_elp_rec.elig_dsbld_flag,
4040 p_information25 => l_elp_rec.elig_dsblty_ctg_flag,
4041 p_information26 => l_elp_rec.elig_dsblty_dgr_flag,
4042 p_information27 => l_elp_rec.elig_dsblty_rsn_flag,
4043 p_information49 => l_elp_rec.elig_ee_stat_flag,
4044 p_information69 => l_elp_rec.elig_enrld_oipl_flag,
4045 p_information70 => l_elp_rec.elig_enrld_pgm_flag,
4046 p_information68 => l_elp_rec.elig_enrld_pl_flag,
4047 p_information31 => l_elp_rec.elig_enrld_plip_flag,
4048 p_information33 => l_elp_rec.elig_enrld_ptip_flag,
4049 p_information48 => l_elp_rec.elig_fl_tm_pt_tm_flag,
4050 p_information24 => l_elp_rec.elig_gndr_flag,
4051 p_information50 => l_elp_rec.elig_grd_flag,
4052 p_information15 => l_elp_rec.elig_hlth_cvg_flag,
4053 p_information38 => l_elp_rec.elig_hrly_slrd_flag,
4054 p_information53 => l_elp_rec.elig_hrs_wkd_flag,
4055 p_information37 => l_elp_rec.elig_job_flag,
4056 p_information40 => l_elp_rec.elig_lbr_mmbr_flag,
4057 p_information41 => l_elp_rec.elig_lgl_enty_flag,
4058 p_information56 => l_elp_rec.elig_loa_rsn_flag,
4059 p_information46 => l_elp_rec.elig_los_flag,
4060 p_information72 => l_elp_rec.elig_lvg_rsn_flag,
4061 p_information28 => l_elp_rec.elig_mrtl_sts_flag,
4062 p_information67 => l_elp_rec.elig_no_othr_cvg_flag,
4063 p_information73 => l_elp_rec.elig_optd_mdcr_flag,
4064 p_information55 => l_elp_rec.elig_org_unit_flag,
4065 p_information51 => l_elp_rec.elig_pct_fl_tm_flag,
4066 p_information47 => l_elp_rec.elig_per_typ_flag,
4067 p_information17 => l_elp_rec.elig_perf_rtng_flag,
4068 p_information64 => l_elp_rec.elig_ppl_grp_flag,
4069 p_information29 => l_elp_rec.elig_prbtn_perd_flag,
4070 p_information63 => l_elp_rec.elig_prtt_pl_flag,
4071 p_information39 => l_elp_rec.elig_pstl_cd_flag,
4072 p_information19 => l_elp_rec.elig_pstn_flag,
4073 p_information66 => l_elp_rec.elig_ptip_prte_flag,
4074 p_information59 => l_elp_rec.elig_py_bss_flag,
4075 p_information57 => l_elp_rec.elig_pyrl_flag,
4076 p_information18 => l_elp_rec.elig_qua_in_gr_flag,
4077 p_information21 => l_elp_rec.elig_qual_titl_flag,
4078 p_information58 => l_elp_rec.elig_schedd_hrs_flag,
4079 p_information22 => l_elp_rec.elig_sp_clng_prg_pt_flag,
4080 p_information23 => l_elp_rec.elig_suppl_role_flag,
4081 p_information65 => l_elp_rec.elig_svc_area_flag,
4082 p_information74 => l_elp_rec.elig_tbco_use_flag,
4083 p_information12 => l_elp_rec.elig_ttl_cvg_vol_flag,
4084 p_information13 => l_elp_rec.elig_ttl_prtt_flag,
4085 p_information43 => l_elp_rec.elig_wk_loc_flag,
4086 p_information60 => l_elp_rec.eligy_prfl_rl_flag,
4087 p_information78 => l_elp_rec.elig_crit_values_flag, /* Bug 4169120 Rate By Criteria */
4088 p_information111 => l_elp_rec.elp_attribute1,
4089 p_information120 => l_elp_rec.elp_attribute10,
4090 p_information121 => l_elp_rec.elp_attribute11,
4091 p_information122 => l_elp_rec.elp_attribute12,
4092 p_information123 => l_elp_rec.elp_attribute13,
4093 p_information124 => l_elp_rec.elp_attribute14,
4094 p_information125 => l_elp_rec.elp_attribute15,
4095 p_information126 => l_elp_rec.elp_attribute16,
4096 p_information127 => l_elp_rec.elp_attribute17,
4097 p_information128 => l_elp_rec.elp_attribute18,
4098 p_information129 => l_elp_rec.elp_attribute19,
4099 p_information112 => l_elp_rec.elp_attribute2,
4100 p_information130 => l_elp_rec.elp_attribute20,
4101 p_information131 => l_elp_rec.elp_attribute21,
4102 p_information132 => l_elp_rec.elp_attribute22,
4103 p_information133 => l_elp_rec.elp_attribute23,
4104 p_information134 => l_elp_rec.elp_attribute24,
4105 p_information135 => l_elp_rec.elp_attribute25,
4106 p_information136 => l_elp_rec.elp_attribute26,
4107 p_information137 => l_elp_rec.elp_attribute27,
4108 p_information138 => l_elp_rec.elp_attribute28,
4109 p_information139 => l_elp_rec.elp_attribute29,
4110 p_information113 => l_elp_rec.elp_attribute3,
4111 p_information140 => l_elp_rec.elp_attribute30,
4112 p_information114 => l_elp_rec.elp_attribute4,
4113 p_information115 => l_elp_rec.elp_attribute5,
4114 p_information116 => l_elp_rec.elp_attribute6,
4115 p_information117 => l_elp_rec.elp_attribute7,
4116 p_information118 => l_elp_rec.elp_attribute8,
4117 p_information119 => l_elp_rec.elp_attribute9,
4118 p_information110 => l_elp_rec.elp_attribute_category,
4119 p_information170 => l_elp_rec.name,
4120 p_information30 => l_elp_rec.stat_cd,
4121 p_information265 => l_elp_rec.object_version_number,
4122 --
4123
4124 -- END REPLACE PARAMETER LINES
4125
4126 p_object_version_number => l_object_version_number,
4127 p_effective_date => p_effective_date );
4128 --
4129
4130 if l_out_elp_result_id is null then
4131 l_out_elp_result_id := l_copy_entity_result_id;
4132 end if;
4133
4134 if l_result_type_cd = 'DISPLAY' then
4135 l_out_elp_result_id := l_copy_entity_result_id ;
4136 end if;
4137 --
4138 end loop;
4139
4140 -- Create criteria only if Eligibility profile row
4141 -- has been created
4142 --
4143
4144 if l_out_elp_result_id is not null then
4145 --
4146 ---------------------------------------------------------------
4147 -- START OF BEN_CNTNG_PRTN_ELIG_PRFL_F ----------------------
4148 ---------------------------------------------------------------
4149 --
4150 for l_parent_rec in c_cgp_from_parent(l_ELIGY_PRFL_ID) loop
4151 --
4152 l_mirror_src_entity_result_id := l_out_elp_result_id ;
4153
4154 --
4155 l_cntng_prtn_elig_prfl_id := l_parent_rec.cntng_prtn_elig_prfl_id ;
4156 --
4157 for l_cgp_rec in c_cgp(l_parent_rec.cntng_prtn_elig_prfl_id,l_mirror_src_entity_result_id,'CGP' ) loop
4158 --
4159 l_table_route_id := null ;
4160 open ben_plan_design_program_module.g_table_route('CGP');
4161 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
4162 close ben_plan_design_program_module.g_table_route ;
4163 --
4164 l_information5 := l_cgp_rec.pymt_must_be_rcvd_num ||' '||
4165 hr_general.decode_lookup('BEN_TM_UOM', l_cgp_rec.pymt_must_be_rcvd_uom);
4166 --'Intersection';
4167 --
4168 if p_effective_date between l_cgp_rec.effective_start_date
4169 and l_cgp_rec.effective_end_date then
4170 --
4171 l_result_type_cd := 'DISPLAY';
4172 else
4173 l_result_type_cd := 'NO DISPLAY';
4174 end if;
4175 --
4176 l_copy_entity_result_id := null;
4177 l_object_version_number := null;
4178 ben_copy_entity_results_api.create_copy_entity_results(
4179 p_copy_entity_result_id => l_copy_entity_result_id,
4180 p_copy_entity_txn_id => p_copy_entity_txn_id,
4181 p_result_type_cd => l_result_type_cd,
4182 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
4183 p_parent_entity_result_id => l_mirror_src_entity_result_id,
4184 p_number_of_copies => l_number_of_copies,
4185 p_table_route_id => l_table_route_id,
4186 P_TABLE_ALIAS => 'CGP',
4187 p_information1 => l_cgp_rec.cntng_prtn_elig_prfl_id,
4188 p_information2 => l_cgp_rec.EFFECTIVE_START_DATE,
4189 p_information3 => l_cgp_rec.EFFECTIVE_END_DATE,
4190 p_information4 => l_cgp_rec.business_group_id,
4191 p_information5 => l_information5 , -- 9999 put name for h-grid
4192 p_information111 => l_cgp_rec.cgp_attribute1,
4193 p_information120 => l_cgp_rec.cgp_attribute10,
4194 p_information121 => l_cgp_rec.cgp_attribute11,
4195 p_information122 => l_cgp_rec.cgp_attribute12,
4196 p_information123 => l_cgp_rec.cgp_attribute13,
4197 p_information124 => l_cgp_rec.cgp_attribute14,
4198 p_information125 => l_cgp_rec.cgp_attribute15,
4199 p_information126 => l_cgp_rec.cgp_attribute16,
4200 p_information127 => l_cgp_rec.cgp_attribute17,
4201 p_information128 => l_cgp_rec.cgp_attribute18,
4202 p_information129 => l_cgp_rec.cgp_attribute19,
4203 p_information112 => l_cgp_rec.cgp_attribute2,
4204 p_information130 => l_cgp_rec.cgp_attribute20,
4205 p_information131 => l_cgp_rec.cgp_attribute21,
4206 p_information132 => l_cgp_rec.cgp_attribute22,
4207 p_information133 => l_cgp_rec.cgp_attribute23,
4208 p_information134 => l_cgp_rec.cgp_attribute24,
4209 p_information135 => l_cgp_rec.cgp_attribute25,
4210 p_information136 => l_cgp_rec.cgp_attribute26,
4211 p_information137 => l_cgp_rec.cgp_attribute27,
4212 p_information138 => l_cgp_rec.cgp_attribute28,
4213 p_information139 => l_cgp_rec.cgp_attribute29,
4214 p_information113 => l_cgp_rec.cgp_attribute3,
4215 p_information140 => l_cgp_rec.cgp_attribute30,
4216 p_information114 => l_cgp_rec.cgp_attribute4,
4217 p_information115 => l_cgp_rec.cgp_attribute5,
4218 p_information116 => l_cgp_rec.cgp_attribute6,
4219 p_information117 => l_cgp_rec.cgp_attribute7,
4220 p_information118 => l_cgp_rec.cgp_attribute8,
4221 p_information119 => l_cgp_rec.cgp_attribute9,
4222 p_information110 => l_cgp_rec.cgp_attribute_category,
4223 p_information263 => l_cgp_rec.eligy_prfl_id,
4224 p_information170 => l_cgp_rec.name,
4225 p_information259 => l_cgp_rec.pymt_must_be_rcvd_num,
4226 p_information260 => l_cgp_rec.pymt_must_be_rcvd_rl,
4227 p_information11 => l_cgp_rec.pymt_must_be_rcvd_uom,
4228 p_information265 => l_cgp_rec.object_version_number,
4229 --
4230
4231 -- END REPLACE PARAMETER LINES
4232
4233 p_object_version_number => l_object_version_number,
4234 p_effective_date => p_effective_date );
4235 --
4236
4237 if l_out_cgp_result_id is null then
4238 l_out_cgp_result_id := l_copy_entity_result_id;
4239 end if;
4240
4241 if l_result_type_cd = 'DISPLAY' then
4242 l_out_cgp_result_id := l_copy_entity_result_id ;
4243 end if;
4244 --
4245
4246 if (l_cgp_rec.pymt_must_be_rcvd_rl is not null) then
4247 ben_plan_design_program_module.create_formula_result(
4248 p_validate => p_validate
4249 ,p_copy_entity_result_id => l_copy_entity_result_id
4250 ,p_copy_entity_txn_id => p_copy_entity_txn_id
4251 ,p_formula_id => l_cgp_rec.pymt_must_be_rcvd_rl
4252 ,p_business_group_id => l_cgp_rec.business_group_id
4253 ,p_number_of_copies => l_number_of_copies
4254 ,p_object_version_number => l_object_version_number
4255 ,p_effective_date => p_effective_date);
4256 end if;
4257
4258
4259 end loop;
4260 --
4261 end loop;
4262 ---------------------------------------------------------------
4263 -- END OF BEN_CNTNG_PRTN_ELIG_PRFL_F ----------------------
4264 ---------------------------------------------------------------
4265 ---------------------------------------------------------------
4266 -- START OF BEN_ELIGY_PRFL_RL_F ----------------------
4267 ---------------------------------------------------------------
4268 --
4269 for l_parent_rec in c_erl_from_parent(l_ELIGY_PRFL_ID) loop
4270 --
4271 l_mirror_src_entity_result_id := l_out_elp_result_id ;
4272
4273 --
4274 l_eligy_prfl_rl_id := l_parent_rec.eligy_prfl_rl_id ;
4275 --
4276 for l_erl_rec in c_erl(l_parent_rec.eligy_prfl_rl_id,l_mirror_src_entity_result_id,'ERL' ) loop
4277 --
4278 l_table_route_id := null ;
4279 open ben_plan_design_program_module.g_table_route('ERL');
4280 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
4281 close ben_plan_design_program_module.g_table_route ;
4282 --
4283 l_information5 := ben_plan_design_program_module.get_formula_name(l_erl_rec.formula_id
4284 ,p_effective_date); --'Intersection';
4285 --
4286 if p_effective_date between l_erl_rec.effective_start_date
4287 and l_erl_rec.effective_end_date then
4288 --
4289 l_result_type_cd := 'DISPLAY';
4290 else
4291 l_result_type_cd := 'NO DISPLAY';
4292 end if;
4293 --
4294 l_copy_entity_result_id := null;
4295 l_object_version_number := null;
4296 ben_copy_entity_results_api.create_copy_entity_results(
4297 p_copy_entity_result_id => l_copy_entity_result_id,
4298 p_copy_entity_txn_id => p_copy_entity_txn_id,
4299 p_result_type_cd => l_result_type_cd,
4300 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
4301 p_parent_entity_result_id => l_mirror_src_entity_result_id,
4302 p_number_of_copies => l_number_of_copies,
4303 p_table_route_id => l_table_route_id,
4304 P_TABLE_ALIAS => 'ERL',
4305 p_information1 => l_erl_rec.eligy_prfl_rl_id,
4306 p_information2 => l_erl_rec.EFFECTIVE_START_DATE,
4307 p_information3 => l_erl_rec.EFFECTIVE_END_DATE,
4308 p_information4 => l_erl_rec.business_group_id,
4309 p_information5 => l_information5 , -- 9999 put name for h-grid
4310 p_information11 => l_erl_rec.drvbl_fctr_apls_flag,
4311 p_information263 => l_erl_rec.eligy_prfl_id,
4312 p_information111 => l_erl_rec.erl_attribute1,
4313 p_information120 => l_erl_rec.erl_attribute10,
4314 p_information121 => l_erl_rec.erl_attribute11,
4315 p_information122 => l_erl_rec.erl_attribute12,
4316 p_information123 => l_erl_rec.erl_attribute13,
4317 p_information124 => l_erl_rec.erl_attribute14,
4318 p_information125 => l_erl_rec.erl_attribute15,
4319 p_information126 => l_erl_rec.erl_attribute16,
4320 p_information127 => l_erl_rec.erl_attribute17,
4321 p_information128 => l_erl_rec.erl_attribute18,
4322 p_information129 => l_erl_rec.erl_attribute19,
4323 p_information112 => l_erl_rec.erl_attribute2,
4324 p_information130 => l_erl_rec.erl_attribute20,
4325 p_information131 => l_erl_rec.erl_attribute21,
4326 p_information132 => l_erl_rec.erl_attribute22,
4327 p_information133 => l_erl_rec.erl_attribute23,
4328 p_information134 => l_erl_rec.erl_attribute24,
4329 p_information135 => l_erl_rec.erl_attribute25,
4330 p_information136 => l_erl_rec.erl_attribute26,
4331 p_information137 => l_erl_rec.erl_attribute27,
4332 p_information138 => l_erl_rec.erl_attribute28,
4333 p_information139 => l_erl_rec.erl_attribute29,
4334 p_information113 => l_erl_rec.erl_attribute3,
4335 p_information140 => l_erl_rec.erl_attribute30,
4336 p_information114 => l_erl_rec.erl_attribute4,
4337 p_information115 => l_erl_rec.erl_attribute5,
4338 p_information116 => l_erl_rec.erl_attribute6,
4339 p_information117 => l_erl_rec.erl_attribute7,
4340 p_information118 => l_erl_rec.erl_attribute8,
4341 p_information119 => l_erl_rec.erl_attribute9,
4342 p_information110 => l_erl_rec.erl_attribute_category,
4343 p_information251 => l_erl_rec.formula_id,
4344 p_information260 => l_erl_rec.ordr_to_aply_num,
4345 p_information265 => l_erl_rec.object_version_number,
4346 p_information295 => l_erl_rec.criteria_score,
4347 p_information296 => l_erl_rec.criteria_weight,
4348
4349 --
4350
4351 -- END REPLACE PARAMETER LINES
4352
4353 p_object_version_number => l_object_version_number,
4354 p_effective_date => p_effective_date );
4355 --
4356
4357 if l_out_erl_result_id is null then
4358 l_out_erl_result_id := l_copy_entity_result_id;
4359 end if;
4360
4361 if l_result_type_cd = 'DISPLAY' then
4362 l_out_erl_result_id := l_copy_entity_result_id ;
4363 end if;
4364 --
4365 if (l_erl_rec.formula_id is not null) then
4366 ben_plan_design_program_module.create_formula_result(
4367 p_validate => p_validate
4368 ,p_copy_entity_result_id => l_copy_entity_result_id
4369 ,p_copy_entity_txn_id => p_copy_entity_txn_id
4370 ,p_formula_id => l_erl_rec.formula_id
4371 ,p_business_group_id => l_erl_rec.business_group_id
4372 ,p_number_of_copies => l_number_of_copies
4373 ,p_object_version_number => l_object_version_number
4374 ,p_effective_date => p_effective_date);
4375 end if;
4376 end loop;
4377 --
4378 end loop;
4379 ---------------------------------------------------------------
4380 -- END OF BEN_ELIGY_PRFL_RL_F ----------------------
4381 ---------------------------------------------------------------
4382 ---------------------------------------------------------------
4383 -- START OF BEN_ELIG_AGE_PRTE_F ----------------------
4384 ---------------------------------------------------------------
4385 --
4386 for l_parent_rec in c_eap_from_parent(l_ELIGY_PRFL_ID) loop
4387 --
4388 l_mirror_src_entity_result_id := l_out_elp_result_id ;
4389
4390 --
4391 l_elig_age_prte_id := l_parent_rec.elig_age_prte_id ;
4392 --
4393 for l_eap_rec in c_eap(l_parent_rec.elig_age_prte_id,l_mirror_src_entity_result_id,'EAP' ) loop
4394 --
4395 l_table_route_id := null ;
4396 open ben_plan_design_program_module.g_table_route('EAP');
4397 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
4398 close ben_plan_design_program_module.g_table_route ;
4399 --
4400 l_information5 := ben_plan_design_program_module.get_age_fctr_name(l_eap_rec.age_fctr_id)
4401 || ben_plan_design_program_module.get_exclude_message(l_eap_rec.excld_flag);
4402 --'Intersection';
4403 --
4404 if p_effective_date between l_eap_rec.effective_start_date
4405 and l_eap_rec.effective_end_date then
4406 --
4407 l_result_type_cd := 'DISPLAY';
4408 else
4409 l_result_type_cd := 'NO DISPLAY';
4410 end if;
4411 --
4412 l_copy_entity_result_id := null;
4413 l_object_version_number := null;
4414 ben_copy_entity_results_api.create_copy_entity_results(
4415 p_copy_entity_result_id => l_copy_entity_result_id,
4416 p_copy_entity_txn_id => p_copy_entity_txn_id,
4417 p_result_type_cd => l_result_type_cd,
4418 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
4419 p_parent_entity_result_id => l_mirror_src_entity_result_id,
4420 p_number_of_copies => l_number_of_copies,
4421 p_table_route_id => l_table_route_id,
4422 P_TABLE_ALIAS => 'EAP',
4423 p_information1 => l_eap_rec.elig_age_prte_id,
4424 p_information2 => l_eap_rec.EFFECTIVE_START_DATE,
4425 p_information3 => l_eap_rec.EFFECTIVE_END_DATE,
4426 p_information4 => l_eap_rec.business_group_id,
4427 p_information5 => l_information5 , -- 9999 put name for h-grid
4428 p_information246 => l_eap_rec.age_fctr_id,
4429 p_information111 => l_eap_rec.eap_attribute1,
4430 p_information120 => l_eap_rec.eap_attribute10,
4431 p_information121 => l_eap_rec.eap_attribute11,
4432 p_information122 => l_eap_rec.eap_attribute12,
4433 p_information123 => l_eap_rec.eap_attribute13,
4434 p_information124 => l_eap_rec.eap_attribute14,
4435 p_information125 => l_eap_rec.eap_attribute15,
4436 p_information126 => l_eap_rec.eap_attribute16,
4437 p_information127 => l_eap_rec.eap_attribute17,
4438 p_information128 => l_eap_rec.eap_attribute18,
4439 p_information129 => l_eap_rec.eap_attribute19,
4440 p_information112 => l_eap_rec.eap_attribute2,
4441 p_information130 => l_eap_rec.eap_attribute20,
4442 p_information131 => l_eap_rec.eap_attribute21,
4443 p_information132 => l_eap_rec.eap_attribute22,
4444 p_information133 => l_eap_rec.eap_attribute23,
4445 p_information134 => l_eap_rec.eap_attribute24,
4446 p_information135 => l_eap_rec.eap_attribute25,
4447 p_information136 => l_eap_rec.eap_attribute26,
4448 p_information137 => l_eap_rec.eap_attribute27,
4449 p_information138 => l_eap_rec.eap_attribute28,
4450 p_information139 => l_eap_rec.eap_attribute29,
4451 p_information113 => l_eap_rec.eap_attribute3,
4452 p_information140 => l_eap_rec.eap_attribute30,
4453 p_information114 => l_eap_rec.eap_attribute4,
4454 p_information115 => l_eap_rec.eap_attribute5,
4455 p_information116 => l_eap_rec.eap_attribute6,
4456 p_information117 => l_eap_rec.eap_attribute7,
4457 p_information118 => l_eap_rec.eap_attribute8,
4458 p_information119 => l_eap_rec.eap_attribute9,
4459 p_information110 => l_eap_rec.eap_attribute_category,
4460 p_information263 => l_eap_rec.eligy_prfl_id,
4461 p_information11 => l_eap_rec.excld_flag,
4462 p_information260 => l_eap_rec.ordr_num,
4463 p_information265 => l_eap_rec.object_version_number,
4464 p_information295 => l_eap_rec.criteria_score,
4465 p_information296 => l_eap_rec.criteria_weight,
4466 --
4467
4468 -- END REPLACE PARAMETER LINES
4469
4470 p_object_version_number => l_object_version_number,
4471 p_effective_date => p_effective_date );
4472 --
4473
4474 if l_out_eap_result_id is null then
4475 l_out_eap_result_id := l_copy_entity_result_id;
4476 end if;
4477
4478 if l_result_type_cd = 'DISPLAY' then
4479 l_out_eap_result_id := l_copy_entity_result_id ;
4480 end if;
4481 --
4482 end loop;
4483 --
4484 for l_eap_rec in c_eap_drp(l_parent_rec.elig_age_prte_id,l_mirror_src_entity_result_id,'EAP' ) loop
4485 ben_pd_rate_and_cvg_module.create_drpar_results
4486 (
4487 p_validate => p_validate
4488 ,p_copy_entity_result_id => l_out_eap_result_id
4489 ,p_copy_entity_txn_id => p_copy_entity_txn_id
4490 ,p_comp_lvl_fctr_id => null
4491 ,p_hrs_wkd_in_perd_fctr_id => null
4492 ,p_los_fctr_id => null
4493 ,p_pct_fl_tm_fctr_id => null
4494 ,p_age_fctr_id => l_eap_rec.age_fctr_id
4495 ,p_cmbn_age_los_fctr_id => null
4496 ,p_business_group_id => p_business_group_id
4497 ,p_number_of_copies => p_number_of_copies
4498 ,p_object_version_number => l_object_version_number
4499 ,p_effective_date => p_effective_date
4500 );
4501 end loop;
4502 end loop;
4503 ---------------------------------------------------------------
4504 -- END OF BEN_ELIG_AGE_PRTE_F ----------------------
4505 ---------------------------------------------------------------
4506 ---------------------------------------------------------------
4507 -- START OF BEN_ELIG_ASNT_SET_PRTE_F ----------------------
4508 ---------------------------------------------------------------
4509 --
4510 for l_parent_rec in c_ean_from_parent(l_ELIGY_PRFL_ID) loop
4511 --
4512 l_mirror_src_entity_result_id := l_out_elp_result_id ;
4513 --
4514 l_elig_asnt_set_prte_id := l_parent_rec.elig_asnt_set_prte_id ;
4515 --
4516 for l_ean_rec in c_ean(l_parent_rec.elig_asnt_set_prte_id,l_mirror_src_entity_result_id,'EAN' ) loop
4517 --
4518 l_table_route_id := null ;
4519 open ben_plan_design_program_module.g_table_route('EAN');
4520 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
4521 close ben_plan_design_program_module.g_table_route ;
4522 --
4523 l_information5 := ben_plan_design_program_module.get_assignment_set_name(l_ean_rec.assignment_set_id)
4524 || ben_plan_design_program_module.get_exclude_message(l_ean_rec.excld_flag);
4525 --'Intersection';
4526 --
4527 if p_effective_date between l_ean_rec.effective_start_date
4528 and l_ean_rec.effective_end_date then
4529 --
4530 l_result_type_cd := 'DISPLAY';
4531 else
4532 l_result_type_cd := 'NO DISPLAY';
4533 end if;
4534 --
4535 l_copy_entity_result_id := null;
4536 l_object_version_number := null;
4537 --
4538 -- pabodla : MAPPING DATA : Store the mapping column information.
4539 --
4540
4541 l_mapping_name := null;
4542 l_mapping_id := null;
4543 --
4544 -- Get the defined balance name to display on mapping page.
4545 --
4546 open c_get_mapping_name(l_ean_rec.assignment_set_id);
4547 fetch c_get_mapping_name into l_mapping_name;
4548 close c_get_mapping_name;
4549 --
4550 l_mapping_id := l_ean_rec.assignment_set_id;
4551 --
4552 --To set user friendly labels on the mapping page
4553 --
4554 l_mapping_column_name1 := null;
4555 l_mapping_column_name2 :=null;
4556 BEN_PLAN_DESIGN_TXNS_API.get_mapping_column_name(l_table_route_id,
4557 l_mapping_column_name1,
4558 l_mapping_column_name2,
4559 p_copy_entity_txn_id);
4560 --
4561 ben_copy_entity_results_api.create_copy_entity_results(
4562 p_copy_entity_result_id => l_copy_entity_result_id,
4563 p_copy_entity_txn_id => p_copy_entity_txn_id,
4564 p_result_type_cd => l_result_type_cd,
4565 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
4566 p_parent_entity_result_id => l_mirror_src_entity_result_id,
4567 p_number_of_copies => l_number_of_copies,
4568 p_table_route_id => l_table_route_id,
4569 P_TABLE_ALIAS => 'EAN',
4570 p_information1 => l_ean_rec.elig_asnt_set_prte_id,
4571 p_information2 => l_ean_rec.EFFECTIVE_START_DATE,
4572 p_information3 => l_ean_rec.EFFECTIVE_END_DATE,
4573 p_information4 => l_ean_rec.business_group_id,
4574 p_information5 => l_information5 , -- 9999 put name for h-grid
4575 -- Data for MAPPING columns.
4576 p_information173 => l_mapping_name,
4577 p_information174 => l_mapping_id,
4578 p_information181 => l_mapping_column_name1,
4579 p_information182 => l_mapping_column_name2,
4580 -- END other product Mapping columns.
4581 p_information111 => l_ean_rec.ean_attribute1,
4582 p_information120 => l_ean_rec.ean_attribute10,
4583 p_information121 => l_ean_rec.ean_attribute11,
4584 p_information122 => l_ean_rec.ean_attribute12,
4585 p_information123 => l_ean_rec.ean_attribute13,
4586 p_information124 => l_ean_rec.ean_attribute14,
4587 p_information125 => l_ean_rec.ean_attribute15,
4588 p_information126 => l_ean_rec.ean_attribute16,
4589 p_information127 => l_ean_rec.ean_attribute17,
4590 p_information128 => l_ean_rec.ean_attribute18,
4591 p_information129 => l_ean_rec.ean_attribute19,
4592 p_information112 => l_ean_rec.ean_attribute2,
4593 p_information130 => l_ean_rec.ean_attribute20,
4594 p_information131 => l_ean_rec.ean_attribute21,
4595 p_information132 => l_ean_rec.ean_attribute22,
4596 p_information133 => l_ean_rec.ean_attribute23,
4597 p_information134 => l_ean_rec.ean_attribute24,
4598 p_information135 => l_ean_rec.ean_attribute25,
4599 p_information136 => l_ean_rec.ean_attribute26,
4600 p_information137 => l_ean_rec.ean_attribute27,
4601 p_information138 => l_ean_rec.ean_attribute28,
4602 p_information139 => l_ean_rec.ean_attribute29,
4603 p_information113 => l_ean_rec.ean_attribute3,
4604 p_information140 => l_ean_rec.ean_attribute30,
4605 p_information114 => l_ean_rec.ean_attribute4,
4606 p_information115 => l_ean_rec.ean_attribute5,
4607 p_information116 => l_ean_rec.ean_attribute6,
4608 p_information117 => l_ean_rec.ean_attribute7,
4609 p_information118 => l_ean_rec.ean_attribute8,
4610 p_information119 => l_ean_rec.ean_attribute9,
4611 p_information110 => l_ean_rec.ean_attribute_category,
4612 p_information263 => l_ean_rec.eligy_prfl_id,
4613 p_information11 => l_ean_rec.excld_flag,
4614 p_information260 => l_ean_rec.ordr_num,
4615 p_information166 => NULL, -- No ESD for Assignment Set
4616 p_information265 => l_ean_rec.object_version_number,
4617 p_information295 => l_ean_rec.criteria_score,
4618 p_information296 => l_ean_rec.criteria_weight,
4619 --
4620
4621 -- END REPLACE PARAMETER LINES
4622
4623 p_object_version_number => l_object_version_number,
4624 p_effective_date => p_effective_date );
4625 --
4626
4627 if l_out_ean_result_id is null then
4628 l_out_ean_result_id := l_copy_entity_result_id;
4629 end if;
4630
4631 if l_result_type_cd = 'DISPLAY' then
4632 l_out_ean_result_id := l_copy_entity_result_id ;
4633 end if;
4634 --
4635 end loop;
4636 --
4637 end loop;
4638 ---------------------------------------------------------------
4639 -- END OF BEN_ELIG_ASNT_SET_PRTE_F ----------------------
4640 ---------------------------------------------------------------
4641 ---------------------------------------------------------------
4642 -- START OF BEN_ELIG_BENFTS_GRP_PRTE_F ----------------------
4643 ---------------------------------------------------------------
4644 --
4645 for l_parent_rec in c_ebn_from_parent(l_ELIGY_PRFL_ID) loop
4646 --
4647 l_mirror_src_entity_result_id := l_out_elp_result_id ;
4648 --
4649 l_elig_benfts_grp_prte_id := l_parent_rec.elig_benfts_grp_prte_id ;
4650 --
4651 for l_ebn_rec in c_ebn(l_parent_rec.elig_benfts_grp_prte_id,l_mirror_src_entity_result_id,'EBN' ) loop
4652 --
4653 l_table_route_id := null ;
4654 open ben_plan_design_program_module.g_table_route('EBN');
4655 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
4656 close ben_plan_design_program_module.g_table_route ;
4657 --
4658 l_information5 := ben_plan_design_program_module.get_benfts_grp_name(l_ebn_rec.benfts_grp_id)
4659 || ben_plan_design_program_module.get_exclude_message(l_ebn_rec.excld_flag);
4660 --'Intersection';
4661 --
4662 if p_effective_date between l_ebn_rec.effective_start_date
4663 and l_ebn_rec.effective_end_date then
4664 --
4665 l_result_type_cd := 'DISPLAY';
4666 else
4667 l_result_type_cd := 'NO DISPLAY';
4668 end if;
4669 --
4670 l_copy_entity_result_id := null;
4671 l_object_version_number := null;
4672 ben_copy_entity_results_api.create_copy_entity_results(
4673 p_copy_entity_result_id => l_copy_entity_result_id,
4674 p_copy_entity_txn_id => p_copy_entity_txn_id,
4675 p_result_type_cd => l_result_type_cd,
4676 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
4677 p_parent_entity_result_id => l_mirror_src_entity_result_id,
4678 p_number_of_copies => l_number_of_copies,
4679 p_table_route_id => l_table_route_id,
4680 P_TABLE_ALIAS => 'EBN',
4681 p_information1 => l_ebn_rec.elig_benfts_grp_prte_id,
4682 p_information2 => l_ebn_rec.EFFECTIVE_START_DATE,
4683 p_information3 => l_ebn_rec.EFFECTIVE_END_DATE,
4684 p_information4 => l_ebn_rec.business_group_id,
4685 p_information5 => l_information5 , -- 9999 put name for h-grid
4686 p_information222 => l_ebn_rec.benfts_grp_id,
4687 p_information111 => l_ebn_rec.ebn_attribute1,
4688 p_information120 => l_ebn_rec.ebn_attribute10,
4689 p_information121 => l_ebn_rec.ebn_attribute11,
4690 p_information122 => l_ebn_rec.ebn_attribute12,
4691 p_information123 => l_ebn_rec.ebn_attribute13,
4692 p_information124 => l_ebn_rec.ebn_attribute14,
4693 p_information125 => l_ebn_rec.ebn_attribute15,
4694 p_information126 => l_ebn_rec.ebn_attribute16,
4695 p_information127 => l_ebn_rec.ebn_attribute17,
4696 p_information128 => l_ebn_rec.ebn_attribute18,
4697 p_information129 => l_ebn_rec.ebn_attribute19,
4698 p_information112 => l_ebn_rec.ebn_attribute2,
4699 p_information130 => l_ebn_rec.ebn_attribute20,
4700 p_information131 => l_ebn_rec.ebn_attribute21,
4701 p_information132 => l_ebn_rec.ebn_attribute22,
4702 p_information133 => l_ebn_rec.ebn_attribute23,
4703 p_information134 => l_ebn_rec.ebn_attribute24,
4704 p_information135 => l_ebn_rec.ebn_attribute25,
4705 p_information136 => l_ebn_rec.ebn_attribute26,
4706 p_information137 => l_ebn_rec.ebn_attribute27,
4707 p_information138 => l_ebn_rec.ebn_attribute28,
4708 p_information139 => l_ebn_rec.ebn_attribute29,
4709 p_information113 => l_ebn_rec.ebn_attribute3,
4710 p_information140 => l_ebn_rec.ebn_attribute30,
4711 p_information114 => l_ebn_rec.ebn_attribute4,
4712 p_information115 => l_ebn_rec.ebn_attribute5,
4713 p_information116 => l_ebn_rec.ebn_attribute6,
4714 p_information117 => l_ebn_rec.ebn_attribute7,
4715 p_information118 => l_ebn_rec.ebn_attribute8,
4716 p_information119 => l_ebn_rec.ebn_attribute9,
4717 p_information110 => l_ebn_rec.ebn_attribute_category,
4718 p_information263 => l_ebn_rec.eligy_prfl_id,
4719 p_information11 => l_ebn_rec.excld_flag,
4720 p_information260 => l_ebn_rec.ordr_num,
4721 p_information265 => l_ebn_rec.object_version_number,
4722 p_information295 => l_ebn_rec.criteria_score,
4723 p_information296 => l_ebn_rec.criteria_weight,
4724 --
4725
4726 -- END REPLACE PARAMETER LINES
4727
4728 p_object_version_number => l_object_version_number,
4729 p_effective_date => p_effective_date );
4730 --
4731
4732 if l_out_ebn_result_id is null then
4733 l_out_ebn_result_id := l_copy_entity_result_id;
4734 end if;
4735
4736 if l_result_type_cd = 'DISPLAY' then
4737 l_out_ebn_result_id := l_copy_entity_result_id ;
4738 end if;
4739 --
4740 end loop;
4741 --
4742 for l_ebn_rec in c_ebn_bg(l_parent_rec.elig_benfts_grp_prte_id,l_mirror_src_entity_result_id,'EBN' ) loop
4743 ben_pd_rate_and_cvg_module.create_bnft_group_results
4744 (
4745 p_validate => p_validate
4746 ,p_copy_entity_result_id => l_out_ebn_result_id
4747 ,p_copy_entity_txn_id => p_copy_entity_txn_id
4748 ,p_benfts_grp_id => l_ebn_rec.benfts_grp_id
4749 ,p_business_group_id => p_business_group_id
4750 ,p_number_of_copies => p_number_of_copies
4751 ,p_object_version_number => l_object_version_number
4752 ,p_effective_date => p_effective_date
4753 );
4754 end loop;
4755 end loop;
4756 ---------------------------------------------------------------
4757 -- END OF BEN_ELIG_BENFTS_GRP_PRTE_F ----------------------
4758 ---------------------------------------------------------------
4759 ---------------------------------------------------------------
4760 -- START OF BEN_ELIG_BRGNG_UNIT_PRTE_F ----------------------
4761 ---------------------------------------------------------------
4762 --
4763 for l_parent_rec in c_ebu_from_parent(l_ELIGY_PRFL_ID) loop
4764 --
4765 l_mirror_src_entity_result_id := l_out_elp_result_id ;
4766 --
4767 l_elig_brgng_unit_prte_id := l_parent_rec.elig_brgng_unit_prte_id ;
4768 --
4769 for l_ebu_rec in c_ebu(l_parent_rec.elig_brgng_unit_prte_id,l_mirror_src_entity_result_id,'EBU' ) loop
4770 --
4771 l_table_route_id := null ;
4772 open ben_plan_design_program_module.g_table_route('EBU');
4773 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
4774 close ben_plan_design_program_module.g_table_route ;
4775 --
4776 l_information5 := hr_general.decode_lookup('BARGAINING_UNIT_CODE',l_ebu_rec.brgng_unit_cd)
4777 || ben_plan_design_program_module.get_exclude_message(l_ebu_rec.excld_flag);
4778 --'Intersection';
4779 --
4780 if p_effective_date between l_ebu_rec.effective_start_date
4781 and l_ebu_rec.effective_end_date then
4782 --
4783 l_result_type_cd := 'DISPLAY';
4784 else
4785 l_result_type_cd := 'NO DISPLAY';
4786 end if;
4787 --
4788 l_copy_entity_result_id := null;
4789 l_object_version_number := null;
4790 ben_copy_entity_results_api.create_copy_entity_results(
4791 p_copy_entity_result_id => l_copy_entity_result_id,
4792 p_copy_entity_txn_id => p_copy_entity_txn_id,
4793 p_result_type_cd => l_result_type_cd,
4794 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
4795 p_parent_entity_result_id => l_mirror_src_entity_result_id,
4796 p_number_of_copies => l_number_of_copies,
4797 p_table_route_id => l_table_route_id,
4798 P_TABLE_ALIAS => 'EBU',
4799 p_information1 => l_ebu_rec.elig_brgng_unit_prte_id,
4800 p_information2 => l_ebu_rec.EFFECTIVE_START_DATE,
4801 p_information3 => l_ebu_rec.EFFECTIVE_END_DATE,
4802 p_information4 => l_ebu_rec.business_group_id,
4803 p_information5 => l_information5 , -- 9999 put name for h-grid
4804 p_information11 => l_ebu_rec.brgng_unit_cd,
4805 p_information111 => l_ebu_rec.ebu_attribute1,
4806 p_information120 => l_ebu_rec.ebu_attribute10,
4807 p_information121 => l_ebu_rec.ebu_attribute11,
4808 p_information122 => l_ebu_rec.ebu_attribute12,
4809 p_information123 => l_ebu_rec.ebu_attribute13,
4810 p_information124 => l_ebu_rec.ebu_attribute14,
4811 p_information125 => l_ebu_rec.ebu_attribute15,
4812 p_information126 => l_ebu_rec.ebu_attribute16,
4813 p_information127 => l_ebu_rec.ebu_attribute17,
4814 p_information128 => l_ebu_rec.ebu_attribute18,
4815 p_information129 => l_ebu_rec.ebu_attribute19,
4816 p_information112 => l_ebu_rec.ebu_attribute2,
4817 p_information130 => l_ebu_rec.ebu_attribute20,
4818 p_information131 => l_ebu_rec.ebu_attribute21,
4819 p_information132 => l_ebu_rec.ebu_attribute22,
4820 p_information133 => l_ebu_rec.ebu_attribute23,
4821 p_information134 => l_ebu_rec.ebu_attribute24,
4822 p_information135 => l_ebu_rec.ebu_attribute25,
4823 p_information136 => l_ebu_rec.ebu_attribute26,
4824 p_information137 => l_ebu_rec.ebu_attribute27,
4825 p_information138 => l_ebu_rec.ebu_attribute28,
4826 p_information139 => l_ebu_rec.ebu_attribute29,
4827 p_information113 => l_ebu_rec.ebu_attribute3,
4828 p_information140 => l_ebu_rec.ebu_attribute30,
4829 p_information114 => l_ebu_rec.ebu_attribute4,
4830 p_information115 => l_ebu_rec.ebu_attribute5,
4831 p_information116 => l_ebu_rec.ebu_attribute6,
4832 p_information117 => l_ebu_rec.ebu_attribute7,
4833 p_information118 => l_ebu_rec.ebu_attribute8,
4834 p_information119 => l_ebu_rec.ebu_attribute9,
4835 p_information110 => l_ebu_rec.ebu_attribute_category,
4836 p_information263 => l_ebu_rec.eligy_prfl_id,
4837 p_information12 => l_ebu_rec.excld_flag,
4838 p_information260 => l_ebu_rec.ordr_num,
4839 p_information265 => l_ebu_rec.object_version_number,
4840 p_information295 => l_ebu_rec.criteria_score,
4841 p_information296 => l_ebu_rec.criteria_weight,
4842 --
4843
4844 -- END REPLACE PARAMETER LINES
4845
4846 p_object_version_number => l_object_version_number,
4847 p_effective_date => p_effective_date );
4848 --
4849
4850 if l_out_ebu_result_id is null then
4851 l_out_ebu_result_id := l_copy_entity_result_id;
4852 end if;
4853
4854 if l_result_type_cd = 'DISPLAY' then
4855 l_out_ebu_result_id := l_copy_entity_result_id ;
4856 end if;
4857 --
4858 end loop;
4859 --
4860 end loop;
4861 ---------------------------------------------------------------
4862 -- END OF BEN_ELIG_BRGNG_UNIT_PRTE_F ----------------------
4863 ---------------------------------------------------------------
4864 ---------------------------------------------------------------
4865 -- START OF BEN_ELIG_CBR_QUALD_BNF_F ----------------------
4866 ---------------------------------------------------------------
4867 --
4868 for l_parent_rec in c_ecq_from_parent(l_ELIGY_PRFL_ID) loop
4869 --
4870 l_mirror_src_entity_result_id := l_out_elp_result_id ;
4871 --
4872 l_elig_cbr_quald_bnf_id := l_parent_rec.elig_cbr_quald_bnf_id ;
4873 --
4874 for l_ecq_rec in c_ecq(l_parent_rec.elig_cbr_quald_bnf_id,l_mirror_src_entity_result_id,'ECQ' ) loop
4875 --
4876 l_table_route_id := null ;
4877 open ben_plan_design_program_module.g_table_route('ECQ');
4878 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
4879 close ben_plan_design_program_module.g_table_route ;
4880 --
4881 l_information5 := ben_plan_design_program_module.get_cbr_quald_bnf_name(l_ecq_rec.ptip_id
4882 ,l_ecq_rec.pgm_id
4883 ,p_effective_date)
4884 --
4885 -- Bug no: 3451872
4886 --
4887 ||' '||get_quald_bnf_message(l_ecq_rec.quald_bnf_flag);
4888 --
4889 --'Intersection';
4890 --
4891 if p_effective_date between l_ecq_rec.effective_start_date
4892 and l_ecq_rec.effective_end_date then
4893 --
4894 l_result_type_cd := 'DISPLAY';
4895 else
4896 l_result_type_cd := 'NO DISPLAY';
4897 end if;
4898 --
4899 l_copy_entity_result_id := null;
4900 l_object_version_number := null;
4901 ben_copy_entity_results_api.create_copy_entity_results(
4902 p_copy_entity_result_id => l_copy_entity_result_id,
4903 p_copy_entity_txn_id => p_copy_entity_txn_id,
4904 p_result_type_cd => l_result_type_cd,
4905 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
4906 p_parent_entity_result_id => l_mirror_src_entity_result_id,
4907 p_number_of_copies => l_number_of_copies,
4908 p_table_route_id => l_table_route_id,
4909 P_TABLE_ALIAS => 'ECQ',
4910 p_information1 => l_ecq_rec.elig_cbr_quald_bnf_id,
4911 p_information2 => l_ecq_rec.EFFECTIVE_START_DATE,
4912 p_information3 => l_ecq_rec.EFFECTIVE_END_DATE,
4913 p_information4 => l_ecq_rec.business_group_id,
4914 p_information5 => l_information5 , -- 9999 put name for h-grid
4915 p_information111 => l_ecq_rec.ecq_attribute1,
4916 p_information120 => l_ecq_rec.ecq_attribute10,
4917 p_information121 => l_ecq_rec.ecq_attribute11,
4918 p_information122 => l_ecq_rec.ecq_attribute12,
4919 p_information123 => l_ecq_rec.ecq_attribute13,
4920 p_information124 => l_ecq_rec.ecq_attribute14,
4921 p_information125 => l_ecq_rec.ecq_attribute15,
4922 p_information126 => l_ecq_rec.ecq_attribute16,
4923 p_information127 => l_ecq_rec.ecq_attribute17,
4924 p_information128 => l_ecq_rec.ecq_attribute18,
4925 p_information129 => l_ecq_rec.ecq_attribute19,
4926 p_information112 => l_ecq_rec.ecq_attribute2,
4927 p_information130 => l_ecq_rec.ecq_attribute20,
4928 p_information131 => l_ecq_rec.ecq_attribute21,
4929 p_information132 => l_ecq_rec.ecq_attribute22,
4930 p_information133 => l_ecq_rec.ecq_attribute23,
4931 p_information134 => l_ecq_rec.ecq_attribute24,
4932 p_information135 => l_ecq_rec.ecq_attribute25,
4933 p_information136 => l_ecq_rec.ecq_attribute26,
4934 p_information137 => l_ecq_rec.ecq_attribute27,
4935 p_information138 => l_ecq_rec.ecq_attribute28,
4936 p_information139 => l_ecq_rec.ecq_attribute29,
4937 p_information113 => l_ecq_rec.ecq_attribute3,
4938 p_information140 => l_ecq_rec.ecq_attribute30,
4939 p_information114 => l_ecq_rec.ecq_attribute4,
4940 p_information115 => l_ecq_rec.ecq_attribute5,
4941 p_information116 => l_ecq_rec.ecq_attribute6,
4942 p_information117 => l_ecq_rec.ecq_attribute7,
4943 p_information118 => l_ecq_rec.ecq_attribute8,
4944 p_information119 => l_ecq_rec.ecq_attribute9,
4945 p_information110 => l_ecq_rec.ecq_attribute_category,
4946 p_information263 => l_ecq_rec.eligy_prfl_id,
4947 p_information262 => l_ecq_rec.ordr_num,
4948 p_information260 => l_ecq_rec.pgm_id,
4949 p_information259 => l_ecq_rec.ptip_id,
4950 p_information11 => l_ecq_rec.quald_bnf_flag,
4951 p_information265 => l_ecq_rec.object_version_number,
4952 p_information295 => l_ecq_rec.criteria_score,
4953 p_information296 => l_ecq_rec.criteria_weight,
4954 --
4955
4956 -- END REPLACE PARAMETER LINES
4957
4958 p_object_version_number => l_object_version_number,
4959 p_effective_date => p_effective_date );
4960 --
4961
4962 if l_out_ecq_result_id is null then
4963 l_out_ecq_result_id := l_copy_entity_result_id;
4964 end if;
4965
4966 if l_result_type_cd = 'DISPLAY' then
4967 l_out_ecq_result_id := l_copy_entity_result_id ;
4968 end if;
4969 --
4970 end loop;
4971 --
4972 end loop;
4973 ---------------------------------------------------------------
4974 -- END OF BEN_ELIG_CBR_QUALD_BNF_F ----------------------
4975 ---------------------------------------------------------------
4976 ---------------------------------------------------------------
4977 -- START OF BEN_ELIG_CMBN_AGE_LOS_PRTE_F ----------------------
4978 ---------------------------------------------------------------
4979 --
4980 for l_parent_rec in c_ecp_from_parent(l_ELIGY_PRFL_ID) loop
4981 --
4982 l_mirror_src_entity_result_id := l_out_elp_result_id ;
4983 --
4984 l_elig_cmbn_age_los_prte_id := l_parent_rec.elig_cmbn_age_los_prte_id ;
4985 --
4986 for l_ecp_rec in c_ecp(l_parent_rec.elig_cmbn_age_los_prte_id,l_mirror_src_entity_result_id,'ECP') loop
4987 --
4988 l_table_route_id := null ;
4989 open ben_plan_design_program_module.g_table_route('ECP');
4990 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
4991 close ben_plan_design_program_module.g_table_route ;
4992 --
4993 l_information5 := ben_plan_design_program_module.get_cmbn_age_los_fctr_name(l_ecp_rec.cmbn_age_los_fctr_id)
4994 || ben_plan_design_program_module.get_exclude_message(l_ecp_rec.excld_flag);
4995 --'Intersection';
4996 --
4997 if p_effective_date between l_ecp_rec.effective_start_date
4998 and l_ecp_rec.effective_end_date then
4999 --
5000 l_result_type_cd := 'DISPLAY';
5001 else
5002 l_result_type_cd := 'NO DISPLAY';
5003 end if;
5004 --
5005 l_copy_entity_result_id := null;
5006 l_object_version_number := null;
5007 ben_copy_entity_results_api.create_copy_entity_results(
5008 p_copy_entity_result_id => l_copy_entity_result_id,
5009 p_copy_entity_txn_id => p_copy_entity_txn_id,
5010 p_result_type_cd => l_result_type_cd,
5011 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
5012 p_parent_entity_result_id => l_mirror_src_entity_result_id,
5013 p_number_of_copies => l_number_of_copies,
5014 p_table_route_id => l_table_route_id,
5015 P_TABLE_ALIAS => 'ECP',
5016 p_information1 => l_ecp_rec.elig_cmbn_age_los_prte_id,
5017 p_information2 => l_ecp_rec.EFFECTIVE_START_DATE,
5018 p_information3 => l_ecp_rec.EFFECTIVE_END_DATE,
5019 p_information4 => l_ecp_rec.business_group_id,
5020 p_information5 => l_information5 , -- 9999 put name for h-grid
5021 p_information223 => l_ecp_rec.cmbn_age_los_fctr_id,
5022 p_information111 => l_ecp_rec.ecp_attribute1,
5023 p_information120 => l_ecp_rec.ecp_attribute10,
5024 p_information121 => l_ecp_rec.ecp_attribute11,
5025 p_information122 => l_ecp_rec.ecp_attribute12,
5026 p_information123 => l_ecp_rec.ecp_attribute13,
5027 p_information124 => l_ecp_rec.ecp_attribute14,
5028 p_information125 => l_ecp_rec.ecp_attribute15,
5029 p_information126 => l_ecp_rec.ecp_attribute16,
5030 p_information127 => l_ecp_rec.ecp_attribute17,
5031 p_information128 => l_ecp_rec.ecp_attribute18,
5032 p_information129 => l_ecp_rec.ecp_attribute19,
5033 p_information112 => l_ecp_rec.ecp_attribute2,
5034 p_information130 => l_ecp_rec.ecp_attribute20,
5035 p_information131 => l_ecp_rec.ecp_attribute21,
5036 p_information132 => l_ecp_rec.ecp_attribute22,
5037 p_information133 => l_ecp_rec.ecp_attribute23,
5038 p_information134 => l_ecp_rec.ecp_attribute24,
5039 p_information135 => l_ecp_rec.ecp_attribute25,
5040 p_information136 => l_ecp_rec.ecp_attribute26,
5041 p_information137 => l_ecp_rec.ecp_attribute27,
5042 p_information138 => l_ecp_rec.ecp_attribute28,
5043 p_information139 => l_ecp_rec.ecp_attribute29,
5044 p_information113 => l_ecp_rec.ecp_attribute3,
5045 p_information140 => l_ecp_rec.ecp_attribute30,
5046 p_information114 => l_ecp_rec.ecp_attribute4,
5047 p_information115 => l_ecp_rec.ecp_attribute5,
5048 p_information116 => l_ecp_rec.ecp_attribute6,
5049 p_information117 => l_ecp_rec.ecp_attribute7,
5050 p_information118 => l_ecp_rec.ecp_attribute8,
5051 p_information119 => l_ecp_rec.ecp_attribute9,
5052 p_information110 => l_ecp_rec.ecp_attribute_category,
5053 p_information263 => l_ecp_rec.eligy_prfl_id,
5054 p_information11 => l_ecp_rec.excld_flag,
5055 p_information12 => l_ecp_rec.mndtry_flag,
5056 p_information260 => l_ecp_rec.ordr_num,
5057 p_information265 => l_ecp_rec.object_version_number,
5058 p_information295 => l_ecp_rec.criteria_score,
5059 p_information296 => l_ecp_rec.criteria_weight,
5060 --
5061
5062 -- END REPLACE PARAMETER LINES
5063
5064 p_object_version_number => l_object_version_number,
5065 p_effective_date => p_effective_date );
5066 --
5067
5068 if l_out_ecp_result_id is null then
5069 l_out_ecp_result_id := l_copy_entity_result_id;
5070 end if;
5071
5072 if l_result_type_cd = 'DISPLAY' then
5073 l_out_ecp_result_id := l_copy_entity_result_id ;
5074 end if;
5075 --
5076 end loop;
5077 --
5078 for l_ecp_rec in c_ecp_drp(l_parent_rec.elig_cmbn_age_los_prte_id,l_mirror_src_entity_result_id,'ECP' ) loop
5079 ben_pd_rate_and_cvg_module.create_drpar_results
5080 (
5081 p_validate => p_validate
5082 ,p_copy_entity_result_id => l_out_ecp_result_id
5083 ,p_copy_entity_txn_id => p_copy_entity_txn_id
5084 ,p_comp_lvl_fctr_id => null
5085 ,p_hrs_wkd_in_perd_fctr_id => null
5086 ,p_los_fctr_id => null
5087 ,p_pct_fl_tm_fctr_id => null
5088 ,p_age_fctr_id => null
5089 ,p_cmbn_age_los_fctr_id => l_ecp_rec.cmbn_age_los_fctr_id
5090 ,p_business_group_id => p_business_group_id
5091 ,p_number_of_copies => p_number_of_copies
5092 ,p_object_version_number => l_object_version_number
5093 ,p_effective_date => p_effective_date
5094 );
5095 end loop;
5096 end loop;
5097 ---------------------------------------------------------------
5098 -- END OF BEN_ELIG_CMBN_AGE_LOS_PRTE_F ----------------------
5099 ---------------------------------------------------------------
5100 ---------------------------------------------------------------
5101 -- START OF BEN_ELIG_COMP_LVL_PRTE_F ----------------------
5102 ---------------------------------------------------------------
5103 --
5104 for l_parent_rec in c_ecl_from_parent(l_ELIGY_PRFL_ID) loop
5105 --
5106 l_mirror_src_entity_result_id := l_out_elp_result_id ;
5107 --
5108 l_elig_comp_lvl_prte_id := l_parent_rec.elig_comp_lvl_prte_id ;
5109 --
5110 for l_ecl_rec in c_ecl(l_parent_rec.elig_comp_lvl_prte_id,l_mirror_src_entity_result_id,'ECL' ) loop
5111 --
5112 l_table_route_id := null ;
5113 open ben_plan_design_program_module.g_table_route('ECL');
5114 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
5115 close ben_plan_design_program_module.g_table_route ;
5116 --
5117 l_information5 := ben_plan_design_program_module.get_comp_lvl_fctr_name(l_ecl_rec.comp_lvl_fctr_id)
5118 || ben_plan_design_program_module.get_exclude_message(l_ecl_rec.excld_flag);
5119 --'Intersection';
5120 --
5121 if p_effective_date between l_ecl_rec.effective_start_date
5122 and l_ecl_rec.effective_end_date then
5123 --
5124 l_result_type_cd := 'DISPLAY';
5125 else
5126 l_result_type_cd := 'NO DISPLAY';
5127 end if;
5128 --
5129 l_copy_entity_result_id := null;
5130 l_object_version_number := null;
5131 ben_copy_entity_results_api.create_copy_entity_results(
5132 p_copy_entity_result_id => l_copy_entity_result_id,
5133 p_copy_entity_txn_id => p_copy_entity_txn_id,
5134 p_result_type_cd => l_result_type_cd,
5135 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
5136 p_parent_entity_result_id => l_mirror_src_entity_result_id,
5137 p_number_of_copies => l_number_of_copies,
5138 p_table_route_id => l_table_route_id,
5139 P_TABLE_ALIAS => 'ECL',
5140 p_information1 => l_ecl_rec.elig_comp_lvl_prte_id,
5141 p_information2 => l_ecl_rec.EFFECTIVE_START_DATE,
5142 p_information3 => l_ecl_rec.EFFECTIVE_END_DATE,
5143 p_information4 => l_ecl_rec.business_group_id,
5144 p_information5 => l_information5 , -- 9999 put name for h-grid
5145 p_information254 => l_ecl_rec.comp_lvl_fctr_id,
5146 p_information111 => l_ecl_rec.ecl_attribute1,
5147 p_information120 => l_ecl_rec.ecl_attribute10,
5148 p_information121 => l_ecl_rec.ecl_attribute11,
5149 p_information122 => l_ecl_rec.ecl_attribute12,
5150 p_information123 => l_ecl_rec.ecl_attribute13,
5151 p_information124 => l_ecl_rec.ecl_attribute14,
5152 p_information125 => l_ecl_rec.ecl_attribute15,
5153 p_information126 => l_ecl_rec.ecl_attribute16,
5154 p_information127 => l_ecl_rec.ecl_attribute17,
5155 p_information128 => l_ecl_rec.ecl_attribute18,
5156 p_information129 => l_ecl_rec.ecl_attribute19,
5157 p_information112 => l_ecl_rec.ecl_attribute2,
5158 p_information130 => l_ecl_rec.ecl_attribute20,
5159 p_information131 => l_ecl_rec.ecl_attribute21,
5160 p_information132 => l_ecl_rec.ecl_attribute22,
5161 p_information133 => l_ecl_rec.ecl_attribute23,
5162 p_information134 => l_ecl_rec.ecl_attribute24,
5163 p_information135 => l_ecl_rec.ecl_attribute25,
5164 p_information136 => l_ecl_rec.ecl_attribute26,
5165 p_information137 => l_ecl_rec.ecl_attribute27,
5166 p_information138 => l_ecl_rec.ecl_attribute28,
5167 p_information139 => l_ecl_rec.ecl_attribute29,
5168 p_information113 => l_ecl_rec.ecl_attribute3,
5169 p_information140 => l_ecl_rec.ecl_attribute30,
5170 p_information114 => l_ecl_rec.ecl_attribute4,
5171 p_information115 => l_ecl_rec.ecl_attribute5,
5172 p_information116 => l_ecl_rec.ecl_attribute6,
5173 p_information117 => l_ecl_rec.ecl_attribute7,
5174 p_information118 => l_ecl_rec.ecl_attribute8,
5175 p_information119 => l_ecl_rec.ecl_attribute9,
5176 p_information110 => l_ecl_rec.ecl_attribute_category,
5177 p_information263 => l_ecl_rec.eligy_prfl_id,
5178 p_information11 => l_ecl_rec.excld_flag,
5179 p_information260 => l_ecl_rec.ordr_num,
5180 p_information265 => l_ecl_rec.object_version_number,
5181 p_information295 => l_ecl_rec.criteria_score,
5182 p_information296 => l_ecl_rec.criteria_weight,
5183 --
5184
5185 -- END REPLACE PARAMETER LINES
5186
5187 p_object_version_number => l_object_version_number,
5188 p_effective_date => p_effective_date );
5189 --
5190
5191 if l_out_ecl_result_id is null then
5192 l_out_ecl_result_id := l_copy_entity_result_id;
5193 end if;
5194
5195 if l_result_type_cd = 'DISPLAY' then
5196 l_out_ecl_result_id := l_copy_entity_result_id ;
5197 end if;
5198 --
5199 end loop;
5200 --
5201 hr_utility.set_location('Before create_drpar_results '||p_copy_entity_txn_id,11);
5202 hr_utility.set_location(' l_out_ecl_result_id '||l_out_ecl_result_id,11);
5203 for l_ecl_rec in c_ecl_drp(l_parent_rec.elig_comp_lvl_prte_id,l_mirror_src_entity_result_id,'ECL' ) loop
5204 hr_utility.set_location(' l_ecl_rec.comp_lvl_fctr_id '||l_ecl_rec.comp_lvl_fctr_id,12);
5205 ben_pd_rate_and_cvg_module.create_drpar_results
5206 (
5207 p_validate => p_validate
5208 ,p_copy_entity_result_id => l_out_ecl_result_id
5209 ,p_copy_entity_txn_id => p_copy_entity_txn_id
5210 ,p_comp_lvl_fctr_id => l_ecl_rec.comp_lvl_fctr_id
5211 ,p_hrs_wkd_in_perd_fctr_id => null
5212 ,p_los_fctr_id => null
5213 ,p_pct_fl_tm_fctr_id => null
5214 ,p_age_fctr_id => null
5215 ,p_cmbn_age_los_fctr_id => null
5216 ,p_business_group_id => p_business_group_id
5217 ,p_number_of_copies => p_number_of_copies
5218 ,p_object_version_number => l_object_version_number
5219 ,p_effective_date => p_effective_date
5220 );
5221 end loop;
5222 end loop;
5223 ---------------------------------------------------------------
5224 -- END OF BEN_ELIG_COMP_LVL_PRTE_F ----------------------
5225 ---------------------------------------------------------------
5226 ---------------------------------------------------------------
5227 -- START OF BEN_ELIG_DPNT_CVRD_OTHR_PGM_F ----------------------
5228 ---------------------------------------------------------------
5229 --
5230 for l_parent_rec in c_edg_from_parent(l_ELIGY_PRFL_ID) loop
5231 --
5232 l_mirror_src_entity_result_id := l_out_elp_result_id ;
5233 --
5234 l_elig_dpnt_cvrd_othr_pgm_id := l_parent_rec.elig_dpnt_cvrd_othr_pgm_id ;
5235 --
5236 for l_edg_rec in c_edg(l_parent_rec.elig_dpnt_cvrd_othr_pgm_id,l_mirror_src_entity_result_id,'EDG' ) loop
5237 --
5238 l_table_route_id := null ;
5239 open ben_plan_design_program_module.g_table_route('EDG');
5240 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
5241 close ben_plan_design_program_module.g_table_route ;
5242 --
5243 l_information5 := ben_plan_design_program_module.get_pgm_name(l_edg_rec.pgm_id,p_effective_date)
5244 --
5245 -- Bug No: 3451872
5246 --
5247 || ' '
5248 || get_det_enrl_det_dt_name(l_edg_rec.ENRL_DET_DT_CD,'BEN_ENRL_DET_DT')
5249 || get_subj_to_cobra_message(l_edg_rec.ONLY_PLS_SUBJ_COBRA_FLAG)
5250 --
5251 || ben_plan_design_program_module.get_exclude_message(l_edg_rec.excld_flag);
5252 --'Intersection';
5253 --
5254 if p_effective_date between l_edg_rec.effective_start_date
5255 and l_edg_rec.effective_end_date then
5256 --
5257 l_result_type_cd := 'DISPLAY';
5258 else
5259 l_result_type_cd := 'NO DISPLAY';
5260 end if;
5261 --
5262 l_copy_entity_result_id := null;
5263 l_object_version_number := null;
5264 ben_copy_entity_results_api.create_copy_entity_results(
5265 p_copy_entity_result_id => l_copy_entity_result_id,
5266 p_copy_entity_txn_id => p_copy_entity_txn_id,
5267 p_result_type_cd => l_result_type_cd,
5268 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
5269 p_parent_entity_result_id => l_mirror_src_entity_result_id,
5270 p_number_of_copies => l_number_of_copies,
5271 p_table_route_id => l_table_route_id,
5272 P_TABLE_ALIAS => 'EDG',
5273 p_information1 => l_edg_rec.elig_dpnt_cvrd_othr_pgm_id,
5274 p_information2 => l_edg_rec.EFFECTIVE_START_DATE,
5275 p_information3 => l_edg_rec.EFFECTIVE_END_DATE,
5276 p_information4 => l_edg_rec.business_group_id,
5277 p_information5 => l_information5 , -- 9999 put name for h-grid
5278 p_INFORMATION111 => l_edg_rec.EDG_ATTRIBUTE1,
5279 p_INFORMATION120 => l_edg_rec.EDG_ATTRIBUTE10,
5280 p_INFORMATION121 => l_edg_rec.EDG_ATTRIBUTE11,
5281 p_INFORMATION122 => l_edg_rec.EDG_ATTRIBUTE12,
5282 p_INFORMATION123 => l_edg_rec.EDG_ATTRIBUTE13,
5283 p_INFORMATION124 => l_edg_rec.EDG_ATTRIBUTE14,
5284 p_INFORMATION125 => l_edg_rec.EDG_ATTRIBUTE15,
5285 p_INFORMATION126 => l_edg_rec.EDG_ATTRIBUTE16,
5286 p_INFORMATION127 => l_edg_rec.EDG_ATTRIBUTE17,
5287 p_INFORMATION128 => l_edg_rec.EDG_ATTRIBUTE18,
5288 p_INFORMATION129 => l_edg_rec.EDG_ATTRIBUTE19,
5289 p_INFORMATION112 => l_edg_rec.EDG_ATTRIBUTE2,
5290 p_INFORMATION130 => l_edg_rec.EDG_ATTRIBUTE20,
5291 p_INFORMATION131 => l_edg_rec.EDG_ATTRIBUTE21,
5292 p_INFORMATION132 => l_edg_rec.EDG_ATTRIBUTE22,
5293 p_INFORMATION133 => l_edg_rec.EDG_ATTRIBUTE23,
5294 p_INFORMATION134 => l_edg_rec.EDG_ATTRIBUTE24,
5295 p_INFORMATION135 => l_edg_rec.EDG_ATTRIBUTE25,
5296 p_INFORMATION136 => l_edg_rec.EDG_ATTRIBUTE26,
5297 p_INFORMATION137 => l_edg_rec.EDG_ATTRIBUTE27,
5298 p_INFORMATION138 => l_edg_rec.EDG_ATTRIBUTE28,
5299 p_INFORMATION139 => l_edg_rec.EDG_ATTRIBUTE29,
5300 p_INFORMATION113 => l_edg_rec.EDG_ATTRIBUTE3,
5301 p_INFORMATION140 => l_edg_rec.EDG_ATTRIBUTE30,
5302 p_INFORMATION114 => l_edg_rec.EDG_ATTRIBUTE4,
5303 p_INFORMATION115 => l_edg_rec.EDG_ATTRIBUTE5,
5304 p_INFORMATION116 => l_edg_rec.EDG_ATTRIBUTE6,
5305 p_INFORMATION117 => l_edg_rec.EDG_ATTRIBUTE7,
5306 p_INFORMATION118 => l_edg_rec.EDG_ATTRIBUTE8,
5307 p_INFORMATION119 => l_edg_rec.EDG_ATTRIBUTE9,
5308 p_INFORMATION110 => l_edg_rec.EDG_ATTRIBUTE_CATEGORY,
5309 p_INFORMATION263 => l_edg_rec.ELIGY_PRFL_ID,
5310 p_INFORMATION13 => l_edg_rec.ENRL_DET_DT_CD,
5311 p_INFORMATION11 => l_edg_rec.EXCLD_FLAG,
5312 p_INFORMATION12 => l_edg_rec.ONLY_PLS_SUBJ_COBRA_FLAG,
5313 p_INFORMATION261 => l_edg_rec.ORDR_NUM,
5314 p_INFORMATION260 => l_edg_rec.PGM_ID,
5315 p_information265 => l_edg_rec.object_version_number,
5316 p_object_version_number => l_object_version_number,
5317 p_effective_date => p_effective_date );
5318 --
5319
5320 if l_out_edg_result_id is null then
5321 l_out_edg_result_id := l_copy_entity_result_id;
5322 end if;
5323
5324 if l_result_type_cd = 'DISPLAY' then
5325 l_out_edg_result_id := l_copy_entity_result_id ;
5326 end if;
5327 --
5328 end loop;
5329 --
5330 end loop;
5331 ---------------------------------------------------------------
5332 -- END OF BEN_ELIG_DPNT_CVRD_OTHR_PGM_F ----------------------
5333 ---------------------------------------------------------------
5334 ---------------------------------------------------------------
5335 -- START OF BEN_ELIG_DPNT_CVRD_OTHR_PL_F ----------------------
5336 ---------------------------------------------------------------
5337 --
5338 for l_parent_rec in c_edp_from_parent(l_ELIGY_PRFL_ID) loop
5339 --
5340 l_mirror_src_entity_result_id := l_out_elp_result_id ;
5341 --
5342 l_elig_dpnt_cvrd_othr_pl_id := l_parent_rec.elig_dpnt_cvrd_othr_pl_id ;
5343 --
5344 for l_edp_rec in c_edp(l_parent_rec.elig_dpnt_cvrd_othr_pl_id,l_mirror_src_entity_result_id,'EDP') loop
5345 --
5346 l_table_route_id := null ;
5347 open ben_plan_design_program_module.g_table_route('EDP');
5348 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
5349 close ben_plan_design_program_module.g_table_route ;
5350 --
5351 l_information5 := ben_plan_design_program_module.get_pl_name(l_edp_rec.pl_id,p_effective_date)
5352 --
5353 -- Bug No: 3451872
5354 --
5355 || ' '
5356 || get_det_enrl_det_dt_name(l_edp_rec.CVG_DET_DT_CD,'BEN_CVG_DET_DT')
5357 --
5358 || ben_plan_design_program_module.get_exclude_message(l_edp_rec.excld_flag);
5359 --'Intersection';
5360 --
5361 if p_effective_date between l_edp_rec.effective_start_date
5362 and l_edp_rec.effective_end_date then
5363 --
5364 l_result_type_cd := 'DISPLAY';
5365 else
5366 l_result_type_cd := 'NO DISPLAY';
5367 end if;
5368 --
5369 l_copy_entity_result_id := null;
5370 l_object_version_number := null;
5371 ben_copy_entity_results_api.create_copy_entity_results(
5372 p_copy_entity_result_id => l_copy_entity_result_id,
5373 p_copy_entity_txn_id => p_copy_entity_txn_id,
5374 p_result_type_cd => l_result_type_cd,
5375 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
5376 p_parent_entity_result_id => l_mirror_src_entity_result_id,
5377 p_number_of_copies => l_number_of_copies,
5378 p_table_route_id => l_table_route_id,
5379 P_TABLE_ALIAS => 'EDP',
5380 p_information1 => l_edp_rec.elig_dpnt_cvrd_othr_pl_id,
5381 p_information2 => l_edp_rec.EFFECTIVE_START_DATE,
5382 p_information3 => l_edp_rec.EFFECTIVE_END_DATE,
5383 p_information4 => l_edp_rec.business_group_id,
5384 p_information5 => l_information5 , -- 9999 put name for h-grid
5385 p_INFORMATION12 => l_edp_rec.CVG_DET_DT_CD,
5386 p_INFORMATION111 => l_edp_rec.EDP_ATTRIBUTE1,
5387 p_INFORMATION120 => l_edp_rec.EDP_ATTRIBUTE10,
5388 p_INFORMATION121 => l_edp_rec.EDP_ATTRIBUTE11,
5389 p_INFORMATION122 => l_edp_rec.EDP_ATTRIBUTE12,
5390 p_INFORMATION123 => l_edp_rec.EDP_ATTRIBUTE13,
5391 p_INFORMATION124 => l_edp_rec.EDP_ATTRIBUTE14,
5392 p_INFORMATION125 => l_edp_rec.EDP_ATTRIBUTE15,
5393 p_INFORMATION126 => l_edp_rec.EDP_ATTRIBUTE16,
5394 p_INFORMATION127 => l_edp_rec.EDP_ATTRIBUTE17,
5395 p_INFORMATION128 => l_edp_rec.EDP_ATTRIBUTE18,
5396 p_INFORMATION129 => l_edp_rec.EDP_ATTRIBUTE19,
5397 p_INFORMATION112 => l_edp_rec.EDP_ATTRIBUTE2,
5398 p_INFORMATION130 => l_edp_rec.EDP_ATTRIBUTE20,
5399 p_INFORMATION131 => l_edp_rec.EDP_ATTRIBUTE21,
5400 p_INFORMATION132 => l_edp_rec.EDP_ATTRIBUTE22,
5401 p_INFORMATION133 => l_edp_rec.EDP_ATTRIBUTE23,
5402 p_INFORMATION134 => l_edp_rec.EDP_ATTRIBUTE24,
5403 p_INFORMATION135 => l_edp_rec.EDP_ATTRIBUTE25,
5404 p_INFORMATION136 => l_edp_rec.EDP_ATTRIBUTE26,
5405 p_INFORMATION137 => l_edp_rec.EDP_ATTRIBUTE27,
5406 p_INFORMATION138 => l_edp_rec.EDP_ATTRIBUTE28,
5407 p_INFORMATION139 => l_edp_rec.EDP_ATTRIBUTE29,
5408 p_INFORMATION113 => l_edp_rec.EDP_ATTRIBUTE3,
5409 p_INFORMATION140 => l_edp_rec.EDP_ATTRIBUTE30,
5410 p_INFORMATION114 => l_edp_rec.EDP_ATTRIBUTE4,
5411 p_INFORMATION115 => l_edp_rec.EDP_ATTRIBUTE5,
5412 p_INFORMATION116 => l_edp_rec.EDP_ATTRIBUTE6,
5413 p_INFORMATION117 => l_edp_rec.EDP_ATTRIBUTE7,
5414 p_INFORMATION118 => l_edp_rec.EDP_ATTRIBUTE8,
5415 p_INFORMATION119 => l_edp_rec.EDP_ATTRIBUTE9,
5416 p_INFORMATION110 => l_edp_rec.EDP_ATTRIBUTE_CATEGORY,
5417 p_INFORMATION263 => l_edp_rec.ELIGY_PRFL_ID,
5418 p_INFORMATION11 => l_edp_rec.EXCLD_FLAG,
5419 p_INFORMATION260 => l_edp_rec.ORDR_NUM,
5420 p_INFORMATION261 => l_edp_rec.PL_ID,
5421 p_information265 => l_edp_rec.object_version_number,
5422 p_object_version_number => l_object_version_number,
5423 p_effective_date => p_effective_date );
5424 --
5425
5426 if l_out_edp_result_id is null then
5427 l_out_edp_result_id := l_copy_entity_result_id;
5428 end if;
5429
5430 if l_result_type_cd = 'DISPLAY' then
5431 l_out_edp_result_id := l_copy_entity_result_id ;
5432 end if;
5433 --
5434 end loop;
5435 --
5436 end loop;
5437 ---------------------------------------------------------------
5438 -- END OF BEN_ELIG_DPNT_CVRD_OTHR_PL_F ----------------------
5439 ---------------------------------------------------------------
5440 ---------------------------------------------------------------
5441 -- START OF BEN_ELIG_DPNT_CVRD_OTHR_PTIP_F ----------------------
5442 ---------------------------------------------------------------
5443 --
5444 for l_parent_rec in c_edt_from_parent(l_ELIGY_PRFL_ID) loop
5445 --
5446 l_mirror_src_entity_result_id := l_out_elp_result_id ;
5447 --
5448 l_elig_dpnt_cvrd_othr_ptip_id := l_parent_rec.elig_dpnt_cvrd_othr_ptip_id ;
5449 --
5450 for l_edt_rec in c_edt(l_parent_rec.elig_dpnt_cvrd_othr_ptip_id,l_mirror_src_entity_result_id,'EDT' ) loop
5451 --
5452 l_table_route_id := null ;
5453 open ben_plan_design_program_module.g_table_route('EDT');
5454 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
5455 close ben_plan_design_program_module.g_table_route ;
5456 --
5457 l_information5 := ben_plan_design_program_module.get_ptip_name(l_edt_rec.ptip_id,p_effective_date)
5458 --
5459 -- Bug No: 3451872
5460 --
5461 || ' '
5462 || get_det_enrl_det_dt_name(l_edt_rec.ENRL_DET_DT_CD,'BEN_ENRL_DET_DT')
5463 || get_subj_to_cobra_message(l_edt_rec.ONLY_PLS_SUBJ_COBRA_FLAG)
5464 --
5465 || ben_plan_design_program_module.get_exclude_message(l_edt_rec.excld_flag);
5466 --'Intersection';
5467 --
5468 if p_effective_date between l_edt_rec.effective_start_date
5469 and l_edt_rec.effective_end_date then
5470 --
5471 l_result_type_cd := 'DISPLAY';
5472 else
5473 l_result_type_cd := 'NO DISPLAY';
5474 end if;
5475 --
5476 l_copy_entity_result_id := null;
5477 l_object_version_number := null;
5478 ben_copy_entity_results_api.create_copy_entity_results(
5479 p_copy_entity_result_id => l_copy_entity_result_id,
5480 p_copy_entity_txn_id => p_copy_entity_txn_id,
5481 p_result_type_cd => l_result_type_cd,
5482 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
5483 p_parent_entity_result_id => l_mirror_src_entity_result_id,
5484 p_number_of_copies => l_number_of_copies,
5485 p_table_route_id => l_table_route_id,
5486 P_TABLE_ALIAS => 'EDT',
5487 p_information1 => l_edt_rec.elig_dpnt_cvrd_othr_ptip_id,
5488 p_information2 => l_edt_rec.EFFECTIVE_START_DATE,
5489 p_information3 => l_edt_rec.EFFECTIVE_END_DATE,
5490 p_information4 => l_edt_rec.business_group_id,
5491 p_information5 => l_information5 , -- 9999 put name for h-grid
5492 p_INFORMATION111 => l_edt_rec.EDT_ATTRIBUTE1,
5493 p_INFORMATION120 => l_edt_rec.EDT_ATTRIBUTE10,
5494 p_INFORMATION121 => l_edt_rec.EDT_ATTRIBUTE11,
5495 p_INFORMATION122 => l_edt_rec.EDT_ATTRIBUTE12,
5496 p_INFORMATION123 => l_edt_rec.EDT_ATTRIBUTE13,
5497 p_INFORMATION124 => l_edt_rec.EDT_ATTRIBUTE14,
5498 p_INFORMATION125 => l_edt_rec.EDT_ATTRIBUTE15,
5499 p_INFORMATION126 => l_edt_rec.EDT_ATTRIBUTE16,
5500 p_INFORMATION127 => l_edt_rec.EDT_ATTRIBUTE17,
5501 p_INFORMATION128 => l_edt_rec.EDT_ATTRIBUTE18,
5502 p_INFORMATION129 => l_edt_rec.EDT_ATTRIBUTE19,
5503 p_INFORMATION112 => l_edt_rec.EDT_ATTRIBUTE2,
5504 p_INFORMATION130 => l_edt_rec.EDT_ATTRIBUTE20,
5505 p_INFORMATION131 => l_edt_rec.EDT_ATTRIBUTE21,
5506 p_INFORMATION132 => l_edt_rec.EDT_ATTRIBUTE22,
5507 p_INFORMATION133 => l_edt_rec.EDT_ATTRIBUTE23,
5508 p_INFORMATION134 => l_edt_rec.EDT_ATTRIBUTE24,
5509 p_INFORMATION135 => l_edt_rec.EDT_ATTRIBUTE25,
5510 p_INFORMATION136 => l_edt_rec.EDT_ATTRIBUTE26,
5511 p_INFORMATION137 => l_edt_rec.EDT_ATTRIBUTE27,
5512 p_INFORMATION138 => l_edt_rec.EDT_ATTRIBUTE28,
5513 p_INFORMATION139 => l_edt_rec.EDT_ATTRIBUTE29,
5514 p_INFORMATION113 => l_edt_rec.EDT_ATTRIBUTE3,
5515 p_INFORMATION140 => l_edt_rec.EDT_ATTRIBUTE30,
5516 p_INFORMATION114 => l_edt_rec.EDT_ATTRIBUTE4,
5517 p_INFORMATION115 => l_edt_rec.EDT_ATTRIBUTE5,
5518 p_INFORMATION116 => l_edt_rec.EDT_ATTRIBUTE6,
5519 p_INFORMATION117 => l_edt_rec.EDT_ATTRIBUTE7,
5520 p_INFORMATION118 => l_edt_rec.EDT_ATTRIBUTE8,
5521 p_INFORMATION119 => l_edt_rec.EDT_ATTRIBUTE9,
5522 p_INFORMATION110 => l_edt_rec.EDT_ATTRIBUTE_CATEGORY,
5523 p_INFORMATION263 => l_edt_rec.ELIGY_PRFL_ID,
5524 p_INFORMATION13 => l_edt_rec.ENRL_DET_DT_CD,
5525 p_INFORMATION11 => l_edt_rec.EXCLD_FLAG,
5526 p_INFORMATION12 => l_edt_rec.ONLY_PLS_SUBJ_COBRA_FLAG,
5527 p_INFORMATION261 => l_edt_rec.ORDR_NUM,
5528 p_INFORMATION259 => l_edt_rec.PTIP_ID,
5529 p_information265 => l_edt_rec.object_version_number,
5530 p_object_version_number => l_object_version_number,
5531 p_effective_date => p_effective_date );
5532 --
5533
5534 if l_out_edt_result_id is null then
5535 l_out_edt_result_id := l_copy_entity_result_id;
5536 end if;
5537
5538 if l_result_type_cd = 'DISPLAY' then
5539 l_out_edt_result_id := l_copy_entity_result_id ;
5540 end if;
5541 --
5542 end loop;
5543 --
5544 end loop;
5545 ---------------------------------------------------------------
5546 -- END OF BEN_ELIG_DPNT_CVRD_OTHR_PTIP_F ----------------------
5547 ---------------------------------------------------------------
5548 ---------------------------------------------------------------
5549 -- START OF BEN_ELIG_DPNT_CVRD_PLIP_F ----------------------
5550 ---------------------------------------------------------------
5551 --
5552 for l_parent_rec in c_edi_from_parent(l_ELIGY_PRFL_ID) loop
5553 --
5554 l_mirror_src_entity_result_id := l_out_elp_result_id ;
5555 --
5556 l_elig_dpnt_cvrd_plip_id := l_parent_rec.elig_dpnt_cvrd_plip_id ;
5557 --
5558 for l_edi_rec in c_edi(l_parent_rec.elig_dpnt_cvrd_plip_id,l_mirror_src_entity_result_id,'EDI' ) loop
5559 --
5560 l_table_route_id := null ;
5561 open ben_plan_design_program_module.g_table_route('EDI');
5562 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
5563 close ben_plan_design_program_module.g_table_route ;
5564 --
5565 l_information5 := ben_plan_design_program_module.get_plip_name(l_edi_rec.plip_id,p_effective_date)
5566 --
5567 -- Bug No: 3451872
5568 --
5569 || ' '
5570 || get_det_enrl_det_dt_name(l_edi_rec.ENRL_DET_DT_CD,'BEN_ENRL_DET_DT')
5571 --
5572 || ben_plan_design_program_module.get_exclude_message(l_edi_rec.excld_flag);
5573 --'Intersection';
5574 --
5575 if p_effective_date between l_edi_rec.effective_start_date
5576 and l_edi_rec.effective_end_date then
5577 --
5578 l_result_type_cd := 'DISPLAY';
5579 else
5580 l_result_type_cd := 'NO DISPLAY';
5581 end if;
5582 --
5583 l_copy_entity_result_id := null;
5584 l_object_version_number := null;
5585 ben_copy_entity_results_api.create_copy_entity_results(
5586 p_copy_entity_result_id => l_copy_entity_result_id,
5587 p_copy_entity_txn_id => p_copy_entity_txn_id,
5588 p_result_type_cd => l_result_type_cd,
5589 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
5590 p_parent_entity_result_id => l_mirror_src_entity_result_id,
5591 p_number_of_copies => l_number_of_copies,
5592 p_table_route_id => l_table_route_id,
5593 P_TABLE_ALIAS => 'EDI',
5594 p_information1 => l_edi_rec.elig_dpnt_cvrd_plip_id,
5595 p_information2 => l_edi_rec.EFFECTIVE_START_DATE,
5596 p_information3 => l_edi_rec.EFFECTIVE_END_DATE,
5597 p_information4 => l_edi_rec.business_group_id,
5598 p_information5 => l_information5 , -- 9999 put name for h-grid
5599 p_INFORMATION111 => l_edi_rec.EDI_ATTRIBUTE1,
5600 p_INFORMATION120 => l_edi_rec.EDI_ATTRIBUTE10,
5601 p_INFORMATION121 => l_edi_rec.EDI_ATTRIBUTE11,
5602 p_INFORMATION122 => l_edi_rec.EDI_ATTRIBUTE12,
5603 p_INFORMATION123 => l_edi_rec.EDI_ATTRIBUTE13,
5604 p_INFORMATION124 => l_edi_rec.EDI_ATTRIBUTE14,
5605 p_INFORMATION125 => l_edi_rec.EDI_ATTRIBUTE15,
5606 p_INFORMATION126 => l_edi_rec.EDI_ATTRIBUTE16,
5607 p_INFORMATION127 => l_edi_rec.EDI_ATTRIBUTE17,
5608 p_INFORMATION128 => l_edi_rec.EDI_ATTRIBUTE18,
5609 p_INFORMATION129 => l_edi_rec.EDI_ATTRIBUTE19,
5610 p_INFORMATION112 => l_edi_rec.EDI_ATTRIBUTE2,
5611 p_INFORMATION130 => l_edi_rec.EDI_ATTRIBUTE20,
5612 p_INFORMATION131 => l_edi_rec.EDI_ATTRIBUTE21,
5613 p_INFORMATION132 => l_edi_rec.EDI_ATTRIBUTE22,
5614 p_INFORMATION133 => l_edi_rec.EDI_ATTRIBUTE23,
5615 p_INFORMATION134 => l_edi_rec.EDI_ATTRIBUTE24,
5616 p_INFORMATION135 => l_edi_rec.EDI_ATTRIBUTE25,
5617 p_INFORMATION136 => l_edi_rec.EDI_ATTRIBUTE26,
5618 p_INFORMATION137 => l_edi_rec.EDI_ATTRIBUTE27,
5619 p_INFORMATION138 => l_edi_rec.EDI_ATTRIBUTE28,
5620 p_INFORMATION139 => l_edi_rec.EDI_ATTRIBUTE29,
5621 p_INFORMATION113 => l_edi_rec.EDI_ATTRIBUTE3,
5622 p_INFORMATION140 => l_edi_rec.EDI_ATTRIBUTE30,
5623 p_INFORMATION114 => l_edi_rec.EDI_ATTRIBUTE4,
5624 p_INFORMATION115 => l_edi_rec.EDI_ATTRIBUTE5,
5625 p_INFORMATION116 => l_edi_rec.EDI_ATTRIBUTE6,
5626 p_INFORMATION117 => l_edi_rec.EDI_ATTRIBUTE7,
5627 p_INFORMATION118 => l_edi_rec.EDI_ATTRIBUTE8,
5628 p_INFORMATION119 => l_edi_rec.EDI_ATTRIBUTE9,
5629 p_INFORMATION110 => l_edi_rec.EDI_ATTRIBUTE_CATEGORY,
5630 p_INFORMATION263 => l_edi_rec.ELIGY_PRFL_ID,
5631 p_INFORMATION11 => l_edi_rec.ENRL_DET_DT_CD,
5632 p_INFORMATION12 => l_edi_rec.EXCLD_FLAG,
5633 p_INFORMATION260 => l_edi_rec.ORDR_NUM,
5634 p_INFORMATION256 => l_edi_rec.PLIP_ID,
5635 p_information265 => l_edi_rec.object_version_number,
5636 p_object_version_number => l_object_version_number,
5637 p_effective_date => p_effective_date );
5638 --
5639
5640 if l_out_edi_result_id is null then
5641 l_out_edi_result_id := l_copy_entity_result_id;
5642 end if;
5643
5644 if l_result_type_cd = 'DISPLAY' then
5645 l_out_edi_result_id := l_copy_entity_result_id ;
5646 end if;
5647 --
5648 end loop;
5649 --
5650 end loop;
5651 ---------------------------------------------------------------
5652 -- END OF BEN_ELIG_DPNT_CVRD_PLIP_F ----------------------
5653 ---------------------------------------------------------------
5654 ---------------------------------------------------------------
5655 -- START OF BEN_ELIG_DPNT_OTHR_PTIP_F ----------------------
5656 ---------------------------------------------------------------
5657 --
5658 for l_parent_rec in c_etd_from_parent(l_ELIGY_PRFL_ID) loop
5659 --
5660 l_mirror_src_entity_result_id := l_out_elp_result_id ;
5661 --
5662 l_elig_dpnt_othr_ptip_id := l_parent_rec.elig_dpnt_othr_ptip_id ;
5663 --
5664 for l_etd_rec in c_etd(l_parent_rec.elig_dpnt_othr_ptip_id,l_mirror_src_entity_result_id,'ETD' ) loop
5665 --
5666 l_table_route_id := null ;
5667 open ben_plan_design_program_module.g_table_route('ETD');
5668 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
5669 close ben_plan_design_program_module.g_table_route ;
5670 --
5671 l_information5 := ben_plan_design_program_module.get_ptip_name(l_etd_rec.ptip_id,p_effective_date)
5672 || ben_plan_design_program_module.get_exclude_message(l_etd_rec.excld_flag);
5673 --'Intersection';
5674 --
5675 if p_effective_date between l_etd_rec.effective_start_date
5676 and l_etd_rec.effective_end_date then
5677 --
5678 l_result_type_cd := 'DISPLAY';
5679 else
5680 l_result_type_cd := 'NO DISPLAY';
5681 end if;
5682 --
5683 l_copy_entity_result_id := null;
5684 l_object_version_number := null;
5685 ben_copy_entity_results_api.create_copy_entity_results(
5686 p_copy_entity_result_id => l_copy_entity_result_id,
5687 p_copy_entity_txn_id => p_copy_entity_txn_id,
5688 p_result_type_cd => l_result_type_cd,
5689 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
5690 p_parent_entity_result_id => l_mirror_src_entity_result_id,
5691 p_number_of_copies => l_number_of_copies,
5692 p_table_route_id => l_table_route_id,
5693 P_TABLE_ALIAS => 'ETD',
5694 p_information1 => l_etd_rec.elig_dpnt_othr_ptip_id,
5695 p_information2 => l_etd_rec.EFFECTIVE_START_DATE,
5696 p_information3 => l_etd_rec.EFFECTIVE_END_DATE,
5697 p_information4 => l_etd_rec.business_group_id,
5698 p_information5 => l_information5 , -- 9999 put name for h-grid
5699 p_INFORMATION263 => l_etd_rec.ELIGY_PRFL_ID,
5700 p_INFORMATION111 => l_etd_rec.ETD_ATTRIBUTE1,
5701 p_INFORMATION120 => l_etd_rec.ETD_ATTRIBUTE10,
5702 p_INFORMATION121 => l_etd_rec.ETD_ATTRIBUTE11,
5703 p_INFORMATION122 => l_etd_rec.ETD_ATTRIBUTE12,
5704 p_INFORMATION123 => l_etd_rec.ETD_ATTRIBUTE13,
5705 p_INFORMATION124 => l_etd_rec.ETD_ATTRIBUTE14,
5706 p_INFORMATION125 => l_etd_rec.ETD_ATTRIBUTE15,
5707 p_INFORMATION126 => l_etd_rec.ETD_ATTRIBUTE16,
5708 p_INFORMATION127 => l_etd_rec.ETD_ATTRIBUTE17,
5709 p_INFORMATION128 => l_etd_rec.ETD_ATTRIBUTE18,
5710 p_INFORMATION129 => l_etd_rec.ETD_ATTRIBUTE19,
5711 p_INFORMATION112 => l_etd_rec.ETD_ATTRIBUTE2,
5712 p_INFORMATION130 => l_etd_rec.ETD_ATTRIBUTE20,
5713 p_INFORMATION131 => l_etd_rec.ETD_ATTRIBUTE21,
5714 p_INFORMATION132 => l_etd_rec.ETD_ATTRIBUTE22,
5715 p_INFORMATION133 => l_etd_rec.ETD_ATTRIBUTE23,
5716 p_INFORMATION134 => l_etd_rec.ETD_ATTRIBUTE24,
5717 p_INFORMATION135 => l_etd_rec.ETD_ATTRIBUTE25,
5718 p_INFORMATION136 => l_etd_rec.ETD_ATTRIBUTE26,
5719 p_INFORMATION137 => l_etd_rec.ETD_ATTRIBUTE27,
5720 p_INFORMATION138 => l_etd_rec.ETD_ATTRIBUTE28,
5721 p_INFORMATION139 => l_etd_rec.ETD_ATTRIBUTE29,
5722 p_INFORMATION113 => l_etd_rec.ETD_ATTRIBUTE3,
5723 p_INFORMATION140 => l_etd_rec.ETD_ATTRIBUTE30,
5724 p_INFORMATION114 => l_etd_rec.ETD_ATTRIBUTE4,
5725 p_INFORMATION115 => l_etd_rec.ETD_ATTRIBUTE5,
5726 p_INFORMATION116 => l_etd_rec.ETD_ATTRIBUTE6,
5727 p_INFORMATION117 => l_etd_rec.ETD_ATTRIBUTE7,
5728 p_INFORMATION118 => l_etd_rec.ETD_ATTRIBUTE8,
5729 p_INFORMATION119 => l_etd_rec.ETD_ATTRIBUTE9,
5730 p_INFORMATION110 => l_etd_rec.ETD_ATTRIBUTE_CATEGORY,
5731 p_INFORMATION11 => l_etd_rec.EXCLD_FLAG,
5732 p_INFORMATION257 => l_etd_rec.ORDR_NUM,
5733 p_INFORMATION259 => l_etd_rec.PTIP_ID,
5734 p_information265 => l_etd_rec.object_version_number,
5735 p_object_version_number => l_object_version_number,
5736 p_effective_date => p_effective_date );
5737 --
5738
5739 if l_out_etd_result_id is null then
5740 l_out_etd_result_id := l_copy_entity_result_id;
5741 end if;
5742
5743 if l_result_type_cd = 'DISPLAY' then
5744 l_out_etd_result_id := l_copy_entity_result_id ;
5745 end if;
5746 --
5747 end loop;
5748 --
5749 end loop;
5750 ---------------------------------------------------------------
5751 -- END OF BEN_ELIG_DPNT_OTHR_PTIP_F ----------------------
5752 ---------------------------------------------------------------
5753 ---------------------------------------------------------------
5754 -- START OF BEN_ELIG_DSBLD_STAT_PRTE_F ----------------------
5755 ---------------------------------------------------------------
5756 --
5757 for l_parent_rec in c_eds_from_parent(l_ELIGY_PRFL_ID) loop
5758 --
5759 l_mirror_src_entity_result_id := l_out_elp_result_id ;
5760 --
5761 l_elig_dsbld_stat_prte_id := l_parent_rec.elig_dsbld_stat_prte_id ;
5762 --
5763 for l_eds_rec in c_eds(l_parent_rec.elig_dsbld_stat_prte_id,l_mirror_src_entity_result_id,'EDS') loop
5764 --
5765 l_table_route_id := null ;
5766 open ben_plan_design_program_module.g_table_route('EDS');
5767 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
5768 close ben_plan_design_program_module.g_table_route ;
5769 --
5770 l_information5 := hr_general.decode_lookup('REGISTERED_DISABLED',l_eds_rec.dsbld_cd)
5771 || ben_plan_design_program_module.get_exclude_message(l_eds_rec.excld_flag);
5772 --'Intersection';
5773 --
5774 if p_effective_date between l_eds_rec.effective_start_date
5775 and l_eds_rec.effective_end_date then
5776 --
5777 l_result_type_cd := 'DISPLAY';
5778 else
5779 l_result_type_cd := 'NO DISPLAY';
5780 end if;
5781 --
5782 l_copy_entity_result_id := null;
5783 l_object_version_number := null;
5784 ben_copy_entity_results_api.create_copy_entity_results(
5785 p_copy_entity_result_id => l_copy_entity_result_id,
5786 p_copy_entity_txn_id => p_copy_entity_txn_id,
5787 p_result_type_cd => l_result_type_cd,
5788 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
5789 p_parent_entity_result_id => l_mirror_src_entity_result_id,
5790 p_number_of_copies => l_number_of_copies,
5791 p_table_route_id => l_table_route_id,
5792 P_TABLE_ALIAS => 'EDS',
5793 p_information1 => l_eds_rec.elig_dsbld_stat_prte_id,
5794 p_information2 => l_eds_rec.EFFECTIVE_START_DATE,
5795 p_information3 => l_eds_rec.EFFECTIVE_END_DATE,
5796 p_information4 => l_eds_rec.business_group_id,
5797 p_information5 => l_information5 , -- 9999 put name for h-grid
5798 p_information11 => l_eds_rec.dsbld_cd,
5799 p_information111 => l_eds_rec.eds_attribute1,
5800 p_information120 => l_eds_rec.eds_attribute10,
5801 p_information121 => l_eds_rec.eds_attribute11,
5802 p_information122 => l_eds_rec.eds_attribute12,
5803 p_information123 => l_eds_rec.eds_attribute13,
5804 p_information124 => l_eds_rec.eds_attribute14,
5805 p_information125 => l_eds_rec.eds_attribute15,
5806 p_information126 => l_eds_rec.eds_attribute16,
5807 p_information127 => l_eds_rec.eds_attribute17,
5808 p_information128 => l_eds_rec.eds_attribute18,
5809 p_information129 => l_eds_rec.eds_attribute19,
5810 p_information112 => l_eds_rec.eds_attribute2,
5811 p_information130 => l_eds_rec.eds_attribute20,
5812 p_information131 => l_eds_rec.eds_attribute21,
5813 p_information132 => l_eds_rec.eds_attribute22,
5814 p_information133 => l_eds_rec.eds_attribute23,
5815 p_information134 => l_eds_rec.eds_attribute24,
5816 p_information135 => l_eds_rec.eds_attribute25,
5817 p_information136 => l_eds_rec.eds_attribute26,
5818 p_information137 => l_eds_rec.eds_attribute27,
5819 p_information138 => l_eds_rec.eds_attribute28,
5820 p_information139 => l_eds_rec.eds_attribute29,
5821 p_information113 => l_eds_rec.eds_attribute3,
5822 p_information140 => l_eds_rec.eds_attribute30,
5823 p_information114 => l_eds_rec.eds_attribute4,
5824 p_information115 => l_eds_rec.eds_attribute5,
5825 p_information116 => l_eds_rec.eds_attribute6,
5826 p_information117 => l_eds_rec.eds_attribute7,
5827 p_information118 => l_eds_rec.eds_attribute8,
5828 p_information119 => l_eds_rec.eds_attribute9,
5829 p_information110 => l_eds_rec.eds_attribute_category,
5830 p_information263 => l_eds_rec.eligy_prfl_id,
5831 p_information12 => l_eds_rec.excld_flag,
5832 p_information260 => l_eds_rec.ordr_num,
5833 p_information265 => l_eds_rec.object_version_number,
5834 --
5835
5836 -- END REPLACE PARAMETER LINES
5837
5838 p_object_version_number => l_object_version_number,
5839 p_effective_date => p_effective_date );
5840
5841 --
5842
5843 if l_out_eds_result_id is null then
5844 l_out_eds_result_id := l_copy_entity_result_id;
5845 end if;
5846
5847 if l_result_type_cd = 'DISPLAY' then
5848 l_out_eds_result_id := l_copy_entity_result_id ;
5849 end if;
5850 --
5851 end loop;
5852 --
5853 end loop;
5854 ---------------------------------------------------------------
5855 -- END OF BEN_ELIG_DSBLD_STAT_PRTE_F ----------------------
5856 ---------------------------------------------------------------
5857 ---------------------------------------------------------------
5858 -- START OF BEN_ELIG_EE_STAT_PRTE_F ----------------------
5859 ---------------------------------------------------------------
5860 --
5861 for l_parent_rec in c_ees_from_parent(l_ELIGY_PRFL_ID) loop
5862 --
5863 l_mirror_src_entity_result_id := l_out_elp_result_id ;
5864 --
5865 l_elig_ee_stat_prte_id := l_parent_rec.elig_ee_stat_prte_id ;
5866 --
5867 for l_ees_rec in c_ees(l_parent_rec.elig_ee_stat_prte_id,l_mirror_src_entity_result_id,'EES' ) loop
5868 --
5869 l_table_route_id := null ;
5870 open ben_plan_design_program_module.g_table_route('EES');
5871 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
5872 close ben_plan_design_program_module.g_table_route ;
5873 --
5874 l_information5 := ben_plan_design_program_module.get_assignment_sts_type_name(l_ees_rec.assignment_status_type_id)
5875 || ben_plan_design_program_module.get_exclude_message(l_ees_rec.excld_flag);
5876 --'Intersection';
5877 --
5878 if p_effective_date between l_ees_rec.effective_start_date
5879 and l_ees_rec.effective_end_date then
5880 --
5881 l_result_type_cd := 'DISPLAY';
5882 else
5883 l_result_type_cd := 'NO DISPLAY';
5884 end if;
5885 --
5886 l_copy_entity_result_id := null;
5887 l_object_version_number := null;
5888 --
5889 -- pabodla : MAPPING DATA : Store the mapping column information.
5890 --
5891
5892 l_mapping_name := null;
5893 l_mapping_id := null;
5894 --
5895 -- Get the defined balance name to display on mapping page.
5896 --
5897 open c_get_mapping_name1(l_ees_rec.assignment_status_type_id);
5898 fetch c_get_mapping_name1 into l_mapping_name;
5899 close c_get_mapping_name1;
5900 --
5901 l_mapping_id := l_ees_rec.assignment_status_type_id;
5902 --
5903 --To set user friendly labels on the mapping page
5904 --
5905 l_mapping_column_name1 := null;
5906 l_mapping_column_name2 :=null;
5907 BEN_PLAN_DESIGN_TXNS_API.get_mapping_column_name(l_table_route_id,
5908 l_mapping_column_name1,
5909 l_mapping_column_name2,
5910 p_copy_entity_txn_id);
5911 --
5912 ben_copy_entity_results_api.create_copy_entity_results(
5913 p_copy_entity_result_id => l_copy_entity_result_id,
5914 p_copy_entity_txn_id => p_copy_entity_txn_id,
5915 p_result_type_cd => l_result_type_cd,
5916 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
5917 p_parent_entity_result_id => l_mirror_src_entity_result_id,
5918 p_number_of_copies => l_number_of_copies,
5919 p_table_route_id => l_table_route_id,
5920 P_TABLE_ALIAS => 'EES',
5921 p_information1 => l_ees_rec.elig_ee_stat_prte_id,
5922 p_information2 => l_ees_rec.EFFECTIVE_START_DATE,
5923 p_information3 => l_ees_rec.EFFECTIVE_END_DATE,
5924 p_information4 => l_ees_rec.business_group_id,
5925 p_information5 => l_information5 , -- 9999 put name for h-grid
5926 -- Data for MAPPING columns.
5927 p_information173 => l_mapping_name,
5928 p_information174 => l_mapping_id,
5929 p_information181 => l_mapping_column_name1,
5930 p_information182 => l_mapping_column_name2,
5931 -- END other product Mapping columns.
5932 p_information111 => l_ees_rec.ees_attribute1,
5933 p_information120 => l_ees_rec.ees_attribute10,
5934 p_information121 => l_ees_rec.ees_attribute11,
5935 p_information122 => l_ees_rec.ees_attribute12,
5936 p_information123 => l_ees_rec.ees_attribute13,
5937 p_information124 => l_ees_rec.ees_attribute14,
5938 p_information125 => l_ees_rec.ees_attribute15,
5939 p_information126 => l_ees_rec.ees_attribute16,
5940 p_information127 => l_ees_rec.ees_attribute17,
5941 p_information128 => l_ees_rec.ees_attribute18,
5942 p_information129 => l_ees_rec.ees_attribute19,
5943 p_information112 => l_ees_rec.ees_attribute2,
5944 p_information130 => l_ees_rec.ees_attribute20,
5945 p_information131 => l_ees_rec.ees_attribute21,
5946 p_information132 => l_ees_rec.ees_attribute22,
5947 p_information133 => l_ees_rec.ees_attribute23,
5948 p_information134 => l_ees_rec.ees_attribute24,
5949 p_information135 => l_ees_rec.ees_attribute25,
5950 p_information136 => l_ees_rec.ees_attribute26,
5951 p_information137 => l_ees_rec.ees_attribute27,
5952 p_information138 => l_ees_rec.ees_attribute28,
5953 p_information139 => l_ees_rec.ees_attribute29,
5954 p_information113 => l_ees_rec.ees_attribute3,
5955 p_information140 => l_ees_rec.ees_attribute30,
5956 p_information114 => l_ees_rec.ees_attribute4,
5957 p_information115 => l_ees_rec.ees_attribute5,
5958 p_information116 => l_ees_rec.ees_attribute6,
5959 p_information117 => l_ees_rec.ees_attribute7,
5960 p_information118 => l_ees_rec.ees_attribute8,
5961 p_information119 => l_ees_rec.ees_attribute9,
5962 p_information110 => l_ees_rec.ees_attribute_category,
5963 p_information263 => l_ees_rec.eligy_prfl_id,
5964 p_information11 => l_ees_rec.excld_flag,
5965 p_information260 => l_ees_rec.ordr_num,
5966 p_information166 => NULL, -- No ESD for Assignment Status
5967 p_information265 => l_ees_rec.object_version_number,
5968 p_information295 => l_ees_rec.criteria_score,
5969 p_information296 => l_ees_rec.criteria_weight,
5970 --
5971
5972 -- END REPLACE PARAMETER LINES
5973
5974 p_object_version_number => l_object_version_number,
5975 p_effective_date => p_effective_date );
5976 --
5977
5978 if l_out_ees_result_id is null then
5979 l_out_ees_result_id := l_copy_entity_result_id;
5980 end if;
5981
5982 if l_result_type_cd = 'DISPLAY' then
5983 l_out_ees_result_id := l_copy_entity_result_id ;
5984 end if;
5985 --
5986 end loop;
5987 --
5988 end loop;
5989 ---------------------------------------------------------------
5990 -- END OF BEN_ELIG_EE_STAT_PRTE_F ----------------------
5991 ---------------------------------------------------------------
5992 ---------------------------------------------------------------
5993 -- START OF BEN_ELIG_ENRLD_ANTHR_OIPL_F ----------------------
5994 ---------------------------------------------------------------
5995 --
5996 for l_parent_rec in c_eei_from_parent(l_ELIGY_PRFL_ID) loop
5997 --
5998 l_mirror_src_entity_result_id := l_out_elp_result_id ;
5999 --
6000 l_elig_enrld_anthr_oipl_id := l_parent_rec.elig_enrld_anthr_oipl_id ;
6001 --
6002 for l_eei_rec in c_eei(l_parent_rec.elig_enrld_anthr_oipl_id,l_mirror_src_entity_result_id,'EEI' ) loop
6003 --
6004 l_table_route_id := null ;
6005 open ben_plan_design_program_module.g_table_route('EEI');
6006 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
6007 close ben_plan_design_program_module.g_table_route ;
6008 --
6009 l_information5 := ben_plan_design_program_module.get_oipl_name(l_eei_rec.oipl_id,p_effective_date)
6010 --
6011 -- Bug No: 3451872
6012 --
6013 || ' '
6014 || get_det_enrl_det_dt_name(l_eei_rec.enrl_det_dt_cd,'BEN_ENRL_DET_DT')
6015 --
6016 || ben_plan_design_program_module.get_exclude_message(l_eei_rec.excld_flag);
6017 --'Intersection';
6018 --
6019 if p_effective_date between l_eei_rec.effective_start_date
6020 and l_eei_rec.effective_end_date then
6021 --
6022 l_result_type_cd := 'DISPLAY';
6023 else
6024 l_result_type_cd := 'NO DISPLAY';
6025 end if;
6026 --
6027 l_copy_entity_result_id := null;
6028 l_object_version_number := null;
6029 ben_copy_entity_results_api.create_copy_entity_results(
6030 p_copy_entity_result_id => l_copy_entity_result_id,
6031 p_copy_entity_txn_id => p_copy_entity_txn_id,
6032 p_result_type_cd => l_result_type_cd,
6033 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
6034 p_parent_entity_result_id => l_mirror_src_entity_result_id,
6035 p_number_of_copies => l_number_of_copies,
6036 p_table_route_id => l_table_route_id,
6037 P_TABLE_ALIAS => 'EEI',
6038 p_information1 => l_eei_rec.elig_enrld_anthr_oipl_id,
6039 p_information2 => l_eei_rec.EFFECTIVE_START_DATE,
6040 p_information3 => l_eei_rec.EFFECTIVE_END_DATE,
6041 p_information4 => l_eei_rec.business_group_id,
6042 p_information5 => l_information5 , -- 9999 put name for h-grid
6043 p_information111 => l_eei_rec.eei_attribute1,
6044 p_information120 => l_eei_rec.eei_attribute10,
6045 p_information121 => l_eei_rec.eei_attribute11,
6046 p_information122 => l_eei_rec.eei_attribute12,
6047 p_information123 => l_eei_rec.eei_attribute13,
6048 p_information124 => l_eei_rec.eei_attribute14,
6049 p_information125 => l_eei_rec.eei_attribute15,
6050 p_information126 => l_eei_rec.eei_attribute16,
6051 p_information127 => l_eei_rec.eei_attribute17,
6052 p_information128 => l_eei_rec.eei_attribute18,
6053 p_information129 => l_eei_rec.eei_attribute19,
6054 p_information112 => l_eei_rec.eei_attribute2,
6055 p_information130 => l_eei_rec.eei_attribute20,
6056 p_information131 => l_eei_rec.eei_attribute21,
6057 p_information132 => l_eei_rec.eei_attribute22,
6058 p_information133 => l_eei_rec.eei_attribute23,
6059 p_information134 => l_eei_rec.eei_attribute24,
6060 p_information135 => l_eei_rec.eei_attribute25,
6061 p_information136 => l_eei_rec.eei_attribute26,
6062 p_information137 => l_eei_rec.eei_attribute27,
6063 p_information138 => l_eei_rec.eei_attribute28,
6064 p_information139 => l_eei_rec.eei_attribute29,
6065 p_information113 => l_eei_rec.eei_attribute3,
6066 p_information140 => l_eei_rec.eei_attribute30,
6067 p_information114 => l_eei_rec.eei_attribute4,
6068 p_information115 => l_eei_rec.eei_attribute5,
6069 p_information116 => l_eei_rec.eei_attribute6,
6070 p_information117 => l_eei_rec.eei_attribute7,
6071 p_information118 => l_eei_rec.eei_attribute8,
6072 p_information119 => l_eei_rec.eei_attribute9,
6073 p_information110 => l_eei_rec.eei_attribute_category,
6074 p_information263 => l_eei_rec.eligy_prfl_id,
6075 p_information12 => l_eei_rec.enrl_det_dt_cd,
6076 p_information11 => l_eei_rec.excld_flag,
6077 p_information258 => l_eei_rec.oipl_id,
6078 p_information261 => l_eei_rec.ordr_num,
6079 p_information265 => l_eei_rec.object_version_number,
6080 --
6081
6082 -- END REPLACE PARAMETER LINES
6083
6084 p_object_version_number => l_object_version_number,
6085 p_effective_date => p_effective_date );
6086 --
6087
6088 if l_out_eei_result_id is null then
6089 l_out_eei_result_id := l_copy_entity_result_id;
6090 end if;
6091
6092 if l_result_type_cd = 'DISPLAY' then
6093 l_out_eei_result_id := l_copy_entity_result_id ;
6094 end if;
6095 --
6096 end loop;
6097 --
6098 end loop;
6099 ---------------------------------------------------------------
6100 -- END OF BEN_ELIG_ENRLD_ANTHR_OIPL_F ----------------------
6101 ---------------------------------------------------------------
6102 ---------------------------------------------------------------
6103 -- START OF BEN_ELIG_ENRLD_ANTHR_PGM_F ----------------------
6104 ---------------------------------------------------------------
6105 --
6106 for l_parent_rec in c_eeg_from_parent(l_ELIGY_PRFL_ID) loop
6107 --
6108 l_mirror_src_entity_result_id := l_out_elp_result_id ;
6109 --
6110 l_elig_enrld_anthr_pgm_id := l_parent_rec.elig_enrld_anthr_pgm_id ;
6111 --
6112 for l_eeg_rec in c_eeg(l_parent_rec.elig_enrld_anthr_pgm_id,l_mirror_src_entity_result_id,'EEG' ) loop
6113 --
6114 l_table_route_id := null ;
6115 open ben_plan_design_program_module.g_table_route('EEG');
6116 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
6117 close ben_plan_design_program_module.g_table_route ;
6118 --
6119 l_information5 := ben_plan_design_program_module.get_pgm_name(l_eeg_rec.pgm_id,p_effective_date)
6120 --
6121 -- Bug No: 3451872
6122 --
6123 || ' '
6124 || get_det_enrl_det_dt_name(l_eeg_rec.enrl_det_dt_cd,'BEN_ENRL_DET_DT')
6125 --
6126 || ben_plan_design_program_module.get_exclude_message(l_eeg_rec.excld_flag);
6127 --'Intersection';
6128 --
6129 if p_effective_date between l_eeg_rec.effective_start_date
6130 and l_eeg_rec.effective_end_date then
6131 --
6132 l_result_type_cd := 'DISPLAY';
6133 else
6134 l_result_type_cd := 'NO DISPLAY';
6135 end if;
6136 --
6137 l_copy_entity_result_id := null;
6138 l_object_version_number := null;
6139 ben_copy_entity_results_api.create_copy_entity_results(
6140 p_copy_entity_result_id => l_copy_entity_result_id,
6141 p_copy_entity_txn_id => p_copy_entity_txn_id,
6142 p_result_type_cd => l_result_type_cd,
6143 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
6144 p_parent_entity_result_id => l_mirror_src_entity_result_id,
6145 p_number_of_copies => l_number_of_copies,
6146 p_table_route_id => l_table_route_id,
6147 P_TABLE_ALIAS => 'EEG',
6148 p_information1 => l_eeg_rec.elig_enrld_anthr_pgm_id,
6149 p_information2 => l_eeg_rec.EFFECTIVE_START_DATE,
6150 p_information3 => l_eeg_rec.EFFECTIVE_END_DATE,
6151 p_information4 => l_eeg_rec.business_group_id,
6152 p_information5 => l_information5 , -- 9999 put name for h-grid
6153 p_information111 => l_eeg_rec.eeg_attribute1,
6154 p_information120 => l_eeg_rec.eeg_attribute10,
6155 p_information121 => l_eeg_rec.eeg_attribute11,
6156 p_information122 => l_eeg_rec.eeg_attribute12,
6157 p_information123 => l_eeg_rec.eeg_attribute13,
6158 p_information124 => l_eeg_rec.eeg_attribute14,
6159 p_information125 => l_eeg_rec.eeg_attribute15,
6160 p_information126 => l_eeg_rec.eeg_attribute16,
6161 p_information127 => l_eeg_rec.eeg_attribute17,
6162 p_information128 => l_eeg_rec.eeg_attribute18,
6163 p_information129 => l_eeg_rec.eeg_attribute19,
6164 p_information112 => l_eeg_rec.eeg_attribute2,
6165 p_information130 => l_eeg_rec.eeg_attribute20,
6166 p_information131 => l_eeg_rec.eeg_attribute21,
6167 p_information132 => l_eeg_rec.eeg_attribute22,
6168 p_information133 => l_eeg_rec.eeg_attribute23,
6169 p_information134 => l_eeg_rec.eeg_attribute24,
6170 p_information135 => l_eeg_rec.eeg_attribute25,
6171 p_information136 => l_eeg_rec.eeg_attribute26,
6172 p_information137 => l_eeg_rec.eeg_attribute27,
6173 p_information138 => l_eeg_rec.eeg_attribute28,
6174 p_information139 => l_eeg_rec.eeg_attribute29,
6175 p_information113 => l_eeg_rec.eeg_attribute3,
6176 p_information140 => l_eeg_rec.eeg_attribute30,
6177 p_information114 => l_eeg_rec.eeg_attribute4,
6178 p_information115 => l_eeg_rec.eeg_attribute5,
6179 p_information116 => l_eeg_rec.eeg_attribute6,
6180 p_information117 => l_eeg_rec.eeg_attribute7,
6181 p_information118 => l_eeg_rec.eeg_attribute8,
6182 p_information119 => l_eeg_rec.eeg_attribute9,
6183 p_information110 => l_eeg_rec.eeg_attribute_category,
6184 p_information263 => l_eeg_rec.eligy_prfl_id,
6185 p_information11 => l_eeg_rec.enrl_det_dt_cd,
6186 p_information12 => l_eeg_rec.excld_flag,
6187 p_information261 => l_eeg_rec.ordr_num,
6188 p_information260 => l_eeg_rec.pgm_id,
6189 p_information265 => l_eeg_rec.object_version_number,
6190 --
6191
6192 -- END REPLACE PARAMETER LINES
6193
6194 p_object_version_number => l_object_version_number,
6195 p_effective_date => p_effective_date );
6196 --
6197
6198 if l_out_eeg_result_id is null then
6199 l_out_eeg_result_id := l_copy_entity_result_id;
6200 end if;
6201
6202 if l_result_type_cd = 'DISPLAY' then
6203 l_out_eeg_result_id := l_copy_entity_result_id ;
6204 end if;
6205 --
6206 end loop;
6207 --
6208 end loop;
6209 ---------------------------------------------------------------
6210 -- END OF BEN_ELIG_ENRLD_ANTHR_PGM_F ----------------------
6211 ---------------------------------------------------------------
6212 ---------------------------------------------------------------
6213 -- START OF BEN_ELIG_ENRLD_ANTHR_PLIP_F ----------------------
6214 ---------------------------------------------------------------
6215 --
6216 for l_parent_rec in c_eai_from_parent(l_ELIGY_PRFL_ID) loop
6217 --
6218 l_mirror_src_entity_result_id := l_out_elp_result_id ;
6219 --
6220 l_elig_enrld_anthr_plip_id := l_parent_rec.elig_enrld_anthr_plip_id ;
6221 --
6222 for l_eai_rec in c_eai(l_parent_rec.elig_enrld_anthr_plip_id,l_mirror_src_entity_result_id,'EAI' ) loop
6223 --
6224 l_table_route_id := null ;
6225 open ben_plan_design_program_module.g_table_route('EAI');
6226 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
6227 close ben_plan_design_program_module.g_table_route ;
6228 --
6229 l_information5 := ben_plan_design_program_module.get_plip_name(l_eai_rec.plip_id,p_effective_date)
6230 --
6231 -- Bug No: 3451872
6232 --
6233 || ' '
6234 || get_det_enrl_det_dt_name(l_eai_rec.enrl_det_dt_cd,'BEN_ENRL_DET_DT')
6235 --
6236 || ben_plan_design_program_module.get_exclude_message(l_eai_rec.excld_flag);
6237 --'Intersection';
6238 --
6239 if p_effective_date between l_eai_rec.effective_start_date
6240 and l_eai_rec.effective_end_date then
6241 --
6242 l_result_type_cd := 'DISPLAY';
6243 else
6244 l_result_type_cd := 'NO DISPLAY';
6245 end if;
6246 --
6247 l_copy_entity_result_id := null;
6248 l_object_version_number := null;
6249 ben_copy_entity_results_api.create_copy_entity_results(
6250 p_copy_entity_result_id => l_copy_entity_result_id,
6251 p_copy_entity_txn_id => p_copy_entity_txn_id,
6252 p_result_type_cd => l_result_type_cd,
6253 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
6254 p_parent_entity_result_id => l_mirror_src_entity_result_id,
6255 p_number_of_copies => l_number_of_copies,
6256 p_table_route_id => l_table_route_id,
6257 P_TABLE_ALIAS => 'EAI',
6258 p_information1 => l_eai_rec.elig_enrld_anthr_plip_id,
6259 p_information2 => l_eai_rec.EFFECTIVE_START_DATE,
6260 p_information3 => l_eai_rec.EFFECTIVE_END_DATE,
6261 p_information4 => l_eai_rec.business_group_id,
6262 p_information5 => l_information5 , -- 9999 put name for h-grid
6263 p_information111 => l_eai_rec.eai_attribute1,
6264 p_information120 => l_eai_rec.eai_attribute10,
6265 p_information121 => l_eai_rec.eai_attribute11,
6266 p_information122 => l_eai_rec.eai_attribute12,
6267 p_information123 => l_eai_rec.eai_attribute13,
6268 p_information124 => l_eai_rec.eai_attribute14,
6269 p_information125 => l_eai_rec.eai_attribute15,
6270 p_information126 => l_eai_rec.eai_attribute16,
6271 p_information127 => l_eai_rec.eai_attribute17,
6272 p_information128 => l_eai_rec.eai_attribute18,
6273 p_information129 => l_eai_rec.eai_attribute19,
6274 p_information112 => l_eai_rec.eai_attribute2,
6275 p_information130 => l_eai_rec.eai_attribute20,
6276 p_information131 => l_eai_rec.eai_attribute21,
6277 p_information132 => l_eai_rec.eai_attribute22,
6278 p_information133 => l_eai_rec.eai_attribute23,
6279 p_information134 => l_eai_rec.eai_attribute24,
6280 p_information135 => l_eai_rec.eai_attribute25,
6281 p_information136 => l_eai_rec.eai_attribute26,
6282 p_information137 => l_eai_rec.eai_attribute27,
6283 p_information138 => l_eai_rec.eai_attribute28,
6284 p_information139 => l_eai_rec.eai_attribute29,
6285 p_information113 => l_eai_rec.eai_attribute3,
6286 p_information140 => l_eai_rec.eai_attribute30,
6287 p_information114 => l_eai_rec.eai_attribute4,
6288 p_information115 => l_eai_rec.eai_attribute5,
6289 p_information116 => l_eai_rec.eai_attribute6,
6290 p_information117 => l_eai_rec.eai_attribute7,
6291 p_information118 => l_eai_rec.eai_attribute8,
6292 p_information119 => l_eai_rec.eai_attribute9,
6293 p_information110 => l_eai_rec.eai_attribute_category,
6294 p_information263 => l_eai_rec.eligy_prfl_id,
6295 p_information12 => l_eai_rec.enrl_det_dt_cd,
6296 p_information11 => l_eai_rec.excld_flag,
6297 p_information260 => l_eai_rec.ordr_num,
6298 p_information256 => l_eai_rec.plip_id,
6299 p_information265 => l_eai_rec.object_version_number,
6300 --
6301
6302 -- END REPLACE PARAMETER LINES
6303
6304 p_object_version_number => l_object_version_number,
6305 p_effective_date => p_effective_date );
6306 --
6307
6308 if l_out_eai_result_id is null then
6309 l_out_eai_result_id := l_copy_entity_result_id;
6310 end if;
6311
6312 if l_result_type_cd = 'DISPLAY' then
6313 l_out_eai_result_id := l_copy_entity_result_id ;
6314 end if;
6315 --
6316 end loop;
6317 --
6318 end loop;
6319 ---------------------------------------------------------------
6320 -- END OF BEN_ELIG_ENRLD_ANTHR_PLIP_F ----------------------
6321 ---------------------------------------------------------------
6322 ---------------------------------------------------------------
6323 -- START OF BEN_ELIG_ENRLD_ANTHR_PL_F ----------------------
6324 ---------------------------------------------------------------
6325 --
6326 for l_parent_rec in c_eep_from_parent(l_ELIGY_PRFL_ID) loop
6327 --
6328 l_mirror_src_entity_result_id := l_out_elp_result_id ;
6329 --
6330 l_elig_enrld_anthr_pl_id := l_parent_rec.elig_enrld_anthr_pl_id ;
6331 --
6332 for l_eep_rec in c_eep(l_parent_rec.elig_enrld_anthr_pl_id,l_mirror_src_entity_result_id,'EEP' ) loop
6333 --
6334 l_table_route_id := null ;
6335 open ben_plan_design_program_module.g_table_route('EEP');
6336 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
6337 close ben_plan_design_program_module.g_table_route ;
6338 --
6339 l_information5 :=ben_plan_design_program_module.get_pl_name(l_eep_rec.pl_id,p_effective_date)
6340 --
6341 -- Bug No: 3451872
6342 --
6343 || ' '
6344 || get_det_enrl_det_dt_name(l_eep_rec.enrl_det_dt_cd,'BEN_ENRL_DET_DT')
6345 --
6346 || ben_plan_design_program_module.get_exclude_message(l_eep_rec.excld_flag);
6347 --'Intersection';
6348 --
6349 if p_effective_date between l_eep_rec.effective_start_date
6350 and l_eep_rec.effective_end_date then
6351 --
6352 l_result_type_cd := 'DISPLAY';
6353 else
6354 l_result_type_cd := 'NO DISPLAY';
6355 end if;
6356 --
6357 l_copy_entity_result_id := null;
6358 l_object_version_number := null;
6359 ben_copy_entity_results_api.create_copy_entity_results(
6360 p_copy_entity_result_id => l_copy_entity_result_id,
6361 p_copy_entity_txn_id => p_copy_entity_txn_id,
6362 p_result_type_cd => l_result_type_cd,
6363 p_parent_entity_result_id => l_mirror_src_entity_result_id,
6364 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
6365 p_number_of_copies => l_number_of_copies,
6366 p_table_route_id => l_table_route_id,
6367 P_TABLE_ALIAS => 'EEP',
6368 p_information1 => l_eep_rec.elig_enrld_anthr_pl_id,
6369 p_information2 => l_eep_rec.EFFECTIVE_START_DATE,
6370 p_information3 => l_eep_rec.EFFECTIVE_END_DATE,
6371 p_information4 => l_eep_rec.business_group_id,
6372 p_information5 => l_information5 , -- 9999 put name for h-grid
6373 p_information111 => l_eep_rec.eep_attribute1,
6374 p_information120 => l_eep_rec.eep_attribute10,
6375 p_information121 => l_eep_rec.eep_attribute11,
6376 p_information122 => l_eep_rec.eep_attribute12,
6377 p_information123 => l_eep_rec.eep_attribute13,
6378 p_information124 => l_eep_rec.eep_attribute14,
6379 p_information125 => l_eep_rec.eep_attribute15,
6380 p_information126 => l_eep_rec.eep_attribute16,
6381 p_information127 => l_eep_rec.eep_attribute17,
6382 p_information128 => l_eep_rec.eep_attribute18,
6383 p_information129 => l_eep_rec.eep_attribute19,
6384 p_information112 => l_eep_rec.eep_attribute2,
6385 p_information130 => l_eep_rec.eep_attribute20,
6386 p_information131 => l_eep_rec.eep_attribute21,
6387 p_information132 => l_eep_rec.eep_attribute22,
6388 p_information133 => l_eep_rec.eep_attribute23,
6389 p_information134 => l_eep_rec.eep_attribute24,
6390 p_information135 => l_eep_rec.eep_attribute25,
6391 p_information136 => l_eep_rec.eep_attribute26,
6392 p_information137 => l_eep_rec.eep_attribute27,
6393 p_information138 => l_eep_rec.eep_attribute28,
6394 p_information139 => l_eep_rec.eep_attribute29,
6395 p_information113 => l_eep_rec.eep_attribute3,
6396 p_information140 => l_eep_rec.eep_attribute30,
6397 p_information114 => l_eep_rec.eep_attribute4,
6398 p_information115 => l_eep_rec.eep_attribute5,
6399 p_information116 => l_eep_rec.eep_attribute6,
6400 p_information117 => l_eep_rec.eep_attribute7,
6401 p_information118 => l_eep_rec.eep_attribute8,
6402 p_information119 => l_eep_rec.eep_attribute9,
6403 p_information110 => l_eep_rec.eep_attribute_category,
6404 p_information263 => l_eep_rec.eligy_prfl_id,
6405 p_information11 => l_eep_rec.enrl_det_dt_cd,
6406 p_information12 => l_eep_rec.excld_flag,
6407 p_information260 => l_eep_rec.ordr_num,
6408 p_information261 => l_eep_rec.pl_id,
6409 p_information265 => l_eep_rec.object_version_number,
6410 --
6411
6412 -- END REPLACE PARAMETER LINES
6413
6414 p_object_version_number => l_object_version_number,
6415 p_effective_date => p_effective_date );
6416 --
6417
6418 if l_out_eep_result_id is null then
6419 l_out_eep_result_id := l_copy_entity_result_id;
6420 end if;
6421
6422 if l_result_type_cd = 'DISPLAY' then
6423 l_out_eep_result_id := l_copy_entity_result_id ;
6424 end if;
6425 --
6426 end loop;
6427 --
6428 end loop;
6429 ---------------------------------------------------------------
6430 -- END OF BEN_ELIG_ENRLD_ANTHR_PL_F ----------------------
6431 ---------------------------------------------------------------
6432 ---------------------------------------------------------------
6433 -- START OF BEN_ELIG_ENRLD_ANTHR_PTIP_F ----------------------
6434 ---------------------------------------------------------------
6435 --
6436 for l_parent_rec in c_eet_from_parent(l_ELIGY_PRFL_ID) loop
6437 --
6438 l_mirror_src_entity_result_id := l_out_elp_result_id ;
6439 --
6440 l_elig_enrld_anthr_ptip_id := l_parent_rec.elig_enrld_anthr_ptip_id ;
6441 --
6442 for l_eet_rec in c_eet(l_parent_rec.elig_enrld_anthr_ptip_id,l_mirror_src_entity_result_id,'EET' ) loop
6443 --
6444 l_table_route_id := null ;
6445 open ben_plan_design_program_module.g_table_route('EET');
6446 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
6447 close ben_plan_design_program_module.g_table_route ;
6448 --
6449 l_information5 := ben_plan_design_program_module.get_ptip_name(l_eet_rec.ptip_id,p_effective_date)
6450 --
6451 -- Bug No: 3451872
6452 --
6453 || ' '
6454 || get_det_enrl_det_dt_name(l_eet_rec.enrl_det_dt_cd,'BEN_ENRL_DET_DT')
6455 || get_subj_to_cobra_message(l_eet_rec.only_pls_subj_cobra_flag)
6456 --
6457 || ben_plan_design_program_module.get_exclude_message(l_eet_rec.excld_flag);
6458 --'Intersection';
6459 --
6460 if p_effective_date between l_eet_rec.effective_start_date
6461 and l_eet_rec.effective_end_date then
6462 --
6463 l_result_type_cd := 'DISPLAY';
6464 else
6465 l_result_type_cd := 'NO DISPLAY';
6466 end if;
6467 --
6468 l_copy_entity_result_id := null;
6469 l_object_version_number := null;
6470 ben_copy_entity_results_api.create_copy_entity_results(
6471 p_copy_entity_result_id => l_copy_entity_result_id,
6472 p_copy_entity_txn_id => p_copy_entity_txn_id,
6473 p_result_type_cd => l_result_type_cd,
6474 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
6475 p_parent_entity_result_id => l_mirror_src_entity_result_id,
6476 p_number_of_copies => l_number_of_copies,
6477 p_table_route_id => l_table_route_id,
6478 P_TABLE_ALIAS => 'EET',
6479 p_information1 => l_eet_rec.elig_enrld_anthr_ptip_id,
6480 p_information2 => l_eet_rec.EFFECTIVE_START_DATE,
6481 p_information3 => l_eet_rec.EFFECTIVE_END_DATE,
6482 p_information4 => l_eet_rec.business_group_id,
6483 p_information5 => l_information5 , -- 9999 put name for h-grid
6484 p_information111 => l_eet_rec.eet_attribute1,
6485 p_information120 => l_eet_rec.eet_attribute10,
6486 p_information121 => l_eet_rec.eet_attribute11,
6487 p_information122 => l_eet_rec.eet_attribute12,
6488 p_information123 => l_eet_rec.eet_attribute13,
6489 p_information124 => l_eet_rec.eet_attribute14,
6490 p_information125 => l_eet_rec.eet_attribute15,
6491 p_information126 => l_eet_rec.eet_attribute16,
6492 p_information127 => l_eet_rec.eet_attribute17,
6493 p_information128 => l_eet_rec.eet_attribute18,
6494 p_information129 => l_eet_rec.eet_attribute19,
6495 p_information112 => l_eet_rec.eet_attribute2,
6496 p_information130 => l_eet_rec.eet_attribute20,
6497 p_information131 => l_eet_rec.eet_attribute21,
6498 p_information132 => l_eet_rec.eet_attribute22,
6499 p_information133 => l_eet_rec.eet_attribute23,
6500 p_information134 => l_eet_rec.eet_attribute24,
6501 p_information135 => l_eet_rec.eet_attribute25,
6502 p_information136 => l_eet_rec.eet_attribute26,
6503 p_information137 => l_eet_rec.eet_attribute27,
6504 p_information138 => l_eet_rec.eet_attribute28,
6505 p_information139 => l_eet_rec.eet_attribute29,
6506 p_information113 => l_eet_rec.eet_attribute3,
6507 p_information140 => l_eet_rec.eet_attribute30,
6508 p_information114 => l_eet_rec.eet_attribute4,
6509 p_information115 => l_eet_rec.eet_attribute5,
6510 p_information116 => l_eet_rec.eet_attribute6,
6511 p_information117 => l_eet_rec.eet_attribute7,
6512 p_information118 => l_eet_rec.eet_attribute8,
6513 p_information119 => l_eet_rec.eet_attribute9,
6514 p_information110 => l_eet_rec.eet_attribute_category,
6515 p_information263 => l_eet_rec.eligy_prfl_id,
6516 p_information13 => l_eet_rec.enrl_det_dt_cd,
6517 p_information11 => l_eet_rec.excld_flag,
6518 p_information12 => l_eet_rec.only_pls_subj_cobra_flag,
6519 p_information261 => l_eet_rec.ordr_num,
6520 p_information259 => l_eet_rec.ptip_id,
6521 p_information265 => l_eet_rec.object_version_number,
6522
6523 --
6524
6525 -- END REPLACE PARAMETER LINES
6526
6527 p_object_version_number => l_object_version_number,
6528 p_effective_date => p_effective_date );
6529 --
6530
6531 if l_out_eet_result_id is null then
6532 l_out_eet_result_id := l_copy_entity_result_id;
6533 end if;
6534
6535 if l_result_type_cd = 'DISPLAY' then
6536 l_out_eet_result_id := l_copy_entity_result_id ;
6537 end if;
6538 --
6539 end loop;
6540 --
6541 end loop;
6542 ---------------------------------------------------------------
6543 -- END OF BEN_ELIG_ENRLD_ANTHR_PTIP_F ----------------------
6544 ---------------------------------------------------------------
6545 ---------------------------------------------------------------
6546 -- START OF BEN_ELIG_FL_TM_PT_TM_PRTE_F ----------------------
6547 ---------------------------------------------------------------
6548 --
6549 for l_parent_rec in c_efp_from_parent(l_ELIGY_PRFL_ID) loop
6550 --
6551 l_mirror_src_entity_result_id := l_out_elp_result_id ;
6552 --
6553 l_elig_fl_tm_pt_tm_prte_id := l_parent_rec.elig_fl_tm_pt_tm_prte_id ;
6554 --
6555 for l_efp_rec in c_efp(l_parent_rec.elig_fl_tm_pt_tm_prte_id,l_mirror_src_entity_result_id,'EFP' ) loop
6556 --
6557 l_table_route_id := null ;
6558 open ben_plan_design_program_module.g_table_route('EFP');
6559 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
6560 close ben_plan_design_program_module.g_table_route ;
6561 --
6562 l_information5 := hr_general.decode_lookup('EMP_CAT',l_efp_rec.fl_tm_pt_tm_cd)
6563 || ben_plan_design_program_module.get_exclude_message(l_efp_rec.excld_flag);
6564 --'Intersection';
6565 --
6566 if p_effective_date between l_efp_rec.effective_start_date
6567 and l_efp_rec.effective_end_date then
6568 --
6569 l_result_type_cd := 'DISPLAY';
6570 else
6571 l_result_type_cd := 'NO DISPLAY';
6572 end if;
6573 --
6574 l_copy_entity_result_id := null;
6575 l_object_version_number := null;
6576 ben_copy_entity_results_api.create_copy_entity_results(
6577 p_copy_entity_result_id => l_copy_entity_result_id,
6578 p_copy_entity_txn_id => p_copy_entity_txn_id,
6579 p_result_type_cd => l_result_type_cd,
6580 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
6581 p_parent_entity_result_id => l_mirror_src_entity_result_id,
6582 p_number_of_copies => l_number_of_copies,
6583 p_table_route_id => l_table_route_id,
6584 P_TABLE_ALIAS => 'EFP',
6585 p_information1 => l_efp_rec.elig_fl_tm_pt_tm_prte_id,
6586 p_information2 => l_efp_rec.EFFECTIVE_START_DATE,
6587 p_information3 => l_efp_rec.EFFECTIVE_END_DATE,
6588 p_information4 => l_efp_rec.business_group_id,
6589 p_information5 => l_information5 , -- 9999 put name for h-grid
6590 p_information111 => l_efp_rec.efp_attribute1,
6591 p_information120 => l_efp_rec.efp_attribute10,
6592 p_information121 => l_efp_rec.efp_attribute11,
6593 p_information122 => l_efp_rec.efp_attribute12,
6594 p_information123 => l_efp_rec.efp_attribute13,
6595 p_information124 => l_efp_rec.efp_attribute14,
6596 p_information125 => l_efp_rec.efp_attribute15,
6597 p_information126 => l_efp_rec.efp_attribute16,
6598 p_information127 => l_efp_rec.efp_attribute17,
6599 p_information128 => l_efp_rec.efp_attribute18,
6600 p_information129 => l_efp_rec.efp_attribute19,
6601 p_information112 => l_efp_rec.efp_attribute2,
6602 p_information130 => l_efp_rec.efp_attribute20,
6603 p_information131 => l_efp_rec.efp_attribute21,
6604 p_information132 => l_efp_rec.efp_attribute22,
6605 p_information133 => l_efp_rec.efp_attribute23,
6606 p_information134 => l_efp_rec.efp_attribute24,
6607 p_information135 => l_efp_rec.efp_attribute25,
6608 p_information136 => l_efp_rec.efp_attribute26,
6609 p_information137 => l_efp_rec.efp_attribute27,
6610 p_information138 => l_efp_rec.efp_attribute28,
6611 p_information139 => l_efp_rec.efp_attribute29,
6612 p_information113 => l_efp_rec.efp_attribute3,
6613 p_information140 => l_efp_rec.efp_attribute30,
6614 p_information114 => l_efp_rec.efp_attribute4,
6615 p_information115 => l_efp_rec.efp_attribute5,
6616 p_information116 => l_efp_rec.efp_attribute6,
6617 p_information117 => l_efp_rec.efp_attribute7,
6618 p_information118 => l_efp_rec.efp_attribute8,
6619 p_information119 => l_efp_rec.efp_attribute9,
6620 p_information110 => l_efp_rec.efp_attribute_category,
6621 p_information263 => l_efp_rec.eligy_prfl_id,
6622 p_information11 => l_efp_rec.excld_flag,
6623 p_information12 => l_efp_rec.fl_tm_pt_tm_cd,
6624 p_information260 => l_efp_rec.ordr_num,
6625 p_information265 => l_efp_rec.object_version_number,
6626 p_information295 => l_efp_rec.criteria_score,
6627 p_information296 => l_efp_rec.criteria_weight,
6628 --
6629
6630 -- END REPLACE PARAMETER LINES
6631
6632 p_object_version_number => l_object_version_number,
6633 p_effective_date => p_effective_date );
6634
6635 --
6636
6637 if l_out_efp_result_id is null then
6638 l_out_efp_result_id := l_copy_entity_result_id;
6639 end if;
6640
6641 if l_result_type_cd = 'DISPLAY' then
6642 l_out_efp_result_id := l_copy_entity_result_id ;
6643 end if;
6644 --
6645 end loop;
6646 --
6647 end loop;
6648 ---------------------------------------------------------------
6649 -- END OF BEN_ELIG_FL_TM_PT_TM_PRTE_F ----------------------
6650 ---------------------------------------------------------------
6651 ---------------------------------------------------------------
6652 -- START OF BEN_ELIG_GRD_PRTE_F ----------------------
6653 ---------------------------------------------------------------
6654 --
6655 for l_parent_rec in c_egr_from_parent(l_ELIGY_PRFL_ID) loop
6656 --
6657 l_mirror_src_entity_result_id := l_out_elp_result_id ;
6658 --
6659 l_elig_grd_prte_id := l_parent_rec.elig_grd_prte_id ;
6660 --
6661 for l_egr_rec in c_egr(l_parent_rec.elig_grd_prte_id,l_mirror_src_entity_result_id,'EGR' ) loop
6662 --
6663 l_table_route_id := null ;
6664 open ben_plan_design_program_module.g_table_route('EGR');
6665 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
6666 close ben_plan_design_program_module.g_table_route ;
6667 --
6668 l_information5 := ben_plan_design_program_module.get_grade_name(l_egr_rec.grade_id)
6669 || ben_plan_design_program_module.get_exclude_message(l_egr_rec.excld_flag);
6670 --'Intersection';
6671 --
6672 if p_effective_date between l_egr_rec.effective_start_date
6673 and l_egr_rec.effective_end_date then
6674 --
6675 l_result_type_cd := 'DISPLAY';
6676 else
6677 l_result_type_cd := 'NO DISPLAY';
6678 end if;
6679 --
6680 l_copy_entity_result_id := null;
6681 l_object_version_number := null;
6682
6683
6684 -- To store effective_start_date of grade
6685 -- for Mapping - Bug 2958658
6686 --
6687 l_grade_start_date := null;
6688 if l_egr_rec.grade_id is not null then
6689 open c_grade_start_date(l_egr_rec.grade_id);
6690 fetch c_grade_start_date into l_grade_start_date;
6691 close c_grade_start_date;
6692 end if;
6693
6694 --
6695 -- pabodla : MAPPING DATA : Store the mapping column information.
6696 --
6697
6698 l_mapping_name := null;
6699 l_mapping_id := null;
6700 --
6701 -- Get the defined balance name to display on mapping page.
6702 --
6703 open c_get_mapping_name2(l_egr_rec.grade_id,NVL(l_grade_start_date,p_effective_date));
6704 fetch c_get_mapping_name2 into l_mapping_name;
6705 close c_get_mapping_name2;
6706 --
6707 l_mapping_id := l_egr_rec.grade_id;
6708 --
6709 --
6710 --To set user friendly labels on the mapping page
6711 --
6712 l_mapping_column_name1 := null;
6713 l_mapping_column_name2 :=null;
6714 BEN_PLAN_DESIGN_TXNS_API.get_mapping_column_name(l_table_route_id,
6715 l_mapping_column_name1,
6716 l_mapping_column_name2,
6717 p_copy_entity_txn_id);
6718 --
6719
6720 ben_copy_entity_results_api.create_copy_entity_results(
6721 p_copy_entity_result_id => l_copy_entity_result_id,
6722 p_copy_entity_txn_id => p_copy_entity_txn_id,
6723 p_result_type_cd => l_result_type_cd,
6724 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
6725 p_parent_entity_result_id => l_mirror_src_entity_result_id,
6726 p_number_of_copies => l_number_of_copies,
6727 p_table_route_id => l_table_route_id,
6728 P_TABLE_ALIAS => 'EGR',
6729 p_information1 => l_egr_rec.elig_grd_prte_id,
6730 p_information2 => l_egr_rec.EFFECTIVE_START_DATE,
6731 p_information3 => l_egr_rec.EFFECTIVE_END_DATE,
6732 p_information4 => l_egr_rec.business_group_id,
6733 p_information5 => l_information5 , -- 9999 put name for h-grid
6734 p_information111 => l_egr_rec.egr_attribute1,
6735 p_information120 => l_egr_rec.egr_attribute10,
6736 p_information121 => l_egr_rec.egr_attribute11,
6737 p_information122 => l_egr_rec.egr_attribute12,
6738 p_information123 => l_egr_rec.egr_attribute13,
6739 p_information124 => l_egr_rec.egr_attribute14,
6740 p_information125 => l_egr_rec.egr_attribute15,
6741 p_information126 => l_egr_rec.egr_attribute16,
6742 p_information127 => l_egr_rec.egr_attribute17,
6743 p_information128 => l_egr_rec.egr_attribute18,
6744 p_information129 => l_egr_rec.egr_attribute19,
6745 p_information112 => l_egr_rec.egr_attribute2,
6746 p_information130 => l_egr_rec.egr_attribute20,
6747 p_information131 => l_egr_rec.egr_attribute21,
6748 p_information132 => l_egr_rec.egr_attribute22,
6749 p_information133 => l_egr_rec.egr_attribute23,
6750 p_information134 => l_egr_rec.egr_attribute24,
6751 p_information135 => l_egr_rec.egr_attribute25,
6752 p_information136 => l_egr_rec.egr_attribute26,
6753 p_information137 => l_egr_rec.egr_attribute27,
6754 p_information138 => l_egr_rec.egr_attribute28,
6755 p_information139 => l_egr_rec.egr_attribute29,
6756 p_information113 => l_egr_rec.egr_attribute3,
6757 p_information140 => l_egr_rec.egr_attribute30,
6758 p_information114 => l_egr_rec.egr_attribute4,
6759 p_information115 => l_egr_rec.egr_attribute5,
6760 p_information116 => l_egr_rec.egr_attribute6,
6761 p_information117 => l_egr_rec.egr_attribute7,
6762 p_information118 => l_egr_rec.egr_attribute8,
6763 p_information119 => l_egr_rec.egr_attribute9,
6764 p_information110 => l_egr_rec.egr_attribute_category,
6765 p_information263 => l_egr_rec.eligy_prfl_id,
6766 p_information11 => l_egr_rec.excld_flag,
6767 -- Data for MAPPING columns.
6768 p_information173 => l_mapping_name,
6769 p_information174 => l_mapping_id,
6770 p_information181 => l_mapping_column_name1,
6771 p_information182 => l_mapping_column_name2,
6772 -- END other product Mapping columns.
6773 p_information260 => l_egr_rec.ordr_num,
6774 p_information166 => l_grade_start_date,
6775 p_information265 => l_egr_rec.object_version_number,
6776 p_information295 => l_egr_rec.criteria_score,
6777 p_information296 => l_egr_rec.criteria_weight,
6778 --
6779
6780 -- END REPLACE PARAMETER LINES
6781
6782 p_object_version_number => l_object_version_number,
6783 p_effective_date => p_effective_date );
6784 --
6785
6786 if l_out_egr_result_id is null then
6787 l_out_egr_result_id := l_copy_entity_result_id;
6788 end if;
6789
6790 if l_result_type_cd = 'DISPLAY' then
6791 l_out_egr_result_id := l_copy_entity_result_id ;
6792 end if;
6793 --
6794 end loop;
6795 --
6796 end loop;
6797 ---------------------------------------------------------------
6798 -- END OF BEN_ELIG_GRD_PRTE_F ----------------------
6799 ---------------------------------------------------------------
6800 ---------------------------------------------------------------
6801 -- START OF BEN_ELIG_HRLY_SLRD_PRTE_F ----------------------
6802 ---------------------------------------------------------------
6803 --
6804 for l_parent_rec in c_ehs_from_parent(l_ELIGY_PRFL_ID) loop
6805 --
6806 l_mirror_src_entity_result_id := l_out_elp_result_id ;
6807 --
6808 l_elig_hrly_slrd_prte_id := l_parent_rec.elig_hrly_slrd_prte_id ;
6809 --
6810 for l_ehs_rec in c_ehs(l_parent_rec.elig_hrly_slrd_prte_id,l_mirror_src_entity_result_id,'EHS' ) loop
6811 --
6812 l_table_route_id := null ;
6813 open ben_plan_design_program_module.g_table_route('EHS');
6814 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
6815 close ben_plan_design_program_module.g_table_route ;
6816 --
6817 l_information5 := hr_general.decode_lookup('HOURLY_SALARIED_CODE',l_ehs_rec.hrly_slrd_cd)
6818 || ben_plan_design_program_module.get_exclude_message(l_ehs_rec.excld_flag);
6819 --'Intersection';
6820 --
6821 if p_effective_date between l_ehs_rec.effective_start_date
6822 and l_ehs_rec.effective_end_date then
6823 --
6824 l_result_type_cd := 'DISPLAY';
6825 else
6826 l_result_type_cd := 'NO DISPLAY';
6827 end if;
6828 --
6829 l_copy_entity_result_id := null;
6830 l_object_version_number := null;
6831 ben_copy_entity_results_api.create_copy_entity_results(
6832 p_copy_entity_result_id => l_copy_entity_result_id,
6833 p_copy_entity_txn_id => p_copy_entity_txn_id,
6834 p_result_type_cd => l_result_type_cd,
6835 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
6836 p_parent_entity_result_id => l_mirror_src_entity_result_id,
6837 p_number_of_copies => l_number_of_copies,
6838 p_table_route_id => l_table_route_id,
6839 P_TABLE_ALIAS => 'EHS',
6840 p_information1 => l_ehs_rec.elig_hrly_slrd_prte_id,
6841 p_information2 => l_ehs_rec.EFFECTIVE_START_DATE,
6842 p_information3 => l_ehs_rec.EFFECTIVE_END_DATE,
6843 p_information4 => l_ehs_rec.business_group_id,
6844 p_information5 => l_information5 , -- 9999 put name for h-grid
6845 p_information111 => l_ehs_rec.ehs_attribute1,
6846 p_information120 => l_ehs_rec.ehs_attribute10,
6847 p_information121 => l_ehs_rec.ehs_attribute11,
6848 p_information122 => l_ehs_rec.ehs_attribute12,
6849 p_information123 => l_ehs_rec.ehs_attribute13,
6850 p_information124 => l_ehs_rec.ehs_attribute14,
6851 p_information125 => l_ehs_rec.ehs_attribute15,
6852 p_information126 => l_ehs_rec.ehs_attribute16,
6853 p_information127 => l_ehs_rec.ehs_attribute17,
6854 p_information128 => l_ehs_rec.ehs_attribute18,
6855 p_information129 => l_ehs_rec.ehs_attribute19,
6856 p_information112 => l_ehs_rec.ehs_attribute2,
6857 p_information130 => l_ehs_rec.ehs_attribute20,
6858 p_information131 => l_ehs_rec.ehs_attribute21,
6859 p_information132 => l_ehs_rec.ehs_attribute22,
6860 p_information133 => l_ehs_rec.ehs_attribute23,
6861 p_information134 => l_ehs_rec.ehs_attribute24,
6862 p_information135 => l_ehs_rec.ehs_attribute25,
6863 p_information136 => l_ehs_rec.ehs_attribute26,
6864 p_information137 => l_ehs_rec.ehs_attribute27,
6865 p_information138 => l_ehs_rec.ehs_attribute28,
6866 p_information139 => l_ehs_rec.ehs_attribute29,
6867 p_information113 => l_ehs_rec.ehs_attribute3,
6868 p_information140 => l_ehs_rec.ehs_attribute30,
6869 p_information114 => l_ehs_rec.ehs_attribute4,
6870 p_information115 => l_ehs_rec.ehs_attribute5,
6871 p_information116 => l_ehs_rec.ehs_attribute6,
6872 p_information117 => l_ehs_rec.ehs_attribute7,
6873 p_information118 => l_ehs_rec.ehs_attribute8,
6874 p_information119 => l_ehs_rec.ehs_attribute9,
6875 p_information110 => l_ehs_rec.ehs_attribute_category,
6876 p_information263 => l_ehs_rec.eligy_prfl_id,
6877 p_information12 => l_ehs_rec.excld_flag,
6878 p_information11 => l_ehs_rec.hrly_slrd_cd,
6879 p_information260 => l_ehs_rec.ordr_num,
6880 p_information265 => l_ehs_rec.object_version_number,
6881 p_information295 => l_ehs_rec.criteria_score,
6882 p_information296 => l_ehs_rec.criteria_weight,
6883 --
6884
6885 -- END REPLACE PARAMETER LINES
6886
6887 p_object_version_number => l_object_version_number,
6888 p_effective_date => p_effective_date );
6889 --
6890
6891 if l_out_ehs_result_id is null then
6892 l_out_ehs_result_id := l_copy_entity_result_id;
6893 end if;
6894
6895 if l_result_type_cd = 'DISPLAY' then
6896 l_out_ehs_result_id := l_copy_entity_result_id ;
6897 end if;
6898 --
6899 end loop;
6900 --
6901 end loop;
6902 ---------------------------------------------------------------
6903 -- END OF BEN_ELIG_HRLY_SLRD_PRTE_F ----------------------
6904 ---------------------------------------------------------------
6905 ---------------------------------------------------------------
6906 -- START OF BEN_ELIG_HRS_WKD_PRTE_F ----------------------
6907 ---------------------------------------------------------------
6908 --
6909 for l_parent_rec in c_ehw_from_parent(l_ELIGY_PRFL_ID) loop
6910 --
6911 l_mirror_src_entity_result_id := l_out_elp_result_id ;
6912 --
6913 l_elig_hrs_wkd_prte_id := l_parent_rec.elig_hrs_wkd_prte_id ;
6914 --
6915 for l_ehw_rec in c_ehw(l_parent_rec.elig_hrs_wkd_prte_id,l_mirror_src_entity_result_id,'EHW' ) loop
6916 --
6917 l_table_route_id := null ;
6918 open ben_plan_design_program_module.g_table_route('EHW');
6919 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
6920 close ben_plan_design_program_module.g_table_route ;
6921 --
6922 l_information5 := ben_plan_design_program_module.get_hrs_wkd_in_perd_fctr_name(l_ehw_rec.hrs_wkd_in_perd_fctr_id)
6923 || ben_plan_design_program_module.get_exclude_message(l_ehw_rec.excld_flag);
6924 --'Intersection';
6925 --
6926 if p_effective_date between l_ehw_rec.effective_start_date
6927 and l_ehw_rec.effective_end_date then
6928 --
6929 l_result_type_cd := 'DISPLAY';
6930 else
6931 l_result_type_cd := 'NO DISPLAY';
6932 end if;
6933 --
6934 l_copy_entity_result_id := null;
6935 l_object_version_number := null;
6936 ben_copy_entity_results_api.create_copy_entity_results(
6937 p_copy_entity_result_id => l_copy_entity_result_id,
6938 p_copy_entity_txn_id => p_copy_entity_txn_id,
6939 p_result_type_cd => l_result_type_cd,
6940 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
6941 p_parent_entity_result_id => l_mirror_src_entity_result_id,
6942 p_number_of_copies => l_number_of_copies,
6943 p_table_route_id => l_table_route_id,
6944 P_TABLE_ALIAS => 'EHW',
6945 p_information1 => l_ehw_rec.elig_hrs_wkd_prte_id,
6946 p_information2 => l_ehw_rec.EFFECTIVE_START_DATE,
6947 p_information3 => l_ehw_rec.EFFECTIVE_END_DATE,
6948 p_information4 => l_ehw_rec.business_group_id,
6949 p_information5 => l_information5 , -- 9999 put name for h-grid
6950 p_information111 => l_ehw_rec.ehw_attribute1,
6951 p_information120 => l_ehw_rec.ehw_attribute10,
6952 p_information121 => l_ehw_rec.ehw_attribute11,
6953 p_information122 => l_ehw_rec.ehw_attribute12,
6954 p_information123 => l_ehw_rec.ehw_attribute13,
6955 p_information124 => l_ehw_rec.ehw_attribute14,
6956 p_information125 => l_ehw_rec.ehw_attribute15,
6957 p_information126 => l_ehw_rec.ehw_attribute16,
6958 p_information127 => l_ehw_rec.ehw_attribute17,
6959 p_information128 => l_ehw_rec.ehw_attribute18,
6960 p_information129 => l_ehw_rec.ehw_attribute19,
6961 p_information112 => l_ehw_rec.ehw_attribute2,
6962 p_information130 => l_ehw_rec.ehw_attribute20,
6963 p_information131 => l_ehw_rec.ehw_attribute21,
6964 p_information132 => l_ehw_rec.ehw_attribute22,
6965 p_information133 => l_ehw_rec.ehw_attribute23,
6966 p_information134 => l_ehw_rec.ehw_attribute24,
6967 p_information135 => l_ehw_rec.ehw_attribute25,
6968 p_information136 => l_ehw_rec.ehw_attribute26,
6969 p_information137 => l_ehw_rec.ehw_attribute27,
6970 p_information138 => l_ehw_rec.ehw_attribute28,
6971 p_information139 => l_ehw_rec.ehw_attribute29,
6972 p_information113 => l_ehw_rec.ehw_attribute3,
6973 p_information140 => l_ehw_rec.ehw_attribute30,
6974 p_information114 => l_ehw_rec.ehw_attribute4,
6975 p_information115 => l_ehw_rec.ehw_attribute5,
6976 p_information116 => l_ehw_rec.ehw_attribute6,
6977 p_information117 => l_ehw_rec.ehw_attribute7,
6978 p_information118 => l_ehw_rec.ehw_attribute8,
6979 p_information119 => l_ehw_rec.ehw_attribute9,
6980 p_information110 => l_ehw_rec.ehw_attribute_category,
6981 p_information263 => l_ehw_rec.eligy_prfl_id,
6982 p_information11 => l_ehw_rec.excld_flag,
6983 p_information224 => l_ehw_rec.hrs_wkd_in_perd_fctr_id,
6984 p_information260 => l_ehw_rec.ordr_num,
6985 p_information265 => l_ehw_rec.object_version_number,
6986 p_information295 => l_ehw_rec.criteria_score,
6987 p_information296 => l_ehw_rec.criteria_weight,
6988 --
6989
6990 -- END REPLACE PARAMETER LINES
6991
6992 p_object_version_number => l_object_version_number,
6993 p_effective_date => p_effective_date );
6994 --
6995
6996 if l_out_ehw_result_id is null then
6997 l_out_ehw_result_id := l_copy_entity_result_id;
6998 end if;
6999
7000 if l_result_type_cd = 'DISPLAY' then
7001 l_out_ehw_result_id := l_copy_entity_result_id ;
7002 end if;
7003 --
7004 end loop;
7005 --
7006 for l_ehw_rec in c_ehw_drp(l_parent_rec.elig_hrs_wkd_prte_id,l_mirror_src_entity_result_id,'EHW' ) loop
7007 ben_pd_rate_and_cvg_module.create_drpar_results
7008 (
7009 p_validate => p_validate
7010 ,p_copy_entity_result_id => l_out_ehw_result_id
7011 ,p_copy_entity_txn_id => p_copy_entity_txn_id
7012 ,p_comp_lvl_fctr_id => null
7013 ,p_hrs_wkd_in_perd_fctr_id => l_ehw_rec.hrs_wkd_in_perd_fctr_id
7014 ,p_los_fctr_id => null
7015 ,p_pct_fl_tm_fctr_id => null
7016 ,p_age_fctr_id => null
7017 ,p_cmbn_age_los_fctr_id => null
7018 ,p_business_group_id => p_business_group_id
7019 ,p_number_of_copies => p_number_of_copies
7020 ,p_object_version_number => l_object_version_number
7021 ,p_effective_date => p_effective_date
7022 );
7023 end loop;
7024 end loop;
7025 ---------------------------------------------------------------
7026 -- END OF BEN_ELIG_HRS_WKD_PRTE_F ----------------------
7027 ---------------------------------------------------------------
7028 ---------------------------------------------------------------
7029 -- START OF BEN_ELIG_JOB_PRTE_F ----------------------
7030 ---------------------------------------------------------------
7031 --
7032 for l_parent_rec in c_ejp_from_parent(l_ELIGY_PRFL_ID) loop
7033 --
7034 l_mirror_src_entity_result_id := l_out_elp_result_id ;
7035 --
7036 l_elig_job_prte_id := l_parent_rec.elig_job_prte_id ;
7037 --
7038 for l_ejp_rec in c_ejp(l_parent_rec.elig_job_prte_id,l_mirror_src_entity_result_id,'EJP' ) loop
7039 --
7040 l_table_route_id := null ;
7041 open ben_plan_design_program_module.g_table_route('EJP');
7042 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
7043 close ben_plan_design_program_module.g_table_route ;
7044 --
7045 l_information5 := ben_plan_design_program_module.get_job_name(l_ejp_rec.job_id)
7046 || ben_plan_design_program_module.get_exclude_message(l_ejp_rec.excld_flag); --'Intersection';
7047 --
7048 if p_effective_date between l_ejp_rec.effective_start_date
7049 and l_ejp_rec.effective_end_date then
7050 --
7051 l_result_type_cd := 'DISPLAY';
7052 else
7053 l_result_type_cd := 'NO DISPLAY';
7054 end if;
7055 --
7056 l_copy_entity_result_id := null;
7057 l_object_version_number := null;
7058
7059 -- To store effective_start_date of job
7060 -- for Mapping - Bug 2958658
7061 --
7062 l_job_start_date := null;
7063 if l_ejp_rec.job_id is not null then
7064 open c_job_start_date(l_ejp_rec.job_id);
7065 fetch c_job_start_date into l_job_start_date;
7066 close c_job_start_date;
7067 end if;
7068
7069 --
7070 -- pabodla : MAPPING DATA : Store the mapping column information.
7071 --
7072 l_mapping_name := null;
7073 l_mapping_id := null;
7074 --
7075 -- Get the defined balance name to display on mapping page.
7076 --
7077 open c_get_mapping_name3(l_ejp_rec.job_id,NVL(l_job_start_date,p_effective_date));
7078 fetch c_get_mapping_name3 into l_mapping_name;
7079 close c_get_mapping_name3;
7080 --
7081 l_mapping_id := l_ejp_rec.job_id;
7082 --
7083 --To set user friendly labels on the mapping page
7084 --
7085 l_mapping_column_name1 := null;
7086 l_mapping_column_name2 :=null;
7087 BEN_PLAN_DESIGN_TXNS_API.get_mapping_column_name(l_table_route_id,
7088 l_mapping_column_name1,
7089 l_mapping_column_name2,
7090 p_copy_entity_txn_id);
7091 --
7092
7093 ben_copy_entity_results_api.create_copy_entity_results(
7094 p_copy_entity_result_id => l_copy_entity_result_id,
7095 p_copy_entity_txn_id => p_copy_entity_txn_id,
7096 p_result_type_cd => l_result_type_cd,
7097 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
7098 p_parent_entity_result_id => l_mirror_src_entity_result_id,
7099 p_number_of_copies => l_number_of_copies,
7100 p_table_route_id => l_table_route_id,
7101 P_TABLE_ALIAS => 'EJP',
7102 p_information1 => l_ejp_rec.elig_job_prte_id,
7103 p_information2 => l_ejp_rec.EFFECTIVE_START_DATE,
7104 p_information3 => l_ejp_rec.EFFECTIVE_END_DATE,
7105 p_information4 => l_ejp_rec.business_group_id,
7106 p_information5 => l_information5 , -- 9999 put name for h-grid
7107 p_information111 => l_ejp_rec.ejp_attribute1,
7108 p_information120 => l_ejp_rec.ejp_attribute10,
7109 p_information121 => l_ejp_rec.ejp_attribute11,
7110 p_information122 => l_ejp_rec.ejp_attribute12,
7111 p_information123 => l_ejp_rec.ejp_attribute13,
7112 p_information124 => l_ejp_rec.ejp_attribute14,
7113 p_information125 => l_ejp_rec.ejp_attribute15,
7114 p_information126 => l_ejp_rec.ejp_attribute16,
7115 p_information127 => l_ejp_rec.ejp_attribute17,
7116 p_information128 => l_ejp_rec.ejp_attribute18,
7117 p_information129 => l_ejp_rec.ejp_attribute19,
7118 p_information112 => l_ejp_rec.ejp_attribute2,
7119 p_information130 => l_ejp_rec.ejp_attribute20,
7120 p_information131 => l_ejp_rec.ejp_attribute21,
7121 p_information132 => l_ejp_rec.ejp_attribute22,
7122 p_information133 => l_ejp_rec.ejp_attribute23,
7123 p_information134 => l_ejp_rec.ejp_attribute24,
7124 p_information135 => l_ejp_rec.ejp_attribute25,
7125 p_information136 => l_ejp_rec.ejp_attribute26,
7126 p_information137 => l_ejp_rec.ejp_attribute27,
7127 p_information138 => l_ejp_rec.ejp_attribute28,
7128 p_information139 => l_ejp_rec.ejp_attribute29,
7129 p_information113 => l_ejp_rec.ejp_attribute3,
7130 p_information140 => l_ejp_rec.ejp_attribute30,
7131 p_information114 => l_ejp_rec.ejp_attribute4,
7132 p_information115 => l_ejp_rec.ejp_attribute5,
7133 p_information116 => l_ejp_rec.ejp_attribute6,
7134 p_information117 => l_ejp_rec.ejp_attribute7,
7135 p_information118 => l_ejp_rec.ejp_attribute8,
7136 p_information119 => l_ejp_rec.ejp_attribute9,
7137 p_information110 => l_ejp_rec.ejp_attribute_category,
7138 p_information263 => l_ejp_rec.eligy_prfl_id,
7139 p_information11 => l_ejp_rec.excld_flag,
7140 p_information226 => l_ejp_rec.job_id,
7141 -- Data for MAPPING columns.
7142 p_information173 => l_mapping_name,
7143 p_information174 => l_mapping_id,
7144 p_information181 => l_mapping_column_name1,
7145 p_information182 => l_mapping_column_name2,
7146 -- END other product Mapping columns.
7147 p_information260 => l_ejp_rec.ordr_num,
7148 p_information166 => l_job_start_date,
7149 p_information265 => l_ejp_rec.object_version_number,
7150 p_information295 => l_ejp_rec.criteria_score,
7151 p_information296 => l_ejp_rec.criteria_weight,
7152 --
7153
7154 -- END REPLACE PARAMETER LINES
7155
7156 p_object_version_number => l_object_version_number,
7157 p_effective_date => p_effective_date );
7158 --
7159
7160 if l_out_ejp_result_id is null then
7161 l_out_ejp_result_id := l_copy_entity_result_id;
7162 end if;
7163
7164 if l_result_type_cd = 'DISPLAY' then
7165 l_out_ejp_result_id := l_copy_entity_result_id ;
7166 end if;
7167 --
7168 end loop;
7169 --
7170 end loop;
7171 ---------------------------------------------------------------
7172 -- END OF BEN_ELIG_JOB_PRTE_F ----------------------
7173 ---------------------------------------------------------------
7174 ---------------------------------------------------------------
7175 -- START OF BEN_ELIG_LBR_MMBR_PRTE_F ----------------------
7176 ---------------------------------------------------------------
7177 --
7178 for l_parent_rec in c_elu_from_parent(l_ELIGY_PRFL_ID) loop
7179 --
7180 l_mirror_src_entity_result_id := l_out_elp_result_id ;
7181 --
7182 l_elig_lbr_mmbr_prte_id := l_parent_rec.elig_lbr_mmbr_prte_id ;
7183 --
7184 for l_elu_rec in c_elu(l_parent_rec.elig_lbr_mmbr_prte_id,l_mirror_src_entity_result_id,'ELU' ) loop
7185 --
7186 l_table_route_id := null ;
7187 open ben_plan_design_program_module.g_table_route('ELU');
7188 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
7189 close ben_plan_design_program_module.g_table_route ;
7190 --
7191 l_information5 := ben_plan_design_program_module.get_lbr_mmbr_name(l_elu_rec.lbr_mmbr_flag)
7192 || ben_plan_design_program_module.get_exclude_message(l_elu_rec.excld_flag);
7193 --'Intersection';
7194 --
7195 if p_effective_date between l_elu_rec.effective_start_date
7196 and l_elu_rec.effective_end_date then
7197 --
7198 l_result_type_cd := 'DISPLAY';
7199 else
7200 l_result_type_cd := 'NO DISPLAY';
7201 end if;
7202 --
7203 l_copy_entity_result_id := null;
7204 l_object_version_number := null;
7205 ben_copy_entity_results_api.create_copy_entity_results(
7206 p_copy_entity_result_id => l_copy_entity_result_id,
7207 p_copy_entity_txn_id => p_copy_entity_txn_id,
7208 p_result_type_cd => l_result_type_cd,
7209 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
7210 p_parent_entity_result_id => l_mirror_src_entity_result_id,
7211 p_number_of_copies => l_number_of_copies,
7212 p_table_route_id => l_table_route_id,
7213 P_TABLE_ALIAS => 'ELU',
7214 p_information1 => l_elu_rec.elig_lbr_mmbr_prte_id,
7215 p_information2 => l_elu_rec.EFFECTIVE_START_DATE,
7216 p_information3 => l_elu_rec.EFFECTIVE_END_DATE,
7217 p_information4 => l_elu_rec.business_group_id,
7218 p_information5 => l_information5 , -- 9999 put name for h-grid
7219 p_information263 => l_elu_rec.eligy_prfl_id,
7220 p_information111 => l_elu_rec.elu_attribute1,
7221 p_information120 => l_elu_rec.elu_attribute10,
7222 p_information121 => l_elu_rec.elu_attribute11,
7223 p_information122 => l_elu_rec.elu_attribute12,
7224 p_information123 => l_elu_rec.elu_attribute13,
7225 p_information124 => l_elu_rec.elu_attribute14,
7226 p_information125 => l_elu_rec.elu_attribute15,
7227 p_information126 => l_elu_rec.elu_attribute16,
7228 p_information127 => l_elu_rec.elu_attribute17,
7229 p_information128 => l_elu_rec.elu_attribute18,
7230 p_information129 => l_elu_rec.elu_attribute19,
7231 p_information112 => l_elu_rec.elu_attribute2,
7232 p_information130 => l_elu_rec.elu_attribute20,
7233 p_information131 => l_elu_rec.elu_attribute21,
7234 p_information132 => l_elu_rec.elu_attribute22,
7235 p_information133 => l_elu_rec.elu_attribute23,
7236 p_information134 => l_elu_rec.elu_attribute24,
7237 p_information135 => l_elu_rec.elu_attribute25,
7238 p_information136 => l_elu_rec.elu_attribute26,
7239 p_information137 => l_elu_rec.elu_attribute27,
7240 p_information138 => l_elu_rec.elu_attribute28,
7241 p_information139 => l_elu_rec.elu_attribute29,
7242 p_information113 => l_elu_rec.elu_attribute3,
7243 p_information140 => l_elu_rec.elu_attribute30,
7244 p_information114 => l_elu_rec.elu_attribute4,
7245 p_information115 => l_elu_rec.elu_attribute5,
7246 p_information116 => l_elu_rec.elu_attribute6,
7247 p_information117 => l_elu_rec.elu_attribute7,
7248 p_information118 => l_elu_rec.elu_attribute8,
7249 p_information119 => l_elu_rec.elu_attribute9,
7250 p_information110 => l_elu_rec.elu_attribute_category,
7251 p_information11 => l_elu_rec.excld_flag,
7252 p_information12 => l_elu_rec.lbr_mmbr_flag,
7253 p_information260 => l_elu_rec.ordr_num,
7254 p_information265 => l_elu_rec.object_version_number,
7255 p_information295 => l_elu_rec.criteria_score,
7256 p_information296 => l_elu_rec.criteria_weight,
7257 --
7258
7259 -- END REPLACE PARAMETER LINES
7260
7261 p_object_version_number => l_object_version_number,
7262 p_effective_date => p_effective_date );
7263
7264 --
7265
7266 if l_out_elu_result_id is null then
7267 l_out_elu_result_id := l_copy_entity_result_id;
7268 end if;
7269
7270 if l_result_type_cd = 'DISPLAY' then
7271 l_out_elu_result_id := l_copy_entity_result_id ;
7272 end if;
7273 --
7274 end loop;
7275 --
7276 end loop;
7277 ---------------------------------------------------------------
7278 -- END OF BEN_ELIG_LBR_MMBR_PRTE_F ----------------------
7279 ---------------------------------------------------------------
7280 ---------------------------------------------------------------
7281 -- START OF BEN_ELIG_LGL_ENTY_PRTE_F ----------------------
7282 ---------------------------------------------------------------
7283 --
7284 for l_parent_rec in c_eln_from_parent(l_ELIGY_PRFL_ID) loop
7285 --
7286 l_mirror_src_entity_result_id := l_out_elp_result_id ;
7287 --
7288 l_elig_lgl_enty_prte_id := l_parent_rec.elig_lgl_enty_prte_id ;
7289 --
7290 for l_eln_rec in c_eln(l_parent_rec.elig_lgl_enty_prte_id,l_mirror_src_entity_result_id,'ELN' ) loop
7291 --
7292 l_table_route_id := null ;
7293 open ben_plan_design_program_module.g_table_route('ELN');
7294 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
7295 close ben_plan_design_program_module.g_table_route ;
7296 --
7297 l_information5 := ben_plan_design_program_module.get_organization_name(l_eln_rec.organization_id)
7298 || ben_plan_design_program_module.get_exclude_message(l_eln_rec.excld_flag);
7299 --'Intersection';
7300 --
7301 if p_effective_date between l_eln_rec.effective_start_date
7302 and l_eln_rec.effective_end_date then
7303 --
7304 l_result_type_cd := 'DISPLAY';
7305 else
7306 l_result_type_cd := 'NO DISPLAY';
7307 end if;
7308 --
7309 l_copy_entity_result_id := null;
7310 l_object_version_number := null;
7311
7312 -- To store effective_start_date of organization
7313 -- for Mapping - Bug 2958658
7314 --
7315 l_organization_start_date := null;
7316 if l_eln_rec.organization_id is not null then
7317 open c_organization_start_date(l_eln_rec.organization_id);
7318 fetch c_organization_start_date into l_organization_start_date;
7319 close c_organization_start_date;
7320 end if;
7321
7322 --
7323 -- pabodla : MAPPING DATA : Store the mapping column information.
7324 --
7325
7326 l_mapping_name := null;
7327 l_mapping_id := null;
7328 --
7329 -- Get the defined balance name to display on mapping page.
7330 --
7331 open c_get_mapping_name4(l_eln_rec.organization_id,NVL(l_organization_start_date,p_effective_date));
7332 fetch c_get_mapping_name4 into l_mapping_name;
7333 close c_get_mapping_name4;
7334 --
7335 l_mapping_id := l_eln_rec.organization_id;
7336 --
7337 --To set user friendly labels on the mapping page
7338 --
7339 l_mapping_column_name1 := null;
7340 l_mapping_column_name2 :=null;
7341 BEN_PLAN_DESIGN_TXNS_API.get_mapping_column_name(l_table_route_id,
7342 l_mapping_column_name1,
7343 l_mapping_column_name2,
7344 p_copy_entity_txn_id);
7345 --
7346
7347 ben_copy_entity_results_api.create_copy_entity_results(
7348 p_copy_entity_result_id => l_copy_entity_result_id,
7349 p_copy_entity_txn_id => p_copy_entity_txn_id,
7350 p_result_type_cd => l_result_type_cd,
7351 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
7352 p_parent_entity_result_id => l_mirror_src_entity_result_id,
7353 p_number_of_copies => l_number_of_copies,
7354 p_table_route_id => l_table_route_id,
7355 P_TABLE_ALIAS => 'ELN',
7356 p_information1 => l_eln_rec.elig_lgl_enty_prte_id,
7357 p_information2 => l_eln_rec.EFFECTIVE_START_DATE,
7358 p_information3 => l_eln_rec.EFFECTIVE_END_DATE,
7359 p_information4 => l_eln_rec.business_group_id,
7360 p_information5 => l_information5 , -- 9999 put name for h-grid
7361 p_information263 => l_eln_rec.eligy_prfl_id,
7362 p_information111 => l_eln_rec.eln_attribute1,
7363 p_information120 => l_eln_rec.eln_attribute10,
7364 p_information121 => l_eln_rec.eln_attribute11,
7365 p_information122 => l_eln_rec.eln_attribute12,
7366 p_information123 => l_eln_rec.eln_attribute13,
7367 p_information124 => l_eln_rec.eln_attribute14,
7368 p_information125 => l_eln_rec.eln_attribute15,
7369 p_information126 => l_eln_rec.eln_attribute16,
7370 p_information127 => l_eln_rec.eln_attribute17,
7371 p_information128 => l_eln_rec.eln_attribute18,
7372 p_information129 => l_eln_rec.eln_attribute19,
7373 p_information112 => l_eln_rec.eln_attribute2,
7374 p_information130 => l_eln_rec.eln_attribute20,
7375 p_information131 => l_eln_rec.eln_attribute21,
7376 p_information132 => l_eln_rec.eln_attribute22,
7377 p_information133 => l_eln_rec.eln_attribute23,
7378 p_information134 => l_eln_rec.eln_attribute24,
7379 p_information135 => l_eln_rec.eln_attribute25,
7380 p_information136 => l_eln_rec.eln_attribute26,
7381 p_information137 => l_eln_rec.eln_attribute27,
7382 p_information138 => l_eln_rec.eln_attribute28,
7383 p_information139 => l_eln_rec.eln_attribute29,
7384 p_information113 => l_eln_rec.eln_attribute3,
7385 p_information140 => l_eln_rec.eln_attribute30,
7386 p_information114 => l_eln_rec.eln_attribute4,
7387 p_information115 => l_eln_rec.eln_attribute5,
7388 p_information116 => l_eln_rec.eln_attribute6,
7389 p_information117 => l_eln_rec.eln_attribute7,
7390 p_information118 => l_eln_rec.eln_attribute8,
7391 p_information119 => l_eln_rec.eln_attribute9,
7392 p_information110 => l_eln_rec.eln_attribute_category,
7393 p_information11 => l_eln_rec.excld_flag,
7394 p_information260 => l_eln_rec.ordr_num,
7395 p_information252 => l_eln_rec.organization_id,
7396 -- Data for MAPPING columns.
7397 p_information173 => l_mapping_name,
7398 p_information174 => l_mapping_id,
7399 p_information181 => l_mapping_column_name1,
7400 p_information182 => l_mapping_column_name2,
7401 -- END other product Mapping columns.
7402 p_information166 => l_organization_start_date,
7403 p_information265 => l_eln_rec.object_version_number,
7404 p_information295 => l_eln_rec.criteria_score,
7405 p_information296 => l_eln_rec.criteria_weight,
7406 --
7407
7408 -- END REPLACE PARAMETER LINES
7409
7410 p_object_version_number => l_object_version_number,
7411 p_effective_date => p_effective_date );
7412 --
7413
7414 if l_out_eln_result_id is null then
7415 l_out_eln_result_id := l_copy_entity_result_id;
7416 end if;
7417
7418 if l_result_type_cd = 'DISPLAY' then
7419 l_out_eln_result_id := l_copy_entity_result_id ;
7420 end if;
7421 --
7422 end loop;
7423 --
7424 end loop;
7425 ---------------------------------------------------------------
7426 -- END OF BEN_ELIG_LGL_ENTY_PRTE_F ----------------------
7427 ---------------------------------------------------------------
7428 ---------------------------------------------------------------
7429 -- START OF BEN_ELIG_COMPTNCY_PRTE_F ----------------------
7430 ---------------------------------------------------------------
7431 --
7432 for l_parent_rec in c_ecy_from_parent(l_ELIGY_PRFL_ID) loop
7433 --
7434
7435 l_mirror_src_entity_result_id := l_out_elp_result_id ;
7436
7437 --
7438 l_elig_comptncy_prte_id := l_parent_rec.elig_comptncy_prte_id ;
7439 --
7440 for l_ecy_rec in c_ecy(l_parent_rec.elig_comptncy_prte_id,l_mirror_src_entity_result_id,'ECY' ) loop
7441 --
7442 l_table_route_id := null ;
7443 open ben_plan_design_program_module.g_table_route('ECY');
7444 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
7445 close ben_plan_design_program_module.g_table_route ;
7446 --
7447 l_information5 := ben_plan_design_program_module.get_competence_rating_name
7448 (l_ecy_rec.competence_id
7449 ,l_ecy_rec.rating_level_id)
7450 || ben_plan_design_program_module.get_exclude_message(l_ecy_rec.excld_flag);
7451 -- 'Intersection'
7452 --
7453 if p_effective_date between l_ecy_rec.effective_start_date
7454 and l_ecy_rec.effective_end_date then
7455 --
7456 l_result_type_cd := 'DISPLAY';
7457 else
7458 l_result_type_cd := 'NO DISPLAY';
7459 end if;
7460 --
7461
7462 -- To store effective_start_date of competence
7463 -- for Mapping - Bug 2958658
7464 --
7465 l_competence_start_date := null;
7466 if l_ecy_rec.competence_id is not null then
7467 open c_competence_start_date(l_ecy_rec.competence_id);
7468 fetch c_competence_start_date into l_competence_start_date;
7469 close c_competence_start_date;
7470 end if;
7471
7472 --
7473 -- pabodla : MAPPING DATA : Store the mapping column information.
7474 --
7475 l_mapping_name := null;
7476 l_mapping_id := null;
7477 l_mapping_name1:= null;
7478 l_mapping_id1 := null;
7479 --
7480 -- Get the competence and Rating name to display on mapping page.
7481 --
7482 -- 9999 needs review
7483 open c_get_mapping_name16(l_ecy_rec.competence_id,NVL(l_competence_start_date,p_effective_date));
7484 fetch c_get_mapping_name16 into l_mapping_name;
7485 close c_get_mapping_name16;
7486 --
7487 l_mapping_id := l_ecy_rec.competence_id;
7488 --
7489 open c_get_mapping_name17(l_ecy_rec.rating_level_id,
7490 p_business_group_id);
7491 fetch c_get_mapping_name17 into l_mapping_name1;
7492 close c_get_mapping_name17;
7493 --
7494 l_mapping_id1 := l_ecy_rec.rating_level_id;
7495 --
7496 --To set user friendly labels on the mapping page
7497 --
7498 l_mapping_column_name1 := null;
7499 l_mapping_column_name2 :=null;
7500 BEN_PLAN_DESIGN_TXNS_API.get_mapping_column_name(l_table_route_id,
7501 l_mapping_column_name1,
7502 l_mapping_column_name2,
7503 p_copy_entity_txn_id);
7504 --
7505 hr_utility.set_location('l_mapping_id '||l_mapping_id,100);
7506 hr_utility.set_location('l_mapping_name '||l_mapping_name,100);
7507 hr_utility.set_location('l_mapping_id1 '||l_mapping_id1,100);
7508 hr_utility.set_location('l_mapping_name1 '||l_mapping_name1,100);
7509 --
7510
7511 l_copy_entity_result_id := null;
7512 l_object_version_number := null;
7513 ben_copy_entity_results_api.create_copy_entity_results(
7514 p_copy_entity_result_id => l_copy_entity_result_id,
7515 p_copy_entity_txn_id => p_copy_entity_txn_id,
7516 p_result_type_cd => l_result_type_cd,
7517 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
7518 p_parent_entity_result_id => l_mirror_src_entity_result_id,
7519 p_number_of_copies => l_number_of_copies,
7520 p_table_route_id => l_table_route_id,
7521 P_TABLE_ALIAS => 'ECY',
7522 p_information1 => l_ecy_rec.elig_comptncy_prte_id,
7523 p_information2 => l_ecy_rec.EFFECTIVE_START_DATE,
7524 p_information3 => l_ecy_rec.EFFECTIVE_END_DATE,
7525 p_information4 => l_ecy_rec.business_group_id,
7526 p_information5 => l_information5 , -- 9999 put name for h-grid
7527 -- Data for MAPPING columns.
7528 p_information173 => l_mapping_name,
7529 p_information174 => l_mapping_id,
7530 p_information181 => l_mapping_column_name1,
7531 p_information182 => l_mapping_column_name2,
7532 -- END other product Mapping columns.
7533 p_information111 => l_ecy_rec.ecy_attribute1,
7534 p_information120 => l_ecy_rec.ecy_attribute10,
7535 p_information121 => l_ecy_rec.ecy_attribute11,
7536 p_information122 => l_ecy_rec.ecy_attribute12,
7537 p_information123 => l_ecy_rec.ecy_attribute13,
7538 p_information124 => l_ecy_rec.ecy_attribute14,
7539 p_information125 => l_ecy_rec.ecy_attribute15,
7540 p_information126 => l_ecy_rec.ecy_attribute16,
7541 p_information127 => l_ecy_rec.ecy_attribute17,
7542 p_information128 => l_ecy_rec.ecy_attribute18,
7543 p_information129 => l_ecy_rec.ecy_attribute19,
7544 p_information112 => l_ecy_rec.ecy_attribute2,
7545 p_information130 => l_ecy_rec.ecy_attribute20,
7546 p_information131 => l_ecy_rec.ecy_attribute21,
7547 p_information132 => l_ecy_rec.ecy_attribute22,
7548 p_information133 => l_ecy_rec.ecy_attribute23,
7549 p_information134 => l_ecy_rec.ecy_attribute24,
7550 p_information135 => l_ecy_rec.ecy_attribute25,
7551 p_information136 => l_ecy_rec.ecy_attribute26,
7552 p_information137 => l_ecy_rec.ecy_attribute27,
7553 p_information138 => l_ecy_rec.ecy_attribute28,
7554 p_information139 => l_ecy_rec.ecy_attribute29,
7555 p_information113 => l_ecy_rec.ecy_attribute3,
7556 p_information140 => l_ecy_rec.ecy_attribute30,
7557 p_information114 => l_ecy_rec.ecy_attribute4,
7558 p_information115 => l_ecy_rec.ecy_attribute5,
7559 p_information116 => l_ecy_rec.ecy_attribute6,
7560 p_information117 => l_ecy_rec.ecy_attribute7,
7561 p_information118 => l_ecy_rec.ecy_attribute8,
7562 p_information119 => l_ecy_rec.ecy_attribute9,
7563 p_information110 => l_ecy_rec.ecy_attribute_category,
7564 p_information263 => l_ecy_rec.eligy_prfl_id,
7565 p_information11 => l_ecy_rec.excld_flag,
7566 p_information257 => l_ecy_rec.ordr_num,
7567 -- Data for MAPPING columns.
7568 p_information177 => l_mapping_name1,
7569 p_information178 => l_mapping_id1,
7570 -- END other product Mapping columns.
7571 p_information166 => l_competence_start_date,
7572 p_information306 => NULL, -- No ESD for Rating Level
7573 p_information265 => l_ecy_rec.object_version_number,
7574 p_information295 => l_ecy_rec.criteria_score,
7575 p_information296 => l_ecy_rec.criteria_weight,
7576 --
7577
7578 -- END REPLACE PARAMETER LINES
7579
7580 p_object_version_number => l_object_version_number,
7581 p_effective_date => p_effective_date );
7582 --
7583
7584 if l_out_ecy_result_id is null then
7585 l_out_ecy_result_id := l_copy_entity_result_id;
7586 end if;
7587
7588 if l_result_type_cd = 'DISPLAY' then
7589 l_out_ecy_result_id := l_copy_entity_result_id ;
7590 end if;
7591 --
7592 end loop;
7593 --
7594 end loop;
7595 ---------------------------------------------------------------
7596 -- END OF BEN_ELIG_COMPTNCY_PRTE_F ----------------------
7597 ---------------------------------------------------------------
7598 ---------------------------------------------------------------
7599 -- START OF BEN_ELIG_LOA_RSN_PRTE_F ----------------------
7600 ---------------------------------------------------------------
7601 --
7602 for l_parent_rec in c_elr_from_parent(l_ELIGY_PRFL_ID) loop
7603 --
7604 l_mirror_src_entity_result_id := l_out_elp_result_id ;
7605 --
7606 l_elig_loa_rsn_prte_id := l_parent_rec.elig_loa_rsn_prte_id ;
7607 --
7608 for l_elr_rec in c_elr(l_parent_rec.elig_loa_rsn_prte_id,l_mirror_src_entity_result_id,'ELR' ) loop
7609 --
7610 l_table_route_id := null ;
7611 open ben_plan_design_program_module.g_table_route('ELR');
7612 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
7613 close ben_plan_design_program_module.g_table_route ;
7614 --
7615 l_information5 := ben_plan_design_program_module.get_absence_type_name(l_elr_rec.absence_attendance_type_id)
7616 || ben_plan_design_program_module.get_exclude_message(l_elr_rec.excld_flag);
7617 --'Intersection'
7618 --
7619 if p_effective_date between l_elr_rec.effective_start_date
7620 and l_elr_rec.effective_end_date then
7621 --
7622 l_result_type_cd := 'DISPLAY';
7623 else
7624 l_result_type_cd := 'NO DISPLAY';
7625 end if;
7626 --
7627 l_copy_entity_result_id := null;
7628 l_object_version_number := null;
7629
7630 -- To store effective_start_date of absence_type
7631 -- and absence_reason for Mapping - Bug 2958658
7632 --
7633 l_absence_type_start_date := null;
7634 if l_elr_rec.absence_attendance_type_id is not null then
7635 open c_absence_type_start_date(l_elr_rec.absence_attendance_type_id);
7636 fetch c_absence_type_start_date into l_absence_type_start_date;
7637 close c_absence_type_start_date;
7638 end if;
7639
7640 --
7641 -- pabodla : MAPPING DATA : Store the mapping column information.
7642 --
7643 l_mapping_name := null;
7644 l_mapping_id := null;
7645 l_mapping_name1:= null;
7646 l_mapping_id1 := null;
7647 --
7648 -- Get the Leave of Absence name to display on mapping page.
7649 --
7650 -- 9999 needs review
7651 open c_get_mapping_name5(l_elr_rec.absence_attendance_type_id,NVL(l_absence_type_start_date,p_effective_date));
7652 fetch c_get_mapping_name5 into l_mapping_name;
7653 close c_get_mapping_name5;
7654 --
7655 l_mapping_id := l_elr_rec.absence_attendance_type_id;
7656 --
7657 open c_get_mapping_name6(l_elr_rec.absence_attendance_type_id,
7658 l_elr_rec.abs_attendance_reason_id,
7659 NVL(l_absence_type_start_date,p_effective_date));
7660 fetch c_get_mapping_name6 into l_mapping_name1;
7661 close c_get_mapping_name6;
7662 --
7663 l_mapping_id1 := l_elr_rec.abs_attendance_reason_id;
7664 --
7665 --To set user friendly labels on the mapping page
7666 --
7667 l_mapping_column_name1 := null;
7668 l_mapping_column_name2 :=null;
7669 BEN_PLAN_DESIGN_TXNS_API.get_mapping_column_name(l_table_route_id,
7670 l_mapping_column_name1,
7671 l_mapping_column_name2,
7672 p_copy_entity_txn_id);
7673 --
7674
7675 ben_copy_entity_results_api.create_copy_entity_results(
7676 p_copy_entity_result_id => l_copy_entity_result_id,
7677 p_copy_entity_txn_id => p_copy_entity_txn_id,
7678 p_result_type_cd => l_result_type_cd,
7679 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
7680 p_parent_entity_result_id => l_mirror_src_entity_result_id,
7681 p_number_of_copies => l_number_of_copies,
7682 p_table_route_id => l_table_route_id,
7683 P_TABLE_ALIAS => 'ELR',
7684 p_information1 => l_elr_rec.elig_loa_rsn_prte_id,
7685 p_information2 => l_elr_rec.EFFECTIVE_START_DATE,
7686 p_information3 => l_elr_rec.EFFECTIVE_END_DATE,
7687 p_information4 => l_elr_rec.business_group_id,
7688 p_information5 => l_information5 , -- 9999 put name for h-grid
7689 -- Data for MAPPING columns.
7690 p_information173 => l_mapping_name,
7691 p_information174 => l_mapping_id,
7692 p_information181 => l_mapping_column_name1,
7693 p_information182 => l_mapping_column_name2,
7694 -- END other product Mapping columns.
7695 -- Data for MAPPING columns.
7696 p_information177 => l_mapping_name1,
7697 p_information178 => l_mapping_id1,
7698 -- END other product Mapping columns.
7699 p_information263 => l_elr_rec.eligy_prfl_id,
7700 p_information111 => l_elr_rec.elr_attribute1,
7701 p_information120 => l_elr_rec.elr_attribute10,
7702 p_information121 => l_elr_rec.elr_attribute11,
7703 p_information122 => l_elr_rec.elr_attribute12,
7704 p_information123 => l_elr_rec.elr_attribute13,
7705 p_information124 => l_elr_rec.elr_attribute14,
7706 p_information125 => l_elr_rec.elr_attribute15,
7707 p_information126 => l_elr_rec.elr_attribute16,
7708 p_information127 => l_elr_rec.elr_attribute17,
7709 p_information128 => l_elr_rec.elr_attribute18,
7710 p_information129 => l_elr_rec.elr_attribute19,
7711 p_information112 => l_elr_rec.elr_attribute2,
7712 p_information130 => l_elr_rec.elr_attribute20,
7713 p_information131 => l_elr_rec.elr_attribute21,
7714 p_information132 => l_elr_rec.elr_attribute22,
7715 p_information133 => l_elr_rec.elr_attribute23,
7716 p_information134 => l_elr_rec.elr_attribute24,
7717 p_information135 => l_elr_rec.elr_attribute25,
7718 p_information136 => l_elr_rec.elr_attribute26,
7719 p_information137 => l_elr_rec.elr_attribute27,
7720 p_information138 => l_elr_rec.elr_attribute28,
7721 p_information139 => l_elr_rec.elr_attribute29,
7722 p_information113 => l_elr_rec.elr_attribute3,
7723 p_information140 => l_elr_rec.elr_attribute30,
7724 p_information114 => l_elr_rec.elr_attribute4,
7725 p_information115 => l_elr_rec.elr_attribute5,
7726 p_information116 => l_elr_rec.elr_attribute6,
7727 p_information117 => l_elr_rec.elr_attribute7,
7728 p_information118 => l_elr_rec.elr_attribute8,
7729 p_information119 => l_elr_rec.elr_attribute9,
7730 p_information110 => l_elr_rec.elr_attribute_category,
7731 p_information11 => l_elr_rec.excld_flag,
7732 p_information259 => l_elr_rec.ordr_num,
7733 p_information166 => l_absence_type_start_date,
7734 p_information306 => l_absence_type_start_date,
7735 p_information265 => l_elr_rec.object_version_number,
7736 p_information295 => l_elr_rec.criteria_score,
7737 p_information296 => l_elr_rec.criteria_weight,
7738 --
7739
7740 -- END REPLACE PARAMETER LINES
7741
7742 p_object_version_number => l_object_version_number,
7743 p_effective_date => p_effective_date );
7744 --
7745
7746 if l_out_elr_result_id is null then
7747 l_out_elr_result_id := l_copy_entity_result_id;
7748 end if;
7749
7750 if l_result_type_cd = 'DISPLAY' then
7751 l_out_elr_result_id := l_copy_entity_result_id ;
7752 end if;
7753 --
7754 end loop;
7755 --
7756 end loop;
7757 ---------------------------------------------------------------
7758 -- END OF BEN_ELIG_LOA_RSN_PRTE_F ----------------------
7759 ---------------------------------------------------------------
7760 ---------------------------------------------------------------
7761 -- START OF BEN_ELIG_LOS_PRTE_F ----------------------
7762 ---------------------------------------------------------------
7763 --
7764 for l_parent_rec in c_els_from_parent(l_ELIGY_PRFL_ID) loop
7765 --
7766 l_mirror_src_entity_result_id := l_out_elp_result_id ;
7767 --
7768 l_elig_los_prte_id := l_parent_rec.elig_los_prte_id ;
7769 --
7770 for l_els_rec in c_els(l_parent_rec.elig_los_prte_id,l_mirror_src_entity_result_id,'ELS') loop
7771 --
7772 l_table_route_id := null ;
7773 open ben_plan_design_program_module.g_table_route('ELS');
7774 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
7775 close ben_plan_design_program_module.g_table_route ;
7776 --
7777 l_information5 := ben_plan_design_program_module.get_los_fctr_name(l_els_rec.los_fctr_id)
7778 || ben_plan_design_program_module.get_exclude_message(l_els_rec.excld_flag);
7779 --'Intersection'
7780 --
7781 if p_effective_date between l_els_rec.effective_start_date
7782 and l_els_rec.effective_end_date then
7783 --
7784 l_result_type_cd := 'DISPLAY';
7785 else
7786 l_result_type_cd := 'NO DISPLAY';
7787 end if;
7788 --
7789 l_copy_entity_result_id := null;
7790 l_object_version_number := null;
7791 ben_copy_entity_results_api.create_copy_entity_results(
7792 p_copy_entity_result_id => l_copy_entity_result_id,
7793 p_copy_entity_txn_id => p_copy_entity_txn_id,
7794 p_result_type_cd => l_result_type_cd,
7795 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
7796 p_parent_entity_result_id => l_mirror_src_entity_result_id,
7797 p_number_of_copies => l_number_of_copies,
7798 p_table_route_id => l_table_route_id,
7799 P_TABLE_ALIAS => 'ELS',
7800 p_information1 => l_els_rec.elig_los_prte_id,
7801 p_information2 => l_els_rec.EFFECTIVE_START_DATE,
7802 p_information3 => l_els_rec.EFFECTIVE_END_DATE,
7803 p_information4 => l_els_rec.business_group_id,
7804 p_information5 => l_information5 , -- 9999 put name for h-grid
7805 p_information263 => l_els_rec.eligy_prfl_id,
7806 p_information111 => l_els_rec.els_attribute1,
7807 p_information120 => l_els_rec.els_attribute10,
7808 p_information121 => l_els_rec.els_attribute11,
7809 p_information122 => l_els_rec.els_attribute12,
7810 p_information123 => l_els_rec.els_attribute13,
7811 p_information124 => l_els_rec.els_attribute14,
7812 p_information125 => l_els_rec.els_attribute15,
7813 p_information126 => l_els_rec.els_attribute16,
7814 p_information127 => l_els_rec.els_attribute17,
7815 p_information128 => l_els_rec.els_attribute18,
7816 p_information129 => l_els_rec.els_attribute19,
7817 p_information112 => l_els_rec.els_attribute2,
7818 p_information130 => l_els_rec.els_attribute20,
7819 p_information131 => l_els_rec.els_attribute21,
7820 p_information132 => l_els_rec.els_attribute22,
7821 p_information133 => l_els_rec.els_attribute23,
7822 p_information134 => l_els_rec.els_attribute24,
7823 p_information135 => l_els_rec.els_attribute25,
7824 p_information136 => l_els_rec.els_attribute26,
7825 p_information137 => l_els_rec.els_attribute27,
7826 p_information138 => l_els_rec.els_attribute28,
7827 p_information139 => l_els_rec.els_attribute29,
7828 p_information113 => l_els_rec.els_attribute3,
7829 p_information140 => l_els_rec.els_attribute30,
7830 p_information114 => l_els_rec.els_attribute4,
7831 p_information115 => l_els_rec.els_attribute5,
7832 p_information116 => l_els_rec.els_attribute6,
7833 p_information117 => l_els_rec.els_attribute7,
7834 p_information118 => l_els_rec.els_attribute8,
7835 p_information119 => l_els_rec.els_attribute9,
7836 p_information110 => l_els_rec.els_attribute_category,
7837 p_information11 => l_els_rec.excld_flag,
7838 p_information243 => l_els_rec.los_fctr_id,
7839 p_information260 => l_els_rec.ordr_num,
7840 p_information265 => l_els_rec.object_version_number,
7841 p_information295 => l_els_rec.criteria_score,
7842 p_information296 => l_els_rec.criteria_weight,
7843 --
7844
7845 -- END REPLACE PARAMETER LINES
7846
7847 p_object_version_number => l_object_version_number,
7848 p_effective_date => p_effective_date );
7849 --
7850
7851 if l_out_els_result_id is null then
7852 l_out_els_result_id := l_copy_entity_result_id;
7853 end if;
7854
7855 if l_result_type_cd = 'DISPLAY' then
7856 l_out_els_result_id := l_copy_entity_result_id ;
7857 end if;
7858 --
7859 end loop;
7860 --
7861 for l_els_rec in c_els_drp(l_parent_rec.elig_los_prte_id,l_mirror_src_entity_result_id,'ELS' ) loop
7862 ben_pd_rate_and_cvg_module.create_drpar_results
7863 (
7864 p_validate => p_validate
7865 ,p_copy_entity_result_id => l_out_els_result_id
7866 ,p_copy_entity_txn_id => p_copy_entity_txn_id
7867 ,p_comp_lvl_fctr_id => null
7868 ,p_hrs_wkd_in_perd_fctr_id => null
7869 ,p_los_fctr_id => l_els_rec.los_fctr_id
7870 ,p_pct_fl_tm_fctr_id => null
7871 ,p_age_fctr_id => null
7872 ,p_cmbn_age_los_fctr_id => null
7873 ,p_business_group_id => p_business_group_id
7874 ,p_number_of_copies => p_number_of_copies
7875 ,p_object_version_number => l_object_version_number
7876 ,p_effective_date => p_effective_date
7877 );
7878 end loop;
7879 end loop;
7880 ---------------------------------------------------------------
7881 -- END OF BEN_ELIG_LOS_PRTE_F ----------------------
7882 ---------------------------------------------------------------
7883 ---------------------------------------------------------------
7884 -- START OF BEN_ELIG_LVG_RSN_PRTE_F ----------------------
7885 ---------------------------------------------------------------
7886 --
7887 for l_parent_rec in c_elv_from_parent(l_ELIGY_PRFL_ID) loop
7888 --
7889 l_mirror_src_entity_result_id := l_out_elp_result_id ;
7890 --
7891 l_elig_lvg_rsn_prte_id := l_parent_rec.elig_lvg_rsn_prte_id ;
7892 --
7893 for l_elv_rec in c_elv(l_parent_rec.elig_lvg_rsn_prte_id,l_mirror_src_entity_result_id,'ELV') loop
7894 --
7895 l_table_route_id := null ;
7896 open ben_plan_design_program_module.g_table_route('ELV');
7897 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
7898 close ben_plan_design_program_module.g_table_route ;
7899 --
7900 l_information5 := hr_general.decode_lookup('LEAV_REAS',l_elv_rec.lvg_rsn_cd)
7901 || ben_plan_design_program_module.get_exclude_message(l_elv_rec.excld_flag);
7902 --'Intersection';
7903 --
7904 if p_effective_date between l_elv_rec.effective_start_date
7905 and l_elv_rec.effective_end_date then
7906 --
7907 l_result_type_cd := 'DISPLAY';
7908 else
7909 l_result_type_cd := 'NO DISPLAY';
7910 end if;
7911 --
7912 l_copy_entity_result_id := null;
7913 l_object_version_number := null;
7914 ben_copy_entity_results_api.create_copy_entity_results(
7915 p_copy_entity_result_id => l_copy_entity_result_id,
7916 p_copy_entity_txn_id => p_copy_entity_txn_id,
7917 p_result_type_cd => l_result_type_cd,
7918 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
7919 p_parent_entity_result_id => l_mirror_src_entity_result_id,
7920 p_number_of_copies => l_number_of_copies,
7921 p_table_route_id => l_table_route_id,
7922 P_TABLE_ALIAS => 'ELV',
7923 p_information1 => l_elv_rec.elig_lvg_rsn_prte_id,
7924 p_information2 => l_elv_rec.EFFECTIVE_START_DATE,
7925 p_information3 => l_elv_rec.EFFECTIVE_END_DATE,
7926 p_information4 => l_elv_rec.business_group_id,
7927 p_information5 => l_information5 , -- 9999 put name for h-grid
7928 p_information263 => l_elv_rec.eligy_prfl_id,
7929 p_information111 => l_elv_rec.elv_attribute1,
7930 p_information120 => l_elv_rec.elv_attribute10,
7931 p_information121 => l_elv_rec.elv_attribute11,
7932 p_information122 => l_elv_rec.elv_attribute12,
7933 p_information123 => l_elv_rec.elv_attribute13,
7934 p_information124 => l_elv_rec.elv_attribute14,
7935 p_information125 => l_elv_rec.elv_attribute15,
7936 p_information126 => l_elv_rec.elv_attribute16,
7937 p_information127 => l_elv_rec.elv_attribute17,
7938 p_information128 => l_elv_rec.elv_attribute18,
7939 p_information129 => l_elv_rec.elv_attribute19,
7940 p_information112 => l_elv_rec.elv_attribute2,
7941 p_information130 => l_elv_rec.elv_attribute20,
7942 p_information131 => l_elv_rec.elv_attribute21,
7943 p_information132 => l_elv_rec.elv_attribute22,
7944 p_information133 => l_elv_rec.elv_attribute23,
7945 p_information134 => l_elv_rec.elv_attribute24,
7946 p_information135 => l_elv_rec.elv_attribute25,
7947 p_information136 => l_elv_rec.elv_attribute26,
7948 p_information137 => l_elv_rec.elv_attribute27,
7949 p_information138 => l_elv_rec.elv_attribute28,
7950 p_information139 => l_elv_rec.elv_attribute29,
7951 p_information113 => l_elv_rec.elv_attribute3,
7952 p_information140 => l_elv_rec.elv_attribute30,
7953 p_information114 => l_elv_rec.elv_attribute4,
7954 p_information115 => l_elv_rec.elv_attribute5,
7955 p_information116 => l_elv_rec.elv_attribute6,
7956 p_information117 => l_elv_rec.elv_attribute7,
7957 p_information118 => l_elv_rec.elv_attribute8,
7958 p_information119 => l_elv_rec.elv_attribute9,
7959 p_information110 => l_elv_rec.elv_attribute_category,
7960 p_information11 => l_elv_rec.excld_flag,
7961 p_information12 => l_elv_rec.lvg_rsn_cd,
7962 p_information260 => l_elv_rec.ordr_num,
7963 p_information265 => l_elv_rec.object_version_number,
7964 p_information295 => l_elv_rec.criteria_score,
7965 p_information296 => l_elv_rec.criteria_weight,
7966 --
7967
7968 -- END REPLACE PARAMETER LINES
7969
7970 p_object_version_number => l_object_version_number,
7971 p_effective_date => p_effective_date );
7972 --
7973
7974 if l_out_elv_result_id is null then
7975 l_out_elv_result_id := l_copy_entity_result_id;
7976 end if;
7977
7978 if l_result_type_cd = 'DISPLAY' then
7979 l_out_elv_result_id := l_copy_entity_result_id ;
7980 end if;
7981 --
7982 end loop;
7983 --
7984 end loop;
7985 ---------------------------------------------------------------
7986 -- END OF BEN_ELIG_LVG_RSN_PRTE_F ----------------------
7987 ---------------------------------------------------------------
7988 ---------------------------------------------------------------
7989 -- START OF BEN_ELIG_NO_OTHR_CVG_PRTE_F ----------------------
7990 ---------------------------------------------------------------
7991 --
7992 for l_parent_rec in c_eno_from_parent(l_ELIGY_PRFL_ID) loop
7993 --
7994 l_mirror_src_entity_result_id := l_out_elp_result_id ;
7995 --
7996 l_elig_no_othr_cvg_prte_id := l_parent_rec.elig_no_othr_cvg_prte_id ;
7997 --
7998 for l_eno_rec in c_eno(l_parent_rec.elig_no_othr_cvg_prte_id,l_mirror_src_entity_result_id,'ENO' ) loop
7999 --
8000 l_table_route_id := null ;
8001 open ben_plan_design_program_module.g_table_route('ENO');
8002 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
8003 close ben_plan_design_program_module.g_table_route ;
8004 --
8005 l_information5 := hr_general.decode_lookup('YES_NO',l_eno_rec.coord_ben_no_cvg_flag);
8006 --'Intersection';
8007 --
8008 if p_effective_date between l_eno_rec.effective_start_date
8009 and l_eno_rec.effective_end_date then
8010 --
8011 l_result_type_cd := 'DISPLAY';
8012 else
8013 l_result_type_cd := 'NO DISPLAY';
8014 end if;
8015 --
8016 l_copy_entity_result_id := null;
8017 l_object_version_number := null;
8018 ben_copy_entity_results_api.create_copy_entity_results(
8019 p_copy_entity_result_id => l_copy_entity_result_id,
8020 p_copy_entity_txn_id => p_copy_entity_txn_id,
8021 p_result_type_cd => l_result_type_cd,
8022 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
8023 p_parent_entity_result_id => l_mirror_src_entity_result_id,
8024 p_number_of_copies => l_number_of_copies,
8025 p_table_route_id => l_table_route_id,
8026 P_TABLE_ALIAS => 'ENO',
8027 p_information1 => l_eno_rec.elig_no_othr_cvg_prte_id,
8028 p_information2 => l_eno_rec.EFFECTIVE_START_DATE,
8029 p_information3 => l_eno_rec.EFFECTIVE_END_DATE,
8030 p_information4 => l_eno_rec.business_group_id,
8031 p_information5 => l_information5 , -- 9999 put name for h-grid
8032 p_information11 => l_eno_rec.coord_ben_no_cvg_flag,
8033 p_information263 => l_eno_rec.eligy_prfl_id,
8034 p_information111 => l_eno_rec.eno_attribute1,
8035 p_information120 => l_eno_rec.eno_attribute10,
8036 p_information121 => l_eno_rec.eno_attribute11,
8037 p_information122 => l_eno_rec.eno_attribute12,
8038 p_information123 => l_eno_rec.eno_attribute13,
8039 p_information124 => l_eno_rec.eno_attribute14,
8040 p_information125 => l_eno_rec.eno_attribute15,
8041 p_information126 => l_eno_rec.eno_attribute16,
8042 p_information127 => l_eno_rec.eno_attribute17,
8043 p_information128 => l_eno_rec.eno_attribute18,
8044 p_information129 => l_eno_rec.eno_attribute19,
8045 p_information112 => l_eno_rec.eno_attribute2,
8046 p_information130 => l_eno_rec.eno_attribute20,
8047 p_information131 => l_eno_rec.eno_attribute21,
8048 p_information132 => l_eno_rec.eno_attribute22,
8049 p_information133 => l_eno_rec.eno_attribute23,
8050 p_information134 => l_eno_rec.eno_attribute24,
8051 p_information135 => l_eno_rec.eno_attribute25,
8052 p_information136 => l_eno_rec.eno_attribute26,
8053 p_information137 => l_eno_rec.eno_attribute27,
8054 p_information138 => l_eno_rec.eno_attribute28,
8055 p_information139 => l_eno_rec.eno_attribute29,
8056 p_information113 => l_eno_rec.eno_attribute3,
8057 p_information140 => l_eno_rec.eno_attribute30,
8058 p_information114 => l_eno_rec.eno_attribute4,
8059 p_information115 => l_eno_rec.eno_attribute5,
8060 p_information116 => l_eno_rec.eno_attribute6,
8061 p_information117 => l_eno_rec.eno_attribute7,
8062 p_information118 => l_eno_rec.eno_attribute8,
8063 p_information119 => l_eno_rec.eno_attribute9,
8064 p_information110 => l_eno_rec.eno_attribute_category,
8065 p_information265 => l_eno_rec.object_version_number,
8066 --
8067
8068 -- END REPLACE PARAMETER LINES
8069
8070 p_object_version_number => l_object_version_number,
8071 p_effective_date => p_effective_date );
8072 --
8073
8074 if l_out_eno_result_id is null then
8075 l_out_eno_result_id := l_copy_entity_result_id;
8076 end if;
8077
8078 if l_result_type_cd = 'DISPLAY' then
8079 l_out_eno_result_id := l_copy_entity_result_id ;
8080 end if;
8081 --
8082 end loop;
8083 --
8084 end loop;
8085 ---------------------------------------------------------------
8086 -- END OF BEN_ELIG_NO_OTHR_CVG_PRTE_F ----------------------
8087 ---------------------------------------------------------------
8088 ---------------------------------------------------------------
8089 -- START OF BEN_ELIG_OPTD_MDCR_PRTE_F ----------------------
8090 ---------------------------------------------------------------
8091 --
8092 for l_parent_rec in c_eom_from_parent(l_ELIGY_PRFL_ID) loop
8093 --
8094 l_mirror_src_entity_result_id := l_out_elp_result_id ;
8095 --
8096 l_elig_optd_mdcr_prte_id := l_parent_rec.elig_optd_mdcr_prte_id ;
8097 --
8098 for l_eom_rec in c_eom(l_parent_rec.elig_optd_mdcr_prte_id,l_mirror_src_entity_result_id,'EOM' ) loop
8099 --
8100 l_table_route_id := null ;
8101 open ben_plan_design_program_module.g_table_route('EOM');
8102 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
8103 close ben_plan_design_program_module.g_table_route ;
8104 --
8105 l_information5 := hr_general.decode_lookup('YES_NO',l_eom_rec.optd_mdcr_flag)
8106 || ben_plan_design_program_module.get_exclude_message(l_eom_rec.exlcd_flag);
8107 --'Intersection';
8108 --
8109 if p_effective_date between l_eom_rec.effective_start_date
8110 and l_eom_rec.effective_end_date then
8111 --
8112 l_result_type_cd := 'DISPLAY';
8113 else
8114 l_result_type_cd := 'NO DISPLAY';
8115 end if;
8116 --
8117 l_copy_entity_result_id := null;
8118 l_object_version_number := null;
8119 ben_copy_entity_results_api.create_copy_entity_results(
8120 p_copy_entity_result_id => l_copy_entity_result_id,
8121 p_copy_entity_txn_id => p_copy_entity_txn_id,
8122 p_result_type_cd => l_result_type_cd,
8123 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
8124 p_parent_entity_result_id => l_mirror_src_entity_result_id,
8125 p_number_of_copies => l_number_of_copies,
8126 p_table_route_id => l_table_route_id,
8127 P_TABLE_ALIAS => 'EOM',
8128 p_information1 => l_eom_rec.elig_optd_mdcr_prte_id,
8129 p_information2 => l_eom_rec.EFFECTIVE_START_DATE,
8130 p_information3 => l_eom_rec.EFFECTIVE_END_DATE,
8131 p_information4 => l_eom_rec.business_group_id,
8132 p_information5 => l_information5 , -- 9999 put name for h-grid
8133 p_information263 => l_eom_rec.eligy_prfl_id,
8134 p_information111 => l_eom_rec.eom_attribute1,
8135 p_information120 => l_eom_rec.eom_attribute10,
8136 p_information121 => l_eom_rec.eom_attribute11,
8137 p_information122 => l_eom_rec.eom_attribute12,
8138 p_information123 => l_eom_rec.eom_attribute13,
8139 p_information124 => l_eom_rec.eom_attribute14,
8140 p_information125 => l_eom_rec.eom_attribute15,
8141 p_information126 => l_eom_rec.eom_attribute16,
8142 p_information127 => l_eom_rec.eom_attribute17,
8143 p_information128 => l_eom_rec.eom_attribute18,
8144 p_information129 => l_eom_rec.eom_attribute19,
8145 p_information112 => l_eom_rec.eom_attribute2,
8146 p_information130 => l_eom_rec.eom_attribute20,
8147 p_information131 => l_eom_rec.eom_attribute21,
8148 p_information132 => l_eom_rec.eom_attribute22,
8149 p_information133 => l_eom_rec.eom_attribute23,
8150 p_information134 => l_eom_rec.eom_attribute24,
8151 p_information135 => l_eom_rec.eom_attribute25,
8152 p_information136 => l_eom_rec.eom_attribute26,
8153 p_information137 => l_eom_rec.eom_attribute27,
8154 p_information138 => l_eom_rec.eom_attribute28,
8155 p_information139 => l_eom_rec.eom_attribute29,
8156 p_information113 => l_eom_rec.eom_attribute3,
8157 p_information140 => l_eom_rec.eom_attribute30,
8158 p_information114 => l_eom_rec.eom_attribute4,
8159 p_information115 => l_eom_rec.eom_attribute5,
8160 p_information116 => l_eom_rec.eom_attribute6,
8161 p_information117 => l_eom_rec.eom_attribute7,
8162 p_information118 => l_eom_rec.eom_attribute8,
8163 p_information119 => l_eom_rec.eom_attribute9,
8164 p_information110 => l_eom_rec.eom_attribute_category,
8165 p_information12 => l_eom_rec.exlcd_flag,
8166 p_information11 => l_eom_rec.optd_mdcr_flag,
8167 p_information265 => l_eom_rec.object_version_number,
8168 --
8169
8170 -- END REPLACE PARAMETER LINES
8171
8172 p_object_version_number => l_object_version_number,
8173 p_effective_date => p_effective_date );
8174 --
8175
8176 if l_out_eom_result_id is null then
8177 l_out_eom_result_id := l_copy_entity_result_id;
8178 end if;
8179
8180 if l_result_type_cd = 'DISPLAY' then
8181 l_out_eom_result_id := l_copy_entity_result_id ;
8182 end if;
8183 --
8184 end loop;
8185 --
8186 end loop;
8187 ---------------------------------------------------------------
8188 -- END OF BEN_ELIG_OPTD_MDCR_PRTE_F ----------------------
8189 ---------------------------------------------------------------
8190 ---------------------------------------------------------------
8191 -- START OF BEN_ELIG_ORG_UNIT_PRTE_F ----------------------
8192 ---------------------------------------------------------------
8193 --
8194 for l_parent_rec in c_eou_from_parent(l_ELIGY_PRFL_ID) loop
8195 --
8196 l_mirror_src_entity_result_id := l_out_elp_result_id ;
8197 --
8198 l_elig_org_unit_prte_id := l_parent_rec.elig_org_unit_prte_id ;
8199 --
8200 for l_eou_rec in c_eou(l_parent_rec.elig_org_unit_prte_id,l_mirror_src_entity_result_id,'EOU' ) loop
8201 --
8202 l_table_route_id := null ;
8203 open ben_plan_design_program_module.g_table_route('EOU');
8204 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
8205 close ben_plan_design_program_module.g_table_route ;
8206 --
8207 l_information5 := ben_plan_design_program_module.get_organization_name(l_eou_rec.organization_id)
8208 || ben_plan_design_program_module.get_exclude_message(l_eou_rec.excld_flag);
8209 --'Intersection';
8210 --
8211 if p_effective_date between l_eou_rec.effective_start_date
8212 and l_eou_rec.effective_end_date then
8213 --
8214 l_result_type_cd := 'DISPLAY';
8215 else
8216 l_result_type_cd := 'NO DISPLAY';
8217 end if;
8218 --
8219 l_copy_entity_result_id := null;
8220 l_object_version_number := null;
8221
8222 -- To store effective_start_date of organization
8223 -- for Mapping - Bug 2958658
8224 --
8225 l_organization_start_date := null;
8226 if l_eou_rec.organization_id is not null then
8227 open c_organization_start_date(l_eou_rec.organization_id);
8228 fetch c_organization_start_date into l_organization_start_date;
8229 close c_organization_start_date;
8230 end if;
8231
8232 --
8233 -- pabodla : MAPPING DATA : Store the mapping column information.
8234 --
8235
8236 l_mapping_name := null;
8237 l_mapping_id := null;
8238 --
8239 -- Get the defined balance name to display on mapping page.
8240 --
8241 open c_get_mapping_name7(l_eou_rec.organization_id,NVL(l_organization_start_date,p_effective_date));
8242 fetch c_get_mapping_name7 into l_mapping_name;
8243 close c_get_mapping_name7;
8244 --
8245 l_mapping_id := l_eou_rec.organization_id;
8246 --
8247 --To set user friendly labels on the mapping page
8248 --
8249 l_mapping_column_name1 := null;
8250 l_mapping_column_name2 :=null;
8251 BEN_PLAN_DESIGN_TXNS_API.get_mapping_column_name(l_table_route_id,
8252 l_mapping_column_name1,
8253 l_mapping_column_name2,
8254 p_copy_entity_txn_id);
8255 --
8256
8257 ben_copy_entity_results_api.create_copy_entity_results(
8258 p_copy_entity_result_id => l_copy_entity_result_id,
8259 p_copy_entity_txn_id => p_copy_entity_txn_id,
8260 p_result_type_cd => l_result_type_cd,
8261 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
8262 p_parent_entity_result_id => l_mirror_src_entity_result_id,
8263 p_number_of_copies => l_number_of_copies,
8264 p_table_route_id => l_table_route_id,
8265 P_TABLE_ALIAS => 'EOU',
8266 p_information1 => l_eou_rec.elig_org_unit_prte_id,
8267 p_information2 => l_eou_rec.EFFECTIVE_START_DATE,
8268 p_information3 => l_eou_rec.EFFECTIVE_END_DATE,
8269 p_information4 => l_eou_rec.business_group_id,
8270 p_information5 => l_information5 , -- 9999 put name for h-grid
8271 p_information263 => l_eou_rec.eligy_prfl_id,
8272 p_information111 => l_eou_rec.eou_attribute1,
8273 p_information120 => l_eou_rec.eou_attribute10,
8274 p_information121 => l_eou_rec.eou_attribute11,
8275 p_information122 => l_eou_rec.eou_attribute12,
8276 p_information123 => l_eou_rec.eou_attribute13,
8277 p_information124 => l_eou_rec.eou_attribute14,
8278 p_information125 => l_eou_rec.eou_attribute15,
8279 p_information126 => l_eou_rec.eou_attribute16,
8280 p_information127 => l_eou_rec.eou_attribute17,
8281 p_information128 => l_eou_rec.eou_attribute18,
8282 p_information129 => l_eou_rec.eou_attribute19,
8283 p_information112 => l_eou_rec.eou_attribute2,
8284 p_information130 => l_eou_rec.eou_attribute20,
8285 p_information131 => l_eou_rec.eou_attribute21,
8286 p_information132 => l_eou_rec.eou_attribute22,
8287 p_information133 => l_eou_rec.eou_attribute23,
8288 p_information134 => l_eou_rec.eou_attribute24,
8289 p_information135 => l_eou_rec.eou_attribute25,
8290 p_information136 => l_eou_rec.eou_attribute26,
8291 p_information137 => l_eou_rec.eou_attribute27,
8292 p_information138 => l_eou_rec.eou_attribute28,
8293 p_information139 => l_eou_rec.eou_attribute29,
8294 p_information113 => l_eou_rec.eou_attribute3,
8295 p_information140 => l_eou_rec.eou_attribute30,
8296 p_information114 => l_eou_rec.eou_attribute4,
8297 p_information115 => l_eou_rec.eou_attribute5,
8298 p_information116 => l_eou_rec.eou_attribute6,
8299 p_information117 => l_eou_rec.eou_attribute7,
8300 p_information118 => l_eou_rec.eou_attribute8,
8301 p_information119 => l_eou_rec.eou_attribute9,
8302 p_information110 => l_eou_rec.eou_attribute_category,
8303 p_information11 => l_eou_rec.excld_flag,
8304 p_information260 => l_eou_rec.ordr_num,
8305 p_information252 => l_eou_rec.organization_id,
8306 -- Data for MAPPING columns.
8307 p_information173 => l_mapping_name,
8308 p_information174 => l_mapping_id,
8309 p_information181 => l_mapping_column_name1,
8310 p_information182 => l_mapping_column_name2,
8311 -- END other product Mapping columns.
8312 p_information166 => l_organization_start_date,
8313 p_information265 => l_eou_rec.object_version_number,
8314 p_information295 => l_eou_rec.criteria_score,
8315 p_information296 => l_eou_rec.criteria_weight,
8316 --
8317
8318 -- END REPLACE PARAMETER LINES
8319
8320 p_object_version_number => l_object_version_number,
8321 p_effective_date => p_effective_date );
8322 --
8323
8324 if l_out_eou_result_id is null then
8325 l_out_eou_result_id := l_copy_entity_result_id;
8326 end if;
8327
8328 if l_result_type_cd = 'DISPLAY' then
8329 l_out_eou_result_id := l_copy_entity_result_id ;
8330 end if;
8331 --
8332 end loop;
8333 --
8334 end loop;
8335 ---------------------------------------------------------------
8336 -- END OF BEN_ELIG_ORG_UNIT_PRTE_F ----------------------
8337 ---------------------------------------------------------------
8338 ---------------------------------------------------------------
8339 -- START OF BEN_ELIG_OTHR_PTIP_PRTE_F ----------------------
8340 ---------------------------------------------------------------
8341 --
8342 for l_parent_rec in c_eoy_from_parent(l_ELIGY_PRFL_ID) loop
8343 --
8344 l_mirror_src_entity_result_id := l_out_elp_result_id ;
8345 --
8346 l_elig_othr_ptip_prte_id := l_parent_rec.elig_othr_ptip_prte_id ;
8347 --
8348 for l_eoy_rec in c_eoy(l_parent_rec.elig_othr_ptip_prte_id,l_mirror_src_entity_result_id,'EOY' ) loop
8349 --
8350 l_table_route_id := null ;
8351 open ben_plan_design_program_module.g_table_route('EOY');
8352 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
8353 close ben_plan_design_program_module.g_table_route ;
8354 --
8355 l_information5 := ben_plan_design_program_module.get_ptip_name(l_eoy_rec.ptip_id,p_effective_date)
8356 --
8357 -- Bug No: 3451872
8358 --
8359 || get_subj_to_cobra_message(l_eoy_rec.only_pls_subj_cobra_flag)
8360 --
8361 || ben_plan_design_program_module.get_exclude_message(l_eoy_rec.excld_flag);
8362 --'Intersection';
8363 --
8364 if p_effective_date between l_eoy_rec.effective_start_date
8365 and l_eoy_rec.effective_end_date then
8366 --
8367 l_result_type_cd := 'DISPLAY';
8368 else
8369 l_result_type_cd := 'NO DISPLAY';
8370 end if;
8371 --
8372 l_copy_entity_result_id := null;
8373 l_object_version_number := null;
8374 ben_copy_entity_results_api.create_copy_entity_results(
8375 p_copy_entity_result_id => l_copy_entity_result_id,
8376 p_copy_entity_txn_id => p_copy_entity_txn_id,
8377 p_result_type_cd => l_result_type_cd,
8378 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
8379 p_parent_entity_result_id => l_mirror_src_entity_result_id,
8380 p_number_of_copies => l_number_of_copies,
8381 p_table_route_id => l_table_route_id,
8382 P_TABLE_ALIAS => 'EOY',
8383 p_information1 => l_eoy_rec.elig_othr_ptip_prte_id,
8384 p_information2 => l_eoy_rec.EFFECTIVE_START_DATE,
8385 p_information3 => l_eoy_rec.EFFECTIVE_END_DATE,
8386 p_information4 => l_eoy_rec.business_group_id,
8387 p_information5 => l_information5 , -- 9999 put name for h-grid
8388 p_information263 => l_eoy_rec.eligy_prfl_id,
8389 p_information111 => l_eoy_rec.eoy_attribute1,
8390 p_information120 => l_eoy_rec.eoy_attribute10,
8391 p_information121 => l_eoy_rec.eoy_attribute11,
8392 p_information122 => l_eoy_rec.eoy_attribute12,
8393 p_information123 => l_eoy_rec.eoy_attribute13,
8394 p_information124 => l_eoy_rec.eoy_attribute14,
8395 p_information125 => l_eoy_rec.eoy_attribute15,
8396 p_information126 => l_eoy_rec.eoy_attribute16,
8397 p_information127 => l_eoy_rec.eoy_attribute17,
8398 p_information128 => l_eoy_rec.eoy_attribute18,
8399 p_information129 => l_eoy_rec.eoy_attribute19,
8400 p_information112 => l_eoy_rec.eoy_attribute2,
8401 p_information130 => l_eoy_rec.eoy_attribute20,
8402 p_information131 => l_eoy_rec.eoy_attribute21,
8403 p_information132 => l_eoy_rec.eoy_attribute22,
8404 p_information133 => l_eoy_rec.eoy_attribute23,
8405 p_information134 => l_eoy_rec.eoy_attribute24,
8406 p_information135 => l_eoy_rec.eoy_attribute25,
8407 p_information136 => l_eoy_rec.eoy_attribute26,
8408 p_information137 => l_eoy_rec.eoy_attribute27,
8409 p_information138 => l_eoy_rec.eoy_attribute28,
8410 p_information139 => l_eoy_rec.eoy_attribute29,
8411 p_information113 => l_eoy_rec.eoy_attribute3,
8412 p_information140 => l_eoy_rec.eoy_attribute30,
8413 p_information114 => l_eoy_rec.eoy_attribute4,
8414 p_information115 => l_eoy_rec.eoy_attribute5,
8415 p_information116 => l_eoy_rec.eoy_attribute6,
8416 p_information117 => l_eoy_rec.eoy_attribute7,
8417 p_information118 => l_eoy_rec.eoy_attribute8,
8418 p_information119 => l_eoy_rec.eoy_attribute9,
8419 p_information110 => l_eoy_rec.eoy_attribute_category,
8420 p_information11 => l_eoy_rec.excld_flag,
8421 p_information12 => l_eoy_rec.only_pls_subj_cobra_flag,
8422 p_information261 => l_eoy_rec.ordr_num,
8423 p_information259 => l_eoy_rec.ptip_id,
8424 p_information265 => l_eoy_rec.object_version_number,
8425 --
8426
8427 -- END REPLACE PARAMETER LINES
8428
8429 p_object_version_number => l_object_version_number,
8430 p_effective_date => p_effective_date );
8431 --
8432
8433 if l_out_eoy_result_id is null then
8434 l_out_eoy_result_id := l_copy_entity_result_id;
8435 end if;
8436
8437 if l_result_type_cd = 'DISPLAY' then
8438 l_out_eoy_result_id := l_copy_entity_result_id ;
8439 end if;
8440 --
8441 end loop;
8442 --
8443 end loop;
8444 ---------------------------------------------------------------
8445 -- END OF BEN_ELIG_OTHR_PTIP_PRTE_F ----------------------
8446 ---------------------------------------------------------------
8447 ---------------------------------------------------------------
8448 -- START OF BEN_ELIG_PCT_FL_TM_PRTE_F ----------------------
8449 ---------------------------------------------------------------
8450 --
8451 for l_parent_rec in c_epf_from_parent(l_ELIGY_PRFL_ID) loop
8452 --
8453 l_mirror_src_entity_result_id := l_out_elp_result_id ;
8454 --
8455 l_elig_pct_fl_tm_prte_id := l_parent_rec.elig_pct_fl_tm_prte_id ;
8456 --
8457 for l_epf_rec in c_epf(l_parent_rec.elig_pct_fl_tm_prte_id,l_mirror_src_entity_result_id,'EPF' ) loop
8458 --
8459 l_table_route_id := null ;
8460 open ben_plan_design_program_module.g_table_route('EPF');
8461 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
8462 close ben_plan_design_program_module.g_table_route ;
8463 --
8464 l_information5 := ben_plan_design_program_module.get_pct_fl_tm_fctr_name(l_epf_rec.pct_fl_tm_fctr_id)
8465 || ben_plan_design_program_module.get_exclude_message(l_epf_rec.excld_flag);
8466 --'Intersection';
8467 --
8468 if p_effective_date between l_epf_rec.effective_start_date
8469 and l_epf_rec.effective_end_date then
8470 --
8471 l_result_type_cd := 'DISPLAY';
8472 else
8473 l_result_type_cd := 'NO DISPLAY';
8474 end if;
8475 --
8476 l_copy_entity_result_id := null;
8477 l_object_version_number := null;
8478 ben_copy_entity_results_api.create_copy_entity_results(
8479 p_copy_entity_result_id => l_copy_entity_result_id,
8480 p_copy_entity_txn_id => p_copy_entity_txn_id,
8481 p_result_type_cd => l_result_type_cd,
8482 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
8483 p_parent_entity_result_id => l_mirror_src_entity_result_id,
8484 p_number_of_copies => l_number_of_copies,
8485 p_table_route_id => l_table_route_id,
8486 P_TABLE_ALIAS => 'EPF',
8487 p_information1 => l_epf_rec.elig_pct_fl_tm_prte_id,
8488 p_information2 => l_epf_rec.EFFECTIVE_START_DATE,
8489 p_information3 => l_epf_rec.EFFECTIVE_END_DATE,
8490 p_information4 => l_epf_rec.business_group_id,
8491 p_information5 => l_information5 , -- 9999 put name for h-grid
8492 p_information263 => l_epf_rec.eligy_prfl_id,
8493 p_information111 => l_epf_rec.epf_attribute1,
8494 p_information120 => l_epf_rec.epf_attribute10,
8495 p_information121 => l_epf_rec.epf_attribute11,
8496 p_information122 => l_epf_rec.epf_attribute12,
8497 p_information123 => l_epf_rec.epf_attribute13,
8498 p_information124 => l_epf_rec.epf_attribute14,
8499 p_information125 => l_epf_rec.epf_attribute15,
8500 p_information126 => l_epf_rec.epf_attribute16,
8501 p_information127 => l_epf_rec.epf_attribute17,
8502 p_information128 => l_epf_rec.epf_attribute18,
8503 p_information129 => l_epf_rec.epf_attribute19,
8504 p_information112 => l_epf_rec.epf_attribute2,
8505 p_information130 => l_epf_rec.epf_attribute20,
8506 p_information131 => l_epf_rec.epf_attribute21,
8507 p_information132 => l_epf_rec.epf_attribute22,
8508 p_information133 => l_epf_rec.epf_attribute23,
8509 p_information134 => l_epf_rec.epf_attribute24,
8510 p_information135 => l_epf_rec.epf_attribute25,
8511 p_information136 => l_epf_rec.epf_attribute26,
8512 p_information137 => l_epf_rec.epf_attribute27,
8513 p_information138 => l_epf_rec.epf_attribute28,
8514 p_information139 => l_epf_rec.epf_attribute29,
8515 p_information113 => l_epf_rec.epf_attribute3,
8516 p_information140 => l_epf_rec.epf_attribute30,
8517 p_information114 => l_epf_rec.epf_attribute4,
8518 p_information115 => l_epf_rec.epf_attribute5,
8519 p_information116 => l_epf_rec.epf_attribute6,
8520 p_information117 => l_epf_rec.epf_attribute7,
8521 p_information118 => l_epf_rec.epf_attribute8,
8522 p_information119 => l_epf_rec.epf_attribute9,
8523 p_information110 => l_epf_rec.epf_attribute_category,
8524 p_information11 => l_epf_rec.excld_flag,
8525 p_information260 => l_epf_rec.ordr_num,
8526 p_information233 => l_epf_rec.pct_fl_tm_fctr_id,
8527 p_information265 => l_epf_rec.object_version_number,
8528 p_information295 => l_epf_rec.criteria_score,
8529 p_information296 => l_epf_rec.criteria_weight,
8530
8531 --
8532
8533 -- END REPLACE PARAMETER LINES
8534
8535 p_object_version_number => l_object_version_number,
8536 p_effective_date => p_effective_date );
8537 --
8538
8539 if l_out_epf_result_id is null then
8540 l_out_epf_result_id := l_copy_entity_result_id;
8541 end if;
8542
8543 if l_result_type_cd = 'DISPLAY' then
8544 l_out_epf_result_id := l_copy_entity_result_id ;
8545 end if;
8546 --
8547 end loop;
8548 --
8549 for l_epf_rec in c_epf_drp(l_parent_rec.elig_pct_fl_tm_prte_id,l_mirror_src_entity_result_id,'EPF' ) loop
8550 ben_pd_rate_and_cvg_module.create_drpar_results
8551 (
8552 p_validate => p_validate
8553 ,p_copy_entity_result_id => l_out_epf_result_id
8554 ,p_copy_entity_txn_id => p_copy_entity_txn_id
8555 ,p_comp_lvl_fctr_id => null
8556 ,p_hrs_wkd_in_perd_fctr_id => null
8557 ,p_los_fctr_id => null
8558 ,p_pct_fl_tm_fctr_id => l_epf_rec.pct_fl_tm_fctr_id
8559 ,p_age_fctr_id => null
8560 ,p_cmbn_age_los_fctr_id => null
8561 ,p_business_group_id => p_business_group_id
8562 ,p_number_of_copies => p_number_of_copies
8563 ,p_object_version_number => l_object_version_number
8564 ,p_effective_date => p_effective_date
8565 );
8566 end loop;
8567 end loop;
8568 ---------------------------------------------------------------
8569 -- END OF BEN_ELIG_PCT_FL_TM_PRTE_F ----------------------
8570 ---------------------------------------------------------------
8571 ---------------------------------------------------------------
8572 -- START OF BEN_ELIG_PER_TYP_PRTE_F ----------------------
8573 ---------------------------------------------------------------
8574 --
8575 for l_parent_rec in c_ept_from_parent(l_ELIGY_PRFL_ID) loop
8576 --
8577 l_mirror_src_entity_result_id := l_out_elp_result_id ;
8578 --
8579 l_elig_per_typ_prte_id := l_parent_rec.elig_per_typ_prte_id ;
8580 --
8581 for l_ept_rec in c_ept(l_parent_rec.elig_per_typ_prte_id,l_mirror_src_entity_result_id,'EPT' ) loop
8582 --
8583 l_table_route_id := null ;
8584 open ben_plan_design_program_module.g_table_route('EPT');
8585 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
8586 close ben_plan_design_program_module.g_table_route ;
8587 --
8588 l_information5 := ben_plan_design_program_module.get_person_type_name(l_ept_rec.person_type_id)
8589 || ben_plan_design_program_module.get_exclude_message(l_ept_rec.excld_flag);
8590 --'Intersection';
8591 --
8592 if p_effective_date between l_ept_rec.effective_start_date
8593 and l_ept_rec.effective_end_date then
8594 --
8595 l_result_type_cd := 'DISPLAY';
8596 else
8597 l_result_type_cd := 'NO DISPLAY';
8598 end if;
8599 --
8600 l_copy_entity_result_id := null;
8601 l_object_version_number := null;
8602 --
8603 -- pabodla : MAPPING DATA : Store the mapping column information.
8604 --
8605
8606 l_mapping_name := null;
8607 l_mapping_id := null;
8608 --
8609 -- Get the defined balance name to display on mapping page.
8610 --
8611 open c_get_person_type_name(l_ept_rec.person_type_id);
8612 fetch c_get_person_type_name into l_mapping_name;
8613 close c_get_person_type_name;
8614 --
8615 l_mapping_id := l_ept_rec.person_type_id;
8616 --
8617 --To set user friendly labels on the mapping page
8618 --
8619 l_mapping_column_name1 := null;
8620 l_mapping_column_name2 :=null;
8621 BEN_PLAN_DESIGN_TXNS_API.get_mapping_column_name(l_table_route_id,
8622 l_mapping_column_name1,
8623 l_mapping_column_name2,
8624 p_copy_entity_txn_id);
8625 --
8626
8627 ben_copy_entity_results_api.create_copy_entity_results(
8628 p_copy_entity_result_id => l_copy_entity_result_id,
8629 p_copy_entity_txn_id => p_copy_entity_txn_id,
8630 p_result_type_cd => l_result_type_cd,
8631 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
8632 p_parent_entity_result_id => l_mirror_src_entity_result_id,
8633 p_number_of_copies => l_number_of_copies,
8634 p_table_route_id => l_table_route_id,
8635 P_TABLE_ALIAS => 'EPT',
8636 p_information1 => l_ept_rec.elig_per_typ_prte_id,
8637 p_information2 => l_ept_rec.EFFECTIVE_START_DATE,
8638 p_information3 => l_ept_rec.EFFECTIVE_END_DATE,
8639 p_information4 => l_ept_rec.business_group_id,
8640 p_information5 => l_information5 , -- 9999 put name for h-grid
8641 p_information263 => l_ept_rec.eligy_prfl_id,
8642 p_information111 => l_ept_rec.ept_attribute1,
8643 p_information120 => l_ept_rec.ept_attribute10,
8644 p_information121 => l_ept_rec.ept_attribute11,
8645 p_information122 => l_ept_rec.ept_attribute12,
8646 p_information123 => l_ept_rec.ept_attribute13,
8647 p_information124 => l_ept_rec.ept_attribute14,
8648 p_information125 => l_ept_rec.ept_attribute15,
8649 p_information126 => l_ept_rec.ept_attribute16,
8650 p_information127 => l_ept_rec.ept_attribute17,
8651 p_information128 => l_ept_rec.ept_attribute18,
8652 p_information129 => l_ept_rec.ept_attribute19,
8653 p_information112 => l_ept_rec.ept_attribute2,
8654 p_information130 => l_ept_rec.ept_attribute20,
8655 p_information131 => l_ept_rec.ept_attribute21,
8656 p_information132 => l_ept_rec.ept_attribute22,
8657 p_information133 => l_ept_rec.ept_attribute23,
8658 p_information134 => l_ept_rec.ept_attribute24,
8659 p_information135 => l_ept_rec.ept_attribute25,
8660 p_information136 => l_ept_rec.ept_attribute26,
8661 p_information137 => l_ept_rec.ept_attribute27,
8662 p_information138 => l_ept_rec.ept_attribute28,
8663 p_information139 => l_ept_rec.ept_attribute29,
8664 p_information113 => l_ept_rec.ept_attribute3,
8665 p_information140 => l_ept_rec.ept_attribute30,
8666 p_information114 => l_ept_rec.ept_attribute4,
8667 p_information115 => l_ept_rec.ept_attribute5,
8668 p_information116 => l_ept_rec.ept_attribute6,
8669 p_information117 => l_ept_rec.ept_attribute7,
8670 p_information118 => l_ept_rec.ept_attribute8,
8671 p_information119 => l_ept_rec.ept_attribute9,
8672 p_information110 => l_ept_rec.ept_attribute_category,
8673 p_information11 => l_ept_rec.excld_flag,
8674 p_information260 => l_ept_rec.ordr_num,
8675 p_information12 => l_ept_rec.per_typ_cd,
8676 -- Data for MAPPING columns.
8677 p_information173 => l_mapping_name,
8678 p_information174 => l_mapping_id,
8679 p_information181 => l_mapping_column_name1,
8680 p_information182 => l_mapping_column_name2,
8681 -- END other product Mapping columns.
8682 p_information166 => NULL, -- No ESD for Person Type
8683 p_information265 => l_ept_rec.object_version_number,
8684 p_information295 => l_ept_rec.criteria_score,
8685 p_information296 => l_ept_rec.criteria_weight,
8686 --
8687
8688 -- END REPLACE PARAMETER LINES
8689
8690 p_object_version_number => l_object_version_number,
8691 p_effective_date => p_effective_date );
8692 --
8693
8694 if l_out_ept_result_id is null then
8695 l_out_ept_result_id := l_copy_entity_result_id;
8696 end if;
8697
8698 if l_result_type_cd = 'DISPLAY' then
8699 l_out_ept_result_id := l_copy_entity_result_id ;
8700 end if;
8701 --
8702 end loop;
8703 --
8704 end loop;
8705 ---------------------------------------------------------------
8706 -- END OF BEN_ELIG_PER_TYP_PRTE_F ----------------------
8707 ---------------------------------------------------------------
8708 ---------------------------------------------------------------
8709 -- START OF BEN_ELIG_PPL_GRP_PRTE_F ----------------------
8710 ---------------------------------------------------------------
8711 --
8712 for l_parent_rec in c_epg_from_parent(l_ELIGY_PRFL_ID) loop
8713 --
8714 l_mirror_src_entity_result_id := l_out_elp_result_id ;
8715 --
8716 l_elig_ppl_grp_prte_id := l_parent_rec.elig_ppl_grp_prte_id ;
8717 --
8718 for l_epg_rec in c_epg(l_parent_rec.elig_ppl_grp_prte_id,l_mirror_src_entity_result_id,'EPG' ) loop
8719 --
8720 l_table_route_id := null ;
8721 open ben_plan_design_program_module.g_table_route('EPG');
8722 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
8723 close ben_plan_design_program_module.g_table_route ;
8724 --
8725 l_information5 := ben_plan_design_program_module.get_people_group_name(l_epg_rec.people_group_id)
8726 || ben_plan_design_program_module.get_exclude_message(l_epg_rec.excld_flag);
8727 --'Intersection';
8728 --
8729 if p_effective_date between l_epg_rec.effective_start_date
8730 and l_epg_rec.effective_end_date then
8731 --
8732 l_result_type_cd := 'DISPLAY';
8733 else
8734 l_result_type_cd := 'NO DISPLAY';
8735 end if;
8736 --
8737 l_copy_entity_result_id := null;
8738 l_object_version_number := null;
8739 ben_copy_entity_results_api.create_copy_entity_results(
8740 p_copy_entity_result_id => l_copy_entity_result_id,
8741 p_copy_entity_txn_id => p_copy_entity_txn_id,
8742 p_result_type_cd => l_result_type_cd,
8743 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
8744 p_parent_entity_result_id => l_mirror_src_entity_result_id,
8745 p_number_of_copies => l_number_of_copies,
8746 p_table_route_id => l_table_route_id,
8747 P_TABLE_ALIAS => 'EPG',
8748 p_information1 => l_epg_rec.elig_ppl_grp_prte_id,
8749 p_information2 => l_epg_rec.EFFECTIVE_START_DATE,
8750 p_information3 => l_epg_rec.EFFECTIVE_END_DATE,
8751 p_information4 => l_epg_rec.business_group_id,
8752 p_information5 => l_information5 , -- 9999 put name for h-grid
8753 p_information263 => l_epg_rec.eligy_prfl_id,
8754 p_information111 => l_epg_rec.epg_attribute1,
8755 p_information120 => l_epg_rec.epg_attribute10,
8756 p_information121 => l_epg_rec.epg_attribute11,
8757 p_information122 => l_epg_rec.epg_attribute12,
8758 p_information123 => l_epg_rec.epg_attribute13,
8759 p_information124 => l_epg_rec.epg_attribute14,
8760 p_information125 => l_epg_rec.epg_attribute15,
8761 p_information126 => l_epg_rec.epg_attribute16,
8762 p_information127 => l_epg_rec.epg_attribute17,
8763 p_information128 => l_epg_rec.epg_attribute18,
8764 p_information129 => l_epg_rec.epg_attribute19,
8765 p_information112 => l_epg_rec.epg_attribute2,
8766 p_information130 => l_epg_rec.epg_attribute20,
8767 p_information131 => l_epg_rec.epg_attribute21,
8768 p_information132 => l_epg_rec.epg_attribute22,
8769 p_information133 => l_epg_rec.epg_attribute23,
8770 p_information134 => l_epg_rec.epg_attribute24,
8771 p_information135 => l_epg_rec.epg_attribute25,
8772 p_information136 => l_epg_rec.epg_attribute26,
8773 p_information137 => l_epg_rec.epg_attribute27,
8774 p_information138 => l_epg_rec.epg_attribute28,
8775 p_information139 => l_epg_rec.epg_attribute29,
8776 p_information113 => l_epg_rec.epg_attribute3,
8777 p_information140 => l_epg_rec.epg_attribute30,
8778 p_information114 => l_epg_rec.epg_attribute4,
8779 p_information115 => l_epg_rec.epg_attribute5,
8780 p_information116 => l_epg_rec.epg_attribute6,
8781 p_information117 => l_epg_rec.epg_attribute7,
8782 p_information118 => l_epg_rec.epg_attribute8,
8783 p_information119 => l_epg_rec.epg_attribute9,
8784 p_information110 => l_epg_rec.epg_attribute_category,
8785 p_information11 => l_epg_rec.excld_flag,
8786 p_information257 => l_epg_rec.ordr_num,
8787 p_information261 => l_epg_rec.people_group_id,
8788 p_information265 => l_epg_rec.object_version_number,
8789 p_information295 => l_epg_rec.criteria_score,
8790 p_information296 => l_epg_rec.criteria_weight,
8791 --
8792
8793 -- END REPLACE PARAMETER LINES
8794
8795 p_object_version_number => l_object_version_number,
8796 p_effective_date => p_effective_date );
8797 --
8798
8799 if l_out_epg_result_id is null then
8800 l_out_epg_result_id := l_copy_entity_result_id;
8801 end if;
8802
8803 if l_result_type_cd = 'DISPLAY' then
8804 l_out_epg_result_id := l_copy_entity_result_id ;
8805 end if;
8806 --
8807 end loop;
8808 --
8809 end loop;
8810 ---------------------------------------------------------------
8811 -- END OF BEN_ELIG_PPL_GRP_PRTE_F ----------------------
8812 ---------------------------------------------------------------
8813 ---------------------------------------------------------------
8814 -- START OF BEN_ELIG_PRTT_ANTHR_PL_PRTE_F ----------------------
8815 ---------------------------------------------------------------
8816 --
8817 for l_parent_rec in c_epp_from_parent(l_ELIGY_PRFL_ID) loop
8818 --
8819 l_mirror_src_entity_result_id := l_out_elp_result_id ;
8820 --
8821 l_elig_prtt_anthr_pl_prte_id := l_parent_rec.elig_prtt_anthr_pl_prte_id ;
8822 --
8823 for l_epp_rec in c_epp(l_parent_rec.elig_prtt_anthr_pl_prte_id,l_mirror_src_entity_result_id,'EPP' ) loop
8824 --
8825 l_table_route_id := null ;
8826 open ben_plan_design_program_module.g_table_route('EPP');
8827 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
8828 close ben_plan_design_program_module.g_table_route ;
8829 --
8830 l_information5 := ben_plan_design_program_module.get_pl_name(l_epp_rec.pl_id,p_effective_date)
8831 || ben_plan_design_program_module.get_exclude_message(l_epp_rec.excld_flag);
8832 --'Intersection';
8833 --
8834 if p_effective_date between l_epp_rec.effective_start_date
8835 and l_epp_rec.effective_end_date then
8836 --
8837 l_result_type_cd := 'DISPLAY';
8838 else
8839 l_result_type_cd := 'NO DISPLAY';
8840 end if;
8841 --
8842 l_copy_entity_result_id := null;
8843 l_object_version_number := null;
8844 ben_copy_entity_results_api.create_copy_entity_results(
8845 p_copy_entity_result_id => l_copy_entity_result_id,
8846 p_copy_entity_txn_id => p_copy_entity_txn_id,
8847 p_result_type_cd => l_result_type_cd,
8848 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
8849 p_parent_entity_result_id => l_mirror_src_entity_result_id,
8850 p_number_of_copies => l_number_of_copies,
8851 p_table_route_id => l_table_route_id,
8852 P_TABLE_ALIAS => 'EPP',
8853 p_information1 => l_epp_rec.elig_prtt_anthr_pl_prte_id,
8854 p_information2 => l_epp_rec.EFFECTIVE_START_DATE,
8855 p_information3 => l_epp_rec.EFFECTIVE_END_DATE,
8856 p_information4 => l_epp_rec.business_group_id,
8857 p_information5 => l_information5 , -- 9999 put name for h-grid
8858 p_information263 => l_epp_rec.eligy_prfl_id,
8859 p_information111 => l_epp_rec.epp_attribute1,
8860 p_information120 => l_epp_rec.epp_attribute10,
8861 p_information121 => l_epp_rec.epp_attribute11,
8862 p_information122 => l_epp_rec.epp_attribute12,
8863 p_information123 => l_epp_rec.epp_attribute13,
8864 p_information124 => l_epp_rec.epp_attribute14,
8865 p_information125 => l_epp_rec.epp_attribute15,
8866 p_information126 => l_epp_rec.epp_attribute16,
8867 p_information127 => l_epp_rec.epp_attribute17,
8868 p_information128 => l_epp_rec.epp_attribute18,
8869 p_information129 => l_epp_rec.epp_attribute19,
8870 p_information112 => l_epp_rec.epp_attribute2,
8871 p_information130 => l_epp_rec.epp_attribute20,
8872 p_information131 => l_epp_rec.epp_attribute21,
8873 p_information132 => l_epp_rec.epp_attribute22,
8874 p_information133 => l_epp_rec.epp_attribute23,
8875 p_information134 => l_epp_rec.epp_attribute24,
8876 p_information135 => l_epp_rec.epp_attribute25,
8877 p_information136 => l_epp_rec.epp_attribute26,
8878 p_information137 => l_epp_rec.epp_attribute27,
8879 p_information138 => l_epp_rec.epp_attribute28,
8880 p_information139 => l_epp_rec.epp_attribute29,
8881 p_information113 => l_epp_rec.epp_attribute3,
8882 p_information140 => l_epp_rec.epp_attribute30,
8883 p_information114 => l_epp_rec.epp_attribute4,
8884 p_information115 => l_epp_rec.epp_attribute5,
8885 p_information116 => l_epp_rec.epp_attribute6,
8886 p_information117 => l_epp_rec.epp_attribute7,
8887 p_information118 => l_epp_rec.epp_attribute8,
8888 p_information119 => l_epp_rec.epp_attribute9,
8889 p_information110 => l_epp_rec.epp_attribute_category,
8890 p_information11 => l_epp_rec.excld_flag,
8891 p_information260 => l_epp_rec.ordr_num,
8892 p_information261 => l_epp_rec.pl_id,
8893 p_information265 => l_epp_rec.object_version_number,
8894 --p_information295 => l_epp_rec.criteria_score,
8895 --p_information296 => l_epp_rec.criteria_weight,
8896 --
8897
8898 -- END REPLACE PARAMETER LINES
8899
8900 p_object_version_number => l_object_version_number,
8901 p_effective_date => p_effective_date );
8902 --
8903
8904 if l_out_epp_result_id is null then
8905 l_out_epp_result_id := l_copy_entity_result_id;
8906 end if;
8907
8908 if l_result_type_cd = 'DISPLAY' then
8909 l_out_epp_result_id := l_copy_entity_result_id ;
8910 end if;
8911 --
8912 end loop;
8913 --
8914 end loop;
8915 ---------------------------------------------------------------
8916 -- END OF BEN_ELIG_PRTT_ANTHR_PL_PRTE_F ----------------------
8917 ---------------------------------------------------------------
8918 ---------------------------------------------------------------
8919 -- START OF BEN_ELIG_PSTL_CD_R_RNG_PRTE_F ----------------------
8920 ---------------------------------------------------------------
8921 --
8922 for l_parent_rec in c_epz_from_parent(l_ELIGY_PRFL_ID) loop
8923 --
8924 l_mirror_src_entity_result_id := l_out_elp_result_id ;
8925 --
8926 l_elig_pstl_cd_r_rng_prte_id := l_parent_rec.elig_pstl_cd_r_rng_prte_id ;
8927 --
8928 for l_epz_rec in c_epz(l_parent_rec.elig_pstl_cd_r_rng_prte_id,l_mirror_src_entity_result_id,'EPZ' ) loop
8929 --
8930 l_table_route_id := null ;
8931 open ben_plan_design_program_module.g_table_route('EPZ');
8932 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
8933 close ben_plan_design_program_module.g_table_route ;
8934 --
8935 l_information5 := ben_plan_design_program_module.get_pstl_zip_rng_name(l_epz_rec.pstl_zip_rng_id
8936 ,p_effective_date)
8937 || ben_plan_design_program_module.get_exclude_message(l_epz_rec.excld_flag);
8938 --'Intersection';
8939 --
8940 if p_effective_date between l_epz_rec.effective_start_date
8941 and l_epz_rec.effective_end_date then
8942 --
8943 l_result_type_cd := 'DISPLAY';
8944 else
8945 l_result_type_cd := 'NO DISPLAY';
8946 end if;
8947 --
8948 l_copy_entity_result_id := null;
8949 l_object_version_number := null;
8950 ben_copy_entity_results_api.create_copy_entity_results(
8951 p_copy_entity_result_id => l_copy_entity_result_id,
8952 p_copy_entity_txn_id => p_copy_entity_txn_id,
8953 p_result_type_cd => l_result_type_cd,
8954 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
8955 p_parent_entity_result_id => l_mirror_src_entity_result_id,
8956 p_number_of_copies => l_number_of_copies,
8957 p_table_route_id => l_table_route_id,
8958 P_TABLE_ALIAS => 'EPZ',
8959 p_information1 => l_epz_rec.elig_pstl_cd_r_rng_prte_id,
8960 p_information2 => l_epz_rec.EFFECTIVE_START_DATE,
8961 p_information3 => l_epz_rec.EFFECTIVE_END_DATE,
8962 p_information4 => l_epz_rec.business_group_id,
8963 p_information5 => l_information5 , -- 9999 put name for h-grid
8964 p_information263 => l_epz_rec.eligy_prfl_id,
8965 p_information111 => l_epz_rec.epz_attribute1,
8966 p_information120 => l_epz_rec.epz_attribute10,
8967 p_information121 => l_epz_rec.epz_attribute11,
8968 p_information122 => l_epz_rec.epz_attribute12,
8969 p_information123 => l_epz_rec.epz_attribute13,
8970 p_information124 => l_epz_rec.epz_attribute14,
8971 p_information125 => l_epz_rec.epz_attribute15,
8972 p_information126 => l_epz_rec.epz_attribute16,
8973 p_information127 => l_epz_rec.epz_attribute17,
8974 p_information128 => l_epz_rec.epz_attribute18,
8975 p_information129 => l_epz_rec.epz_attribute19,
8976 p_information112 => l_epz_rec.epz_attribute2,
8977 p_information130 => l_epz_rec.epz_attribute20,
8978 p_information131 => l_epz_rec.epz_attribute21,
8979 p_information132 => l_epz_rec.epz_attribute22,
8980 p_information133 => l_epz_rec.epz_attribute23,
8981 p_information134 => l_epz_rec.epz_attribute24,
8982 p_information135 => l_epz_rec.epz_attribute25,
8983 p_information136 => l_epz_rec.epz_attribute26,
8984 p_information137 => l_epz_rec.epz_attribute27,
8985 p_information138 => l_epz_rec.epz_attribute28,
8986 p_information139 => l_epz_rec.epz_attribute29,
8987 p_information113 => l_epz_rec.epz_attribute3,
8988 p_information140 => l_epz_rec.epz_attribute30,
8989 p_information114 => l_epz_rec.epz_attribute4,
8990 p_information115 => l_epz_rec.epz_attribute5,
8991 p_information116 => l_epz_rec.epz_attribute6,
8992 p_information117 => l_epz_rec.epz_attribute7,
8993 p_information118 => l_epz_rec.epz_attribute8,
8994 p_information119 => l_epz_rec.epz_attribute9,
8995 p_information110 => l_epz_rec.epz_attribute_category,
8996 p_information11 => l_epz_rec.excld_flag,
8997 p_information260 => l_epz_rec.ordr_num,
8998 p_information245 => l_epz_rec.pstl_zip_rng_id,
8999 p_information265 => l_epz_rec.object_version_number,
9000 p_information295 => l_epz_rec.criteria_score,
9001 p_information296 => l_epz_rec.criteria_weight,
9002 --
9003
9004 -- END REPLACE PARAMETER LINES
9005
9006 p_object_version_number => l_object_version_number,
9007 p_effective_date => p_effective_date );
9008 --
9009
9010 if l_out_epz_result_id is null then
9011 l_out_epz_result_id := l_copy_entity_result_id;
9012 end if;
9013
9014 if l_result_type_cd = 'DISPLAY' then
9015 l_out_epz_result_id := l_copy_entity_result_id ;
9016 end if;
9017 --
9018 end loop;
9019 --
9020 for l_epz_rec in c_epz_pstl(l_parent_rec.elig_pstl_cd_r_rng_prte_id,l_mirror_src_entity_result_id,'EPZ' ) loop
9021 ben_pd_rate_and_cvg_module.create_postal_results
9022 (
9023 p_validate => p_validate
9024 ,p_copy_entity_result_id => l_out_epz_result_id
9025 ,p_copy_entity_txn_id => p_copy_entity_txn_id
9026 ,p_pstl_zip_rng_id => l_epz_rec.pstl_zip_rng_id
9027 ,p_business_group_id => p_business_group_id
9028 ,p_number_of_copies => p_number_of_copies
9029 ,p_object_version_number => l_object_version_number
9030 ,p_effective_date => p_effective_date
9031 ) ;
9032 end loop;
9033 end loop;
9034 ---------------------------------------------------------------
9035 -- END OF BEN_ELIG_PSTL_CD_R_RNG_PRTE_F ----------------------
9036 ---------------------------------------------------------------
9037 ---------------------------------------------------------------
9038 -- START OF BEN_ELIG_PYRL_PRTE_F ----------------------
9039 ---------------------------------------------------------------
9040 --
9041 for l_parent_rec in c_epy_from_parent(l_ELIGY_PRFL_ID) loop
9042 --
9043 l_mirror_src_entity_result_id := l_out_elp_result_id ;
9044 --
9045 l_elig_pyrl_prte_id := l_parent_rec.elig_pyrl_prte_id ;
9046 --
9047 for l_epy_rec in c_epy(l_parent_rec.elig_pyrl_prte_id,l_mirror_src_entity_result_id,'EPY' ) loop
9048 --
9049 l_table_route_id := null ;
9050 open ben_plan_design_program_module.g_table_route('EPY');
9051 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
9052 close ben_plan_design_program_module.g_table_route ;
9053 --
9054 l_information5 := ben_plan_design_program_module.get_payroll_name(l_epy_rec.payroll_id
9055 ,p_effective_date)
9056 || ben_plan_design_program_module.get_exclude_message(l_epy_rec.excld_flag);
9057 --'Intersection';
9058 --
9059 if p_effective_date between l_epy_rec.effective_start_date
9060 and l_epy_rec.effective_end_date then
9061 --
9062 l_result_type_cd := 'DISPLAY';
9063 else
9064 l_result_type_cd := 'NO DISPLAY';
9065 end if;
9066 --
9067 l_copy_entity_result_id := null;
9068 l_object_version_number := null;
9069
9070 -- To store effective_start_date of payroll
9071 -- for Mapping - Bug 2958658
9072 --
9073 l_payroll_start_date := null;
9074 if l_epy_rec.payroll_id is not null then
9075 open c_payroll_start_date(l_epy_rec.payroll_id);
9076 fetch c_payroll_start_date into l_payroll_start_date;
9077 close c_payroll_start_date;
9078 end if;
9079
9080 --
9081 -- pabodla : MAPPING DATA : Store the mapping column information.
9082 --
9083
9084 l_mapping_name := null;
9085 l_mapping_id := null;
9086 --
9087 -- Get the defined balance name to display on mapping page.
9088 --
9089 open c_get_mapping_name9(l_epy_rec.payroll_id,NVL(l_payroll_start_date,p_effective_date));
9090 fetch c_get_mapping_name9 into l_mapping_name;
9091 close c_get_mapping_name9;
9092 --
9093 l_mapping_id := l_epy_rec.payroll_id;
9094 --
9095 --To set user friendly labels on the mapping page
9096 --
9097 l_mapping_column_name1 := null;
9098 l_mapping_column_name2 :=null;
9099 BEN_PLAN_DESIGN_TXNS_API.get_mapping_column_name(l_table_route_id,
9100 l_mapping_column_name1,
9101 l_mapping_column_name2,
9102 p_copy_entity_txn_id);
9103 --
9104
9105 ben_copy_entity_results_api.create_copy_entity_results(
9106 p_copy_entity_result_id => l_copy_entity_result_id,
9107 p_copy_entity_txn_id => p_copy_entity_txn_id,
9108 p_result_type_cd => l_result_type_cd,
9109 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
9110 p_parent_entity_result_id => l_mirror_src_entity_result_id,
9111 p_number_of_copies => l_number_of_copies,
9112 p_table_route_id => l_table_route_id,
9113 P_TABLE_ALIAS => 'EPY',
9114 p_information1 => l_epy_rec.elig_pyrl_prte_id,
9115 p_information2 => l_epy_rec.EFFECTIVE_START_DATE,
9116 p_information3 => l_epy_rec.EFFECTIVE_END_DATE,
9117 p_information4 => l_epy_rec.business_group_id,
9118 p_information5 => l_information5 , -- 9999 put name for h-grid
9119 p_information263 => l_epy_rec.eligy_prfl_id,
9120 p_information111 => l_epy_rec.epy_attribute1,
9121 p_information120 => l_epy_rec.epy_attribute10,
9122 p_information121 => l_epy_rec.epy_attribute11,
9123 p_information122 => l_epy_rec.epy_attribute12,
9124 p_information123 => l_epy_rec.epy_attribute13,
9125 p_information124 => l_epy_rec.epy_attribute14,
9126 p_information125 => l_epy_rec.epy_attribute15,
9127 p_information126 => l_epy_rec.epy_attribute16,
9128 p_information127 => l_epy_rec.epy_attribute17,
9129 p_information128 => l_epy_rec.epy_attribute18,
9130 p_information129 => l_epy_rec.epy_attribute19,
9131 p_information112 => l_epy_rec.epy_attribute2,
9132 p_information130 => l_epy_rec.epy_attribute20,
9133 p_information131 => l_epy_rec.epy_attribute21,
9134 p_information132 => l_epy_rec.epy_attribute22,
9135 p_information133 => l_epy_rec.epy_attribute23,
9136 p_information134 => l_epy_rec.epy_attribute24,
9137 p_information135 => l_epy_rec.epy_attribute25,
9138 p_information136 => l_epy_rec.epy_attribute26,
9139 p_information137 => l_epy_rec.epy_attribute27,
9140 p_information138 => l_epy_rec.epy_attribute28,
9141 p_information139 => l_epy_rec.epy_attribute29,
9142 p_information113 => l_epy_rec.epy_attribute3,
9143 p_information140 => l_epy_rec.epy_attribute30,
9144 p_information114 => l_epy_rec.epy_attribute4,
9145 p_information115 => l_epy_rec.epy_attribute5,
9146 p_information116 => l_epy_rec.epy_attribute6,
9147 p_information117 => l_epy_rec.epy_attribute7,
9148 p_information118 => l_epy_rec.epy_attribute8,
9149 p_information119 => l_epy_rec.epy_attribute9,
9150 p_information110 => l_epy_rec.epy_attribute_category,
9151 p_information11 => l_epy_rec.excld_flag,
9152 p_information260 => l_epy_rec.ordr_num,
9153 -- Data for MAPPING columns.
9154 p_information173 => l_mapping_name,
9155 p_information174 => l_mapping_id,
9156 p_information181 => l_mapping_column_name1,
9157 p_information182 => l_mapping_column_name2,
9158 -- END other product Mapping columns.
9159 p_information166 => l_payroll_start_date,
9160 p_information265 => l_epy_rec.object_version_number,
9161 p_information295 => l_epy_rec.criteria_score,
9162 p_information296 => l_epy_rec.criteria_weight,
9163 --
9164
9165 -- END REPLACE PARAMETER LINES
9166
9167 p_object_version_number => l_object_version_number,
9168 p_effective_date => p_effective_date );
9169 --
9170
9171 if l_out_epy_result_id is null then
9172 l_out_epy_result_id := l_copy_entity_result_id;
9173 end if;
9174
9175 if l_result_type_cd = 'DISPLAY' then
9176 l_out_epy_result_id := l_copy_entity_result_id ;
9177 end if;
9178 --
9179 end loop;
9180 --
9181 end loop;
9182 ---------------------------------------------------------------
9183 -- END OF BEN_ELIG_PYRL_PRTE_F ----------------------
9184 ---------------------------------------------------------------
9185 ---------------------------------------------------------------
9186 -- START OF BEN_ELIG_PY_BSS_PRTE_F ----------------------
9187 ---------------------------------------------------------------
9188 --
9189 for l_parent_rec in c_epb_from_parent(l_ELIGY_PRFL_ID) loop
9190 --
9191 l_mirror_src_entity_result_id := l_out_elp_result_id ;
9192 --
9193 l_elig_py_bss_prte_id := l_parent_rec.elig_py_bss_prte_id ;
9194 --
9195 for l_epb_rec in c_epb(l_parent_rec.elig_py_bss_prte_id,l_mirror_src_entity_result_id,'EPB' ) loop
9196 --
9197 l_table_route_id := null ;
9198 open ben_plan_design_program_module.g_table_route('EPB');
9199 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
9200 close ben_plan_design_program_module.g_table_route ;
9201 --
9202 l_information5 := ben_plan_design_program_module.get_pay_basis_name(l_epb_rec.pay_basis_id)
9203 || ben_plan_design_program_module.get_exclude_message(l_epb_rec.excld_flag);
9204 --'Intersection';
9205 --
9206 if p_effective_date between l_epb_rec.effective_start_date
9207 and l_epb_rec.effective_end_date then
9208 --
9209 l_result_type_cd := 'DISPLAY';
9210 else
9211 l_result_type_cd := 'NO DISPLAY';
9212 end if;
9213 --
9214 l_copy_entity_result_id := null;
9215 l_object_version_number := null;
9216 --
9217 -- pabodla : MAPPING DATA : Store the mapping column information.
9218 --
9219
9220 l_mapping_name := null;
9221 l_mapping_id := null;
9222 --
9223 -- Get the defined balance name to display on mapping page.
9224 --
9225 open c_get_mapping_name10(l_epb_rec.pay_basis_id);
9226 fetch c_get_mapping_name10 into l_mapping_name;
9227 close c_get_mapping_name10;
9228 --
9229 l_mapping_id := l_epb_rec.pay_basis_id;
9230 --
9231 --To set user friendly labels on the mapping page
9232 --
9233 l_mapping_column_name1 := null;
9234 l_mapping_column_name2 :=null;
9235 BEN_PLAN_DESIGN_TXNS_API.get_mapping_column_name(l_table_route_id,
9236 l_mapping_column_name1,
9237 l_mapping_column_name2,
9238 p_copy_entity_txn_id);
9239 --
9240 ben_copy_entity_results_api.create_copy_entity_results(
9241 p_copy_entity_result_id => l_copy_entity_result_id,
9242 p_copy_entity_txn_id => p_copy_entity_txn_id,
9243 p_result_type_cd => l_result_type_cd,
9244 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
9245 p_parent_entity_result_id => l_mirror_src_entity_result_id,
9246 p_number_of_copies => l_number_of_copies,
9247 p_table_route_id => l_table_route_id,
9248 P_TABLE_ALIAS => 'EPB',
9249 p_information1 => l_epb_rec.elig_py_bss_prte_id,
9250 p_information2 => l_epb_rec.EFFECTIVE_START_DATE,
9251 p_information3 => l_epb_rec.EFFECTIVE_END_DATE,
9252 p_information4 => l_epb_rec.business_group_id,
9253 p_information5 => l_information5 , -- 9999 put name for h-grid
9254 p_information263 => l_epb_rec.eligy_prfl_id,
9255 p_information111 => l_epb_rec.epb_attribute1,
9256 p_information120 => l_epb_rec.epb_attribute10,
9257 p_information121 => l_epb_rec.epb_attribute11,
9258 p_information122 => l_epb_rec.epb_attribute12,
9259 p_information123 => l_epb_rec.epb_attribute13,
9260 p_information124 => l_epb_rec.epb_attribute14,
9261 p_information125 => l_epb_rec.epb_attribute15,
9262 p_information126 => l_epb_rec.epb_attribute16,
9263 p_information127 => l_epb_rec.epb_attribute17,
9264 p_information128 => l_epb_rec.epb_attribute18,
9265 p_information129 => l_epb_rec.epb_attribute19,
9266 p_information112 => l_epb_rec.epb_attribute2,
9267 p_information130 => l_epb_rec.epb_attribute20,
9268 p_information131 => l_epb_rec.epb_attribute21,
9269 p_information132 => l_epb_rec.epb_attribute22,
9270 p_information133 => l_epb_rec.epb_attribute23,
9271 p_information134 => l_epb_rec.epb_attribute24,
9272 p_information135 => l_epb_rec.epb_attribute25,
9273 p_information136 => l_epb_rec.epb_attribute26,
9274 p_information137 => l_epb_rec.epb_attribute27,
9275 p_information138 => l_epb_rec.epb_attribute28,
9276 p_information139 => l_epb_rec.epb_attribute29,
9277 p_information113 => l_epb_rec.epb_attribute3,
9278 p_information140 => l_epb_rec.epb_attribute30,
9279 p_information114 => l_epb_rec.epb_attribute4,
9280 p_information115 => l_epb_rec.epb_attribute5,
9281 p_information116 => l_epb_rec.epb_attribute6,
9282 p_information117 => l_epb_rec.epb_attribute7,
9283 p_information118 => l_epb_rec.epb_attribute8,
9284 p_information119 => l_epb_rec.epb_attribute9,
9285 p_information110 => l_epb_rec.epb_attribute_category,
9286 p_information11 => l_epb_rec.excld_flag,
9287 p_information260 => l_epb_rec.ordr_num,
9288 -- Data for MAPPING columns.
9289 p_information173 => l_mapping_name,
9290 p_information174 => l_mapping_id,
9291 p_information181 => l_mapping_column_name1,
9292 p_information182 => l_mapping_column_name2,
9293 -- END other product Mapping columns.
9294 p_information166 => NULL, -- No ESD for Pay Basis
9295 p_information265 => l_epb_rec.object_version_number,
9296 p_information295 => l_epb_rec.criteria_score,
9297 p_information296 => l_epb_rec.criteria_weight,
9298 --
9299
9300 -- END REPLACE PARAMETER LINES
9301
9302 p_object_version_number => l_object_version_number,
9303 p_effective_date => p_effective_date );
9304 --
9305
9306 if l_out_epb_result_id is null then
9307 l_out_epb_result_id := l_copy_entity_result_id;
9308 end if;
9309
9310 if l_result_type_cd = 'DISPLAY' then
9311 l_out_epb_result_id := l_copy_entity_result_id ;
9312 end if;
9313 --
9314 end loop;
9315 --
9316 end loop;
9317 ---------------------------------------------------------------
9318 -- END OF BEN_ELIG_PY_BSS_PRTE_F ----------------------
9319 ---------------------------------------------------------------
9320 ---------------------------------------------------------------
9321 -- START OF BEN_ELIG_SCHEDD_HRS_PRTE_F ----------------------
9322 ---------------------------------------------------------------
9323 --
9324 for l_parent_rec in c_esh_from_parent(l_ELIGY_PRFL_ID) loop
9325 --
9326 l_mirror_src_entity_result_id := l_out_elp_result_id ;
9327 --
9328 l_elig_schedd_hrs_prte_id := l_parent_rec.elig_schedd_hrs_prte_id ;
9329 --
9330 for l_esh_rec in c_esh(l_parent_rec.elig_schedd_hrs_prte_id,l_mirror_src_entity_result_id,'ESH' ) loop
9331 --
9332 l_table_route_id := null ;
9333 open ben_plan_design_program_module.g_table_route('ESH');
9334 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
9335 close ben_plan_design_program_module.g_table_route ;
9336 --
9337 -- Bug No: 3451872
9338 --
9339 if (l_esh_rec.schedd_hrs_rl is null) then
9340 l_information5 := l_esh_rec.hrs_num ||' - ' ||l_esh_rec.max_hrs_num
9341 ||' '||hr_general.decode_lookup('FREQUENCY',l_esh_rec.freq_cd)
9342 || ben_plan_design_program_module.get_exclude_message(l_esh_rec.excld_flag);
9343
9344 else
9345 l_information5 := ben_plan_design_program_module.get_formula_name(l_esh_rec.schedd_hrs_rl, p_effective_date)
9346 || ben_plan_design_program_module.get_exclude_message(l_esh_rec.excld_flag);
9347 --'Intersection';
9348 end if;
9349 --
9350 if p_effective_date between l_esh_rec.effective_start_date
9351 and l_esh_rec.effective_end_date then
9352 --
9353 l_result_type_cd := 'DISPLAY';
9354 else
9355 l_result_type_cd := 'NO DISPLAY';
9356 end if;
9357 --
9358 l_copy_entity_result_id := null;
9359 l_object_version_number := null;
9360 ben_copy_entity_results_api.create_copy_entity_results(
9361 p_copy_entity_result_id => l_copy_entity_result_id,
9362 p_copy_entity_txn_id => p_copy_entity_txn_id,
9363 p_result_type_cd => l_result_type_cd,
9364 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
9365 p_parent_entity_result_id => l_mirror_src_entity_result_id,
9366 p_number_of_copies => l_number_of_copies,
9367 p_table_route_id => l_table_route_id,
9368 P_TABLE_ALIAS => 'ESH',
9369 p_information1 => l_esh_rec.elig_schedd_hrs_prte_id,
9370 p_information2 => l_esh_rec.EFFECTIVE_START_DATE,
9371 p_information3 => l_esh_rec.EFFECTIVE_END_DATE,
9372 p_information4 => l_esh_rec.business_group_id,
9373 p_information5 => l_information5 , -- 9999 put name for h-grid
9374 p_information11 => l_esh_rec.determination_cd,
9375 p_information259 => l_esh_rec.determination_rl,
9376 p_information263 => l_esh_rec.eligy_prfl_id,
9377 p_information111 => l_esh_rec.esh_attribute1,
9378 p_information120 => l_esh_rec.esh_attribute10,
9379 p_information121 => l_esh_rec.esh_attribute11,
9380 p_information122 => l_esh_rec.esh_attribute12,
9381 p_information123 => l_esh_rec.esh_attribute13,
9382 p_information124 => l_esh_rec.esh_attribute14,
9383 p_information125 => l_esh_rec.esh_attribute15,
9384 p_information126 => l_esh_rec.esh_attribute16,
9385 p_information127 => l_esh_rec.esh_attribute17,
9386 p_information128 => l_esh_rec.esh_attribute18,
9387 p_information129 => l_esh_rec.esh_attribute19,
9388 p_information112 => l_esh_rec.esh_attribute2,
9389 p_information130 => l_esh_rec.esh_attribute20,
9390 p_information131 => l_esh_rec.esh_attribute21,
9391 p_information132 => l_esh_rec.esh_attribute22,
9392 p_information133 => l_esh_rec.esh_attribute23,
9393 p_information134 => l_esh_rec.esh_attribute24,
9394 p_information135 => l_esh_rec.esh_attribute25,
9395 p_information136 => l_esh_rec.esh_attribute26,
9396 p_information137 => l_esh_rec.esh_attribute27,
9397 p_information138 => l_esh_rec.esh_attribute28,
9398 p_information139 => l_esh_rec.esh_attribute29,
9399 p_information113 => l_esh_rec.esh_attribute3,
9400 p_information140 => l_esh_rec.esh_attribute30,
9401 p_information114 => l_esh_rec.esh_attribute4,
9402 p_information115 => l_esh_rec.esh_attribute5,
9403 p_information116 => l_esh_rec.esh_attribute6,
9404 p_information117 => l_esh_rec.esh_attribute7,
9405 p_information118 => l_esh_rec.esh_attribute8,
9406 p_information119 => l_esh_rec.esh_attribute9,
9407 p_information110 => l_esh_rec.esh_attribute_category,
9408 p_information13 => l_esh_rec.excld_flag,
9409 p_information14 => l_esh_rec.freq_cd,
9410 p_information288 => l_esh_rec.hrs_num,
9411 p_information287 => l_esh_rec.max_hrs_num,
9412 p_information264 => l_esh_rec.ordr_num,
9413 p_information12 => l_esh_rec.rounding_cd,
9414 p_information257 => l_esh_rec.rounding_rl,
9415 p_information258 => l_esh_rec.schedd_hrs_rl,
9416 p_information265 => l_esh_rec.object_version_number,
9417 p_information295 => l_esh_rec.criteria_score,
9418 p_information296 => l_esh_rec.criteria_weight,
9419 --
9420
9421 -- END REPLACE PARAMETER LINES
9422
9423 p_object_version_number => l_object_version_number,
9424 p_effective_date => p_effective_date );
9425 --
9426
9427 if l_out_esh_result_id is null then
9428 l_out_esh_result_id := l_copy_entity_result_id;
9429 end if;
9430
9431 if l_result_type_cd = 'DISPLAY' then
9432 l_out_esh_result_id := l_copy_entity_result_id ;
9433 end if;
9434 --
9435
9436 if (l_esh_rec.determination_rl is not null) then
9437 ben_plan_design_program_module.create_formula_result(
9438 p_validate => p_validate
9439 ,p_copy_entity_result_id => l_copy_entity_result_id
9440 ,p_copy_entity_txn_id => p_copy_entity_txn_id
9441 ,p_formula_id => l_esh_rec.determination_rl
9442 ,p_business_group_id => l_esh_rec.business_group_id
9443 ,p_number_of_copies => l_number_of_copies
9444 ,p_object_version_number => l_object_version_number
9445 ,p_effective_date => p_effective_date);
9446 end if;
9447
9448 if (l_esh_rec.rounding_rl is not null) then
9449 ben_plan_design_program_module.create_formula_result(
9450 p_validate => p_validate
9451 ,p_copy_entity_result_id => l_copy_entity_result_id
9452 ,p_copy_entity_txn_id => p_copy_entity_txn_id
9453 ,p_formula_id => l_esh_rec.rounding_rl
9454 ,p_business_group_id => l_esh_rec.business_group_id
9455 ,p_number_of_copies => l_number_of_copies
9456 ,p_object_version_number => l_object_version_number
9457 ,p_effective_date => p_effective_date);
9458 end if;
9459
9460 if (l_esh_rec.schedd_hrs_rl is not null) then
9461 ben_plan_design_program_module.create_formula_result(
9462 p_validate => p_validate
9463 ,p_copy_entity_result_id => l_copy_entity_result_id
9464 ,p_copy_entity_txn_id => p_copy_entity_txn_id
9465 ,p_formula_id => l_esh_rec.schedd_hrs_rl
9466 ,p_business_group_id => l_esh_rec.business_group_id
9467 ,p_number_of_copies => l_number_of_copies
9468 ,p_object_version_number => l_object_version_number
9469 ,p_effective_date => p_effective_date);
9470 end if;
9471
9472 end loop;
9473 --
9474 end loop;
9475 ---------------------------------------------------------------
9476 -- END OF BEN_ELIG_SCHEDD_HRS_PRTE_F ----------------------
9477 ---------------------------------------------------------------
9478 ---------------------------------------------------------------
9479 -- START OF BEN_ELIG_SVC_AREA_PRTE_F ----------------------
9480 ---------------------------------------------------------------
9481 --
9482 for l_parent_rec in c_esa_from_parent(l_ELIGY_PRFL_ID) loop
9483 --
9484 l_mirror_src_entity_result_id := l_out_elp_result_id ;
9485 --
9486 l_elig_svc_area_prte_id := l_parent_rec.elig_svc_area_prte_id ;
9487 --
9488 for l_esa_rec in c_esa(l_parent_rec.elig_svc_area_prte_id,l_mirror_src_entity_result_id,'ESA' ) loop
9489 --
9490 l_table_route_id := null ;
9491 open ben_plan_design_program_module.g_table_route('ESA');
9492 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
9493 close ben_plan_design_program_module.g_table_route ;
9494 --
9495 l_information5 := ben_plan_design_program_module.get_svc_area_name(l_esa_rec.svc_area_id
9496 ,p_effective_date)
9497 || ben_plan_design_program_module.get_exclude_message(l_esa_rec.excld_flag);
9498 --'Intersection';
9499 --
9500 if p_effective_date between l_esa_rec.effective_start_date
9501 and l_esa_rec.effective_end_date then
9502 --
9503 l_result_type_cd := 'DISPLAY';
9504 else
9505 l_result_type_cd := 'NO DISPLAY';
9506 end if;
9507 --
9508 l_copy_entity_result_id := null;
9509 l_object_version_number := null;
9510 ben_copy_entity_results_api.create_copy_entity_results(
9511 p_copy_entity_result_id => l_copy_entity_result_id,
9512 p_copy_entity_txn_id => p_copy_entity_txn_id,
9513 p_result_type_cd => l_result_type_cd,
9514 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
9515 p_parent_entity_result_id => l_mirror_src_entity_result_id,
9516 p_number_of_copies => l_number_of_copies,
9517 p_table_route_id => l_table_route_id,
9518 P_TABLE_ALIAS => 'ESA',
9519 p_information1 => l_esa_rec.elig_svc_area_prte_id,
9520 p_information2 => l_esa_rec.EFFECTIVE_START_DATE,
9521 p_information3 => l_esa_rec.EFFECTIVE_END_DATE,
9522 p_information4 => l_esa_rec.business_group_id,
9523 p_information5 => l_information5 , -- 9999 put name for h-grid
9524 p_information263 => l_esa_rec.eligy_prfl_id,
9525 p_information111 => l_esa_rec.esa_attribute1,
9526 p_information120 => l_esa_rec.esa_attribute10,
9527 p_information121 => l_esa_rec.esa_attribute11,
9528 p_information122 => l_esa_rec.esa_attribute12,
9529 p_information123 => l_esa_rec.esa_attribute13,
9530 p_information124 => l_esa_rec.esa_attribute14,
9531 p_information125 => l_esa_rec.esa_attribute15,
9532 p_information126 => l_esa_rec.esa_attribute16,
9533 p_information127 => l_esa_rec.esa_attribute17,
9534 p_information128 => l_esa_rec.esa_attribute18,
9535 p_information129 => l_esa_rec.esa_attribute19,
9536 p_information112 => l_esa_rec.esa_attribute2,
9537 p_information130 => l_esa_rec.esa_attribute20,
9538 p_information131 => l_esa_rec.esa_attribute21,
9539 p_information132 => l_esa_rec.esa_attribute22,
9540 p_information133 => l_esa_rec.esa_attribute23,
9541 p_information134 => l_esa_rec.esa_attribute24,
9542 p_information135 => l_esa_rec.esa_attribute25,
9543 p_information136 => l_esa_rec.esa_attribute26,
9544 p_information137 => l_esa_rec.esa_attribute27,
9545 p_information138 => l_esa_rec.esa_attribute28,
9546 p_information139 => l_esa_rec.esa_attribute29,
9547 p_information113 => l_esa_rec.esa_attribute3,
9548 p_information140 => l_esa_rec.esa_attribute30,
9549 p_information114 => l_esa_rec.esa_attribute4,
9550 p_information115 => l_esa_rec.esa_attribute5,
9551 p_information116 => l_esa_rec.esa_attribute6,
9552 p_information117 => l_esa_rec.esa_attribute7,
9553 p_information118 => l_esa_rec.esa_attribute8,
9554 p_information119 => l_esa_rec.esa_attribute9,
9555 p_information110 => l_esa_rec.esa_attribute_category,
9556 p_information11 => l_esa_rec.excld_flag,
9557 p_information260 => l_esa_rec.ordr_num,
9558 p_information241 => l_esa_rec.svc_area_id,
9559 p_information265 => l_esa_rec.object_version_number,
9560 p_information295 => l_esa_rec.criteria_score,
9561 p_information296 => l_esa_rec.criteria_weight,
9562 --
9563
9564 -- END REPLACE PARAMETER LINES
9565
9566 p_object_version_number => l_object_version_number,
9567 p_effective_date => p_effective_date );
9568 --
9569
9570 if l_out_esa_result_id is null then
9571 l_out_esa_result_id := l_copy_entity_result_id;
9572 end if;
9573
9574 if l_result_type_cd = 'DISPLAY' then
9575 l_out_esa_result_id := l_copy_entity_result_id ;
9576 end if;
9577 --
9578 end loop;
9579 --
9580 for l_esa_rec in c_esa_svc(l_parent_rec.elig_svc_area_prte_id,l_mirror_src_entity_result_id,'ESA' ) loop
9581 ben_pd_rate_and_cvg_module.create_service_results
9582 (
9583 p_validate => p_validate
9584 ,p_copy_entity_result_id => l_out_esa_result_id
9585 ,p_copy_entity_txn_id => p_copy_entity_txn_id
9586 ,p_svc_area_id => l_esa_rec.svc_area_id
9587 ,p_business_group_id => p_business_group_id
9588 ,p_number_of_copies => p_number_of_copies
9589 ,p_object_version_number => l_object_version_number
9590 ,p_effective_date => p_effective_date
9591 );
9592 end loop;
9593 end loop;
9594 ---------------------------------------------------------------
9595 -- END OF BEN_ELIG_SVC_AREA_PRTE_F ----------------------
9596 ---------------------------------------------------------------
9597 ---------------------------------------------------------------
9598 -- START OF BEN_ELIG_WK_LOC_PRTE_F ----------------------
9599 ---------------------------------------------------------------
9600 --
9601 for l_parent_rec in c_ewl_from_parent(l_ELIGY_PRFL_ID) loop
9602 --
9603 l_mirror_src_entity_result_id := l_out_elp_result_id ;
9604 --
9605 l_elig_wk_loc_prte_id := l_parent_rec.elig_wk_loc_prte_id ;
9606 --
9607 for l_ewl_rec in c_ewl(l_parent_rec.elig_wk_loc_prte_id,l_mirror_src_entity_result_id,'EWL') loop
9608 --
9609 l_table_route_id := null ;
9610 open ben_plan_design_program_module.g_table_route('EWL');
9611 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
9612 close ben_plan_design_program_module.g_table_route ;
9613 --
9614 l_information5 := ben_plan_design_program_module.get_location_name(l_ewl_rec.location_id)
9615 || ben_plan_design_program_module.get_exclude_message(l_ewl_rec.excld_flag);
9616 --'Intersection';
9617 --
9618 if p_effective_date between l_ewl_rec.effective_start_date
9619 and l_ewl_rec.effective_end_date then
9620 --
9621 l_result_type_cd := 'DISPLAY';
9622 else
9623 l_result_type_cd := 'NO DISPLAY';
9624 end if;
9625 --
9626 l_copy_entity_result_id := null;
9627 l_object_version_number := null;
9628
9629 -- To store effective_start_date of location
9630 -- for Mapping - Bug 2958658
9631 --
9632 l_location_inactive_date := null;
9633 if l_ewl_rec.location_id is not null then
9634 open c_location_inactive_date(l_ewl_rec.location_id);
9635 fetch c_location_inactive_date into l_location_inactive_date;
9636 close c_location_inactive_date;
9637 end if;
9638
9639 --
9640 -- pabodla : MAPPING DATA : Store the mapping column information.
9641 --
9642
9643 l_mapping_name := null;
9644 l_mapping_id := null;
9645 --
9646 -- Get the defined balance name to display on mapping page.
9647 --
9648 open c_get_mapping_name15(l_ewl_rec.location_id,NVL(l_location_inactive_date,p_effective_date));
9649 fetch c_get_mapping_name15 into l_mapping_name;
9650 close c_get_mapping_name15;
9651 --
9652 l_mapping_id := l_ewl_rec.location_id;
9653 --
9654 --To set user friendly labels on the mapping page
9655 --
9656 l_mapping_column_name1 := null;
9657 l_mapping_column_name2 :=null;
9658 BEN_PLAN_DESIGN_TXNS_API.get_mapping_column_name(l_table_route_id,
9659 l_mapping_column_name1,
9660 l_mapping_column_name2,
9661 p_copy_entity_txn_id);
9662 --
9663
9664 ben_copy_entity_results_api.create_copy_entity_results(
9665 p_copy_entity_result_id => l_copy_entity_result_id,
9666 p_copy_entity_txn_id => p_copy_entity_txn_id,
9667 p_result_type_cd => l_result_type_cd,
9668 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
9669 p_parent_entity_result_id => l_mirror_src_entity_result_id,
9670 p_number_of_copies => l_number_of_copies,
9671 p_table_route_id => l_table_route_id,
9672 P_TABLE_ALIAS => 'EWL',
9673 p_information1 => l_ewl_rec.elig_wk_loc_prte_id,
9674 p_information2 => l_ewl_rec.EFFECTIVE_START_DATE,
9675 p_information3 => l_ewl_rec.EFFECTIVE_END_DATE,
9676 p_information4 => l_ewl_rec.business_group_id,
9677 p_information5 => l_information5 , -- 9999 put name for h-grid
9678 p_information263 => l_ewl_rec.eligy_prfl_id,
9679 p_information111 => l_ewl_rec.ewl_attribute1,
9680 p_information120 => l_ewl_rec.ewl_attribute10,
9681 p_information121 => l_ewl_rec.ewl_attribute11,
9682 p_information122 => l_ewl_rec.ewl_attribute12,
9683 p_information123 => l_ewl_rec.ewl_attribute13,
9684 p_information124 => l_ewl_rec.ewl_attribute14,
9685 p_information125 => l_ewl_rec.ewl_attribute15,
9686 p_information126 => l_ewl_rec.ewl_attribute16,
9687 p_information127 => l_ewl_rec.ewl_attribute17,
9688 p_information128 => l_ewl_rec.ewl_attribute18,
9689 p_information129 => l_ewl_rec.ewl_attribute19,
9690 p_information112 => l_ewl_rec.ewl_attribute2,
9691 p_information130 => l_ewl_rec.ewl_attribute20,
9692 p_information131 => l_ewl_rec.ewl_attribute21,
9693 p_information132 => l_ewl_rec.ewl_attribute22,
9694 p_information133 => l_ewl_rec.ewl_attribute23,
9695 p_information134 => l_ewl_rec.ewl_attribute24,
9696 p_information135 => l_ewl_rec.ewl_attribute25,
9697 p_information136 => l_ewl_rec.ewl_attribute26,
9698 p_information137 => l_ewl_rec.ewl_attribute27,
9699 p_information138 => l_ewl_rec.ewl_attribute28,
9700 p_information139 => l_ewl_rec.ewl_attribute29,
9701 p_information113 => l_ewl_rec.ewl_attribute3,
9702 p_information140 => l_ewl_rec.ewl_attribute30,
9703 p_information114 => l_ewl_rec.ewl_attribute4,
9704 p_information115 => l_ewl_rec.ewl_attribute5,
9705 p_information116 => l_ewl_rec.ewl_attribute6,
9706 p_information117 => l_ewl_rec.ewl_attribute7,
9707 p_information118 => l_ewl_rec.ewl_attribute8,
9708 p_information119 => l_ewl_rec.ewl_attribute9,
9709 p_information110 => l_ewl_rec.ewl_attribute_category,
9710 p_information11 => l_ewl_rec.excld_flag,
9711 -- Data for MAPPING columns.
9712 p_information173 => l_mapping_name,
9713 p_information174 => l_mapping_id,
9714 p_information181 => l_mapping_column_name1,
9715 p_information182 => l_mapping_column_name2,
9716 -- END other product Mapping columns.
9717 p_information260 => l_ewl_rec.ordr_num,
9718 p_information166 => l_location_inactive_date,
9719 p_information265 => l_ewl_rec.object_version_number,
9720 p_information295 => l_ewl_rec.criteria_score,
9721 p_information296 => l_ewl_rec.criteria_weight,
9722 --
9723
9724 -- END REPLACE PARAMETER LINES
9725
9726 p_object_version_number => l_object_version_number,
9727 p_effective_date => p_effective_date );
9728 --
9729
9730 if l_out_ewl_result_id is null then
9731 l_out_ewl_result_id := l_copy_entity_result_id;
9732 end if;
9733
9734 if l_result_type_cd = 'DISPLAY' then
9735 l_out_ewl_result_id := l_copy_entity_result_id ;
9736 end if;
9737 --
9738 end loop;
9739 --
9740 end loop;
9741 ---------------------------------------------------------------
9742 -- END OF BEN_ELIG_WK_LOC_PRTE_F ----------------------
9743 ---------------------------------------------------------------
9744 ---------------------------------------------------------------
9745 -- START OF BEN_ELIG_SP_CLNG_PRG_PRTE_F ----------------------
9746 ---------------------------------------------------------------
9747 --
9748 for l_parent_rec in c_esp_from_parent(l_ELIGY_PRFL_ID) loop
9749 --
9750 l_mirror_src_entity_result_id := l_out_elp_result_id ;
9751 --
9752 l_elig_sp_clng_prg_prte_id := l_parent_rec.elig_sp_clng_prg_prte_id ;
9753 --
9754 for l_esp_rec in c_esp(l_parent_rec.elig_sp_clng_prg_prte_id,l_mirror_src_entity_result_id,'ESP' ) loop
9755 --
9756 l_table_route_id := null ;
9757 open ben_plan_design_program_module.g_table_route('ESP');
9758 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
9759 close ben_plan_design_program_module.g_table_route ;
9760 --
9761 l_information5 := ben_plan_design_program_module.get_sp_clng_step_name(l_esp_rec.special_ceiling_step_id
9762 ,p_effective_date)
9763 || ben_plan_design_program_module.get_exclude_message(l_esp_rec.excld_flag);
9764 -- 'Intersection';
9765 --
9766 if p_effective_date between l_esp_rec.effective_start_date
9767 and l_esp_rec.effective_end_date then
9768 --
9769 l_result_type_cd := 'DISPLAY';
9770 else
9771 l_result_type_cd := 'NO DISPLAY';
9772 end if;
9773 --
9774 l_copy_entity_result_id := null;
9775 l_object_version_number := null;
9776
9777 -- To store effective_start_date of step
9778 -- for Mapping - Bug 2958658
9779 --
9780 l_step_start_date := null;
9781 if l_esp_rec.special_ceiling_step_id is not null then
9782 open c_step_start_date(l_esp_rec.special_ceiling_step_id);
9783 fetch c_step_start_date into l_step_start_date;
9784 close c_step_start_date;
9785 end if;
9786
9787 --
9788 -- pabodla : MAPPING DATA : Store the mapping column information.
9789 --
9790
9791 l_mapping_name := null;
9792 l_mapping_id := null;
9793 --
9794 -- Get the defined balance name to display on mapping page.
9795 --
9796 /* 9999 uncomment after sql resolved
9797 open c_get_mapping_name12(l_esp_rec.special_ceiling_step_id,NVL(l_step_start_date,p_effective_date));
9798 fetch c_get_mapping_name12 into l_mapping_name;
9799 close c_get_mapping_name12;
9800 */
9801 --
9802 l_mapping_id := l_esp_rec.special_ceiling_step_id;
9803 --
9804 --To set user friendly labels on the mapping page
9805 --
9806 l_mapping_column_name1 := null;
9807 l_mapping_column_name2 :=null;
9808 BEN_PLAN_DESIGN_TXNS_API.get_mapping_column_name(l_table_route_id,
9809 l_mapping_column_name1,
9810 l_mapping_column_name2,
9811 p_copy_entity_txn_id);
9812 --
9813
9814 ben_copy_entity_results_api.create_copy_entity_results(
9815 p_copy_entity_result_id => l_copy_entity_result_id,
9816 p_copy_entity_txn_id => p_copy_entity_txn_id,
9817 p_result_type_cd => l_result_type_cd,
9818 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
9819 p_parent_entity_result_id => l_mirror_src_entity_result_id,
9820 p_number_of_copies => l_number_of_copies,
9821 p_table_route_id => l_table_route_id,
9822 P_TABLE_ALIAS => 'ESP',
9823 p_information1 => l_esp_rec.elig_sp_clng_prg_prte_id,
9824 p_information2 => l_esp_rec.EFFECTIVE_START_DATE,
9825 p_information3 => l_esp_rec.EFFECTIVE_END_DATE,
9826 p_information4 => l_esp_rec.business_group_id,
9827 p_information5 => l_information5 , -- 9999 put name for h-grid
9828 p_information263 => l_esp_rec.eligy_prfl_id,
9829 p_information111 => l_esp_rec.esp_attribute1,
9830 p_information120 => l_esp_rec.esp_attribute10,
9831 p_information121 => l_esp_rec.esp_attribute11,
9832 p_information122 => l_esp_rec.esp_attribute12,
9833 p_information123 => l_esp_rec.esp_attribute13,
9834 p_information124 => l_esp_rec.esp_attribute14,
9835 p_information125 => l_esp_rec.esp_attribute15,
9836 p_information126 => l_esp_rec.esp_attribute16,
9837 p_information127 => l_esp_rec.esp_attribute17,
9838 p_information128 => l_esp_rec.esp_attribute18,
9839 p_information129 => l_esp_rec.esp_attribute19,
9840 p_information112 => l_esp_rec.esp_attribute2,
9841 p_information130 => l_esp_rec.esp_attribute20,
9842 p_information131 => l_esp_rec.esp_attribute21,
9843 p_information132 => l_esp_rec.esp_attribute22,
9844 p_information133 => l_esp_rec.esp_attribute23,
9845 p_information134 => l_esp_rec.esp_attribute24,
9846 p_information135 => l_esp_rec.esp_attribute25,
9847 p_information136 => l_esp_rec.esp_attribute26,
9848 p_information137 => l_esp_rec.esp_attribute27,
9849 p_information138 => l_esp_rec.esp_attribute28,
9850 p_information139 => l_esp_rec.esp_attribute29,
9851 p_information113 => l_esp_rec.esp_attribute3,
9852 p_information140 => l_esp_rec.esp_attribute30,
9853 p_information114 => l_esp_rec.esp_attribute4,
9854 p_information115 => l_esp_rec.esp_attribute5,
9855 p_information116 => l_esp_rec.esp_attribute6,
9856 p_information117 => l_esp_rec.esp_attribute7,
9857 p_information118 => l_esp_rec.esp_attribute8,
9858 p_information119 => l_esp_rec.esp_attribute9,
9859 p_information110 => l_esp_rec.esp_attribute_category,
9860 p_information11 => l_esp_rec.excld_flag,
9861 p_information257 => l_esp_rec.ordr_num,
9862 -- p_information258 => l_esp_rec.sp_clng_prgrssn_pt_cd,
9863 -- Data for MAPPING columns.
9864 p_information173 => l_mapping_name,
9865 p_information174 => l_mapping_id,
9866 p_information181 => l_mapping_column_name1,
9867 p_information182 => l_mapping_column_name2,
9868 -- END other product Mapping columns.
9869 p_information166 => l_step_start_date,
9870 p_information265 => l_esp_rec.object_version_number,
9871 p_information295 => l_esp_rec.criteria_score,
9872 p_information296 => l_esp_rec.criteria_weight,
9873 --
9874
9875 -- END REPLACE PARAMETER LINES
9876
9877 p_object_version_number => l_object_version_number,
9878 p_effective_date => p_effective_date );
9879 --
9880
9881 if l_out_esp_result_id is null then
9882 l_out_esp_result_id := l_copy_entity_result_id;
9883 end if;
9884
9885 if l_result_type_cd = 'DISPLAY' then
9886 l_out_esp_result_id := l_copy_entity_result_id ;
9887 end if;
9888 --
9889 end loop;
9890 --
9891 end loop;
9892 ---------------------------------------------------------------
9893 -- END OF BEN_ELIG_SP_CLNG_PRG_PRTE_F ----------------------
9894 ---------------------------------------------------------------
9895 ---------------------------------------------------------------
9896 -- START OF BEN_ELIG_PSTN_PRTE_F ----------------------
9897 ---------------------------------------------------------------
9898 --
9899 for l_parent_rec in c_eps_from_parent(l_ELIGY_PRFL_ID) loop
9900 --
9901 l_mirror_src_entity_result_id := l_out_elp_result_id ;
9902 --
9903 l_elig_pstn_prte_id := l_parent_rec.elig_pstn_prte_id ;
9904 --
9905 for l_eps_rec in c_eps(l_parent_rec.elig_pstn_prte_id,l_mirror_src_entity_result_id,'EPS' ) loop
9906 --
9907 l_table_route_id := null ;
9908 open ben_plan_design_program_module.g_table_route('EPS');
9909 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
9910 close ben_plan_design_program_module.g_table_route ;
9911 --
9912 l_information5 := ben_plan_design_program_module.get_position_name(l_eps_rec.position_id)
9913 || ben_plan_design_program_module.get_exclude_message(l_eps_rec.excld_flag);
9914 --'Intersection';
9915 --
9916 if p_effective_date between l_eps_rec.effective_start_date
9917 and l_eps_rec.effective_end_date then
9918 --
9919 l_result_type_cd := 'DISPLAY';
9920 else
9921 l_result_type_cd := 'NO DISPLAY';
9922 end if;
9923 --
9924 l_copy_entity_result_id := null;
9925 l_object_version_number := null;
9926 --
9927 -- pabodla : MAPPING DATA : Store the mapping column information.
9928 --
9929
9930 l_mapping_name := null;
9931 l_mapping_id := null;
9932 --
9933 -- Get the defined balance name to display on mapping page.
9934 --
9935 open c_get_mapping_name8(l_eps_rec.position_id);
9936 fetch c_get_mapping_name8 into l_mapping_name;
9937 close c_get_mapping_name8;
9938 --
9939 l_mapping_id := l_eps_rec.position_id;
9940 --
9941 --
9942 --To set user friendly labels on the mapping page
9943 --
9944 l_mapping_column_name1 := null;
9945 l_mapping_column_name2 :=null;
9946 BEN_PLAN_DESIGN_TXNS_API.get_mapping_column_name(l_table_route_id,
9947 l_mapping_column_name1,
9948 l_mapping_column_name2,
9949 p_copy_entity_txn_id);
9950 --
9951
9952 -- To store effective_start_date of position
9953 -- for Mapping - Bug 2958658
9954 --
9955 l_position_start_date := null;
9956 if l_eps_rec.position_id is not null then
9957 open c_position_start_date(l_eps_rec.position_id);
9958 fetch c_position_start_date into l_position_start_date;
9959 close c_position_start_date;
9960 end if;
9961
9962 ben_copy_entity_results_api.create_copy_entity_results(
9963 p_copy_entity_result_id => l_copy_entity_result_id,
9964 p_copy_entity_txn_id => p_copy_entity_txn_id,
9965 p_result_type_cd => l_result_type_cd,
9966 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
9967 p_parent_entity_result_id => l_mirror_src_entity_result_id,
9968 p_number_of_copies => l_number_of_copies,
9969 p_table_route_id => l_table_route_id,
9970 P_TABLE_ALIAS => 'EPS',
9971 p_information1 => l_eps_rec.elig_pstn_prte_id,
9972 p_information2 => l_eps_rec.EFFECTIVE_START_DATE,
9973 p_information3 => l_eps_rec.EFFECTIVE_END_DATE,
9974 p_information4 => l_eps_rec.business_group_id,
9975 p_information5 => l_information5 , -- 9999 put name for h-grid
9976 p_information263 => l_eps_rec.eligy_prfl_id,
9977
9978 p_information111 => l_eps_rec.eps_attribute1,
9979 p_information120 => l_eps_rec.eps_attribute10,
9980 p_information121 => l_eps_rec.eps_attribute11,
9981 p_information122 => l_eps_rec.eps_attribute12,
9982 p_information123 => l_eps_rec.eps_attribute13,
9983 p_information124 => l_eps_rec.eps_attribute14,
9984 p_information125 => l_eps_rec.eps_attribute15,
9985 p_information126 => l_eps_rec.eps_attribute16,
9986 p_information127 => l_eps_rec.eps_attribute17,
9987 p_information128 => l_eps_rec.eps_attribute18,
9988 p_information129 => l_eps_rec.eps_attribute19,
9989 p_information112 => l_eps_rec.eps_attribute2,
9990 p_information130 => l_eps_rec.eps_attribute20,
9991 p_information131 => l_eps_rec.eps_attribute21,
9992 p_information132 => l_eps_rec.eps_attribute22,
9993 p_information133 => l_eps_rec.eps_attribute23,
9994 p_information134 => l_eps_rec.eps_attribute24,
9995 p_information135 => l_eps_rec.eps_attribute25,
9996 p_information136 => l_eps_rec.eps_attribute26,
9997 p_information137 => l_eps_rec.eps_attribute27,
9998 p_information138 => l_eps_rec.eps_attribute28,
9999 p_information139 => l_eps_rec.eps_attribute29,
10000 p_information113 => l_eps_rec.eps_attribute3,
10001 p_information140 => l_eps_rec.eps_attribute30,
10002 p_information114 => l_eps_rec.eps_attribute4,
10003 p_information115 => l_eps_rec.eps_attribute5,
10004 p_information116 => l_eps_rec.eps_attribute6,
10005 p_information117 => l_eps_rec.eps_attribute7,
10006 p_information118 => l_eps_rec.eps_attribute8,
10007 p_information119 => l_eps_rec.eps_attribute9,
10008 p_information110 => l_eps_rec.eps_attribute_category,
10009
10010 p_information11 => l_eps_rec.excld_flag,
10011 p_information261 => l_eps_rec.ordr_num,
10012 -- Data for MAPPING columns.
10013 p_information173 => l_mapping_name,
10014 p_information174 => l_mapping_id,
10015 p_information181 => l_mapping_column_name1,
10016 p_information182 => l_mapping_column_name2,
10017 -- END other product Mapping columns.
10018 -- p_information257 => l_eps_rec.pstn_cd,
10019 p_information166 => l_position_start_date,
10020 p_information265 => l_eps_rec.object_version_number,
10021 p_information295 => l_eps_rec.criteria_score,
10022 p_information296 => l_eps_rec.criteria_weight,
10023 --
10024 -- END REPLACE PARAMETER LINES
10025 p_object_version_number => l_object_version_number,
10026 p_effective_date => p_effective_date );
10027 --
10028
10029 if l_out_eps_result_id is null then
10030 l_out_eps_result_id := l_copy_entity_result_id;
10031 end if;
10032
10033 if l_result_type_cd = 'DISPLAY' then
10034 l_out_eps_result_id := l_copy_entity_result_id ;
10035 end if;
10036 --
10037 end loop;
10038 --
10039 end loop;
10040 ---------------------------------------------------------------
10041 -- END OF BEN_ELIG_PSTN_PRTE_F ----------------------
10042 ---------------------------------------------------------------
10043 ---------------------------------------------------------------
10044 -- START OF BEN_ELIG_PRBTN_PERD_PRTE_F ----------------------
10045 ---------------------------------------------------------------
10046 --
10047 for l_parent_rec in c_epn_from_parent(l_ELIGY_PRFL_ID) loop
10048 --
10049 l_mirror_src_entity_result_id := l_out_elp_result_id ;
10050 --
10051 l_elig_prbtn_perd_prte_id := l_parent_rec.elig_prbtn_perd_prte_id ;
10052 --
10053 for l_epn_rec in c_epn(l_parent_rec.elig_prbtn_perd_prte_id,l_mirror_src_entity_result_id,'EPN' ) loop
10054 --
10055 l_table_route_id := null ;
10056 open ben_plan_design_program_module.g_table_route('EPN');
10057 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
10058 close ben_plan_design_program_module.g_table_route ;
10059 --
10060 l_information5 := l_epn_rec.probation_period ||' '||
10061 hr_general.decode_lookup('QUALIFYING_UNITS',l_epn_rec.probation_unit)
10062 || ben_plan_design_program_module.get_exclude_message(l_epn_rec.excld_flag);
10063 --'Intersection';
10064 --
10065 if p_effective_date between l_epn_rec.effective_start_date
10066 and l_epn_rec.effective_end_date then
10067 --
10068 l_result_type_cd := 'DISPLAY';
10069 else
10070 l_result_type_cd := 'NO DISPLAY';
10071 end if;
10072 --
10073 l_copy_entity_result_id := null;
10074 l_object_version_number := null;
10075 ben_copy_entity_results_api.create_copy_entity_results(
10076 p_copy_entity_result_id => l_copy_entity_result_id,
10077 p_copy_entity_txn_id => p_copy_entity_txn_id,
10078 p_result_type_cd => l_result_type_cd,
10079 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
10080 p_parent_entity_result_id => l_mirror_src_entity_result_id,
10081 p_number_of_copies => l_number_of_copies,
10082 p_table_route_id => l_table_route_id,
10083 P_TABLE_ALIAS => 'EPN',
10084 p_information1 => l_epn_rec.elig_prbtn_perd_prte_id,
10085 p_information2 => l_epn_rec.EFFECTIVE_START_DATE,
10086 p_information3 => l_epn_rec.EFFECTIVE_END_DATE,
10087 p_information4 => l_epn_rec.business_group_id,
10088 p_information5 => l_information5 , -- 9999 put name for h-grid
10089 p_information263 => l_epn_rec.eligy_prfl_id,
10090 p_information111 => l_epn_rec.epn_attribute1,
10091 p_information120 => l_epn_rec.epn_attribute10,
10092 p_information121 => l_epn_rec.epn_attribute11,
10093 p_information122 => l_epn_rec.epn_attribute12,
10094 p_information123 => l_epn_rec.epn_attribute13,
10095 p_information124 => l_epn_rec.epn_attribute14,
10096 p_information125 => l_epn_rec.epn_attribute15,
10097 p_information126 => l_epn_rec.epn_attribute16,
10098 p_information127 => l_epn_rec.epn_attribute17,
10099 p_information128 => l_epn_rec.epn_attribute18,
10100 p_information129 => l_epn_rec.epn_attribute19,
10101 p_information112 => l_epn_rec.epn_attribute2,
10102 p_information130 => l_epn_rec.epn_attribute20,
10103 p_information131 => l_epn_rec.epn_attribute21,
10104 p_information132 => l_epn_rec.epn_attribute22,
10105 p_information133 => l_epn_rec.epn_attribute23,
10106 p_information134 => l_epn_rec.epn_attribute24,
10107 p_information135 => l_epn_rec.epn_attribute25,
10108 p_information136 => l_epn_rec.epn_attribute26,
10109 p_information137 => l_epn_rec.epn_attribute27,
10110 p_information138 => l_epn_rec.epn_attribute28,
10111 p_information139 => l_epn_rec.epn_attribute29,
10112 p_information113 => l_epn_rec.epn_attribute3,
10113 p_information140 => l_epn_rec.epn_attribute30,
10114 p_information114 => l_epn_rec.epn_attribute4,
10115 p_information115 => l_epn_rec.epn_attribute5,
10116 p_information116 => l_epn_rec.epn_attribute6,
10117 p_information117 => l_epn_rec.epn_attribute7,
10118 p_information118 => l_epn_rec.epn_attribute8,
10119 p_information119 => l_epn_rec.epn_attribute9,
10120 p_information110 => l_epn_rec.epn_attribute_category,
10121
10122 p_information12 => l_epn_rec.excld_flag,
10123 p_information257 => l_epn_rec.ordr_num,
10124 -- p_information258 => l_epn_rec.prbtn_perd_cd,
10125 p_information287 => l_epn_rec.probation_period,
10126 p_information11 => l_epn_rec.probation_unit,
10127 -- p_information259 => l_epn_rec.uom,
10128 p_information265 => l_epn_rec.object_version_number,
10129 p_information295 => l_epn_rec.criteria_score,
10130 p_information296 => l_epn_rec.criteria_weight,
10131
10132
10133 -- END REPLACE PARAMETER LINES
10134
10135 p_object_version_number => l_object_version_number,
10136 p_effective_date => p_effective_date );
10137
10138 --
10139
10140 if l_out_epn_result_id is null then
10141 l_out_epn_result_id := l_copy_entity_result_id;
10142 end if;
10143
10144 if l_result_type_cd = 'DISPLAY' then
10145 l_out_epn_result_id := l_copy_entity_result_id ;
10146 end if;
10147 --
10148 end loop;
10149 --
10150 end loop;
10151 ---------------------------------------------------------------
10152 -- END OF BEN_ELIG_PRBTN_PERD_PRTE_F ----------------------
10153 ---------------------------------------------------------------
10154 ---------------------------------------------------------------
10155 -- START OF BEN_ELIG_MRTL_STS_PRTE_F ----------------------
10156 ---------------------------------------------------------------
10157 --
10158 for l_parent_rec in c_emp_from_parent(l_ELIGY_PRFL_ID) loop
10159 --
10160 l_mirror_src_entity_result_id := l_out_elp_result_id ;
10161 --
10162 l_elig_mrtl_sts_prte_id := l_parent_rec.elig_mrtl_sts_prte_id ;
10163 --
10164 for l_emp_rec in c_emp(l_parent_rec.elig_mrtl_sts_prte_id,l_mirror_src_entity_result_id,'EMP' ) loop
10165 --
10166 l_table_route_id := null ;
10167 open ben_plan_design_program_module.g_table_route('EMP');
10168 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
10169 close ben_plan_design_program_module.g_table_route ;
10170 --
10171 l_information5 := hr_general.decode_lookup('MAR_STATUS',l_emp_rec.marital_status)
10172 || ben_plan_design_program_module.get_exclude_message(l_emp_rec.excld_flag);
10173 --'Intersection';
10174 --
10175 if p_effective_date between l_emp_rec.effective_start_date
10176 and l_emp_rec.effective_end_date then
10177 --
10178 l_result_type_cd := 'DISPLAY';
10179 else
10180 l_result_type_cd := 'NO DISPLAY';
10181 end if;
10182 --
10183 l_copy_entity_result_id := null;
10184 l_object_version_number := null;
10185 ben_copy_entity_results_api.create_copy_entity_results(
10186 p_copy_entity_result_id => l_copy_entity_result_id,
10187 p_copy_entity_txn_id => p_copy_entity_txn_id,
10188 p_result_type_cd => l_result_type_cd,
10189 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
10190 p_parent_entity_result_id => l_mirror_src_entity_result_id,
10191 p_number_of_copies => l_number_of_copies,
10192 p_table_route_id => l_table_route_id,
10193 P_TABLE_ALIAS => 'EMP',
10194 p_information1 => l_emp_rec.elig_mrtl_sts_prte_id,
10195 p_information2 => l_emp_rec.EFFECTIVE_START_DATE,
10196 p_information3 => l_emp_rec.EFFECTIVE_END_DATE,
10197 p_information4 => l_emp_rec.business_group_id,
10198 p_information5 => l_information5 , -- 9999 put name for h-grid
10199 p_information263 => l_emp_rec.eligy_prfl_id,
10200
10201 p_information111 => l_emp_rec.emp_attribute1,
10202 p_information120 => l_emp_rec.emp_attribute10,
10203 p_information121 => l_emp_rec.emp_attribute11,
10204 p_information122 => l_emp_rec.emp_attribute12,
10205 p_information123 => l_emp_rec.emp_attribute13,
10206 p_information124 => l_emp_rec.emp_attribute14,
10207 p_information125 => l_emp_rec.emp_attribute15,
10208 p_information126 => l_emp_rec.emp_attribute16,
10209 p_information127 => l_emp_rec.emp_attribute17,
10210 p_information128 => l_emp_rec.emp_attribute18,
10211 p_information129 => l_emp_rec.emp_attribute19,
10212 p_information112 => l_emp_rec.emp_attribute2,
10213 p_information130 => l_emp_rec.emp_attribute20,
10214 p_information131 => l_emp_rec.emp_attribute21,
10215 p_information132 => l_emp_rec.emp_attribute22,
10216 p_information133 => l_emp_rec.emp_attribute23,
10217 p_information134 => l_emp_rec.emp_attribute24,
10218 p_information135 => l_emp_rec.emp_attribute25,
10219 p_information136 => l_emp_rec.emp_attribute26,
10220 p_information137 => l_emp_rec.emp_attribute27,
10221 p_information138 => l_emp_rec.emp_attribute28,
10222 p_information139 => l_emp_rec.emp_attribute29,
10223 p_information113 => l_emp_rec.emp_attribute3,
10224 p_information140 => l_emp_rec.emp_attribute30,
10225 p_information114 => l_emp_rec.emp_attribute4,
10226 p_information115 => l_emp_rec.emp_attribute5,
10227 p_information116 => l_emp_rec.emp_attribute6,
10228 p_information117 => l_emp_rec.emp_attribute7,
10229 p_information118 => l_emp_rec.emp_attribute8,
10230 p_information119 => l_emp_rec.emp_attribute9,
10231 p_information110 => l_emp_rec.emp_attribute_category,
10232
10233 p_information12 => l_emp_rec.excld_flag,
10234 p_information11 => l_emp_rec.marital_status,
10235 -- p_information260 => l_emp_rec.mrtl_sts_cd,
10236 p_information265 => l_emp_rec.object_version_number,
10237 p_information295 => l_emp_rec.criteria_score,
10238 p_information296 => l_emp_rec.criteria_weight,
10239 --
10240 -- END REPLACE PARAMETER LINES
10241
10242 p_object_version_number => l_object_version_number,
10243 p_effective_date => p_effective_date );
10244 --
10245 --
10246
10247 if l_out_emp_result_id is null then
10248 l_out_emp_result_id := l_copy_entity_result_id;
10249 end if;
10250
10251 if l_result_type_cd = 'DISPLAY' then
10252 l_out_emp_result_id := l_copy_entity_result_id ;
10253 end if;
10254 --
10255 end loop;
10256 --
10257 end loop;
10258 ---------------------------------------------------------------
10259 -- END OF BEN_ELIG_MRTL_STS_PRTE_F ----------------------
10260 ---------------------------------------------------------------
10261 ---------------------------------------------------------------
10262 -- START OF BEN_ELIG_GNDR_PRTE_F ----------------------
10263 ---------------------------------------------------------------
10264 --
10265 for l_parent_rec in c_egn_from_parent(l_ELIGY_PRFL_ID) loop
10266 --
10267 l_mirror_src_entity_result_id := l_out_elp_result_id ;
10268 --
10269 l_elig_gndr_prte_id := l_parent_rec.elig_gndr_prte_id ;
10270 --
10271 for l_egn_rec in c_egn(l_parent_rec.elig_gndr_prte_id,l_mirror_src_entity_result_id,'EGN' ) loop
10272 --
10273 l_table_route_id := null ;
10274 open ben_plan_design_program_module.g_table_route('EGN');
10275 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
10276 close ben_plan_design_program_module.g_table_route ;
10277 --
10278 l_information5 := hr_general.decode_lookup('SEX',l_egn_rec.sex)
10279 || ben_plan_design_program_module.get_exclude_message(l_egn_rec.excld_flag);
10280 --'Intersection';
10281 --
10282 if p_effective_date between l_egn_rec.effective_start_date
10283 and l_egn_rec.effective_end_date then
10284 --
10285 l_result_type_cd := 'DISPLAY';
10286 else
10287 l_result_type_cd := 'NO DISPLAY';
10288 end if;
10289 --
10290 l_copy_entity_result_id := null;
10291 l_object_version_number := null;
10292 ben_copy_entity_results_api.create_copy_entity_results(
10293 p_copy_entity_result_id => l_copy_entity_result_id,
10294 p_copy_entity_txn_id => p_copy_entity_txn_id,
10295 p_result_type_cd => l_result_type_cd,
10296 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
10297 p_parent_entity_result_id => l_mirror_src_entity_result_id,
10298 p_number_of_copies => l_number_of_copies,
10299 p_table_route_id => l_table_route_id,
10300 P_TABLE_ALIAS => 'EGN',
10301 p_information1 => l_egn_rec.elig_gndr_prte_id,
10302 p_information2 => l_egn_rec.EFFECTIVE_START_DATE,
10303 p_information3 => l_egn_rec.EFFECTIVE_END_DATE,
10304 p_information4 => l_egn_rec.business_group_id,
10305 p_information5 => l_information5 , -- 9999 put name for h-grid
10306 p_information111 => l_egn_rec.egn_attribute1,
10307 p_information120 => l_egn_rec.egn_attribute10,
10308 p_information121 => l_egn_rec.egn_attribute11,
10309 p_information122 => l_egn_rec.egn_attribute12,
10310 p_information123 => l_egn_rec.egn_attribute13,
10311 p_information124 => l_egn_rec.egn_attribute14,
10312 p_information125 => l_egn_rec.egn_attribute15,
10313 p_information126 => l_egn_rec.egn_attribute16,
10314 p_information127 => l_egn_rec.egn_attribute17,
10315 p_information128 => l_egn_rec.egn_attribute18,
10316 p_information129 => l_egn_rec.egn_attribute19,
10317 p_information112 => l_egn_rec.egn_attribute2,
10318 p_information130 => l_egn_rec.egn_attribute20,
10319 p_information131 => l_egn_rec.egn_attribute21,
10320 p_information132 => l_egn_rec.egn_attribute22,
10321 p_information133 => l_egn_rec.egn_attribute23,
10322 p_information134 => l_egn_rec.egn_attribute24,
10323 p_information135 => l_egn_rec.egn_attribute25,
10324 p_information136 => l_egn_rec.egn_attribute26,
10325 p_information137 => l_egn_rec.egn_attribute27,
10326 p_information138 => l_egn_rec.egn_attribute28,
10327 p_information139 => l_egn_rec.egn_attribute29,
10328 p_information113 => l_egn_rec.egn_attribute3,
10329 p_information140 => l_egn_rec.egn_attribute30,
10330 p_information114 => l_egn_rec.egn_attribute4,
10331 p_information115 => l_egn_rec.egn_attribute5,
10332 p_information116 => l_egn_rec.egn_attribute6,
10333 p_information117 => l_egn_rec.egn_attribute7,
10334 p_information118 => l_egn_rec.egn_attribute8,
10335 p_information119 => l_egn_rec.egn_attribute9,
10336 p_information110 => l_egn_rec.egn_attribute_category,
10337 p_information263 => l_egn_rec.eligy_prfl_id,
10338 p_information12 => l_egn_rec.excld_flag,
10339 -- p_information258 => l_egn_rec.gndr_cd,
10340 p_information257 => l_egn_rec.ordr_num,
10341 p_information11 => l_egn_rec.sex,
10342 p_information265 => l_egn_rec.object_version_number,
10343 p_information295 => l_egn_rec.criteria_score,
10344 p_information296 => l_egn_rec.criteria_weight,
10345 --
10346
10347 -- END REPLACE PARAMETER LINES
10348
10349 p_object_version_number => l_object_version_number,
10350 p_effective_date => p_effective_date );
10351
10352 --
10353
10354 if l_out_egn_result_id is null then
10355 l_out_egn_result_id := l_copy_entity_result_id;
10356 end if;
10357
10358 if l_result_type_cd = 'DISPLAY' then
10359 l_out_egn_result_id := l_copy_entity_result_id ;
10360 end if;
10361 --
10362 end loop;
10363 --
10364 end loop;
10365 ---------------------------------------------------------------
10366 -- END OF BEN_ELIG_GNDR_PRTE_F ----------------------
10367 ---------------------------------------------------------------
10368 ---------------------------------------------------------------
10369 -- START OF BEN_ELIG_DSBLTY_RSN_PRTE_F ----------------------
10370 ---------------------------------------------------------------
10371 --
10372 for l_parent_rec in c_edr_from_parent(l_ELIGY_PRFL_ID) loop
10373 --
10374 l_mirror_src_entity_result_id := l_out_elp_result_id ;
10375 --
10376 l_elig_dsblty_rsn_prte_id := l_parent_rec.elig_dsblty_rsn_prte_id ;
10377 --
10378 for l_edr_rec in c_edr(l_parent_rec.elig_dsblty_rsn_prte_id,l_mirror_src_entity_result_id,'EDR' ) loop
10379 --
10380 l_table_route_id := null ;
10381 open ben_plan_design_program_module.g_table_route('EDR');
10382 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
10383 close ben_plan_design_program_module.g_table_route ;
10384 --
10385 l_information5 := hr_general.decode_lookup('DISABILITY_REASON',l_edr_rec.reason)
10386 || ben_plan_design_program_module.get_exclude_message(l_edr_rec.excld_flag);
10387 --'Intersection';
10388 --
10389 if p_effective_date between l_edr_rec.effective_start_date
10390 and l_edr_rec.effective_end_date then
10391 --
10392 l_result_type_cd := 'DISPLAY';
10393 else
10394 l_result_type_cd := 'NO DISPLAY';
10395 end if;
10396 --
10397 l_copy_entity_result_id := null;
10398 l_object_version_number := null;
10399 ben_copy_entity_results_api.create_copy_entity_results(
10400 p_copy_entity_result_id => l_copy_entity_result_id,
10401 p_copy_entity_txn_id => p_copy_entity_txn_id,
10402 p_result_type_cd => l_result_type_cd,
10403 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
10404 p_parent_entity_result_id => l_mirror_src_entity_result_id,
10405 p_number_of_copies => l_number_of_copies,
10406 p_table_route_id => l_table_route_id,
10407 P_TABLE_ALIAS => 'EDR',
10408 p_information1 => l_edr_rec.elig_dsblty_rsn_prte_id,
10409 p_information2 => l_edr_rec.EFFECTIVE_START_DATE,
10410 p_information3 => l_edr_rec.EFFECTIVE_END_DATE,
10411 p_information4 => l_edr_rec.business_group_id,
10412 p_information5 => l_information5 , -- 9999 put name for h-grid
10413 -- p_information258 => l_edr_rec.dsblty_rsn_cd,
10414 p_information111 => l_edr_rec.edr_attribute1,
10415 p_information120 => l_edr_rec.edr_attribute10,
10416 p_information121 => l_edr_rec.edr_attribute11,
10417 p_information122 => l_edr_rec.edr_attribute12,
10418 p_information123 => l_edr_rec.edr_attribute13,
10419 p_information124 => l_edr_rec.edr_attribute14,
10420 p_information125 => l_edr_rec.edr_attribute15,
10421 p_information126 => l_edr_rec.edr_attribute16,
10422 p_information127 => l_edr_rec.edr_attribute17,
10423 p_information128 => l_edr_rec.edr_attribute18,
10424 p_information129 => l_edr_rec.edr_attribute19,
10425 p_information112 => l_edr_rec.edr_attribute2,
10426 p_information130 => l_edr_rec.edr_attribute20,
10427 p_information131 => l_edr_rec.edr_attribute21,
10428 p_information132 => l_edr_rec.edr_attribute22,
10429 p_information133 => l_edr_rec.edr_attribute23,
10430 p_information134 => l_edr_rec.edr_attribute24,
10431 p_information135 => l_edr_rec.edr_attribute25,
10432 p_information136 => l_edr_rec.edr_attribute26,
10433 p_information137 => l_edr_rec.edr_attribute27,
10434 p_information138 => l_edr_rec.edr_attribute28,
10435 p_information139 => l_edr_rec.edr_attribute29,
10436 p_information113 => l_edr_rec.edr_attribute3,
10437 p_information140 => l_edr_rec.edr_attribute30,
10438 p_information114 => l_edr_rec.edr_attribute4,
10439 p_information115 => l_edr_rec.edr_attribute5,
10440 p_information116 => l_edr_rec.edr_attribute6,
10441 p_information117 => l_edr_rec.edr_attribute7,
10442 p_information118 => l_edr_rec.edr_attribute8,
10443 p_information119 => l_edr_rec.edr_attribute9,
10444 p_information110 => l_edr_rec.edr_attribute_category,
10445 p_information263 => l_edr_rec.eligy_prfl_id,
10446 p_information12 => l_edr_rec.excld_flag,
10447 p_information257 => l_edr_rec.ordr_num,
10448 p_information11 => l_edr_rec.reason,
10449 p_information265 => l_edr_rec.object_version_number,
10450 p_information295 => l_edr_rec.criteria_score,
10451 p_information296 => l_edr_rec.criteria_weight,
10452
10453 --
10454
10455 -- END REPLACE PARAMETER LINES
10456
10457 p_object_version_number => l_object_version_number,
10458 p_effective_date => p_effective_date );
10459 --
10460
10461 if l_out_edr_result_id is null then
10462 l_out_edr_result_id := l_copy_entity_result_id;
10463 end if;
10464
10465 if l_result_type_cd = 'DISPLAY' then
10466 l_out_edr_result_id := l_copy_entity_result_id ;
10467 end if;
10468 --
10469 end loop;
10470 --
10471 end loop;
10472 ---------------------------------------------------------------
10473 -- END OF BEN_ELIG_DSBLTY_RSN_PRTE_F ----------------------
10474 ---------------------------------------------------------------
10475 ---------------------------------------------------------------
10476 -- START OF BEN_ELIG_DSBLTY_DGR_PRTE_F ----------------------
10477 ---------------------------------------------------------------
10478 --
10479 for l_parent_rec in c_edd_from_parent(l_ELIGY_PRFL_ID) loop
10480 --
10481 l_mirror_src_entity_result_id := l_out_elp_result_id ;
10482 --
10483 l_elig_dsblty_dgr_prte_id := l_parent_rec.elig_dsblty_dgr_prte_id ;
10484 --
10485 for l_edd_rec in c_edd(l_parent_rec.elig_dsblty_dgr_prte_id,l_mirror_src_entity_result_id,'EDD' ) loop
10486 --
10487 l_table_route_id := null ;
10488 open ben_plan_design_program_module.g_table_route('EDD');
10489 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
10490 close ben_plan_design_program_module.g_table_route ;
10491 --
10492 l_information5 := l_edd_rec.degree
10493 ||ben_plan_design_program_module.get_exclude_message(l_edd_rec.excld_flag);
10494 --'Intersection';
10495 --
10496 if p_effective_date between l_edd_rec.effective_start_date
10497 and l_edd_rec.effective_end_date then
10498 --
10499 l_result_type_cd := 'DISPLAY';
10500 else
10501 l_result_type_cd := 'NO DISPLAY';
10502 end if;
10503 --
10504 l_copy_entity_result_id := null;
10505 l_object_version_number := null;
10506 ben_copy_entity_results_api.create_copy_entity_results(
10507 p_copy_entity_result_id => l_copy_entity_result_id,
10508 p_copy_entity_txn_id => p_copy_entity_txn_id,
10509 p_result_type_cd => l_result_type_cd,
10510 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
10511 p_parent_entity_result_id => l_mirror_src_entity_result_id,
10512 p_number_of_copies => l_number_of_copies,
10513 p_table_route_id => l_table_route_id,
10514 P_TABLE_ALIAS => 'EDD',
10515 p_information1 => l_edd_rec.elig_dsblty_dgr_prte_id,
10516 p_information2 => l_edd_rec.EFFECTIVE_START_DATE,
10517 p_information3 => l_edd_rec.EFFECTIVE_END_DATE,
10518 p_information4 => l_edd_rec.business_group_id,
10519 p_information5 => l_information5 , -- 9999 put name for h-grid
10520 p_information287 => l_edd_rec.degree,
10521 -- p_information289 => l_edd_rec.dsblty_dgr,
10522 p_information111 => l_edd_rec.edd_attribute1,
10523 p_information120 => l_edd_rec.edd_attribute10,
10524 p_information121 => l_edd_rec.edd_attribute11,
10525 p_information122 => l_edd_rec.edd_attribute12,
10526 p_information123 => l_edd_rec.edd_attribute13,
10527 p_information124 => l_edd_rec.edd_attribute14,
10528 p_information125 => l_edd_rec.edd_attribute15,
10529 p_information126 => l_edd_rec.edd_attribute16,
10530 p_information127 => l_edd_rec.edd_attribute17,
10531 p_information128 => l_edd_rec.edd_attribute18,
10532 p_information129 => l_edd_rec.edd_attribute19,
10533 p_information112 => l_edd_rec.edd_attribute2,
10534 p_information130 => l_edd_rec.edd_attribute20,
10535 p_information131 => l_edd_rec.edd_attribute21,
10536 p_information132 => l_edd_rec.edd_attribute22,
10537 p_information133 => l_edd_rec.edd_attribute23,
10538 p_information134 => l_edd_rec.edd_attribute24,
10539 p_information135 => l_edd_rec.edd_attribute25,
10540 p_information136 => l_edd_rec.edd_attribute26,
10541 p_information137 => l_edd_rec.edd_attribute27,
10542 p_information138 => l_edd_rec.edd_attribute28,
10543 p_information139 => l_edd_rec.edd_attribute29,
10544 p_information113 => l_edd_rec.edd_attribute3,
10545 p_information140 => l_edd_rec.edd_attribute30,
10546 p_information114 => l_edd_rec.edd_attribute4,
10547 p_information115 => l_edd_rec.edd_attribute5,
10548 p_information116 => l_edd_rec.edd_attribute6,
10549 p_information117 => l_edd_rec.edd_attribute7,
10550 p_information118 => l_edd_rec.edd_attribute8,
10551 p_information119 => l_edd_rec.edd_attribute9,
10552 p_information110 => l_edd_rec.edd_attribute_category,
10553 p_information263 => l_edd_rec.eligy_prfl_id,
10554 p_information11 => l_edd_rec.excld_flag,
10555 p_information288 => l_edd_rec.ordr_num,
10556 p_information265 => l_edd_rec.object_version_number,
10557 p_information295 => l_edd_rec.criteria_score,
10558 p_information296 => l_edd_rec.criteria_weight,
10559 --
10560
10561 -- END REPLACE PARAMETER LINES
10562
10563 p_object_version_number => l_object_version_number,
10564 p_effective_date => p_effective_date );
10565 --
10566
10567 if l_out_edd_result_id is null then
10568 l_out_edd_result_id := l_copy_entity_result_id;
10569 end if;
10570
10571 if l_result_type_cd = 'DISPLAY' then
10572 l_out_edd_result_id := l_copy_entity_result_id ;
10573 end if;
10574 --
10575 end loop;
10576 --
10577 end loop;
10578 ---------------------------------------------------------------
10579 -- END OF BEN_ELIG_DSBLTY_DGR_PRTE_F ----------------------
10580 ---------------------------------------------------------------
10581 ---------------------------------------------------------------
10582 -- START OF BEN_ELIG_QUAL_TITL_PRTE_F ----------------------
10583 ---------------------------------------------------------------
10584 --
10585 for l_parent_rec in c_eqt_from_parent(l_ELIGY_PRFL_ID) loop
10586 --
10587 l_mirror_src_entity_result_id := l_out_elp_result_id ;
10588 --
10589 l_elig_qual_titl_prte_id := l_parent_rec.elig_qual_titl_prte_id ;
10590 --
10591 for l_eqt_rec in c_eqt(l_parent_rec.elig_qual_titl_prte_id,l_mirror_src_entity_result_id,'EQT' ) loop
10592 --
10593 l_table_route_id := null ;
10594 open ben_plan_design_program_module.g_table_route('EQT');
10595 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
10596 close ben_plan_design_program_module.g_table_route ;
10597 --
10598 l_information5 := ben_plan_design_program_module.get_qual_type_name(l_eqt_rec.qualification_type_id)
10599 || ben_plan_design_program_module.get_exclude_message(l_eqt_rec.excld_flag);
10600 --'Intersection';
10601 --
10602 if p_effective_date between l_eqt_rec.effective_start_date
10603 and l_eqt_rec.effective_end_date then
10604 --
10605 l_result_type_cd := 'DISPLAY';
10606 else
10607 l_result_type_cd := 'NO DISPLAY';
10608 end if;
10609 --
10610 l_copy_entity_result_id := null;
10611 l_object_version_number := null;
10612 --
10613 -- pabodla : MAPPING DATA : Store the mapping column information.
10614 --
10615
10616 l_mapping_name := null;
10617 l_mapping_id := null;
10618 --
10619 -- Get the defined balance name to display on mapping page.
10620 --
10621 open c_get_mapping_name11(l_eqt_rec.qualification_type_id);
10622 fetch c_get_mapping_name11 into l_mapping_name;
10623 close c_get_mapping_name11;
10624 --
10625 l_mapping_id := l_eqt_rec.qualification_type_id;
10626 --
10627 --To set user friendly labels on the mapping page
10628 --
10629 l_mapping_column_name1 := null;
10630 l_mapping_column_name2 :=null;
10631 BEN_PLAN_DESIGN_TXNS_API.get_mapping_column_name(l_table_route_id,
10632 l_mapping_column_name1,
10633 l_mapping_column_name2,
10634 p_copy_entity_txn_id);
10635 --
10636 ben_copy_entity_results_api.create_copy_entity_results(
10637 p_copy_entity_result_id => l_copy_entity_result_id,
10638 p_copy_entity_txn_id => p_copy_entity_txn_id,
10639 p_result_type_cd => l_result_type_cd,
10640 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
10641 p_parent_entity_result_id => l_mirror_src_entity_result_id,
10642 p_number_of_copies => l_number_of_copies,
10643 p_table_route_id => l_table_route_id,
10644 P_TABLE_ALIAS => 'EQT',
10645 p_information1 => l_eqt_rec.elig_qual_titl_prte_id,
10646 p_information2 => l_eqt_rec.EFFECTIVE_START_DATE,
10647 p_information3 => l_eqt_rec.EFFECTIVE_END_DATE,
10648 p_information4 => l_eqt_rec.business_group_id,
10649 p_information5 => l_information5 , -- 9999 put name for h-grid
10650 p_information263 => l_eqt_rec.eligy_prfl_id,
10651 p_information111 => l_eqt_rec.eqt_attribute1,
10652 p_information120 => l_eqt_rec.eqt_attribute10,
10653 p_information121 => l_eqt_rec.eqt_attribute11,
10654 p_information122 => l_eqt_rec.eqt_attribute12,
10655 p_information123 => l_eqt_rec.eqt_attribute13,
10656 p_information124 => l_eqt_rec.eqt_attribute14,
10657 p_information125 => l_eqt_rec.eqt_attribute15,
10658 p_information126 => l_eqt_rec.eqt_attribute16,
10659 p_information127 => l_eqt_rec.eqt_attribute17,
10660 p_information128 => l_eqt_rec.eqt_attribute18,
10661 p_information129 => l_eqt_rec.eqt_attribute19,
10662 p_information112 => l_eqt_rec.eqt_attribute2,
10663 p_information130 => l_eqt_rec.eqt_attribute20,
10664 p_information131 => l_eqt_rec.eqt_attribute21,
10665 p_information132 => l_eqt_rec.eqt_attribute22,
10666 p_information133 => l_eqt_rec.eqt_attribute23,
10667 p_information134 => l_eqt_rec.eqt_attribute24,
10668 p_information135 => l_eqt_rec.eqt_attribute25,
10669 p_information136 => l_eqt_rec.eqt_attribute26,
10670 p_information137 => l_eqt_rec.eqt_attribute27,
10671 p_information138 => l_eqt_rec.eqt_attribute28,
10672 p_information139 => l_eqt_rec.eqt_attribute29,
10673 p_information113 => l_eqt_rec.eqt_attribute3,
10674 p_information140 => l_eqt_rec.eqt_attribute30,
10675 p_information114 => l_eqt_rec.eqt_attribute4,
10676 p_information115 => l_eqt_rec.eqt_attribute5,
10677 p_information116 => l_eqt_rec.eqt_attribute6,
10678 p_information117 => l_eqt_rec.eqt_attribute7,
10679 p_information118 => l_eqt_rec.eqt_attribute8,
10680 p_information119 => l_eqt_rec.eqt_attribute9,
10681 p_information110 => l_eqt_rec.eqt_attribute_category,
10682 p_information11 => l_eqt_rec.excld_flag,
10683 p_information260 => l_eqt_rec.ordr_num,
10684 -- Data for MAPPING columns.
10685 p_information173 => l_mapping_name,
10686 p_information174 => l_mapping_id,
10687 p_information181 => l_mapping_column_name1,
10688 p_information182 => l_mapping_column_name2,
10689 -- END other product Mapping columns.
10690 p_information141 => l_eqt_rec.title,
10691 p_information166 => NULL, -- No ESD for Qualification Type
10692 p_information265 => l_eqt_rec.object_version_number,
10693 p_information295 => l_eqt_rec.criteria_score,
10694 p_information296 => l_eqt_rec.criteria_weight,
10695 --
10696
10697 -- END REPLACE PARAMETER LINES
10698
10699 p_object_version_number => l_object_version_number,
10700 p_effective_date => p_effective_date );
10701 --
10702
10703 if l_out_eqt_result_id is null then
10704 l_out_eqt_result_id := l_copy_entity_result_id;
10705 end if;
10706
10707 if l_result_type_cd = 'DISPLAY' then
10708 l_out_eqt_result_id := l_copy_entity_result_id ;
10709 end if;
10710 --
10711 end loop;
10712 --
10713 end loop;
10714 ---------------------------------------------------------------
10715 -- END OF BEN_ELIG_QUAL_TITL_PRTE_F ----------------------
10716 ---------------------------------------------------------------
10717 ---------------------------------------------------------------
10718 -- START OF BEN_ELIG_SUPPL_ROLE_PRTE_F ----------------------
10719 ---------------------------------------------------------------
10720 --
10721 for l_parent_rec in c_est_from_parent(l_ELIGY_PRFL_ID) loop
10722 --
10723 l_mirror_src_entity_result_id := l_out_elp_result_id ;
10724 --
10725 l_elig_suppl_role_prte_id := l_parent_rec.elig_suppl_role_prte_id ;
10726 --
10727 for l_est_rec in c_est(l_parent_rec.elig_suppl_role_prte_id,l_mirror_src_entity_result_id,'EST' ) loop
10728 --
10729 l_table_route_id := null ;
10730 open ben_plan_design_program_module.g_table_route('EST');
10731 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
10732 close ben_plan_design_program_module.g_table_route ;
10733 --
10734 l_information5 := ben_plan_design_program_module.get_job_name(l_est_rec.job_id)
10735 || ben_plan_design_program_module.get_exclude_message(l_est_rec.excld_flag);
10736 --'Intersection';
10737 --
10738 if p_effective_date between l_est_rec.effective_start_date
10739 and l_est_rec.effective_end_date then
10740 --
10741 l_result_type_cd := 'DISPLAY';
10742 else
10743 l_result_type_cd := 'NO DISPLAY';
10744 end if;
10745 --
10746 l_copy_entity_result_id := null;
10747 l_object_version_number := null;
10748 --
10749 -- pabodla : MAPPING DATA : Store the mapping column information.
10750 --
10751 l_mapping_name := null;
10752 l_mapping_id := null;
10753 l_mapping_name1:= null;
10754 l_mapping_id1 := null;
10755 --
10756 -- Get the defined balance name to display on mapping page.
10757 --
10758 open c_get_mapping_name13(l_est_rec.job_group_id);
10759 fetch c_get_mapping_name13 into l_mapping_name;
10760 close c_get_mapping_name13;
10761 --
10762 l_mapping_id := l_est_rec.job_group_id;
10763
10764 open c_get_mapping_name14(l_est_rec.job_id, l_est_rec.job_group_id);
10765 fetch c_get_mapping_name14 into l_mapping_name1;
10766 close c_get_mapping_name14;
10767 --
10768 l_mapping_id1 := l_est_rec.job_id;
10769 --
10770 --To set user friendly labels on the mapping page
10771 --
10772 l_mapping_column_name1 := null;
10773 l_mapping_column_name2 :=null;
10774 BEN_PLAN_DESIGN_TXNS_API.get_mapping_column_name(l_table_route_id,
10775 l_mapping_column_name1,
10776 l_mapping_column_name2,
10777 p_copy_entity_txn_id);
10778 --
10779
10780 -- To store effective_start_date of job
10781 -- for Mapping - Bug 2958658
10782 --
10783 l_job_start_date := null;
10784 if l_est_rec.job_id is not null then
10785 open c_job_start_date(l_est_rec.job_id);
10786 fetch c_job_start_date into l_job_start_date;
10787 close c_job_start_date;
10788 end if;
10789
10790 ben_copy_entity_results_api.create_copy_entity_results(
10791 p_copy_entity_result_id => l_copy_entity_result_id,
10792 p_copy_entity_txn_id => p_copy_entity_txn_id,
10793 p_result_type_cd => l_result_type_cd,
10794 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
10795 p_parent_entity_result_id => l_mirror_src_entity_result_id,
10796 p_number_of_copies => l_number_of_copies,
10797 p_table_route_id => l_table_route_id,
10798 P_TABLE_ALIAS => 'EST',
10799 p_information1 => l_est_rec.elig_suppl_role_prte_id,
10800 p_information2 => l_est_rec.EFFECTIVE_START_DATE,
10801 p_information3 => l_est_rec.EFFECTIVE_END_DATE,
10802 p_information4 => l_est_rec.business_group_id,
10803 p_information5 => l_information5 , -- 9999 put name for h-grid
10804 p_information263 => l_est_rec.eligy_prfl_id,
10805 p_information111 => l_est_rec.est_attribute1,
10806 p_information120 => l_est_rec.est_attribute10,
10807 p_information121 => l_est_rec.est_attribute11,
10808 p_information122 => l_est_rec.est_attribute12,
10809 p_information123 => l_est_rec.est_attribute13,
10810 p_information124 => l_est_rec.est_attribute14,
10811 p_information125 => l_est_rec.est_attribute15,
10812 p_information126 => l_est_rec.est_attribute16,
10813 p_information127 => l_est_rec.est_attribute17,
10814 p_information128 => l_est_rec.est_attribute18,
10815 p_information129 => l_est_rec.est_attribute19,
10816 p_information112 => l_est_rec.est_attribute2,
10817 p_information130 => l_est_rec.est_attribute20,
10818 p_information131 => l_est_rec.est_attribute21,
10819 p_information132 => l_est_rec.est_attribute22,
10820 p_information133 => l_est_rec.est_attribute23,
10821 p_information134 => l_est_rec.est_attribute24,
10822 p_information135 => l_est_rec.est_attribute25,
10823 p_information136 => l_est_rec.est_attribute26,
10824 p_information137 => l_est_rec.est_attribute27,
10825 p_information138 => l_est_rec.est_attribute28,
10826 p_information139 => l_est_rec.est_attribute29,
10827 p_information113 => l_est_rec.est_attribute3,
10828 p_information140 => l_est_rec.est_attribute30,
10829 p_information114 => l_est_rec.est_attribute4,
10830 p_information115 => l_est_rec.est_attribute5,
10831 p_information116 => l_est_rec.est_attribute6,
10832 p_information117 => l_est_rec.est_attribute7,
10833 p_information118 => l_est_rec.est_attribute8,
10834 p_information119 => l_est_rec.est_attribute9,
10835 p_information110 => l_est_rec.est_attribute_category,
10836 p_information11 => l_est_rec.excld_flag,
10837 -- Data for MAPPING columns.
10838 p_information173 => l_mapping_name,
10839 p_information174 => l_mapping_id,
10840 p_information181 => l_mapping_column_name1,
10841 p_information182 => l_mapping_column_name2,
10842 -- END other product Mapping columns.
10843 p_information226 => l_est_rec.job_id,
10844 -- Data for MAPPING columns.
10845 p_information177 => l_mapping_name1,
10846 p_information178 => l_mapping_id1,
10847 -- END other product Mapping columns.
10848 p_information257 => l_est_rec.ordr_num,
10849 p_information166 => NULL, --No ESD for Job Group
10850 p_information306 => l_job_start_date,
10851 p_information265 => l_est_rec.object_version_number,
10852 p_information295 => l_est_rec.criteria_score,
10853 p_information296 => l_est_rec.criteria_weight,
10854 --
10855
10856 -- END REPLACE PARAMETER LINES
10857
10858 p_object_version_number => l_object_version_number,
10859 p_effective_date => p_effective_date );
10860 --
10861
10862 if l_out_est_result_id is null then
10863 l_out_est_result_id := l_copy_entity_result_id;
10864 end if;
10865
10866 if l_result_type_cd = 'DISPLAY' then
10867 l_out_est_result_id := l_copy_entity_result_id ;
10868 end if;
10869 --
10870 end loop;
10871 --
10872 end loop;
10873 ---------------------------------------------------------------
10874 -- END OF BEN_ELIG_SUPPL_ROLE_PRTE_F ----------------------
10875 ---------------------------------------------------------------
10876 --------------------------------------------------------------
10877 -- START OF BEN_ELIG_DSBLTY_CTG_PRTE_F ----------------------
10878 ---------------------------------------------------------------
10879 --
10880 for l_parent_rec in c_ect_from_parent(l_ELIGY_PRFL_ID) loop
10881 --
10882 l_mirror_src_entity_result_id := l_out_elp_result_id ;
10883 --
10884 l_elig_dsblty_ctg_prte_id := l_parent_rec.elig_dsblty_ctg_prte_id ;
10885 --
10886 for l_ect_rec in c_ect(l_parent_rec.elig_dsblty_ctg_prte_id,l_mirror_src_entity_result_id,'ECT' ) loop
10887 --
10888 l_table_route_id := null ;
10889 open ben_plan_design_program_module.g_table_route('ECT');
10890 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
10891 close ben_plan_design_program_module.g_table_route ;
10892 --
10893 l_information5 := hr_general.decode_lookup('DISABILITY_CATEGORY',l_ect_rec.category)
10894 || ben_plan_design_program_module.get_exclude_message(l_ect_rec.excld_flag);
10895 --'Intersection';
10896 --
10897 if p_effective_date between l_ect_rec.effective_start_date
10898 and l_ect_rec.effective_end_date then
10899 --
10900 l_result_type_cd := 'DISPLAY';
10901 else
10902 l_result_type_cd := 'NO DISPLAY';
10903 end if;
10904 --
10905 l_copy_entity_result_id := null;
10906 l_object_version_number := null;
10907 ben_copy_entity_results_api.create_copy_entity_results(
10908 p_copy_entity_result_id => l_copy_entity_result_id,
10909 p_copy_entity_txn_id => p_copy_entity_txn_id,
10910 p_result_type_cd => l_result_type_cd,
10911 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
10912 p_parent_entity_result_id => l_mirror_src_entity_result_id,
10913 p_number_of_copies => l_number_of_copies,
10914 p_table_route_id => l_table_route_id,
10915 P_TABLE_ALIAS => 'ECT',
10916 p_information1 => l_ect_rec.elig_dsblty_ctg_prte_id,
10917 p_information2 => l_ect_rec.EFFECTIVE_START_DATE,
10918 p_information3 => l_ect_rec.EFFECTIVE_END_DATE,
10919 p_information4 => l_ect_rec.business_group_id,
10920 p_information5 => l_information5 , -- 9999 put name for h-grid
10921 p_information12 => l_ect_rec.category,
10922 p_information111 => l_ect_rec.ect_attribute1,
10923 p_information120 => l_ect_rec.ect_attribute10,
10924 p_information121 => l_ect_rec.ect_attribute11,
10925 p_information122 => l_ect_rec.ect_attribute12,
10926 p_information123 => l_ect_rec.ect_attribute13,
10927 p_information124 => l_ect_rec.ect_attribute14,
10928 p_information125 => l_ect_rec.ect_attribute15,
10929 p_information126 => l_ect_rec.ect_attribute16,
10930 p_information127 => l_ect_rec.ect_attribute17,
10931 p_information128 => l_ect_rec.ect_attribute18,
10932 p_information129 => l_ect_rec.ect_attribute19,
10933 p_information112 => l_ect_rec.ect_attribute2,
10934 p_information130 => l_ect_rec.ect_attribute20,
10935 p_information131 => l_ect_rec.ect_attribute21,
10936 p_information132 => l_ect_rec.ect_attribute22,
10937 p_information133 => l_ect_rec.ect_attribute23,
10938 p_information134 => l_ect_rec.ect_attribute24,
10939 p_information135 => l_ect_rec.ect_attribute25,
10940 p_information136 => l_ect_rec.ect_attribute26,
10941 p_information137 => l_ect_rec.ect_attribute27,
10942 p_information138 => l_ect_rec.ect_attribute28,
10943 p_information139 => l_ect_rec.ect_attribute29,
10944 p_information113 => l_ect_rec.ect_attribute3,
10945 p_information140 => l_ect_rec.ect_attribute30,
10946 p_information114 => l_ect_rec.ect_attribute4,
10947 p_information115 => l_ect_rec.ect_attribute5,
10948 p_information116 => l_ect_rec.ect_attribute6,
10949 p_information117 => l_ect_rec.ect_attribute7,
10950 p_information118 => l_ect_rec.ect_attribute8,
10951 p_information119 => l_ect_rec.ect_attribute9,
10952 p_information110 => l_ect_rec.ect_attribute_category,
10953 p_information263 => l_ect_rec.eligy_prfl_id,
10954 p_information11 => l_ect_rec.excld_flag,
10955 p_information260 => l_ect_rec.ordr_num,
10956 p_information265 => l_ect_rec.object_version_number,
10957 p_information295 => l_ect_rec.criteria_score,
10958 p_information296 => l_ect_rec.criteria_weight,
10959
10960 --
10961
10962 -- END REPLACE PARAMETER LINES
10963
10964 p_object_version_number => l_object_version_number,
10965 p_effective_date => p_effective_date );
10966 --
10967
10968 if l_out_ect_result_id is null then
10969 l_out_ect_result_id := l_copy_entity_result_id;
10970 end if;
10971
10972 if l_result_type_cd = 'DISPLAY' then
10973 l_out_ect_result_id := l_copy_entity_result_id ;
10974 end if;
10975 --
10976 end loop;
10977 --
10978 end loop;
10979 ---------------------------------------------------------------
10980 -- END OF BEN_ELIG_DSBLTY_CTG_PRTE_F ----------------------
10981 ---------------------------------------------------------------
10982
10983 ---------------------------------------------------------------
10984 -- START OF BEN_ELIG_PERF_RTNG_PRTE_F ----------------------
10985 ---------------------------------------------------------------
10986 --
10987 for l_parent_rec in c_erg_from_parent(l_ELIGY_PRFL_ID) loop
10988 --
10989 l_mirror_src_entity_result_id := l_out_elp_result_id ;
10990 --
10991 l_elig_perf_rtng_prte_id := l_parent_rec.elig_perf_rtng_prte_id ;
10992 --
10993 for l_erg_rec in c_erg(l_parent_rec.elig_perf_rtng_prte_id,l_mirror_src_entity_result_id,'ERG' ) loop
10994 --
10995 l_table_route_id := null ;
10996 open ben_plan_design_program_module.g_table_route('ERG');
10997 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
10998 close ben_plan_design_program_module.g_table_route ;
10999 --
11000 l_information5 := hr_general.decode_lookup('EMP_INTERVIEW_TYPE',l_erg_rec.event_type)
11001 ||' - '||hr_general.decode_lookup('PERFORMANCE_RATING',l_erg_rec.perf_rtng_cd)
11002 || ben_plan_design_program_module.get_exclude_message(l_erg_rec.excld_flag);
11003 --'Intersection';
11004 --
11005 if p_effective_date between l_erg_rec.effective_start_date
11006 and l_erg_rec.effective_end_date then
11007 --
11008 l_result_type_cd := 'DISPLAY';
11009 else
11010 l_result_type_cd := 'NO DISPLAY';
11011 end if;
11012 --
11013 l_copy_entity_result_id := null;
11014 l_object_version_number := null;
11015 ben_copy_entity_results_api.create_copy_entity_results(
11016 p_copy_entity_result_id => l_copy_entity_result_id,
11017 p_copy_entity_txn_id => p_copy_entity_txn_id,
11018 p_result_type_cd => l_result_type_cd,
11019 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
11020 p_parent_entity_result_id => l_mirror_src_entity_result_id,
11021 p_number_of_copies => l_number_of_copies,
11022 p_table_route_id => l_table_route_id,
11023 P_TABLE_ALIAS => 'ERG',
11024 p_information1 => l_erg_rec.elig_perf_rtng_prte_id,
11025 p_information2 => l_erg_rec.EFFECTIVE_START_DATE,
11026 p_information3 => l_erg_rec.EFFECTIVE_END_DATE,
11027 p_information4 => l_erg_rec.business_group_id,
11028 p_information5 => l_information5 , -- 9999 put name for h-grid
11029 p_information263 => l_erg_rec.eligy_prfl_id,
11030 p_information111 => l_erg_rec.erg_attribute1,
11031 p_information120 => l_erg_rec.erg_attribute10,
11032 p_information121 => l_erg_rec.erg_attribute11,
11033 p_information122 => l_erg_rec.erg_attribute12,
11034 p_information123 => l_erg_rec.erg_attribute13,
11035 p_information124 => l_erg_rec.erg_attribute14,
11036 p_information125 => l_erg_rec.erg_attribute15,
11037 p_information126 => l_erg_rec.erg_attribute16,
11038 p_information127 => l_erg_rec.erg_attribute17,
11039 p_information128 => l_erg_rec.erg_attribute18,
11040 p_information129 => l_erg_rec.erg_attribute19,
11041 p_information112 => l_erg_rec.erg_attribute2,
11042 p_information130 => l_erg_rec.erg_attribute20,
11043 p_information131 => l_erg_rec.erg_attribute21,
11044 p_information132 => l_erg_rec.erg_attribute22,
11045 p_information133 => l_erg_rec.erg_attribute23,
11046 p_information134 => l_erg_rec.erg_attribute24,
11047 p_information135 => l_erg_rec.erg_attribute25,
11048 p_information136 => l_erg_rec.erg_attribute26,
11049 p_information137 => l_erg_rec.erg_attribute27,
11050 p_information138 => l_erg_rec.erg_attribute28,
11051 p_information139 => l_erg_rec.erg_attribute29,
11052 p_information113 => l_erg_rec.erg_attribute3,
11053 p_information140 => l_erg_rec.erg_attribute30,
11054 p_information114 => l_erg_rec.erg_attribute4,
11055 p_information115 => l_erg_rec.erg_attribute5,
11056 p_information116 => l_erg_rec.erg_attribute6,
11057 p_information117 => l_erg_rec.erg_attribute7,
11058 p_information118 => l_erg_rec.erg_attribute8,
11059 p_information119 => l_erg_rec.erg_attribute9,
11060 p_information110 => l_erg_rec.erg_attribute_category,
11061 p_information13 => l_erg_rec.event_type,
11062 p_information11 => l_erg_rec.excld_flag,
11063 p_information257 => l_erg_rec.ordr_num,
11064 p_information12 => l_erg_rec.perf_rtng_cd,
11065 p_information265 => l_erg_rec.object_version_number,
11066 p_information295 => l_erg_rec.criteria_score,
11067 p_information296 => l_erg_rec.criteria_weight,
11068 --
11069
11070 -- END REPLACE PARAMETER LINES
11071
11072 p_object_version_number => l_object_version_number,
11073 p_effective_date => p_effective_date );
11074 --
11075
11076 if l_out_erg_result_id is null then
11077 l_out_erg_result_id := l_copy_entity_result_id;
11078 end if;
11079
11080 if l_result_type_cd = 'DISPLAY' then
11081 l_out_erg_result_id := l_copy_entity_result_id ;
11082 end if;
11083 --
11084 end loop;
11085 --
11086 end loop;
11087 ---------------------------------------------------------------
11088 -- END OF BEN_ELIG_PERF_RTNG_PRTE_F ----------------------
11089 ---------------------------------------------------------------
11090 ---------------------------------------------------------------
11091 -- START OF BEN_ELIG_QUA_IN_GR_PRTE_F ----------------------
11092 ---------------------------------------------------------------
11093 --
11094 for l_parent_rec in c_eqg_from_parent(l_ELIGY_PRFL_ID) loop
11095 --
11096 l_mirror_src_entity_result_id := l_out_elp_result_id ;
11097 --
11098 l_elig_qua_in_gr_prte_id := l_parent_rec.elig_qua_in_gr_prte_id ;
11099 --
11100 for l_eqg_rec in c_eqg(l_parent_rec.elig_qua_in_gr_prte_id,l_mirror_src_entity_result_id,'EQG' ) loop
11101 --
11102 l_table_route_id := null ;
11103 open ben_plan_design_program_module.g_table_route('EQG');
11104 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
11105 close ben_plan_design_program_module.g_table_route ;
11106 --
11107 l_information5 := hr_general.decode_lookup('BEN_CWB_QUAR_IN_GRD',l_eqg_rec.quar_in_grade_cd)
11108 || ben_plan_design_program_module.get_exclude_message(l_eqg_rec.excld_flag);
11109 -- 'Intersection';
11110 --
11111 if p_effective_date between l_eqg_rec.effective_start_date
11112 and l_eqg_rec.effective_end_date then
11113 --
11114 l_result_type_cd := 'DISPLAY';
11115 else
11116 l_result_type_cd := 'NO DISPLAY';
11117 end if;
11118 --
11119 l_copy_entity_result_id := null;
11120 l_object_version_number := null;
11121 ben_copy_entity_results_api.create_copy_entity_results(
11122 p_copy_entity_result_id => l_copy_entity_result_id,
11123 p_copy_entity_txn_id => p_copy_entity_txn_id,
11124 p_result_type_cd => l_result_type_cd,
11125 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
11126 p_parent_entity_result_id => l_mirror_src_entity_result_id,
11127 p_number_of_copies => l_number_of_copies,
11128 p_table_route_id => l_table_route_id,
11129 P_TABLE_ALIAS => 'EQG',
11130 p_information1 => l_eqg_rec.elig_qua_in_gr_prte_id,
11131 p_information2 => l_eqg_rec.EFFECTIVE_START_DATE,
11132 p_information3 => l_eqg_rec.EFFECTIVE_END_DATE,
11133 p_information4 => l_eqg_rec.business_group_id,
11134 p_information5 => l_information5 , -- 9999 put name for h-grid
11135 p_information263 => l_eqg_rec.eligy_prfl_id,
11136 p_information111 => l_eqg_rec.eqg_attribute1,
11137 p_information120 => l_eqg_rec.eqg_attribute10,
11138 p_information121 => l_eqg_rec.eqg_attribute11,
11139 p_information122 => l_eqg_rec.eqg_attribute12,
11140 p_information123 => l_eqg_rec.eqg_attribute13,
11141 p_information124 => l_eqg_rec.eqg_attribute14,
11142 p_information125 => l_eqg_rec.eqg_attribute15,
11143 p_information126 => l_eqg_rec.eqg_attribute16,
11144 p_information127 => l_eqg_rec.eqg_attribute17,
11145 p_information128 => l_eqg_rec.eqg_attribute18,
11146 p_information129 => l_eqg_rec.eqg_attribute19,
11147 p_information112 => l_eqg_rec.eqg_attribute2,
11148 p_information130 => l_eqg_rec.eqg_attribute20,
11149 p_information131 => l_eqg_rec.eqg_attribute21,
11150 p_information132 => l_eqg_rec.eqg_attribute22,
11151 p_information133 => l_eqg_rec.eqg_attribute23,
11152 p_information134 => l_eqg_rec.eqg_attribute24,
11153 p_information135 => l_eqg_rec.eqg_attribute25,
11154 p_information136 => l_eqg_rec.eqg_attribute26,
11155 p_information137 => l_eqg_rec.eqg_attribute27,
11156 p_information138 => l_eqg_rec.eqg_attribute28,
11157 p_information139 => l_eqg_rec.eqg_attribute29,
11158 p_information113 => l_eqg_rec.eqg_attribute3,
11159 p_information140 => l_eqg_rec.eqg_attribute30,
11160 p_information114 => l_eqg_rec.eqg_attribute4,
11161 p_information115 => l_eqg_rec.eqg_attribute5,
11162 p_information116 => l_eqg_rec.eqg_attribute6,
11163 p_information117 => l_eqg_rec.eqg_attribute7,
11164 p_information118 => l_eqg_rec.eqg_attribute8,
11165 p_information119 => l_eqg_rec.eqg_attribute9,
11166 p_information110 => l_eqg_rec.eqg_attribute_category,
11167 p_information12 => l_eqg_rec.excld_flag,
11168 p_information260 => l_eqg_rec.ordr_num,
11169 p_information11 => l_eqg_rec.quar_in_grade_cd,
11170 p_information265 => l_eqg_rec.object_version_number,
11171 p_information295 => l_eqg_rec.criteria_score,
11172 p_information296 => l_eqg_rec.criteria_weight,
11173 --
11174
11175 -- END REPLACE PARAMETER LINES
11176
11177 p_object_version_number => l_object_version_number,
11178 p_effective_date => p_effective_date );
11179 --
11180
11181 if l_out_eqg_result_id is null then
11182 l_out_eqg_result_id := l_copy_entity_result_id;
11183 end if;
11184
11185 if l_result_type_cd = 'DISPLAY' then
11186 l_out_eqg_result_id := l_copy_entity_result_id ;
11187 end if;
11188 --
11189 end loop;
11190 --
11191 end loop;
11192 ---------------------------------------------------------------
11193 -- END OF BEN_ELIG_QUA_IN_GR_PRTE_F ----------------------
11194 ---------------------------------------------------------------
11195
11196 ---------------------------------------------------------------
11197 -- START OF BEN_ELIG_TBCO_USE_PRTE_F ----------------------
11198 ---------------------------------------------------------------
11199 --
11200 for l_parent_rec in c_etu_from_parent(l_ELIGY_PRFL_ID) loop
11201 --
11202 l_mirror_src_entity_result_id := l_out_elp_result_id ;
11203 --
11204 l_elig_tbco_use_prte_id := l_parent_rec.elig_tbco_use_prte_id ;
11205 --
11206 for l_etu_rec in c_etu(l_parent_rec.elig_tbco_use_prte_id,l_mirror_src_entity_result_id,'ETU' ) loop
11207 --
11208 l_table_route_id := null ;
11209 open ben_plan_design_program_module.g_table_route('ETU');
11210 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
11211 close ben_plan_design_program_module.g_table_route ;
11212 --
11213 l_information5 := hr_general.decode_lookup('TOBACCO_USER',l_etu_rec.uses_tbco_flag)
11214 || ben_plan_design_program_module.get_exclude_message(l_etu_rec.excld_flag);
11215 --Intersection';
11216 --
11217 if p_effective_date between l_etu_rec.effective_start_date
11218 and l_etu_rec.effective_end_date then
11219 --
11220 l_result_type_cd := 'DISPLAY';
11221 else
11222 l_result_type_cd := 'NO DISPLAY';
11223 end if;
11224 --
11225 l_copy_entity_result_id := null;
11226 l_object_version_number := null;
11227 ben_copy_entity_results_api.create_copy_entity_results(
11228 p_copy_entity_result_id => l_copy_entity_result_id,
11229 p_copy_entity_txn_id => p_copy_entity_txn_id,
11230 p_result_type_cd => l_result_type_cd,
11231 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
11232 p_parent_entity_result_id => l_mirror_src_entity_result_id,
11233 p_number_of_copies => l_number_of_copies,
11234 p_table_route_id => l_table_route_id,
11235 P_TABLE_ALIAS => 'ETU',
11236 p_information1 => l_etu_rec.elig_tbco_use_prte_id,
11237 p_information2 => l_etu_rec.EFFECTIVE_START_DATE,
11238 p_information3 => l_etu_rec.EFFECTIVE_END_DATE,
11239 p_information4 => l_etu_rec.business_group_id,
11240 p_information5 => l_information5 , -- 9999 put name for h-grid
11241 p_information263 => l_etu_rec.eligy_prfl_id,
11242 p_information111 => l_etu_rec.etu_attribute1,
11243 p_information120 => l_etu_rec.etu_attribute10,
11244 p_information121 => l_etu_rec.etu_attribute11,
11245 p_information122 => l_etu_rec.etu_attribute12,
11246 p_information123 => l_etu_rec.etu_attribute13,
11247 p_information124 => l_etu_rec.etu_attribute14,
11248 p_information125 => l_etu_rec.etu_attribute15,
11249 p_information126 => l_etu_rec.etu_attribute16,
11250 p_information127 => l_etu_rec.etu_attribute17,
11251 p_information128 => l_etu_rec.etu_attribute18,
11252 p_information129 => l_etu_rec.etu_attribute19,
11253 p_information112 => l_etu_rec.etu_attribute2,
11254 p_information130 => l_etu_rec.etu_attribute20,
11255 p_information131 => l_etu_rec.etu_attribute21,
11256 p_information132 => l_etu_rec.etu_attribute22,
11257 p_information133 => l_etu_rec.etu_attribute23,
11258 p_information134 => l_etu_rec.etu_attribute24,
11259 p_information135 => l_etu_rec.etu_attribute25,
11260 p_information136 => l_etu_rec.etu_attribute26,
11261 p_information137 => l_etu_rec.etu_attribute27,
11262 p_information138 => l_etu_rec.etu_attribute28,
11263 p_information139 => l_etu_rec.etu_attribute29,
11264 p_information113 => l_etu_rec.etu_attribute3,
11265 p_information140 => l_etu_rec.etu_attribute30,
11266 p_information114 => l_etu_rec.etu_attribute4,
11267 p_information115 => l_etu_rec.etu_attribute5,
11268 p_information116 => l_etu_rec.etu_attribute6,
11269 p_information117 => l_etu_rec.etu_attribute7,
11270 p_information118 => l_etu_rec.etu_attribute8,
11271 p_information119 => l_etu_rec.etu_attribute9,
11272 p_information110 => l_etu_rec.etu_attribute_category,
11273 p_information11 => l_etu_rec.excld_flag,
11274 p_information260 => l_etu_rec.ordr_num,
11275 p_information12 => l_etu_rec.uses_tbco_flag,
11276 p_information265 => l_etu_rec.object_version_number,
11277 p_information295 => l_etu_rec.criteria_score,
11278 p_information296 => l_etu_rec.criteria_weight,
11279 --
11280
11281 -- END REPLACE PARAMETER LINES
11282
11283 p_object_version_number => l_object_version_number,
11284 p_effective_date => p_effective_date );
11285 --
11286
11287 if l_out_etu_result_id is null then
11288 l_out_etu_result_id := l_copy_entity_result_id;
11289 end if;
11290
11291 if l_result_type_cd = 'DISPLAY' then
11292 l_out_etu_result_id := l_copy_entity_result_id ;
11293 end if;
11294 --
11295 end loop;
11296 --
11297 end loop;
11298 ---------------------------------------------------------------
11299 -- END OF BEN_ELIG_TBCO_USE_PRTE_F ----------------------
11300 ---------------------------------------------------------------
11301 ---------------------------------------------------------------
11302 -- START OF BEN_ELIG_TTL_CVG_VOL_PRTE_F ----------------------
11303 ---------------------------------------------------------------
11304 --
11305 for l_parent_rec in c_etc_from_parent(l_ELIGY_PRFL_ID) loop
11306 --
11307 l_mirror_src_entity_result_id := l_out_elp_result_id ;
11308 --
11309 l_elig_ttl_cvg_vol_prte_id := l_parent_rec.elig_ttl_cvg_vol_prte_id ;
11310 --
11311 for l_etc_rec in c_etc(l_parent_rec.elig_ttl_cvg_vol_prte_id,l_mirror_src_entity_result_id,'ETC' ) loop
11312 --
11313 l_table_route_id := null ;
11314 open ben_plan_design_program_module.g_table_route('ETC');
11315 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
11316 close ben_plan_design_program_module.g_table_route ;
11317 --
11318 l_information5 := l_etc_rec.mn_cvg_vol_amt || ' - ' ||l_etc_rec.mx_cvg_vol_amt
11319 || ben_plan_design_program_module.get_exclude_message(l_etc_rec.excld_flag);
11320 --
11321 if p_effective_date between l_etc_rec.effective_start_date
11322 and l_etc_rec.effective_end_date then
11323 --
11324 l_result_type_cd := 'DISPLAY';
11325 else
11326 l_result_type_cd := 'NO DISPLAY';
11327 end if;
11328 --
11329 l_copy_entity_result_id := null;
11330 l_object_version_number := null;
11331 ben_copy_entity_results_api.create_copy_entity_results(
11332 p_copy_entity_result_id => l_copy_entity_result_id,
11333 p_copy_entity_txn_id => p_copy_entity_txn_id,
11334 p_result_type_cd => l_result_type_cd,
11335 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
11336 p_parent_entity_result_id => l_mirror_src_entity_result_id,
11337 p_number_of_copies => l_number_of_copies,
11338 p_table_route_id => l_table_route_id,
11339 P_TABLE_ALIAS => 'ETC',
11340 p_information1 => l_etc_rec.elig_ttl_cvg_vol_prte_id,
11341 p_information2 => l_etc_rec.EFFECTIVE_START_DATE,
11342 p_information3 => l_etc_rec.EFFECTIVE_END_DATE,
11343 p_information4 => l_etc_rec.business_group_id,
11344 p_information5 => l_information5 , -- 9999 put name for h-grid
11345 p_information14 => l_etc_rec.cvg_vol_det_cd,
11346 p_information261 => l_etc_rec.cvg_vol_det_rl,
11347 p_information263 => l_etc_rec.eligy_prfl_id,
11348 p_information111 => l_etc_rec.etc_attribute1,
11349 p_information120 => l_etc_rec.etc_attribute10,
11350 p_information121 => l_etc_rec.etc_attribute11,
11351 p_information122 => l_etc_rec.etc_attribute12,
11352 p_information123 => l_etc_rec.etc_attribute13,
11353 p_information124 => l_etc_rec.etc_attribute14,
11354 p_information125 => l_etc_rec.etc_attribute15,
11355 p_information126 => l_etc_rec.etc_attribute16,
11356 p_information127 => l_etc_rec.etc_attribute17,
11357 p_information128 => l_etc_rec.etc_attribute18,
11358 p_information129 => l_etc_rec.etc_attribute19,
11359 p_information112 => l_etc_rec.etc_attribute2,
11360 p_information130 => l_etc_rec.etc_attribute20,
11361 p_information131 => l_etc_rec.etc_attribute21,
11362 p_information132 => l_etc_rec.etc_attribute22,
11363 p_information133 => l_etc_rec.etc_attribute23,
11364 p_information134 => l_etc_rec.etc_attribute24,
11365 p_information135 => l_etc_rec.etc_attribute25,
11366 p_information136 => l_etc_rec.etc_attribute26,
11367 p_information137 => l_etc_rec.etc_attribute27,
11368 p_information138 => l_etc_rec.etc_attribute28,
11369 p_information139 => l_etc_rec.etc_attribute29,
11370 p_information113 => l_etc_rec.etc_attribute3,
11371 p_information140 => l_etc_rec.etc_attribute30,
11372 p_information114 => l_etc_rec.etc_attribute4,
11373 p_information115 => l_etc_rec.etc_attribute5,
11374 p_information116 => l_etc_rec.etc_attribute6,
11375 p_information117 => l_etc_rec.etc_attribute7,
11376 p_information118 => l_etc_rec.etc_attribute8,
11377 p_information119 => l_etc_rec.etc_attribute9,
11378 p_information110 => l_etc_rec.etc_attribute_category,
11379 p_information11 => l_etc_rec.excld_flag,
11380 p_information293 => l_etc_rec.mn_cvg_vol_amt,
11381 p_information294 => l_etc_rec.mx_cvg_vol_amt,
11382 p_information12 => l_etc_rec.no_mn_cvg_vol_amt_apls_flag,
11383 p_information13 => l_etc_rec.no_mx_cvg_vol_amt_apls_flag,
11384 p_information260 => l_etc_rec.ordr_num,
11385 p_information265 => l_etc_rec.object_version_number,
11386 --
11387
11388 -- END REPLACE PARAMETER LINES
11389
11390 p_object_version_number => l_object_version_number,
11391 p_effective_date => p_effective_date );
11392 --
11393
11394 if l_out_etc_result_id is null then
11395 l_out_etc_result_id := l_copy_entity_result_id;
11396 end if;
11397
11398 if l_result_type_cd = 'DISPLAY' then
11399 l_out_etc_result_id := l_copy_entity_result_id ;
11400 end if;
11401 --
11402
11403 if (l_etc_rec.cvg_vol_det_rl is not null) then
11404 ben_plan_design_program_module.create_formula_result(
11405 p_validate => p_validate
11406 ,p_copy_entity_result_id => l_copy_entity_result_id
11407 ,p_copy_entity_txn_id => p_copy_entity_txn_id
11408 ,p_formula_id => l_etc_rec.cvg_vol_det_rl
11409 ,p_business_group_id => l_etc_rec.business_group_id
11410 ,p_number_of_copies => l_number_of_copies
11411 ,p_object_version_number => l_object_version_number
11412 ,p_effective_date => p_effective_date);
11413 end if;
11414
11415 end loop;
11416 --
11417 end loop;
11418 ---------------------------------------------------------------
11419 -- END OF BEN_ELIG_TTL_CVG_VOL_PRTE_F ----------------------
11420 ---------------------------------------------------------------
11421 ---------------------------------------------------------------
11422 -- START OF BEN_ELIG_TTL_PRTT_PRTE_F ----------------------
11423 ---------------------------------------------------------------
11424 --
11425 for l_parent_rec in c_etp_from_parent(l_ELIGY_PRFL_ID) loop
11426 --
11427 l_mirror_src_entity_result_id := l_out_elp_result_id ;
11428 --
11429 l_elig_ttl_prtt_prte_id := l_parent_rec.elig_ttl_prtt_prte_id ;
11430 --
11431 for l_etp_rec in c_etp(l_parent_rec.elig_ttl_prtt_prte_id,l_mirror_src_entity_result_id,'ETP' ) loop
11432 --
11433 l_table_route_id := null ;
11434 open ben_plan_design_program_module.g_table_route('ETP');
11435 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
11436 close ben_plan_design_program_module.g_table_route ;
11437 --
11438 l_information5 := l_etp_rec.mn_prtt_num ||' - '||l_etp_rec.mx_prtt_num
11439 || ben_plan_design_program_module.get_exclude_message(l_etp_rec.excld_flag);
11440 --
11441 if p_effective_date between l_etp_rec.effective_start_date
11442 and l_etp_rec.effective_end_date then
11443 --
11444 l_result_type_cd := 'DISPLAY';
11445 else
11446 l_result_type_cd := 'NO DISPLAY';
11447 end if;
11448 --
11449 l_copy_entity_result_id := null;
11450 l_object_version_number := null;
11451 ben_copy_entity_results_api.create_copy_entity_results(
11452 p_copy_entity_result_id => l_copy_entity_result_id,
11453 p_copy_entity_txn_id => p_copy_entity_txn_id,
11454 p_result_type_cd => l_result_type_cd,
11455 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
11456 p_parent_entity_result_id => l_mirror_src_entity_result_id,
11457 p_number_of_copies => l_number_of_copies,
11458 p_table_route_id => l_table_route_id,
11459 P_TABLE_ALIAS => 'ETP',
11460 p_information1 => l_etp_rec.elig_ttl_prtt_prte_id,
11461 p_information2 => l_etp_rec.EFFECTIVE_START_DATE,
11462 p_information3 => l_etp_rec.EFFECTIVE_END_DATE,
11463 p_information4 => l_etp_rec.business_group_id,
11464 p_information5 => l_information5 , -- 9999 put name for h-grid
11465 p_information263 => l_etp_rec.eligy_prfl_id,
11466 p_information111 => l_etp_rec.etp_attribute1,
11467 p_information120 => l_etp_rec.etp_attribute10,
11468 p_information121 => l_etp_rec.etp_attribute11,
11469 p_information122 => l_etp_rec.etp_attribute12,
11470 p_information123 => l_etp_rec.etp_attribute13,
11471 p_information124 => l_etp_rec.etp_attribute14,
11472 p_information125 => l_etp_rec.etp_attribute15,
11473 p_information126 => l_etp_rec.etp_attribute16,
11474 p_information127 => l_etp_rec.etp_attribute17,
11475 p_information128 => l_etp_rec.etp_attribute18,
11476 p_information129 => l_etp_rec.etp_attribute19,
11477 p_information112 => l_etp_rec.etp_attribute2,
11478 p_information130 => l_etp_rec.etp_attribute20,
11479 p_information131 => l_etp_rec.etp_attribute21,
11480 p_information132 => l_etp_rec.etp_attribute22,
11481 p_information133 => l_etp_rec.etp_attribute23,
11482 p_information134 => l_etp_rec.etp_attribute24,
11483 p_information135 => l_etp_rec.etp_attribute25,
11484 p_information136 => l_etp_rec.etp_attribute26,
11485 p_information137 => l_etp_rec.etp_attribute27,
11486 p_information138 => l_etp_rec.etp_attribute28,
11487 p_information139 => l_etp_rec.etp_attribute29,
11488 p_information113 => l_etp_rec.etp_attribute3,
11489 p_information140 => l_etp_rec.etp_attribute30,
11490 p_information114 => l_etp_rec.etp_attribute4,
11491 p_information115 => l_etp_rec.etp_attribute5,
11492 p_information116 => l_etp_rec.etp_attribute6,
11493 p_information117 => l_etp_rec.etp_attribute7,
11494 p_information118 => l_etp_rec.etp_attribute8,
11495 p_information119 => l_etp_rec.etp_attribute9,
11496 p_information110 => l_etp_rec.etp_attribute_category,
11497 p_information14 => l_etp_rec.excld_flag,
11498 p_information260 => l_etp_rec.mn_prtt_num,
11499 p_information261 => l_etp_rec.mx_prtt_num,
11500 p_information12 => l_etp_rec.no_mn_prtt_num_apls_flag,
11501 p_information13 => l_etp_rec.no_mx_prtt_num_apls_flag,
11502 p_information259 => l_etp_rec.ordr_num,
11503 p_information11 => l_etp_rec.prtt_det_cd,
11504 p_information262 => l_etp_rec.prtt_det_rl,
11505 p_information265 => l_etp_rec.object_version_number,
11506 --
11507
11508 -- END REPLACE PARAMETER LINES
11509
11510 p_object_version_number => l_object_version_number,
11511 p_effective_date => p_effective_date );
11512
11513 --
11514
11515 if l_out_etp_result_id is null then
11516 l_out_etp_result_id := l_copy_entity_result_id;
11517 end if;
11518
11519 if l_result_type_cd = 'DISPLAY' then
11520 l_out_etp_result_id := l_copy_entity_result_id ;
11521 end if;
11522 --
11523
11524 if (l_etp_rec.prtt_det_rl is not null) then
11525 ben_plan_design_program_module.create_formula_result(
11526 p_validate => p_validate
11527 ,p_copy_entity_result_id => l_copy_entity_result_id
11528 ,p_copy_entity_txn_id => p_copy_entity_txn_id
11529 ,p_formula_id => l_etp_rec.prtt_det_rl
11530 ,p_business_group_id => l_etp_rec.business_group_id
11531 ,p_number_of_copies => l_number_of_copies
11532 ,p_object_version_number => l_object_version_number
11533 ,p_effective_date => p_effective_date);
11534 end if;
11535
11536 end loop;
11537 --
11538 end loop;
11539 ---------------------------------------------------------------
11540 -- END OF BEN_ELIG_TTL_PRTT_PRTE_F ----------------------
11541 ---------------------------------------------------------------
11542 ---------------------------------------------------------------
11543 -- START OF BEN_ELIG_DSBLD_PRTE_F ----------------------
11544 ---------------------------------------------------------------
11545 --
11546 for l_parent_rec in c_edb_from_parent(l_ELIGY_PRFL_ID) loop
11547 --
11548 l_mirror_src_entity_result_id := l_out_elp_result_id ;
11549 --
11550 l_elig_dsbld_prte_id := l_parent_rec.elig_dsbld_prte_id ;
11551 --
11552 for l_edb_rec in c_edb(l_parent_rec.elig_dsbld_prte_id,l_mirror_src_entity_result_id,'EDB' ) loop
11553 --
11554 l_table_route_id := null ;
11555 open ben_plan_design_program_module.g_table_route('EDB');
11556 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
11557 close ben_plan_design_program_module.g_table_route ;
11558 --
11559 l_information5 := hr_general.decode_lookup('REGISTERED_DISABLED',l_edb_rec.dsbld_cd)
11560 || ben_plan_design_program_module.get_exclude_message(l_edb_rec.excld_flag);
11561 -- 'Intersection';
11562 --
11563 if p_effective_date between l_edb_rec.effective_start_date
11564 and l_edb_rec.effective_end_date then
11565 --
11566 l_result_type_cd := 'DISPLAY';
11567 else
11568 l_result_type_cd := 'NO DISPLAY';
11569 end if;
11570 --
11571 l_copy_entity_result_id := null;
11572 l_object_version_number := null;
11573 ben_copy_entity_results_api.create_copy_entity_results(
11574 p_copy_entity_result_id => l_copy_entity_result_id,
11575 p_copy_entity_txn_id => p_copy_entity_txn_id,
11576 p_result_type_cd => l_result_type_cd,
11577 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
11578 p_parent_entity_result_id => l_mirror_src_entity_result_id,
11579 p_number_of_copies => l_number_of_copies,
11580 p_table_route_id => l_table_route_id,
11581 P_TABLE_ALIAS => 'EDB',
11582 p_information1 => l_edb_rec.elig_dsbld_prte_id,
11583 p_information2 => l_edb_rec.EFFECTIVE_START_DATE,
11584 p_information3 => l_edb_rec.EFFECTIVE_END_DATE,
11585 p_information4 => l_edb_rec.business_group_id,
11586 p_information5 => l_information5 , -- 9999 put name for h-grid
11587 p_information12 => l_edb_rec.dsbld_cd,
11588 p_information111 => l_edb_rec.edb_attribute1,
11589 p_information120 => l_edb_rec.edb_attribute10,
11590 p_information121 => l_edb_rec.edb_attribute11,
11591 p_information122 => l_edb_rec.edb_attribute12,
11592 p_information123 => l_edb_rec.edb_attribute13,
11593 p_information124 => l_edb_rec.edb_attribute14,
11594 p_information125 => l_edb_rec.edb_attribute15,
11595 p_information126 => l_edb_rec.edb_attribute16,
11596 p_information127 => l_edb_rec.edb_attribute17,
11597 p_information128 => l_edb_rec.edb_attribute18,
11598 p_information129 => l_edb_rec.edb_attribute19,
11599 p_information112 => l_edb_rec.edb_attribute2,
11600 p_information130 => l_edb_rec.edb_attribute20,
11601 p_information131 => l_edb_rec.edb_attribute21,
11602 p_information132 => l_edb_rec.edb_attribute22,
11603 p_information133 => l_edb_rec.edb_attribute23,
11604 p_information134 => l_edb_rec.edb_attribute24,
11605 p_information135 => l_edb_rec.edb_attribute25,
11606 p_information136 => l_edb_rec.edb_attribute26,
11607 p_information137 => l_edb_rec.edb_attribute27,
11608 p_information138 => l_edb_rec.edb_attribute28,
11609 p_information139 => l_edb_rec.edb_attribute29,
11610 p_information113 => l_edb_rec.edb_attribute3,
11611 p_information140 => l_edb_rec.edb_attribute30,
11612 p_information114 => l_edb_rec.edb_attribute4,
11613 p_information115 => l_edb_rec.edb_attribute5,
11614 p_information116 => l_edb_rec.edb_attribute6,
11615 p_information117 => l_edb_rec.edb_attribute7,
11616 p_information118 => l_edb_rec.edb_attribute8,
11617 p_information119 => l_edb_rec.edb_attribute9,
11618 p_information110 => l_edb_rec.edb_attribute_category,
11619 p_information263 => l_edb_rec.eligy_prfl_id,
11620 p_information11 => l_edb_rec.excld_flag,
11621 p_information260 => l_edb_rec.ordr_num,
11622 p_information265 => l_edb_rec.object_version_number,
11623 p_information295 => l_edb_rec.criteria_score,
11624 p_information296 => l_edb_rec.criteria_weight,
11625 --
11626
11627 -- END REPLACE PARAMETER LINES
11628
11629 p_object_version_number => l_object_version_number,
11630 p_effective_date => p_effective_date );
11631 --
11632
11633 if l_out_edb_result_id is null then
11634 l_out_edb_result_id := l_copy_entity_result_id;
11635 end if;
11636
11637 if l_result_type_cd = 'DISPLAY' then
11638 l_out_edb_result_id := l_copy_entity_result_id ;
11639 end if;
11640 --
11641 end loop;
11642 --
11643 end loop;
11644 ---------------------------------------------------------------
11645 -- END OF BEN_ELIG_DSBLD_PRTE_F ----------------------
11646 ---------------------------------------------------------------
11647 ---------------------------------------------------------------
11648 -- START OF BEN_ELIG_HLTH_CVG_PRTE_F -------------------------
11649 ---------------------------------------------------------------
11650 --
11651 for l_parent_rec in c_ehc_from_parent(l_ELIGY_PRFL_ID) loop
11652 --
11653 l_mirror_src_entity_result_id := l_out_elp_result_id ;
11654 --
11655 l_elig_hlth_cvg_prte_id := l_parent_rec.elig_hlth_cvg_prte_id ;
11656 --
11657 for l_ehc_rec in c_ehc(l_parent_rec.elig_hlth_cvg_prte_id,l_mirror_src_entity_result_id,'EHC' ) loop
11658 --
11659 l_table_route_id := null ;
11660 open ben_plan_design_program_module.g_table_route('EHC');
11661 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
11662 close ben_plan_design_program_module.g_table_route ;
11663 --
11664 l_information5 := ben_plan_design_program_module.get_hlth_cvg_name(l_ehc_rec.pl_typ_opt_typ_id
11665 ,l_ehc_rec.oipl_id
11666 ,p_effective_date)
11667 || ben_plan_design_program_module.get_exclude_message(l_ehc_rec.excld_flag);
11668 --'Intersection';
11669
11670 if p_effective_date between l_ehc_rec.effective_start_date
11671 and l_ehc_rec.effective_end_date then
11672 --
11673 l_result_type_cd := 'DISPLAY';
11674 else
11675 l_result_type_cd := 'NO DISPLAY';
11676 end if;
11677 --
11678 l_copy_entity_result_id := null;
11679 l_object_version_number := null;
11680 ben_copy_entity_results_api.create_copy_entity_results(
11681 p_copy_entity_result_id => l_copy_entity_result_id,
11682 p_copy_entity_txn_id => p_copy_entity_txn_id,
11683 p_result_type_cd => l_result_type_cd,
11684 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
11685 p_parent_entity_result_id => l_mirror_src_entity_result_id,
11686 p_number_of_copies => l_number_of_copies,
11687 p_table_route_id => l_table_route_id,
11688 P_TABLE_ALIAS => 'EHC',
11689 p_information1 => l_ehc_rec.elig_hlth_cvg_prte_id,
11690 p_information2 => l_ehc_rec.EFFECTIVE_START_DATE,
11691 p_information3 => l_ehc_rec.EFFECTIVE_END_DATE,
11692 p_information4 => l_ehc_rec.business_group_id,
11693 p_information5 => l_information5 , -- 9999 put name for h-grid
11694 p_INFORMATION111 => l_ehc_rec.EHC_ATTRIBUTE1,
11695 p_INFORMATION120 => l_ehc_rec.EHC_ATTRIBUTE10,
11696 p_INFORMATION121 => l_ehc_rec.EHC_ATTRIBUTE11,
11697 p_INFORMATION122 => l_ehc_rec.EHC_ATTRIBUTE12,
11698 p_INFORMATION123 => l_ehc_rec.EHC_ATTRIBUTE13,
11699 p_INFORMATION124 => l_ehc_rec.EHC_ATTRIBUTE14,
11700 p_INFORMATION125 => l_ehc_rec.EHC_ATTRIBUTE15,
11701 p_INFORMATION126 => l_ehc_rec.EHC_ATTRIBUTE16,
11702 p_INFORMATION127 => l_ehc_rec.EHC_ATTRIBUTE17,
11703 p_INFORMATION128 => l_ehc_rec.EHC_ATTRIBUTE18,
11704 p_INFORMATION129 => l_ehc_rec.EHC_ATTRIBUTE19,
11705 p_INFORMATION112 => l_ehc_rec.EHC_ATTRIBUTE2,
11706 p_INFORMATION130 => l_ehc_rec.EHC_ATTRIBUTE20,
11707 p_INFORMATION131 => l_ehc_rec.EHC_ATTRIBUTE21,
11708 p_INFORMATION132 => l_ehc_rec.EHC_ATTRIBUTE22,
11709 p_INFORMATION133 => l_ehc_rec.EHC_ATTRIBUTE23,
11710 p_INFORMATION134 => l_ehc_rec.EHC_ATTRIBUTE24,
11711 p_INFORMATION135 => l_ehc_rec.EHC_ATTRIBUTE25,
11712 p_INFORMATION136 => l_ehc_rec.EHC_ATTRIBUTE26,
11713 p_INFORMATION137 => l_ehc_rec.EHC_ATTRIBUTE27,
11714 p_INFORMATION138 => l_ehc_rec.EHC_ATTRIBUTE28,
11715 p_INFORMATION139 => l_ehc_rec.EHC_ATTRIBUTE29,
11716 p_INFORMATION113 => l_ehc_rec.EHC_ATTRIBUTE3,
11717 p_INFORMATION140 => l_ehc_rec.EHC_ATTRIBUTE30,
11718 p_INFORMATION114 => l_ehc_rec.EHC_ATTRIBUTE4,
11719 p_INFORMATION115 => l_ehc_rec.EHC_ATTRIBUTE5,
11720 p_INFORMATION116 => l_ehc_rec.EHC_ATTRIBUTE6,
11721 p_INFORMATION117 => l_ehc_rec.EHC_ATTRIBUTE7,
11722 p_INFORMATION118 => l_ehc_rec.EHC_ATTRIBUTE8,
11723 p_INFORMATION119 => l_ehc_rec.EHC_ATTRIBUTE9,
11724 p_INFORMATION110 => l_ehc_rec.EHC_ATTRIBUTE_CATEGORY,
11725 p_INFORMATION263 => l_ehc_rec.ELIGY_PRFL_ID,
11726 p_INFORMATION11 => l_ehc_rec.EXCLD_FLAG,
11727 p_INFORMATION258 => l_ehc_rec.OIPL_ID,
11728 p_INFORMATION261 => l_ehc_rec.ORDR_NUM,
11729 p_INFORMATION228 => l_ehc_rec.PL_TYP_OPT_TYP_ID,
11730 p_information265 => l_ehc_rec.object_version_number,
11731 --
11732 -- END REPLACE PARAMETER LINES
11733 p_object_version_number => l_object_version_number,
11734 p_effective_date => p_effective_date );
11735 --
11736
11737 if l_out_ehc_result_id is null then
11738 l_out_ehc_result_id := l_copy_entity_result_id;
11739 end if;
11740
11741 if l_result_type_cd = 'DISPLAY' then
11742 l_out_ehc_result_id := l_copy_entity_result_id ;
11743 end if;
11744 --
11745 end loop;
11746 --
11747 end loop;
11748 ---------------------------------------------------------------
11749 -- END OF BEN_ELIG_HLTH_CVG_PRTE_F ----------------------
11750 ---------------------------------------------------------------
11751 ---------------------------------------------------------------
11752 -- START OF BEN_ELIG_ANTHR_PL_PRTE_F -------------------------
11753 ---------------------------------------------------------------
11754 --
11755 for l_parent_rec in c_eop_from_parent(l_ELIGY_PRFL_ID) loop
11756 --
11757 l_mirror_src_entity_result_id := l_out_elp_result_id ;
11758 --
11759 l_elig_anthr_pl_prte_id := l_parent_rec.elig_anthr_pl_prte_id ;
11760 --
11761 for l_eop_rec in c_eop(l_parent_rec.elig_anthr_pl_prte_id,l_mirror_src_entity_result_id,'EOP' ) loop
11762 --
11763 l_table_route_id := null ;
11764 open ben_plan_design_program_module.g_table_route('EOP');
11765 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
11766 close ben_plan_design_program_module.g_table_route ;
11767 --
11768 l_information5 := ben_plan_design_program_module.get_pl_name(l_eop_rec.pl_id
11769 ,p_effective_date)
11770 || ben_plan_design_program_module.get_exclude_message(l_eop_rec.excld_flag);
11771 --'Intersection';
11772
11773 if p_effective_date between l_eop_rec.effective_start_date
11774 and l_eop_rec.effective_end_date then
11775 --
11776 l_result_type_cd := 'DISPLAY';
11777 else
11778 l_result_type_cd := 'NO DISPLAY';
11779 end if;
11780 --
11781 l_copy_entity_result_id := null;
11782 l_object_version_number := null;
11783 ben_copy_entity_results_api.create_copy_entity_results(
11784 p_copy_entity_result_id => l_copy_entity_result_id,
11785 p_copy_entity_txn_id => p_copy_entity_txn_id,
11786 p_result_type_cd => l_result_type_cd,
11787 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
11788 p_parent_entity_result_id => l_mirror_src_entity_result_id,
11789 p_number_of_copies => l_number_of_copies,
11790 p_table_route_id => l_table_route_id,
11791 P_TABLE_ALIAS => 'EOP',
11792 p_information1 => l_eop_rec.elig_anthr_pl_prte_id,
11793 p_information2 => l_eop_rec.EFFECTIVE_START_DATE,
11794 p_information3 => l_eop_rec.EFFECTIVE_END_DATE,
11795 p_information4 => l_eop_rec.business_group_id,
11796 p_information5 => l_information5 , -- 9999 put name for h-grid
11797 p_INFORMATION263 => l_eop_rec.ELIGY_PRFL_ID,
11798 p_INFORMATION111 => l_eop_rec.EOP_ATTRIBUTE1,
11799 p_INFORMATION120 => l_eop_rec.EOP_ATTRIBUTE10,
11800 p_INFORMATION121 => l_eop_rec.EOP_ATTRIBUTE11,
11801 p_INFORMATION122 => l_eop_rec.EOP_ATTRIBUTE12,
11802 p_INFORMATION123 => l_eop_rec.EOP_ATTRIBUTE13,
11803 p_INFORMATION124 => l_eop_rec.EOP_ATTRIBUTE14,
11804 p_INFORMATION125 => l_eop_rec.EOP_ATTRIBUTE15,
11805 p_INFORMATION126 => l_eop_rec.EOP_ATTRIBUTE16,
11806 p_INFORMATION127 => l_eop_rec.EOP_ATTRIBUTE17,
11807 p_INFORMATION128 => l_eop_rec.EOP_ATTRIBUTE18,
11808 p_INFORMATION129 => l_eop_rec.EOP_ATTRIBUTE19,
11809 p_INFORMATION112 => l_eop_rec.EOP_ATTRIBUTE2,
11810 p_INFORMATION130 => l_eop_rec.EOP_ATTRIBUTE20,
11811 p_INFORMATION131 => l_eop_rec.EOP_ATTRIBUTE21,
11812 p_INFORMATION132 => l_eop_rec.EOP_ATTRIBUTE22,
11813 p_INFORMATION133 => l_eop_rec.EOP_ATTRIBUTE23,
11814 p_INFORMATION134 => l_eop_rec.EOP_ATTRIBUTE24,
11815 p_INFORMATION135 => l_eop_rec.EOP_ATTRIBUTE25,
11816 p_INFORMATION136 => l_eop_rec.EOP_ATTRIBUTE26,
11817 p_INFORMATION137 => l_eop_rec.EOP_ATTRIBUTE27,
11818 p_INFORMATION138 => l_eop_rec.EOP_ATTRIBUTE28,
11819 p_INFORMATION139 => l_eop_rec.EOP_ATTRIBUTE29,
11820 p_INFORMATION113 => l_eop_rec.EOP_ATTRIBUTE3,
11821 p_INFORMATION140 => l_eop_rec.EOP_ATTRIBUTE30,
11822 p_INFORMATION114 => l_eop_rec.EOP_ATTRIBUTE4,
11823 p_INFORMATION115 => l_eop_rec.EOP_ATTRIBUTE5,
11824 p_INFORMATION116 => l_eop_rec.EOP_ATTRIBUTE6,
11825 p_INFORMATION117 => l_eop_rec.EOP_ATTRIBUTE7,
11826 p_INFORMATION118 => l_eop_rec.EOP_ATTRIBUTE8,
11827 p_INFORMATION119 => l_eop_rec.EOP_ATTRIBUTE9,
11828 p_INFORMATION110 => l_eop_rec.EOP_ATTRIBUTE_CATEGORY,
11829 p_INFORMATION11 => l_eop_rec.EXCLD_FLAG,
11830 p_INFORMATION257 => l_eop_rec.ORDR_NUM,
11831 p_INFORMATION261 => l_eop_rec.PL_ID,
11832 p_information265 => l_eop_rec.object_version_number,
11833 --
11834 -- END REPLACE PARAMETER LINES
11835 p_object_version_number => l_object_version_number,
11836 p_effective_date => p_effective_date );
11837 --
11838
11839 if l_out_eop_result_id is null then
11840 l_out_eop_result_id := l_copy_entity_result_id;
11841 end if;
11842
11843 if l_result_type_cd = 'DISPLAY' then
11844 l_out_eop_result_id := l_copy_entity_result_id ;
11845 end if;
11846 --
11847 end loop;
11848 --
11849 end loop;
11850 ---------------------------------------------------------------
11851 -- END OF BEN_ELIG_HLTH_CVG_PRTE_F ----------------------
11852 ---------------------------------------------------------------
11853 --
11854 -- Bug 4169120 : Rate By Criteria
11855 --
11856 ---------------------------------------------------------------
11857 -------------- START OF BEN_ELIGY_CRIT_VALUES_F ---------------
11858 ---------------------------------------------------------------
11859 --
11860 for l_parent_rec in c_ecv_from_parent(l_ELIGY_PRFL_ID)
11861 loop
11862 --
11863 l_mirror_src_entity_result_id := l_out_elp_result_id ;
11864 --
11865 l_eligy_crit_values_id := l_parent_rec.eligy_crit_values_id ;
11866 --
11867 for l_ecv_rec in c_ecv(cv_eligy_crit_values_id => l_parent_rec.eligy_crit_values_id,
11868 cv_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
11869 cv_table_alias => 'ECV' )
11870 loop
11871 --
11872 l_table_route_id := null ;
11873 --
11874 open ben_plan_design_program_module.g_table_route('ECV');
11875 --
11876 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
11877 --
11878 close ben_plan_design_program_module.g_table_route ;
11879 --
11880 l_information5 := ben_plan_design_program_module.get_eligy_criteria_name (l_ecv_rec.eligy_criteria_id ) ||
11881 ben_plan_design_program_module.get_exclude_message(l_ecv_rec.excld_flag);
11882 --
11883 if p_effective_date between l_ecv_rec.effective_start_date
11884 and l_ecv_rec.effective_end_date
11885 then
11886 --
11887 l_result_type_cd := 'DISPLAY';
11888 --
11889 else
11890 --
11891 l_result_type_cd := 'NO DISPLAY';
11892 --
11893 end if;
11894 --
11895 l_copy_entity_result_id := null;
11896 l_object_version_number := null;
11897 --
11898 open c_egl_val_type_cd (l_ecv_rec.eligy_criteria_id );
11899 --
11900 fetch c_egl_val_type_cd into l_crit_col1_val_type_cd;
11901 --
11902 if l_crit_col1_val_type_cd in ('ORG_HIER', 'POS_HIER')
11903 then
11904 --
11905 -- For Organization / Position Hierarchy type of criteria basis we will
11906 -- copy following (so that we can auto map these values in bepdccp4.pkb STAGE -> BEN):
11907 --
11908 -- START_ORGANIZATION_NAME INFORMATION187
11909 -- START_POSITION_NAME INFORMATION188
11910 -- ORG_STRUCTURE_NAME INFORMATION13
11911 -- POS_STRUCTURE_NAME INFORMATION14
11912 --
11913 map_org_pos_hierarchy ( p_val_type_cd => l_crit_col1_val_type_cd,
11914 p_number1 => l_ecv_rec.number_value1,
11915 p_number2 => l_ecv_rec.number_value2,
11916 p_org_stru_name => l_org_stru_name,
11917 p_start_org_name => l_start_org_name,
11918 p_pos_stru_name => l_pos_stru_name,
11919 p_start_pos_name => l_start_pos_name,
11920 p_effective_date => p_effective_date,
11921 p_business_group_id => l_ecv_rec.business_group_id
11922 );
11923 --
11924 else
11925 --
11926 l_org_stru_name := null;
11927 l_start_org_name := null;
11928 l_pos_stru_name := null;
11929 l_start_pos_name := null;
11930 --
11931 end if;
11932 --
11933 close c_egl_val_type_cd ;
11934 --
11935 ben_copy_entity_results_api.create_copy_entity_results
11936 (
11937 p_copy_entity_result_id => l_copy_entity_result_id,
11938 p_copy_entity_txn_id => p_copy_entity_txn_id,
11939 p_result_type_cd => l_result_type_cd,
11940 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
11941 p_parent_entity_result_id => l_mirror_src_entity_result_id,
11942 p_number_of_copies => l_number_of_copies,
11943 p_table_route_id => l_table_route_id,
11944 p_table_alias => 'ECV',
11945 p_information1 => l_ecv_rec.eligy_crit_values_id,
11946 p_information2 => l_ecv_rec.effective_start_date,
11947 p_information3 => l_ecv_rec.effective_end_date,
11948 p_information4 => l_ecv_rec.business_group_id,
11949 p_information5 => l_information5,
11950 p_information11 => l_ecv_rec.excld_flag,
11951 p_information12 => l_ecv_rec.legislation_code,
11952 p_information13 => l_org_stru_name,
11953 p_information14 => l_pos_stru_name,
11954 p_information110 => l_ecv_rec.ecv_attribute_category,
11955 p_information111 => l_ecv_rec.ecv_attribute1,
11956 p_information112 => l_ecv_rec.ecv_attribute2,
11957 p_information113 => l_ecv_rec.ecv_attribute3,
11958 p_information114 => l_ecv_rec.ecv_attribute4,
11959 p_information115 => l_ecv_rec.ecv_attribute5,
11960 p_information116 => l_ecv_rec.ecv_attribute6,
11961 p_information117 => l_ecv_rec.ecv_attribute7,
11962 p_information118 => l_ecv_rec.ecv_attribute8,
11963 p_information119 => l_ecv_rec.ecv_attribute9,
11964 p_information120 => l_ecv_rec.ecv_attribute10,
11965 p_information121 => l_ecv_rec.ecv_attribute11,
11966 p_information122 => l_ecv_rec.ecv_attribute12,
11967 p_information123 => l_ecv_rec.ecv_attribute13,
11968 p_information124 => l_ecv_rec.ecv_attribute14,
11969 p_information125 => l_ecv_rec.ecv_attribute15,
11970 p_information126 => l_ecv_rec.ecv_attribute16,
11971 p_information127 => l_ecv_rec.ecv_attribute17,
11972 p_information128 => l_ecv_rec.ecv_attribute18,
11973 p_information129 => l_ecv_rec.ecv_attribute19,
11974 p_information130 => l_ecv_rec.ecv_attribute20,
11975 p_information131 => l_ecv_rec.ecv_attribute21,
11976 p_information132 => l_ecv_rec.ecv_attribute22,
11977 p_information133 => l_ecv_rec.ecv_attribute23,
11978 p_information134 => l_ecv_rec.ecv_attribute24,
11979 p_information135 => l_ecv_rec.ecv_attribute25,
11980 p_information136 => l_ecv_rec.ecv_attribute26,
11981 p_information137 => l_ecv_rec.ecv_attribute27,
11982 p_information138 => l_ecv_rec.ecv_attribute28,
11983 p_information139 => l_ecv_rec.ecv_attribute29,
11984 p_information140 => l_ecv_rec.ecv_attribute30,
11985 --Bug 4592554
11986 p_information181 => l_ecv_rec.char_value3,
11987 p_information182 => l_ecv_rec.char_value4,
11988 --End Bug 4592554
11989 p_information185 => l_ecv_rec.char_value1,
11990 p_information186 => l_ecv_rec.char_value2,
11991 p_information187 => l_start_org_name,
11992 p_information188 => l_start_pos_name,
11993 p_information260 => l_ecv_rec.ordr_num, /* Bug 4314927 */
11994 p_information263 => l_ecv_rec.eligy_prfl_id,
11995 p_information265 => l_ecv_rec.object_version_number,
11996 p_information272 => l_ecv_rec.eligy_criteria_id, /* Bug 4314927 */
11997 p_information295 => l_ecv_rec.criteria_score,
11998 p_information296 => l_ecv_rec.criteria_weight,
11999 --Bug 4592554
12000 p_information297 => l_ecv_rec.number_value3,
12001 p_information298 => l_ecv_rec.number_value4,
12002 --End Bug 4592554
12003 p_information293 => l_ecv_rec.number_value1,
12004 p_information294 => l_ecv_rec.number_value2,
12005 p_information306 => l_ecv_rec.date_value1,
12006 p_information307 => l_ecv_rec.date_value2,
12007 --Bug 4592554
12008 p_information308 => l_ecv_rec.date_value3,
12009 p_information309 => l_ecv_rec.date_value4,
12010 --End Bug 4592554
12011 p_object_version_number => l_object_version_number,
12012 p_effective_date => p_effective_date
12013 ); --
12014 if l_out_ecv_result_id is null
12015 then
12016 --
12017 l_out_ecv_result_id := l_copy_entity_result_id;
12018 --
12019 end if;
12020 --
12021 if l_result_type_cd = 'DISPLAY'
12022 then
12023 --
12024 l_out_ecv_result_id := l_copy_entity_result_id ;
12025 --
12026 end if;
12027 --
12028 l_eligy_criteria_id := l_ecv_rec.eligy_criteria_id ;
12029 --
12030 end loop;
12031 --
12032 ---------------------------------------------------------------
12033 ----------------- START OF BEN_ELIGY_CRITERIA -----------------
12034 ---------------------------------------------------------------
12035 -- Bug: 4347039. Moved the code to copy BEN_ELIGY_CRITERIA
12036 -- to the following procedure. PDW wanted externalizing this copying.
12037 --
12038 create_eligy_criteria_result (
12039 p_validate => p_validate
12040 ,p_copy_entity_result_id => l_out_ecv_result_id
12041 ,p_copy_entity_txn_id => p_copy_entity_txn_id
12042 ,p_eligy_criteria_id => l_eligy_criteria_id
12043 ,p_business_group_id => p_business_group_id
12044 ,p_number_of_copies => p_number_of_copies
12045 ,p_object_version_number => p_object_version_number
12046 ,p_effective_date => p_effective_date
12047 ,p_parent_entity_result_id => l_out_ecv_result_id);
12048
12049 /*
12050 4347039: Commented out the whole logic.
12051 Moved this into the create_eligy_criteria_result procedure.
12052 --
12053 l_mirror_src_entity_result_id := l_out_ecv_result_id ;
12054 --
12055 --
12056 for l_egl_rec in c_egl(cv_eligy_criteria_id => l_eligy_criteria_id,
12057 cv_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
12058 cv_table_alias => 'EGL' )
12059 loop
12060 --
12061 l_egl_table_route_id := null ;
12062 --
12063 open ben_plan_design_program_module.g_table_route('EGL');
12064 --
12065 fetch ben_plan_design_program_module.g_table_route into l_egl_table_route_id ;
12066 --
12067 close ben_plan_design_program_module.g_table_route ;
12068 --
12069 l_egl_result_type_cd := 'NO DISPLAY';
12070 --
12071 l_egl_copy_entity_result_id := null;
12072 l_egl_object_version_number := null;
12073 --
12074 -- If criteria basis contains Value Set id then populate Value Set Name
12075 -- in INFORMATION185 to use it again while auto-mapping in the target
12076 -- business group in bepdccp1.pkb (stage -> ben)
12077 --
12078 l_flex_value_set_name := null;
12079 --
12080 if l_egl_rec.col1_value_set_id is not null
12081 then
12082 --
12083 open c_value_set_name ( l_egl_rec.col1_value_set_id );
12084 --
12085 fetch c_value_set_name into l_flex_value_set_name;
12086 --
12087 close c_value_set_name;
12088 --
12089 end if;
12090 --
12091 ben_copy_entity_results_api.create_copy_entity_results
12092 (
12093 p_copy_entity_result_id => l_egl_copy_entity_result_id,
12094 p_copy_entity_txn_id => p_copy_entity_txn_id,
12095 p_result_type_cd => l_egl_result_type_cd,
12096 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
12097 p_parent_entity_result_id => l_mirror_src_entity_result_id,
12098 p_number_of_copies => l_number_of_copies,
12099 p_table_route_id => l_egl_table_route_id,
12100 p_table_alias => 'EGL',
12101 p_information1 => l_egl_rec.eligy_Criteria_id,
12102 p_information4 => l_egl_rec.business_group_id,
12103 p_information5 => l_egl_rec.name,
12104 p_information11 => l_egl_rec.short_code,
12105 p_information12 => l_egl_rec.criteria_type,
12106 p_information13 => l_egl_rec.crit_col1_val_type_cd,
12107 p_information14 => l_egl_rec.crit_col1_datatype,
12108 p_information15 => l_egl_rec.col1_lookup_type,
12109 p_information16 => l_egl_rec.access_table_name1,
12110 p_information17 => l_egl_rec.access_column_name1,
12111 p_information18 => l_egl_rec.time_entry_access_table_name1,
12112 p_information19 => l_egl_rec.time_entry_access_col_name1,
12113 p_information20 => l_egl_rec.crit_col2_val_type_cd,
12114 p_information21 => l_egl_rec.crit_col2_datatype,
12115 p_information22 => l_egl_rec.col2_lookup_type,
12116 p_information23 => l_egl_rec.access_table_name2,
12117 p_information24 => l_egl_rec.access_column_name2,
12118 p_information25 => l_egl_rec.time_entry_access_table_name2,
12119 p_information26 => l_egl_rec.time_entry_access_col_name2,
12120 p_information27 => l_egl_rec.allow_range_validation_flag,
12121 p_information28 => l_egl_rec.user_defined_flag,
12122 p_information29 => l_egl_rec.legislation_code,
12123 p_information110 => l_egl_rec.egl_attribute_category,
12124 p_information111 => l_egl_rec.egl_attribute1,
12125 p_information112 => l_egl_rec.egl_attribute2,
12126 p_information113 => l_egl_rec.egl_attribute3,
12127 p_information114 => l_egl_rec.egl_attribute4,
12128 p_information115 => l_egl_rec.egl_attribute5,
12129 p_information116 => l_egl_rec.egl_attribute6,
12130 p_information117 => l_egl_rec.egl_attribute7,
12131 p_information118 => l_egl_rec.egl_attribute8,
12132 p_information119 => l_egl_rec.egl_attribute9,
12133 p_information120 => l_egl_rec.egl_attribute10,
12134 p_information121 => l_egl_rec.egl_attribute11,
12135 p_information122 => l_egl_rec.egl_attribute12,
12136 p_information123 => l_egl_rec.egl_attribute13,
12137 p_information124 => l_egl_rec.egl_attribute14,
12138 p_information125 => l_egl_rec.egl_attribute15,
12139 p_information126 => l_egl_rec.egl_attribute16,
12140 p_information127 => l_egl_rec.egl_attribute17,
12141 p_information128 => l_egl_rec.egl_attribute18,
12142 p_information129 => l_egl_rec.egl_attribute19,
12143 p_information130 => l_egl_rec.egl_attribute20,
12144 p_information131 => l_egl_rec.egl_attribute21,
12145 p_information132 => l_egl_rec.egl_attribute22,
12146 p_information133 => l_egl_rec.egl_attribute23,
12147 p_information134 => l_egl_rec.egl_attribute24,
12148 p_information135 => l_egl_rec.egl_attribute25,
12149 p_information136 => l_egl_rec.egl_attribute26,
12150 p_information137 => l_egl_rec.egl_attribute27,
12151 p_information138 => l_egl_rec.egl_attribute28,
12152 p_information139 => l_egl_rec.egl_attribute29,
12153 p_information140 => l_egl_rec.egl_attribute30,
12154 p_information170 => l_egl_rec.name,
12155 p_information185 => l_flex_value_set_name,
12156 p_information219 => l_egl_rec.description,
12157 p_information265 => l_egl_rec.object_version_number,
12158 p_information266 => l_egl_rec.col1_value_set_id,
12159 p_information267 => l_egl_rec.col2_value_set_id,
12160 p_information268 => l_egl_rec.access_calc_rule,
12161 p_object_version_number => l_egl_object_version_number,
12162 p_effective_date => p_effective_date
12163 );
12164 --
12165 if l_egl_rec.access_calc_rule is not null
12166 then
12167 --
12168 ben_plan_design_program_module.create_formula_result
12169 (
12170 p_validate => 0,
12171 p_copy_entity_result_id => l_egl_copy_entity_result_id,
12172 p_copy_entity_txn_id => p_copy_entity_txn_id,
12173 p_formula_id => l_egl_rec.access_calc_rule,
12174 p_business_group_id => l_egl_rec.business_group_id,
12175 p_number_of_copies => l_number_of_copies,
12176 p_object_version_number => l_object_version_number,
12177 p_effective_date => p_effective_date
12178 );
12179 --
12180 end if;
12181 --
12182 end loop;
12183 -- */
12184 ---------------------------------------------------------------
12185 ------------------ END OF BEN_ELIGY_CRITERIA ------------------
12186 ---------------------------------------------------------------
12187 --
12188 end loop;
12189 --
12190 ---------------------------------------------------------------
12191 --------------- END OF BEN_ELIGY_CRIT_VALUES_F ----------------
12192 ---------------------------------------------------------------
12193
12194 end if;
12195 ---------------------------------------------------------------
12196 -- END OF BEN_ELIGY_PRFL_F ----------------------
12197 ---------------------------------------------------------------
12198
12199 end;
12200
12201 procedure create_dep_elig_prfl_results
12202 (
12203 p_validate in number default 0 -- false
12204 ,p_mirror_src_entity_result_id in number
12205 ,p_parent_entity_result_id in number
12206 ,p_copy_entity_txn_id in number
12207 ,p_dpnt_cvg_eligy_prfl_id in number
12208 ,p_business_group_id in number default null
12209 ,p_number_of_copies in number default 0
12210 ,p_object_version_number out nocopy number
12211 ,p_effective_date in date
12212 ,p_no_dup_rslt in varchar2 default null
12213 ) is
12214 l_copy_entity_result_id ben_copy_entity_results.copy_entity_result_id%TYPE;
12215 l_proc varchar2(72) := g_package||'create_dep_elig_prfl_result';
12216 l_object_version_number ben_copy_entity_results.object_version_number%TYPE;
12217 --
12218 l_cv_result_type_cd varchar2(30) := 'DISPLAY' ;
12219 --
12220 cursor c_parent_result(c_parent_pk_id number,
12221 c_parent_table_alias varchar2,
12222 c_copy_entity_txn_id number) is
12223 select copy_entity_result_id mirror_src_entity_result_id
12224 from ben_copy_entity_results cpe
12225 -- pqh_table_route trt
12226 where cpe.information1= c_parent_pk_id
12227 and cpe.result_type_cd = l_cv_result_type_cd
12228 and cpe.copy_entity_txn_id = c_copy_entity_txn_id
12229 -- and cpe.table_route_id = trt.table_route_id
12230 and cpe.table_alias = c_parent_table_alias ;
12231 ---
12232 -- Bug : 3752407 : Global cursor g_table_route will now be used
12233 -- Cursor to get table_route_id
12234 --
12235 -- cursor c_table_route(c_parent_table_alias varchar2) is
12236 -- select table_route_id
12237 -- from pqh_table_route trt
12238 -- where -- trt.from_clause = 'OAB'
12239 -- trt.table_alias = c_parent_table_alias ;
12240 ---
12241
12242 ---------------------------------------------------------------
12243 -- START OF BEN_DPNT_CVG_ELIGY_PRFL_F ----------------------
12244 ---------------------------------------------------------------
12245
12246 cursor c_dce(c_dpnt_cvg_eligy_prfl_id number,c_mirror_src_entity_result_id number ,
12247 c_table_alias varchar2 ) is
12248 select dce.*
12249 from BEN_DPNT_CVG_ELIGY_PRFL_F dce
12250 where dce.dpnt_cvg_eligy_prfl_id = c_dpnt_cvg_eligy_prfl_id
12251 -- and dce.business_group_id = p_business_group_id
12252 and not exists (
12253 select /* */ null
12254 from ben_copy_entity_results cpe
12255 -- pqh_table_route trt
12256 where copy_entity_txn_id = p_copy_entity_txn_id
12257 -- and trt.table_route_id = cpe.table_route_id
12258 and ( -- c_mirror_src_entity_result_id is null or
12259 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
12260 -- and trt.where_clause = 'BEN_DPNT_CVG_ELIGY_PRFL_F'
12261 and cpe.table_alias = c_table_alias
12262 and information1 = c_dpnt_cvg_eligy_prfl_id
12263 -- and information4 = dce.business_group_id
12264 and information2 = dce.effective_start_date
12265 and information3 = dce.effective_end_date
12266 );
12267 l_dpnt_cvg_eligy_prfl_id number(15);
12268 l_out_dce_result_id number(15);
12269 ---------------------------------------------------------------
12270 -- END OF BEN_DPNT_CVG_ELIGY_PRFL_F ----------------------
12271 ---------------------------------------------------------------
12272 ---------------------------------------------------------------
12273 -- START OF BEN_DPNT_CVG_RQD_RLSHP_F ----------------------
12274 ---------------------------------------------------------------
12275 cursor c_dcr_from_parent(c_DPNT_CVG_ELIGY_PRFL_ID number) is
12276 select dpnt_cvg_rqd_rlshp_id
12277 from BEN_DPNT_CVG_RQD_RLSHP_F
12278 where DPNT_CVG_ELIGY_PRFL_ID = c_DPNT_CVG_ELIGY_PRFL_ID ;
12279 --
12280 cursor c_dcr(c_dpnt_cvg_rqd_rlshp_id number,c_mirror_src_entity_result_id number ,
12281 c_table_alias varchar2 ) is
12282 select dcr.*
12283 from BEN_DPNT_CVG_RQD_RLSHP_F dcr
12284 where dcr.dpnt_cvg_rqd_rlshp_id = c_dpnt_cvg_rqd_rlshp_id
12285 -- and dcr.business_group_id = p_business_group_id
12286 and not exists (
12287 select /* */ null
12288 from ben_copy_entity_results cpe
12289 -- pqh_table_route trt
12290 where copy_entity_txn_id = p_copy_entity_txn_id
12291 -- and trt.table_route_id = cpe.table_route_id
12292 and ( -- c_mirror_src_entity_result_id is null or
12293 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
12294 -- and trt.where_clause = 'BEN_DPNT_CVG_RQD_RLSHP_F'
12295 and cpe.table_alias = c_table_alias
12296 and information1 = c_dpnt_cvg_rqd_rlshp_id
12297 -- and information4 = dcr.business_group_id
12298 and information2 = dcr.effective_start_date
12299 and information3 = dcr.effective_end_date
12300 );
12301 l_dpnt_cvg_rqd_rlshp_id number(15);
12302 l_out_dcr_result_id number(15);
12303 ---------------------------------------------------------------
12304 -- END OF BEN_DPNT_CVG_RQD_RLSHP_F ----------------------
12305 ---------------------------------------------------------------
12306 ---------------------------------------------------------------
12307 -- START OF BEN_DPNT_CVRD_ANTHR_PL_CVG_F ----------------------
12308 ---------------------------------------------------------------
12309 cursor c_dpc_from_parent(c_DPNT_CVG_ELIGY_PRFL_ID number) is
12310 select dpnt_cvrd_anthr_pl_cvg_id
12311 from BEN_DPNT_CVRD_ANTHR_PL_CVG_F
12312 where DPNT_CVG_ELIGY_PRFL_ID = c_DPNT_CVG_ELIGY_PRFL_ID ;
12313 --
12314 cursor c_dpc(c_dpnt_cvrd_anthr_pl_cvg_id number,c_mirror_src_entity_result_id number ,
12315 c_table_alias varchar2 ) is
12316 select dpc.*
12317 from BEN_DPNT_CVRD_ANTHR_PL_CVG_F dpc
12318 where dpc.dpnt_cvrd_anthr_pl_cvg_id = c_dpnt_cvrd_anthr_pl_cvg_id
12319 -- and dpc.business_group_id = p_business_group_id
12320 and not exists (
12321 select /* */ null
12322 from ben_copy_entity_results cpe
12323 -- pqh_table_route trt
12324 where copy_entity_txn_id = p_copy_entity_txn_id
12325 -- and trt.table_route_id = cpe.table_route_id
12326 and ( -- c_mirror_src_entity_result_id is null or
12327 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
12328 -- and trt.where_clause = 'BEN_DPNT_CVRD_ANTHR_PL_CVG_F'
12329 and cpe.table_alias = c_table_alias
12330 and information1 = c_dpnt_cvrd_anthr_pl_cvg_id
12331 -- and information4 = dpc.business_group_id
12332 and information2 = dpc.effective_start_date
12333 and information3 = dpc.effective_end_date
12334 );
12335 l_dpnt_cvrd_anthr_pl_cvg_id number(15);
12336 l_out_dpc_result_id number(15);
12337 ---------------------------------------------------------------
12338 -- END OF BEN_DPNT_CVRD_ANTHR_PL_CVG_F ----------------------
12339 ---------------------------------------------------------------
12340 ---------------------------------------------------------------
12341 -- START OF BEN_DSGNTR_ENRLD_CVG_F ----------------------
12342 ---------------------------------------------------------------
12343 cursor c_dec_from_parent(c_DPNT_CVG_ELIGY_PRFL_ID number) is
12344 select dsgntr_enrld_cvg_id
12345 from BEN_DSGNTR_ENRLD_CVG_F
12346 where DPNT_CVG_ELIGY_PRFL_ID = c_DPNT_CVG_ELIGY_PRFL_ID ;
12347 --
12348 cursor c_dec(c_dsgntr_enrld_cvg_id number,c_mirror_src_entity_result_id number ,
12349 c_table_alias varchar2 ) is
12350 select dec.*
12351 from BEN_DSGNTR_ENRLD_CVG_F dec
12352 where dec.dsgntr_enrld_cvg_id = c_dsgntr_enrld_cvg_id
12353 -- and dec.business_group_id = p_business_group_id
12354 and not exists (
12355 select /* */ null
12356 from ben_copy_entity_results cpe
12357 -- pqh_table_route trt
12358 where copy_entity_txn_id = p_copy_entity_txn_id
12359 -- and trt.table_route_id = cpe.table_route_id
12360 and ( -- c_mirror_src_entity_result_id is null or
12361 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
12362 -- and trt.where_clause = 'BEN_DSGNTR_ENRLD_CVG_F'
12363 and cpe.table_alias = c_table_alias
12364 and information1 = c_dsgntr_enrld_cvg_id
12365 -- and information4 = dec.business_group_id
12366 and information2 = dec.effective_start_date
12367 and information3 = dec.effective_end_date
12368 );
12369 l_dsgntr_enrld_cvg_id number(15);
12370 l_out_dec_result_id number(15);
12371 ---------------------------------------------------------------
12372 -- END OF BEN_DSGNTR_ENRLD_CVG_F ----------------------
12373 ---------------------------------------------------------------
12374 ---------------------------------------------------------------
12375 -- START OF BEN_ELIG_AGE_CVG_F ----------------------
12376 ---------------------------------------------------------------
12377 cursor c_eac_from_parent(c_DPNT_CVG_ELIGY_PRFL_ID number) is
12378 select distinct elig_age_cvg_id
12379 from BEN_ELIG_AGE_CVG_F
12380 where DPNT_CVG_ELIGY_PRFL_ID = c_DPNT_CVG_ELIGY_PRFL_ID ;
12381 --
12382 cursor c_eac(c_elig_age_cvg_id number,c_mirror_src_entity_result_id number ,
12383 c_table_alias varchar2 ) is
12384 select eac.*
12385 from BEN_ELIG_AGE_CVG_F eac
12386 where eac.elig_age_cvg_id = c_elig_age_cvg_id
12387 -- and eac.business_group_id = p_business_group_id
12388 and not exists (
12389 select /* */ null
12390 from ben_copy_entity_results cpe
12391 -- pqh_table_route trt
12392 where copy_entity_txn_id = p_copy_entity_txn_id
12393 -- and trt.table_route_id = cpe.table_route_id
12394 and ( -- c_mirror_src_entity_result_id is null or
12395 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
12396 -- and trt.where_clause = 'BEN_ELIG_AGE_CVG_F'
12397 and cpe.table_alias = c_table_alias
12398 and information1 = c_elig_age_cvg_id
12399 -- and information4 = eac.business_group_id
12400 and information2 = eac.effective_start_date
12401 and information3 = eac.effective_end_date
12402 );
12403 l_elig_age_cvg_id number(15);
12404 l_out_eac_result_id number(15);
12405 --
12406 cursor c_eac_drp(c_elig_age_cvg_id number,c_mirror_src_entity_result_id number ,
12407 c_table_alias varchar2 ) is
12408 select distinct cpe.information246 age_fctr_id
12409 from ben_copy_entity_results cpe
12410 -- pqh_table_route trt
12411 where copy_entity_txn_id = p_copy_entity_txn_id
12412 -- and trt.table_route_id = cpe.table_route_id
12413 and mirror_src_entity_result_id = c_mirror_src_entity_result_id
12414 -- and trt.where_clause = 'BEN_ELIG_AGE_CVG_F'
12415 and cpe.table_alias = c_table_alias
12416 and information1 = c_elig_age_cvg_id
12417 -- and information4 = p_business_group_id
12418 ;
12419 ---------------------------------------------------------------
12420 -- END OF BEN_ELIG_AGE_CVG_F ----------------------
12421 ---------------------------------------------------------------
12422 ---------------------------------------------------------------
12423 -- START OF BEN_ELIG_DSBLD_STAT_CVG_F ----------------------
12424 ---------------------------------------------------------------
12425 cursor c_edc_from_parent(c_DPNT_CVG_ELIGY_PRFL_ID number) is
12426 select elig_dsbld_stat_cvg_id
12427 from BEN_ELIG_DSBLD_STAT_CVG_F
12428 where DPNT_CVG_ELIGY_PRFL_ID = c_DPNT_CVG_ELIGY_PRFL_ID ;
12429 --
12430 cursor c_edc(c_elig_dsbld_stat_cvg_id number,c_mirror_src_entity_result_id number ,
12431 c_table_alias varchar2 ) is
12432 select edc.*
12433 from BEN_ELIG_DSBLD_STAT_CVG_F edc
12434 where edc.elig_dsbld_stat_cvg_id = c_elig_dsbld_stat_cvg_id
12435 -- and edc.business_group_id = p_business_group_id
12436 and not exists (
12437 select /* */ null
12438 from ben_copy_entity_results cpe
12439 -- pqh_table_route trt
12440 where copy_entity_txn_id = p_copy_entity_txn_id
12441 -- and trt.table_route_id = cpe.table_route_id
12442 and ( -- c_mirror_src_entity_result_id is null or
12443 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
12444 -- and trt.where_clause = 'BEN_ELIG_DSBLD_STAT_CVG_F'
12445 and cpe.table_alias = c_table_alias
12446 and information1 = c_elig_dsbld_stat_cvg_id
12447 -- and information4 = edc.business_group_id
12448 and information2 = edc.effective_start_date
12449 and information3 = edc.effective_end_date
12450 );
12451 l_elig_dsbld_stat_cvg_id number(15);
12452 l_out_edc_result_id number(15);
12453 ---------------------------------------------------------------
12454 -- END OF BEN_ELIG_DSBLD_STAT_CVG_F ----------------------
12455 ---------------------------------------------------------------
12456 ---------------------------------------------------------------
12457 -- START OF BEN_ELIG_MLTRY_STAT_CVG_F ----------------------
12458 ---------------------------------------------------------------
12459 cursor c_emc_from_parent(c_DPNT_CVG_ELIGY_PRFL_ID number) is
12460 select elig_mltry_stat_cvg_id
12461 from BEN_ELIG_MLTRY_STAT_CVG_F
12462 where DPNT_CVG_ELIGY_PRFL_ID = c_DPNT_CVG_ELIGY_PRFL_ID ;
12463 --
12464 cursor c_emc(c_elig_mltry_stat_cvg_id number,c_mirror_src_entity_result_id number ,
12465 c_table_alias varchar2 ) is
12466 select emc.*
12467 from BEN_ELIG_MLTRY_STAT_CVG_F emc
12468 where emc.elig_mltry_stat_cvg_id = c_elig_mltry_stat_cvg_id
12469 -- and emc.business_group_id = p_business_group_id
12470 and not exists (
12471 select /* */ null
12472 from ben_copy_entity_results cpe
12473 -- pqh_table_route trt
12474 where copy_entity_txn_id = p_copy_entity_txn_id
12475 -- and trt.table_route_id = cpe.table_route_id
12476 and ( -- c_mirror_src_entity_result_id is null or
12477 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
12478 -- and trt.where_clause = 'BEN_ELIG_MLTRY_STAT_CVG_F'
12479 and cpe.table_alias = c_table_alias
12480 and information1 = c_elig_mltry_stat_cvg_id
12481 -- and information4 = emc.business_group_id
12482 and information2 = emc.effective_start_date
12483 and information3 = emc.effective_end_date
12484 );
12485 l_elig_mltry_stat_cvg_id number(15);
12486 l_out_emc_result_id number(15);
12487 ---------------------------------------------------------------
12488 -- END OF BEN_ELIG_MLTRY_STAT_CVG_F ----------------------
12489 ---------------------------------------------------------------
12490 ---------------------------------------------------------------
12491 -- START OF BEN_ELIG_MRTL_STAT_CVG_F ----------------------
12492 ---------------------------------------------------------------
12493 cursor c_ems_from_parent(c_DPNT_CVG_ELIGY_PRFL_ID number) is
12494 select elig_mrtl_stat_cvg_id
12495 from BEN_ELIG_MRTL_STAT_CVG_F
12496 where DPNT_CVG_ELIGY_PRFL_ID = c_DPNT_CVG_ELIGY_PRFL_ID ;
12497 --
12498 cursor c_ems(c_elig_mrtl_stat_cvg_id number,c_mirror_src_entity_result_id number ,
12499 c_table_alias varchar2 ) is
12500 select ems.*
12501 from BEN_ELIG_MRTL_STAT_CVG_F ems
12502 where ems.elig_mrtl_stat_cvg_id = c_elig_mrtl_stat_cvg_id
12503 -- and ems.business_group_id = p_business_group_id
12504 and not exists (
12505 select /* */ null
12506 from ben_copy_entity_results cpe
12507 -- pqh_table_route trt
12508 where copy_entity_txn_id = p_copy_entity_txn_id
12509 -- and trt.table_route_id = cpe.table_route_id
12510 and ( -- c_mirror_src_entity_result_id is null or
12511 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
12512 -- and trt.where_clause = 'BEN_ELIG_MRTL_STAT_CVG_F'
12513 and cpe.table_alias = c_table_alias
12514 and information1 = c_elig_mrtl_stat_cvg_id
12515 -- and information4 = ems.business_group_id
12516 and information2 = ems.effective_start_date
12517 and information3 = ems.effective_end_date
12518 );
12519 l_elig_mrtl_stat_cvg_id number(15);
12520 l_out_ems_result_id number(15);
12521 ---------------------------------------------------------------
12522 -- END OF BEN_ELIG_MRTL_STAT_CVG_F ----------------------
12523 ---------------------------------------------------------------
12524 ---------------------------------------------------------------
12525 -- START OF BEN_ELIG_PSTL_CD_R_RNG_CVG_F ----------------------
12526 ---------------------------------------------------------------
12527 cursor c_epl_from_parent(c_DPNT_CVG_ELIGY_PRFL_ID number) is
12528 select distinct elig_pstl_cd_r_rng_cvg_id
12529 from BEN_ELIG_PSTL_CD_R_RNG_CVG_F
12530 where DPNT_CVG_ELIGY_PRFL_ID = c_DPNT_CVG_ELIGY_PRFL_ID ;
12531 --
12532 cursor c_epl(c_elig_pstl_cd_r_rng_cvg_id number,c_mirror_src_entity_result_id number ,
12533 c_table_alias varchar2 ) is
12534 select epl.*
12535 from BEN_ELIG_PSTL_CD_R_RNG_CVG_F epl
12536 where epl.elig_pstl_cd_r_rng_cvg_id = c_elig_pstl_cd_r_rng_cvg_id
12537 -- and epl.business_group_id = p_business_group_id
12538 and not exists (
12539 select /* */ null
12540 from ben_copy_entity_results cpe
12541 -- pqh_table_route trt
12542 where copy_entity_txn_id = p_copy_entity_txn_id
12543 -- and trt.table_route_id = cpe.table_route_id
12544 and ( -- c_mirror_src_entity_result_id is null or
12545 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
12546 -- and trt.where_clause = 'BEN_ELIG_PSTL_CD_R_RNG_CVG_F'
12547 and cpe.table_alias = c_table_alias
12548 and information1 = c_elig_pstl_cd_r_rng_cvg_id
12549 -- and information4 = epl.business_group_id
12550 and information2 = epl.effective_start_date
12551 and information3 = epl.effective_end_date
12552 );
12553 l_elig_pstl_cd_r_rng_cvg_id number(15);
12554 l_out_epl_result_id number(15);
12555 --
12556 cursor c_epl_pstl(c_elig_pstl_cd_r_rng_cvg_id number,c_mirror_src_entity_result_id number ,
12557 c_table_alias varchar2 ) is
12558 select distinct cpe.information245 pstl_zip_rng_id
12559 from ben_copy_entity_results cpe
12560 -- pqh_table_route trt
12561 where copy_entity_txn_id = p_copy_entity_txn_id
12562 -- and trt.table_route_id = cpe.table_route_id
12563 and mirror_src_entity_result_id = c_mirror_src_entity_result_id
12564 -- and trt.where_clause = 'BEN_ELIG_PSTL_CD_R_RNG_CVG_F'
12565 and cpe.table_alias = c_table_alias
12566 and information1 = c_elig_pstl_cd_r_rng_cvg_id
12567 -- and information4 = p_business_group_id
12568 ;
12569 ---------------------------------------------------------------
12570 -- END OF BEN_ELIG_PSTL_CD_R_RNG_CVG_F ----------------------
12571 ---------------------------------------------------------------
12572 ---------------------------------------------------------------
12573 -- START OF BEN_ELIG_STDNT_STAT_CVG_F ----------------------
12574 ---------------------------------------------------------------
12575 cursor c_esc_from_parent(c_DPNT_CVG_ELIGY_PRFL_ID number) is
12576 select elig_stdnt_stat_cvg_id
12577 from BEN_ELIG_STDNT_STAT_CVG_F
12578 where DPNT_CVG_ELIGY_PRFL_ID = c_DPNT_CVG_ELIGY_PRFL_ID ;
12579 --
12580 cursor c_esc(c_elig_stdnt_stat_cvg_id number,c_mirror_src_entity_result_id number ,
12581 c_table_alias varchar2 ) is
12582 select esc.*
12583 from BEN_ELIG_STDNT_STAT_CVG_F esc
12584 where esc.elig_stdnt_stat_cvg_id = c_elig_stdnt_stat_cvg_id
12585 -- and esc.business_group_id = p_business_group_id
12586 and not exists (
12587 select /* */ null
12588 from ben_copy_entity_results cpe
12589 -- pqh_table_route trt
12590 where copy_entity_txn_id = p_copy_entity_txn_id
12591 -- and trt.table_route_id = cpe.table_route_id
12592 and ( -- c_mirror_src_entity_result_id is null or
12593 mirror_src_entity_result_id = c_mirror_src_entity_result_id )
12594 -- and trt.where_clause = 'BEN_ELIG_STDNT_STAT_CVG_F'
12595 and cpe.table_alias = c_table_alias
12596 and information1 = c_elig_stdnt_stat_cvg_id
12597 -- and information4 = esc.business_group_id
12598 and information2 = esc.effective_start_date
12599 and information3 = esc.effective_end_date
12600 );
12601 l_elig_stdnt_stat_cvg_id number(15);
12602 l_out_esc_result_id number(15);
12603 ---------------------------------------------------------------
12604 -- END OF BEN_ELIG_STDNT_STAT_CVG_F ----------------------
12605 ---------------------------------------------------------------
12606
12607 cursor c_object_exists(c_pk_id number,
12608 c_table_alias varchar2) is
12609 select null
12610 from ben_copy_entity_results cpe
12611 -- pqh_table_route trt
12612 where copy_entity_txn_id = p_copy_entity_txn_id
12613 -- and trt.table_route_id = cpe.table_route_id
12614 and cpe.table_alias = c_table_alias
12615 and information1 = c_pk_id;
12616
12617 l_dummy varchar2(1);
12618
12619 l_mirror_src_entity_result_id number(15);
12620 l_table_route_id number(15);
12621 l_result_type_cd varchar2(30);
12622 l_information5 ben_copy_entity_results.information5%type;
12623 l_number_of_copies number(15);
12624
12625 begin
12626
12627 if p_no_dup_rslt = ben_plan_design_program_module.g_pdw_no_dup_rslt then
12628 ben_plan_design_program_module.g_pdw_allow_dup_rslt := ben_plan_design_program_module.g_pdw_no_dup_rslt;
12629 end if;
12630
12631 if ben_plan_design_program_module.g_pdw_allow_dup_rslt = ben_plan_design_program_module.g_pdw_no_dup_rslt then
12632 open c_object_exists(p_dpnt_cvg_eligy_prfl_id,'DCE');
12633 fetch c_object_exists into l_dummy;
12634 if c_object_exists%found then
12635 close c_object_exists;
12636 return;
12637 end if;
12638 close c_object_exists;
12639 end if;
12640
12641 l_number_of_copies := p_number_of_copies ;
12642 l_mirror_src_entity_result_id := p_mirror_src_entity_result_id;
12643 l_dpnt_cvg_eligy_prfl_id := p_dpnt_cvg_eligy_prfl_id ;
12644
12645 ---------------------------------------------------------------
12646 -- START OF BEN_DPNT_CVG_ELIGY_PRFL_F ----------------------
12647 ---------------------------------------------------------------
12648 --
12649 for l_dce_rec in c_dce(p_dpnt_cvg_eligy_prfl_id,l_mirror_src_entity_result_id,'DCE' ) loop
12650 --
12651 l_table_route_id := null ;
12652 open ben_plan_design_program_module.g_table_route('DCE');
12653 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
12654 close ben_plan_design_program_module.g_table_route ;
12655 --
12656 l_information5 := l_dce_rec.name; --'Intersection';
12657 --
12658 if p_effective_date between l_dce_rec.effective_start_date
12659 and l_dce_rec.effective_end_date then
12660 --
12661 l_result_type_cd := 'DISPLAY';
12662 else
12663 l_result_type_cd := 'NO DISPLAY';
12664 end if;
12665 --
12666 l_copy_entity_result_id := null;
12667 l_object_version_number := null;
12668 ben_copy_entity_results_api.create_copy_entity_results(
12669 p_copy_entity_result_id => l_copy_entity_result_id,
12670 p_copy_entity_txn_id => p_copy_entity_txn_id,
12671 p_result_type_cd => l_result_type_cd,
12672 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
12673 p_parent_entity_result_id => p_parent_entity_result_id, --Result id of Pgm,Ptip,Plip or Oipl
12674 p_number_of_copies => l_number_of_copies,
12675 p_table_route_id => l_table_route_id,
12676 P_TABLE_ALIAS => 'DCE',
12677 p_information1 => l_dce_rec.dpnt_cvg_eligy_prfl_id,
12678 p_information2 => l_dce_rec.EFFECTIVE_START_DATE,
12679 p_information3 => l_dce_rec.EFFECTIVE_END_DATE,
12680 p_information4 => l_dce_rec.business_group_id,
12681 p_information5 => l_information5 , -- 9999 put name for h-grid
12682 p_information111 => l_dce_rec.dce_attribute1,
12683 p_information120 => l_dce_rec.dce_attribute10,
12684 p_information121 => l_dce_rec.dce_attribute11,
12685 p_information122 => l_dce_rec.dce_attribute12,
12686 p_information123 => l_dce_rec.dce_attribute13,
12687 p_information124 => l_dce_rec.dce_attribute14,
12688 p_information125 => l_dce_rec.dce_attribute15,
12689 p_information126 => l_dce_rec.dce_attribute16,
12690 p_information127 => l_dce_rec.dce_attribute17,
12691 p_information128 => l_dce_rec.dce_attribute18,
12692 p_information129 => l_dce_rec.dce_attribute19,
12693 p_information112 => l_dce_rec.dce_attribute2,
12694 p_information130 => l_dce_rec.dce_attribute20,
12695 p_information131 => l_dce_rec.dce_attribute21,
12696 p_information132 => l_dce_rec.dce_attribute22,
12697 p_information133 => l_dce_rec.dce_attribute23,
12698 p_information134 => l_dce_rec.dce_attribute24,
12699 p_information135 => l_dce_rec.dce_attribute25,
12700 p_information136 => l_dce_rec.dce_attribute26,
12701 p_information137 => l_dce_rec.dce_attribute27,
12702 p_information138 => l_dce_rec.dce_attribute28,
12703 p_information139 => l_dce_rec.dce_attribute29,
12704 p_information113 => l_dce_rec.dce_attribute3,
12705 p_information140 => l_dce_rec.dce_attribute30,
12706 p_information114 => l_dce_rec.dce_attribute4,
12707 p_information115 => l_dce_rec.dce_attribute5,
12708 p_information116 => l_dce_rec.dce_attribute6,
12709 p_information117 => l_dce_rec.dce_attribute7,
12710 p_information118 => l_dce_rec.dce_attribute8,
12711 p_information119 => l_dce_rec.dce_attribute9,
12712 p_information110 => l_dce_rec.dce_attribute_category,
12713 p_information185 => l_dce_rec.dce_desc,
12714 p_information13 => l_dce_rec.dpnt_age_flag,
12715 p_information257 => l_dce_rec.dpnt_cvg_elig_det_rl,
12716 p_information11 => l_dce_rec.dpnt_cvg_eligy_prfl_stat_cd,
12717 p_information19 => l_dce_rec.dpnt_cvrd_in_anthr_pl_flag,
12718 p_information15 => l_dce_rec.dpnt_dsbld_flag,
12719 p_information20 => l_dce_rec.dpnt_dsgnt_crntly_enrld_flag,
12720 p_information17 => l_dce_rec.dpnt_mltry_flag,
12721 p_information16 => l_dce_rec.dpnt_mrtl_flag,
12722 p_information18 => l_dce_rec.dpnt_pstl_flag,
12723 p_information12 => l_dce_rec.dpnt_rlshp_flag,
12724 p_information14 => l_dce_rec.dpnt_stud_flag,
12725 p_information170 => l_dce_rec.name,
12726 p_information231 => l_dce_rec.regn_id,
12727 p_information265 => l_dce_rec.object_version_number,
12728 --
12729
12730 -- END REPLACE PARAMETER LINES
12731
12732 p_object_version_number => l_object_version_number,
12733 p_effective_date => p_effective_date );
12734 --
12735
12736 if l_out_dce_result_id is null then
12737 l_out_dce_result_id := l_copy_entity_result_id;
12738 end if;
12739
12740 if l_result_type_cd = 'DISPLAY' then
12741 l_out_dce_result_id := l_copy_entity_result_id ;
12742 end if;
12743 --
12744 --
12745 if (l_dce_rec.dpnt_cvg_elig_det_rl is not null) then
12746 ben_plan_design_program_module.create_formula_result(
12747 p_validate => p_validate
12748 ,p_copy_entity_result_id => l_copy_entity_result_id
12749 ,p_copy_entity_txn_id => p_copy_entity_txn_id
12750 ,p_formula_id => l_dce_rec.dpnt_cvg_elig_det_rl
12751 ,p_business_group_id => l_dce_rec.business_group_id
12752 ,p_number_of_copies => l_number_of_copies
12753 ,p_object_version_number => l_object_version_number
12754 ,p_effective_date => p_effective_date);
12755 end if;
12756 --
12757 end loop;
12758
12759 -- Create criteria only if Dependent Eligibility profile row
12760 -- has been created
12761 --
12762
12763 if l_out_dce_result_id is not null then
12764 ---------------------------------------------------------------
12765 -- START OF BEN_DPNT_CVG_RQD_RLSHP_F ----------------------
12766 ---------------------------------------------------------------
12767 --
12768 for l_parent_rec in c_dcr_from_parent(l_DPNT_CVG_ELIGY_PRFL_ID) loop
12769 --
12770 l_mirror_src_entity_result_id := l_out_dce_result_id ;
12771 --
12772 l_dpnt_cvg_rqd_rlshp_id := l_parent_rec.dpnt_cvg_rqd_rlshp_id ;
12773 --
12774 for l_dcr_rec in c_dcr(l_parent_rec.dpnt_cvg_rqd_rlshp_id,l_mirror_src_entity_result_id,'DCR' ) loop
12775 --
12776 l_table_route_id := null ;
12777 open ben_plan_design_program_module.g_table_route('DCR');
12778 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
12779 close ben_plan_design_program_module.g_table_route ;
12780 --
12781 l_information5 := hr_general.decode_lookup('CONTACT',l_dcr_rec.per_relshp_typ_cd);
12782 --'Intersection';
12783 --
12784 if p_effective_date between l_dcr_rec.effective_start_date
12785 and l_dcr_rec.effective_end_date then
12786 --
12787 l_result_type_cd := 'DISPLAY';
12788 else
12789 l_result_type_cd := 'NO DISPLAY';
12790 end if;
12791 --
12792 l_copy_entity_result_id := null;
12793 l_object_version_number := null;
12794 ben_copy_entity_results_api.create_copy_entity_results(
12795 p_copy_entity_result_id => l_copy_entity_result_id,
12796 p_copy_entity_txn_id => p_copy_entity_txn_id,
12797 p_result_type_cd => l_result_type_cd,
12798 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
12799 p_parent_entity_result_id => l_mirror_src_entity_result_id,
12800 p_number_of_copies => l_number_of_copies,
12801 p_table_route_id => l_table_route_id,
12802 P_TABLE_ALIAS => 'DCR',
12803 p_information1 => l_dcr_rec.dpnt_cvg_rqd_rlshp_id,
12804 p_information2 => l_dcr_rec.EFFECTIVE_START_DATE,
12805 p_information3 => l_dcr_rec.EFFECTIVE_END_DATE,
12806 p_information4 => l_dcr_rec.business_group_id,
12807 p_information5 => l_information5 ,
12808 p_information12 => l_dcr_rec.cvg_strt_dt_cd,
12809 p_information258 => l_dcr_rec.cvg_strt_dt_rl,
12810 p_information13 => l_dcr_rec.cvg_thru_dt_cd,
12811 p_information257 => l_dcr_rec.cvg_thru_dt_rl,
12812 p_information111 => l_dcr_rec.dcr_attribute1,
12813 p_information120 => l_dcr_rec.dcr_attribute10,
12814 p_information121 => l_dcr_rec.dcr_attribute11,
12815 p_information122 => l_dcr_rec.dcr_attribute12,
12816 p_information123 => l_dcr_rec.dcr_attribute13,
12817 p_information124 => l_dcr_rec.dcr_attribute14,
12818 p_information125 => l_dcr_rec.dcr_attribute15,
12819 p_information126 => l_dcr_rec.dcr_attribute16,
12820 p_information127 => l_dcr_rec.dcr_attribute17,
12821 p_information128 => l_dcr_rec.dcr_attribute18,
12822 p_information129 => l_dcr_rec.dcr_attribute19,
12823 p_information112 => l_dcr_rec.dcr_attribute2,
12824 p_information130 => l_dcr_rec.dcr_attribute20,
12825 p_information131 => l_dcr_rec.dcr_attribute21,
12826 p_information132 => l_dcr_rec.dcr_attribute22,
12827 p_information133 => l_dcr_rec.dcr_attribute23,
12828 p_information134 => l_dcr_rec.dcr_attribute24,
12829 p_information135 => l_dcr_rec.dcr_attribute25,
12830 p_information136 => l_dcr_rec.dcr_attribute26,
12831 p_information137 => l_dcr_rec.dcr_attribute27,
12832 p_information138 => l_dcr_rec.dcr_attribute28,
12833 p_information139 => l_dcr_rec.dcr_attribute29,
12834 p_information113 => l_dcr_rec.dcr_attribute3,
12835 p_information140 => l_dcr_rec.dcr_attribute30,
12836 p_information114 => l_dcr_rec.dcr_attribute4,
12837 p_information115 => l_dcr_rec.dcr_attribute5,
12838 p_information116 => l_dcr_rec.dcr_attribute6,
12839 p_information117 => l_dcr_rec.dcr_attribute7,
12840 p_information118 => l_dcr_rec.dcr_attribute8,
12841 p_information119 => l_dcr_rec.dcr_attribute9,
12842 p_information110 => l_dcr_rec.dcr_attribute_category,
12843 p_information255 => l_dcr_rec.dpnt_cvg_eligy_prfl_id,
12844 p_information11 => l_dcr_rec.per_relshp_typ_cd,
12845 p_information265 => l_dcr_rec.object_version_number,
12846 --
12847
12848 -- END REPLACE PARAMETER LINES
12849
12850 p_object_version_number => l_object_version_number,
12851 p_effective_date => p_effective_date );
12852 --
12853
12854 if l_out_dcr_result_id is null then
12855 l_out_dcr_result_id := l_copy_entity_result_id;
12856 end if;
12857
12858 if l_result_type_cd = 'DISPLAY' then
12859 l_out_dcr_result_id := l_copy_entity_result_id ;
12860 end if;
12861 --
12862 if (l_dcr_rec.cvg_strt_dt_rl is not null) then
12863 ben_plan_design_program_module.create_formula_result(
12864 p_validate => p_validate
12865 ,p_copy_entity_result_id => l_copy_entity_result_id
12866 ,p_copy_entity_txn_id => p_copy_entity_txn_id
12867 ,p_formula_id => l_dcr_rec.cvg_strt_dt_rl
12868 ,p_business_group_id => l_dcr_rec.business_group_id
12869 ,p_number_of_copies => l_number_of_copies
12870 ,p_object_version_number => l_object_version_number
12871 ,p_effective_date => p_effective_date);
12872 end if;
12873
12874 if (l_dcr_rec.cvg_thru_dt_rl is not null) then
12875 ben_plan_design_program_module.create_formula_result(
12876 p_validate => p_validate
12877 ,p_copy_entity_result_id => l_copy_entity_result_id
12878 ,p_copy_entity_txn_id => p_copy_entity_txn_id
12879 ,p_formula_id => l_dcr_rec.cvg_thru_dt_rl
12880 ,p_business_group_id => l_dcr_rec.business_group_id
12881 ,p_number_of_copies => l_number_of_copies
12882 ,p_object_version_number => l_object_version_number
12883 ,p_effective_date => p_effective_date);
12884 end if;
12885
12886 --
12887 end loop;
12888 --
12889 end loop;
12890 ---------------------------------------------------------------
12891 -- END OF BEN_DPNT_CVG_RQD_RLSHP_F ----------------------
12892 ---------------------------------------------------------------
12893 ---------------------------------------------------------------
12894 -- START OF BEN_DPNT_CVRD_ANTHR_PL_CVG_F ----------------------
12895 ---------------------------------------------------------------
12896 --
12897 for l_parent_rec in c_dpc_from_parent(l_DPNT_CVG_ELIGY_PRFL_ID) loop
12898 --
12899 l_mirror_src_entity_result_id := l_out_dce_result_id ;
12900 --
12901 l_dpnt_cvrd_anthr_pl_cvg_id := l_parent_rec.dpnt_cvrd_anthr_pl_cvg_id ;
12902 --
12903 for l_dpc_rec in c_dpc(l_parent_rec.dpnt_cvrd_anthr_pl_cvg_id,l_mirror_src_entity_result_id,'DPC' ) loop
12904 --
12905 l_table_route_id := null ;
12906 open ben_plan_design_program_module.g_table_route('DPC');
12907 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
12908 close ben_plan_design_program_module.g_table_route ;
12909 --
12910 l_information5 := ben_plan_design_program_module.get_pl_name(l_dpc_rec.pl_id
12911 ,p_effective_date)
12912 || ben_plan_design_program_module.get_exclude_message(l_dpc_rec.excld_flag);
12913 --'Intersection';
12914 --
12915 if p_effective_date between l_dpc_rec.effective_start_date
12916 and l_dpc_rec.effective_end_date then
12917 --
12918 l_result_type_cd := 'DISPLAY';
12919 else
12920 l_result_type_cd := 'NO DISPLAY';
12921 end if;
12922 --
12923 l_copy_entity_result_id := null;
12924 l_object_version_number := null;
12925 ben_copy_entity_results_api.create_copy_entity_results(
12926 p_copy_entity_result_id => l_copy_entity_result_id,
12927 p_copy_entity_txn_id => p_copy_entity_txn_id,
12928 p_result_type_cd => l_result_type_cd,
12929 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
12930 p_parent_entity_result_id => l_mirror_src_entity_result_id,
12931 p_number_of_copies => l_number_of_copies,
12932 p_table_route_id => l_table_route_id,
12933 P_TABLE_ALIAS => 'DPC',
12934 p_information1 => l_dpc_rec.dpnt_cvrd_anthr_pl_cvg_id,
12935 p_information2 => l_dpc_rec.EFFECTIVE_START_DATE,
12936 p_information3 => l_dpc_rec.EFFECTIVE_END_DATE,
12937 p_information4 => l_dpc_rec.business_group_id,
12938 p_information5 => l_information5 , -- 9999 put name for h-grid
12939 p_information12 => l_dpc_rec.cvg_det_dt_cd,
12940 p_information111 => l_dpc_rec.dpc_attribute1,
12941 p_information120 => l_dpc_rec.dpc_attribute10,
12942 p_information121 => l_dpc_rec.dpc_attribute11,
12943 p_information122 => l_dpc_rec.dpc_attribute12,
12944 p_information123 => l_dpc_rec.dpc_attribute13,
12945 p_information124 => l_dpc_rec.dpc_attribute14,
12946 p_information125 => l_dpc_rec.dpc_attribute15,
12947 p_information126 => l_dpc_rec.dpc_attribute16,
12948 p_information127 => l_dpc_rec.dpc_attribute17,
12949 p_information128 => l_dpc_rec.dpc_attribute18,
12950 p_information129 => l_dpc_rec.dpc_attribute19,
12951 p_information112 => l_dpc_rec.dpc_attribute2,
12952 p_information130 => l_dpc_rec.dpc_attribute20,
12953 p_information131 => l_dpc_rec.dpc_attribute21,
12954 p_information132 => l_dpc_rec.dpc_attribute22,
12955 p_information133 => l_dpc_rec.dpc_attribute23,
12956 p_information134 => l_dpc_rec.dpc_attribute24,
12957 p_information135 => l_dpc_rec.dpc_attribute25,
12958 p_information136 => l_dpc_rec.dpc_attribute26,
12959 p_information137 => l_dpc_rec.dpc_attribute27,
12960 p_information138 => l_dpc_rec.dpc_attribute28,
12961 p_information139 => l_dpc_rec.dpc_attribute29,
12962 p_information113 => l_dpc_rec.dpc_attribute3,
12963 p_information140 => l_dpc_rec.dpc_attribute30,
12964 p_information114 => l_dpc_rec.dpc_attribute4,
12965 p_information115 => l_dpc_rec.dpc_attribute5,
12966 p_information116 => l_dpc_rec.dpc_attribute6,
12967 p_information117 => l_dpc_rec.dpc_attribute7,
12968 p_information118 => l_dpc_rec.dpc_attribute8,
12969 p_information119 => l_dpc_rec.dpc_attribute9,
12970 p_information110 => l_dpc_rec.dpc_attribute_category,
12971 p_information255 => l_dpc_rec.dpnt_cvg_eligy_prfl_id,
12972 p_information11 => l_dpc_rec.excld_flag,
12973 p_information260 => l_dpc_rec.ordr_num,
12974 p_information261 => l_dpc_rec.pl_id,
12975 p_information265 => l_dpc_rec.object_version_number,
12976 --
12977
12978 -- END REPLACE PARAMETER LINES
12979
12980 p_object_version_number => l_object_version_number,
12981 p_effective_date => p_effective_date );
12982 --
12983
12984 if l_out_dpc_result_id is null then
12985 l_out_dpc_result_id := l_copy_entity_result_id;
12986 end if;
12987
12988 if l_result_type_cd = 'DISPLAY' then
12989 l_out_dpc_result_id := l_copy_entity_result_id ;
12990 end if;
12991 --
12992 end loop;
12993 --
12994 end loop;
12995 ---------------------------------------------------------------
12996 -- END OF BEN_DPNT_CVRD_ANTHR_PL_CVG_F ----------------------
12997 ---------------------------------------------------------------
12998 ---------------------------------------------------------------
12999 -- START OF BEN_DSGNTR_ENRLD_CVG_F ----------------------
13000 ---------------------------------------------------------------
13001 --
13002 for l_parent_rec in c_dec_from_parent(l_DPNT_CVG_ELIGY_PRFL_ID) loop
13003 --
13004 l_mirror_src_entity_result_id := l_out_dce_result_id ;
13005 --
13006 l_dsgntr_enrld_cvg_id := l_parent_rec.dsgntr_enrld_cvg_id ;
13007 --
13008 for l_dec_rec in c_dec(l_parent_rec.dsgntr_enrld_cvg_id,l_mirror_src_entity_result_id,'DEC' ) loop
13009 --
13010 l_table_route_id := null ;
13011 open ben_plan_design_program_module.g_table_route('DEC');
13012 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
13013 close ben_plan_design_program_module.g_table_route ;
13014 --
13015 l_information5 := hr_general.decode_lookup('YES_NO',l_dec_rec.dsgntr_crntly_enrld_flag);
13016 --'Intersection';
13017 --
13018 if p_effective_date between l_dec_rec.effective_start_date
13019 and l_dec_rec.effective_end_date then
13020 --
13021 l_result_type_cd := 'DISPLAY';
13022 else
13023 l_result_type_cd := 'NO DISPLAY';
13024 end if;
13025 --
13026 l_copy_entity_result_id := null;
13027 l_object_version_number := null;
13028 ben_copy_entity_results_api.create_copy_entity_results(
13029 p_copy_entity_result_id => l_copy_entity_result_id,
13030 p_copy_entity_txn_id => p_copy_entity_txn_id,
13031 p_result_type_cd => l_result_type_cd,
13032 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
13033 p_parent_entity_result_id => l_mirror_src_entity_result_id,
13034 p_number_of_copies => l_number_of_copies,
13035 p_table_route_id => l_table_route_id,
13036 P_TABLE_ALIAS => 'DEC',
13037 p_information1 => l_dec_rec.dsgntr_enrld_cvg_id,
13038 p_information2 => l_dec_rec.EFFECTIVE_START_DATE,
13039 p_information3 => l_dec_rec.EFFECTIVE_END_DATE,
13040 p_information4 => l_dec_rec.business_group_id,
13041 p_information5 => l_information5 , -- 9999 put name for h-grid
13042 p_information111 => l_dec_rec.dec_attribute1,
13043 p_information120 => l_dec_rec.dec_attribute10,
13044 p_information121 => l_dec_rec.dec_attribute11,
13045 p_information122 => l_dec_rec.dec_attribute12,
13046 p_information123 => l_dec_rec.dec_attribute13,
13047 p_information124 => l_dec_rec.dec_attribute14,
13048 p_information125 => l_dec_rec.dec_attribute15,
13049 p_information126 => l_dec_rec.dec_attribute16,
13050 p_information127 => l_dec_rec.dec_attribute17,
13051 p_information128 => l_dec_rec.dec_attribute18,
13052 p_information129 => l_dec_rec.dec_attribute19,
13053 p_information112 => l_dec_rec.dec_attribute2,
13054 p_information130 => l_dec_rec.dec_attribute20,
13055 p_information131 => l_dec_rec.dec_attribute21,
13056 p_information132 => l_dec_rec.dec_attribute22,
13057 p_information133 => l_dec_rec.dec_attribute23,
13058 p_information134 => l_dec_rec.dec_attribute24,
13059 p_information135 => l_dec_rec.dec_attribute25,
13060 p_information136 => l_dec_rec.dec_attribute26,
13061 p_information137 => l_dec_rec.dec_attribute27,
13062 p_information138 => l_dec_rec.dec_attribute28,
13063 p_information139 => l_dec_rec.dec_attribute29,
13064 p_information113 => l_dec_rec.dec_attribute3,
13065 p_information140 => l_dec_rec.dec_attribute30,
13066 p_information114 => l_dec_rec.dec_attribute4,
13067 p_information115 => l_dec_rec.dec_attribute5,
13068 p_information116 => l_dec_rec.dec_attribute6,
13069 p_information117 => l_dec_rec.dec_attribute7,
13070 p_information118 => l_dec_rec.dec_attribute8,
13071 p_information119 => l_dec_rec.dec_attribute9,
13072 p_information110 => l_dec_rec.dec_attribute_category,
13073 p_information255 => l_dec_rec.dpnt_cvg_eligy_prfl_id,
13074 p_information11 => l_dec_rec.dsgntr_crntly_enrld_flag,
13075 p_information265 => l_dec_rec.object_version_number,
13076 --
13077
13078 -- END REPLACE PARAMETER LINES
13079
13080 p_object_version_number => l_object_version_number,
13081 p_effective_date => p_effective_date );
13082 --
13083
13084 if l_out_dec_result_id is null then
13085 l_out_dec_result_id := l_copy_entity_result_id;
13086 end if;
13087
13088 if l_result_type_cd = 'DISPLAY' then
13089 l_out_dec_result_id := l_copy_entity_result_id ;
13090 end if;
13091 --
13092 end loop;
13093 --
13094 end loop;
13095 ---------------------------------------------------------------
13096 -- END OF BEN_DSGNTR_ENRLD_CVG_F ----------------------
13097 ---------------------------------------------------------------
13098 ---------------------------------------------------------------
13099 -- START OF BEN_ELIG_AGE_CVG_F ----------------------
13100 ---------------------------------------------------------------
13101 --
13102 for l_parent_rec in c_eac_from_parent(l_DPNT_CVG_ELIGY_PRFL_ID) loop
13103 --
13104 l_mirror_src_entity_result_id := l_out_dce_result_id ;
13105 --
13106 l_elig_age_cvg_id := l_parent_rec.elig_age_cvg_id ;
13107 --
13108 for l_eac_rec in c_eac(l_parent_rec.elig_age_cvg_id,l_mirror_src_entity_result_id,'EAC' ) loop
13109 --
13110 l_table_route_id := null ;
13111 open ben_plan_design_program_module.g_table_route('EAC');
13112 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
13113 close ben_plan_design_program_module.g_table_route ;
13114 --
13115 l_information5 := ben_plan_design_program_module.get_age_fctr_name(l_eac_rec.age_fctr_id)
13116 || ben_plan_design_program_module.get_exclude_message(l_eac_rec.excld_flag);
13117 --'Intersection';
13118 --
13119 if p_effective_date between l_eac_rec.effective_start_date
13120 and l_eac_rec.effective_end_date then
13121 --
13122 l_result_type_cd := 'DISPLAY';
13123 else
13124 l_result_type_cd := 'NO DISPLAY';
13125 end if;
13126 --
13127 l_copy_entity_result_id := null;
13128 l_object_version_number := null;
13129 ben_copy_entity_results_api.create_copy_entity_results(
13130 p_copy_entity_result_id => l_copy_entity_result_id,
13131 p_copy_entity_txn_id => p_copy_entity_txn_id,
13132 p_result_type_cd => l_result_type_cd,
13133 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
13134 p_parent_entity_result_id => l_mirror_src_entity_result_id,
13135 p_number_of_copies => l_number_of_copies,
13136 p_table_route_id => l_table_route_id,
13137 P_TABLE_ALIAS => 'EAC',
13138 p_information1 => l_eac_rec.elig_age_cvg_id,
13139 p_information2 => l_eac_rec.EFFECTIVE_START_DATE,
13140 p_information3 => l_eac_rec.EFFECTIVE_END_DATE,
13141 p_information4 => l_eac_rec.business_group_id,
13142 p_information5 => l_information5 , -- 9999 put name for h-grid
13143 p_information246 => l_eac_rec.age_fctr_id,
13144 p_information12 => l_eac_rec.cvg_strt_cd,
13145 p_information257 => l_eac_rec.cvg_strt_rl,
13146 p_information13 => l_eac_rec.cvg_thru_cd,
13147 p_information258 => l_eac_rec.cvg_thru_rl,
13148 p_information255 => l_eac_rec.dpnt_cvg_eligy_prfl_id,
13149 p_information111 => l_eac_rec.eac_attribute1,
13150 p_information120 => l_eac_rec.eac_attribute10,
13151 p_information121 => l_eac_rec.eac_attribute11,
13152 p_information122 => l_eac_rec.eac_attribute12,
13153 p_information123 => l_eac_rec.eac_attribute13,
13154 p_information124 => l_eac_rec.eac_attribute14,
13155 p_information125 => l_eac_rec.eac_attribute15,
13156 p_information126 => l_eac_rec.eac_attribute16,
13157 p_information127 => l_eac_rec.eac_attribute17,
13158 p_information128 => l_eac_rec.eac_attribute18,
13159 p_information129 => l_eac_rec.eac_attribute19,
13160 p_information112 => l_eac_rec.eac_attribute2,
13161 p_information130 => l_eac_rec.eac_attribute20,
13162 p_information131 => l_eac_rec.eac_attribute21,
13163 p_information132 => l_eac_rec.eac_attribute22,
13164 p_information133 => l_eac_rec.eac_attribute23,
13165 p_information134 => l_eac_rec.eac_attribute24,
13166 p_information135 => l_eac_rec.eac_attribute25,
13167 p_information136 => l_eac_rec.eac_attribute26,
13168 p_information137 => l_eac_rec.eac_attribute27,
13169 p_information138 => l_eac_rec.eac_attribute28,
13170 p_information139 => l_eac_rec.eac_attribute29,
13171 p_information113 => l_eac_rec.eac_attribute3,
13172 p_information140 => l_eac_rec.eac_attribute30,
13173 p_information114 => l_eac_rec.eac_attribute4,
13174 p_information115 => l_eac_rec.eac_attribute5,
13175 p_information116 => l_eac_rec.eac_attribute6,
13176 p_information117 => l_eac_rec.eac_attribute7,
13177 p_information118 => l_eac_rec.eac_attribute8,
13178 p_information119 => l_eac_rec.eac_attribute9,
13179 p_information110 => l_eac_rec.eac_attribute_category,
13180 p_information11 => l_eac_rec.excld_flag,
13181 p_information265 => l_eac_rec.object_version_number,
13182 --
13183
13184 -- END REPLACE PARAMETER LINES
13185
13186 p_object_version_number => l_object_version_number,
13187 p_effective_date => p_effective_date );
13188 --
13189
13190 if l_out_eac_result_id is null then
13191 l_out_eac_result_id := l_copy_entity_result_id;
13192 end if;
13193
13194 if l_result_type_cd = 'DISPLAY' then
13195 l_out_eac_result_id := l_copy_entity_result_id ;
13196 end if;
13197 --
13198 if (l_eac_rec.cvg_strt_rl is not null) then
13199 ben_plan_design_program_module.create_formula_result(
13200 p_validate => p_validate
13201 ,p_copy_entity_result_id => l_copy_entity_result_id
13202 ,p_copy_entity_txn_id => p_copy_entity_txn_id
13203 ,p_formula_id => l_eac_rec.cvg_strt_rl
13204 ,p_business_group_id => l_eac_rec.business_group_id
13205 ,p_number_of_copies => l_number_of_copies
13206 ,p_object_version_number => l_object_version_number
13207 ,p_effective_date => p_effective_date);
13208 end if;
13209
13210 if (l_eac_rec.cvg_thru_rl is not null) then
13211 ben_plan_design_program_module.create_formula_result(
13212 p_validate => p_validate
13213 ,p_copy_entity_result_id => l_copy_entity_result_id
13214 ,p_copy_entity_txn_id => p_copy_entity_txn_id
13215 ,p_formula_id => l_eac_rec.cvg_thru_rl
13216 ,p_business_group_id => l_eac_rec.business_group_id
13217 ,p_number_of_copies => l_number_of_copies
13218 ,p_object_version_number => l_object_version_number
13219 ,p_effective_date => p_effective_date);
13220 end if;
13221 --
13222 end loop;
13223 --
13224 for l_eac_rec in c_eac_drp(l_parent_rec.elig_age_cvg_id,l_mirror_src_entity_result_id,'EAC' ) loop
13225 ben_pd_rate_and_cvg_module.create_drpar_results
13226 (
13227 p_validate => p_validate
13228 ,p_copy_entity_result_id => l_out_eac_result_id
13229 ,p_copy_entity_txn_id => p_copy_entity_txn_id
13230 ,p_comp_lvl_fctr_id => null
13231 ,p_hrs_wkd_in_perd_fctr_id => null
13232 ,p_los_fctr_id => null
13233 ,p_pct_fl_tm_fctr_id => null
13234 ,p_age_fctr_id => l_eac_rec.age_fctr_id
13235 ,p_cmbn_age_los_fctr_id => null
13236 ,p_business_group_id => p_business_group_id
13237 ,p_number_of_copies => p_number_of_copies
13238 ,p_object_version_number => l_object_version_number
13239 ,p_effective_date => p_effective_date
13240 );
13241 end loop;
13242 end loop;
13243 ---------------------------------------------------------------
13244 -- END OF BEN_ELIG_AGE_CVG_F ----------------------
13245 ---------------------------------------------------------------
13246 ---------------------------------------------------------------
13247 -- START OF BEN_ELIG_DSBLD_STAT_CVG_F ----------------------
13248 ---------------------------------------------------------------
13249 --
13250 for l_parent_rec in c_edc_from_parent(l_DPNT_CVG_ELIGY_PRFL_ID) loop
13251 --
13252 l_mirror_src_entity_result_id := l_out_dce_result_id ;
13253 --
13254 l_elig_dsbld_stat_cvg_id := l_parent_rec.elig_dsbld_stat_cvg_id ;
13255 --
13256 for l_edc_rec in c_edc(l_parent_rec.elig_dsbld_stat_cvg_id,l_mirror_src_entity_result_id,'EDC' ) loop
13257 --
13258 l_table_route_id := null ;
13259 open ben_plan_design_program_module.g_table_route('EDC');
13260 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
13261 close ben_plan_design_program_module.g_table_route ;
13262 --
13263 l_information5 := hr_general.decode_lookup('REGISTERED_DISABLED',l_edc_rec.dsbld_cd);
13264 --'Intersection';
13265 --
13266 if p_effective_date between l_edc_rec.effective_start_date
13267 and l_edc_rec.effective_end_date then
13268 --
13269 l_result_type_cd := 'DISPLAY';
13270 else
13271 l_result_type_cd := 'NO DISPLAY';
13272 end if;
13273 --
13274 l_copy_entity_result_id := null;
13275 l_object_version_number := null;
13276 ben_copy_entity_results_api.create_copy_entity_results(
13277 p_copy_entity_result_id => l_copy_entity_result_id,
13278 p_copy_entity_txn_id => p_copy_entity_txn_id,
13279 p_result_type_cd => l_result_type_cd,
13280 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
13281 p_parent_entity_result_id => l_mirror_src_entity_result_id,
13282 p_number_of_copies => l_number_of_copies,
13283 p_table_route_id => l_table_route_id,
13284 P_TABLE_ALIAS => 'EDC',
13285 p_information1 => l_edc_rec.elig_dsbld_stat_cvg_id,
13286 p_information2 => l_edc_rec.EFFECTIVE_START_DATE,
13287 p_information3 => l_edc_rec.EFFECTIVE_END_DATE,
13288 p_information4 => l_edc_rec.business_group_id,
13289 p_information5 => l_information5 , -- 9999 put name for h-grid
13290 p_information11 => l_edc_rec.cvg_strt_cd,
13291 p_information260 => l_edc_rec.cvg_strt_rl,
13292 p_information12 => l_edc_rec.cvg_thru_cd,
13293 p_information261 => l_edc_rec.cvg_thru_rl,
13294 p_information255 => l_edc_rec.dpnt_cvg_eligy_prfl_id,
13295 p_information13 => l_edc_rec.dsbld_cd,
13296 p_information111 => l_edc_rec.edc_attribute1,
13297 p_information120 => l_edc_rec.edc_attribute10,
13298 p_information121 => l_edc_rec.edc_attribute11,
13299 p_information122 => l_edc_rec.edc_attribute12,
13300 p_information123 => l_edc_rec.edc_attribute13,
13301 p_information124 => l_edc_rec.edc_attribute14,
13302 p_information125 => l_edc_rec.edc_attribute15,
13303 p_information126 => l_edc_rec.edc_attribute16,
13304 p_information127 => l_edc_rec.edc_attribute17,
13305 p_information128 => l_edc_rec.edc_attribute18,
13306 p_information129 => l_edc_rec.edc_attribute19,
13307 p_information112 => l_edc_rec.edc_attribute2,
13308 p_information130 => l_edc_rec.edc_attribute20,
13309 p_information131 => l_edc_rec.edc_attribute21,
13310 p_information132 => l_edc_rec.edc_attribute22,
13311 p_information133 => l_edc_rec.edc_attribute23,
13312 p_information134 => l_edc_rec.edc_attribute24,
13313 p_information135 => l_edc_rec.edc_attribute25,
13314 p_information136 => l_edc_rec.edc_attribute26,
13315 p_information137 => l_edc_rec.edc_attribute27,
13316 p_information138 => l_edc_rec.edc_attribute28,
13317 p_information139 => l_edc_rec.edc_attribute29,
13318 p_information113 => l_edc_rec.edc_attribute3,
13319 p_information140 => l_edc_rec.edc_attribute30,
13320 p_information114 => l_edc_rec.edc_attribute4,
13321 p_information115 => l_edc_rec.edc_attribute5,
13322 p_information116 => l_edc_rec.edc_attribute6,
13323 p_information117 => l_edc_rec.edc_attribute7,
13324 p_information118 => l_edc_rec.edc_attribute8,
13325 p_information119 => l_edc_rec.edc_attribute9,
13326 p_information110 => l_edc_rec.edc_attribute_category,
13327 p_information265 => l_edc_rec.object_version_number,
13328 --
13329
13330 -- END REPLACE PARAMETER LINES
13331
13332 p_object_version_number => l_object_version_number,
13333 p_effective_date => p_effective_date );
13334 --
13335
13336 if l_out_edc_result_id is null then
13337 l_out_edc_result_id := l_copy_entity_result_id;
13338 end if;
13339
13340 if l_result_type_cd = 'DISPLAY' then
13341 l_out_edc_result_id := l_copy_entity_result_id ;
13342 end if;
13343 --
13344 if (l_edc_rec.cvg_strt_rl is not null) then
13345 ben_plan_design_program_module.create_formula_result(
13346 p_validate => p_validate
13347 ,p_copy_entity_result_id => l_copy_entity_result_id
13348 ,p_copy_entity_txn_id => p_copy_entity_txn_id
13349 ,p_formula_id => l_edc_rec.cvg_strt_rl
13350 ,p_business_group_id => l_edc_rec.business_group_id
13351 ,p_number_of_copies => l_number_of_copies
13352 ,p_object_version_number => l_object_version_number
13353 ,p_effective_date => p_effective_date);
13354 end if;
13355 --
13356 if (l_edc_rec.cvg_thru_rl is not null) then
13357 ben_plan_design_program_module.create_formula_result(
13358 p_validate => p_validate
13359 ,p_copy_entity_result_id => l_copy_entity_result_id
13360 ,p_copy_entity_txn_id => p_copy_entity_txn_id
13361 ,p_formula_id => l_edc_rec.cvg_thru_rl
13362 ,p_business_group_id => l_edc_rec.business_group_id
13363 ,p_number_of_copies => l_number_of_copies
13364 ,p_object_version_number => l_object_version_number
13365 ,p_effective_date => p_effective_date);
13366 end if;
13367 --
13368 end loop;
13369 --
13370 end loop;
13371 ---------------------------------------------------------------
13372 -- END OF BEN_ELIG_DSBLD_STAT_CVG_F ----------------------
13373 ---------------------------------------------------------------
13374 ---------------------------------------------------------------
13375 -- START OF BEN_ELIG_MLTRY_STAT_CVG_F ----------------------
13376 ---------------------------------------------------------------
13377 --
13378 for l_parent_rec in c_emc_from_parent(l_DPNT_CVG_ELIGY_PRFL_ID) loop
13379 --
13380 l_mirror_src_entity_result_id := l_out_dce_result_id ;
13381 --
13382 l_elig_mltry_stat_cvg_id := l_parent_rec.elig_mltry_stat_cvg_id ;
13383 --
13384 for l_emc_rec in c_emc(l_parent_rec.elig_mltry_stat_cvg_id,l_mirror_src_entity_result_id,'EMC' ) loop
13385 --
13386 l_table_route_id := null ;
13387 open ben_plan_design_program_module.g_table_route('EMC');
13388 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
13389 close ben_plan_design_program_module.g_table_route ;
13390 --
13391 l_information5 := hr_general.decode_lookup('YES_NO',l_emc_rec.mltry_stat_cd);
13392 --'Intersection';
13393 --
13394 if p_effective_date between l_emc_rec.effective_start_date
13395 and l_emc_rec.effective_end_date then
13396 --
13397 l_result_type_cd := 'DISPLAY';
13398 else
13399 l_result_type_cd := 'NO DISPLAY';
13400 end if;
13401 --
13402 l_copy_entity_result_id := null;
13403 l_object_version_number := null;
13404 ben_copy_entity_results_api.create_copy_entity_results(
13405 p_copy_entity_result_id => l_copy_entity_result_id,
13406 p_copy_entity_txn_id => p_copy_entity_txn_id,
13407 p_result_type_cd => l_result_type_cd,
13408 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
13409 p_parent_entity_result_id => l_mirror_src_entity_result_id,
13410 p_number_of_copies => l_number_of_copies,
13411 p_table_route_id => l_table_route_id,
13412 P_TABLE_ALIAS => 'EMC',
13413 p_information1 => l_emc_rec.elig_mltry_stat_cvg_id,
13414 p_information2 => l_emc_rec.EFFECTIVE_START_DATE,
13415 p_information3 => l_emc_rec.EFFECTIVE_END_DATE,
13416 p_information4 => l_emc_rec.business_group_id,
13417 p_information5 => l_information5 , -- 9999 put name for h-grid
13418 p_information12 => l_emc_rec.cvg_strt_cd,
13419 p_information257 => l_emc_rec.cvg_strt_rl,
13420 p_information13 => l_emc_rec.cvg_thru_cd,
13421 p_information258 => l_emc_rec.cvg_thru_rl,
13422 p_information255 => l_emc_rec.dpnt_cvg_eligy_prfl_id,
13423 p_information111 => l_emc_rec.emc_attribute1,
13424 p_information120 => l_emc_rec.emc_attribute10,
13425 p_information121 => l_emc_rec.emc_attribute11,
13426 p_information122 => l_emc_rec.emc_attribute12,
13427 p_information123 => l_emc_rec.emc_attribute13,
13428 p_information124 => l_emc_rec.emc_attribute14,
13429 p_information125 => l_emc_rec.emc_attribute15,
13430 p_information126 => l_emc_rec.emc_attribute16,
13431 p_information127 => l_emc_rec.emc_attribute17,
13432 p_information128 => l_emc_rec.emc_attribute18,
13433 p_information129 => l_emc_rec.emc_attribute19,
13434 p_information112 => l_emc_rec.emc_attribute2,
13435 p_information130 => l_emc_rec.emc_attribute20,
13436 p_information131 => l_emc_rec.emc_attribute21,
13437 p_information132 => l_emc_rec.emc_attribute22,
13438 p_information133 => l_emc_rec.emc_attribute23,
13439 p_information134 => l_emc_rec.emc_attribute24,
13440 p_information135 => l_emc_rec.emc_attribute25,
13441 p_information136 => l_emc_rec.emc_attribute26,
13442 p_information137 => l_emc_rec.emc_attribute27,
13443 p_information138 => l_emc_rec.emc_attribute28,
13444 p_information139 => l_emc_rec.emc_attribute29,
13445 p_information113 => l_emc_rec.emc_attribute3,
13446 p_information140 => l_emc_rec.emc_attribute30,
13447 p_information114 => l_emc_rec.emc_attribute4,
13448 p_information115 => l_emc_rec.emc_attribute5,
13449 p_information116 => l_emc_rec.emc_attribute6,
13450 p_information117 => l_emc_rec.emc_attribute7,
13451 p_information118 => l_emc_rec.emc_attribute8,
13452 p_information119 => l_emc_rec.emc_attribute9,
13453 p_information110 => l_emc_rec.emc_attribute_category,
13454 p_information11 => l_emc_rec.mltry_stat_cd,
13455 p_information265 => l_emc_rec.object_version_number,
13456 --
13457
13458 -- END REPLACE PARAMETER LINES
13459
13460 p_object_version_number => l_object_version_number,
13461 p_effective_date => p_effective_date );
13462 --
13463
13464 if l_out_emc_result_id is null then
13465 l_out_emc_result_id := l_copy_entity_result_id;
13466 end if;
13467
13468 if l_result_type_cd = 'DISPLAY' then
13469 l_out_emc_result_id := l_copy_entity_result_id ;
13470 end if;
13471 --
13472 if (l_emc_rec.cvg_strt_rl is not null) then
13473 ben_plan_design_program_module.create_formula_result(
13474 p_validate => p_validate
13475 ,p_copy_entity_result_id => l_copy_entity_result_id
13476 ,p_copy_entity_txn_id => p_copy_entity_txn_id
13477 ,p_formula_id => l_emc_rec.cvg_strt_rl
13478 ,p_business_group_id => l_emc_rec.business_group_id
13479 ,p_number_of_copies => l_number_of_copies
13480 ,p_object_version_number => l_object_version_number
13481 ,p_effective_date => p_effective_date);
13482 end if;
13483
13484 if (l_emc_rec.cvg_thru_rl is not null) then
13485 ben_plan_design_program_module.create_formula_result(
13486 p_validate => p_validate
13487 ,p_copy_entity_result_id => l_copy_entity_result_id
13488 ,p_copy_entity_txn_id => p_copy_entity_txn_id
13489 ,p_formula_id => l_emc_rec.cvg_thru_rl
13490 ,p_business_group_id => l_emc_rec.business_group_id
13491 ,p_number_of_copies => l_number_of_copies
13492 ,p_object_version_number => l_object_version_number
13493 ,p_effective_date => p_effective_date);
13494 end if;
13495
13496
13497 --
13498 end loop;
13499 --
13500 end loop;
13501 ---------------------------------------------------------------
13502 -- END OF BEN_ELIG_MLTRY_STAT_CVG_F ----------------------
13503 ---------------------------------------------------------------
13504 ---------------------------------------------------------------
13505 -- START OF BEN_ELIG_MRTL_STAT_CVG_F ----------------------
13506 ---------------------------------------------------------------
13507 --
13508 for l_parent_rec in c_ems_from_parent(l_DPNT_CVG_ELIGY_PRFL_ID) loop
13509 --
13510 l_mirror_src_entity_result_id := l_out_dce_result_id ;
13511 --
13512 l_elig_mrtl_stat_cvg_id := l_parent_rec.elig_mrtl_stat_cvg_id ;
13513 --
13514 for l_ems_rec in c_ems(l_parent_rec.elig_mrtl_stat_cvg_id,l_mirror_src_entity_result_id,'EMS' ) loop
13515 --
13516 l_table_route_id := null ;
13517 open ben_plan_design_program_module.g_table_route('EMS');
13518 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
13519 close ben_plan_design_program_module.g_table_route ;
13520 --
13521 l_information5 := hr_general.decode_lookup('MAR_STATUS',l_ems_rec.mrtl_stat_cd);
13522 --'Intersection';
13523 --
13524 if p_effective_date between l_ems_rec.effective_start_date
13525 and l_ems_rec.effective_end_date then
13526 --
13527 l_result_type_cd := 'DISPLAY';
13528 else
13529 l_result_type_cd := 'NO DISPLAY';
13530 end if;
13531 --
13532 l_copy_entity_result_id := null;
13533 l_object_version_number := null;
13534 ben_copy_entity_results_api.create_copy_entity_results(
13535 p_copy_entity_result_id => l_copy_entity_result_id,
13536 p_copy_entity_txn_id => p_copy_entity_txn_id,
13537 p_result_type_cd => l_result_type_cd,
13538 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
13539 p_parent_entity_result_id => l_mirror_src_entity_result_id,
13540 p_number_of_copies => l_number_of_copies,
13541 p_table_route_id => l_table_route_id,
13542 P_TABLE_ALIAS => 'EMS',
13543 p_information1 => l_ems_rec.elig_mrtl_stat_cvg_id,
13544 p_information2 => l_ems_rec.EFFECTIVE_START_DATE,
13545 p_information3 => l_ems_rec.EFFECTIVE_END_DATE,
13546 p_information4 => l_ems_rec.business_group_id,
13547 p_information5 => l_information5 , -- 9999 put name for h-grid
13548 p_information12 => l_ems_rec.cvg_strt_cd,
13549 p_information258 => l_ems_rec.cvg_strt_rl,
13550 p_information13 => l_ems_rec.cvg_thru_cd,
13551 p_information259 => l_ems_rec.cvg_thru_rl,
13552 p_information255 => l_ems_rec.dpnt_cvg_eligy_prfl_id,
13553 p_information111 => l_ems_rec.ems_attribute1,
13554 p_information120 => l_ems_rec.ems_attribute10,
13555 p_information121 => l_ems_rec.ems_attribute11,
13556 p_information122 => l_ems_rec.ems_attribute12,
13557 p_information123 => l_ems_rec.ems_attribute13,
13558 p_information124 => l_ems_rec.ems_attribute14,
13559 p_information125 => l_ems_rec.ems_attribute15,
13560 p_information126 => l_ems_rec.ems_attribute16,
13561 p_information127 => l_ems_rec.ems_attribute17,
13562 p_information128 => l_ems_rec.ems_attribute18,
13563 p_information129 => l_ems_rec.ems_attribute19,
13564 p_information112 => l_ems_rec.ems_attribute2,
13565 p_information130 => l_ems_rec.ems_attribute20,
13566 p_information131 => l_ems_rec.ems_attribute21,
13567 p_information132 => l_ems_rec.ems_attribute22,
13568 p_information133 => l_ems_rec.ems_attribute23,
13569 p_information134 => l_ems_rec.ems_attribute24,
13570 p_information135 => l_ems_rec.ems_attribute25,
13571 p_information136 => l_ems_rec.ems_attribute26,
13572 p_information137 => l_ems_rec.ems_attribute27,
13573 p_information138 => l_ems_rec.ems_attribute28,
13574 p_information139 => l_ems_rec.ems_attribute29,
13575 p_information113 => l_ems_rec.ems_attribute3,
13576 p_information140 => l_ems_rec.ems_attribute30,
13577 p_information114 => l_ems_rec.ems_attribute4,
13578 p_information115 => l_ems_rec.ems_attribute5,
13579 p_information116 => l_ems_rec.ems_attribute6,
13580 p_information117 => l_ems_rec.ems_attribute7,
13581 p_information118 => l_ems_rec.ems_attribute8,
13582 p_information119 => l_ems_rec.ems_attribute9,
13583 p_information110 => l_ems_rec.ems_attribute_category,
13584 p_information11 => l_ems_rec.mrtl_stat_cd,
13585 p_information265 => l_ems_rec.object_version_number,
13586 --
13587
13588 -- END REPLACE PARAMETER LINES
13589
13590 p_object_version_number => l_object_version_number,
13591 p_effective_date => p_effective_date );
13592 --
13593
13594 if l_out_ems_result_id is null then
13595 l_out_ems_result_id := l_copy_entity_result_id;
13596 end if;
13597
13598 if l_result_type_cd = 'DISPLAY' then
13599 l_out_ems_result_id := l_copy_entity_result_id ;
13600 end if;
13601 --
13602 if (l_ems_rec.cvg_strt_rl is not null) then
13603 ben_plan_design_program_module.create_formula_result(
13604 p_validate => p_validate
13605 ,p_copy_entity_result_id => l_copy_entity_result_id
13606 ,p_copy_entity_txn_id => p_copy_entity_txn_id
13607 ,p_formula_id => l_ems_rec.cvg_strt_rl
13608 ,p_business_group_id => l_ems_rec.business_group_id
13609 ,p_number_of_copies => l_number_of_copies
13610 ,p_object_version_number => l_object_version_number
13611 ,p_effective_date => p_effective_date);
13612 end if;
13613
13614 if (l_ems_rec.cvg_thru_rl is not null) then
13615 ben_plan_design_program_module.create_formula_result(
13616 p_validate => p_validate
13617 ,p_copy_entity_result_id => l_copy_entity_result_id
13618 ,p_copy_entity_txn_id => p_copy_entity_txn_id
13619 ,p_formula_id => l_ems_rec.cvg_thru_rl
13620 ,p_business_group_id => l_ems_rec.business_group_id
13621 ,p_number_of_copies => l_number_of_copies
13622 ,p_object_version_number => l_object_version_number
13623 ,p_effective_date => p_effective_date);
13624 end if;
13625
13626 --
13627 end loop;
13628 --
13629 end loop;
13630 ---------------------------------------------------------------
13631 -- END OF BEN_ELIG_MRTL_STAT_CVG_F ----------------------
13632 ---------------------------------------------------------------
13633 ---------------------------------------------------------------
13634 -- START OF BEN_ELIG_PSTL_CD_R_RNG_CVG_F ----------------------
13635 ---------------------------------------------------------------
13636 --
13637 for l_parent_rec in c_epl_from_parent(l_DPNT_CVG_ELIGY_PRFL_ID) loop
13638 --
13639 l_mirror_src_entity_result_id := l_out_dce_result_id ;
13640 --
13641 l_elig_pstl_cd_r_rng_cvg_id := l_parent_rec.elig_pstl_cd_r_rng_cvg_id ;
13642 --
13643 for l_epl_rec in c_epl(l_parent_rec.elig_pstl_cd_r_rng_cvg_id,l_mirror_src_entity_result_id,'EPL' ) loop
13644 --
13645 l_table_route_id := null ;
13646 open ben_plan_design_program_module.g_table_route('EPL');
13647 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
13648 close ben_plan_design_program_module.g_table_route ;
13649 --
13650 l_information5 := ben_plan_design_program_module.get_pstl_zip_rng_name(l_epl_rec.pstl_zip_rng_id
13651 ,p_effective_date)
13652 || ben_plan_design_program_module.get_exclude_message(l_epl_rec.excld_flag);
13653 --'Intersection';
13654 --
13655 if p_effective_date between l_epl_rec.effective_start_date
13656 and l_epl_rec.effective_end_date then
13657 --
13658 l_result_type_cd := 'DISPLAY';
13659 else
13660 l_result_type_cd := 'NO DISPLAY';
13661 end if;
13662 --
13663 l_copy_entity_result_id := null;
13664 l_object_version_number := null;
13665 ben_copy_entity_results_api.create_copy_entity_results(
13666 p_copy_entity_result_id => l_copy_entity_result_id,
13667 p_copy_entity_txn_id => p_copy_entity_txn_id,
13668 p_result_type_cd => l_result_type_cd,
13669 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
13670 p_parent_entity_result_id => l_mirror_src_entity_result_id,
13671 p_number_of_copies => l_number_of_copies,
13672 p_table_route_id => l_table_route_id,
13673 P_TABLE_ALIAS => 'EPL',
13674 p_information1 => l_epl_rec.elig_pstl_cd_r_rng_cvg_id,
13675 p_information2 => l_epl_rec.EFFECTIVE_START_DATE,
13676 p_information3 => l_epl_rec.EFFECTIVE_END_DATE,
13677 p_information4 => l_epl_rec.business_group_id,
13678 p_information5 => l_information5 , -- 9999 put name for h-grid
13679 p_information255 => l_epl_rec.dpnt_cvg_eligy_prfl_id,
13680 p_information111 => l_epl_rec.epl_attribute1,
13681 p_information120 => l_epl_rec.epl_attribute10,
13682 p_information121 => l_epl_rec.epl_attribute11,
13683 p_information122 => l_epl_rec.epl_attribute12,
13684 p_information123 => l_epl_rec.epl_attribute13,
13685 p_information124 => l_epl_rec.epl_attribute14,
13686 p_information125 => l_epl_rec.epl_attribute15,
13687 p_information126 => l_epl_rec.epl_attribute16,
13688 p_information127 => l_epl_rec.epl_attribute17,
13689 p_information128 => l_epl_rec.epl_attribute18,
13690 p_information129 => l_epl_rec.epl_attribute19,
13691 p_information112 => l_epl_rec.epl_attribute2,
13692 p_information130 => l_epl_rec.epl_attribute20,
13693 p_information131 => l_epl_rec.epl_attribute21,
13694 p_information132 => l_epl_rec.epl_attribute22,
13695 p_information133 => l_epl_rec.epl_attribute23,
13696 p_information134 => l_epl_rec.epl_attribute24,
13697 p_information135 => l_epl_rec.epl_attribute25,
13698 p_information136 => l_epl_rec.epl_attribute26,
13699 p_information137 => l_epl_rec.epl_attribute27,
13700 p_information138 => l_epl_rec.epl_attribute28,
13701 p_information139 => l_epl_rec.epl_attribute29,
13702 p_information113 => l_epl_rec.epl_attribute3,
13703 p_information140 => l_epl_rec.epl_attribute30,
13704 p_information114 => l_epl_rec.epl_attribute4,
13705 p_information115 => l_epl_rec.epl_attribute5,
13706 p_information116 => l_epl_rec.epl_attribute6,
13707 p_information117 => l_epl_rec.epl_attribute7,
13708 p_information118 => l_epl_rec.epl_attribute8,
13709 p_information119 => l_epl_rec.epl_attribute9,
13710 p_information110 => l_epl_rec.epl_attribute_category,
13711 p_information11 => l_epl_rec.excld_flag,
13712 p_information260 => l_epl_rec.ordr_num,
13713 p_information245 => l_epl_rec.pstl_zip_rng_id,
13714 p_information265 => l_epl_rec.object_version_number,
13715 --
13716
13717 -- END REPLACE PARAMETER LINES
13718
13719 p_object_version_number => l_object_version_number,
13720 p_effective_date => p_effective_date );
13721 --
13722
13723 if l_out_epl_result_id is null then
13724 l_out_epl_result_id := l_copy_entity_result_id;
13725 end if;
13726
13727 if l_result_type_cd = 'DISPLAY' then
13728 l_out_epl_result_id := l_copy_entity_result_id ;
13729 end if;
13730 --
13731 end loop;
13732 --
13733 for l_epl_rec in c_epl_pstl(l_parent_rec.elig_pstl_cd_r_rng_cvg_id,l_mirror_src_entity_result_id,'EPL' ) loop
13734 ben_pd_rate_and_cvg_module.create_postal_results
13735 (
13736 p_validate => p_validate
13737 ,p_copy_entity_result_id => l_out_epl_result_id
13738 ,p_copy_entity_txn_id => p_copy_entity_txn_id
13739 ,p_pstl_zip_rng_id => l_epl_rec.pstl_zip_rng_id
13740 ,p_business_group_id => p_business_group_id
13741 ,p_number_of_copies => p_number_of_copies
13742 ,p_object_version_number => l_object_version_number
13743 ,p_effective_date => p_effective_date
13744 ) ;
13745 end loop;
13746 end loop;
13747 ---------------------------------------------------------------
13748 -- END OF BEN_ELIG_PSTL_CD_R_RNG_CVG_F ----------------------
13749 ---------------------------------------------------------------
13750 ---------------------------------------------------------------
13751 -- START OF BEN_ELIG_STDNT_STAT_CVG_F ----------------------
13752 ---------------------------------------------------------------
13753 --
13754 for l_parent_rec in c_esc_from_parent(l_DPNT_CVG_ELIGY_PRFL_ID) loop
13755 --
13756 l_mirror_src_entity_result_id := l_out_dce_result_id ;
13757 --
13758 l_elig_stdnt_stat_cvg_id := l_parent_rec.elig_stdnt_stat_cvg_id ;
13759 --
13760 for l_esc_rec in c_esc(l_parent_rec.elig_stdnt_stat_cvg_id,l_mirror_src_entity_result_id,'ESC' ) loop
13761 --
13762 l_table_route_id := null ;
13763 open ben_plan_design_program_module.g_table_route('ESC');
13764 fetch ben_plan_design_program_module.g_table_route into l_table_route_id ;
13765 close ben_plan_design_program_module.g_table_route ;
13766 --
13767 l_information5 := hr_general.decode_lookup('STUDENT_STATUS',l_esc_rec.stdnt_stat_cd);
13768 --'Intersection';
13769 --
13770 if p_effective_date between l_esc_rec.effective_start_date
13771 and l_esc_rec.effective_end_date then
13772 --
13773 l_result_type_cd := 'DISPLAY';
13774 else
13775 l_result_type_cd := 'NO DISPLAY';
13776 end if;
13777 --
13778 l_copy_entity_result_id := null;
13779 l_object_version_number := null;
13780 ben_copy_entity_results_api.create_copy_entity_results(
13781 p_copy_entity_result_id => l_copy_entity_result_id,
13782 p_copy_entity_txn_id => p_copy_entity_txn_id,
13783 p_result_type_cd => l_result_type_cd,
13784 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
13785 p_parent_entity_result_id => l_mirror_src_entity_result_id,
13786 p_number_of_copies => l_number_of_copies,
13787 p_table_route_id => l_table_route_id,
13788 P_TABLE_ALIAS => 'ESC',
13789 p_information1 => l_esc_rec.elig_stdnt_stat_cvg_id,
13790 p_information2 => l_esc_rec.EFFECTIVE_START_DATE,
13791 p_information3 => l_esc_rec.EFFECTIVE_END_DATE,
13792 p_information4 => l_esc_rec.business_group_id,
13793 p_information5 => l_information5 , -- 9999 put name for h-grid
13794 p_information11 => l_esc_rec.cvg_strt_cd,
13795 p_information260 => l_esc_rec.cvg_strt_rl,
13796 p_information12 => l_esc_rec.cvg_thru_cd,
13797 p_information261 => l_esc_rec.cvg_thru_rl,
13798 p_information255 => l_esc_rec.dpnt_cvg_eligy_prfl_id,
13799 p_information111 => l_esc_rec.esc_attribute1,
13800 p_information120 => l_esc_rec.esc_attribute10,
13801 p_information121 => l_esc_rec.esc_attribute11,
13802 p_information122 => l_esc_rec.esc_attribute12,
13803 p_information123 => l_esc_rec.esc_attribute13,
13804 p_information124 => l_esc_rec.esc_attribute14,
13805 p_information125 => l_esc_rec.esc_attribute15,
13806 p_information126 => l_esc_rec.esc_attribute16,
13807 p_information127 => l_esc_rec.esc_attribute17,
13808 p_information128 => l_esc_rec.esc_attribute18,
13809 p_information129 => l_esc_rec.esc_attribute19,
13810 p_information112 => l_esc_rec.esc_attribute2,
13811 p_information130 => l_esc_rec.esc_attribute20,
13812 p_information131 => l_esc_rec.esc_attribute21,
13813 p_information132 => l_esc_rec.esc_attribute22,
13814 p_information133 => l_esc_rec.esc_attribute23,
13815 p_information134 => l_esc_rec.esc_attribute24,
13816 p_information135 => l_esc_rec.esc_attribute25,
13817 p_information136 => l_esc_rec.esc_attribute26,
13818 p_information137 => l_esc_rec.esc_attribute27,
13819 p_information138 => l_esc_rec.esc_attribute28,
13820 p_information139 => l_esc_rec.esc_attribute29,
13821 p_information113 => l_esc_rec.esc_attribute3,
13822 p_information140 => l_esc_rec.esc_attribute30,
13823 p_information114 => l_esc_rec.esc_attribute4,
13824 p_information115 => l_esc_rec.esc_attribute5,
13825 p_information116 => l_esc_rec.esc_attribute6,
13826 p_information117 => l_esc_rec.esc_attribute7,
13827 p_information118 => l_esc_rec.esc_attribute8,
13828 p_information119 => l_esc_rec.esc_attribute9,
13829 p_information110 => l_esc_rec.esc_attribute_category,
13830 p_information13 => l_esc_rec.stdnt_stat_cd,
13831 p_information265 => l_esc_rec.object_version_number,
13832 --
13833
13834 -- END REPLACE PARAMETER LINES
13835
13836 p_object_version_number => l_object_version_number,
13837 p_effective_date => p_effective_date );
13838 --
13839
13840 if l_out_esc_result_id is null then
13841 l_out_esc_result_id := l_copy_entity_result_id;
13842 end if;
13843
13844 if l_result_type_cd = 'DISPLAY' then
13845 l_out_esc_result_id := l_copy_entity_result_id ;
13846 end if;
13847 --
13848 if (l_esc_rec.cvg_strt_rl is not null) then
13849 ben_plan_design_program_module.create_formula_result(
13850 p_validate => p_validate
13851 ,p_copy_entity_result_id => l_copy_entity_result_id
13852 ,p_copy_entity_txn_id => p_copy_entity_txn_id
13853 ,p_formula_id => l_esc_rec.cvg_strt_rl
13854 ,p_business_group_id => l_esc_rec.business_group_id
13855 ,p_number_of_copies => l_number_of_copies
13856 ,p_object_version_number => l_object_version_number
13857 ,p_effective_date => p_effective_date);
13858 end if;
13859
13860 if (l_esc_rec.cvg_thru_rl is not null) then
13861 ben_plan_design_program_module.create_formula_result(
13862 p_validate => p_validate
13863 ,p_copy_entity_result_id => l_copy_entity_result_id
13864 ,p_copy_entity_txn_id => p_copy_entity_txn_id
13865 ,p_formula_id => l_esc_rec.cvg_thru_rl
13866 ,p_business_group_id => l_esc_rec.business_group_id
13867 ,p_number_of_copies => l_number_of_copies
13868 ,p_object_version_number => l_object_version_number
13869 ,p_effective_date => p_effective_date);
13870 end if;
13871
13872 --
13873 end loop;
13874 --
13875 end loop;
13876 ---------------------------------------------------------------
13877 -- END OF BEN_ELIG_STDNT_STAT_CVG_F ----------------------
13878 ---------------------------------------------------------------
13879 --
13880 end if;
13881 ---------------------------------------------------------------
13882 -- END OF BEN_DPNT_CVG_ELIGY_PRFL_F ----------------------
13883 ---------------------------------------------------------------
13884 --
13885 end create_dep_elig_prfl_results;
13886
13887 -- 4347039: Added the following procedure
13888 procedure create_eligy_criteria_result
13889 (
13890 p_validate in number default 0 -- false
13891 ,p_copy_entity_result_id in number
13892 ,p_copy_entity_txn_id in number
13893 ,p_eligy_criteria_id in number
13894 ,p_business_group_id in number default null
13895 ,p_number_of_copies in number default 0
13896 ,p_object_version_number out nocopy number
13897 ,p_effective_date in date
13898 ,p_parent_entity_result_id in number
13899 ,p_no_dup_rslt in varchar2 default null
13900 ) is
13901
13902 l_copy_entity_result_id ben_copy_entity_results.copy_entity_result_id%TYPE;
13903 l_proc varchar2(72) := g_package||'.create_eligy_criteria_result';
13904 l_object_version_number ben_copy_entity_results.object_version_number%TYPE;
13905 l_result_type_cd varchar2(30) := 'DISPLAY' ;
13906
13907 /* cursor c_parent_result(c_parent_pk_id number,
13908 c_parent_table_alias varchar2,
13909 c_copy_entity_txn_id number) is
13910 select copy_entity_result_id mirror_src_entity_result_id
13911 from ben_copy_entity_results cpe
13912 where cpe.information1 = c_parent_pk_id
13913 and cpe.result_type_cd = l_cv_result_type_cd
13914 and cpe.copy_entity_txn_id = c_copy_entity_txn_id
13915 and cpe.table_alias = c_parent_table_alias;
13916 */
13917
13918 CURSOR c_egl (
13919 cv_eligy_criteria_id NUMBER,
13920 cv_mirror_src_entity_result_id NUMBER,
13921 cv_table_alias VARCHAR2
13922 )
13923 IS
13924 SELECT egl.*
13925 FROM ben_eligy_criteria egl
13926 WHERE egl.eligy_criteria_id = cv_eligy_criteria_id
13927 AND NOT EXISTS (
13928 SELECT NULL
13929 FROM ben_copy_entity_results cpe
13930 WHERE copy_entity_txn_id = p_copy_entity_txn_id
13931 AND mirror_src_entity_result_id =
13932 cv_mirror_src_entity_result_id
13933 AND cpe.table_alias = cv_table_alias
13934 AND information1 = cv_eligy_criteria_id);
13935
13936 --
13937 CURSOR c_value_set_name (cv_flex_value_set_id NUMBER)
13938 IS
13939 SELECT flex_value_set_name
13940 FROM fnd_flex_value_sets
13941 WHERE flex_value_set_id = cv_flex_value_set_id;
13942 --
13943 l_out_egl_result_id NUMBER (15);
13944 l_egl_table_route_id NUMBER (15);
13945 l_egl_result_type_cd VARCHAR2 (30);
13946 l_eligy_criteria_id NUMBER (15);
13947 l_egl_copy_entity_result_id ben_copy_entity_results.copy_entity_result_id%TYPE;
13948 l_egl_object_version_number ben_copy_entity_results.object_version_number%TYPE;
13949 l_flex_value_set_name fnd_flex_value_sets.flex_value_set_name%TYPE;
13950 --
13951 cursor c_object_exists(c_pk_id number,
13952 c_table_alias varchar2) is
13953 select null
13954 from ben_copy_entity_results cpe
13955 where copy_entity_txn_id = p_copy_entity_txn_id
13956 and cpe.table_alias = c_table_alias
13957 and information1 = c_pk_id;
13958
13959 l_dummy varchar2(1);
13960 l_mirror_src_entity_result_id number(15);
13961 l_table_route_id number(15);
13962 l_result_type_cd varchar2(30);
13963 l_information5 ben_copy_entity_results.information5%type;
13964 l_number_of_copies number(15);
13965 --
13966 begin
13967 --
13968 if p_no_dup_rslt = ben_plan_design_program_module.g_pdw_no_dup_rslt then
13969 ben_plan_design_program_module.g_pdw_allow_dup_rslt := ben_plan_design_program_module.g_pdw_no_dup_rslt;
13970 end if;
13971 --
13972 if ben_plan_design_program_module.g_pdw_allow_dup_rslt = ben_plan_design_program_module.g_pdw_no_dup_rslt then
13973 open c_object_exists(p_eligy_criteria_id,'EGL');
13974 fetch c_object_exists into l_dummy;
13975 if c_object_exists%found then
13976 close c_object_exists;
13977 return;
13978 end if;
13979 close c_object_exists;
13980 end if;
13981 --
13982 l_number_of_copies := p_number_of_copies ;
13983 --
13984 --
13985 ---------------------------------------------------------------
13986 ----------------- START OF BEN_ELIGY_CRITERIA -----------------
13987 ---------------------------------------------------------------
13988 --
13989 l_mirror_src_entity_result_id := p_copy_entity_result_id ;
13990 l_eligy_criteria_id := p_eligy_criteria_id;
13991 --
13992 --
13993 for l_egl_rec in c_egl(cv_eligy_criteria_id => l_eligy_criteria_id,
13994 cv_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
13995 cv_table_alias => 'EGL' )
13996 loop
13997 --
13998 l_egl_table_route_id := null ;
13999 --
14000 open ben_plan_design_program_module.g_table_route('EGL');
14001 fetch ben_plan_design_program_module.g_table_route into l_egl_table_route_id ;
14002 close ben_plan_design_program_module.g_table_route ;
14003 --
14004 l_egl_result_type_cd := 'NO DISPLAY';
14005 --
14006 l_egl_copy_entity_result_id := null;
14007 l_egl_object_version_number := null;
14008 --
14009 -- If criteria basis contains Value Set id then populate Value Set Name
14010 -- in INFORMATION185 to use it again while auto-mapping in the target
14011 -- business group in bepdccp1.pkb (stage -> ben)
14012 --
14013 l_flex_value_set_name := null;
14014 --
14015 if l_egl_rec.col1_value_set_id is not null then
14016 --
14017 open c_value_set_name ( l_egl_rec.col1_value_set_id );
14018 fetch c_value_set_name into l_flex_value_set_name;
14019 close c_value_set_name;
14020 --
14021 end if;
14022 --
14023 ben_copy_entity_results_api.create_copy_entity_results
14024 (
14025 p_copy_entity_result_id => l_egl_copy_entity_result_id,
14026 p_copy_entity_txn_id => p_copy_entity_txn_id,
14027 p_result_type_cd => l_egl_result_type_cd,
14028 p_mirror_src_entity_result_id => l_mirror_src_entity_result_id,
14029 p_parent_entity_result_id => l_mirror_src_entity_result_id,
14030 p_number_of_copies => l_number_of_copies,
14031 p_table_route_id => l_egl_table_route_id,
14032 p_table_alias => 'EGL',
14033 p_information1 => l_egl_rec.eligy_Criteria_id,
14034 p_information4 => l_egl_rec.business_group_id,
14035 p_information5 => l_egl_rec.name,
14036 p_information11 => l_egl_rec.short_code,
14037 p_information12 => l_egl_rec.criteria_type,
14038 p_information13 => l_egl_rec.crit_col1_val_type_cd,
14039 p_information14 => l_egl_rec.crit_col1_datatype,
14040 p_information15 => l_egl_rec.col1_lookup_type,
14041 p_information16 => l_egl_rec.access_table_name1,
14042 p_information17 => l_egl_rec.access_column_name1,
14043 p_information18 => l_egl_rec.time_entry_access_table_name1,
14044 p_information19 => l_egl_rec.time_entry_access_col_name1,
14045 p_information20 => l_egl_rec.crit_col2_val_type_cd,
14046 p_information21 => l_egl_rec.crit_col2_datatype,
14047 p_information22 => l_egl_rec.col2_lookup_type,
14048 p_information23 => l_egl_rec.access_table_name2,
14049 p_information24 => l_egl_rec.access_column_name2,
14050 p_information25 => l_egl_rec.time_entry_access_table_name2,
14051 p_information26 => l_egl_rec.time_entry_access_col_name2,
14052 p_information27 => l_egl_rec.allow_range_validation_flag,
14053 p_information28 => l_egl_rec.user_defined_flag,
14054 p_information29 => l_egl_rec.legislation_code,
14055 --Bug 4592554
14056 p_information30 => l_egl_rec.allow_range_validation_flag2,
14057 --End Bug 4592554
14058 p_information110 => l_egl_rec.egl_attribute_category,
14059 p_information111 => l_egl_rec.egl_attribute1,
14060 p_information112 => l_egl_rec.egl_attribute2,
14061 p_information113 => l_egl_rec.egl_attribute3,
14062 p_information114 => l_egl_rec.egl_attribute4,
14063 p_information115 => l_egl_rec.egl_attribute5,
14064 p_information116 => l_egl_rec.egl_attribute6,
14065 p_information117 => l_egl_rec.egl_attribute7,
14066 p_information118 => l_egl_rec.egl_attribute8,
14067 p_information119 => l_egl_rec.egl_attribute9,
14068 p_information120 => l_egl_rec.egl_attribute10,
14069 p_information121 => l_egl_rec.egl_attribute11,
14070 p_information122 => l_egl_rec.egl_attribute12,
14071 p_information123 => l_egl_rec.egl_attribute13,
14072 p_information124 => l_egl_rec.egl_attribute14,
14073 p_information125 => l_egl_rec.egl_attribute15,
14074 p_information126 => l_egl_rec.egl_attribute16,
14075 p_information127 => l_egl_rec.egl_attribute17,
14076 p_information128 => l_egl_rec.egl_attribute18,
14077 p_information129 => l_egl_rec.egl_attribute19,
14078 p_information130 => l_egl_rec.egl_attribute20,
14079 p_information131 => l_egl_rec.egl_attribute21,
14080 p_information132 => l_egl_rec.egl_attribute22,
14081 p_information133 => l_egl_rec.egl_attribute23,
14082 p_information134 => l_egl_rec.egl_attribute24,
14083 p_information135 => l_egl_rec.egl_attribute25,
14084 p_information136 => l_egl_rec.egl_attribute26,
14085 p_information137 => l_egl_rec.egl_attribute27,
14086 p_information138 => l_egl_rec.egl_attribute28,
14087 p_information139 => l_egl_rec.egl_attribute29,
14088 p_information140 => l_egl_rec.egl_attribute30,
14089 p_information170 => l_egl_rec.name,
14090 p_information185 => l_flex_value_set_name,
14091 p_information219 => l_egl_rec.description,
14092 p_information265 => l_egl_rec.object_version_number,
14093 p_information266 => l_egl_rec.col1_value_set_id,
14094 p_information267 => l_egl_rec.col2_value_set_id,
14095 p_information268 => l_egl_rec.access_calc_rule,
14096 --Bug 4592554
14097 p_information269 => l_egl_rec.access_calc_rule2,
14098 p_information270 => l_egl_rec.time_access_calc_rule1,
14099 p_information271 => l_egl_rec.time_access_calc_rule2,
14100 --End Bug 4592554
14101 p_object_version_number => l_egl_object_version_number,
14102 p_effective_date => p_effective_date
14103 );
14104 --
14105 if l_egl_rec.access_calc_rule is not null
14106 then
14107 --
14108 ben_plan_design_program_module.create_formula_result
14109 (
14110 p_validate => 0,
14111 p_copy_entity_result_id => l_egl_copy_entity_result_id,
14112 p_copy_entity_txn_id => p_copy_entity_txn_id,
14113 p_formula_id => l_egl_rec.access_calc_rule,
14114 p_business_group_id => l_egl_rec.business_group_id,
14115 p_number_of_copies => l_number_of_copies,
14116 p_object_version_number => l_object_version_number,
14117 p_effective_date => p_effective_date
14118 );
14119 --
14120 end if;
14121
14122 --Bug 4592554
14123
14124 if l_egl_rec.access_calc_rule2 is not null
14125 then
14126 --
14127 ben_plan_design_program_module.create_formula_result
14128 (
14129 p_validate => 0,
14130 p_copy_entity_result_id => l_egl_copy_entity_result_id,
14131 p_copy_entity_txn_id => p_copy_entity_txn_id,
14132 p_formula_id => l_egl_rec.access_calc_rule2,
14133 p_business_group_id => l_egl_rec.business_group_id,
14134 p_number_of_copies => l_number_of_copies,
14135 p_object_version_number => l_object_version_number,
14136 p_effective_date => p_effective_date
14137 );
14138 --
14139 end if;
14140
14141
14142
14143 if l_egl_rec.time_access_calc_rule1 is not null
14144 then
14145 --
14146 ben_plan_design_program_module.create_formula_result
14147 (
14148 p_validate => 0,
14149 p_copy_entity_result_id => l_egl_copy_entity_result_id,
14150 p_copy_entity_txn_id => p_copy_entity_txn_id,
14151 p_formula_id => l_egl_rec.time_access_calc_rule1,
14152 p_business_group_id => l_egl_rec.business_group_id,
14153 p_number_of_copies => l_number_of_copies,
14154 p_object_version_number => l_object_version_number,
14155 p_effective_date => p_effective_date
14156 );
14157 --
14158 end if;
14159
14160
14161
14162
14163 if l_egl_rec.time_access_calc_rule2 is not null
14164 then
14165 --
14166 ben_plan_design_program_module.create_formula_result
14167 (
14168 p_validate => 0,
14169 p_copy_entity_result_id => l_egl_copy_entity_result_id,
14170 p_copy_entity_txn_id => p_copy_entity_txn_id,
14171 p_formula_id => l_egl_rec.time_access_calc_rule2,
14172 p_business_group_id => l_egl_rec.business_group_id,
14173 p_number_of_copies => l_number_of_copies,
14174 p_object_version_number => l_object_version_number,
14175 p_effective_date => p_effective_date
14176 );
14177 --
14178 end if;
14179 --
14180 --End Bug 4592554
14181
14182 end loop;
14183 --
14184 --
14185 ---------------------------------------------------------------
14186 ------------------ END OF BEN_ELIGY_CRITERIA ------------------
14187 ---------------------------------------------------------------
14188 --
14189 end create_eligy_criteria_result;
14190
14191 end ben_plan_design_elpro_module;
14192