DBA Data[Home] [Help]

APPS.BEN_NEWLY_INELIGIBLE SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 33

                                                  to pass to delete enrt, but instead
                                                  pass the enrt_perd_id from the
                                                  benmngle parm list.
        27 May 99       maagrawa       115.8      Added calls to imputed income
                                                  and flex credits recomputing
                                                  procedures when de-enrollment
                                                  takes place.
        03 Jun 99       Tmathers       115.9      Backport of 115.7 with
                                                  cacheing changes.
        03 Jun 99       Tmathers       115.10     leapfrog of 115.8 with
                                                  cacheing changes.
        24 Jun 99       maagrawa       115.11     subj_to_imput_inc_flag changed
                                                  to subj_to_imptd_incm_typ_cd.
        20-JUL-99       Gperry         115.12     genutils -> benutils package
                                                  rename.
        04-OCT-99       Stee           115.13     If terminating all
                                                  coverage for COBRA,
                                                  also end date Qualified bnf.
        29-Oct-99       maagrawa       115.14     Call the delete_enrollment
                                                  process with parameter
                                                  p_source => 'beninelg'.
        12-Nov-99       lmcdonal       115.15     Pass enrt_mthd_cd to
                                                  recompute_flex_credits.
        31-Jan-00       jcarpent       115.16     Use dt mode globals.
        09-Feb-00       jcarpent       115.17     Don't call multi_rows_edit.
        11-Feb-00       jcarpent       115.18     Accept p_pgm_id for plips.
        04-Mar-00       stee           115.19     Add ptip_id to
                                                  end_prtt_cobra_eligibility.
        16-Mar-00       jcarpent       115.20     Fixed lee_rsn logic to use
                                                  plan level then pgm level.
                                                  Also removed oipl query.
                                                  Also query into pen loop
                                                  since could be different
        29-Mar-00       jcarpent       115.21     Reset l_lee_rsn_id for each
                                                  plan so if not at pgm level
                                                  will use each plan.
        11-Apr-00       gperry         115.22     Added extra param for fido
                                                  ctrl m call.
        24-jun-00       jcarpent       115.23     Pass lee_rsn_id to
                                                  ben_determine_date. (5182,
                                                  1304658,1311768)
        19-Jul-00       jcarpent       115.24     5241, 1343362.  Process
                                                  comp objects in order.
        05-Sep-00       pbodla         115.25     - Bug 5422 : Allow different enrollment
                                                  periods for programs for a scheduled
                                                  enrollment. p_popl_enrt_typ_cycl_id
                                                  is removed.
        08-Nov-00       vputtiga       115.26     - Bug Fix 1485814. Set global g_enrollment_change
                                                  to TRUE after each call to delete_enrollment
        05-Jan-01       kmahendr       115.27     - Check for type of life event to get the correct
                                                    life event
        21-Feb-01       ikasire        115.28     remove the special treatment given
                                                  to the 'W' (1 prior) cases, as we need to
                                                  call delete_enrollment for these
                                                  cases also. Right now when a person
                                                  becomes ineligibile for a life event under
                                                  process, benmngle is closing the life event
       09-May-01        kmahendr       115.29     Bug#1646404 - ENrollment result rows end dated
                                                  with min(lf_evt_ocrd_dt,enrl_perd_strt_dt) -1
       06-Jun-01        kmahendr       115.30     Bug#1819106 - l_effective date is assigned the
                                                  value even if enrollment period start dt cd is
                                                  null
       22-Jun-01        bwharton       115.31     Bug 1646404.  Sometimes the effective date
                                                  is computed to be before the esd of the pen.
                                                  Move it ahead to the processed date of
                                                  the previous pil if greater.
       15-Jul-01        kmahendr       115.32     Bug#1871614- in selection mode the effective
                                                  date is passed as one day less than benmngle
						  run date and there is no lfevt_ocrd date which
	                                          caused coverage to end 2 days before eff.date
       04-Sep-01        kmahendr       115.33     Bug#1950044-Cursors for fetching enrt_rlst
                                                  modified so that if effective_start_date is
                                                  after lf_event_ocrd_dt of subsequent lf event
                                                  the results are pulled-similar to condition in
                                                  bendenrr
       19-dec-01        pbodla         115.34     CWB Changes : fetch procd_dt's
                                                  of relevant per in ler's
       26-dec-01        kmahendr       115.35     In unrestricted mode, effective_date is passed
                                                  for delete_enrollment
       07-Jan-02        Rpillay        115.36     Added dbdrv and checkfile commands.
       19-MAy-02        ikasire        115.37     Bug 2200139 Override Enrollment issues.
                                                  We may have the enrollments started in future
                                                  for Override Case.
       23-May-02        ikasire        115.38     Bug 2200139 More Override changes
       11-Jul-02	kmahendr       115.39     ABSENCES - Effective date is not
                                                  computed for absence life
                                                  event as start and end can occur on the same day
       15-Jul-02	pbodla         115.40     ABSENCES - fixed cursor which
                                                  fetches the typ_cd
       07-Aug-02        tjesumic       115.41     If  the Ineligibility level  define in program
                                                  all the plan in the pgm became ineligble so
                                                  There is no need to call the inputed income
                                                  calcualtion
       14-Aug-02        stee           115.43     COBRA: Set a global variable if
                                                  enrollment in COBRA is terminated.
                                                  Bug 1794808.
       19-Aug-02        mmudigon       115.44     call ben_comp_object only if pgm_id is not null
       12-Sep-02        kmahendr       115.45     Bug#2508822 - Effective date is not changed
                                                  if coverage start date is same as effective
                                                  date
       19-Nov-02        kmahendr       115.46     Bug#2641545 - effective date is changed based
                                                  on effective start date of pen row.
       11-Dec-02        tjesumic       115.47     lf_evt_ocrd_dt from the table ben_benefit_actions
                                                  coverted into date format 'DD/MM/RRR'. the system errors
                                                  because the date is stored in YYYY/MM/DD format
                                                  This is fixed by removing the format mask in the to_date
                                                  this will conver the string to char in the same format
                                                  bug # 2688628
      16-Sep-03        kmahendr        115.48     GSP changes
      19-Sep-03        rpillay         115.49     GSCC warning fix
      25-Nov-03        kmahendr        115.50     Bug#3279350- added cursors to find the deenrolled
                                                  results after the event date and reopen the result
      02-jun-04        nhunur          115.51     corrected join betweeen pil and ler to avoid MJC
      05-Jul-04        bmanyam         115.52     Bug# 3507652 - The fix 115.50 (3279350) needs to
                                                  run for the unrestricted le also. Enabled this.
      15-Sep-04        pbodla          115.52     iRec : avoid using the iRec life events
                                                  in cursor c_procd_dt_pil and
                                                  Modified query in c_pen_max_esd to join
                                                  between pil and pen.
      02-dec-04        ikasire         115.54     Bug 4046914
      03-dec-04        ikasire/bala    115.55     Bug 4031416 need to call backout proces
      23-dec-04        tjesumic        115.56     p_prt_enrt_rslt_id is passed to backout_future_coverage
      07-Feb-05        tjesumic        115.57     call for backout_future_cvg is removed. future result is
                                                  taken care in delete_enrollment # 4118315
      18-Apr-05        tjesumic        115.58     GHR enhancement to add number of days in enrt perd codeds
      30-Jun-05        kmahendr        115.59     Bug#4463829 - added person_id parameter to
                                                  ben_determine_date calls
      07-Oct-05        ssarkar         115.60    Bug 4645272 : when Open/Administartive runs in Life event mode,
                                                    populate enrt_perd_id and not lee_rsn_id
      06-Jun-06        rbingi          115.61    Bug 5257226: passing effective_date to delete_enrollment as
                                                   delete_enrollment will end-date enrollment 1 day prior.
      16-Nov-06        abparekh        115.62    Bug 5642702 : Defined and initialized global
                                                               variable G_DENROLING_FROM_PGM
      05-Apr-07        rtagarra        115.63    Bug 6000303 : Defer Deenrollment ENH.Added
							       Procedure defer_delete_enrollment.
      16-May-07        rtagarra        115.64       -- DO --
      17-Nov-07        rtagarra        115.65    Bug 6634074 :
      25-Mar-08        sallumwa        115.67    Bug 6881745 : Modified cursor c_epo_plip_defer in Procedure
                                                 defer_delete_enrollment,to pick-up ineligible rows with respect
						 to p_effective_date.
      24-Jun-08        sallumwa        115.68    Bug 7181958 : Modified cursor c_epo_plip_defer in Procedure
                                                 defer_delete_enrollment,to pick-up ineligible rows with respect
						 to latest Life event.Reverted back the changes of 6881745.
      21-Aug-08        sallumwa        115.69    Bug 7301670 : Modified cursor c_epo_plip_defer in Procedure
                                                 defer_delete_enrollment,to pick-up ineligible rows with respect
						 Active Program and not Cobra pgm when person has dual
						 program eligibility.
      22-Aug-08        sallumwa        115.70    Bug 7342283 : Modified cursor c_pep_pgm_defer in Procedure
                                                 defer_delete_enrollment,to pick-up ineligible rows with respect
						 Active Program and not Cobra pgm when person has dual
						 program eligibility(for plip with no options).
*/
-----------------------------------------------------------------------
procedure defer_delete_enrollment
		( p_per_in_ler_id	     in number
		 ,p_person_id		     in number
		 ,p_business_group_id        in number
		 ,p_effective_date           in date
		) is
  --
  l_proc              varchar2(80) :=  g_package|| '.defer_delete_enrollment';
Line: 197

  select  pel.*
   from   ben_pil_elctbl_chc_popl pel
   where  pel.per_in_ler_id = p_per_in_ler_id
    and   pel.defer_deenrol_flag = 'Y'
    and   pel.deenrol_made_dt is null
    and   pel.pil_elctbl_popl_stat_cd not in ('VOIDD','BCKDT');
Line: 208

     select pen.*
     from   ben_prtt_enrt_rslt_f pen
	   ,ben_elig_per_f pep
     where  pen.pgm_id = p_pgm_id
     ---Bug 7342283
      and   pen.pgm_id = pep.pgm_id
      ----Bug 7342283
      and   pen.pl_id =  pep.pl_id
      and   pep.elig_flag = 'N'
      and   pep.per_in_ler_id = p_per_in_ler_id
      and   pen.prtt_enrt_rslt_stat_cd is null
      and   pen.effective_end_date = hr_api.g_eot
      and   pen.enrt_cvg_thru_dt   = hr_api.g_eot
      and   pen.oipl_id is null
      and   pen.person_id = p_person_id;
Line: 228

     select pen.*
     from   ben_prtt_enrt_rslt_f pen
	   ,ben_elig_per_f pep
     where  pen.pl_id = p_pl_id
      and   pep.pl_id = pen.pl_id
      and   pep.elig_flag = 'N'
      and   pen.pgm_id is null
      and   pen.oipl_id is null
      and   pep.per_in_ler_id = p_per_in_ler_id
      and   pen.prtt_enrt_rslt_stat_cd is null
      and   pen.effective_end_date = hr_api.g_eot
      and   pen.enrt_cvg_thru_dt   = hr_api.g_eot
      and   pen.person_id = p_person_id;
Line: 246

     select pen.*
     from   ben_elig_per_opt_f epo
	   ,ben_prtt_enrt_rslt_f pen
	   ,ben_oipl_f oipl
	   ,ben_elig_per_f pep
     where  pen.pgm_id = p_pgm_id
     ---Bug 7301670
      and   pen.pgm_id = pep.pgm_id
      ----Bug 7301670
      and   pep.pl_id = pen.pl_id
      and   pen.oipl_id = oipl.oipl_id
      and   oipl.opt_id = epo.opt_id
      and   epo.elig_per_id = pep.elig_per_id
      and   pep.per_in_ler_id = p_per_in_ler_id
      and   epo.elig_flag = 'N'
      --Bug : 6881745
     /*  AND   p_effective_date
              BETWEEN epo.effective_start_date AND epo.effective_end_date */
      --Bug : 7181958
      and   epo.effective_end_date = hr_api.g_eot
      --Bug : 6881745
      and   pen.effective_end_date = hr_api.g_eot
      and   pen.enrt_cvg_thru_dt   = hr_api.g_eot
      and   pen.prtt_enrt_rslt_stat_cd is null
      and   pen.person_id = p_person_id;
Line: 276

     select pen.*
     from   ben_elig_per_opt_f epo
	   ,ben_prtt_enrt_rslt_f pen
	   ,ben_oipl_f oipl
	   ,ben_elig_per_f pep
     where  pen.pl_id = p_pl_id
      and   pep.pl_id = pen.pl_id
      and   pen.oipl_id = oipl.oipl_id
      and   pep.pgm_id is null
      and   epo.elig_per_id = pep.elig_per_id
      and   pep.per_in_ler_id = p_per_in_ler_id
      and   oipl.opt_id = epo.opt_id
      and   epo.elig_flag = 'N'
      and   pen.effective_end_date = hr_api.g_eot
      and   pen.enrt_cvg_thru_dt   = hr_api.g_eot
      and   pen.prtt_enrt_rslt_stat_cd is null
      and   pen.person_id = p_person_id;
Line: 329

    ben_PRTT_ENRT_RESULT_api.delete_enrollment(
             p_validate              => false,
             p_per_in_ler_id         => p_per_in_ler_id,
             p_prtt_enrt_rslt_id     => l_pep_pgm_defer.prtt_enrt_rslt_id,
             p_effective_start_date  => l_effective_start_date,
             p_effective_end_date    => l_effective_end_date,
             p_object_version_number => l_pep_pgm_defer.object_version_number,
             p_business_group_id     => p_business_group_id,
             p_effective_date        => l_effective_date,
             p_datetrack_mode        => 'DELETE',
	     p_source		     => 'beninelg',
             p_multi_row_validate    => FALSE);
Line: 362

    ben_PRTT_ENRT_RESULT_api.delete_enrollment(
             p_validate              => FALSE,
             p_per_in_ler_id         => p_per_in_ler_id,
             p_prtt_enrt_rslt_id     => l_epo_plip_defer.prtt_enrt_rslt_id,
             p_effective_start_date  => l_effective_start_date,
             p_effective_end_date    => l_effective_end_date,
             p_object_version_number => l_epo_plip_defer.object_version_number,
             p_business_group_id     => p_business_group_id,
             p_effective_date        => l_effective_date,
             p_datetrack_mode        => 'DELETE',
	     p_source		     => 'beninelg',
             p_multi_row_validate    => FALSE);
Line: 381

      ben_pil_elctbl_chc_popl_api.update_pil_elctbl_chc_popl
              (p_validate                   => FALSE
	      ,p_pil_elctbl_chc_popl_id     => l_pel_pgm_id.pil_elctbl_chc_popl_id
              ,p_object_version_number      => l_pel_pgm_id.object_version_number
              ,p_effective_date             => p_effective_date
	      ,p_defer_deenrol_flag	    => 'Y'
	      ,p_deenrol_made_dt            => p_effective_date
	      );
Line: 406

      ben_PRTT_ENRT_RESULT_api.delete_enrollment(
             p_validate              => false,
             p_per_in_ler_id         => p_per_in_ler_id,
             p_prtt_enrt_rslt_id     => l_pep_pl_defer.prtt_enrt_rslt_id,
             p_effective_start_date  => l_effective_start_date,
             p_effective_end_date    => l_effective_end_date,
             p_object_version_number => l_pep_pl_defer.object_version_number,
             p_business_group_id     => p_business_group_id,
             p_effective_date        => l_effective_date,
             p_datetrack_mode        => 'DELETE',
	     p_source		     => 'beninelg',
             p_multi_row_validate    => FALSE);
Line: 437

  ben_PRTT_ENRT_RESULT_api.delete_enrollment(
             p_validate              => FALSE,
             p_per_in_ler_id         => p_per_in_ler_id,
             p_prtt_enrt_rslt_id     => l_epo_plnip_defer.prtt_enrt_rslt_id,
             p_effective_start_date  => l_effective_start_date,
             p_effective_end_date    => l_effective_end_date,
             p_object_version_number => l_epo_plnip_defer.object_version_number,
             p_business_group_id     => p_business_group_id,
             p_effective_date        => l_effective_date,
             p_datetrack_mode        => 'DELETE',
     	     p_source		     => 'beninelg',
             p_multi_row_validate    => FALSE);
Line: 454

  ben_pil_elctbl_chc_popl_api.update_pil_elctbl_chc_popl
              (p_validate                   => FALSE
	      ,p_pil_elctbl_chc_popl_id     => l_pel_pgm_id.pil_elctbl_chc_popl_id
              ,p_object_version_number      => l_pel_pgm_id.object_version_number
              ,p_effective_date             => p_effective_date
	      ,p_defer_deenrol_flag	    => 'Y'
	      ,p_deenrol_made_dt            => p_effective_date
	      );
Line: 471

  end defer_delete_enrollment;
Line: 501

    select pen.prtt_enrt_rslt_id, pgm_id, pl_id, oipl_id,  pen.object_version_number,ptip_id,
           pen.effective_start_date,pen.enrt_mthd_cd,
           pen.enrt_cvg_strt_dt
    from   ben_prtt_enrt_rslt_f pen
    where  p_pl_id = pen.pl_id
    and    nvl(pen.pgm_id,-1)=nvl(p_pgm_id,-1)
    and    pen.person_id = p_person_id
    and    pen.business_group_id+0 = p_business_group_id
    and    pen.prtt_enrt_rslt_stat_cd is null
    and    pen.effective_end_date = hr_api.g_eot
    and    pen.enrt_cvg_thru_dt = hr_api.g_eot   -- 9999
    and    l_effective_date_1 <= pen.enrt_cvg_thru_dt
    and    pen.enrt_cvg_strt_dt < pen.effective_end_date
    order  by effective_start_date desc;
Line: 523

    select pen.prtt_enrt_rslt_id, pgm_id, pl_id, oipl_id, pen.object_version_number,ptip_id,
           pen.effective_start_date,pen.enrt_mthd_cd,
           pen.enrt_cvg_strt_dt
    from   ben_prtt_enrt_rslt_f pen
    where  p_pgm_id = pen.pgm_id
    and    pen.person_id = p_person_id
    and    pen.business_group_id+0 = p_business_group_id
    and    pen.prtt_enrt_rslt_stat_cd is null
    and    pen.effective_end_date = hr_api.g_eot
    and    pen.enrt_cvg_thru_dt = hr_api.g_eot -- 9999
    and    l_effective_date_1 <= pen.enrt_cvg_thru_dt
    and    pen.enrt_cvg_strt_dt < pen.effective_end_date
    order  by effective_start_date desc;
Line: 544

    select pen.prtt_enrt_rslt_id, pgm_id, pl_id, oipl_id, pen.object_version_number,
           pen.effective_start_date,pen.enrt_mthd_cd,
           pen.enrt_cvg_strt_dt
    from   ben_prtt_enrt_rslt_f pen
    where  p_oipl_id = pen.oipl_id
    and    nvl(pen.pgm_id,-1)=nvl(p_pgm_id,-1)
    and    pen.person_id = p_person_id
    and    pen.business_group_id+0 = p_business_group_id
    and    pen.prtt_enrt_rslt_stat_cd is null
    and    pen.effective_end_date = hr_api.g_eot
    and    pen.enrt_cvg_thru_dt = hr_api.g_eot -- 9999
    and    l_effective_date_1 <= pen.enrt_cvg_thru_dt
    and    pen.enrt_cvg_strt_dt < pen.effective_end_date
    order  by effective_start_date desc;
Line: 566

    select lee.lee_rsn_id,
           lee.enrt_perd_strt_dt_cd,
           lee.enrt_perd_strt_dt_rl,
           lee.enrt_perd_strt_days
    from   ben_lee_rsn_f lee,
           ben_popl_enrt_typ_cycl_f pop
    where  pop.pl_id = p_pl_id
    and    pop.business_group_id +0 = p_business_group_id
    and    p_effective_date
           between pop.effective_start_date
           and     pop.effective_end_date
    and    pop.popl_enrt_typ_cycl_id = lee.popl_enrt_typ_cycl_id
    and    lee.business_group_id +0 = pop.business_group_id
    and    lee.ler_id = p_ler_id
    and    p_effective_date
           between lee.effective_start_date
           and     lee.effective_end_date;
Line: 588

    SELECT   enrtp.enrt_perd_id,
             enrtp.strt_dt
    FROM     ben_popl_enrt_typ_cycl_f petc,
             ben_enrt_perd enrtp
    WHERE    petc.pl_id = p_pl_id
    AND      petc.business_group_id = p_business_group_id
    AND      p_lf_evt_ocrd_dt BETWEEN petc.effective_start_date
                                  AND petc.effective_end_date
    AND      petc.enrt_typ_cycl_cd <> 'L'
    AND      enrtp.business_group_id = p_business_group_id
    AND      enrtp.asnd_lf_evt_dt  = p_lf_evt_ocrd_dt
    /* PB :5422 AND      enrtp.strt_dt=enrtp1.strt_dt
    AND      enrtp1.popl_enrt_typ_cycl_id = p_popl_enrt_typ_cycl_id
    AND      enrtp1.business_group_id     = p_business_group_id */
    AND      enrtp.popl_enrt_typ_cycl_id  = petc.popl_enrt_typ_cycl_id;
Line: 609

    SELECT   enrtp.enrt_perd_id,
             enrtp.strt_dt
    FROM     ben_popl_enrt_typ_cycl_f petc,
             ben_enrt_perd enrtp
    WHERE    petc.pgm_id = p_pgm_id
    AND      petc.business_group_id = p_business_group_id
    AND      p_lf_evt_ocrd_dt BETWEEN petc.effective_start_date
                 AND petc.effective_end_date
    AND      petc.enrt_typ_cycl_cd <> 'L'
    AND      enrtp.business_group_id = p_business_group_id
    AND      enrtp.asnd_lf_evt_dt  = p_lf_evt_ocrd_dt
    /* PB :5422 AND      enrtp1.business_group_id = p_business_group_id
    AND      enrtp.strt_dt= enrtp1.strt_dt
    AND      enrtp1.enrt_perd_id = p_popl_enrt_typ_cycl_id */
    AND      enrtp.popl_enrt_typ_cycl_id = petc.popl_enrt_typ_cycl_id;
Line: 626

    select lee.lee_rsn_id,
           lee.enrt_perd_strt_dt_cd,
           lee.enrt_perd_strt_dt_rl,
           lee.enrt_perd_strt_days
    from   ben_lee_rsn_f lee,
           ben_popl_enrt_typ_cycl_f pop
    where  pop.pgm_id = p_pgm_id
    and    pop.business_group_id +0 = p_business_group_id
    and    p_effective_date
           between pop.effective_start_date
           and     pop.effective_end_date
    and    pop.popl_enrt_typ_cycl_id = lee.popl_enrt_typ_cycl_id
    and    lee.business_group_id +0 = pop.business_group_id
    and    lee.ler_id = p_ler_id
    and    p_effective_date
           between lee.effective_start_date
           and     lee.effective_end_date;
Line: 645

     select 'Y'
     from    ben_pl_f pl
     where   pl.pl_id = v_pl_id
     and     pl.business_group_id + 0 = p_business_group_id
     and     p_effective_date between
             pl.effective_start_date and pl.effective_end_date
     and     pl.subj_to_imptd_incm_typ_cd = 'PRTT';
Line: 656

     select pil.lf_evt_ocrd_dt, ler.typ_cd
     from   ben_per_in_ler pil,
            ben_ler_f ler
     where  pil.per_in_ler_id = l_per_in_ler_id
       and  pil.ler_id = ler.ler_id
       and  p_effective_date between ler.effective_start_date and
                                     ler.effective_end_date;
Line: 669

     select pil.procd_dt
     from   ben_per_in_ler pil,
            ben_ler_f ler
     where  pil.person_id = p_person_id
     and    pil.per_in_ler_id <> l_per_in_ler_id
     and    pil.per_in_ler_stat_cd = 'PROCD'
     and    pil.ler_id = ler.ler_id
     and    p_effective_date between
            ler.effective_start_date and ler.effective_end_date
     and    ler.typ_cd not in ('COMP','GSP', 'IREC')
     order by lf_evt_ocrd_dt desc;
Line: 682

     select pil.procd_dt
     from   ben_per_in_ler pil,
            ben_ler_f ler
     where  pil.person_id = p_person_id
     and    pil.per_in_ler_id <> l_per_in_ler_id
     and    pil.per_in_ler_stat_cd = 'PROCD'
     and    pil.ler_id = ler.ler_id
     and    p_effective_date between
            ler.effective_start_date and ler.effective_end_date
     and    ler.ler_id =  p_ler_id
     and    ler.typ_cd = 'COMP'
     order by lf_evt_ocrd_dt desc;
Line: 698

    select pen.prtt_enrt_rslt_id, pgm_id, pl_id, oipl_id,  pen.object_version_number,ptip_id,
           pen.effective_start_date,pen.enrt_mthd_cd,
           pen.enrt_cvg_strt_dt
    from   ben_prtt_enrt_rslt_f pen
    where  p_pl_id = pen.pl_id
    and    nvl(pen.pgm_id,-1)=nvl(p_pgm_id,-1)
    and    pen.person_id = p_person_id
    and    pen.business_group_id = p_business_group_id
    and    pen.prtt_enrt_rslt_stat_cd is null
    and    pen.effective_end_date = hr_api.g_eot
    and    pen.enrt_cvg_thru_dt <> hr_api.g_eot
    and    l_effective_date_1 < pen.enrt_cvg_thru_dt;
Line: 712

    select pen.prtt_enrt_rslt_id, pgm_id, pl_id, oipl_id, pen.object_version_number,ptip_id,
           pen.effective_start_date,pen.enrt_mthd_cd,
           pen.enrt_cvg_strt_dt
    from   ben_prtt_enrt_rslt_f pen
    where  p_pgm_id = pen.pgm_id
    and    pen.person_id = p_person_id
    and    pen.business_group_id = p_business_group_id
    and    pen.prtt_enrt_rslt_stat_cd is null
    and    pen.effective_end_date = hr_api.g_eot
    and    pen.enrt_cvg_thru_dt <> hr_api.g_eot
    and    l_effective_date_1 < pen.enrt_cvg_thru_dt;
Line: 725

    select pen.prtt_enrt_rslt_id, pgm_id, pl_id, oipl_id, pen.object_version_number,
           pen.effective_start_date,pen.enrt_mthd_cd,
           pen.enrt_cvg_strt_dt
    from   ben_prtt_enrt_rslt_f pen
    where  p_oipl_id = pen.oipl_id
    and    nvl(pen.pgm_id,-1)=nvl(p_pgm_id,-1)
    and    pen.person_id = p_person_id
    and    pen.business_group_id = p_business_group_id
    and    pen.prtt_enrt_rslt_stat_cd is null
    and    pen.enrt_cvg_thru_dt <> hr_api.g_eot
    and    pen.effective_end_date = hr_api.g_eot
    and    l_effective_date_1 < pen.enrt_cvg_thru_dt;
Line: 739

    select pen.effective_end_date,pen.object_version_number
    from   ben_prtt_enrt_rslt_f pen,
           ben_per_in_ler pil
    where  prtt_enrt_rslt_id       =  v_prtt_enrt_rslt_id
    and    pen.business_group_id   =  p_business_group_id
    and    pil.per_in_ler_stat_cd not in ('BCKDT','VOIDD')
    and    pen.per_in_ler_id       =  pil.per_in_ler_id
    and    pen.effective_end_date <> hr_api.g_eot
    order by pen.effective_end_date desc;
Line: 750

  l_update               boolean;
Line: 751

  l_update_override      boolean;
Line: 752

  l_update_change_insert boolean;
Line: 807

    hr_utility.set_location ('undelete prtt_enrt_rslts',10);
Line: 814

           ben_prtt_enrt_result_api.delete_prtt_enrt_result
              (p_validate                => false,
               p_prtt_enrt_rslt_id       => l_pen.prtt_enrt_rslt_id,
               p_effective_start_date    => l_effective_start_date,
               p_effective_end_date      => l_effective_end_date,
               p_object_version_number   => l_pen_max_esd.object_version_number,
               p_effective_date          => l_pen_max_esd.effective_end_date,
               p_datetrack_mode          => hr_api.g_future_change,
               p_multi_row_validate      => FALSE);
Line: 833

           ben_prtt_enrt_result_api.delete_prtt_enrt_result
              (p_validate                => false,
               p_prtt_enrt_rslt_id       => l_pen.prtt_enrt_rslt_id,
               p_effective_start_date    => l_effective_start_date,
               p_effective_end_date      => l_effective_end_date,
               p_object_version_number   => l_pen_max_esd.object_version_number,
               p_effective_date          => l_pen_max_esd.effective_end_date,
               p_datetrack_mode          => hr_api.g_future_change,
               p_multi_row_validate      => FALSE);
Line: 852

           ben_prtt_enrt_result_api.delete_prtt_enrt_result
              (p_validate                => false,
               p_prtt_enrt_rslt_id       => l_pen.prtt_enrt_rslt_id,
               p_effective_start_date    => l_effective_start_date,
               p_effective_end_date      => l_effective_end_date,
               p_object_version_number   => l_pen_max_esd.object_version_number,
               p_effective_date          => l_pen_max_esd.effective_end_date,
               p_datetrack_mode          => hr_api.g_future_change,
               p_multi_row_validate      => FALSE);
Line: 1058

           p_update               => l_update,
           p_update_override      => l_update_override,
           p_update_change_insert => l_update_change_insert);
Line: 1062

        if l_update_override then
          --
          l_datetrack_mode := hr_api.g_update_override;
Line: 1066

        elsif l_update then
          --
          l_datetrack_mode := hr_api.g_update;
Line: 1076

         ben_prtt_enrt_result_api.update_PRTT_ENRT_RESULT
            (p_validate              => false
            ,p_prtt_enrt_rslt_id     => l_pen.prtt_enrt_rslt_id
            ,p_effective_start_date  => l_eff_strt
            ,p_effective_end_date    => l_eff_end
            ,p_ler_id                => p_ler_id
            ,p_no_lngr_elig_flag     => 'Y'
            ,p_object_version_number => l_ovn
            ,p_per_in_ler_id         => l_per_in_ler_id
            ,p_effective_date        => p_effective_date
            ,p_datetrack_mode        => l_datetrack_mode
            ,p_multi_row_validate    => false
            );
Line: 1171

      ben_prtt_enrt_result_api.delete_enrollment
        (p_validate              => false ,
         p_prtt_enrt_rslt_id     => l_pen.prtt_enrt_rslt_id,
         p_per_in_ler_id         => l_per_in_ler_id,
         p_lee_rsn_id            => l_lee_rsn_id,
         -- PB : 5422
         p_enrt_perd_id          => l_enrt_perd_id, --  l_benmngle_parm_rec.popl_enrt_typ_cycl_id,
         p_business_group_id     => p_business_group_id ,
         p_effective_start_date  => l_eff_strt,
         p_effective_end_date    => l_eff_end,
         p_object_version_number => l_pen.object_version_number,
         p_effective_date        => l_effective_date,
         p_datetrack_mode        => 'DELETE',
         p_multi_row_validate    => false,
         p_source                => 'beninelg');
Line: 1312

           p_update               => l_update,
           p_update_override      => l_update_override,
           p_update_change_insert => l_update_change_insert);
Line: 1316

         if l_update_override then
           --
           l_datetrack_mode := hr_api.g_update_override;
Line: 1320

         elsif l_update then
           --
           l_datetrack_mode := hr_api.g_update;
Line: 1330

         ben_prtt_enrt_result_api.update_PRTT_ENRT_RESULT
            (p_validate              => false
            ,p_prtt_enrt_rslt_id     => l_pen.prtt_enrt_rslt_id
            ,p_effective_start_date  => l_eff_strt
            ,p_effective_end_date    => l_eff_end
            ,p_ler_id                => p_ler_id
            ,p_no_lngr_elig_flag     => 'Y'
            ,p_object_version_number => l_ovn
            ,p_per_in_ler_id         => l_per_in_ler_id
            ,p_effective_date        => p_effective_date
            ,p_datetrack_mode        => l_datetrack_mode
            ,p_multi_row_validate    => false
            );
Line: 1420

        ben_prtt_enrt_result_api.delete_enrollment
        (p_validate              => false ,
         p_prtt_enrt_rslt_id     => l_pen.prtt_enrt_rslt_id,
         p_per_in_ler_id         => l_per_in_ler_id,
         p_lee_rsn_id            => l_lee_rsn_id,
         -- PB : 5422
         p_enrt_perd_id          => l_enrt_perd_id, -- l_benmngle_parm_rec.popl_enrt_typ_cycl_id ,
         p_business_group_id     => p_business_group_id ,
         p_effective_start_date  => l_eff_strt,
         p_effective_end_date    => l_eff_end,
         p_object_version_number => l_pen.object_version_number,
         p_effective_date        => l_effective_date,
         p_datetrack_mode        => 'DELETE',
         p_multi_row_validate    => false,
         p_source                => 'beninelg');
Line: 1617

           p_update               => l_update,
           p_update_override      => l_update_override,
           p_update_change_insert => l_update_change_insert);
Line: 1621

         if l_update_override then
           --
           l_datetrack_mode := hr_api.g_update_override;
Line: 1625

         elsif l_update then
           --
           l_datetrack_mode := hr_api.g_update;
Line: 1636

         ben_prtt_enrt_result_api.update_PRTT_ENRT_RESULT
            (p_validate              => false
            ,p_prtt_enrt_rslt_id     => l_pen.prtt_enrt_rslt_id
            ,p_effective_start_date  => l_eff_strt
            ,p_effective_end_date    => l_eff_end
            ,p_ler_id                => p_ler_id
            ,p_no_lngr_elig_flag     => 'Y'
            ,p_object_version_number => l_ovn
            ,p_per_in_ler_id         => l_per_in_ler_id
            ,p_effective_date        => p_effective_date
            ,p_datetrack_mode        => l_datetrack_mode
            ,p_multi_row_validate    => false
            );
Line: 1714

      ben_prtt_enrt_result_api.delete_enrollment
        (p_validate              => false ,
         p_prtt_enrt_rslt_id     => l_pen.prtt_enrt_rslt_id,
         p_per_in_ler_id         => l_per_in_ler_id,
         p_lee_rsn_id            => l_lee_rsn_id,
         -- PB : 5422
         p_enrt_perd_id          => l_enrt_perd_id, -- l_benmngle_parm_rec.popl_enrt_typ_cycl_id
         p_business_group_id     => p_business_group_id ,
         p_effective_start_date  => l_eff_strt,
         p_effective_end_date    => l_eff_end,
         p_object_version_number => l_pen.object_version_number,
         p_effective_date        => l_effective_date,
         p_datetrack_mode        => 'DELETE',
         p_multi_row_validate    => FALSE,
         p_source                => 'beninelg');