DBA Data[Home] [Help]

APPS.HR_PUMP_GET SQL Statements

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

Line: 34

   select unique_key_id
   into   l_id
   from   hr_pump_batch_line_user_keys
   where  user_key_value = p_user_key_value;
Line: 77

  select pc.collective_agreement_id
  into   l_collective_agreement_id
  from   per_collective_agreements pc
  where  pc.business_group_id = p_business_group_id
  and    pc.name = p_cagr_name
  and    p_effective_date between
         nvl(start_date,START_OF_TIME) and nvl(end_date,END_OF_TIME);
Line: 113

  select pe.establishment_id
  into   l_establishment_id
  from   per_establishments pe
  where  pe.location = p_location
  and    pe.name = p_establishment_name;
Line: 271

   select piv.input_value_id
   into   l_input_value_id
   from   pay_input_values_f_tl pivtl,
          pay_input_values_f piv,
          pay_element_types_f pet,
          pay_element_types_f_tl pettl,
          per_business_groups pbg
   where  pbg.business_group_id = p_business_group_id
   and    pettl.element_name = p_element_name
   and    pettl.language = p_language_code
   and    pet.element_type_id = pettl.element_type_id
   and    p_effective_date between
          pet.effective_start_date and pet.effective_end_date
   and
   (
      (pet.business_group_id is null and pet.legislation_code is null) or
      (pet.business_group_id is null
       and pet.legislation_code = pbg.legislation_code) or
      (pet.legislation_code is null
       and pet.business_group_id = p_business_group_id)
   )
   and    piv.element_type_id = pet.element_type_id
   and    p_effective_date between
          piv.effective_start_date and piv.effective_end_date
   and pivtl.input_value_id = piv.input_value_id
   and pivtl.name = p_input_value_name
   and pivtl.LANGUAGE = p_language_code;
Line: 674

   select rate_id
   into   l_rate_id
   from   pay_rates
   where  name = p_rate_name
   and    business_group_id + 0 = p_business_group_id;
Line: 802

   select bbg.benfts_grp_id
   into   l_benefit_group_id
   from   ben_benfts_grp bbg
   where  bbg.name = p_benefit_group
   and    bbg.business_group_id + 0 = p_business_group_id;
Line: 908

   select ppl.object_version_number
   into   l_ovn
   from   ben_ptnl_ler_for_per  ppl,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value       = p_ptnl_ler_for_per_user_key
   and    ppl.ptnl_ler_for_per_id  = key.unique_key_id;
Line: 997

   select pil.object_version_number
   into   l_ovn
   from   ben_per_in_ler  pil,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value       = p_per_in_ler_user_key
   and    pil.per_in_ler_id        = key.unique_key_id;
Line: 1051

   select pen.object_version_number
   into   l_ovn
   from   ben_prtt_enrt_rslt_f  pen,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value       = p_prtt_enrt_rslt_user_key
   and    pen.prtt_enrt_rslt_id    = key.unique_key_id
   and    p_effective_date between
          pen.effective_start_date and pen.effective_end_date;
Line: 1089

   select prv.object_version_number
   into   l_ovn
   from   ben_prtt_rt_val  prv,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value       = p_prtt_rt_val_user_key
   and    prv.prtt_rt_val_id       = key.unique_key_id;
Line: 1125

   select cqb.object_version_number
   into   l_ovn
   from   ben_cbr_quald_bnf  cqb,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value       = p_cbr_quald_bnf_user_key
   and    cqb.cbr_quald_bnf_id     = key.unique_key_id;
Line: 1161

   select crp.object_version_number
   into   l_ovn
   from   ben_cbr_per_in_ler  crp,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value       = p_cbr_per_in_ler_user_key
   and    crp.cbr_per_in_ler_id    = key.unique_key_id;
Line: 1198

   select pdp.object_version_number
   into   l_ovn
   from   ben_elig_cvrd_dpnt_f  pdp,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value       = p_elig_cvrd_dpnt_user_key
   and    pdp.elig_cvrd_dpnt_id    = key.unique_key_id
   and    p_effective_date between
          pdp.effective_start_date and pdp.effective_end_date;
Line: 1237

   select ppe.object_version_number
   into   l_ovn
   from   ben_prtt_prem_f  ppe,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value       = p_prtt_prem_user_key
   and    ppe.prtt_prem_id         = key.unique_key_id
   and    p_effective_date between
          ppe.effective_start_date and ppe.effective_end_date;
Line: 1275

   select egd.object_version_number
   into   l_ovn
   from   ben_elig_dpnt  egd,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value       = p_elig_dpnt_user_key
   and    egd.elig_dpnt_id         = key.unique_key_id;
Line: 1312

   select pep.object_version_number
   into   l_ovn
   from   ben_elig_per_f  pep,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value       = p_elig_per_user_key
   and    pep.elig_per_id          = key.unique_key_id
   and    p_effective_date between
          pep.effective_start_date and pep.effective_end_date;
Line: 1351

   select epo.object_version_number
   into   l_ovn
   from   ben_elig_per_opt_f  epo,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value       = p_elig_per_opt_user_key
   and    epo.elig_per_opt_id      = key.unique_key_id
   and    p_effective_date between
          epo.effective_start_date and epo.effective_end_date;
Line: 1390

   select pbn.object_version_number
   into   l_ovn
   from   ben_pl_bnf_f  pbn,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value       = p_pl_bnf_user_key
   and    pbn.pl_bnf_id            = key.unique_key_id
   and    p_effective_date between
          pbn.effective_start_date and pbn.effective_end_date;
Line: 1429

   select cop.object_version_number
   into   l_ovn
   from   ben_oipl_f  cop,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value       = p_oipl_user_key
   and    cop.oipl_id              = key.unique_key_id
   and    p_effective_date between
          cop.effective_start_date and cop.effective_end_date;
Line: 1468

   select cpp.object_version_number
   into   l_ovn
   from   ben_plip_f  cpp,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value       = p_plip_user_key
   and    cpp.plip_id              = key.unique_key_id
   and    p_effective_date between
          cpp.effective_start_date and cpp.effective_end_date;
Line: 1507

   select ctp.object_version_number
   into   l_ovn
   from   ben_ptip_f  ctp,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value       = p_ptip_user_key
   and    ctp.ptip_id              = key.unique_key_id
   and    p_effective_date between
          ctp.effective_start_date and ctp.effective_end_date;
Line: 1545

   select ecr.object_version_number
   into   l_ovn
   from   ben_enrt_rt  ecr,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value       = p_enrt_rt_user_key
   and    ecr.enrt_rt_id           = key.unique_key_id;
Line: 1581

   select enp.object_version_number
   into   l_ovn
   from   ben_enrt_perd  enp,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value       = p_enrt_perd_user_key
   and    enp.enrt_perd_id         = key.unique_key_id;
Line: 1618

   select prc.object_version_number
   into   l_ovn
   from   ben_prtt_reimbmt_rqst_f  prc,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value       = p_prtt_reimbmt_rqst_user_key
   and    prc.prtt_reimbmt_rqst_id = key.unique_key_id
   and    p_effective_date between
          prc.effective_start_date and prc.effective_end_date;
Line: 1656

   select epe.object_version_number
   into   l_ovn
   from   ben_elig_per_elctbl_chc  epe,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value       = p_elig_per_elctbl_chc_user_key
   and    epe.elig_per_elctbl_chc_id  = key.unique_key_id;
Line: 1680

  select bng.benfts_grp_id
  into   l_benefit_group_id
  from   ben_benfts_grp bng
  where  bng.name                  = p_benefits_group
  and    bng.business_group_id + 0 = p_business_group_id;
Line: 1699

  select bng.object_version_number
  into   l_ovn
  from   ben_benfts_grp bng
  where  bng.name                  = p_benefits_group
  and    bng.business_group_id + 0 = p_business_group_id;
Line: 1719

  select ptp.pl_typ_id
  into   l_plan_type_id
  from   ben_pl_typ_f ptp
  where  ptp.name                  = p_plan_type
  and    ptp.business_group_id + 0 = p_business_group_id
  and    p_effective_date between
         ptp.effective_start_date and ptp.effective_end_date;
Line: 1741

  select ptp.object_version_number
  into   l_ovn
  from   ben_pl_typ_f ptp
  where  ptp.name                  = p_plan_type
  and    ptp.business_group_id + 0 = p_business_group_id
  and    p_effective_date between
         ptp.effective_start_date and ptp.effective_end_date;
Line: 1764

  select ler.ler_id
  into   l_ler_id
  from   ben_ler_f ler
  where  ler.name                  = p_life_event_reason
  and    ler.business_group_id + 0 = p_business_group_id
  and    p_effective_date between
         ler.effective_start_date and ler.effective_end_date;
Line: 1786

  select ler.object_version_number
  into   l_ovn
  from   ben_ler_f ler
  where  ler.name                  = p_life_event_reason
  and    ler.business_group_id + 0 = p_business_group_id
  and    p_effective_date between
         ler.effective_start_date and ler.effective_end_date;
Line: 1808

  select abr.acty_base_rt_id
  into   l_acty_base_rt_id
  from   ben_acty_base_rt_f abr
  where  abr.name                  = p_acty_base_rate
  and    abr.business_group_id + 0 = p_business_group_id
  and    p_effective_date between
         abr.effective_start_date and abr.effective_end_date;
Line: 1830

  select abr.object_version_number
  into   l_ovn
  from   ben_acty_base_rt_f abr
  where  abr.name                  = p_acty_base_rate
  and    abr.business_group_id + 0 = p_business_group_id
  and    p_effective_date between
         abr.effective_start_date and abr.effective_end_date;
Line: 1852

  select apr.actl_prem_id
  into   l_actl_prem_id
  from   ben_actl_prem_f apr
  where  apr.name                  = p_actual_premium
  and    apr.business_group_id + 0 = p_business_group_id
  and    p_effective_date between
         apr.effective_start_date and apr.effective_end_date;
Line: 1874

  select apr.object_version_number
  into   l_ovn
  from   ben_actl_prem_f apr
  where  apr.name                  = p_actual_premium
  and    apr.business_group_id + 0 = p_business_group_id
  and    p_effective_date between
         apr.effective_start_date and apr.effective_end_date;
Line: 1895

  select clf.comp_lvl_fctr_id
  into   l_comp_lvl_fctr_id
  from   ben_comp_lvl_fctr clf
  where  clf.name                  = p_comp_level_factor
  and    clf.business_group_id + 0 = p_business_group_id;
Line: 1914

  select clf.object_version_number
  into   l_ovn
  from   ben_comp_lvl_fctr clf
  where  clf.name                  = p_comp_level_factor
  and    clf.business_group_id + 0 = p_business_group_id;
Line: 1934

  select ccm.cvg_amt_calc_mthd_id
  into   l_cvg_amt_calc_mthd_id
  from   ben_cvg_amt_calc_mthd_f ccm
  where  ccm.name                  = p_cvg_amt_calc
  and    ccm.business_group_id + 0 = p_business_group_id
  and    p_effective_date between
         ccm.effective_start_date and ccm.effective_end_date;
Line: 1956

  select ccm.object_version_number
  into   l_ovn
  from   ben_cvg_amt_calc_mthd_f ccm
  where  ccm.name                  = p_cvg_amt_calc
  and    ccm.business_group_id + 0 = p_business_group_id
  and    p_effective_date between
         ccm.effective_start_date and ccm.effective_end_date;
Line: 1978

  select opt.opt_id
  into   l_opt_id
  from   ben_opt_f opt
  where  opt.name                  = p_option_definition
  and    opt.business_group_id + 0 = p_business_group_id
  and    p_effective_date between
         opt.effective_start_date and opt.effective_end_date;
Line: 2000

  select opt.object_version_number
  into   l_ovn
  from   ben_opt_f opt
  where  opt.name                  = p_option_definition
  and    opt.business_group_id + 0 = p_business_group_id
  and    p_effective_date between
         opt.effective_start_date and opt.effective_end_date;
Line: 2022

  select pln.pl_id
  into   l_pl_id
  from   ben_pl_f pln
  where  pln.name                  = p_plan
  and    pln.business_group_id + 0 = p_business_group_id
  and    p_effective_date between
         pln.effective_start_date and pln.effective_end_date;
Line: 2044

  select pln.object_version_number
  into   l_ovn
  from   ben_pl_f pln
  where  pln.name                  = p_plan
  and    pln.business_group_id + 0 = p_business_group_id
  and    p_effective_date between
         pln.effective_start_date and pln.effective_end_date;
Line: 2066

  select pgm.pgm_id
  into   l_pgm_id
  from   ben_pgm_f pgm
  where  pgm.name                  = p_program
  and    pgm.business_group_id + 0 = p_business_group_id
  and    p_effective_date between
         pgm.effective_start_date and pgm.effective_end_date;
Line: 2088

  select pgm.object_version_number
  into   l_ovn
  from   ben_pgm_f pgm
  where  pgm.name                  = p_program
  and    pgm.business_group_id + 0 = p_business_group_id
  and    p_effective_date between
         pgm.effective_start_date and pgm.effective_end_date;
Line: 2113

  select pet.element_type_id
  into   l_element_type_id
  from   pay_element_types_f pet
  where  pet.element_name        = p_element_name
  and    business_group_id + 0   = p_business_group_id
  and    p_effective_date between
         pet.effective_start_date and pet.effective_end_date;
Line: 2149

      select currency_code
      into   l_code
      from   fnd_currencies_vl
      where  name          = p_name_or_code
      and    enabled_flag  = 'Y'
      and    p_effective_date between
             nvl(start_date_active, START_OF_TIME) and nvl(end_date_active, END_OF_TIME);
Line: 2165

      select currency_code
      into   l_code
      from   fnd_currencies    -- user underlying table for faster code lookup
      where  currency_code = p_name_or_code
      and    enabled_flag  = 'Y'
      and    p_effective_date between
             nvl(start_date_active, START_OF_TIME) and nvl(end_date_active, END_OF_TIME);
Line: 2479

   select pcr.contact_relationship_id
   into   l_contact_relationship_id
   from   per_contact_relationships    pcr,
          hr_pump_batch_line_user_keys contact_key,
          hr_pump_batch_line_user_keys contactee_key
   where  contact_key.user_key_value   = p_contact_user_key
   and    pcr.contact_person_id        = contact_key.unique_key_id
   and    contactee_key.user_key_value = p_contactee_user_key
   and    pcr.person_id                = contactee_key.unique_key_id;
Line: 2505

   select typ.person_type_id
   into   l_person_type_id
   from   per_person_types_tl typtl,
    per_person_types typ
   where  typtl.user_person_type      = p_user_person_type
   and    typ.business_group_id + 0   = p_business_group_id
   and    typ.person_type_id = typtl.person_type_id
   and    typtl.LANGUAGE = p_language_code;
Line: 2532

   select typ.person_type_id
   into   l_person_type_id
   from   per_person_types_tl typtl,
    per_person_types typ
   where  typtl.user_person_type      = p_user_person_type
   and    typ.business_group_id + 0   = p_business_group_id
   and    typ.person_type_id = typtl.person_type_id
   and    typtl.LANGUAGE = p_language_code;
Line: 2555

   select pov.vendor_id
   into   l_vendor_id
   from   po_vendors pov
   where  pov.vendor_name = p_vendor_name;
Line: 2577

      select typ.assignment_status_type_id
      into l_assignment_status_type_id
      from   per_ass_status_type_amends_tl typtl,
             per_ass_status_type_amends typ
      where  typtl.user_status = p_user_status
      and    typ.business_group_id + 0 = p_business_group_id
      and    typ.ass_status_type_amend_id = typtl.ass_status_type_amend_id
      and    typtl.LANGUAGE = p_language_code;
Line: 2594

   select typ.assignment_status_type_id
   into   l_assignment_status_type_id
   from   per_assignment_status_types_tl typtl,
          per_assignment_status_types typ
   where  typtl.user_status = p_user_status
   and    typ.assignment_status_type_id = typtl.assignment_status_type_id
   and    typtl.LANGUAGE = p_language_code
   and
   (
     (typ.business_group_id is null and typ.legislation_code is null)
     or
     (typ.business_group_id is not null
      and typ.business_group_id + 0 = p_business_group_id)
     or
     (typ.business_group_id is null
      and typ.legislation_code is not null
      and typ.legislation_code =
          (select legislation_code from per_business_groups
           where  business_group_id = p_business_group_id))
   );
Line: 2632

   select org.organization_id
   into   l_organization_id
   from   hr_all_organization_units org
   ,      hr_all_organization_units_tl orgtl
   where  orgtl.name = p_organization_name
   and    orgtl.language = p_language_code
   and    org.organization_id = orgtl.organization_id
   and    org.business_group_id + 0 = p_business_group_id;
Line: 2705

   select gra.grade_id
   into   l_grade_id
   from   per_grades_vl gra
   where  gra.name                  = p_grade_name
   and    gra.business_group_id + 0 = p_business_group_id;
Line: 2746

select pst.shared_type_id
from   per_shared_types pst
,      per_shared_types_tl psttl
where  psttl.shared_type_name = p_shared_type_name
and    psttl.language = p_language_code
and    pst.shared_type_id = psttl.shared_type_id
and    pst.lookup_type = 'POSITION_AVAILABILITY_STATUS'
and    pst.system_type_cd = p_system_type_cd
and    nvl(pst.business_group_id, p_business_group_id) = p_business_group_id;
Line: 2781

   select pos.position_id
   into   l_position_id
   from   hr_all_positions_f pos
   where  pos.name                  = p_position_name
   and    pos.business_group_id + 0 = p_business_group_id
   and    p_effective_date between
          pos.effective_start_date and pos.effective_end_date;
Line: 2893

   select job.job_id
   into   l_job_id
   from   per_jobs_vl job
   where  job.name                  = p_job_name
   and    job.business_group_id + 0 = p_business_group_id;
Line: 2915

   select pay.payroll_id
   into   l_payroll_id
   from   pay_payrolls_f pay
   where  pay.payroll_name          = p_payroll_name
   and    pay.business_group_id + 0 = p_business_group_id
   and    p_effective_date between
          pay.effective_start_date and pay.effective_end_date;
Line: 2949

/* Returns a location_id for the update_location APIs. */
function get_location_id_update
(
   p_existing_location_code in varchar2,
   p_business_group_id in number,
   p_language_code     in varchar2
) return number is
l_location_id number;
Line: 2964

   hr_data_pump.fail('get_location_id_update', sqlerrm,
                     p_existing_location_code,
                     p_business_group_id, p_language_code);
Line: 2968

end get_location_id_update;
Line: 2979

   select loc.location_id
   into   l_location_id
   from   hr_locations_all loc,
          hr_locations_all_tl lot
   where  lot.location_code = p_location_code
   and    lot.language      = p_language_code
   and    lot.location_id   = loc.location_id
   and    (loc.business_group_id is null or
           loc.business_group_id + 0 = p_business_group_id);
Line: 3005

  Select person_id
    Into l_designated_receiver_id
    From per_all_people_f
   Where employee_number Is Not Null
     and business_group_id = p_business_group_id
     and p_effective_date between effective_start_date and effective_end_date
     and full_name = p_designated_receiver_name;
Line: 3028

   select loc.location_id
   into   l_location_id
   from   hr_locations_all loc,
          hr_locations_all_tl lot
   where  lot.location_code = p_ship_to_location_code
   and    lot.language      = p_language_code
   and    lot.location_id   = loc.location_id
   and    (loc.business_group_id is null or
           loc.business_group_id + 0 = p_business_group_id);
Line: 3053

   select ppb.pay_basis_id
   into   l_pay_basis_id
   from   per_pay_bases ppb
   where  ppb.name                  = p_pay_basis_name
   and    ppb.business_group_id + 0 = p_business_group_id;
Line: 3075

   select pra.recruitment_activity_id
   into   l_raid
   from   per_recruitment_activities pra
   where  pra.name                  = p_recruitment_activity_name
   and    pra.business_group_id + 0 = p_business_group_id
   and    p_effective_date between
          pra.date_start and nvl(pra.date_end, END_OF_TIME);
Line: 3235

   select sob.set_of_books_id
   into   l_id
   from   gl_sets_of_books sob
   where  sob.name = p_set_of_books_name;
Line: 3254

   select tax.tax_unit_id
   into   l_tax_unit_id
   from   hr_tax_units_v tax
   where  tax.name = p_tax_unit_name;
Line: 3277

   select puc.user_column_id
   into   l_id
   from   pay_user_columns            puc,
          hr_organization_information hoi,
          hr_all_organization_units    org
   ,      hr_all_organization_units_tl orgtl
   where  orgtl.name                  = p_organization_name
   and    orgtl.language              = p_language_code
   and    org.organization_id         = orgtl.organization_id
   and    org.business_group_id + 0   = p_business_group_id
   and    puc.user_column_name        = p_work_schedule
   and    hoi.org_information_context = 'Work Schedule'
   and    hoi.organization_id         = org.organization_id
   and    (puc.user_table_id = hoi.org_information1 or
           hoi.org_information1 is null);
Line: 3310

   select est.establishment_id
   into   l_id
   from   HR_ESTABLISHMENTS_V est
   where  est.name                  = p_eeo_1_establishment
   and    est.business_group_id + 0 = p_business_group_id;
Line: 3372

   select pgr.grade_rule_id
   into   l_grade_rule_id
   from   pay_grade_rules_f pgr,
          per_grades_vl pg,
          pay_rates  pr
   where  pg.name = p_grade_name
   and    pg.business_group_id + 0 = p_business_group_id
   and    pr.name = p_rate_name
   and    pr.business_group_id + 0 = p_business_group_id
   and    pgr.rate_id = pr.rate_id
   and    pgr.grade_or_spinal_point_id = pg.grade_id
   and    pgr.rate_type = 'G'
   and    pgr.business_group_id + 0 = p_business_group_id
   and    p_effective_date between pgr.effective_start_date and
          pgr.effective_end_date;
Line: 3407

   select pgr.grade_rule_id
   into   l_grade_rule_id
   from   per_parent_spines pps,
          per_spinal_points psp,
          pay_grade_rules_f pgr,
          pay_rates  pr
   where  pps.name = p_pay_scale
   and    pps.business_group_id + 0 = p_business_group_id
   and    psp.spinal_point = p_progression_point
   and    psp.business_group_id + 0 = p_business_group_id
   and    psp.parent_spine_id = pps.parent_spine_id
   and    pr.name = p_rate_name
   and    pr.business_group_id + 0 = p_business_group_id
   and    pgr.rate_id = pr.rate_id
   and    pgr.grade_or_spinal_point_id = psp.spinal_point_id
   and    pgr.rate_type = 'SP'
   and    pgr.business_group_id + 0 = p_business_group_id
   and    p_effective_date between pgr.effective_start_date and
          pgr.effective_end_date;
Line: 3445

   select pgr.grade_rule_id
   into   l_grade_rule_id
   from   pay_grade_rules_f pgr,
          pay_rates  pr
   where  pr.name = p_rate_name
   and    pr.business_group_id + 0 = p_business_group_id
   and    pgr.rate_id = pr.rate_id
   and    pgr.rate_type = 'A'
   and    pgr.business_group_id + 0 = p_business_group_id
   and    p_effective_date between pgr.effective_start_date and
          pgr.effective_end_date;
Line: 3472

    select pos.organization_structure_id
    into l_organization_structure_id
    from per_organization_structures pos
    where pos.name = p_name
    and pos.business_group_id + 0 = p_business_group_id;
Line: 3494

   select osv.org_structure_version_id
   into l_org_str_ver_id
   from per_org_structure_versions osv
   where osv.organization_structure_id = p_organization_structure_id
   and osv.date_from = p_date_from
   and osv.version_number = p_version_number
   and osv.business_group_id + 0 = p_business_group_id;
Line: 3519

   select psp.spinal_point_id
   into   l_spinal_point_id
   from   per_parent_spines pps,
          per_spinal_points psp
   where  pps.name = p_pay_scale
   and    pps.business_group_id + 0 = p_business_group_id
   and    psp.spinal_point = p_progression_point
   and    psp.business_group_id + 0 = p_business_group_id
   and    psp.parent_spine_id = pps.parent_spine_id;
Line: 3545

   select pps.period_of_service_id
   into   l_period_of_service_id
   from   per_periods_of_service pps,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value = p_person_user_key
   and    pps.person_id = key.unique_key_id
   and    pps.business_group_id = p_business_group_id
   and    pps.actual_termination_date is null;
Line: 3570

   select pps.period_of_service_id
   into   l_period_of_service_id
   from   per_periods_of_service pps,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value = p_person_user_key
   and    pps.person_id = key.unique_key_id
   and    pps.business_group_id = p_business_group_id
   and    pps.actual_termination_date is not null
   and    pps.final_process_date is null;
Line: 3600

   select pps.period_of_service_id
   into   l_period_of_service_id
   from   per_periods_of_service pps,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value = p_person_user_key
   and    pps.person_id = key.unique_key_id
   and    pps.business_group_id = p_business_group_id
   and    p_effective_date between pps.date_start and NVL(pps.actual_termination_date,l_eot);
Line: 3675

  select pgm.pgm_id
  into   l_grade_ladder_pgm_id
  from   ben_pgm_f pgm
  where  pgm.name = p_grade_ladder_name
  and    pgm.pgm_typ_cd = 'GSP'
  and    pgm.business_group_id + 0 = p_business_group_id
  and    p_effective_date
         between pgm.effective_start_date and pgm.effective_end_date;
Line: 3716

   select parent_spine_id
   into   l_parent_spine_id
   from   per_parent_spines
   where  name = p_parent_spine
   and    business_group_id = p_business_group_id;
Line: 3738

   select sps.step_id
   into   l_ceiling_step_id
   from   per_spinal_points psp
         ,per_spinal_point_steps_f sps
   where  psp.spinal_point = p_ceiling_point
   and    psp.spinal_point_id = sps.spinal_point_id
   and    sps.business_group_id = p_business_group_id
   and    p_effective_date between
          sps.effective_start_date and sps.effective_end_date;
Line: 3767

  select pc.object_version_number
  into   l_object_version_number
  from   per_collective_agreements pc
  where  pc.business_group_id = p_business_group_id
  and    pc.name = p_cagr_name
  and    p_effective_date between
         nvl(start_date,START_OF_TIME) and nvl(end_date,END_OF_TIME);
Line: 3789

   select pc.object_version_number
   into   l_object_version_number
   from   per_contracts_f              pc,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value = p_contract_user_key
   and    pc.contract_id      = key.unique_key_id
   and    p_effective_date between
          pc.effective_start_date and pc.effective_end_date;
Line: 3811

  select pe.object_version_number
  into   l_object_version_number
  from   per_establishments pe
  where  pe.location = p_location
  and    pe.name = p_establishment_name;
Line: 3832

   select rules.object_version_number
   into   l_ovn
   from   pay_us_emp_fed_tax_rules_f   rules,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value           = p_emp_fed_tax_rule_user_key
   and    rules.emp_fed_tax_rule_id    = key.unique_key_id
   and    p_effective_date between
          rules.effective_start_date and rules.effective_end_date;
Line: 3856

   select rules.object_version_number
   into   l_ovn
   from   pay_us_emp_state_tax_rules_f   rules,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value           = p_emp_state_tax_rule_user_key
   and    rules.emp_state_tax_rule_id    = key.unique_key_id
   and    p_effective_date between
          rules.effective_start_date and rules.effective_end_date;
Line: 3880

   select rules.object_version_number
   into   l_ovn
   from   pay_us_emp_county_tax_rules_f   rules,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value           = p_emp_county_tax_rule_user_key
   and    rules.emp_county_tax_rule_id    = key.unique_key_id
   and    p_effective_date between
          rules.effective_start_date and rules.effective_end_date;
Line: 3904

   select rules.object_version_number
   into   l_ovn
   from   pay_us_emp_city_tax_rules_f   rules,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value           = p_emp_city_tax_rule_user_key
   and    rules.emp_city_tax_rule_id    = key.unique_key_id
   and    p_effective_date between
          rules.effective_start_date and rules.effective_end_date;
Line: 3928

   select per.object_version_number
   into   l_ovn
   from   per_people_f                 per,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value = p_person_user_key
   and    per.person_id      = key.unique_key_id
   and    p_effective_date between
          per.effective_start_date and per.effective_end_date;
Line: 3952

   select asg.object_version_number
   into   l_ovn
   from   per_assignments_f            asg,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value = p_assignment_user_key
   and    asg.assignment_id  = key.unique_key_id
   and    p_effective_date between
          asg.effective_start_date and asg.effective_end_date;
Line: 3976

   select adr.object_version_number
   into   l_ovn
   from   per_addresses                adr,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value = p_address_user_key
   and    adr.address_id     = key.unique_key_id;
Line: 4000

   select loc.object_version_number
   into   l_ovn
   from   hr_locations_all loc
   where  loc.location_code = p_location_code;
Line: 4019

   select ors.object_version_number
   into   l_ovn
   from   per_organization_structures ors
   where  ors.name                  = p_name
   and    ors.business_group_id + 0 = p_business_group_id;
Line: 4041

   select osv.object_version_number
   into l_ovn
   from per_org_structure_versions osv
   where osv.organization_structure_id = p_organization_structure_id
   and osv.date_from = p_date_from
   and osv.version_number = p_version_number
   and osv.business_group_id + 0 = p_business_group_id;
Line: 4064

   select org.object_version_number
   into   l_ovn
   from   hr_all_organization_units org
   ,      hr_all_organization_units_tl orgtl
   where  orgtl.name = p_organization_name
   and    orgtl.language = p_language_code
   and    org.organization_id = orgtl.organization_id
   and    org.business_group_id + 0 = p_business_group_id;
Line: 4088

   select job.object_version_number
   into   l_ovn
   from   per_jobs_vl job
   where  job.name                  = p_job_name
   and    job.business_group_id + 0 = p_business_group_id;
Line: 4110

   select pos.object_version_number
   into   l_ovn
   from   hr_all_positions_f pos
   where  pos.name                  = p_position_name
   and    pos.business_group_id + 0 = p_business_group_id
   and    p_effective_date between
          pos.effective_start_date and pos.effective_end_date;
Line: 4133

   select ppm.object_version_number
   into   l_ovn
   from   pay_personal_payment_methods_f ppm
   ,      hr_pump_batch_line_user_keys key
   where  key.user_key_value = p_personal_pay_method_user_key
   and    ppm.personal_payment_method_id = key.unique_key_id
   and    p_effective_date between
          ppm.effective_start_date and ppm.effective_end_date;
Line: 4157

   select pee.object_version_number
   into   l_element_entry_ovn
   from   pay_element_entries_f pee,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value   = p_element_entry_user_key
   and    pee.element_entry_id = key.unique_key_id
   and    p_effective_date between
          pee.effective_start_date and pee.effective_end_date;
Line: 4183

   select pgr.object_version_number
   into   l_object_version_number
   from   pay_grade_rules_f pgr,
          per_grades_vl pg,
          pay_rates  pr
   where  pg.name = p_grade_name
   and    pg.business_group_id + 0 = p_business_group_id
   and    pr.name = p_rate_name
   and    pr.business_group_id + 0 = p_business_group_id
   and    pgr.rate_id = pr.rate_id
   and    pgr.grade_or_spinal_point_id = pg.grade_id
   and    pgr.rate_type = 'G'
   and    pgr.business_group_id + 0 = p_business_group_id
   and    p_effective_date between pgr.effective_start_date and
          pgr.effective_end_date;
Line: 4218

   select pgr.object_version_number
   into   l_object_version_number
   from   per_parent_spines pps,
          per_spinal_points psp,
          pay_grade_rules_f pgr,
          pay_rates pr
   where  pps.name = p_pay_scale
   and    pps.business_group_id + 0 = p_business_group_id
   and    psp.spinal_point = p_progression_point
   and    psp.business_group_id + 0 = p_business_group_id
   and    psp.parent_spine_id = pps.parent_spine_id
   and    pr.name = p_rate_name
   and    pr.business_group_id + 0 = p_business_group_id
   and    pgr.rate_id = pr.rate_id
   and    pgr.grade_or_spinal_point_id = psp.spinal_point_id
   and    pgr.rate_type = 'SP'
   and    pgr.business_group_id + 0 = p_business_group_id
   and    p_effective_date between pgr.effective_start_date and
          pgr.effective_end_date;
Line: 4255

   select pps.object_version_number
   into   l_object_version_number
   from   per_periods_of_service pps,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value = p_person_user_key
   and    pps.person_id = key.unique_key_id
   and    pps.business_group_id = p_business_group_id
   and    pps.actual_termination_date is null;
Line: 4280

   select pps.object_version_number
   into   l_object_version_number
   from   per_periods_of_service pps,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value = p_person_user_key
   and    pps.person_id = key.unique_key_id
   and    pps.business_group_id = p_business_group_id
   and    pps.actual_termination_date is not null
   and    pps.final_process_date is null;
Line: 4310

   select pps.object_version_number
   into   l_object_version_number
   from   per_periods_of_service pps,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value = p_person_user_key
   and    pps.person_id = key.unique_key_id
   and    pps.business_group_id = p_business_group_id
   and    p_effective_date between pps.date_start and NVL(pps.actual_termination_date,l_eot);
Line: 4364

   select phn.object_version_number
   into   l_ovn
   from   per_phones                 phn,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value = p_phone_user_key
   and    phn.phone_id      = key.unique_key_id;
Line: 4386

    select jgr.object_version_number
    into   l_ovn
    from   per_job_groups jgr,
     hr_pump_batch_line_user_keys key
    where  key.user_key_value = p_job_group_user_key
    and    jgr.job_group_id      = key.unique_key_id;
Line: 4408

    select rol.object_version_number
    into   l_ovn
    from   per_roles rol,
     hr_pump_batch_line_user_keys key
    where  key.user_key_value = p_role_user_key
    and    rol.role_id      = key.unique_key_id;
Line: 4428

   select object_version_number
   into   l_ovn
   from   per_parent_spines
   where  name                  = p_pay_scale
   and    business_group_id + 0 = p_business_group_id;
Line: 4448

   select object_version_number
   into   l_ovn
   from   per_spinal_points
   where  spinal_point          = p_point
   and    business_group_id + 0 = p_business_group_id;
Line: 4470

   select pgs.object_version_number
   into   l_ovn
   from   per_grade_spines_f pgs
         ,per_grades pg
         ,per_parent_spines pps
   where  pg.name = p_grade
   and    pg.grade_id = pgs.grade_id
   and    pps.name = p_pay_scale
   and    pps.parent_spine_id = pgs.parent_spine_id
   and    pgs.business_group_id = p_business_group_id
   and    p_effective_date between
          pgs.effective_start_date and pgs.effective_end_date;
Line: 4499

   select sps.object_version_number
   into   l_ovn
   from   per_spinal_point_steps_f sps
         ,per_spinal_points psp
         ,per_grade_spines_f pgs
   where  psp.spinal_point = p_point
   and    psp.spinal_point_id = sps.spinal_point_id
   and    sps.sequence = p_sequence
   and    sps.step_id =  pgs.ceiling_step_id
   and    pgs.grade_spine_id = sps.grade_spine_id
   and    sps.business_group_id = p_business_group_id
   and    p_effective_date between
          sps.effective_start_date and sps.effective_end_date;
Line: 4530

   select l.language_code
   into   l_code
   from   fnd_languages l
   where  l.nls_language = p_correspondence_language;
Line: 4550

   select territory_code
   into   l_territory_code
   from   fnd_territories_vl
   where  territory_short_name = p_country;
Line: 4575

   select flv.lookup_code
   into   l_code
   from   fnd_lookup_values            flv,
          per_assignments_f            asg,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value = p_assignment_user_key
   and    asg.assignment_id  = key.unique_key_id
   and    p_effective_date between
          asg.effective_start_date and asg.effective_end_date
   and    flv.lookup_type    = decode(asg.assignment_type,
                                      'E', 'EMP_ASSIGN_REASON',
                                      'A', 'APL_ASSIGN_REASON')
   and    flv.meaning        = p_change_reason
   and    flv.language            = p_language_code
   and    flv.view_application_id = 3
   and    flv.security_group_id   =
          fnd_global.lookup_security_group
          (flv.lookup_type
          ,flv.view_application_id
          )
   and    p_effective_date between
          nvl(flv.start_date_active, START_OF_TIME) and
          nvl(flv.end_date_active, END_OF_TIME);
Line: 4776

     select flv.lookup_code
     into   l_code
     from   fnd_lookup_values flv
     where  flv.meaning       = p_meaning_or_code
     and    flv.lookup_type   = p_lookup_type
     and    flv.language      = nvl(l_language_code, userenv('LANG'))
     and    flv.view_application_id = 3
     and    flv.security_group_id   =
     fnd_global.lookup_security_group
     (flv.lookup_type
     ,flv.view_application_id
     )
     and    l_effective_date between
            nvl(flv.start_date_active, START_OF_TIME) and
            nvl(flv.end_date_active, END_OF_TIME);
Line: 4832

   select people_group_id
   into   l_people_group_id
   from   pay_people_groups
   where  GROUP_NAME = p_people_group_user_name
     and  p_effective_date
          between nvl(start_date_active,START_OF_TIME)
          and     nvl(end_date_active,END_OF_TIME);
Line: 4859

   select aat.absence_attendance_type_id
   into   l_absence_attendance_type_id
   from per_abs_attendance_types_vl aat
   where aat.name = p_aat_user_name
     and aat.business_group_id = p_business_group_id
     and p_effective_date between
         nvl(DATE_EFFECTIVE, START_OF_TIME) AND
         nvl(DATE_END, END_OF_TIME);
Line: 4886

   select soft_coding_keyflex_id
   into   l_soft_coding_keyflex_id
   from hr_soft_coding_keyflex
   where concatenated_segments = p_con_seg_user_name
     and p_effective_date between
         nvl(START_DATE_ACTIVE, START_OF_TIME) AND
         nvl(END_DATE_ACTIVE, END_OF_TIME);
Line: 4930

  select object_version_number
    into l_ovn
    from pay_us_emp_fed_tax_rules_f puek,
         hr_pump_batch_line_user_keys uk
   where uk.user_key_value = p_emp_fed_tax_rule_user_key
     and p_effective_date between puek.effective_start_date and puek.effective_end_date
     and puek.emp_fed_tax_rule_id  = uk.unique_key_id;
Line: 4959

  select object_version_number
    into l_ovn
    from pay_us_emp_state_tax_rules_f puek,
         hr_pump_batch_line_user_keys uk
   where uk.user_key_value = p_emp_state_tax_rule_user_key
     and p_effective_date between puek.effective_start_date and puek.effective_end_date
     and puek.emp_state_tax_rule_id  = uk.unique_key_id;
Line: 4985

  select object_version_number
    into l_ovn
    from pay_us_emp_county_tax_rules_f puek,
         hr_pump_batch_line_user_keys uk
   where uk.user_key_value = p_emp_county_tax_rule_user_key
     and p_effective_date between puek.effective_start_date and puek.effective_end_date
     and puek.emp_county_tax_rule_id  = uk.unique_key_id;
Line: 5012

  select object_version_number
    into l_ovn
    from pay_us_emp_city_tax_rules_f puek,
         hr_pump_batch_line_user_keys uk
   where uk.user_key_value = p_emp_city_tax_rule_user_key
     and p_effective_date between puek.effective_start_date and puek.effective_end_date
     and puek.emp_city_tax_rule_id  = uk.unique_key_id;
Line: 5076

       SELECT competence_id
       INTO   l_competence_id
       FROM   per_competences_vl
       WHERE  name = p_competence_name
       AND    business_group_id is null;
Line: 5084

       SELECT competence_id
       INTO   l_competence_id
       FROM   per_competences_vl
       WHERE  name = p_competence_name
       AND    business_group_id = p_business_group_id;
Line: 5130

       SELECT object_version_number
       INTO   l_cpn_ovn
       FROM   per_competences_vl
       WHERE  name = p_competence_name
       AND    business_group_id is null;
Line: 5138

       SELECT object_version_number
       INTO   l_cpn_ovn
       FROM   per_competences_vl
       WHERE  name = p_competence_name
       AND    business_group_id = p_business_group_id;
Line: 5179

       SELECT qualification_type_id
       INTO   l_qualification_type_id
       FROM   per_qualification_types_vl
       WHERE  name = p_qualification_type_name;
Line: 5217

       SELECT outcome_id
       INTO   l_outcome_id
       FROM   per_competence_outcomes_vl
       WHERE  name = p_outcome_name;
Line: 5258

       SELECT object_version_number
       INTO   l_cpo_ovn
       FROM   per_competence_outcomes_vl
       WHERE  name = p_outcome_name;
Line: 5299

       SELECT object_version_number
       INTO   l_eqt_ovn
       FROM   per_qualification_types_vl
       WHERE  name = p_qualification_type_name;
Line: 5340

       SELECT object_version_number
       INTO   l_ceo_ovn
       FROM   per_comp_element_outcomes_vl
       WHERE  name = p_element_outcome_name;
Line: 5376

    SELECT competence_element_id
    INTO   l_competence_element_id
    FROM  per_competence_elements CEL
         ,per_competences         CPN
    WHERE
          CEL.type = 'PERSONAL'
    and   CPN.name = p_competence_name
    and   CEL.competence_id = CPN.competence_id
    and   CEL.business_group_id = p_business_group_id
    and   CEL.person_id = l_person_id;
Line: 5418

      select id_flex_num into l_cost_code
      from fnd_id_flex_structures
      where id_flex_structure_code = p_cost_flex_stru_code
      and   id_flex_code ='COST';
Line: 5451

      select id_flex_num into l_grade_code
      from fnd_id_flex_structures
      where id_flex_structure_code = p_grade_flex_stru_code
      and   id_flex_code ='GRD';
Line: 5486

      select id_flex_num into l_job_code
      from fnd_id_flex_structures
      where id_flex_structure_code = p_job_flex_stru_code
      and   id_flex_code ='JOB';
Line: 5520

      select id_flex_num into l_position_code
      from fnd_id_flex_structures
      where id_flex_structure_code = p_position_flex_stru_code
      and   id_flex_code ='POS';
Line: 5554

      select id_flex_num into l_group_code
      from fnd_id_flex_structures
      where id_flex_structure_code = p_group_flex_stru_code
      and   id_flex_code ='GRP';
Line: 5588

      select id_flex_num into l_competence_code
      from fnd_id_flex_structures
      where id_flex_structure_code = p_competence_flex_stru_code
      and   id_flex_code ='CMP';
Line: 5623

      select security_group_id into l_get_sec_group_id
      from fnd_security_groups_tl
      where upper(security_group_name) = upper(p_security_group_name)
      and   language = userenv('LANG');
Line: 5659

      select security_profile_id into l_sec_profile_id
      from per_security_profiles
      where upper(security_profile_name) = upper(p_security_profile_name)
      and   business_group_id            = p_business_group_id;
Line: 5696

     select org.organization_id
     into   l_organization_id
     from   hr_all_organization_units org
     ,      hr_all_organization_units_tl orgtl
     where  orgtl.name = p_parent_organization_name
     and    orgtl.language = p_language_code
     and    org.organization_id = orgtl.organization_id
     and   (org.business_group_id = p_business_group_id
            or p_business_group_id is null);   --Bug 3823374
Line: 5732

     select org.organization_id
     into   l_organization_id
     from   hr_all_organization_units org
     ,      hr_all_organization_units_tl orgtl
     where  orgtl.name = p_child_organization_name
     and    orgtl.language = p_language_code
     and    org.organization_id = orgtl.organization_id
     and   (org.business_group_id = p_business_group_id
            or p_business_group_id is null);    --Bug fix 3823374
Line: 5772

   select pei.object_version_number
   into   l_ovn
   from   per_people_extra_info  pei,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value       = p_person_extra_info_user_key
   and    pei.person_extra_info_id  = key.unique_key_id;
Line: 5812

   select rules.object_version_number
   into   l_ovn
   from   PAY_CA_EMP_FED_TAX_INFO_F   rules,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value           = P_EMP_FED_TAX_INF_USER_KEY
   and    rules.EMP_FED_TAX_INF_ID    = key.unique_key_id
   and    p_effective_date between
          rules.effective_start_date and rules.effective_end_date;
Line: 5855

   select rules.object_version_number
   into   l_ovn
   from   PAY_CA_EMP_PROV_TAX_INFO_F   rules,
          hr_pump_batch_line_user_keys key
   where  key.user_key_value           = P_EMP_PROV_TAX_INF_USER_KEY
   and    rules.EMP_PROVINCE_TAX_INF_ID    = key.unique_key_id
   and    p_effective_date between
          rules.effective_start_date and rules.effective_end_date;