DBA Data[Home] [Help]

APPS.PQH_BUDGET_ANALYSIS_PKG SQL Statements

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

Line: 37

  select
  	pos.position_id, pos.job_id, name
  from
  	hr_all_positions_f_vl pos
  where
  	pos.organization_id = p_organization_id
  and	p_effective_date between pos.effective_start_date and pos.effective_end_date
  order by position_id;
Line: 50

  select
  	ver.org_structure_version_id
  from
  	per_organization_structures str
      , per_org_structure_versions ver
  where
	str.position_control_structure_flg = 'Y'
  and   str.business_group_id = p_business_group_id
  and   ver.business_group_id = p_business_group_id
  and	str.organization_structure_id = ver.organization_structure_id
  and 	p_effective_date between ver.date_from and nvl(date_to, hr_general.end_of_time);
Line: 66

  SELECT
	    0 rn,
  	    0 level1,
        ORGANIZATION_ID
        FROM HR_ALL_ORGANIZATION_UNITS u
        WHERE ORGANIZATION_ID = p_start_org_id
        and business_group_id = p_business_group_id
        and exists
        (select null from per_org_structure_elements e
         where e.org_structure_version_id = p_org_structure_version_id
         and (e.organization_id_child = p_start_org_id
         or e.organization_id_parent = p_start_org_id) )
  UNION
  SELECT
  	rownum rn,
  	level level1,
	organization_id_child organization_id
  FROM PER_ORG_STRUCTURE_ELEMENTS A
  start with
  	organization_id_parent = p_start_org_id
  and   ORG_STRUCTURE_VERSION_ID = p_org_structure_version_id
  connect by
  	organization_id_parent = prior organization_id_child
  and 	ORG_STRUCTURE_VERSION_ID = p_org_structure_version_id;
Line: 95

  select
  	'x'
  from
  	pqh_process_log
  where
	log_context=p_batch_name;
Line: 106

  select
  	pqh_process_log_s.nextval
  from
  	dual;
Line: 115

  SELECT
  	table_route_id
  from
  	pqh_table_route
  where
  	table_alias = p_table_alias;
Line: 126

  select pqh_wf_notifications_s.nextval
  from dual;
Line: 133

  select user_name
  from fnd_user
  where employee_id =
    (select psf.supervisor_id
     from hr_all_positions_f psf
     where psf.position_id = p_position_id
     and l_effective_date >= psf.effective_start_date
     and l_effective_date <= psf.effective_end_date
    );
Line: 402

            pqh_process_batch_log.insert_log
            (
             p_message_type_cd  =>l_message_type,
             p_message_text     =>l_message,
             p_information3	=>l_budgeted_sal,
             p_information4	=>l_reallocation_sal,
             p_information5	=>l_actual_sal,
             p_information6	=>l_commitment_sal,
             p_information7	=>l_user_name,
             p_information13     =>l_currency_code
            );
Line: 497

select budget_id, budget_start_date, budget_end_date
from pqh_budgets
where
	nvl(position_control_flag,'X') = 'Y'
      and budgeted_entity_cd = 'POSITION'
and	((p_start_date <= budget_start_date
          and p_end_date >= budget_end_date
         ) or
        (p_start_date between budget_start_date and budget_end_date) or
        (p_end_date between budget_start_date and budget_end_date)
       )
     and (
          hr_psf_shd.SYSTEM_AVAILABILITY_STATUS(budget_unit1_id) = 'MONEY'
          or hr_psf_shd.SYSTEM_AVAILABILITY_STATUS(budget_unit2_id) = 'MONEY'
          or hr_psf_shd.SYSTEM_AVAILABILITY_STATUS(budget_unit3_id) = 'MONEY'
      );
Line: 553

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 nvl(position_control_flag,'X') = 'Y'
and budgeted_entity_cd = 'POSITION'
and	((p_start_date <= budget_start_date
          and p_end_date >= budget_end_date
         ) or
        (p_start_date between budget_start_date and budget_end_date) or
        (p_end_date between budget_start_date and budget_end_date)
       )
     and (
          hr_psf_shd.SYSTEM_AVAILABILITY_STATUS(budget_unit1_id) = 'MONEY'
          or hr_psf_shd.SYSTEM_AVAILABILITY_STATUS(budget_unit2_id) = 'MONEY'
          or hr_psf_shd.SYSTEM_AVAILABILITY_STATUS(budget_unit3_id) = 'MONEY'
      );
Line: 658

  select name
    from hr_all_organization_units u
   where organization_id = p_org_id;
Line: 663

  SELECT
  	table_route_id
  from
  	pqh_table_route
  where
  	table_alias = p_table_alias;
Line: 674

  select pos.position_id, pos.job_id, name
  from   hr_all_positions_f_vl pos
  where  pos.organization_id = p_organization_id
  and	 p_effective_date between pos.effective_start_date and pos.effective_end_date
  order by position_id;
Line: 683

  select user_name
  from fnd_user
  where employee_id =
    (select psf.supervisor_id
     from hr_all_positions_f psf
     where psf.position_id = p_position_id
     and p_effective_date >= psf.effective_start_date
     and p_effective_date <= psf.effective_end_date
    );
Line: 696

  select pqh_wf_notifications_s.nextval
  from dual;
Line: 918

            pqh_process_batch_log.insert_log
            (
             p_message_type_cd  =>l_message_type,
             p_message_text     =>l_message,
             p_information3	=>round(l_budgeted_val,2),
             p_information4	=>round(l_reallocation_val,2),
             p_information5	=>round(l_actual_val,2),
             p_information6	=>round(l_commitment_val,2),
             p_information7	=>l_user_name,
             p_information8     =>'POSITION',
             p_information9     =>p_unit_of_measure,
             p_information10    =>l_under_bgt_date,
             p_information11    =>p_batch_name,
             p_information12    =>'REPORT',
             p_information13    =>l_currency_code

            );
Line: 1088

            pqh_process_batch_log.insert_log
            (
             p_message_type_cd  =>l_message_type,
             p_message_text     =>l_message,
             p_information3     =>round(l_budgeted_val,2),
             p_information4     =>round(l_reallocation_val,2),
             p_information5     =>round(l_actual_val,2),
             p_information7     =>l_user_name,
             p_information8     =>'POSITION',
             p_information9     =>p_unit_of_measure,
             p_information10    =>l_under_bgt_date,
             p_information11    =>p_batch_name,
             p_information12    =>'REPORT'
            );
Line: 1258

            pqh_process_batch_log.insert_log
            (
             p_message_type_cd  =>l_message_type,
             p_message_text     =>l_message,
             p_information3	    =>round(l_budgeted_val,2),
             p_information4     =>round(l_reallocation_val,2),
             p_information5     =>round(l_actual_val,2),
             p_information7     =>l_user_name,
             p_information8     =>'POSITION',
             p_information9     =>p_unit_of_measure,
             p_information10    =>to_char(l_budgeted_fte_date,'YYYY/MM/DD'),
             p_information11    =>p_batch_name,
             p_information12    =>'REPORT'
            );
Line: 1365

  select ver.org_structure_version_id
  from 	 per_organization_structures str
       , per_org_structure_versions ver
  where	str.position_control_structure_flg = 'Y'
  and   str.organization_structure_id = p_org_structure_id
  and   str.business_group_id = p_business_group_id
  and   ver.business_group_id = p_business_group_id
  and	str.organization_structure_id = ver.organization_structure_id
  and 	p_effective_date between ver.date_from and nvl(date_to, hr_general.end_of_time);
Line: 1378

  select organization_id_parent organization_id
  from per_org_structure_elements a
  where org_structure_version_id = p_org_structure_version_id
  and not exists (
    select organization_id_child organization_id
    from per_org_structure_elements b
    where org_structure_version_id = p_org_structure_version_id
    and b.organization_id_child = a.organization_id_parent
    )
  and rownum <2;
Line: 1395

  select 0 rn,
  	     0 level1,
         organization_id
  from  hr_all_organization_units u
  where organization_id = p_start_org_id
        and   business_group_id = p_business_group_id
        and exists
        (select null from per_org_structure_elements e
         where e.org_structure_version_id = p_org_structure_version_id
         and   (e.organization_id_child = p_start_org_id
         or    e.organization_id_parent = p_start_org_id ) )
  union
  select rownum rn,
         level level1,
	     organization_id_child organization_id
  from   per_org_structure_elements a
  start with
  	organization_id_parent = p_start_org_id
  and   org_structure_version_id = p_org_structure_version_id
  connect by
  	organization_id_parent = prior organization_id_child
  and 	org_structure_version_id = p_org_structure_version_id;
Line: 1425

    select   rownum rn,
      	   0 level1,
             organization_id
    from hr_all_organization_units
    where business_group_id = p_business_group_id
    and INTERNAL_EXTERNAL_FLAG ='INT'
    and p_effective_date between date_from and nvl(date_to, hr_general.end_of_time);
Line: 1436

  select 'x'
  from 	 pqh_process_log
  where  log_context=p_batch_name;
Line: 1443

  select pqh_process_log_s.nextval
  from 	dual;
Line: 1615

  select distinct bdet.job_id, job.name
  from   pqh_budgets bud,
  	      pqh_budget_versions bver,
       	 pqh_budget_details bdet,
         per_jobs_tl job
  where  bud.business_group_id = p_business_group_id
  and    bud.position_control_flag = 'Y'
  and    bud.budgeted_entity_cd = 'JOB'
  and    (p_start_date1 <= bud.budget_end_date
           and p_end_date1 >= bud.budget_start_date)
  and    bver.budget_id = bud.budget_id
  and    bver.budget_version_id = bdet.budget_version_id
  and    bdet.job_id = job.job_id
  and    job.language = userenv('LANG');
Line: 1634

  select 'x'
  from 	 pqh_process_log
  where  log_context=p_batch_name;
Line: 1642

  select
  	pqh_process_log_s.nextval
  from
  	dual;
Line: 1651

  SELECT
  	table_route_id
  from
  	pqh_table_route
  where
  	table_alias = p_table_alias;
Line: 1906

            pqh_process_batch_log.insert_log
            (
             p_message_type_cd  =>l_message_type,
             p_message_text     =>l_message,
             p_information3	=>round(l_budgeted_val,2),
             p_information4	=>round(l_reallocation_val,2),
             p_information5	=>round(l_actual_val,2),
             p_information6	=>round(l_commitment_val,2),  -- p_information7	=>l_user_name
             p_information8     =>'JOB',
             p_information9     =>p_unit_of_measure,
             p_information10    =>l_under_bgt_date,
             p_information11    =>p_batch_name,
             p_information12    =>'REPORT',
             p_information13    => l_currency_code
            );
Line: 2025

            pqh_process_batch_log.insert_log
            (
             p_message_type_cd  =>l_message_type,
             p_message_text     =>l_message,
             p_information3	=>round(l_budgeted_val,2),
             p_information4	=>round(l_reallocation_val,2),
             p_information5	=>round(l_actual_val,2),
             p_information7	=>null,
             p_information8     =>'JOB',
             p_information9     =>p_unit_of_measure,
             p_information10    =>l_under_bgt_date,
             p_information11    =>p_batch_name,
             p_information12    =>'REPORT'
            );
Line: 2146

            pqh_process_batch_log.insert_log
            (
             p_message_type_cd  =>l_message_type,
             p_message_text     =>l_message,
             p_information3	=>round(l_budgeted_val,2),
             p_information4	=>round(l_reallocation_val,2),
             p_information5	=>round(l_actual_val,2),
             p_information7	=>null,
             p_information8     =>'JOB',
             p_information9     =>p_unit_of_measure,
             p_information10    =>to_char(l_budgeted_fte_date,'RRRR/MM/DD'),--l_under_bgt_date,
             p_information11    =>p_batch_name,
             p_information12    =>'REPORT'

            );
Line: 2224

  select distinct bdet.grade_id, grd.name
  from   pqh_budgets bud,
  	 pqh_budget_versions bver,
  	 pqh_budget_details bdet,
     per_grades_tl grd
  where  bud.business_group_id = p_business_group_id
  and    bud.position_control_flag = 'Y'
  and    bud.budgeted_entity_cd = 'GRADE'
  and    (p_start_date1 <= bud.budget_end_date
           and p_end_date1 >= bud.budget_start_date)
  and    bver.budget_id = bud.budget_id
  and    bver.budget_version_id = bdet.budget_version_id
  and    bdet.grade_id = grd.grade_id
  and    grd.language = userenv('LANG');
Line: 2243

  select 'x'
  from 	 pqh_process_log
  where  log_context=p_batch_name;
Line: 2251

  select
  	pqh_process_log_s.nextval
  from
  	dual;
Line: 2260

  SELECT
  	table_route_id
  from
  	pqh_table_route
  where
  	table_alias = p_table_alias;
Line: 2508

            pqh_process_batch_log.insert_log
            (
             p_message_type_cd  =>l_message_type,
             p_message_text     =>l_message,
             p_information3	=>round(l_budgeted_val,2),
             p_information4	=>round(l_reallocation_val,2),
             p_information5	=>round(l_actual_val,2),
             p_information6	=>round(l_commitment_val,2),
             p_information8     =>'GRADE',
             p_information9     =>p_unit_of_measure,
             p_information10    =>l_under_bgt_date,
             p_information11    =>p_batch_name,
             p_information12    =>'REPORT',
             p_information13    => l_currency_code
            );
Line: 2627

            pqh_process_batch_log.insert_log
            (
             p_message_type_cd  =>l_message_type,
             p_message_text     =>l_message,
             p_information3	=>round(l_budgeted_val,2),
             p_information4	=>round(l_reallocation_val,2),
             p_information5	=>round(l_actual_val,2),
             p_information7	=>null,
             p_information8     =>'GRADE',
             p_information9     =>p_unit_of_measure,
             p_information10    =>l_under_bgt_date,
             p_information11    =>p_batch_name,
             p_information12    =>'REPORT'

            );
Line: 2746

            pqh_process_batch_log.insert_log
            (
             p_message_type_cd  =>l_message_type,
             p_message_text     =>l_message,
             p_information3	=>round(l_budgeted_val,2),
             p_information4	=>round(l_reallocation_val,2),
             p_information5	=>round(l_actual_val,2),
             p_information7	=>null,
             p_information8     =>'GRADE',
             p_information9     =>p_unit_of_measure,
             p_information10    =>to_char(l_budgeted_fte_date,'RRRR/MM/DD'),
             p_information11    =>p_batch_name,
             p_information12    =>'REPORT'
            );
Line: 2805

  select name
    from hr_all_organization_units u
   where organization_id = p_org_id;
Line: 2813

  SELECT
  	table_route_id
  from
  	pqh_table_route
  where
  	table_alias = p_table_alias;
Line: 3001

            pqh_process_batch_log.insert_log
            (
             p_message_type_cd  =>l_message_type,
             p_message_text     =>l_message,
             p_information3	=>round(l_budgeted_val,2),
             p_information4	=>round(l_reallocation_val,2),
             p_information5	=>round(l_actual_val,2),
             p_information6	=>round(l_commitment_val,2),
             p_information7	=>l_user_name,
             p_information8     =>'ORGANIZATION',
             p_information9     =>p_unit_of_measure,
             p_information10    =>l_under_bgt_date,
             p_information11    =>p_batch_name,
             p_information12    =>'REPORT',
             p_information13    => l_currency_code
            );
Line: 3105

            pqh_process_batch_log.insert_log
            (
             p_message_type_cd  =>l_message_type,
             p_message_text     =>l_message,
             p_information3	=>round(l_budgeted_val,2),
             p_information4	=>round(l_reallocation_val,2),
             p_information5	=>round(l_actual_val,2),
             p_information7	=>l_user_name,
             p_information8     =>'ORGANIZATION',
             p_information9     =>p_unit_of_measure,
             p_information10    =>l_under_bgt_date,
             p_information11    =>p_batch_name,
             p_information12    =>'REPORT'
            );
Line: 3208

            pqh_process_batch_log.insert_log
            (
             p_message_type_cd  =>l_message_type,
             p_message_text     =>l_message,
             p_information3	=>round(l_budgeted_val,2),
             p_information4	=>round(l_reallocation_val,2),
             p_information5	=>round(l_actual_val,2),
             p_information7	=>l_user_name,
             p_information8     =>'ORGANIZATION',
             p_information9     =>p_unit_of_measure,
             p_information10    =>to_char(l_budgeted_fte_date,'YYYY/MM/DD'), --l_under_bgt_date,
             p_information11    =>p_batch_name,
             p_information12    =>'REPORT'
            );
Line: 3275

  select ver.org_structure_version_id
  from 	 per_organization_structures str
       , per_org_structure_versions ver
  where	str.position_control_structure_flg = 'Y'
  and   str.organization_structure_id = p_org_structure_id
  and   str.business_group_id = p_business_group_id
  and   ver.business_group_id = p_business_group_id
  and	str.organization_structure_id = ver.organization_structure_id
  and 	p_effective_date between ver.date_from and nvl(date_to, hr_general.end_of_time);
Line: 3288

  select organization_id_parent organization_id
  from per_org_structure_elements a
  where org_structure_version_id = p_org_structure_version_id
  and not exists (
    select organization_id_child organization_id
    from per_org_structure_elements b
    where org_structure_version_id = p_org_structure_version_id
    and b.organization_id_child = a.organization_id_parent
    )
  and rownum <2;
Line: 3304

  select 0 rn,
  	     0 level1,
         organization_id
        from  hr_all_organization_units u
        where organization_id = p_start_org_id
        and   business_group_id = p_business_group_id
        and exists
        (select null from per_org_structure_elements e
         where e.org_structure_version_id = p_org_structure_version_id
         and  (e.organization_id_child = p_start_org_id
         or    e.organization_id_parent = p_start_org_id) )
  union
  select rownum rn,
  	 level level1,
	 organization_id_child organization_id
  from   per_org_structure_elements a
  start with
  	organization_id_parent = p_start_org_id
  and   org_structure_version_id = p_org_structure_version_id
  connect by
  	organization_id_parent = prior organization_id_child
  and 	org_structure_version_id = p_org_structure_version_id;
Line: 3333

    select   rownum rn,
      	   0 level1,
             organization_id
    from hr_all_organization_units
    where business_group_id = p_business_group_id
    and INTERNAL_EXTERNAL_FLAG ='INT'
    and p_effective_date between date_from and nvl(date_to, hr_general.end_of_time);
Line: 3344

  select 'x'
  from 	 pqh_process_log
  where  log_context=p_batch_name;
Line: 3352

  select
  	pqh_process_log_s.nextval
  from
  	dual;
Line: 3360

  select pqh_wf_notifications_s.nextval
  from dual;
Line: 3679

    select bud.currency_code
    from
        pqh_budgets bud,
        pqh_budget_versions bver,
        pqh_budget_details bdet,
        pqh_budget_periods bper,
        per_time_periods stp,
        per_time_periods etp,
        pqh_budget_sets bsets,
        pqh_budget_elements bele,
        pqh_bdgt_cmmtmnt_elmnts bcl
    where nvl(bud.position_control_flag,'X') = 'Y'
    and bud.budgeted_entity_cd = p_budget_entity
    and bud.business_group_id = p_business_group_id
    and	((p_start_date <= bud.budget_start_date
          and p_end_date >= bud.budget_end_date)
          or
         (p_start_date between bud.budget_start_date and bud.budget_end_date) or
         (p_end_date between bud.budget_start_date and bud.budget_end_date)
        )
    and ( hr_psf_shd.SYSTEM_AVAILABILITY_STATUS(budget_unit1_id) = 'MONEY'
          or hr_psf_shd.SYSTEM_AVAILABILITY_STATUS(budget_unit2_id) = 'MONEY'
          or hr_psf_shd.SYSTEM_AVAILABILITY_STATUS(budget_unit3_id) = 'MONEY'
        )
    and bud.budget_id = bver.budget_id
    and trunc(p_effective_date) between trunc(bver.date_from) and trunc(bver.date_to)
    and nvl(p_organization_id, nvl(bdet.organization_id,  -1)) =
                               nvl(bdet.organization_id,  -1)
    and nvl(p_job_id,          nvl(bdet.job_id,   -1)) =
		               nvl(bdet.job_id,   -1)
    and nvl(p_position_id,     nvl(bdet.position_id,      -1)) =
			       nvl(bdet.position_id,      -1)
    and nvl(p_grade_id,        nvl(bdet.grade_id,         -1)) =
			       nvl(bdet.grade_id,         -1)
    and bver.budget_version_id = bdet.budget_version_id
    and bper.budget_detail_id = bdet.budget_detail_id
    and bper.start_time_period_id = stp.time_period_id
    and bper.end_time_period_id = etp.time_period_id
    and etp.end_date >= p_start_date
    and stp.start_date <= p_end_date
    and bsets.budget_period_id = bper.budget_period_id
    and bele.budget_set_id = bsets.budget_set_id
    and bud.budget_id = bcl.budget_id
    and bele.element_type_id = bcl.element_type_id;
Line: 3725

    select currency_code
                from per_business_groups
                where business_group_id = p_business_group_id;