DBA Data[Home] [Help]

APPS.PQH_BDGT_ACTUAL_CMMTMNT_PKG SQL Statements

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

Line: 37

Select NVL( max( tp.end_date), p_start_date )
From per_time_periods       tp,
     pay_payroll_actions    ppa,
     per_all_assignments_f  aaf
Where aaf.assignment_id = p_assignment_id
  and (aaf.effective_end_date >= p_start_date and aaf.effective_start_date <= p_end_date)
  and ppa.payroll_id    = aaf.payroll_id
  and (ppa.date_earned between tp.start_date and tp.end_date )
  AND tp.payroll_id     = aaf.payroll_id
  AND (tp.start_date   <= least(p_end_date,aaf.effective_end_date)
       and tp.end_date >= greatest(p_start_date,aaf.effective_start_date) )
  and tp.time_period_id = ppa.time_period_id;
Line: 55

   Select NVL( tp.end_date, p_start_date )
     from pay_assignment_actions     paa,
          per_all_assignments_f      paf,
          pay_payroll_actions        ppa,
          pay_action_classifications pac,
          per_time_periods             tp
     where paf.assignment_id = p_assignment_id
     and (paf.effective_end_date >= p_start_date
           and paf.effective_start_date <= p_end_date)
     and paa.assignment_id = paf.assignment_id
     and ppa.payroll_action_id = paa.payroll_action_id
     and ppa.effective_date +0 between
                 greatest(p_start_date,paf.effective_start_date)
             and least(p_end_date,paf.effective_end_date)
     and pac.action_type = ppa.action_type
     and pac.classification_name = 'SEQUENCED'
     and ((nvl(paa.run_type_id, ppa.run_type_id) is null and
           paa.source_action_id is null)
       or (nvl(paa.run_type_id, ppa.run_type_id) is not null and
           paa.source_action_id is not null )
       or (ppa.action_type = 'V' and ppa.run_type_id is null and
           paa.run_type_id is not null and
           paa.source_action_id is null))
    and tp.time_period_id = ppa.time_period_id
    order by paa.action_sequence desc;
Line: 98

    Select bvr.budget_id
      From pqh_budget_versions  bvr
     Where bvr.budget_version_id = p_budget_version_id;
Line: 137

   Select null
     From hr_all_positions_f
    Where position_id = p_position_id;
Line: 146

   Select null
     From pqh_budget_details bdt,pqh_budget_versions bvr
    Where bvr.budget_version_id  = p_budget_version_id
      AND bvr.budget_version_id  = bdt.budget_version_id
      AND bdt.position_id = p_position_id;
Line: 196

   Select null
     From per_jobs
    Where job_id = p_job_id;
Line: 204

   Select null
     From pqh_budget_details bdt,pqh_budget_versions bvr
    Where bvr.budget_version_id  = p_budget_version_id
      AND bvr.budget_version_id  = bdt.budget_version_id
      AND bdt.job_id = p_job_id;
Line: 260

   Select null
     From per_grades
    Where grade_id = p_grade_id;
Line: 268

   Select null
     From pqh_budget_details bdt,pqh_budget_versions bvr
    Where bvr.budget_version_id  = p_budget_version_id
      AND bvr.budget_version_id  = bdt.budget_version_id
      AND bdt.grade_id = p_grade_id;
Line: 322

   Select null
     From hr_organization_units
    Where organization_id = p_organization_id;
Line: 331

   Select null
     From pqh_budget_details bdt,pqh_budget_versions bvr
    Where bvr.budget_version_id  = p_budget_version_id
      AND bvr.budget_version_id  = bdt.budget_version_id
      AND bdt.organization_id    = p_organization_id;
Line: 383

   Select null
     From per_all_assignments_f
    Where assignment_id = p_assignment_id;
Line: 416

   Select null From pay_element_types_f
    Where element_type_id = p_element_type_id;
Line: 452

   Select system_type_cd
     From per_shared_types
    Where shared_type_id = p_unit_of_measure_id
     AND  lookup_type = 'BUDGET_MEASUREMENT_TYPE';
Line: 483

   Select null
    From pqh_budgets
    Where budget_id = p_budget_id
      AND (budget_unit1_id = p_unit_of_measure_id  OR
           budget_unit2_id = p_unit_of_measure_id  OR
           budget_unit3_id = p_unit_of_measure_id);
Line: 520

   Select budget_start_date,budget_end_date
     From pqh_budgets
    Where budget_id = p_budget_id;
Line: 563

   Select budget_start_date,budget_end_date
     From pqh_budgets
    Where budget_id = p_budget_id;
Line: 603

SELECT O3.ORG_INFORMATION9 legislation_code
FROM HR_ORGANIZATION_INFORMATION O3
WHERE  O3.ORGANIZATION_ID = p_business_group_id
 AND O3.ORG_INFORMATION_CONTEXT = 'Business Group Information';
Line: 674

   Select psf.business_group_id
   from hr_all_positions_f psf
   Where psf.position_id = p_position_id
   and rownum < 2;
Line: 716

    SELECT NVL(SUM(ABV.VALUE),0)
    FROM   per_assignment_budget_values_f abv
    WHERE  abv.assignment_id          = p_assignment_id
    AND    abv.unit                   = p_unit_of_measure
    AND    (p_period_end_dt BETWEEN abv.effective_start_date AND
                                     abv.effective_end_date)
    AND abv.assignment_id =
    (select assignment_id
     from per_all_assignments_f        asg,
          per_assignment_status_types ast
     where asg.assignment_id          = p_assignment_id
     AND   asg.assignment_type        = 'E'
     AND    (p_period_end_dt BETWEEN asg.effective_start_date AND
                                      asg.effective_end_date)
     AND    asg.assignment_status_type_id = ast.assignment_status_type_id
     AND    ast.per_system_status <> 'TERM_ASSIGN');
Line: 768

   select classification_id
   from   pay_element_classifications
   where  classification_name in ('Employer Liabilities', 'Earnings','Supplemental Earnings')
   and    legislation_code = p_legislation_code;
Line: 776

SELECT max(aa.end_Date) last_payroll_dt, sum(RRV.RESULT_VALUE * get_factor(aa.start_date, aa.end_date,
                  greatest(p_actuals_start_date,aa.start_date), least(p_actuals_end_date,aa.end_date))) result_value
FROM
 PAY_INPUT_VALUES_F INV,PAY_RUN_RESULT_VALUES RRV,
 PAY_ELEMENT_TYPES_F PET,
 PAY_RUN_RESULTS RES,
 (
Select tp.start_date, tp.end_date,  aac.assignment_action_id
From per_time_periods tp,
     pay_payroll_actions ppa,
     PAY_ASSIGNMENT_ACTIONS AAC
Where tp.payroll_id=p_payroll_id
  AND (tp.start_date <= p_actuals_end_date and   tp.end_date >= p_actuals_start_date)
  and tp.payroll_id = ppa.payroll_id
  and ppa.payroll_id = p_payroll_id
  and tp.time_period_id = ppa.time_period_id
  and ppa.date_earned between tp.start_date and tp.end_date
  AND PPA.PAYROLL_ACTION_ID = AAC.PAYROLL_ACTION_ID
  AND AAC.ASSIGNMENT_ID = p_assignment_id) AA
WHERE RES.ASSIGNMENT_ACTION_ID = aa.assignment_action_id
  AND RES.STATUS IN ( 'P','PA'  )
  AND PET.CLASSIFICATION_ID in (
     select classification_id
   from pay_element_classifications
   where classification_name in ('Employer Liabilities', 'Earnings','Supplemental Earnings')
   and legislation_code = 'US'
   )
  AND PET.ELEMENT_TYPE_ID = p_element_type_id
  AND aa.start_date BETWEEN PET.EFFECTIVE_START_DATE AND PET.EFFECTIVE_END_DATE
  AND PET.ELEMENT_TYPE_ID = RES.ELEMENT_TYPE_ID
  AND PET.ELEMENT_TYPE_ID = INV.ELEMENT_TYPE_ID
  AND RES.ELEMENT_TYPE_ID = INV.ELEMENT_TYPE_ID
  AND INV.NAME = 'Pay Value'
  AND aa.start_date BETWEEN INV.EFFECTIVE_START_DATE AND INV.EFFECTIVE_END_DATE
  AND RRV.RUN_RESULT_ID = RES.RUN_RESULT_ID
  AND RRV.INPUT_VALUE_ID = INV.INPUT_VALUE_ID;
Line: 814

SELECT max(aa.end_Date) last_payroll_dt, sum(RRV.RESULT_VALUE *  get_factor(aa.start_date, aa.end_date,
                  greatest(p_actuals_start_date,aa.start_date), least(p_actuals_end_date,aa.end_date))) result_value
FROM
 PAY_INPUT_VALUES_F INV,PAY_RUN_RESULT_VALUES RRV,
 PAY_ELEMENT_TYPES_F PET,
 PAY_RUN_RESULTS RES,
 (
 Select tp.start_date, tp.end_date, aac.assignment_action_id
From per_time_periods tp,
     pay_payroll_actions ppa,
     PAY_ASSIGNMENT_ACTIONS AAC
Where tp.payroll_id=p_payroll_id
  AND (tp.start_date <= p_actuals_end_date and   tp.end_date >= p_actuals_start_date)
  and tp.payroll_id = ppa.payroll_id
  and ppa.payroll_id = p_payroll_id
  and tp.time_period_id = ppa.time_period_id
  and ppa.date_earned between tp.start_date and tp.end_date
  AND PPA.PAYROLL_ACTION_ID = AAC.PAYROLL_ACTION_ID
  AND AAC.ASSIGNMENT_ID = p_assignment_id) AA
WHERE RES.ASSIGNMENT_ACTION_ID = aa.assignment_action_id
  AND RES.STATUS IN ( 'P','PA'  )
  AND PET.CLASSIFICATION_ID in (
     select classification_id
   from pay_element_classifications
   where classification_name in ('Employer Liabilities', 'Earnings','Supplemental Earnings')
   and legislation_code = 'US'   )
  AND aa.start_date BETWEEN PET.EFFECTIVE_START_DATE AND PET.EFFECTIVE_END_DATE
  AND PET.ELEMENT_TYPE_ID = RES.ELEMENT_TYPE_ID
  AND PET.ELEMENT_TYPE_ID = INV.ELEMENT_TYPE_ID
  AND RES.ELEMENT_TYPE_ID = INV.ELEMENT_TYPE_ID
  AND INV.NAME = 'Pay Value'
  AND aa.start_date BETWEEN INV.EFFECTIVE_START_DATE AND INV.EFFECTIVE_END_DATE
  AND RRV.RUN_RESULT_ID = RES.RUN_RESULT_ID
  AND RRV.INPUT_VALUE_ID = INV.INPUT_VALUE_ID;
Line: 862

select 1
from dual
where exists
    (select null
     from pay_assignment_actions
     where assignment_id = p_assignment_id);
Line: 923

SELECT max(aa.end_Date) last_payroll_dt, sum(RRV.RESULT_VALUE * get_factor(aa.start_date, aa.end_date,
                  greatest(p_actuals_start_date,aa.start_date), least(p_actuals_end_date,aa.end_date))) result_value
FROM
 PAY_INPUT_VALUES_F INV,PAY_RUN_RESULT_VALUES RRV,
 PAY_ELEMENT_TYPES_F PET,
 PAY_RUN_RESULTS RES,
 (
Select tp.start_date, tp.end_date,  aac.assignment_action_id
From per_time_periods tp,
     pay_payroll_actions ppa,
     PAY_ASSIGNMENT_ACTIONS AAC
Where tp.payroll_id=p_payroll_id
  AND (tp.start_date <= p_actuals_end_date and   tp.end_date >= p_actuals_start_date)
  and tp.payroll_id = ppa.payroll_id
  and ppa.payroll_id = p_payroll_id
  and tp.time_period_id = ppa.time_period_id
  and ppa.date_earned between tp.start_date and tp.end_date
  AND PPA.PAYROLL_ACTION_ID = AAC.PAYROLL_ACTION_ID
  AND AAC.ASSIGNMENT_ID = p_assignment_id) AA
WHERE RES.ASSIGNMENT_ACTION_ID = aa.assignment_action_id
  AND RES.STATUS IN ( 'P','PA'  )
  AND PET.ELEMENT_TYPE_ID = p_element_type_id
  AND aa.start_date BETWEEN PET.EFFECTIVE_START_DATE AND PET.EFFECTIVE_END_DATE
  AND PET.ELEMENT_TYPE_ID = RES.ELEMENT_TYPE_ID
  AND PET.ELEMENT_TYPE_ID = INV.ELEMENT_TYPE_ID
  AND RES.ELEMENT_TYPE_ID = INV.ELEMENT_TYPE_ID
  -- AND INV.INPUT_VALUE_ID = p_ele_input_value_id --'Pay Value'
  AND INV.NAME = 'Pay Value'
  AND aa.start_date BETWEEN INV.EFFECTIVE_START_DATE AND INV.EFFECTIVE_END_DATE
  AND RRV.RUN_RESULT_ID = RES.RUN_RESULT_ID
  AND RRV.INPUT_VALUE_ID = INV.INPUT_VALUE_ID;
Line: 968

select 1
from dual
where exists
    (select null
     from pay_assignment_actions
     where assignment_id = p_assignment_id);
Line: 1016

Select max(tp.end_date)
From per_time_periods tp,
     pay_payroll_actions ppa,
     PAY_ASSIGNMENT_ACTIONS AAC
Where tp.payroll_id=p_payroll_id
  and (tp.start_date <= p_actuals_end_date and   tp.end_date >= p_actuals_start_date)
  and tp.payroll_id = ppa.payroll_id
  and ppa.payroll_id = p_payroll_id
  and tp.time_period_id = ppa.time_period_id
  and ppa.date_earned between tp.start_date and tp.end_date
  and ppa.payroll_action_id = aac.payroll_action_id
  and aac.assignment_id = p_assignment_id;
Line: 1033

select 1
from dual
where exists
    (select null
     from pay_assignment_actions
     where assignment_id = p_assignment_id);
Line: 1090

   select 1
   from pqh_bdgt_cmmtmnt_elmnts
   where actual_commitment_type in ('ACTUAL','BOTH')
   and budget_id = p_budget_id;
Line: 1096

   select element_type_id,element_input_value_id, balance_type_id
   from pqh_bdgt_cmmtmnt_elmnts
   where actual_commitment_type in ('ACTUAL','BOTH') and
   element_type_id = nvl(p_element_type_id,element_type_id)
   and budget_id = p_budget_id;
Line: 1103

   select defined_balance_id
   from pay_defined_balances def, pay_balance_dimensions dim
   where def.balance_type_id = p_balance_type_id
   and def.balance_dimension_id = dim.balance_dimension_id
   and dim.database_item_suffix = p_dim_suf
   and save_run_balance = 'Y';
Line: 1112

   select paa.assignment_action_id
   from pay_assignment_actions paa, pay_payroll_actions ppa
   where paa.payroll_action_id = ppa.payroll_action_id
   and paa.source_action_id is null
   and paa.assignment_id = c_assignment_id
   and ppa.effective_date = (select max(effective_date) from pay_payroll_actions ppa1
                             where ppa1.payroll_action_id = paa.payroll_action_id
                             and paa.assignment_id = c_assignment_id
                             and ppa.effective_date <= c_effective_date);
Line: 1123

  select prb.balance_value
  from pay_run_balances prb, pay_assignment_actions paa
  where prb.assignment_id = c_assignment_id
  and prb.defined_balance_id = c_defined_balance_id
  and prb.assignment_action_id = paa.assignment_action_id
  and paa.source_action_id is not null
  and prb.effective_date =
  (select max(effective_date)
   from pay_run_balances prb1
   where prb1.effective_date <= c_effective_date
    and prb1.assignment_id = c_assignment_id and prb1.defined_balance_id = c_defined_balance_id);
Line: 1268

   select classification_id
   from pay_element_classifications
   where classification_name in ('Employer Liabilities', 'Earnings','Supplemental Earnings')
   and legislation_code = p_legislation_code;
Line: 1280

SELECT sum(RRV.RESULT_VALUE) result_value
FROM
 PAY_INPUT_VALUES_F INV,PAY_RUN_RESULT_VALUES RRV,
 PAY_ELEMENT_TYPES_F PET,
 PAY_RUN_RESULTS RES
WHERE RES.ASSIGNMENT_ACTION_ID = p_assignment_action_id
  AND RES.STATUS IN ( 'P','PA'  )
  AND PET.CLASSIFICATION_ID = cl_id
  AND PET.ELEMENT_TYPE_ID = p_element_type_id
  AND p_start_date BETWEEN PET.EFFECTIVE_START_DATE AND PET.EFFECTIVE_END_DATE
  AND PET.ELEMENT_TYPE_ID = RES.ELEMENT_TYPE_ID
  AND PET.ELEMENT_TYPE_ID = INV.ELEMENT_TYPE_ID
  AND RES.ELEMENT_TYPE_ID = INV.ELEMENT_TYPE_ID
  AND INV.NAME = 'Pay Value'
  AND p_start_date BETWEEN INV.EFFECTIVE_START_DATE AND INV.EFFECTIVE_END_DATE
  AND RRV.RUN_RESULT_ID = RES.RUN_RESULT_ID
  AND RRV.INPUT_VALUE_ID = INV.INPUT_VALUE_ID;
Line: 1299

SELECT sum(RRV.RESULT_VALUE) result_value
FROM
 PAY_INPUT_VALUES_F INV,PAY_RUN_RESULT_VALUES RRV,
 PAY_ELEMENT_TYPES_F PET,
 PAY_RUN_RESULTS RES
WHERE RES.ASSIGNMENT_ACTION_ID = p_assignment_action_id
  AND RES.STATUS IN ( 'P','PA'  )
  AND PET.CLASSIFICATION_ID = cl_id
  AND p_start_date BETWEEN PET.EFFECTIVE_START_DATE AND PET.EFFECTIVE_END_DATE
  AND PET.ELEMENT_TYPE_ID = RES.ELEMENT_TYPE_ID
  AND PET.ELEMENT_TYPE_ID = INV.ELEMENT_TYPE_ID
  AND RES.ELEMENT_TYPE_ID = INV.ELEMENT_TYPE_ID
  AND INV.NAME = 'Pay Value'
  AND p_start_date BETWEEN INV.EFFECTIVE_START_DATE AND INV.EFFECTIVE_END_DATE
  AND RRV.RUN_RESULT_ID = RES.RUN_RESULT_ID
  AND RRV.INPUT_VALUE_ID = INV.INPUT_VALUE_ID;
Line: 1320

Select /*+ ORDERED */
tp.start_date,tp.end_date, aac.assignment_action_id
From per_time_periods tp,
     pay_payroll_actions ppa,
     PAY_ASSIGNMENT_ACTIONS AAC
Where tp.payroll_id=p_payroll_id
  AND (tp.start_date <= p_actuals_end_date
       and
      tp.end_date >= p_actuals_start_date)
  and tp.payroll_id = ppa.payroll_id
  and ppa.payroll_id = p_payroll_id
  and tp.time_period_id = ppa.time_period_id
  and ppa.date_earned between tp.start_date and tp.end_date
  AND PPA.PAYROLL_ACTION_ID = AAC.PAYROLL_ACTION_ID
  AND AAC.ASSIGNMENT_ID = p_assignment_id
order by tp.end_date;
Line: 1354

select 1
from dual
where exists
    (select null
     from pay_assignment_actions
     where assignment_id = p_assignment_id);
Line: 1442

Select ASSG.assignment_id,
       ASSG.payroll_id,
       ASSG.business_group_id,
       ASSG.effective_start_date,
       ASSG.effective_end_date
  From per_all_assignments_f ASSG
 Where ASSG.assignment_id = p_assignment_id
   AND ASSG.effective_end_date   >= p_actuals_start_date
   AND ASSG.effective_start_date <= p_actuals_end_date ;
Line: 1559

        Select nvl(commitment_amount,0),
               commitment_start_date,commitment_end_date
          From pqh_element_commitments
         Where budget_version_id   = p_budget_version_id
           AND assignment_id = p_assignment_id
           AND element_type_id  = nvl(p_element_type_id,element_type_id)
           AND commitment_start_date <= p_period_end_date
           AND commitment_end_date >= p_period_start_date;
Line: 1730

       Select budget_version_id
         From pqh_element_commitments
        Where assignment_id = p_assignment_id
          AND (p_start_date <= commitment_end_date AND
               commitment_start_date <= p_end_date);
Line: 1927

Select distinct ASSG.assignment_id
  From per_all_assignments_f ASSG
 Where ASSG.position_id           = p_position_id
   AND ASSG.effective_end_date   >= p_start_date
   AND ASSG.effective_start_date <= p_end_date;
Line: 2105

Select frequency , working_hours
  From hr_all_positions_f
 Where p_effective_date between effective_start_date and effective_end_date
  And  position_id    = p_position_id;
Line: 2112

SELECT O2.ORG_INFORMATION4 , O2.ORG_INFORMATION3
FROM HR_ORGANIZATION_INFORMATION O2
WHERE O2.ORG_INFORMATION_CONTEXT = 'Work Day Information'
AND O2.organization_id = p_organization_id;
Line: 2118

SELECT O2.ORG_INFORMATION4 , O2.ORG_INFORMATION3
FROM HR_ORGANIZATION_INFORMATION O2
WHERE O2.ORG_INFORMATION_CONTEXT = 'Work Day Information'
AND O2.organization_id = p_bg_id;
Line: 2124

select effective_start_date, effective_end_date,frequency, normal_hours, time_normal_start, time_normal_finish,
       position_id,organization_id,business_group_id
  from per_all_assignments_f
 where p_assignment_id = assignment_id
   and effective_start_date = p_asg_start_date;
Line: 2239

select assignment_id, effective_start_date
  from per_all_assignments_f
 where organization_id = p_organization_id
   and business_group_id = p_business_grp_id
   and effective_end_date   >= p_start_date
   and effective_start_date <= p_end_date ;
Line: 2247

select assignment_id, effective_start_date
  from per_all_assignments_f
 where p_position_id = position_id
   and effective_end_date   >= p_start_date
   and effective_start_date <= p_end_date ;
Line: 2254

select assignment_id, effective_start_date
  from per_all_assignments_f
 where p_job_id = job_id
   and effective_end_date   >= p_start_date
   and effective_start_date <= p_end_date ;
Line: 2261

select assignment_id, effective_start_date
  from per_all_assignments_f
 where p_grade_id = grade_id
   and effective_end_date   >= p_start_date
   and effective_start_date <= p_end_date ;
Line: 2333

Select distinct ASSG.assignment_id
  From per_all_assignments_f ASSG
 Where ASSG.position_id           = p_position_id
   AND ASSG.effective_end_date   >= p_start_date
   AND ASSG.effective_start_date <= p_end_date
   AND ASSG.assignment_id <> p_ex_assignment_id;
Line: 2584

Select distinct ASSG.assignment_id
  From per_all_assignments_f ASSG
 Where ASSG.position_id           = p_entity_id
   and business_group_id          = p_business_group_id
   AND ASSG.effective_end_date   >= p_start_date
   AND ASSG.effective_start_date <= p_end_date;
Line: 2592

Select distinct ASSG.assignment_id
  From per_all_assignments_f ASSG
 Where ASSG.job_id                = p_entity_id
   and business_group_id          = p_business_group_id
   AND ASSG.effective_end_date   >= p_start_date
   AND ASSG.effective_start_date <= p_end_date;
Line: 2600

Select distinct ASSG.assignment_id
  From per_all_assignments_f ASSG
 Where ASSG.grade_id              = p_entity_id
   and business_group_id          = p_business_group_id
   AND ASSG.effective_end_date   >= p_start_date
   AND ASSG.effective_start_date <= p_end_date ;
Line: 2608

Select distinct ASSG.assignment_id
  From per_all_assignments_f ASSG
 Where ASSG.organization_id       = p_entity_id
   and business_group_id          = p_business_group_id
   AND ASSG.effective_end_date   >= p_start_date
   AND ASSG.effective_start_date <= p_end_date;
Line: 2634

Select business_group_id
  From pqh_budgets
 Where budget_id = l_budget_id;
Line: 3193

   Select Position_id
     From pqh_budget_details bdt,pqh_budget_versions bvr
    Where bvr.budget_version_id  = p_budget_version_id
      AND bvr.budget_version_id  = bdt.budget_version_id
      AND bdt.position_id IS NOT NULL;
Line: 3270

   Select Position_id
     From pqh_budget_details bdt,pqh_budget_versions bvr
    Where bvr.budget_version_id  = p_budget_version_id
      AND bvr.budget_version_id  = bdt.budget_version_id
      AND bdt.position_id IS NOT NULL;
Line: 3356

   Select Position_id
     From pqh_budgets bgt,pqh_budget_details bdt,pqh_budget_versions bvr
    Where bvr.budget_id		 = bgt.budget_id
      AND bvr.budget_version_id  = p_budget_version_id
      AND bvr.budget_version_id  = bdt.budget_version_id
      AND bgt.budgeted_entity_cd = 'POSITION';
Line: 3364

   Select job_id
     From pqh_budgets bgt,pqh_budget_details bdt,pqh_budget_versions bvr
    Where bvr.budget_id		 = bgt.budget_id
      AND bvr.budget_version_id  = p_budget_version_id
      AND bvr.budget_version_id  = bdt.budget_version_id
      AND bgt.budgeted_entity_cd = 'JOB';
Line: 3372

   Select grade_id
     From pqh_budgets bgt,pqh_budget_details bdt,pqh_budget_versions bvr
    Where bvr.budget_id		 = bgt.budget_id
      AND bvr.budget_version_id  = p_budget_version_id
      AND bvr.budget_version_id  = bdt.budget_version_id
      AND bgt.budgeted_entity_cd = 'GRADE';
Line: 3380

   Select organization_id
     From pqh_budgets bgt,pqh_budget_details bdt,pqh_budget_versions bvr
    Where bvr.budget_id		 = bgt.budget_id
      AND bvr.budget_version_id  = p_budget_version_id
      AND bvr.budget_version_id  = bdt.budget_version_id
      AND bgt.budgeted_entity_cd = 'ORGANIZATION';
Line: 3579

   Select Position_id
     From pqh_budgets bgt,pqh_budget_details bdt,pqh_budget_versions bvr
    Where bvr.budget_id		 = bgt.budget_id
      AND bvr.budget_version_id  = p_budget_version_id
      AND bvr.budget_version_id  = bdt.budget_version_id
      AND bgt.budgeted_entity_cd = 'POSITION';
Line: 3587

   Select job_id
     From pqh_budgets bgt,pqh_budget_details bdt,pqh_budget_versions bvr
    Where bvr.budget_id		 = bgt.budget_id
      AND bvr.budget_version_id  = p_budget_version_id
      AND bvr.budget_version_id  = bdt.budget_version_id
      AND bgt.budgeted_entity_cd = 'JOB';
Line: 3595

   Select grade_id
     From pqh_budgets bgt,pqh_budget_details bdt,pqh_budget_versions bvr
    Where bvr.budget_id		 = bgt.budget_id
      AND bvr.budget_version_id  = p_budget_version_id
      AND bvr.budget_version_id  = bdt.budget_version_id
      AND bgt.budgeted_entity_cd = 'GRADE';
Line: 3603

   Select organization_id
     From pqh_budgets bgt,pqh_budget_details bdt,pqh_budget_versions bvr
    Where bvr.budget_id		 = bgt.budget_id
      AND bvr.budget_version_id  = p_budget_version_id
      AND bvr.budget_version_id  = bdt.budget_version_id
      AND bgt.budgeted_entity_cd = 'ORGANIZATION';
Line: 3817

select bgt.budget_id, budget_version_id, budget_start_date, budget_end_date
  from pqh_budgets bgt, pqh_budget_versions ver
 where bgt.budget_id = ver.budget_id
   and (p_effective_date between date_from and date_to)
   and position_control_flag = 'Y'
   and budgeted_entity_cd = p_budget_entity
   and business_group_id = p_business_group_id -- Line added Bug Fix : 2432715
   and	(p_start_date <= budget_end_date
          and p_end_date >= budget_start_date)
     and ( hr_psf_shd.SYSTEM_AVAILABILITY_STATUS(budget_unit1_id) = p_unit_of_measure
          or hr_psf_shd.SYSTEM_AVAILABILITY_STATUS(budget_unit2_id) = p_unit_of_measure
          or hr_psf_shd.SYSTEM_AVAILABILITY_STATUS(budget_unit3_id) = p_unit_of_measure);
Line: 3833

select distinct assg.assignment_id
  from per_all_assignments_f assg
 where business_group_id = p_business_group_id
   and p_position_id = assg.position_id
   and assg.effective_end_date   >= p_start_date
   and assg.effective_start_date <= p_end_date;
Line: 3841

select distinct assg.assignment_id
  from per_all_assignments_f assg
 where business_group_id = p_business_group_id
   and p_job_id = assg.job_id
   and assg.effective_end_date   >= p_start_date
   and assg.effective_start_date <= p_end_date;
Line: 3849

select distinct assg.assignment_id
  from per_all_assignments_f assg
 where p_organization_id = assg.organization_id
   and business_group_id = p_business_group_id
   and assg.effective_end_date   >= p_start_date
   and assg.effective_start_date <= p_end_date;
Line: 3857

select distinct assg.assignment_id
  from per_all_assignments_f assg
 where business_group_id = p_business_group_id
   and p_grade_id = assg.grade_id
   and assg.effective_end_date   >= p_start_date
   and assg.effective_start_date <= p_end_date;
Line: 4047

   select 1
   from pqh_bdgt_cmmtmnt_elmnts
   where actual_commitment_type in ('ACTUAL','BOTH')
   and budget_id = p_budget_id;
Line: 4060

Select sum(pc.costed_value)
 From
 (select distinct assignment_id, payroll_id from per_all_assignments_f assg
  where ASSG.effective_end_date   >= p_actuals_start_date
   and ASSG.effective_start_date <= p_actuals_end_date
   AND assg.position_id = p_position_id
   -- and assg.assignment_id <> p_ex_assignment_id
 ) a,
 pay_payroll_actions ppa,
 PAY_ASSIGNMENT_ACTIONS AAC,
 PAY_COSTS pc,
 PAY_ELEMENT_TYPES_F PET,
 PAY_INPUT_VALUES_F INV,
 pqh_bdgt_cmmtmnt_elmnts pbce
 Where PPA.PAYROLL_ACTION_ID = AAC.PAYROLL_ACTION_ID
   AND PPA.PAYROLL_ID = A.PAYROLL_ID
   AND ppa.action_type IN ('Q','R','V','B')
   AND ppa.date_earned BETWEEN p_actuals_start_date AND p_actuals_end_date
   AND aac.run_type_id IS not NULL
   and AAC.ASSIGNMENT_ID = a.assignment_id
   and aac.assignment_action_id = pc.assignment_action_id
   and pbce.actual_commitment_type in ('ACTUAL','BOTH')
   and pbce.budget_id = p_budget_id
   and pc.input_value_id = inv.input_value_id
   AND PET.ELEMENT_TYPE_ID = INV.ELEMENT_TYPE_ID
   and pbce.element_type_id = INV.element_type_id
   --AND INV.NAME = 'Pay Value'
  AND INV.INPUT_VALUE_ID = pbce.element_input_value_id--'Pay Value'
  --AND (PET.CLASSIFICATION_ID = p_cl_id_1 or PET.CLASSIFICATION_ID = p_cl_id_2)
   AND BALANCE_OR_COST = 'C';
Line: 4093

   select classification_id
   from pay_element_classifications,
        hr_all_positions_f pos,
        HR_ORGANIZATION_INFORMATION O3
   where classification_name in ('Earnings', 'Employer Liabilities')
   and legislation_code = O3.ORG_INFORMATION9
   and pos.position_id = p_position_id
   and p_actuals_start_date between pos.effective_start_date and pos.effective_end_date
   and pos.business_group_id = O3.ORGANIZATION_ID
   and O3.ORG_INFORMATION_CONTEXT = 'Business Group Information';
Line: 4116

Select sum(pc.costed_value)
 From
 (select distinct assignment_id, payroll_id from per_all_assignments_f assg
  where ASSG.effective_end_date   >= p_actuals_start_date
   and ASSG.effective_start_date <= p_actuals_end_date
   AND assg.position_id = p_position_id
--   and assg.assignment_id <> p_ex_assignment_id
 ) a,
 pay_payroll_actions ppa,
 PAY_ASSIGNMENT_ACTIONS AAC,
 PAY_COSTS pc,
 PAY_ELEMENT_TYPES_F PET,
 PAY_INPUT_VALUES_F INV
 Where PPA.PAYROLL_ACTION_ID = AAC.PAYROLL_ACTION_ID
   AND PPA.PAYROLL_ID = A.PAYROLL_ID
   AND ppa.action_type IN ('Q','R','V','B')
   AND ppa.date_earned BETWEEN p_actuals_start_date AND p_actuals_end_date
   AND aac.run_type_id IS not NULL
   and AAC.ASSIGNMENT_ID = a.assignment_id
   and aac.assignment_action_id = pc.assignment_action_id
   and pc.input_value_id = inv.input_value_id
   AND PET.ELEMENT_TYPE_ID = INV.ELEMENT_TYPE_ID
   AND INV.NAME = 'Pay Value'
   AND (PET.CLASSIFICATION_ID = p_cl_id_1 or PET.CLASSIFICATION_ID = p_cl_id_2)
   AND BALANCE_OR_COST = 'C';