326:
327: --
328: begin
329: --
330: hr_utility.set_location('Entering:'||l_proc, 5);
331: --
332:
333: -- If participant is returning to his prior coverage that is
334: -- in effect at the time of the p_effective_date then we need to
338: -- inheritance logic should still apply).
339: --
340: if p_return_to_exist_cvg_flag = 'Y' and
341: p_process_dpnt then
342: hr_utility.set_location('Restore existing cvg', 10);
343:
344: FOR dpnt in exist_dpnt_c LOOP
345: --
346: if dpnt.elig_per_elctbl_chc_id = p_new_elig_per_elctbl_chc_id then
413: p_old_pl_typ_id <> p_new_pl_typ_id then
414: --
415: -- no inheritance
416: --
417: hr_utility.set_location('No inheritance possible:' || l_proc, 15);
418: --
419: l_inherit := FALSE;
420: --
421: else
431: --
432: if total_rqmt_c%notfound then
433: Exit ;
434: End if ;
435: hr_utility.set_location('grp_rlshp_cd ' || l_grp_rlshp_cd, 99 );
436: hr_utility.set_location('l_ttl_max_num '|| l_ttl_max_num, 99 );
437: --
438: --
439: l_ttl_rqmt_exist := TRUE;
432: if total_rqmt_c%notfound then
433: Exit ;
434: End if ;
435: hr_utility.set_location('grp_rlshp_cd ' || l_grp_rlshp_cd, 99 );
436: hr_utility.set_location('l_ttl_max_num '|| l_ttl_max_num, 99 );
437: --
438: --
439: l_ttl_rqmt_exist := TRUE;
440: --
440: --
441: open c_tot_elig_dpnt (l_dsgn_rqmt_id,l_grp_rlshp_cd) ;
442: fetch c_tot_elig_dpnt into l_num_cov_dpnt_elig_new ;
443: close c_tot_elig_dpnt ;
444: hr_utility.set_location(' total eligible ' || l_num_cov_dpnt_elig_new, 99 );
445:
446: if l_ttl_no_max_flag = 'N' and
447: l_num_cov_dpnt_elig_new > l_ttl_max_num then
448: --
445:
446: if l_ttl_no_max_flag = 'N' and
447: l_num_cov_dpnt_elig_new > l_ttl_max_num then
448: --
449: hr_utility.set_location('No inheritance, total max exceeded : ',99 );
450: --
451: -- no inheritance
452: --
453: l_inherit := FALSE;
452: --
453: l_inherit := FALSE;
454: exit ;
455: --
456: hr_utility.set_location(' inherit false ', 99 );
457: end if;
458: --
459: end loop; -- if a total requirement is found.
460: --
463: end if;
464: --
465: if l_inherit then
466:
467: hr_utility.set_location('Get cvg start dt'||l_proc, 26);
468: --
469: -- Calculate Dependents Coverage Start Date
470: -- dbms_output.put_line('Calculating cvg strt dt');
471: --
496: l_cvg_strt_dt := p_enrt_cvg_strt_dt;
497: --
498: end if;
499: --
500: hr_utility.set_location('Cvg start dt ='||to_char(l_cvg_strt_dt), 25);
501:
502: -- Loop thru dependents previously covered by the result:
503: --
504: hr_utility.set_location('Loop thru old dependents:'||l_proc, 30);
500: hr_utility.set_location('Cvg start dt ='||to_char(l_cvg_strt_dt), 25);
501:
502: -- Loop thru dependents previously covered by the result:
503: --
504: hr_utility.set_location('Loop thru old dependents:'||l_proc, 30);
505: -- dbms_output.put_line('Start loop for old dpnts');
506: --
507: FOR copy_dpnt_rec in copy_dpnt_c LOOP
508: --
505: -- dbms_output.put_line('Start loop for old dpnts');
506: --
507: FOR copy_dpnt_rec in copy_dpnt_c LOOP
508: --
509: hr_utility.set_location('Inherit dependent, rlshp max OK:'||l_proc, 45);
510: --
511: hook_dpnt
512: (p_validate => FALSE
513: ,p_elig_dpnt_id => copy_dpnt_rec.new_dpnt
533: -- no plan change:
534: --
535: If p_old_pl_id = p_new_pl_id then
536: --
537: hr_utility.set_location('Plans the same, copy bnfs', 55);
538: --
539: /* Bug: 3812994: If the new Option is Waive (or Plan is waived..),
540: then we do not copy the beneficiaries to the new result.
541: */
541: */
542: OPEN c_waive_pl_opt;
543: FETCH c_waive_pl_opt INTO l_waive_pl_opt;
544: IF c_waive_pl_opt%FOUND THEN
545: hr_utility.set_location('Waive Opt/Plan. Need not carry bnf ', 60);
546: hr_utility.set_location('Exiting'||l_proc, 99);
547: return;
548: END IF;
549: -- End 3812994 changes.
542: OPEN c_waive_pl_opt;
543: FETCH c_waive_pl_opt INTO l_waive_pl_opt;
544: IF c_waive_pl_opt%FOUND THEN
545: hr_utility.set_location('Waive Opt/Plan. Need not carry bnf ', 60);
546: hr_utility.set_location('Exiting'||l_proc, 99);
547: return;
548: END IF;
549: -- End 3812994 changes.
550: --
612: end if; -- if p_process_bnf
613: --
614: end if;
615: --
616: hr_utility.set_location('Exiting'||l_proc, 99);
617:
618: --
619:
620: --
764: --
765:
766: begin
767: --
768: hr_utility.set_location('Entering'||l_proc, 5);
769: --
770: --
771: -- update cvrd_flag, rslt_id, etc. ...
772: --
769: --
770: --
771: -- update cvrd_flag, rslt_id, etc. ...
772: --
773: hr_utility.set_location('Update dpnt info'||l_proc, 20);
774: if p_multi_row_actn then
775: hr_utility.set_location('LAMC manage multi row', 20);
776: else hr_utility.set_location('LAMC manage NOT multi row', 20);
777: end if;
771: -- update cvrd_flag, rslt_id, etc. ...
772: --
773: hr_utility.set_location('Update dpnt info'||l_proc, 20);
774: if p_multi_row_actn then
775: hr_utility.set_location('LAMC manage multi row', 20);
776: else hr_utility.set_location('LAMC manage NOT multi row', 20);
777: end if;
778:
779: ben_ELIG_DPNT_api.process_dependent(
772: --
773: hr_utility.set_location('Update dpnt info'||l_proc, 20);
774: if p_multi_row_actn then
775: hr_utility.set_location('LAMC manage multi row', 20);
776: else hr_utility.set_location('LAMC manage NOT multi row', 20);
777: end if;
778:
779: ben_ELIG_DPNT_api.process_dependent(
780: p_elig_dpnt_id => p_elig_dpnt_id,
796: open c_dpnt_pea;
797: --
798: fetch c_dpnt_pea into l_dpnt_pea;
799: --
800: hr_utility.set_location('l_dpnt_pea.prtt_enrt_actn_id'||l_dpnt_pea.prtt_enrt_actn_id,1114);
801: --
802: if c_dpnt_pea%found then
803: l_ccp_update_flag := 'N'; --6613891
804: hr_utility.set_location('In c_dpnt_pea. l_ccp_update_flag = '|| l_ccp_update_flag,8085);
800: hr_utility.set_location('l_dpnt_pea.prtt_enrt_actn_id'||l_dpnt_pea.prtt_enrt_actn_id,1114);
801: --
802: if c_dpnt_pea%found then
803: l_ccp_update_flag := 'N'; --6613891
804: hr_utility.set_location('In c_dpnt_pea. l_ccp_update_flag = '|| l_ccp_update_flag,8085);
805: --
806: open c_ccp(l_dpnt_pea.prtt_enrt_actn_id);
807: loop
808: fetch c_ccp into l_ccp_rec;
808: fetch c_ccp into l_ccp_rec;
809: exit when c_ccp%notfound;
810: l_ccp_update_flag := 'Y'; --6613891
811: --
812: hr_utility.set_location('l_elig_cvrd_dpnt_id'||l_elig_cvrd_dpnt_id,1114);
813: --
814: -- Bug 6793512
815: --
816: dt_api.find_dt_upd_modes
830: else
831: l_datetrack_mode := hr_api.g_correction;
832: end if;
833: --
834: hr_utility.set_location('rtagarra '||l_datetrack_mode,9653);
835: -- Bug 6793512
836: ben_CVRD_DPNT_CTFN_PRVDD_api.update_CVRD_DPNT_CTFN_PRVDD
837: (
838: p_validate => FALSE
850: --
851: close c_ccp;
852:
853: --6613891
854: hr_utility.set_location('l_ccp_update_flag = ' || l_ccp_update_flag,8085);
855: --
856:
857: if l_ccp_update_flag = 'Y' then
858: --
875: else
876: l_datetrack_mode := hr_api.g_correction;
877: end if;
878: --
879: hr_utility.set_location('rtagarra '||l_datetrack_mode,9653);
880: --
881: -- Bug 6793512
882: ben_PRTT_ENRT_ACTN_api.update_PRTT_ENRT_ACTN
883: (
1025: close dsgn_lvl_c;
1026: --
1027: end if;
1028: --
1029: hr_utility.set_location('Exiting'||l_proc, 25);
1030: --
1031: End hook_dpnt;
1032: --
1033: end ben_mng_dpnt_bnf;