DBA Data[Home] [Help]

APPS.BEN_ELEMENT_ENTRY SQL Statements

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

Line: 61

    select distinct
           yp.start_date,yp.end_date
    from   ben_prtt_enrt_rslt_f pen,
           ben_popl_yr_perd pyp,
           ben_yr_perd yp
    where  pen.prtt_enrt_rslt_id = c_prtt_enrt_rslt_id
    and    pen.prtt_enrt_rslt_stat_cd is null
    and    c_effective_date <= pen.effective_end_date
    and    pyp.pl_id=pen.pl_id
    and    yp.yr_perd_id=pyp.yr_perd_id
    and    c_rate_start_or_end_dt
      between yp.start_date and yp.end_date;
Line: 79

    select distinct
           yp.start_date,yp.end_date
    from   ben_popl_yr_perd pyp,
           ben_yr_perd yp
    where  pyp.pl_id=c_pl_id
    and    yp.yr_perd_id=pyp.yr_perd_id
    and    c_rate_start_or_end_dt
      between yp.start_date and yp.end_date;
Line: 94

    select pen.prtt_enrt_rslt_id,
           pen.pl_id,
           opt.opt_id,
           pen.pgm_id,
           pen.ler_id,
           pen.pl_typ_id,
           pen.person_id,
           pen.effective_start_date,
           pen.effective_end_date,
	   pen.uom
    from   ben_prtt_enrt_rslt_f pen,
           ben_oipl_f opt
    where  pen.prtt_enrt_rslt_id = c_prtt_enrt_rslt_id
    and    pen.prtt_enrt_rslt_stat_cd is null
    and    opt.oipl_id(+)=pen.oipl_id
    and    pen.enrt_cvg_strt_dt between opt.effective_start_date(+)
    and    opt.effective_end_date(+)
    order by pen.effective_start_date desc;
Line: 121

    select prv.prtt_rt_val_id,
           prv.acty_base_rt_id,
           prv.prtt_enrt_rslt_id,
           prv.rt_strt_dt,
           prv.rt_end_dt,
           prv.business_group_id,
           prv.mlt_cd,
           prv.acty_ref_perd_cd,
           prv.rt_val,
           prv.cmcd_rt_val,
           prv.ann_rt_val,
           prv.per_in_ler_id,
           prv.element_entry_value_id,
           prv.prtt_reimbmt_rqst_id,
           prv.object_version_number
    from   ben_prtt_rt_val prv
    where  prtt_rt_val_id = c_prtt_rt_val_id;
Line: 152

    select 'Y'
    from pay_assignment_actions d,
         pay_payroll_actions e
   where d.assignment_id = c_assignment_id
     and d.payroll_action_id = e.payroll_action_id
     and e.action_type <> 'X';
Line: 176

 select d.assignment_action_id,
        g.end_date
   from pay_assignment_actions d,
        pay_payroll_actions e,
        per_time_periods g
  where d.assignment_id = c_assignment_id
    and g.payroll_id = c_payroll_id
    and g.payroll_id = e.payroll_id
    and d.payroll_action_id = e.payroll_action_id
    and e.action_type in ('R','Q')
    and e.time_period_id = g.time_period_id
    and e.date_earned between g.start_date and g.end_date
 order by g.end_date desc;
Line: 194

    select 'x'
      from pay_run_results h
     where h.element_type_id = c_element_type_id
       and h.assignment_action_id = c_assignment_action_id
       and h.status in ('P', 'PA')
       and h.source_type = 'E';
Line: 265

select  'Y'
  from  pay_run_results       prr,
        pay_element_entries_f pee
 where  pee.element_entry_id = p_element_entry_id
   and  p_effective_date between pee.effective_start_date
   and  pee.effective_end_date
   and  prr.source_id   = decode(pee.entry_type,
                                 'A', decode (adjust_ee_source,
                                              'T', pee.target_entry_id,
                                              pee.element_entry_id),
                                 'R', decode (adjust_ee_source,
                                              'T', pee.target_entry_id,
                                              pee.element_entry_id),
                                 pee.element_entry_id)
   and  prr.entry_type  = pee.entry_type
   and  prr.source_type = 'E'
   and  prr.status <> 'U'
   and  not exists
            (select 1
               from pay_run_results sub_rr
              where sub_rr.source_id = prr.run_result_id
                and sub_rr.source_type in ('R', 'V')) ;
Line: 293

select  'Y'
  from  pay_run_results         result,
        pay_assignment_actions  asgt_action,
        pay_payroll_actions     pay_action,
        per_time_periods        period
 where  result.source_id = nvl (p_original_entry_id, p_element_entry_id)
   and  result.status <> 'U'
   and  result.source_type = 'E'
   and  result.assignment_action_id     = asgt_action.assignment_action_id
   and  asgt_action.payroll_action_id   = pay_action.payroll_action_id
   and  pay_action.payroll_id = period.payroll_id
   and  pay_action.date_earned between period.start_date
   and  period.end_date
   and  not exists
        (select 1
           from pay_run_results rev_result
          where rev_result.source_id = result.run_result_id
            and rev_result.source_type in ('R', 'V'));
Line: 326

    select plr.rule_mode
    into  l_adjust_ee_source
    from  pay_legislation_rules plr
    ,     per_business_groups_perf pbgf
    where plr.rule_type          = 'ADJUSTMENT_EE_SOURCE'
    and   pbgf.legislation_code  = plr.legislation_code
    and   pbgf.business_group_id = p_business_group_id;
Line: 373

  g_ext_inpval_tab.delete;
Line: 422

    select eiv.extra_input_value_id,
           eiv.input_value_id,
           eiv.acty_base_rt_id,
           eiv.input_text,
           eiv.return_var_name,
           eiv.upd_when_ele_ended_cd
    from   ben_extra_input_values  eiv,
           pay_input_values_f piv
    where  eiv.acty_base_rt_id = p_acty_base_rt_id
      and  eiv.business_group_id = p_business_group_id
      and  piv.input_value_id = eiv.input_value_id
      and  p_effective_date between piv.effective_start_date
      and  piv.effective_end_date
    order by piv.display_sequence;
Line: 440

   select
       aba.*, pil.per_in_ler_id
   from per_absence_attendances aba,
        ben_per_in_ler pil,
        ben_ler_f ler
   where aba.person_id = p_person_id
     and pil.person_id = p_person_id
     and aba.absence_attendance_id = pil.trgr_table_pk_id
     and pil.ler_id = ler.ler_id
     and ler.typ_cd = 'ABS'
     and pil.per_in_ler_stat_cd = 'STRTD'
     and p_effective_date between
           ler.effective_start_date and ler.effective_end_date;
Line: 455

  select upper(replace(name,' ','_'))
    from pay_input_values_f
   where input_value_id = p_input_value_id1
     and p_effective_date between
           effective_start_date and effective_end_date;
Line: 604

    g_outputs.delete;
Line: 741

    select bg.legislation_code
    from   per_business_groups bg
    where  bg.business_group_id = p_business_group_id;
Line: 767

select input_value_id,
       screen_entry_value
  from pay_element_entry_values_f
 where element_entry_id = p_element_entry_id
   and p_effective_date between effective_start_date
   and effective_end_date;
Line: 776

select peev.input_value_id,
       peev.screen_entry_value,
       piv.UOM
  from pay_element_entry_values_f peev, pay_input_values_f piv
 where peev.element_entry_id = p_element_entry_id
   and p_effective_date between peev.effective_start_date and peev.effective_end_date
   and piv.input_value_id = peev.input_value_id
   and p_effective_date between piv.effective_start_date and piv.effective_end_date;
Line: 838

select pgm_uom
  from ben_pgm_f
 where pgm_id = c_pgm_id
   and c_effective_date between effective_start_date
   and effective_end_date
   and business_group_id = c_business_group_id;
Line: 849

select nip_pl_uom
  from ben_pl_f
 where pl_id = c_pl_id
   and c_effective_date between effective_start_date
   and effective_end_date
   and business_group_id = c_business_group_id;
Line: 912

  SELECT LTRIM
            ( TO_CHAR
              ( DECODE --round to min acct limits if available.
                ( fc.minimum_accountable_unit,
                  NULL, ROUND( nvalue, fc.precision ),
                  ROUND( nvalue / fc.minimum_accountable_unit ) * fc.minimum_accountable_unit
                )
              , CONCAT --construct NLS format mask.
                ( '99999999999999999990', --currencies formatted without NLS 'G'.
                  DECODE( fc.precision, 0, '', RPAD( 'D', fc.precision+1, '9' ) )
                )
              ), ' ' --left trim white space.
            )
    INTO changed_val
    FROM fnd_currencies fc
   WHERE fc.currency_code = p_curr_code;
Line: 947

  l_update                    boolean;
Line: 948

  l_update_override           boolean;
Line: 949

  l_update_change_insert      boolean;
Line: 960

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

  if l_update then
     l_upd_mode := hr_api.g_update;
Line: 966

  elsif l_update_override then
     l_upd_mode := hr_api.g_update_override;
Line: 995

  select qi.assignment_action_id,
         qi.element_entry_id,
         tp.end_date
  from   pay_assignment_actions  aa,
         pay_payroll_actions     pa,
         pay_quickpay_inclusions qi,
         pay_element_links_f     el,
         pay_element_entries_f   ee,
         per_time_periods        tp
  where  aa.assignment_id = p_assignment_id
  and    pa.payroll_action_id = aa.payroll_action_id
  and    pa.action_type = 'Q'
  and    pa.time_period_id = tp.time_period_id
  and    p_effective_date between tp.start_date and tp.end_date
  and    aa.assignment_action_id = qi.assignment_action_id
  and    ee.element_entry_id = qi.element_entry_id
  and    aa.assignment_id = ee.assignment_id
  and    el.element_link_id = ee.element_link_id
  and    el.element_type_id = p_element_type_id
  and    pa.effective_date between el.effective_start_date and
         el.effective_end_date
  and    pa.effective_date between ee.effective_start_date and
         ee.effective_end_date;
Line: 1022

        select end_date
        from   per_time_periods ptp
        where  ptp.payroll_id     = v_payroll_id
        and    ptp.end_date between
               v_start_date and v_end_date;
Line: 1052

               g_cache_quick_payrun_object.delete;
Line: 1053

              hr_utility.set_location('Delete  : Cache quick pay',113);
Line: 1079

procedure insert_into_quick_pay
     (p_person_id number,
      p_element_type_id number,
      p_assignment_id number,
      p_element_entry_id number,
      p_effective_date date,
      p_start_date  date,
      p_end_date    date,
      p_payroll_id  number) is
 --
  cursor c_periods(v_payroll_id in number,
                   v_start_date in date,
                   v_end_date   in date) is
        select end_date
        from   per_time_periods ptp
        where  ptp.payroll_id     = v_payroll_id
        and    ptp.end_date between
               v_start_date and v_end_date;
Line: 1102

   hr_utility.set_location('Enter : insert into quick pay',111);
Line: 1118

                  hr_utility.set_location('Insert quick pay'||p_element_entry_id,11);
Line: 1120

                  insert into pay_quickpay_inclusions (element_entry_id, assignment_action_id)
                  values (p_element_entry_id,g_cache_quick_payrun_object(j).assignment_action_id);
Line: 1148

    select abr.asmt_to_use_cd
    from   ben_acty_base_rt_f abr
    where  abr.acty_base_rt_id = c_acty_base_rt_id
      and  c_effective_date between
           abr.effective_start_date and abr.effective_end_date;
Line: 1162

         SELECT   asg.assignment_id, asg.payroll_id, asg.organization_id,
                  asg.effective_start_date, asg.effective_end_date
             FROM per_all_assignments_f asg, per_assignment_status_types ast
            WHERE asg.person_id = c_person_id
              AND asg.assignment_type <> 'C'
              AND asg.primary_flag = 'Y'
              AND asg.assignment_status_type_id = ast.assignment_status_type_id
              -- AND ast.per_system_status <> 'TERM_ASSIGN'   /* Bug 5655933  */
              AND asg.assignment_type =
                                  NVL (c_assignment_type, asg.assignment_type)
              AND c_effective_date BETWEEN asg.effective_start_date
                                       AND asg.effective_end_date
         ORDER BY asg.assignment_type DESC ; -- Bug 4463077 : Look for employee assignment and then for benefits asg
Line: 1472

    select payroll_id
    from pay_payrolls_f
    where business_group_id = c_business_group_id
    and   period_type       = 'Calendar Month'
    and   c_effective_date
      between effective_start_date and effective_end_date;
Line: 1522

    select nvl(abr.ele_entry_val_cd,'PP') ele_entry_val_cd,
           abr.name
    from   ben_acty_base_rt_f abr
    where  abr.acty_base_rt_id = p_acty_base_rt_id
      and  p_rate_date between abr.effective_start_date
                           and abr.effective_end_date;
Line: 1757

    select *
    from BEN_PRTL_MO_RT_PRTN_VAL_F
    where (acty_base_rt_id      = p_acty_base_rt_id or
           actl_prem_id         = p_actl_prem_id or
           cvg_amt_calc_mthd_id = p_cvg_amt_calc_mthd_id
          )
    and c_effective_date
      between effective_start_date and effective_end_date
    and to_number(to_char(c_start_or_stop_date,'DD'))
      between from_dy_mo_num and to_dy_mo_num
    and (num_days_month = to_number(to_char(last_day(c_start_or_stop_date),'DD')) or
           num_days_month is null)
      and c_start_or_stop_cd=
            decode(nvl(strt_r_stp_cvg_cd,'ETHR'),'ETHR',c_start_or_stop_cd,strt_r_stp_cvg_cd);
Line: 1779

     select 'Y'
     from BEN_PRTL_MO_RT_PRTN_VAL_F
     where (acty_base_rt_id      = p_acty_base_rt_id or
            actl_prem_id         = p_actl_prem_id or
            cvg_amt_calc_mthd_id = p_cvg_amt_calc_mthd_id
           )
     and prorate_by_day_to_mon_flag = 'Y'
     and c_effective_date
      between effective_start_date and effective_end_date;
Line: 1793

     select epe.elig_per_elctbl_chc_id
     from ben_elig_per_elctbl_chc epe
         ,ben_oipl_f oipl
         ,ben_per_in_ler pil
     where epe.per_in_ler_id = pil.per_in_ler_id
       and nvl(epe.pgm_id, -1) = nvl(p_pgm_id, -1)
       and epe.pl_id = p_pl_id
       and epe.pl_id = oipl.pl_id(+)
       and nvl(epe.oipl_id, -1) = oipl.oipl_id(+)
       and nvl(oipl.opt_id, -1) = nvl(p_opt_id, -1)
       and pil.person_id = p_person_id
       and pil.ler_id = p_ler_id
       and pil.per_in_ler_stat_cd = 'STRTD'
       and epe.business_group_id = p_business_group_id
       and pil.business_group_id = epe.business_group_id
       and epe.business_group_id = oipl.business_group_id(+)
       and p_effective_date
       between oipl.effective_start_date(+) and oipl.effective_end_date(+);
Line: 2173

     select asg.business_group_id,
            asg.payroll_id,
            asg.job_id,
            asg.grade_id,
            asg.position_id,
            asg.organization_id,
            asg.location_id,
            asg.pay_basis_id,
            asg.employment_category
     from per_all_assignments_f asg
     where asg.assignment_id = c_asg_id
     and   c_eff_date
       between asg.effective_start_date and asg.effective_end_date;
Line: 2194

     select elk.element_link_id,
            elk.business_group_id,
            elk.element_type_id,
            elk.payroll_id,
            elk.link_to_all_payrolls_flag,
            elk.job_id,
            elk.grade_id,
            elk.position_id,
            elk.organization_id,
            elk.location_id,
            elk.pay_basis_id,
            elk.employment_category,
            elk.people_group_id
     from pay_element_links_f elk
     where elk.element_type_id = c_elt_id
     and   c_eff_date
       between elk.effective_start_date and elk.effective_end_date;
Line: 2218

    select null
    from   pay_assignment_link_usages_f alu
    where  alu.assignment_id = c_asg_id
    and  alu.element_link_id = c_elk_id
    and  c_eff_date
      between alu.effective_start_date and alu.effective_end_date;
Line: 2231

     select el.element_link_id
     from   per_all_assignments_f asg,
            pay_element_links_f el
     where  asg.assignment_id = c_asg_id
       and  el.business_group_id = asg.business_group_id
       and  el.element_type_id   = c_elt_id
       and  c_eff_date
         between asg.effective_start_date and asg.effective_end_date
       and  c_eff_date
         between el.effective_start_date and el.effective_end_date
       and
            (
            (el.payroll_id is not null and
              el.payroll_id = asg.payroll_id)
        or  (el.link_to_all_payrolls_flag = 'Y' and
              asg.payroll_id is not null)
        or  (el.payroll_id is null and
              el.link_to_all_payrolls_flag = 'N')
            )
       and  (el.job_id is null or
             el.job_id = asg.job_id)
       and  (el.grade_id is null or
             el.grade_id = asg.grade_id)
       and  (el.position_id is null or
             el.position_id = asg.position_id)
       and  (el.organization_id is null or
             el.organization_id = asg.organization_id)
       and  (el.location_id is null or
             el.location_id = asg.location_id)
       and  (el.pay_basis_id is null or
             el.pay_basis_id = asg.pay_basis_id)
       and  (el.employment_category is null or
             el.employment_category = asg.employment_category)
       and  (el.people_group_id is null or exists
               (select null
                from   pay_assignment_link_usages_f alu
                where  alu.assignment_id = asg.assignment_id
                  and  alu.element_link_id = el.element_link_id
                  and  c_eff_date between alu.effective_start_date
                                          and alu.effective_end_date)
            )
;
Line: 2530

    select distinct
           elt.element_name,
           ele.element_entry_id,
           ele.effective_start_date,
           ele.effective_end_date,
           ele.object_version_number,
           ele.creator_id,
           ele.creator_type
     from  pay_element_entries_f ele,
           pay_element_links_f elk,
           pay_element_types_f elt
    where  ele.effective_start_date = (select min(ele2.effective_start_date)
                                       from pay_element_entries_f ele2
                                       where ele2.element_entry_id
                                    =  ele.element_entry_id)
      and  ele.effective_start_date > p_effective_date
      and  ele.assignment_id   = p_assignment_id
      and  nvl(ele.creator_id,-1) <> p_enrt_rslt_id
      and  ele.entry_type = 'E'
      and  ele.element_link_id = elk.element_link_id
      and  ele.effective_start_date between elk.effective_start_date
      and  elk.effective_end_date
      and  elk.element_type_id = p_element_type_id
      and  elt.element_type_id = elk.element_type_id
      and  elk.effective_start_date between elt.effective_start_date
      and  elt.effective_end_date
    order by ele.effective_start_date desc;
Line: 2561

  select abr.name rt_name,
         prv.rt_strt_dt
    from ben_prtt_enrt_rslt_f pen,
         ben_prtt_rt_val prv,
         ben_acty_base_rt_f abr
   where pen.person_id = p_person_id
     and pen.prtt_enrt_rslt_id = prv.prtt_enrt_rslt_id
     and prv.prtt_rt_val_stat_cd is null
     and pen.prtt_enrt_rslt_stat_cd is null
     and abr.acty_base_rt_id = prv.acty_base_rt_id
     and prv.rt_strt_dt between abr.effective_start_date
     and abr.effective_end_date
     and prv.element_entry_value_id in
           (select elv.element_entry_value_id
              from pay_element_entry_values_f elv
             where elv.element_entry_id = p_element_entry_id);
Line: 2581

  l_delete_warning        boolean;
Line: 2626

    py_element_entry_api.delete_element_entry
          (p_validate              =>p_validate
          ,p_datetrack_delete_mode =>hr_api.g_zap
          ,p_effective_date        =>l_future_ee_rec.effective_end_date
          ,p_element_entry_id      =>l_future_ee_rec.element_entry_id
          ,p_object_version_number =>l_future_ee_rec.object_version_number
          ,p_effective_start_date  =>l_effective_start_date
          ,p_effective_end_date    =>l_effective_end_date
          ,p_delete_warning        =>l_delete_warning);
Line: 2674

SELECT  per_in_ler_id
FROM    ben_prtt_rt_val
WHERE   prtt_rt_val_id = p_prtt_rt_val_id;
Line: 2679

SELECT  'X'
FROM    ben_prtt_rt_val
WHERE   prtt_enrt_rslt_id = p_enrt_rslt_id
AND     ended_per_in_ler_id = p_per_in_ler_id
AND     ann_rt_val = p_annual_amt;
Line: 2686

SELECT  ptp.start_date
FROM    per_time_periods ptp
WHERE   ptp.payroll_id = p_payroll_id
AND     ptp.start_date <= p_last_pp_strt_dt
ORDER BY ptp.start_date DESC;
Line: 2693

SELECT  ptp.end_date
FROM    per_time_periods ptp
WHERE   ptp.payroll_id = p_payroll_id
AND     ptp.end_date <= p_last_pp_end_dt
ORDER BY ptp.start_date DESC;
Line: 2700

SELECT  'X'
FROM    pay_element_entry_values_f
WHERE   element_entry_value_id IN
        (
        SELECT  element_entry_value_id
        FROM    ben_prtt_rt_val
        WHERE   prtt_enrt_rslt_id = p_enrt_rslt_id
        AND     prtt_rt_val_stat_cd IS NULL
        )
AND     effective_start_date >= l_pp_start_dt
AND     effective_end_date <= l_pp_end_dt
AND     screen_entry_value <> p_per_pay_amt;
Line: 2788

    select abr.prtl_mo_det_mthd_cd,
           abr.prtl_mo_det_mthd_rl,
           abr.wsh_rl_dy_mo_num,
           abr.prtl_mo_eff_dt_det_cd,
           abr.prtl_mo_eff_dt_det_rl,
           abr.rndg_cd,
           abr.rndg_rl,
           abr.ele_rqd_flag,
           abr.one_ann_pymt_cd,
           abr.entr_ann_val_flag,
           abr.use_calc_acty_bs_rt_flag,
           abr.acty_typ_cd,
           abr.input_va_calc_rl,
           abr.rt_typ_cd,
           abr.element_type_id,
           abr.input_value_id,
           abr.ele_entry_val_cd,
           abr.rt_mlt_cd,
           abr.parnt_chld_cd,
           abr.rcrrg_cd,
           abr.name
           -- bug 6441505
           ,abr.element_det_rl
    from   ben_acty_base_rt_f abr
    where  abr.acty_base_rt_id=c_acty_base_rt_id
      and  c_effective_date between abr.effective_start_date
      and abr.effective_end_date;
Line: 2824

    select ele.element_entry_id,
           ele.effective_start_date,
           ele.effective_end_date,
           ele.object_version_number,
           elv.element_entry_value_id
      from pay_element_entries_f ele,
           pay_element_entry_values_f elv
     where ele.element_link_id = p_element_link_id
       and ele.assignment_id   = p_assignment_id
       and (p_enrt_rslt_id is null or
            p_enrt_rslt_id = ele.creator_id)
       and (p_element_entry_id is null or
            p_element_entry_id = ele.element_entry_id)
       and p_effective_date between ele.effective_start_date
       and ele.effective_end_date
       and ele.entry_type = 'E'
       and elv.element_entry_id = ele.element_entry_id
       and elv.effective_start_date between ele.effective_start_date
       and ele.effective_end_date
       and elv.input_value_id = p_input_value_id;
Line: 2847

    select ele.element_entry_id,
           ele.effective_start_date,
           ele.effective_end_date,
           ele.object_version_number,
           elv.element_entry_value_id
      from pay_element_entries_f ele,
           pay_element_entry_values_f elv
     where p_effective_date between ele.effective_start_date
       and ele.effective_end_date
       and elv.element_entry_id = ele.element_entry_id
       and elv.element_entry_value_id = p_element_entry_value_id
       and elv.effective_start_date between ele.effective_start_date
       and ele.effective_end_date;
Line: 2863

    select max(ele.effective_end_date) max_ee_end_date
      from pay_element_entries_f ele
     where ele.element_entry_id = p_element_entry_id;
Line: 2874

    select eev.screen_entry_value,
           ee.object_version_number,
           ee.creator_id,
           ee.creator_type,
           ee.effective_start_date,
           ee.effective_end_date
    from   pay_element_entry_values_f eev,
           pay_element_entries_f ee
    where  eev.element_entry_id = p_element_entry_id
    and    eev.input_value_id   = p_input_value_id
    and    p_effective_date between eev.effective_start_date
    and    eev.effective_end_date
    and    ee.element_entry_id=eev.element_entry_id
    and    p_effective_date between ee.effective_start_date
    and    ee.effective_end_date;
Line: 2892

     select pet.element_name,
            pet.multiple_entries_allowed_flag,
            pet.processing_type
       from pay_element_types_f pet
      where pet.element_type_id = p_element_type_id
        and p_effective_date between pet.effective_start_date
            and pet.effective_end_date;
Line: 2902

    select abr.name
      from ben_prtt_enrt_rslt_f pen,
           ben_acty_base_rt_f abr,
           ben_prtt_rt_val prv
     where prv.acty_base_rt_id <> p_acty_base_rt_id
       and prv.element_entry_value_id = p_element_entry_value_id
       and prv.prtt_rt_val_stat_cd is null
       and abr.acty_base_rt_id = prv.acty_base_rt_id
       and prv.rt_strt_dt between abr.effective_start_date
       and abr.effective_end_date
       --bug# 3307450 added rt end dt condition to take care of element fix script
       and prv.rt_end_dt > p_rt_strt_dt
       and pen.prtt_enrt_rslt_id = prv.prtt_enrt_rslt_id
       and pen.prtt_enrt_rslt_stat_cd is null
       and pen.person_id = p_person_id;
Line: 2920

    select abr1.name
      from ben_prtt_enrt_rslt_f pen1,
           ben_prtt_enrt_rslt_f pen2,
           ben_acty_base_rt_f abr1,
           ben_prtt_rt_val prv1
     where pen2.prtt_enrt_rslt_id = p_enrt_rslt_id
       and pen1.prtt_enrt_rslt_id <> pen2.prtt_enrt_rslt_id
       and pen1.person_id = pen2.person_id
       and pen1.prtt_enrt_rslt_stat_cd is null
       and (nvl(pen1.pgm_id,-1) <> nvl(pen2.pgm_id,-1) or
            nvl(pen1.pl_id,-1) <> nvl(pen2.pl_id,-1) or
            nvl(pen1.oipl_id,-1) <> nvl(pen2.oipl_id,-1))
       and pen1.prtt_enrt_rslt_id = prv1.prtt_enrt_rslt_id
       and abr1.acty_base_rt_id = prv1.acty_base_rt_id
       and prv1.rt_strt_dt between abr1.effective_start_date
       and abr1.effective_end_date
       and p_rt_strt_dt between prv1.rt_strt_dt
       and prv1.rt_end_dt
       and prv1.prtt_rt_val_stat_cd is null
       and prv1.element_entry_value_id in
           (select pev.element_entry_value_id
              from pay_element_entry_values_f pev
             where pev.element_entry_id = p_element_entry_id);
Line: 2951

    select ele.element_entry_id,
           ele.element_link_id,
           ele.effective_start_date,
           ele.effective_end_date,
           ele.object_version_number,
           elv.screen_entry_value
     from  pay_element_entries_f ele,
           pay_element_entry_values_f elv,
           pay_element_links_f elk
    where  ele.creator_id = p_enrt_rslt_id
      and  ele.creator_type = 'F'
      and  ele.entry_type = 'E'
      and  ele.effective_start_date > p_effective_date
      and  ele.element_entry_id <> p_element_entry_id
      and  elv.element_entry_id = ele.element_entry_id
      and  elv.input_value_id = p_input_value_id
      and  elv.effective_start_date between ele.effective_start_date
      and  ele.effective_end_date
      and  ele.assignment_id   = p_assignment_id
      and  ele.element_link_id = elk.element_link_id
      and  ele.effective_start_date between elk.effective_start_date
      and  elk.effective_end_date
      and  elk.element_type_id = p_element_type_id
    order by ele.effective_start_date asc;
Line: 2986

    select start_date,end_date
    from   per_time_periods
    where  payroll_id     = p_payroll_id
    and    decode(p_prtl_mo_eff_dt_det_cd,'DTPD',regular_payment_date,
                                          'PPED',end_date,
                                          'DTERND',regular_payment_date,
                                           end_date)
                 <= p_end_date
    and    decode(p_prtl_mo_eff_dt_det_cd,'DTPD',regular_payment_date,
                                          'PPED',end_date,
                                          'DTERND',regular_payment_date,
                                           end_date)
                  >= p_start_date
    order by start_date desc;
Line: 3009

    select start_date,end_date
    from   per_time_periods
    where  payroll_id     = p_payroll_id
    and    decode(p_prtl_mo_eff_dt_det_cd,'DTPD',regular_payment_date,
                                          'DTERND',regular_payment_date,
                                          'PPED',end_date,
                                           end_date)
                 > p_end_date
    order by start_date;
Line: 3024

    select ptp.start_date,ptp.end_date
    from   per_time_periods ptp
    where  ptp.payroll_id = p_payroll_id
      and  ptp.end_date<=add_months(trunc(p_rt_start_date,'YYYY'),
                                    12)-1
    order by ptp.end_date desc;
Line: 3036

    select ptp.start_date,
           ptp.end_date
    from   per_time_periods ptp
    where  ptp.payroll_id = p_payroll_id
      and  ptp.start_date >  p_rt_start_date
    order by ptp.end_date asc;
Line: 3045

  select pil.per_in_ler_id,
         pil.lf_evt_ocrd_dt,
         pil.trgr_table_pk_id,
         ler.ler_id,
         ler.typ_cd
    from ben_per_in_ler pil,
         ben_ler_f ler
   where pil.per_in_ler_id = c_per_in_ler_id
     and ler.ler_id = pil.ler_id
     and c_effective_date between
         ler.effective_start_date and ler.effective_end_date;
Line: 3062

    select abr2.rt_mlt_cd,
           abr2.entr_ann_val_flag
    from   ben_acty_base_rt_f abr,
           ben_acty_base_rt_f abr2
    where  abr.acty_base_rt_id = c_acty_base_rt_id
    and    abr2.acty_base_rt_id = abr.parnt_acty_base_rt_id
    and    abr2.parnt_chld_cd = 'PARNT'
    and    c_effective_date
           between abr.effective_start_date
           and     abr.effective_end_date
    and    c_effective_date
           between abr2.effective_start_date
           and  abr2.effective_end_date;
Line: 3081

    select ptp.end_date
    from   per_time_periods ptp
    where  ptp.payroll_id = p_payroll_id
      and  p_rt_start_date between
            ptp.start_date and ptp.end_date ;
Line: 3092

    select nvl(ptp.regular_payment_date,ptp.end_date) end_date
           ,ptp.end_date ptp_end_date -- Bug 8985608
    from   per_time_periods ptp
    where  ptp.payroll_id = p_payroll_id
      and  p_rt_start_date between
            ptp.start_date and ptp.end_date ;
Line: 3116

     select ler.name name, ler.ler_id ler_id
     from   ben_prtt_rt_val prv,
	    ben_per_in_ler    pil,
	    ben_ler_f         ler
     where  prv.per_in_ler_id = pil.per_in_ler_id
     and    pil.ler_id = ler.ler_id
     and    prv.prtt_rt_val_id = p_prtt_rt_val_id
     and    prv.rt_strt_dt = p_rt_start_date;
Line: 3132

   SELECT ecr.enrt_rt_id
     FROM ben_enrt_rt ecr,
          ben_prtt_rt_val prv,
          ben_acty_base_rt_f abr
    WHERE prv.prtt_rt_val_id = ecr.prtt_rt_val_id
      AND prv.prtt_rt_val_stat_cd is NULL
      AND abr.acty_base_rt_id = prv.acty_base_rt_id
      AND ecr.acty_base_rt_id = prv.acty_base_rt_id
      AND prv.rt_strt_dt between abr.effective_start_date
      AND abr.effective_end_date
      AND prv.rt_end_dt > prv.rt_strt_dt
      AND ecr.business_group_id = p_business_group_id
      AND ecr.prtt_rt_val_id = p_prtt_rt_val_id
      AND ecr.acty_base_rt_id = p_acty_base_rt_id;
Line: 3151

  SELECT *
    FROM per_time_periods ptp
   WHERE payroll_id = p_payroll_id
     AND p_date BETWEEN ptp.start_date AND ptp.end_date ;
Line: 3164

       SELECT /*+ LEADING(ee)
                  INDEX(ee pay_element_entries_f_n51) */
              ee.*
       FROM   pay_element_entries_f  ee,
              pay_element_types_f    et,
              pay_element_links_f    el,
              pay_element_entry_values_f ev
       WHERE  el.element_link_id = ee.element_link_id
       AND    el.element_link_id = l_elem_link_id
       AND    el.element_type_id = et.element_type_id
       AND    ee.assignment_id = l_ass_id
       and    ev.ELEMENT_ENTRY_ID = ee.ELEMENT_ENTRY_ID
       and    ev.INPUT_VALUE_ID = l_input_value_id
       AND    l_normal_pp_dt BETWEEN ee.effective_start_date
                               AND     ee.effective_end_date
       AND    l_normal_pp_dt BETWEEN el.effective_start_date
                               AND     el.effective_end_date
       AND    l_normal_pp_dt BETWEEN et.effective_start_date
                               AND     et.effective_end_date
       AND    l_normal_pp_dt BETWEEN ev.effective_start_date
                               AND     ev.effective_end_date
       AND    et.multiple_entries_allowed_flag = 'N'
       AND    ee.entry_type = 'E'
       and    et.PROCESSING_TYPE = 'N';
Line: 3197

    select prv.* from ben_prtt_rt_val prv,
                  pay_element_entries_f et,
                  pay_element_entry_values_f ev
        where et.element_type_id = l_element_type_id
           and ev.input_value_id = l_input_value_id
           and et.ELEMENT_ENTRY_ID = l_ELEMENT_ENTRY_ID
           and et.ELEMENT_ENTRY_ID = ev.ELEMENT_ENTRY_ID
           and ev.ELEMENT_ENTRY_VALUE_ID =  prv.ELEMENT_ENTRY_VALUE_ID
           AND    l_normal_pp_dt BETWEEN et.effective_start_date
                               AND     et.effective_end_date
           AND    l_normal_pp_dt BETWEEN ev.effective_start_date
                               AND     ev.effective_end_date
          and prv.business_group_id = p_business_group_id;
Line: 3235

  l_delete_warning        BOOLEAN;
Line: 3237

  l_update_warning        BOOLEAN;
Line: 3241

  l_update_ee             boolean;
Line: 3357

       select pgm_id,pl_id,oipl_id--,pl_typ_id,ler_id -- 6716202
       from ben_prtt_enrt_rslt_f pen
       where pen.prtt_enrt_rslt_id = p_prtt_enrt_rslt_id
       and   pen.prtt_enrt_rslt_stat_cd is null
       and   rownum = 1 ;
Line: 3366

      select   distinct yp.start_date
      from     ben_popl_yr_perd pyp, ben_yr_perd yp
      where    pyp.pl_id = cv_pl_id
      and      pyp.yr_perd_id = yp.yr_perd_id
      and      pyp.business_group_id = p_business_group_id
      and      cv_effective_date BETWEEN yp.start_date AND yp.end_date
      and      yp.business_group_id = p_business_group_id ;
Line: 3375

       select
       max(prv.rt_strt_dt) max_strt_dt
       from  ben_prtt_enrt_rslt_f pen,
             ben_prtt_rt_val prv
       where pen.person_id = p_person_id
       and   pen.prtt_enrt_rslt_id = p_prtt_enrt_rslt_id
       and   pen.prtt_enrt_rslt_stat_cd is null
       and   pen.prtt_enrt_rslt_id = prv.prtt_enrt_rslt_id
       and   prv.acty_base_rt_id   = p_acty_base_rt_id
       and   prv.prtt_rt_val_id    <> p_prtt_rt_val_id
       and   (p_mlt_cd <>  'SAREC' OR (p_mlt_cd = 'SAREC' and prv.rt_strt_dt   >= l_yp_start_date))
       and   prv.rt_end_dt    <  p_rt_start_date
       and   prv.prtt_rt_val_stat_cd is null ;
Line: 3399

   select  count(prv.prtt_enrt_rslt_id)
    from ben_prtt_rt_val prv
   where prv.prtt_enrt_rslt_id = p_prtt_enrt_rslt_id
     and prv.acty_base_rt_id <> p_acty_base_rt_id
     and prv.rt_end_dt > c_effective_date
     and prv.prtt_rt_val_stat_cd is null
     and prv.element_entry_value_id in
         (select pev.element_entry_value_id
            from pay_element_entry_values_f pev
           where pev.element_entry_id = c_element_entry_id);
Line: 3414

      SELECT   ptp.start_date
      FROM     per_time_periods ptp
              ,per_all_assignments_f asg
      WHERE    ptp.regular_payment_date >= p_effective_start_date
      and      ptp.payroll_id = asg.payroll_id
      AND      ptp.start_date <= p_effective_start_date
      AND      p_business_group_id = asg.business_group_id
      AND      asg.primary_flag = 'Y'
      AND      asg.person_id = p_person_id
      AND      p_effective_start_date
               between asg.effective_start_date
                   and asg.effective_end_date
      order by ptp.regular_payment_date;
Line: 3431

       select pev.element_entry_value_id
       from  ben_prtt_enrt_rslt_f pen,
             ben_prtt_rt_val prv,
             pay_element_entry_values_f pev
       where pen.person_id = p_person_id
       and   pen.prtt_enrt_rslt_stat_cd is null
       and   pen.prtt_enrt_rslt_id = prv.prtt_enrt_rslt_id
       and   pen.prtt_enrt_rslt_id = p_prtt_enrt_rslt_id
       and   prv.mlt_cd            = 'SAREC'
       and   prv.acty_base_rt_id   = p_acty_base_rt_id
       and   prv.prtt_rt_val_id    <> p_prtt_rt_val_id
       and   prv.rt_strt_dt   = l_max_strt_dt
       and   prv.rt_end_dt    <  p_rt_start_date
       and   prv.prtt_rt_val_stat_cd is null
       and   prv.ann_rt_val = p_ann_rt_val
       and   pev.element_entry_value_id = prv.element_entry_value_id
       and   p_rt_start_date between pev.effective_start_date
       and   pev.effective_end_date ;
Line: 3454

       select pev.element_entry_value_id
       from  ben_prtt_enrt_rslt_f pen,
             ben_prtt_rt_val prv,
             pay_element_entry_values_f pev
       where pen.person_id = p_person_id
       and   pen.prtt_enrt_rslt_stat_cd is null
       and   pen.prtt_enrt_rslt_id = p_prtt_enrt_rslt_id
       and   pen.prtt_enrt_rslt_id = prv.prtt_enrt_rslt_id
       and   prv.acty_base_rt_id   = p_acty_base_rt_id
       and   prv.prtt_rt_val_id    <> p_prtt_rt_val_id
       and   prv.rt_strt_dt   = l_max_strt_dt
       and   prv.rt_end_dt    <  p_rt_start_date
       and   prv.prtt_rt_val_stat_cd is null
       and   prv.ann_rt_val = p_ann_rt_val
       and   prv.rt_val     = p_rt_val
       and   prv.cmcd_rt_val = p_cmcd_rt_val
       and   pev.element_entry_value_id = prv.element_entry_value_id
       and   p_rt_start_date between pev.effective_start_date
       and   pev.effective_end_date ;
Line: 3477

     select pee.element_entry_id,
            pee.effective_end_date,
            pee.object_version_number,
            pee.assignment_id,
            pee.element_type_id,
            pev.input_value_id,
            abr.ele_entry_val_cd                -- Bug 5575402
      from pay_element_entries_f pee,
            pay_element_entry_values_f pev,
            ben_acty_base_rt_f abr
      where pev.element_entry_value_id = l_ee_id
        and pee.element_entry_id = pev.element_entry_id
        and pev.effective_start_date between pee.effective_start_date
        and pee.effective_end_date
        and abr.acty_base_rt_id = p_acty_base_rt_id
        and pev.effective_start_date between abr.effective_start_date
        and abr.effective_end_date
        and abr.element_type_id = pee.element_type_id
        and abr.input_value_id = pev.input_value_id
     order by pee.effective_end_date desc;
Line: 3504

        select pay.period_type
        from   per_all_assignments_f asg,
               pay_payrolls_f pay,
               per_all_assignments_f asg2,
               pay_payrolls_f pay2
        where  asg.person_id = cp_person_id
           and   asg.assignment_type <> 'C'
           and asg.business_group_id = cp_business_group_id
           and asg.primary_flag = 'Y'
           and cp_effective_date between
               asg.effective_start_date and asg.effective_end_date
           and pay.payroll_id=asg.payroll_id
           and pay.business_group_id = asg.business_group_id
           and cp_effective_date between
               pay.effective_start_date and pay.effective_end_date
           and asg2.person_id = cp_person_id
           and   asg2.assignment_type <> 'C'
           and asg2.business_group_id = cp_business_group_id
           and asg2.primary_flag = 'Y'
           and cp_orig_effective_date between
               asg2.effective_start_date and asg2.effective_end_date
           and pay2.payroll_id=asg2.payroll_id
           and pay2.business_group_id = asg2.business_group_id
           and cp_orig_effective_date between
               pay2.effective_start_date and pay2.effective_end_date
           and pay2.period_type<>pay.period_type
           and asg.assignment_type = asg2.assignment_type ;
Line: 3541

       select  screen_entry_value,element_entry_value_id
         from  pay_element_entry_values_f pev
        where  pev.input_value_id = p_input_value_id
          and  pev.element_entry_value_id = p_element_entry_value_id
          and  p_rt_start_date between pev.effective_start_date
          and  pev.effective_end_date ;
Line: 3550

      select  rt_val
        from  ben_prtt_rt_val prv
   	 where  prv.prtt_rt_val_id = p_prtt_rt_val_id
 	      and  p_rt_start_date between prv.rt_strt_dt
			and  prv.rt_end_dt;
Line: 3562

        select element_entry_id
         from  pay_element_entry_values_f pev
        where  pev.input_value_id = p_input_value_id
          and  l_max_strt_dt between pev.effective_start_date
          and  pev.effective_end_date ;
Line: 3749

            ben_prtt_rt_val_api.update_prtt_rt_val
            (p_validate                => p_validate
            ,p_person_id               => p_person_id
            ,p_prtt_rt_val_id          => p_prtt_rt_val_id
            ,p_business_group_id       => p_business_group_id
            ,p_element_entry_value_id  => l_ee_id
            ,p_input_value_id          => p_input_value_id
            ,p_object_version_number   => p_prv_object_version_number
            ,p_effective_date          => p_rt_start_date
            );
Line: 3771

                 py_element_entry_api.delete_element_entry
                 (p_validate              =>p_validate
                 ,p_datetrack_delete_mode =>'FUTURE_CHANGE'
                 ,p_effective_date        =>l_fsa_ee_effective_end_date
                 ,p_element_entry_id      =>l_fsa_element_entry_id
                 ,p_object_version_number =>l_fsa_ovn
                 ,p_effective_start_date  =>l_effective_start_date
                 ,p_effective_end_date    =>l_effective_end_date
                 ,p_delete_warning        =>l_delete_warning);
Line: 4010

            ben_prtt_rt_val_api.update_prtt_rt_val
            (p_validate                => p_validate
            ,p_person_id               => p_person_id
            ,p_prtt_rt_val_id          => p_prtt_rt_val_id
            ,p_business_group_id       => p_business_group_id
            ,p_element_entry_value_id  => l_ee_id
            ,p_input_value_id          => p_input_value_id
            ,p_object_version_number   => p_prv_object_version_number
            ,p_effective_date          => p_rt_start_date
            );
Line: 4032

                 py_element_entry_api.delete_element_entry
                 (p_validate              =>p_validate
                 ,p_datetrack_delete_mode =>'FUTURE_CHANGE'
                 ,p_effective_date        =>l_fsa_ee_effective_end_date
                 ,p_element_entry_id      =>l_fsa_element_entry_id
                 ,p_object_version_number =>l_fsa_ovn
                 ,p_effective_start_date  =>l_effective_start_date
                 ,p_effective_end_date    =>l_effective_end_date
                 ,p_delete_warning        =>l_delete_warning);
Line: 4489

       py_element_entry_api.delete_element_entry
       (p_validate              =>p_validate
       ,p_datetrack_delete_mode =>'FUTURE_CHANGE'
       ,p_effective_date        =>l_ee_effective_end_date
       ,p_element_entry_id      =>l_element_entry_id
       ,p_object_version_number =>l_object_version_number
       ,p_effective_start_date  =>l_effective_start_date
       ,p_effective_end_date    =>l_effective_end_date
       ,p_delete_warning        =>l_delete_warning);
Line: 5440

    l_update_ee:=true;
Line: 5443

      hr_utility.set_location('inserting mode ',90);
Line: 5445

    l_update_ee:=false;
Line: 5516

      if l_update_ee then
        open get_current_value(l_element_entry_id,l_input_value_id,
                               l_zero_pp_date);
Line: 5563

          py_element_entry_api.update_element_entry
            (p_validate                      =>p_validate
            ,p_override_user_ent_chk         =>'Y'
            ,p_datetrack_update_mode         =>l_upd_mode
            ,p_effective_date                =>l_zero_pp_date
            ,p_business_group_id             =>p_business_group_id
            ,p_element_entry_id              =>l_element_entry_id
            ,p_object_version_number         =>l_object_version_number
            ,p_creator_type                  =>'F'
            ,p_creator_id                    =>p_enrt_rslt_id
            ,p_input_value_id1               =>g_ext_inpval_tab(1).input_value_id
            ,p_entry_value1                  =>g_ext_inpval_tab(1).return_value
            ,p_input_value_id2               =>g_ext_inpval_tab(2).input_value_id
            ,p_entry_value2                  =>g_ext_inpval_tab(2).return_value
            ,p_input_value_id3               =>g_ext_inpval_tab(3).input_value_id
            ,p_entry_value3                  =>g_ext_inpval_tab(3).return_value
            ,p_input_value_id4               =>g_ext_inpval_tab(4).input_value_id
            ,p_entry_value4                  =>g_ext_inpval_tab(4).return_value
            ,p_input_value_id5               =>g_ext_inpval_tab(5).input_value_id
            ,p_entry_value5                  =>g_ext_inpval_tab(5).return_value
            ,p_input_value_id6               =>g_ext_inpval_tab(6).input_value_id
            ,p_entry_value6                  =>g_ext_inpval_tab(6).return_value
            ,p_input_value_id7               =>g_ext_inpval_tab(7).input_value_id
            ,p_entry_value7                  =>g_ext_inpval_tab(7).return_value
            ,p_input_value_id8               =>g_ext_inpval_tab(8).input_value_id
            ,p_entry_value8                  =>g_ext_inpval_tab(8).return_value
            ,p_input_value_id9               =>g_ext_inpval_tab(9).input_value_id
            ,p_entry_value9                  =>g_ext_inpval_tab(9).return_value
            ,p_input_value_id10              =>g_ext_inpval_tab(10).input_value_id
            ,p_entry_value10                 =>g_ext_inpval_tab(10).return_value
            ,p_input_value_id11              =>g_ext_inpval_tab(11).input_value_id
            ,p_entry_value11                 =>g_ext_inpval_tab(11).return_value
            ,p_input_value_id12              =>g_ext_inpval_tab(12).input_value_id
            ,p_entry_value12                 =>g_ext_inpval_tab(12).return_value
            ,p_input_value_id13              =>g_ext_inpval_tab(13).input_value_id
            ,p_entry_value13                 =>g_ext_inpval_tab(13).return_value
            ,p_input_value_id14              =>g_ext_inpval_tab(14).input_value_id
            ,p_entry_value14                 =>g_ext_inpval_tab(14).return_value
            ,p_input_value_id15              =>l_input_value_id
            ,p_entry_value15                 =>0
            ,p_effective_start_date          =>l_effective_start_date
            ,p_effective_end_date            =>l_effective_end_date
            ,p_update_warning                =>l_update_warning
            );
Line: 5632

              py_element_entry_api.update_element_entry
                (p_validate                      =>p_validate
                ,p_datetrack_update_mode         =>l_upd_mode
                ,p_effective_date                =>l_zero_pp_date
                ,p_business_group_id             =>p_business_group_id
                ,p_element_entry_id              =>l_element_entry_id
                ,p_object_version_number         =>l_object_version_number
                ,p_override_user_ent_chk         => 'Y'
                ,p_creator_type                  =>'F'
                ,p_creator_id                    =>p_enrt_rslt_id
                ,p_input_value_id1               =>g_ext_inpval_tab(1).input_value_id
                ,p_entry_value1                  =>g_ext_inpval_tab(1).return_value
                ,p_input_value_id2               =>g_ext_inpval_tab(2).input_value_id
                ,p_entry_value2                  =>g_ext_inpval_tab(2).return_value
                ,p_input_value_id3               =>g_ext_inpval_tab(3).input_value_id
                ,p_entry_value3                  =>g_ext_inpval_tab(3).return_value
                ,p_input_value_id4               =>g_ext_inpval_tab(4).input_value_id
                ,p_entry_value4                  =>g_ext_inpval_tab(4).return_value
                ,p_input_value_id5               =>g_ext_inpval_tab(5).input_value_id
                ,p_entry_value5                  =>g_ext_inpval_tab(5).return_value
                ,p_input_value_id6               =>g_ext_inpval_tab(6).input_value_id
                ,p_entry_value6                  =>g_ext_inpval_tab(6).return_value
                ,p_input_value_id7               =>g_ext_inpval_tab(7).input_value_id
                ,p_entry_value7                  =>g_ext_inpval_tab(7).return_value
                ,p_input_value_id8               =>g_ext_inpval_tab(8).input_value_id
                ,p_entry_value8                  =>g_ext_inpval_tab(8).return_value
                ,p_input_value_id9               =>g_ext_inpval_tab(9).input_value_id
                ,p_entry_value9                  =>g_ext_inpval_tab(9).return_value
                ,p_input_value_id10              =>g_ext_inpval_tab(10).input_value_id
                ,p_entry_value10                 =>g_ext_inpval_tab(10).return_value
                ,p_input_value_id11              =>g_ext_inpval_tab(11).input_value_id
                ,p_entry_value11                 =>g_ext_inpval_tab(11).return_value
                ,p_input_value_id12              =>g_ext_inpval_tab(12).input_value_id
                ,p_entry_value12                 =>g_ext_inpval_tab(12).return_value
                ,p_input_value_id13              =>g_ext_inpval_tab(13).input_value_id
                ,p_entry_value13                 =>g_ext_inpval_tab(13).return_value
                ,p_input_value_id14              =>g_ext_inpval_tab(14).input_value_id
                ,p_entry_value14                 =>g_ext_inpval_tab(14).return_value
                ,p_effective_start_date          =>l_effective_start_date
                ,p_effective_end_date            =>l_effective_end_date
                ,p_update_warning                =>l_update_warning
                );
Line: 5738

        l_update_ee:=true;
Line: 5767

        py_element_entry_api.update_element_entry
          (p_validate              => p_validate
          ,p_datetrack_update_mode => hr_api.g_correction
          ,p_effective_date        => l_zero_pp_date
          ,p_business_group_id     => p_business_group_id
          ,p_element_entry_id      => l_element_entry_id
          ,p_override_user_ent_chk =>'Y'
          ,p_object_version_number => l_object_version_number
          ,p_creator_type          => 'F'
          ,p_creator_id            => p_enrt_rslt_id
          ,p_effective_start_date  => l_effective_start_date
          ,p_effective_end_date    => l_effective_end_date
          ,p_update_warning        => l_update_warning
          );
Line: 5836

      if l_update_ee then
        --
        open get_current_value(l_element_entry_id,l_input_value_id,
                               l_special_pp_date);
Line: 5890

          py_element_entry_api.update_element_entry
            (p_validate                      =>p_validate
            ,p_datetrack_update_mode         =>l_upd_mode
            ,p_effective_date                =>l_special_pp_date
            ,p_business_group_id             =>p_business_group_id
            ,p_element_entry_id              =>l_element_entry_id
            ,p_override_user_ent_chk         =>'Y'
            ,p_object_version_number         =>l_object_version_number
            ,p_creator_type                  =>'F'
            ,p_creator_id                    =>p_enrt_rslt_id
            ,p_input_value_id1               =>g_ext_inpval_tab(1).input_value_id
            ,p_entry_value1                  =>g_ext_inpval_tab(1).return_value
            ,p_input_value_id2               =>g_ext_inpval_tab(2).input_value_id
            ,p_entry_value2                  =>g_ext_inpval_tab(2).return_value
            ,p_input_value_id3               =>g_ext_inpval_tab(3).input_value_id
            ,p_entry_value3                  =>g_ext_inpval_tab(3).return_value
            ,p_input_value_id4               =>g_ext_inpval_tab(4).input_value_id
            ,p_entry_value4                  =>g_ext_inpval_tab(4).return_value
            ,p_input_value_id5               =>g_ext_inpval_tab(5).input_value_id
            ,p_entry_value5                  =>g_ext_inpval_tab(5).return_value
            ,p_input_value_id6               =>g_ext_inpval_tab(6).input_value_id
            ,p_entry_value6                  =>g_ext_inpval_tab(6).return_value
            ,p_input_value_id7               =>g_ext_inpval_tab(7).input_value_id
            ,p_entry_value7                  =>g_ext_inpval_tab(7).return_value
            ,p_input_value_id8               =>g_ext_inpval_tab(8).input_value_id
            ,p_entry_value8                  =>g_ext_inpval_tab(8).return_value
            ,p_input_value_id9               =>g_ext_inpval_tab(9).input_value_id
            ,p_entry_value9                  =>g_ext_inpval_tab(9).return_value
            ,p_input_value_id10              =>g_ext_inpval_tab(10).input_value_id
            ,p_entry_value10                 =>g_ext_inpval_tab(10).return_value
            ,p_input_value_id11              =>g_ext_inpval_tab(11).input_value_id
            ,p_entry_value11                 =>g_ext_inpval_tab(11).return_value
            ,p_input_value_id12              =>g_ext_inpval_tab(12).input_value_id
            ,p_entry_value12                 =>g_ext_inpval_tab(12).return_value
            ,p_input_value_id13              =>g_ext_inpval_tab(13).input_value_id
            ,p_entry_value13                 =>g_ext_inpval_tab(13).return_value
            ,p_input_value_id14              =>g_ext_inpval_tab(14).input_value_id
            ,p_entry_value14                 =>g_ext_inpval_tab(14).return_value
            ,p_input_value_id15              =>l_input_value_id
            ,p_entry_value15                 =>l_special_amt
            ,p_effective_start_date          =>l_effective_start_date
            ,p_effective_end_date            =>l_effective_end_date
            ,p_update_warning                =>l_update_warning
            );
Line: 5959

              py_element_entry_api.update_element_entry
                (p_validate                      =>p_validate
                ,p_datetrack_update_mode         =>l_upd_mode
                ,p_effective_date                =>l_special_pp_date
                ,p_business_group_id             =>p_business_group_id
                ,p_element_entry_id              =>l_element_entry_id
                ,p_override_user_ent_chk         =>'Y'
                ,p_object_version_number         =>l_object_version_number
                ,p_creator_type                  =>'F'
                ,p_creator_id                    =>p_enrt_rslt_id
                ,p_input_value_id1               =>g_ext_inpval_tab(1).input_value_id
                ,p_entry_value1                  =>g_ext_inpval_tab(1).return_value
                ,p_input_value_id2               =>g_ext_inpval_tab(2).input_value_id
                ,p_entry_value2                  =>g_ext_inpval_tab(2).return_value
                ,p_input_value_id3               =>g_ext_inpval_tab(3).input_value_id
                ,p_entry_value3                  =>g_ext_inpval_tab(3).return_value
                ,p_input_value_id4               =>g_ext_inpval_tab(4).input_value_id
                ,p_entry_value4                  =>g_ext_inpval_tab(4).return_value
                ,p_input_value_id5               =>g_ext_inpval_tab(5).input_value_id
                ,p_entry_value5                  =>g_ext_inpval_tab(5).return_value
                ,p_input_value_id6               =>g_ext_inpval_tab(6).input_value_id
                ,p_entry_value6                  =>g_ext_inpval_tab(6).return_value
                ,p_input_value_id7               =>g_ext_inpval_tab(7).input_value_id
                ,p_entry_value7                  =>g_ext_inpval_tab(7).return_value
                ,p_input_value_id8               =>g_ext_inpval_tab(8).input_value_id
                ,p_entry_value8                  =>g_ext_inpval_tab(8).return_value
                ,p_input_value_id9               =>g_ext_inpval_tab(9).input_value_id
                ,p_entry_value9                  =>g_ext_inpval_tab(9).return_value
                ,p_input_value_id10              =>g_ext_inpval_tab(10).input_value_id
                ,p_entry_value10                 =>g_ext_inpval_tab(10).return_value
                ,p_input_value_id11              =>g_ext_inpval_tab(11).input_value_id
                ,p_entry_value11                 =>g_ext_inpval_tab(11).return_value
                ,p_input_value_id12              =>g_ext_inpval_tab(12).input_value_id
                ,p_entry_value12                 =>g_ext_inpval_tab(12).return_value
                ,p_input_value_id13              =>g_ext_inpval_tab(13).input_value_id
                ,p_entry_value13                 =>g_ext_inpval_tab(13).return_value
                ,p_input_value_id14              =>g_ext_inpval_tab(14).input_value_id
                ,p_entry_value14                 =>g_ext_inpval_tab(14).return_value
                ,p_effective_start_date          =>l_effective_start_date
                ,p_effective_end_date            =>l_effective_end_date
                ,p_update_warning                =>l_update_warning
                );
Line: 6066

        l_update_ee:=true;
Line: 6095

        py_element_entry_api.update_element_entry
          (p_validate                      => p_validate
          ,p_datetrack_update_mode         => hr_api.g_correction
          ,p_effective_date                => l_special_pp_date
          ,p_business_group_id             => p_business_group_id
          ,p_element_entry_id              => l_element_entry_id
          ,p_override_user_ent_chk         =>'Y'
          ,p_object_version_number         => l_object_version_number
          ,p_creator_type                  => 'F'
          ,p_creator_id                    => p_enrt_rslt_id
          ,p_effective_start_date          => l_effective_start_date
          ,p_effective_end_date            => l_effective_end_date
          ,p_update_warning                => l_update_warning
          );
Line: 6218

      if l_update_ee then
	    l_skip := true; -- Bug 13526198
Line: 6278

          py_element_entry_api.update_element_entry
            (p_validate                      =>p_validate
            ,p_datetrack_update_mode         =>l_upd_mode
            ,p_effective_date                =>l_normal_pp_date
            ,p_business_group_id             =>p_business_group_id
            ,p_element_entry_id              =>l_element_entry_id
            ,p_override_user_ent_chk         =>'Y'
            ,p_object_version_number         =>l_object_version_number
            ,p_creator_type                  =>'F'
            ,p_creator_id                    =>p_enrt_rslt_id
            ,p_input_value_id1               =>g_ext_inpval_tab(1).input_value_id
            ,p_entry_value1                  =>g_ext_inpval_tab(1).return_value
            ,p_input_value_id2               =>g_ext_inpval_tab(2).input_value_id
            ,p_entry_value2                  =>g_ext_inpval_tab(2).return_value
            ,p_input_value_id3               =>g_ext_inpval_tab(3).input_value_id
            ,p_entry_value3                  =>g_ext_inpval_tab(3).return_value
            ,p_input_value_id4               =>g_ext_inpval_tab(4).input_value_id
            ,p_entry_value4                  =>g_ext_inpval_tab(4).return_value
            ,p_input_value_id5               =>g_ext_inpval_tab(5).input_value_id
            ,p_entry_value5                  =>g_ext_inpval_tab(5).return_value
            ,p_input_value_id6               =>g_ext_inpval_tab(6).input_value_id
            ,p_entry_value6                  =>g_ext_inpval_tab(6).return_value
            ,p_input_value_id7               =>g_ext_inpval_tab(7).input_value_id
            ,p_entry_value7                  =>g_ext_inpval_tab(7).return_value
            ,p_input_value_id8               =>g_ext_inpval_tab(8).input_value_id
            ,p_entry_value8                  =>g_ext_inpval_tab(8).return_value
            ,p_input_value_id9               =>g_ext_inpval_tab(9).input_value_id
            ,p_entry_value9                  =>g_ext_inpval_tab(9).return_value
            ,p_input_value_id10              =>g_ext_inpval_tab(10).input_value_id
            ,p_entry_value10                 =>g_ext_inpval_tab(10).return_value
            ,p_input_value_id11              =>g_ext_inpval_tab(11).input_value_id
            ,p_entry_value11                 =>g_ext_inpval_tab(11).return_value
            ,p_input_value_id12              =>g_ext_inpval_tab(12).input_value_id
            ,p_entry_value12                 =>g_ext_inpval_tab(12).return_value
            ,p_input_value_id13              =>g_ext_inpval_tab(13).input_value_id
            ,p_entry_value13                 =>g_ext_inpval_tab(13).return_value
            ,p_input_value_id14              =>g_ext_inpval_tab(14).input_value_id
            ,p_entry_value14                 =>g_ext_inpval_tab(14).return_value
            ,p_input_value_id15              =>l_input_value_id
            ,p_entry_value15                 =>l_per_pay_amt
            ,p_effective_start_date          =>l_effective_start_date
            ,p_effective_end_date            =>l_effective_end_date
            ,p_update_warning                =>l_update_warning
            );
Line: 6345

              py_element_entry_api.update_element_entry
                (p_validate                      =>p_validate
                ,p_datetrack_update_mode         =>l_upd_mode
                ,p_effective_date                =>l_normal_pp_date
                ,p_business_group_id             =>p_business_group_id
                ,p_element_entry_id              =>l_element_entry_id
                ,p_override_user_ent_chk         =>'Y'
                ,p_object_version_number         =>l_object_version_number
                ,p_creator_type                  =>'F'
                ,p_creator_id                    =>p_enrt_rslt_id
                ,p_input_value_id1               =>g_ext_inpval_tab(1).input_value_id
                ,p_entry_value1                  =>g_ext_inpval_tab(1).return_value
                ,p_input_value_id2               =>g_ext_inpval_tab(2).input_value_id
                ,p_entry_value2                  =>g_ext_inpval_tab(2).return_value
                ,p_input_value_id3               =>g_ext_inpval_tab(3).input_value_id
                ,p_entry_value3                  =>g_ext_inpval_tab(3).return_value
                ,p_input_value_id4               =>g_ext_inpval_tab(4).input_value_id
                ,p_entry_value4                  =>g_ext_inpval_tab(4).return_value
                ,p_input_value_id5               =>g_ext_inpval_tab(5).input_value_id
                ,p_entry_value5                  =>g_ext_inpval_tab(5).return_value
                ,p_input_value_id6               =>g_ext_inpval_tab(6).input_value_id
                ,p_entry_value6                  =>g_ext_inpval_tab(6).return_value
                ,p_input_value_id7               =>g_ext_inpval_tab(7).input_value_id
                ,p_entry_value7                  =>g_ext_inpval_tab(7).return_value
                ,p_input_value_id8               =>g_ext_inpval_tab(8).input_value_id
                ,p_entry_value8                  =>g_ext_inpval_tab(8).return_value
                ,p_input_value_id9               =>g_ext_inpval_tab(9).input_value_id
                ,p_entry_value9                  =>g_ext_inpval_tab(9).return_value
                ,p_input_value_id10              =>g_ext_inpval_tab(10).input_value_id
                ,p_entry_value10                 =>g_ext_inpval_tab(10).return_value
                ,p_input_value_id11              =>g_ext_inpval_tab(11).input_value_id
                ,p_entry_value11                 =>g_ext_inpval_tab(11).return_value
                ,p_input_value_id12              =>g_ext_inpval_tab(12).input_value_id
                ,p_entry_value12                 =>g_ext_inpval_tab(12).return_value
                ,p_input_value_id13              =>g_ext_inpval_tab(13).input_value_id
                ,p_entry_value13                 =>g_ext_inpval_tab(13).return_value
                ,p_input_value_id14              =>g_ext_inpval_tab(14).input_value_id
                ,p_entry_value14                 =>g_ext_inpval_tab(14).return_value
                ,p_effective_start_date          =>l_effective_start_date
                ,p_effective_end_date            =>l_effective_end_date
                ,p_update_warning                =>l_update_warning
                );
Line: 6407

		 delete the old element entry, set the element_entry_value_id on rate record to NULL and create a
		 new element entry for the payroll period. Added code in the else part c_entry_exists%FOUND */
        open c_entry_exists(l_normal_pp_date, l_element_link_id, l_assignment_id,p_input_value_id);
Line: 6462

		--  Tell next steps to update instead of create
		--

		l_update_ee:=true;
Line: 6494

		py_element_entry_api.update_element_entry
		(p_validate                      =>p_validate
		,p_datetrack_update_mode         =>hr_api.g_correction
		,p_effective_date                =>l_normal_pp_date
		,p_business_group_id             =>p_business_group_id
		,p_element_entry_id              =>l_element_entry_id
		,p_override_user_ent_chk         =>'Y'
		,p_object_version_number         =>l_object_version_number
		,p_creator_type                  =>'F'
		,p_creator_id                    => p_enrt_rslt_id
		,p_effective_start_date          =>l_effective_start_date
		,p_effective_end_date            =>l_effective_end_date
		,p_update_warning                =>l_update_warning
		);
Line: 6528

               ben_prtt_rt_val_api.update_prtt_rt_val(
                                p_validate => p_validate
                               ,p_prtt_rt_val_id =>  j.prtt_rt_val_id
                               ,p_element_entry_value_id => NULL
                               ,p_object_version_number  => j.object_version_number
                               ,p_effective_date=> j.RT_STRT_DT
                               ,p_business_group_id => p_business_group_id);
Line: 6538

		       py_element_entry_api.delete_element_entry
		        (p_validate              => p_validate
		        ,p_datetrack_delete_mode => hr_api.g_zap
		        ,p_effective_date        => l_entry_exists.effective_start_date
		        ,p_element_entry_id      => l_entry_exists.element_entry_id
		        ,p_object_version_number => l_entry_exists.object_version_number
		        ,p_effective_start_date  => l_effective_start_date
		        ,p_effective_end_date    => l_effective_end_date
		        ,p_delete_warning        => l_delete_warning
		        );
Line: 6553

		        (p_action               => hr_api.g_delete
		        ,p_old_amt              => l_per_pay_amt
		        ,p_input_value_id       => l_input_value_id
		        ,p_element_entry_id     => l_element_entry_id
		        ,p_person_id            => p_person_id
		        ,p_business_group_id    => p_business_group_id
		        ,p_effective_date       => l_normal_pp_end_date
		        );*/
Line: 6619

		         py_element_entry_api.update_element_entry
		        (p_validate                      =>p_validate
		        ,p_datetrack_update_mode         =>hr_api.g_correction
		        ,p_effective_date                =>l_normal_pp_date
		        ,p_business_group_id             =>p_business_group_id
		        ,p_element_entry_id              =>l_element_entry_id
		        ,p_override_user_ent_chk         =>'Y'
		        ,p_object_version_number         =>l_object_version_number
		        ,p_creator_type                  =>'F'
		        ,p_creator_id                    => p_enrt_rslt_id
		        ,p_effective_start_date          =>l_effective_start_date
		        ,p_effective_end_date            =>l_effective_end_date
		        ,p_update_warning                =>l_update_warning
		        );
Line: 6696

				  py_element_entry_api.update_element_entry
						 (p_validate              =>p_validate
						 ,p_datetrack_update_mode =>hr_api.g_correction
						 ,p_effective_date        =>l_future_ee_rec.effective_start_date
						 ,p_business_group_id     =>p_business_group_id
						 ,p_element_entry_id      =>l_future_ee_rec.element_entry_id
						 ,p_override_user_ent_chk =>'Y'
						 ,p_object_version_number =>l_future_ee_rec.object_version_number
						 ,p_input_value_id1       =>l_input_value_id
						 ,p_entry_value1          =>l_per_pay_amt
						 ,p_effective_start_date  =>l_effective_start_date
						 ,p_effective_end_date    =>l_effective_end_date
						 ,p_update_warning        =>l_update_warning
						 );
Line: 6920

           py_element_entry_api.update_element_entry
           (p_validate                      =>p_validate
           ,p_datetrack_update_mode         =>hr_api.g_correction
           ,p_effective_date                =>l_effective_date
           ,p_business_group_id             =>p_business_group_id
           ,p_element_entry_id              =>l_element_entry_id
           ,p_override_user_ent_chk         =>'Y'
           ,p_object_version_number         =>l_object_version_number
           ,p_creator_type                  =>'F'
           ,p_creator_id                    =>p_enrt_rslt_id
           ,p_effective_start_date          =>l_effective_start_date
           ,p_effective_end_date            =>l_effective_end_date
           ,p_update_warning                =>l_update_warning
           );
Line: 7020

      py_element_entry_api.delete_element_entry
        (p_validate              => p_validate
        ,p_datetrack_delete_mode => hr_api.g_delete
        ,p_effective_date        => l_normal_pp_end_date
        ,p_element_entry_id      => l_element_entry_id
        ,p_object_version_number => l_object_version_number
        ,p_effective_start_date  => l_effective_start_date
        ,p_effective_end_date    => l_effective_end_date
        ,p_delete_warning        => l_delete_warning
        );
Line: 7034

        (p_action               => hr_api.g_delete
        ,p_old_amt              => l_per_pay_amt
        ,p_input_value_id       => l_input_value_id
        ,p_element_entry_id     => l_element_entry_id
        ,p_person_id            => p_person_id
        ,p_business_group_id    => p_business_group_id
        ,p_effective_date       => l_normal_pp_end_date
        );
Line: 7120

     insert_into_quick_pay
        (p_person_id        => p_person_id,
         p_element_type_id  => l_element_type_id,
         p_assignment_id    => l_assignment_id,
         p_element_entry_id => l_element_entry_id,
         p_effective_date   => l_rt_strt_dt,
         p_start_date       => l_rt_strt_dt,
         p_end_date         => g_max_end_date,
         p_payroll_id       => l_payroll_id);
Line: 7135

      hr_utility.set_location('update prtt_rt_val',180);
Line: 7141

       ben_prtt_rt_val_api.update_prtt_rt_val
      (p_validate                => p_validate
      ,p_business_group_id       => l_prv_rec.business_group_id
      ,p_prtt_rt_val_id          => l_prv_rec.prtt_rt_val_id
      ,p_element_entry_value_id  => l_entry_value_id
      ,p_object_version_number   => p_prv_object_version_number
      ,p_effective_date          => l_rt_strt_dt
      );
Line: 7221

  select abr.ele_rqd_flag,
         abr.input_va_calc_rl,
         abr.element_type_id,
         abr.input_value_id,
         abr.prtl_mo_det_mthd_cd
    from ben_acty_base_rt_f abr
   where abr.acty_base_rt_id=p_acty_base_rt_id
     and p_effective_date between
         abr.effective_start_date and abr.effective_end_date;
Line: 7236

  select pee.element_entry_id,
         asg.assignment_id,
         asg.payroll_id,
         pet.element_name,
         pet.multiple_entries_allowed_flag,
         pel.element_type_id,
         pev.input_value_id
    from per_all_assignments_f asg,
         pay_element_links_f pel,
         pay_element_types_f pet,
         pay_element_entries_f pee,
         pay_element_entry_values_f pev
   where asg.person_id = p_person_id
     and asg.assignment_id = pee.assignment_id
     and pee.effective_start_date between asg.effective_start_date
     and asg.effective_end_date
     and pev.element_entry_value_id = p_element_entry_value_id
     and pee.element_entry_id = pev.element_entry_id
     and pee.creator_id = p_prtt_enrt_rslt_id
     and pee.creator_type = 'F'
     and pee.entry_type = 'E'
     and pev.effective_start_date between pee.effective_start_date
     and pee.effective_end_date
     and pel.element_link_id = pee.element_link_id
     and pee.effective_start_date between pel.effective_start_date
     and pel.effective_end_date
     and pet.element_type_id = pel.element_type_id
     and pel.effective_start_date between pet.effective_start_date
     and pet.effective_end_date;
Line: 7276

  select ele.element_entry_id,
         ele.element_link_id,
         ele.effective_start_date,
         ele.effective_end_date,
         pev.screen_entry_value,
         ele.object_version_number
  from   pay_element_entries_f ele,
         pay_element_entry_values_f pev,
         pay_element_links_f elk
  where  ele.creator_id = p_prtt_enrt_rslt_id
  and    ele.creator_type = 'F'
  and    ele.entry_type = 'E'
  and    ele.assignment_id   = p_assignment_id
  and    ele.element_link_id = elk.element_link_id
  and    ele.effective_start_date between elk.effective_start_date
  and    elk.effective_end_date
  and    elk.element_type_id = p_element_type_id
  and    pev.element_entry_id = ele.element_entry_id
  and    pev.input_value_id = p_input_value_id
  and    pev.effective_start_date between ele.effective_start_date
  and    ele.effective_end_date
  order by ele.effective_start_date desc;
Line: 7305

  select ele.element_entry_id,
         ele.effective_start_date,
         ele.effective_end_date,
         ele.object_version_number
  from   pay_element_entries_f ele,
         pay_element_links_f elk
  where  p_effective_date between ele.effective_start_date
  and    ele.effective_end_date
  and    ele.assignment_id   = p_assignment_id
  and    ele.element_link_id = elk.element_link_id
  and    ele.effective_start_date between elk.effective_start_date
  and    elk.effective_end_date
  and    elk.element_type_id = p_element_type_id
  and    ele.creator_type ='F'
  and    ele.entry_type = 'E'
  and    nvl(ele.creator_id,-1) <> p_prtt_enrt_rslt_id
  order by ele.effective_start_date desc;
Line: 7325

select min(effective_start_date),
       max(effective_end_date)
  from pay_element_entries_f
 where element_entry_id = p_element_entry_id;
Line: 7332

select pil.per_in_ler_id,
       pil.trgr_table_pk_id,
       ler.ler_id
  from ben_per_in_ler pil,
       ben_ler_f ler
 where pil.per_in_ler_id = c_per_in_ler_id
   and ler.ler_id = pil.ler_id
   and ler.typ_cd ='ABS'
   and c_effective_date between
       ler.effective_start_date and ler.effective_end_date;
Line: 7346

select leclr.*
from ben_le_clsn_n_rstr leclr
     ,ben_prtt_rt_val prv
     ,ben_acty_base_rt_f abr
where bkup_tbl_typ_cd = 'BEN_PRTT_RT_VAL_ADJ'
and   bkup_tbl_id = prv.prtt_rt_val_id
and   prv.acty_base_rt_id = abr.acty_base_rt_id
and   abr.element_type_id = p_element_type_id;
Line: 7377

l_delete_warning BOOLEAN;
Line: 7384

l_update_warning boolean;
Line: 7553

           l_dt_del_mode := hr_api.g_delete;
Line: 7559

        py_element_entry_api.delete_element_entry
        (p_validate                  =>p_validate
        ,p_datetrack_delete_mode     =>l_dt_del_mode
        ,p_effective_date            =>l_effective_date
        ,p_element_entry_id          =>l_current_ee_rec.element_entry_id
        ,p_object_version_number     =>l_current_ee_rec.object_version_number
        ,p_effective_start_date      =>l_dummy_date
        ,p_effective_end_date        =>l_dummy_date
        ,p_delete_warning            =>l_delete_warning);
Line: 7572

       p_action               => hr_api.g_delete,
       p_old_amt              => null,
       p_input_value_id       => l_abr_info.input_value_id,
       p_element_entry_id     => l_current_ee_rec.element_entry_id,
       p_person_id            => p_person_id,
       p_business_group_id    => p_business_group_id,
       p_effective_date       => l_prv_rec.rt_strt_dt -1 );
Line: 7707

           insert_into_quick_pay
           (p_person_id => p_person_id,
           p_element_type_id => l_element_type_id,
           p_assignment_id => l_assignment_id,
           p_element_entry_id => l_element_entry_id,
           p_effective_date => l_effective_date,
           p_start_date  => l_effective_date,
           p_end_date   => g_max_end_date,
           p_payroll_id  => l_payroll_id);
Line: 7796

                hr_utility.set_location('before pay.delete l_effective_date '||l_effective_date,44333);
Line: 7798

                py_element_entry_api.delete_element_entry
                (p_validate              =>p_validate
                ,p_datetrack_delete_mode =>'FUTURE_CHANGE'
                ,p_effective_date        =>l_effective_date
                ,p_element_entry_id      =>l_element_entry_id
                ,p_object_version_number =>l_object_version_number
                ,p_effective_start_date  =>l_effective_start_date
                ,p_effective_end_date    =>l_effective_end_date
                ,p_delete_warning        =>l_delete_warning);
Line: 7808

		hr_utility.set_location('after pay.delete l_effective_date '||l_effective_date,44333);
Line: 7816

                p_action               => hr_api.g_delete,
                p_old_amt              => null,
                p_input_value_id       => l_input_value_id,
                p_element_entry_id     => l_element_entry_id,
                p_person_id            => p_person_id,
                p_business_group_id    => p_business_group_id,
                p_effective_date       => l_effective_date);
Line: 7949

               py_element_entry_api.update_element_entry
               (p_validate              =>p_validate
               ,p_datetrack_update_mode =>hr_api.g_correction
               ,p_effective_date        =>l_effective_date
               ,p_business_group_id     =>p_business_group_id
               ,p_element_entry_id      =>l_element_entry_id
               ,p_override_user_ent_chk =>'Y'
               ,p_object_version_number =>l_object_version_number
               ,p_creator_type          =>'F'
               ,p_creator_id            =>l_prv_rec.prtt_enrt_rslt_id
               ,p_effective_start_date  =>l_effective_start_date
               ,p_effective_end_date    =>l_effective_end_date
               ,p_update_warning        =>l_update_warning
               );
Line: 8044

             py_element_entry_api.update_element_entry
             (p_validate               =>p_validate
             ,p_datetrack_update_mode  =>hr_api.g_correction
             ,p_effective_date         =>l_effective_date
             ,p_business_group_id      =>p_business_group_id
             ,p_element_entry_id       =>l_element_entry_id
             ,p_object_version_number  =>l_object_version_number
             ,p_creator_type           =>'F'
             ,p_creator_id             =>l_prv_rec.prtt_enrt_rslt_id
             ,p_subpriority            =>l_subpriority
             ,p_override_user_ent_chk  =>'Y'
             ,p_input_value_id1        =>g_ext_inpval_tab(1).input_value_id
             ,p_entry_value1           =>g_ext_inpval_tab(1).return_value
             ,p_input_value_id2        =>g_ext_inpval_tab(2).input_value_id
             ,p_entry_value2           =>g_ext_inpval_tab(2).return_value
             ,p_input_value_id3        =>g_ext_inpval_tab(3).input_value_id
             ,p_entry_value3           =>g_ext_inpval_tab(3).return_value
             ,p_input_value_id4        =>g_ext_inpval_tab(4).input_value_id
             ,p_entry_value4           =>g_ext_inpval_tab(4).return_value
             ,p_input_value_id5        =>g_ext_inpval_tab(5).input_value_id
             ,p_entry_value5           =>g_ext_inpval_tab(5).return_value
             ,p_input_value_id6        =>g_ext_inpval_tab(6).input_value_id
             ,p_entry_value6           =>g_ext_inpval_tab(6).return_value
             ,p_input_value_id7        =>g_ext_inpval_tab(7).input_value_id
             ,p_entry_value7           =>g_ext_inpval_tab(7).return_value
             ,p_input_value_id8        =>g_ext_inpval_tab(8).input_value_id
             ,p_entry_value8           =>g_ext_inpval_tab(8).return_value
             ,p_input_value_id9        =>g_ext_inpval_tab(9).input_value_id
             ,p_entry_value9           =>g_ext_inpval_tab(9).return_value
             ,p_input_value_id10       =>g_ext_inpval_tab(10).input_value_id
             ,p_entry_value10          =>g_ext_inpval_tab(10).return_value
             ,p_input_value_id11       =>g_ext_inpval_tab(11).input_value_id
             ,p_entry_value11          =>g_ext_inpval_tab(11).return_value
             ,p_input_value_id12       =>g_ext_inpval_tab(12).input_value_id
             ,p_entry_value12          =>g_ext_inpval_tab(12).return_value
             ,p_input_value_id13       =>g_ext_inpval_tab(13).input_value_id
             ,p_entry_value13          =>g_ext_inpval_tab(13).return_value
             ,p_input_value_id14       =>g_ext_inpval_tab(14).input_value_id
             ,p_entry_value14          =>g_ext_inpval_tab(14).return_value
             ,p_effective_start_date   =>l_effective_start_date
             ,p_effective_end_date     =>l_effective_end_date
             ,p_update_warning         =>l_update_warning
             );
Line: 8088

             pqp_absence_plan_process.update_absence_plan_details
             (p_person_id               => p_person_id
             ,p_assignment_id           => l_assignment_id
             ,p_business_group_id       => p_business_group_id
             ,p_legislation_code        => get_legislation_code(p_business_group_id)
             ,p_effective_date          => l_effective_date
             ,p_element_type_id         => l_element_type_id
             ,p_pl_id                   => g_result_rec.pl_id
             ,p_pl_typ_id               => g_result_rec.pl_typ_id
             ,p_ler_id                  => l_ler_id
             ,p_per_in_ler_id           => l_per_in_ler_id
             ,p_absence_attendance_id   => l_absence_attendance_id
             ,p_effective_start_date    => l_effective_start_date
             ,p_effective_end_date      => l_effective_end_date
             ,p_formula_outputs         => g_outputs
             ,p_error_code              => l_err_code
             ,p_error_message           => l_err_mesg
             );
Line: 8137

  select abr.prtl_mo_det_mthd_cd,
         abr.prtl_mo_det_mthd_rl,
         abr.wsh_rl_dy_mo_num,
         abr.prtl_mo_eff_dt_det_cd,
         abr.prtl_mo_eff_dt_det_rl,
         abr.acty_typ_cd,
         abr.element_type_id,
         abr.input_value_id,
         abr.input_va_calc_rl,
         abr.rndg_cd,
         abr.rndg_rl,
         abr.ele_rqd_flag,
         abr.one_ann_pymt_cd,
         abr.entr_ann_val_flag,
         abr.ele_entry_val_cd
  from   ben_acty_base_rt_f abr
  where  abr.acty_base_rt_id=p_acty_base_rt_id
    and  abr.business_group_id=p_business_group_id
    and  p_effective_date between
         abr.effective_start_date and abr.effective_end_date;
Line: 8166

    select element_entry_value_id
    from   pay_element_entry_values_f
    where  element_entry_id = p_element_entry_id
    and    input_value_id   = p_input_value_id
    and    p_effective_date between effective_start_date
    and    effective_end_date;
Line: 8176

      SELECT object_version_number
        FROM pay_element_entries_f
       WHERE element_entry_id = v_element_entry_id
         AND p_effective_date BETWEEN effective_start_date AND effective_end_date;
Line: 8200

l_delete_warning                   boolean;
Line: 8230

l_update_ee                        boolean;
Line: 8235

l_update_warning                   boolean;
Line: 8249

l_update                           boolean;
Line: 8250

l_update_override                  boolean;
Line: 8251

l_update_change_insert             boolean;
Line: 8324

  py_element_entry_api.delete_element_entry
  (p_validate => p_validate
  ,p_datetrack_delete_mode => hr_api.g_zap
  ,p_effective_date        => p_rt_strt_date
  ,p_element_entry_id      => p_element_entry_id
  ,p_object_version_number => l_object_version_number
  ,p_effective_start_date  => l_effective_start_date    -- out parm
  ,p_effective_end_date    => l_effective_end_date      -- out parm
  ,p_delete_warning        => l_delete_warning
  );
Line: 8423

   py_element_entry_api.update_element_entry
   (p_validate                      =>p_validate
   ,p_datetrack_update_mode         =>hr_api.g_correction
   ,p_effective_date                =>p_rt_strt_date
   ,p_business_group_id             =>p_business_group_id
   ,p_element_entry_id              =>l_element_entry_id
   ,p_object_version_number         =>l_object_version_number
   ,p_override_user_ent_chk         =>'Y'
   ,p_creator_type                  =>'F'
   ,p_creator_id                    =>p_enrt_rslt_id
   ,p_effective_start_date          =>l_effective_start_date
   ,p_effective_end_date            =>l_effective_end_date
   ,p_update_warning                =>l_update_warning
   );
Line: 8496

   ben_prtt_rt_val_api.update_prtt_rt_val
   (p_validate                => p_validate
   ,p_person_id               => p_person_id
   ,p_prtt_rt_val_id          => l_prv_rec.prtt_rt_val_id
   ,p_business_group_id       => l_prv_rec.business_group_id
   ,p_element_entry_value_id  => l_entry_value_id
   ,p_input_value_id          => p_input_value_id
   ,p_object_version_number   => l_prv_object_version_number
   ,p_effective_date          => p_rt_strt_date
   );
Line: 8522

     py_element_entry_api.delete_element_entry
     (p_validate => p_validate
     ,p_datetrack_delete_mode => hr_api.g_delete
     ,p_effective_date        => p_rt_end_date
     ,p_element_entry_id      => l_element_entry_id
     -- ,p_object_version_number => l_object_version_number
		 ,p_object_version_number => l_ovn
     ,p_effective_start_date  => l_effective_start_date    -- out parm
     ,p_effective_end_date    => l_effective_end_date      -- out parm
     ,p_delete_warning        => l_delete_warning
     );
Line: 8545

     p_action               => hr_api.g_delete,
     p_old_amt              => p_amt,
     p_input_value_id       => p_input_value_id,
     p_element_entry_id     => p_element_entry_id,
     p_person_id            => p_person_id,
     p_business_group_id    => p_business_group_id,
     p_effective_date       => p_effective_date);
Line: 8571

                                ,p_dt_delete_mode IN VARCHAR2
                                ,p_amt in number) is
--
-- Bug 2386380 fix - added default value to decode function
--
cursor c_pps_prev_month(p_end_date in date,
                          p_prtl_mo_eff_dt_det_cd in varchar2,
                          p_payroll_id in number) is
 select start_date,end_date
 from   per_time_periods
 where  payroll_id     = p_payroll_id
 and    decode(p_prtl_mo_eff_dt_det_cd,'DTPD',regular_payment_date,
                                       'PPED',end_date,
                                       'DTERND',regular_payment_date,
                                        end_date)
               < p_end_date
        order by start_date desc;
Line: 8594

  select start_date,end_date
  from   per_time_periods
  where  payroll_id = p_payroll_id
  and    p_end_date between
         start_date
         and decode(p_prtl_mo_eff_dt_det_cd,'DTPD',regular_payment_date
                                           ,'PPED',end_date
                                           ,'DTERND',regular_payment_date
                                           ,end_date);
Line: 8610

 select start_date,end_date
 from   per_time_periods
 where  payroll_id     = p_payroll_id
 and    decode(p_prtl_mo_eff_dt_det_cd,'DTPD',regular_payment_date,
                                       'PPED',end_date,
                                       'DTERND',regular_payment_date,
                                        end_date)
               <= p_end_date
        and    decode(p_prtl_mo_eff_dt_det_cd,'DTPD',regular_payment_date,
                                              'PPED',end_date,
                                              'DTERND',regular_payment_date,
                                               end_date)
                >= p_start_date
        order by start_date asc;
Line: 8626

  select abr.prtl_mo_det_mthd_cd,
         abr.prtl_mo_det_mthd_rl,
         abr.wsh_rl_dy_mo_num,
         abr.prtl_mo_eff_dt_det_cd,
         abr.prtl_mo_eff_dt_det_rl,
         abr.input_va_calc_rl,
         abr.rndg_cd,
         abr.rndg_rl,
         abr.rcrrg_cd,
         abr.ele_rqd_flag,
         abr.one_ann_pymt_cd,
         abr.entr_ann_val_flag,
         abr.ele_entry_val_cd,
         abr.name
  from   ben_acty_base_rt_f abr
  where  abr.acty_base_rt_id=p_acty_base_rt_id
    and  abr.business_group_id=p_business_group_id
    and  p_effective_date between
         abr.effective_start_date and abr.effective_end_date;
Line: 8647

  select pel.element_link_id,
         pel.element_type_id,
         pev.input_value_id,
         pet.element_name,
         pet.processing_type
    from pay_element_types_f pet,
         pay_element_links_f pel,
         pay_element_entries_f pee,
         pay_element_entry_values_f pev
   where pev.element_entry_value_id = p_element_entry_value_id
     and pee.element_entry_id = pev.element_entry_id
     and pev.effective_start_date between pee.effective_start_date
     and pee.effective_end_date
     and pel.element_link_id = pee.element_link_id
     and pee.effective_start_date between pel.effective_start_date
     and pel.effective_end_date
     and pet.element_type_id = pel.element_type_id
     and pel.effective_start_date between pet.effective_start_date
     and pet.effective_end_date;
Line: 8675

select asg.assignment_id,
       asg.payroll_id,
       pee.element_entry_id,
       pee.effective_start_date,
       pee.effective_end_date,
       pee.object_version_number,
       pee.original_entry_id,
       pee.entry_type,
       pee.element_link_id,
       pev.screen_entry_value
from   per_all_assignments_f asg,
       pay_element_links_f pel,
       pay_element_entries_f pee,
       pay_element_entry_values_f pev
where  asg.person_id = p_person_id
and    pee.assignment_id = asg.assignment_id
and    p_effective_date between asg.effective_start_date
and    asg.effective_end_date
and    pee.creator_id   = p_enrt_rslt_id
and    pee.creator_type = 'F'
and    pee.entry_type = 'E'
and    p_effective_date <= pee.effective_end_date
and    pel.element_link_id = pee.element_link_id
and    pee.effective_start_date between pel.effective_start_date
and    pel.effective_end_date
and    pel.element_type_id = p_element_type_id
and    pev.element_entry_id = pee.element_entry_id
and    pev.input_value_id = p_input_value_id
and    (p_element_entry_value_id is null or
        pev.element_entry_value_id = p_element_entry_value_id)
and    pev.effective_start_date between pee.effective_start_date
and    pee.effective_end_date
order by pee.effective_start_date ;
Line: 8713

select pee.element_entry_id,
       pee.effective_start_date,
       pee.effective_end_date,
       pee.object_version_number
from   pay_element_entries_f pee,
       pay_element_links_f pel
where  pee.assignment_id = p_assignment_id
and    pee.creator_id   = p_enrt_rslt_id
and    pee.creator_type = 'F'
and    pee.entry_type = 'E'
and    pee.effective_start_date > p_effective_date
and    pel.element_link_id = pee.element_link_id
and    pee.effective_start_date between pel.effective_start_date
and    pel.effective_end_date
and    pel.element_type_id = p_element_type_id
and    pee.effective_start_date
          = (select min(pee2.effective_start_date)
               from pay_element_entries_f pee2
              where pee2.element_entry_id = pee.element_entry_id);
Line: 8741

  select 'x'
    from ben_prtt_rt_val prv
   where prv.prtt_enrt_rslt_id = p_enrt_rslt_id
     and prv.acty_base_rt_id <> p_acty_base_rt_id
     and prv.rt_end_dt > c_effective_date
    -- and prv.rt_strt_dt <=c_effective_date
     and prv.prtt_rt_val_stat_cd is null
     and prv.element_entry_value_id in
         (select pev.element_entry_value_id
            from pay_element_entry_values_f pev
           where pev.element_entry_id = c_element_entry_id);
Line: 8759

  select 'x'
    from ben_prtt_rt_val prv
   where prv.prtt_enrt_rslt_id = p_enrt_rslt_id
     and prv.acty_base_rt_id <> p_acty_base_rt_id
     and prv.rt_end_dt > c_effective_date
    -- and prv.rt_strt_dt <=c_effective_date
     and prv.prtt_rt_val_stat_cd is null
     and prv.acty_base_rt_id in
         (select abr.acty_base_rt_id
            from ben_acty_base_rt_f abr
           where abr.acty_base_rt_id = prv.acty_base_rt_id
	     and abr.element_type_id = c_element_type_id
	     and c_effective_date between abr.effective_start_date
	                and abr.effective_end_date);
Line: 8780

select paa.primary_flag
from   per_all_assignments_f paa
where  paa.assignment_id = c_assignment_id
and    c_effective_date between paa.effective_start_date and paa.effective_end_date;
Line: 8791

select pil.lf_evt_ocrd_dt,
       pil.trgr_table_pk_id,
       pil.per_in_ler_id,
       ler.ler_id
  from ben_prtt_rt_val prt,
       ben_per_in_ler pil,
       ben_ler_f ler
 where prt.prtt_rt_val_id = c_prtt_rt_val_id
   -- ended_per_in_ler_id may be null in case of back out
   and pil.per_in_ler_id = nvl(prt.ended_per_in_ler_id,prt.per_in_ler_id)
   and ler.ler_id = pil.ler_id
   and ler.typ_cd ='ABS'
   and c_effective_date between
       ler.effective_start_date and ler.effective_end_date;
Line: 8807

select min(effective_start_date),
       max(effective_end_date)
  from pay_element_entries_f
 where element_entry_id = p_element_entry_id;
Line: 8814

select object_version_number
  from pay_element_entries_f pee
 where pee.element_entry_id = p_element_entry_id
   and p_effective_date between pee.effective_start_date
   and pee.effective_end_date;
Line: 8831

     select ler.name name, ler.ler_id ler_id
     from   ben_prtt_rt_val prv,
	    ben_per_in_ler    pil,
	    ben_ler_f         ler
     where  prv.per_in_ler_id = pil.per_in_ler_id
     and    pil.ler_id = ler.ler_id
     and    prv.prtt_rt_val_id = p_prtt_rt_val_id
     and    prv.rt_end_dt = p_rt_end_date;
Line: 8846

   select pay2.payroll_id old_payroll_id,pay.payroll_id new_payroll_id
        from   per_all_assignments_f asg,
               pay_payrolls_f pay,
               per_all_assignments_f asg2,
               pay_payrolls_f pay2
         where asg.person_id = p_person_id
           and asg.business_group_id = p_business_group_id
           and asg.primary_flag = 'Y'
           and p_rt_end_date between
               asg.effective_start_date and asg.effective_end_date
           and pay.payroll_id=asg.payroll_id
           and pay.business_group_id = asg.business_group_id
           and p_rt_end_date between
               pay.effective_start_date and pay.effective_end_date
           AND asg.assignment_id <> asg2.assignment_id
           and asg2.person_id = p_person_id
           and asg2.business_group_id = p_business_group_id
           and asg2.primary_flag = 'Y'
           and p_rt_end_date between
               asg2.effective_start_date and asg2.effective_end_date
           and pay2.payroll_id=asg2.payroll_id
           and pay2.business_group_id = asg2.business_group_id
           and p_rt_end_date between
               pay2.effective_start_date and pay2.effective_end_date
           and pay2.payroll_id<>pay.payroll_id
           AND pay2.payroll_id = p_payroll_id ;
Line: 8875

   SELECT ((end_date - START_DATE) + 1)
    FROM per_time_periods
   WHERE payroll_id = p_payroll_id
     AND p_rt_end_date BETWEEN start_date AND end_date;
Line: 8884

   SELECT pev.*
  FROM pay_element_entry_values_f pev,
       ben_prtt_rt_val prv
 WHERE prv.prtt_rt_val_id = p_prtt_rt_val_id
   AND prv.rt_end_dt = p_rt_end_date
   AND prv.element_entry_value_id = pev.element_entry_value_id
   and p_rt_end_date between pev.effective_start_date and pev.effective_end_date;
Line: 8897

   select pil.*
     from ben_peR_in_ler pil,
          ben_ler_f ler
    where pil.procd_dt is null
      and pil.business_group_id = p_business_group_id
      and pil.person_id = p_person_id
      and pil.per_in_ler_stat_cd = 'STRTD'
      and pil.ler_id = ler.ler_id
      and ler.typ_cd not in ('IREC','GSP','COMP','ABS','SCHEDDU')
      and ler.business_group_id = p_business_group_id
  order by pil.lf_evt_ocrd_dt desc;
Line: 8912

  select *
    from ben_prtt_enrt_rslt_f pen
   where pen.prtt_enrt_rslt_id = p_enrt_rslt_id
     and pen.business_group_id = p_business_group_id
     and pen.person_id = p_person_id
     and pen.prtt_enrt_rslt_stat_cd is null
     and pen.per_in_ler_id = p_pil_id
     and pen.effective_end_Date = hr_api.g_eot
     and pen.enrt_cvg_thru_dt = hr_api.g_eot;
Line: 8938

l_delete_warning        BOOLEAN;
Line: 8968

l_update_ee             boolean;
Line: 8973

l_update_warning        BOOLEAN;
Line: 8984

l_dt_delete_mode        varchar2(80);
Line: 9004

l_update                   boolean;
Line: 9005

l_update_override          boolean;
Line: 9006

l_update_change_insert     boolean;
Line: 9320

     l_dt_delete_mode :=  hr_api.g_zap;
Line: 9322

     l_dt_delete_mode :=  hr_api.g_delete;
Line: 9327

     l_dt_delete_mode :=  hr_api.g_zap;
Line: 9329

  hr_utility.set_location('l_dt_delete_mode ' || l_dt_delete_mode,1200);
Line: 9364

             the below update_element_entry errors out. So, restricting this call
             to only when atleast one extra input_value_id NOT NULL */
         ( g_ext_inpval_tab(1).input_value_id IS NOT NULL
        OR g_ext_inpval_tab(2).input_value_id IS NOT NULL
        OR g_ext_inpval_tab(3).input_value_id IS NOT NULL
        OR g_ext_inpval_tab(4).input_value_id IS NOT NULL
        OR g_ext_inpval_tab(5).input_value_id IS NOT NULL
        OR g_ext_inpval_tab(6).input_value_id IS NOT NULL
        OR g_ext_inpval_tab(7).input_value_id IS NOT NULL
        OR g_ext_inpval_tab(8).input_value_id IS NOT NULL
        OR g_ext_inpval_tab(9).input_value_id IS NOT NULL
        OR g_ext_inpval_tab(10).input_value_id IS NOT NULL
        OR g_ext_inpval_tab(11).input_value_id IS NOT NULL
        OR g_ext_inpval_tab(12).input_value_id IS NOT NULL
        OR g_ext_inpval_tab(13).input_value_id IS NOT NULL
        OR g_ext_inpval_tab(14).input_value_id IS NOT NULL)
       then
        pay_element_entry_api.update_element_entry
        (p_validate                      =>p_validate
        ,p_datetrack_update_mode         =>hr_api.g_correction
        ,p_effective_date                =>l_element_entry_start_date
        ,p_business_group_id             =>p_business_group_id
        ,p_element_entry_id              =>l_element_entry_id
        ,p_object_version_number         =>l_object_version_number
        ,p_subpriority                   =>l_subpriority
        ,p_override_user_ent_chk         =>'Y'
        ,p_input_value_id1               =>g_ext_inpval_tab(1).input_value_id
        ,p_entry_value1                  =>g_ext_inpval_tab(1).return_value
        ,p_input_value_id2               =>g_ext_inpval_tab(2).input_value_id
        ,p_entry_value2                  =>g_ext_inpval_tab(2).return_value
        ,p_input_value_id3               =>g_ext_inpval_tab(3).input_value_id
        ,p_entry_value3                  =>g_ext_inpval_tab(3).return_value
        ,p_input_value_id4               =>g_ext_inpval_tab(4).input_value_id
        ,p_entry_value4                  =>g_ext_inpval_tab(4).return_value
        ,p_input_value_id5               =>g_ext_inpval_tab(5).input_value_id
        ,p_entry_value5                  =>g_ext_inpval_tab(5).return_value
        ,p_input_value_id6               =>g_ext_inpval_tab(6).input_value_id
        ,p_entry_value6                  =>g_ext_inpval_tab(6).return_value
        ,p_input_value_id7               =>g_ext_inpval_tab(7).input_value_id
        ,p_entry_value7                  =>g_ext_inpval_tab(7).return_value
        ,p_input_value_id8               =>g_ext_inpval_tab(8).input_value_id
        ,p_entry_value8                  =>g_ext_inpval_tab(8).return_value
        ,p_input_value_id9               =>g_ext_inpval_tab(9).input_value_id
        ,p_entry_value9                  =>g_ext_inpval_tab(9).return_value
        ,p_input_value_id10              =>g_ext_inpval_tab(10).input_value_id
        ,p_entry_value10                 =>g_ext_inpval_tab(10).return_value
        ,p_input_value_id11              =>g_ext_inpval_tab(11).input_value_id
        ,p_entry_value11                 =>g_ext_inpval_tab(11).return_value
        ,p_input_value_id12              =>g_ext_inpval_tab(12).input_value_id
        ,p_entry_value12                 =>g_ext_inpval_tab(12).return_value
        ,p_input_value_id13              =>g_ext_inpval_tab(13).input_value_id
        ,p_entry_value13                 =>g_ext_inpval_tab(13).return_value
        ,p_input_value_id14              =>g_ext_inpval_tab(14).input_value_id
        ,p_entry_value14                 =>g_ext_inpval_tab(14).return_value
        ,p_effective_start_date          =>l_effective_start_date
        ,p_effective_end_date            =>l_effective_end_date
        ,p_update_warning                =>l_update_warning
        );
Line: 9425

        pqp_absence_plan_process.update_absence_plan_details
        (p_person_id               => p_person_id
        ,p_assignment_id           => l_assignment_id
        ,p_business_group_id       => p_business_group_id
        ,p_legislation_code        => get_legislation_code(p_business_group_id)
        ,p_effective_date          => p_effective_date
        ,p_element_type_id         => l_element_type_id
        ,p_pl_id                   => g_result_rec.pl_id
        ,p_pl_typ_id               => g_result_rec.pl_typ_id
        ,p_ler_id                  => l_ler_id
        ,p_per_in_ler_id           => l_per_in_ler_id
        ,p_absence_attendance_id   => l_absence_attendance_id
        ,p_effective_start_date    => l_effective_start_date
        ,p_effective_end_date      => l_effective_end_date
        ,p_formula_outputs         => g_outputs
        ,p_error_code              => l_err_code
        ,p_error_message           => l_err_mesg
        );
Line: 9448

     l_dt_delete_mode = hr_api.g_delete then
     --
     -- ABSENCES: ZAP and recreate the element entry if the absence
     -- was processed in a payroll and is currently end dated in a
     -- period for which payroll has already been run.
     --
     -- This needs to be eventually merged with c_get_end_dt cursor
     --
     l_ele_processed := chk_ele_processed
                        (p_element_entry_id => l_element_entry_id
                        ,p_original_entry_id=> l_original_entry_id
                        ,p_processing_type  => l_processing_type
                        ,p_entry_type       => l_entry_type
                        ,p_business_group_id => p_business_group_id
                        ,p_effective_date   => p_effective_date);
Line: 9505

      pqp_absence_plan_process.update_absence_plan_details
      (p_person_id               => p_person_id
      ,p_assignment_id           => l_assignment_id
      ,p_business_group_id       => p_business_group_id
      ,p_legislation_code        => get_legislation_code(p_business_group_id)
      ,p_effective_date          => p_effective_date
      ,p_element_type_id         => l_element_type_id
      ,p_pl_id                   => g_result_rec.pl_id
      ,p_pl_typ_id               => g_result_rec.pl_typ_id
      ,p_ler_id                  => l_ler_id
      ,p_per_in_ler_id           => l_per_in_ler_id
      ,p_absence_attendance_id   => l_absence_attendance_id
      ,p_effective_start_date    => l_effective_start_date
      ,p_effective_end_date      => l_rt_end_dt
      ,p_formula_outputs         => g_outputs
      ,p_error_code              => l_err_code
      ,p_error_message           => l_err_mesg
      );
Line: 9524

  elsif l_dt_delete_mode = hr_api.g_zap then
        if g_debug then
          hr_utility.set_location('ZAP mode',11);
Line: 9537

        py_element_entry_api.delete_element_entry
        (p_validate => p_validate
        ,p_datetrack_delete_mode => hr_api.g_zap
        ,p_effective_date        => l_element_entry_start_date
        ,p_element_entry_id      => l_element_entry_id
        ,p_object_version_number => l_object_version_number
        ,p_effective_start_date  => l_effective_start_date
        ,p_effective_end_date    => l_effective_end_date
        ,p_delete_warning        => l_delete_warning
        );
Line: 9551

        p_action               => 'DELETE',
        p_old_amt              => fnd_number.canonical_to_number(l_curr_val_char),
        p_input_value_id       => l_input_value_id,
        p_element_entry_id     => l_element_entry_id,
        p_person_id            => p_person_id,
        p_business_group_id    => p_business_group_id,
        p_effective_date       => p_effective_date);
Line: 9560

           pqp_absence_plan_process.delete_absence_plan_details
           (p_assignment_id           => l_assignment_id
           ,p_business_group_id       => p_business_group_id
           ,p_legislation_code        => get_legislation_code(p_business_group_id)
           ,p_effective_date          => p_effective_date
           ,p_pl_id                   => g_result_rec.pl_id
           ,p_pl_typ_id               => g_result_rec.pl_typ_id
           ,p_ler_id                  => l_ler_id
           ,p_per_in_ler_id           => l_per_in_ler_id
           ,p_absence_attendance_id   => l_absence_attendance_id
           ,p_effective_start_date    => l_effective_start_date
           ,p_effective_end_date      => l_effective_end_date
           ,p_formula_outputs         => g_outputs
           ,p_error_code              => l_err_code
           ,p_error_message           => l_err_mesg
           );
Line: 9578

  elsif l_dt_delete_mode = hr_api.g_delete then
   if g_debug then
      hr_utility.set_location('DELETE mode',11);
Line: 10142

           py_element_entry_api.update_element_entry
             (p_validate                      =>p_validate
             ,p_datetrack_update_mode         =>l_dt_upd_mode
             ,p_effective_date                =>l_special_pp_date
             ,p_business_group_id             =>p_business_group_id
             ,p_element_entry_id              =>l_element_entry_id
             ,p_object_version_number         =>l_object_version_number
             ,p_creator_type                  =>'F'
             ,p_creator_id                    =>p_enrt_rslt_id
             ,p_override_user_ent_chk         =>'Y'
             ,p_input_value_id1               =>l_input_value_id
             ,p_entry_value1                  =>l_special_amt
             ,p_effective_start_date          =>l_new_date
             ,p_effective_end_date            =>l_end_of_time
             ,p_update_warning                =>l_update_warning
           );
Line: 10213

          py_element_entry_api.update_element_entry
            (p_validate                      =>p_validate
            ,p_datetrack_update_mode         =>l_dt_upd_mode
            ,p_effective_date                =>l_dt_to_use
            ,p_business_group_id             =>p_business_group_id
            ,p_element_entry_id              =>l_element_entry_id
            ,p_object_version_number         =>l_object_version_number
            ,p_override_user_ent_chk         =>'Y'
            ,p_creator_type                  =>'F'
            ,p_creator_id                    =>p_enrt_rslt_id
            ,p_input_value_id1               =>l_input_value_id
            ,p_entry_value1                  =>0
            ,p_effective_start_date          =>l_new_date
            ,p_effective_end_date            =>l_end_of_time
            ,p_update_warning                =>l_update_warning
            );
Line: 10233

            (p_action               => hr_api.g_update
            ,p_amt                  => 0
            ,p_old_amt              => l_curr_val
            ,p_input_value_id       => l_input_value_id
            ,p_element_entry_id     => l_element_entry_id
            ,p_person_id            => p_person_id
            ,p_business_group_id    => p_business_group_id
            ,p_effective_date       => l_dt_to_use
            );
Line: 10248

      hr_utility.set_location('DT Delete mode '||l_dt_delete_mode,30);
Line: 10268

      py_element_entry_api.update_element_entry
        (p_validate                      =>p_validate
        ,p_datetrack_update_mode         =>l_dt_upd_mode
        ,p_effective_date                =>l_rt_end_dt + 1
        ,p_business_group_id             =>p_business_group_id
        ,p_element_entry_id              =>l_element_entry_id
        ,p_override_user_ent_chk         =>'Y'
        ,p_object_version_number         =>l_object_version_number
        ,p_input_value_id1               =>l_input_value_id
        ,p_entry_value1                  =>0
        ,p_effective_start_date          =>l_effective_start_date
        ,p_effective_end_date            =>l_effective_end_date
        ,p_update_warning                =>l_update_warning
        );
Line: 10286

        (p_action           => 'UPDATE'
        ,p_amt              => 0
        ,p_old_amt          => fnd_number.canonical_to_number(l_curr_val_char)
        ,p_input_value_id   => l_input_value_id
        ,p_element_entry_id => l_element_entry_id
        ,p_person_id        => p_person_id
        ,p_business_group_id=> p_business_group_id
        ,p_effective_date   => l_rt_end_dt + 1
        );
Line: 10304

      py_element_entry_api.delete_element_entry
        (p_validate              => p_validate
        ,p_datetrack_delete_mode => l_dt_delete_mode
        ,p_effective_date        => l_rt_end_dt
        ,p_element_entry_id      => l_element_entry_id
        ,p_object_version_number => l_object_version_number
        ,p_effective_start_date  => l_effective_start_date
        ,p_effective_end_date    => l_effective_end_date
        ,p_delete_warning        => l_delete_warning);
Line: 10317

      p_action               => hr_api.g_delete,
      p_old_amt              => fnd_number.canonical_to_number(l_curr_val_char),
      p_input_value_id       => l_input_value_id,
      p_element_entry_id     => l_element_entry_id,
      p_person_id            => p_person_id,
      p_business_group_id    => p_business_group_id,
      p_effective_date       => l_rt_end_dt);
Line: 10328

        pqp_absence_plan_process.update_absence_plan_details
        (p_person_id               => p_person_id
        ,p_assignment_id           => l_assignment_id
        ,p_business_group_id       => p_business_group_id
        ,p_legislation_code        => get_legislation_code(p_business_group_id)
        ,p_effective_date          => p_effective_date
        ,p_element_type_id         => l_element_type_id
        ,p_pl_id                   => g_result_rec.pl_id
        ,p_pl_typ_id               => g_result_rec.pl_typ_id
        ,p_ler_id                  => l_ler_id
        ,p_per_in_ler_id           => l_per_in_ler_id
        ,p_absence_attendance_id   => l_absence_attendance_id
        ,p_effective_start_date    => l_effective_start_date
        ,p_effective_end_date      => l_effective_end_date
        ,p_formula_outputs         => g_outputs
        ,p_error_code              => l_err_code
        ,p_error_message           => l_err_mesg
        );
Line: 10371

          py_element_entry_api.update_element_entry
            (p_validate               =>p_validate
            ,p_datetrack_update_mode  =>l_dt_upd_mode
            ,p_effective_date         =>l_future_ee_rec.effective_end_date
            ,p_business_group_id      =>p_business_group_id
            ,p_element_entry_id       =>l_future_ee_rec.element_entry_id
            ,p_override_user_ent_chk  =>'Y'
            ,p_object_version_number  =>l_future_ee_rec.object_version_number
            ,p_input_value_id1        =>l_input_value_id
            ,p_entry_value1           =>0
            ,p_effective_start_date   =>l_effective_start_date
            ,p_effective_end_date     =>l_effective_end_date
            ,p_update_warning         =>l_update_warning
            );
Line: 10399

          py_element_entry_api.delete_element_entry
          (p_validate => p_validate
          ,p_datetrack_delete_mode => hr_api.g_zap
          ,p_effective_date        => l_future_ee_rec.effective_start_date
          ,p_element_entry_id      => l_future_ee_rec.element_entry_id
          ,p_object_version_number => l_future_ee_rec.object_version_number
          ,p_effective_start_date  => l_effective_start_date
          ,p_effective_end_date    => l_effective_end_date
          ,p_delete_warning        => l_delete_warning
          );
Line: 10413

          p_action            => 'DELETE',
          p_old_amt         => fnd_number.canonical_to_number(l_curr_val_char),
          p_input_value_id    => l_input_value_id,
          p_element_entry_id  => l_future_ee_rec.element_entry_id,
          p_person_id         => p_person_id,
          p_business_group_id => p_business_group_id,
          p_effective_date    => p_effective_date);
Line: 10441

  g_get_link_cache.delete;
Line: 10453

  g_get_link_cache.delete;
Line: 10481

    select element_entry_value_id
    from pay_element_entry_values_f
    where ELEMENT_ENTRY_ID = p_element_entry_id
    and   input_value_id  = p_input_value_id;
Line: 10487

    select processing_type
    from pay_element_types_f
    where element_type_id = p_element_type_id
    and p_effective_date between effective_start_date
    and effective_end_date ;
Line: 10498

  l_update_warning        BOOLEAN;
Line: 10507

  l_delete_warning         boolean;
Line: 10564

  py_element_entry_api.update_element_entry
          (p_validate                      =>p_validate
          ,p_datetrack_update_mode         =>'CORRECTION'
          ,p_effective_date                =>p_effective_date
          ,p_business_group_id             =>p_business_group_id
          ,p_element_entry_id              =>l_element_entry_id
          ,p_object_version_number         =>l_object_version_number
          ,p_creator_type                  =>'F'
          ,p_creator_id                    =>p_prtt_reimbmt_rqst_id
          ,p_input_value_id1               =>p_input_value_id
          ,p_entry_value1                  =>p_amt
          ,p_effective_start_date          =>l_effective_start_date
          ,p_effective_end_date            =>l_effective_end_Date
          ,p_update_warning                =>l_update_warning
          );
Line: 10585

    py_element_entry_api.delete_element_entry
        (p_validate              => p_validate
        ,p_datetrack_delete_mode => hr_api.g_delete
        ,p_effective_date        => p_effective_date
        ,p_element_entry_id      => l_element_entry_id
        ,p_object_version_number => l_object_version_number
        ,p_effective_start_date  => l_effective_start_date
        ,p_effective_end_date    => l_effective_end_date
        ,p_delete_warning        => l_delete_warning
        );
Line: 10617

    ben_prtt_rmt_aprvd_pymt_api.update_prtt_rmt_aprvd_pymt
     (p_prtt_rmt_aprvd_fr_pymt_id => p_prtt_rmt_aprvd_fr_pymt_id,
      p_effective_start_date => l_effective_start_date,
      p_effective_end_date   => l_effective_end_date,
      p_element_entry_value_id => l_element_entry_value_id,
      p_object_version_number => p_object_version_number,
      p_effective_date => p_effective_date,
      p_aprvd_fr_pymt_amt => p_amt,
      p_datetrack_mode => 'CORRECTION');
Line: 10641

                                ,p_dt_delete_mode IN VARCHAR2
                                ,p_element_entry_value_id  in number) is
--
 cursor c_ele_info (p_element_entry_value_id number) is
   select ele.element_entry_id,
          ele.entry_type,
          ele.original_entry_id,
          elt.processing_type,
          elk.element_type_id,
          elk.effective_end_date
     from pay_element_entry_values_f elv,
          pay_element_entries_f ele,
          pay_element_links_f elk,
          pay_element_types_f elt
    where elv.element_entry_value_id  = p_element_entry_value_id
      and elv.element_entry_id = ele.element_entry_id
      and elv.effective_start_date between ele.effective_start_date
      and ele.effective_end_date
      and ele.element_link_id   = elk.element_link_id
      and ele.effective_start_date between elk.effective_start_date
      and elk.effective_end_date
      and elk.element_type_id = elt.element_type_id
      and elk.effective_start_date between elt.effective_start_date
      and elt.effective_end_date ;
Line: 10669

   select object_version_number
   from pay_element_entries_f
   where element_entry_id = p_element_entry_id;
Line: 10677

 l_delete_warning          boolean;
Line: 10713

 py_element_entry_api.delete_element_entry
        (p_validate => p_validate
        ,p_datetrack_delete_mode => hr_api.g_zap
        ,p_effective_date        => p_effective_date
        ,p_element_entry_id      => l_ele_rec.element_entry_id
        ,p_object_version_number => l_object_version_number
        ,p_effective_start_date  => l_effective_start_date
        ,p_effective_end_date    => l_effective_end_date
        ,p_delete_warning        => l_delete_warning
        );