DBA Data[Home] [Help]

APPS.PQH_WKS_BUDGET SQL Statements

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

Line: 6

   cursor c1 is select precision
                from fnd_currencies
                where currency_code = p_currency_code;
Line: 20

   cursor c1 is select 'x' from per_valid_grades
                where (position_id = p_position_id or position_id is null)
                and (job_id        = p_job_id or job_id is null)
                and grade_id = p_grade_id ;
Line: 48

   cursor c1 is select parent_worksheet_detail_id from pqh_worksheet_details
                where worksheet_detail_id = p_worksheet_detail_id;
Line: 63

   cursor c1 is select status from pqh_worksheet_details
                where action_cd ='D'
                and parent_worksheet_detail_id = p_worksheet_detail_id;
Line: 101

   cursor c1 is select budget_unit1_id,budget_unit2_id,budget_unit3_id
                from pqh_budgets bgt,pqh_worksheets wks, pqh_worksheet_details wkd
		where wkd.worksheet_id = wks.worksheet_id
		and wks.budget_id = bgt.budget_id
		and wkd.worksheet_detail_id = p_worksheet_detail_id;
Line: 146

   cursor c1 is select ors.name
                from per_org_structure_versions osv, per_organization_structures ors
                where osv.organization_structure_id = ors.organization_structure_id
                and osv.org_structure_version_id = p_org_structure_version_id;
Line: 159

   cursor c1 is select system_type_cd
                from per_shared_types
                where lookup_type ='BUDGET_MEASUREMENT_TYPE'
                and shared_type_id = p_unit_id;
Line: 186

   cursor c1 is select shared_type_name
                from per_shared_types_vl
                where lookup_type ='BUDGET_MEASUREMENT_TYPE'
                and shared_type_id = p_unit_id;
Line: 205

		select parent_worksheet_detail_id,worksheet_id
		from pqh_worksheet_details
		where worksheet_detail_id = p_worksheet_detail_id ;
Line: 209

		select propagation_method,worksheet_detail_id
		from pqh_worksheet_details
		where worksheet_detail_id = p_worksheet_detail_id ;
Line: 213

		select propagation_method
		from pqh_worksheets
		where worksheet_id = p_worksheet_id ;
Line: 293

   cursor c1 is select nvl(description,meaning) description
                from hr_lookups
                where lookup_type = p_lookup_type
                and lookup_code   = p_lookup_code;
Line: 307

   cursor c0 is select worksheet_id,propagation_method from pqh_worksheet_details
		where worksheet_detail_id = p_worksheet_detail_id ;
Line: 313

   cursor c1 is select propagation_method from pqh_worksheets
		where worksheet_id = l_worksheet_id ;
Line: 342

   cursor c1 is select currency_code,budget_unit1_id,budget_unit2_id,budget_unit3_id
                from pqh_budgets
                where budget_id = p_budget_id;
Line: 390

   cursor c1 is select budget_id
                from pqh_worksheets
                where worksheet_id = p_worksheet_id;
Line: 413

   cursor c1 is select wks.budget_id
                from pqh_worksheet_details wkd, pqh_worksheets wks
                where wkd.worksheet_detail_id = p_worksheet_detail_id
                and wkd.worksheet_id = wks.worksheet_id;
Line: 435

   cursor c1 is select bgt.budget_unit1_aggregate,bgt.budget_unit2_aggregate,bgt.budget_unit3_aggregate
		from pqh_worksheets wks, pqh_budgets bgt
		where wks.worksheet_id = p_worksheet_id
		and wks.budget_id = bgt.budget_id;
Line: 455

   cursor c1 is select bgt.budget_unit1_aggregate,bgt.budget_unit2_aggregate,bgt.budget_unit3_aggregate
		from pqh_worksheets wks, pqh_worksheet_details wkd, pqh_budgets bgt
		where wks.worksheet_id = wkd.worksheet_id
		and wks.budget_id = bgt.budget_id
		and wkd.worksheet_detail_id = p_worksheet_detail_id;
Line: 472

procedure insert_budgetset(p_dflt_budget_set_id      number,
                           p_worksheet_budget_set_id number) IS
   cursor c1 is select dflt_budget_element_id,element_type_id,dflt_dist_percentage
                from pqh_dflt_budget_elements pbe
                where dflt_budget_set_id = p_dflt_budget_set_id ;
Line: 478

                select project_id, award_id, task_id,
                       organization_id, expenditure_type,
                       cost_allocation_keyflex_id,dflt_dist_percentage
                from pqh_dflt_fund_srcs
                where dflt_budget_element_id = p_dflt_budget_element_id ;
Line: 493

         select count(*) into l_count from pqh_worksheet_bdgt_elmnts
         where worksheet_budget_set_id = p_worksheet_budget_set_id ;
Line: 524

end insert_budgetset;
Line: 525

procedure insert_budgetset(p_dflt_budget_set_id number,
                           p_budget_set_id      number) IS
   cursor c1 is select dflt_budget_element_id,element_type_id,dflt_dist_percentage
                from pqh_dflt_budget_elements pbe
                where dflt_budget_set_id = p_dflt_budget_set_id ;
Line: 531

                select project_id, award_id, task_id,
                       organization_id, expenditure_type,
                       cost_allocation_keyflex_id,dflt_dist_percentage
                from pqh_dflt_fund_srcs
                where dflt_budget_element_id = p_dflt_budget_element_id ;
Line: 546

         select count(*) into l_count from pqh_budget_elements
         where budget_set_id = p_budget_set_id ;
Line: 577

end insert_budgetset;
Line: 583

   cursor c1 is select worksheet_detail_id,user_id,status,defer_flag,object_version_number
                from pqh_worksheet_details
                where action_cd ='D'
                and parent_worksheet_detail_id = p_worksheet_detail_id
                and nvl(defer_flag,'N') = 'N'
                and user_id is not null
                and organization_id is not null
                and status = 'DELEGATE'
                for update of status;
Line: 593

   select user_name
   from fnd_user
   where user_id = p_user_id ;
Line: 635

      hr_utility.set_location('going to update status'||l_proc,60);
Line: 637

      pqh_budget.update_worksheet_detail(
      p_worksheet_detail_id               => i.worksheet_detail_id,
      p_effective_date                    => trunc(sysdate),
      p_object_version_number             => l_object_version_number,
      p_status                            => 'DELEGATED'
      );
Line: 643

      hr_utility.set_location('updated status'||l_proc,60);
Line: 656

   cursor c0 is select max(version_number) from pqh_budget_versions
		where budget_id = p_budget_id ;
Line: 658

   cursor c1 is select 'x' from pqh_budget_versions
                where budget_version_id = p_budget_version_id
                and budget_id = p_budget_id;
Line: 661

   cursor c2 is select date_to from pqh_budget_versions
		where version_number = l_max_version
		and budget_id = p_budget_id;
Line: 664

   cursor c3 is select version_number from pqh_budget_versions
		where budget_version_id = p_budget_version_id;
Line: 787

   cursor c1 is select worksheet_detail_id,object_version_number,
                       budget_unit1_value,budget_unit2_value,budget_unit3_value,
                       old_unit1_value,old_unit2_value,old_unit3_value
                from pqh_worksheet_details
                where parent_worksheet_detail_id = p_worksheet_detail_id
                and action_cd ='D';
Line: 837

          pqh_budget.update_worksheet_detail(
                     p_worksheet_detail_id   => i.worksheet_detail_id,
                     p_object_version_number => l_object_version_number,
                     p_effective_date        => trunc(sysdate),
                     p_budget_unit1_value    => l_budget_unit1_value,
                     p_budget_unit2_value    => l_budget_unit2_value,
                     p_budget_unit3_value    => l_budget_unit3_value,
                     p_old_unit1_value       => l_budget_unit1_value,
                     p_old_unit2_value       => l_budget_unit2_value,
                     p_old_unit3_value       => l_budget_unit3_value);
Line: 860

                              p_rows_inserted        out nocopy number) is
   l_budget_start_date date;
Line: 866

   cursor c0 is select budget_start_date,budget_end_date,valid_grade_reqd_flag,budgeted_entity_cd
                from pqh_budgets bgt, pqh_budget_versions bgv
                where bgv.budget_id = bgt.budget_id
                and bgv.budget_version_id = p_budget_version_id;
Line: 870

   cursor c1 is select grade_id from per_grades a
		where business_group_id = p_business_group_id
                and ((nvl(l_valid_grade_flag,'N') = 'Y' and l_budgeted_entity_cd = 'GRADE' and
                     a.grade_id in (select b.grade_id from per_valid_grades b
                                   where  b.date_from < l_budget_end_date
                                   and   (b.date_to > l_budget_start_date or b.date_to is null)))
                    or (nvl(l_valid_grade_flag,'N') = 'N' and date_from < l_budget_end_date
                        and (date_to > l_budget_start_date or date_to is null)))
                and pqh_budget.already_budgeted_grd(a.grade_id) = 'FALSE' ;
Line: 880

   l_rows_inserted number := 0;
Line: 891

      l_rows_inserted := l_rows_inserted + 1;
Line: 914

      pqh_budget.insert_grd_is_bud(i.grade_id);
Line: 916

   p_rows_inserted := l_rows_inserted;
Line: 919

p_rows_inserted := null;
Line: 925

                            p_rows_inserted        out nocopy number) is
   l_budget_start_date date;
Line: 928

   cursor c0 is select budget_start_date,budget_end_date
                from pqh_budgets bgt, pqh_budget_versions bgv
                where bgv.budget_id = bgt.budget_id
                and bgv.budget_version_id = p_budget_version_id;
Line: 932

   cursor c1 is select job_id from per_jobs job, per_job_groups jgr
		where job.job_group_id = jgr.job_group_id and jgr.internal_name = 'HR_' || job.business_group_id
                and job.business_group_id = p_business_group_id
                and date_from < l_budget_end_date
                and (date_to > l_budget_start_date or date_to is null)
                and pqh_budget.already_budgeted_job(job_id) = 'FALSE';
Line: 939

   l_rows_inserted number := 0;
Line: 950

      l_rows_inserted := l_rows_inserted + 1;
Line: 973

      pqh_budget.insert_job_is_bud(i.job_id);
Line: 975

   p_rows_inserted := l_rows_inserted;
Line: 978

p_rows_inserted := null;
Line: 985

                                 p_rows_inserted        out nocopy number) is
   l_budget_start_date date;
Line: 988

   cursor c0 is select budget_start_date,budget_end_date
                from pqh_budgets bgt, pqh_budget_versions bgv
                where bgv.budget_id = bgt.budget_id
                and bgv.budget_version_id = p_budget_version_id;
Line: 992

   cursor c1 is select position_id,job_id,pos.organization_id organization_id
		from hr_positions pos,hr_organization_units org
		where org.business_group_id = p_business_group_id
		and pos.business_group_id   = p_business_group_id
		and pos.organization_id = org.organization_id
                and pos.effective_start_date < l_budget_end_date
                and pos.effective_end_date > l_budget_start_date
                and pqh_budget.already_budgeted_pos(position_id) = 'FALSE'
                and get_position_budget_flag(pos.availability_status_id) = 'Y';
Line: 1001

   cursor c2 is select distinct --Added Distinct to eliminate duplicates from the cursor to fix the bug#10284825.
   			position_id,job_id,organization_id
               from  ( select organization_id_child from pqh_worksheet_organizations_v
		       where org_structure_version_id = p_org_hier_ver
                      connect by prior organization_id_child = organization_id_parent
                                  and org_structure_version_id = p_org_hier_ver
		      start with organization_id_parent = p_start_organization_id
                                  and org_structure_version_id = p_org_hier_ver
		      union
		      select p_start_organization_id organization_id_child from dual )x,
		hr_positions_f
		where pqh_budget.already_budgeted_pos(position_id) = 'FALSE'
                and get_position_budget_flag(availability_status_id) = 'Y'
                and effective_start_date < l_budget_end_date
                and effective_end_date > l_budget_start_date
		and organization_id = x.organization_id_child ;
Line: 1018

   l_rows_inserted number := 0;
Line: 1030

      hr_utility.set_location('Business group cursor selected '||l_proc,20);
Line: 1032

         l_rows_inserted := l_rows_inserted + 1;
Line: 1055

         pqh_budget.insert_pos_is_bud(i.position_id);
Line: 1056

         hr_utility.set_location('position inserted '||i.position_id||l_proc,40);
Line: 1059

      hr_utility.set_location('Org hierarchy cursor selected '||l_proc,45);
Line: 1061

         l_rows_inserted := l_rows_inserted + 1;
Line: 1084

         pqh_budget.insert_pos_is_bud(i.position_id);
Line: 1085

         hr_utility.set_location('position inserted '||i.position_id||l_proc,50);
Line: 1088

   p_rows_inserted := l_rows_inserted;
Line: 1091

p_rows_inserted := null;
Line: 1098

                                     p_rows_inserted        out nocopy number) is
   l_budget_start_date date;
Line: 1101

   cursor c0 is select budget_start_date,budget_end_date
                from pqh_budgets bgt, pqh_budget_versions bgv
                where bgv.budget_id = bgt.budget_id
                and bgv.budget_version_id = p_budget_version_id;
Line: 1105

   cursor c1 is select organization_id
		from hr_all_organization_units
		where business_group_id = p_business_group_id
		and date_from < l_budget_end_date
		and (date_to > l_budget_start_date or date_to is null)
		and DECODE(HR_SECURITY.VIEW_ALL ,'Y' , 'TRUE',
                 HR_SECURITY.SHOW_RECORD('HR_ALL_ORGANIZATION_UNITS', ORGANIZATION_ID))='TRUE'
		--and decode(hr_general.get_xbg_profile,'Y', business_group_id , hr_general.get_business_group_id) = business_group_id
		and pqh_budget.already_budgeted_org(organization_id) = 'FALSE';
Line: 1114

   cursor c2 is select w.organization_id_child organization_id
                      from pqh_worksheet_organizations_v w
                      where org_structure_version_id = p_org_hier_ver
                      and pqh_budget.already_budgeted_org(w.organization_id_child) = 'FALSE'
                      and exists
                      (select null
                       from hr_all_organization_units hao
                       where organization_id = w.organization_id_child
                       and date_from < l_budget_end_date
                       and (date_to > l_budget_start_date or date_to is null)
                       and DECODE(HR_SECURITY.VIEW_ALL ,'Y' , 'TRUE',
                        HR_SECURITY.SHOW_RECORD('HR_ALL_ORGANIZATION_UNITS', HAO.ORGANIZATION_ID))='TRUE' )
                       --AND decode(hr_general.get_xbg_profile,'Y', hao.business_group_id , hr_general.get_business_group_id) = hao.business_group_id)
                      connect by prior organization_id_child = organization_id_parent
                                   and org_structure_version_id = p_org_hier_ver
                      start with organization_id_parent = p_start_organization_id
                                   and org_structure_version_id = p_org_hier_ver
                union
                select organization_id
                from hr_all_organization_units hao
                where organization_id = p_start_organization_id
                and pqh_budget.already_budgeted_org(p_start_organization_id) = 'FALSE'
                and date_from < l_budget_end_date
                and (date_to > l_budget_start_date or date_to is null)
                and DECODE(HR_SECURITY.VIEW_ALL ,'Y' , 'TRUE',
                        HR_SECURITY.SHOW_RECORD('HR_ALL_ORGANIZATION_UNITS', HAO.ORGANIZATION_ID))='TRUE' ;
Line: 1145

   l_rows_inserted number := 0;
Line: 1158

         l_rows_inserted := l_rows_inserted + 1;
Line: 1181

         hr_utility.set_location('inserting '||i.organization_id||l_proc,30);
Line: 1182

         pqh_budget.insert_org_is_bud(i.organization_id);
Line: 1187

         l_rows_inserted := l_rows_inserted + 1;
Line: 1210

         hr_utility.set_location('inserting '||i.organization_id||l_proc,50);
Line: 1211

         pqh_budget.insert_org_is_bud(i.organization_id);
Line: 1214

   p_rows_inserted := l_rows_inserted;
Line: 1217

p_rows_inserted := null;
Line: 1221

   cursor c1 is select budget_id from pqh_worksheets
                where worksheet_id = p_worksheet_id;
Line: 1231

   cursor c1 is select worksheet_id from pqh_worksheet_details
                where worksheet_detail_id = p_worksheet_detail_id;
Line: 1243

   cursor c1 is select budget_id
                from pqh_budget_versions bgv, pqh_budget_details bgd
                where bgd.budget_detail_id = p_budget_detail_id
                and bgd.budget_version_id = bgv.budget_version_id ;
Line: 1254

procedure insert_default_period(p_worksheet_detail_id   in     number,
                                p_wkd_ovn               in out nocopy number,
                                p_worksheet_unit1_value in     number default null,
                                p_worksheet_unit2_value in     number default null,
                                p_worksheet_unit3_value in     number default null,
                                p_worksheet_period_id      out nocopy number,
                                p_wpr_ovn                  out nocopy number) is
   l_wkd_ovn number := p_wkd_ovn;
Line: 1271

   select time_period_id,start_date
   from per_time_periods
   where period_set_name = l_calendar
   and start_date >= l_budget_start_date
   and start_date < l_budget_end_date
   order by start_date;
Line: 1278

   select time_period_id,end_date
   from per_time_periods
   where period_set_name = l_calendar
   and end_date > l_budget_start_date
   and end_date <= l_budget_end_date
   and end_date > l_period_start_date
   order by end_date desc;
Line: 1285

   l_proc varchar2(100) := g_package||'insert_default_period' ;
Line: 1293

   select period_set_name,budget_start_date,budget_end_date
   into l_calendar,l_budget_start_date,l_budget_end_date
   from pqh_budgets
   where budget_id = l_budget_id;
Line: 1312

      pqh_budget.update_worksheet_detail(
                 p_worksheet_detail_id    => p_worksheet_detail_id,
                 p_object_version_number  => p_wkd_ovn,
                 p_effective_date         => trunc(sysdate),
                 p_budget_unit1_available => p_worksheet_unit1_value,
                 p_budget_unit2_available => p_worksheet_unit1_value,
                 p_budget_unit3_available => p_worksheet_unit1_value);
Line: 1321

      hr_utility.set_location('inserting worksheet period '||l_proc,100);
Line: 1350

end insert_default_period;
Line: 1502

   select wks.worksheet_name,wkd.organization_id
   from pqh_worksheets wks, pqh_worksheet_details wkd
   where wkd.worksheet_id = wks.worksheet_id
   and worksheet_detail_id = p_worksheet_detail_id
   and nvl(action_cd,'D') ='D';
Line: 1526

Cursor C_position is select valid_grade_id
             from   per_valid_grades
             where  position_id = p_position_id
             and    grade_id = p_grade_id
             and    rownum < 2;
Line: 1532

Cursor C_job is select valid_grade_id
             from   per_valid_grades
             where  job_id = p_job_id
             and    grade_id = p_grade_id
             and    rownum < 2;
Line: 1571

Cursor C_job is select valid_grade_id
             from   per_valid_grades
             where  job_id = l_job_id
             and    grade_id = p_grade_id
             and    date_from < p_end_bud_date
             and    (date_to > p_start_bud_date or date_to is null)
             and    rownum < 2;
Line: 1579

Cursor C_position is select valid_grade_id
             from   per_valid_grades
             where  position_id = p_position_id
             and    grade_id = p_grade_id
             and    date_from < p_end_bud_date
             and    (date_to > p_start_bud_date or date_to is null)
             and    rownum < 2;
Line: 1587

Cursor C2 is select valid_grade_id
             from   per_valid_grades
             where  grade_id = p_grade_id
             and    date_from < p_end_bud_date
             and    (date_to > p_start_bud_date or date_to is null)
             and    rownum < 2;
Line: 1623

Select nvl(information1,'Y')
  from per_shared_types
 where lookup_type = 'POSITION_AVAILABILITY_STATUS'
   and shared_type_id = p_availability_status_id;
Line: 1653

   select organization_id,job_id,effective_start_date,effective_end_date
   into l_org_id,l_job_id,l_pos_start_date,l_pos_end_date
   from pqh_position_transactions
   where position_transaction_id = p_position_transaction_id;
Line: 1663

procedure update_wkd_pot(p_worksheet_detail_id number) is
begin
   update pqh_worksheet_details
   set position_transaction_id = null
   where worksheet_detail_id = p_worksheet_detail_id;
Line: 1668

end update_wkd_pot;
Line: 1672

   cursor c_worksheet_periods is select worksheet_period_id,object_version_number
      from pqh_worksheet_periods where worksheet_detail_id = p_worksheet_detail_id;
Line: 1675

      select worksheet_budget_set_id,object_version_number
      from pqh_worksheet_budget_sets where worksheet_period_id = p_worksheet_period_id;
Line: 1678

      select worksheet_bdgt_elmnt_id,object_version_number
      from pqh_worksheet_bdgt_elmnts where worksheet_budget_set_id = p_worksheet_budget_set_id;
Line: 1681

      select worksheet_fund_src_id,object_version_number
      from pqh_worksheet_fund_srcs where worksheet_bdgt_elmnt_id = p_worksheet_bdgt_elmnt_id;
Line: 1693

               pqh_worksheet_fund_srcs_api.DELETE_WORKSHEET_FUND_SRC(
               P_WORKSHEET_FUND_SRC_ID => l.worksheet_fund_src_id,
               P_OBJECT_VERSION_NUMBER => l.object_version_number);
Line: 1697

            pqh_worksheet_bdgt_elmnts_api.DELETE_WORKSHEET_BDGT_ELMNT(
            P_WORKSHEET_BDGT_ELMNT_ID => k.worksheet_bdgt_elmnt_id,
            P_OBJECT_VERSION_NUMBER => k.object_version_number);
Line: 1701

         pqh_worksheet_budget_sets_api.DELETE_WORKSHEET_BUDGET_SET(
         P_WORKSHEET_BUDGET_SET_ID => j.worksheet_budget_set_id,
         P_EFFECTIVE_DATE      => trunc(sysdate),
         P_OBJECT_VERSION_NUMBER => j.object_version_number);
Line: 1706

      pqh_worksheet_periods_api.DELETE_WORKSHEET_PERIOD(
      P_WORKSHEET_PERIOD_ID => i.worksheet_period_id,
      P_EFFECTIVE_DATE      => trunc(sysdate),
      P_OBJECT_VERSION_NUMBER => i.object_version_number);
Line: 1712

   select parent_worksheet_detail_id,budget_unit1_value,budget_unit2_value,budget_unit3_value,object_version_number
   into l_parent_wkd_id,l_budget_unit1_value,l_budget_unit2_value,l_budget_unit3_value,l_object_version_number
   from pqh_worksheet_details where worksheet_detail_id = p_worksheet_detail_id;
Line: 1717

      update pqh_worksheet_details
      set budget_unit1_available = nvl(budget_unit1_available,0) - nvl(l_budget_unit1_value,0),
          budget_unit2_available = nvl(budget_unit2_available,0) - nvl(l_budget_unit2_value,0),
          budget_unit3_available = nvl(budget_unit3_available,0) - nvl(l_budget_unit3_value,0)
      where worksheet_detail_id = l_parent_wkd_id;
Line: 1723

      update pqh_worksheet_details
      set budget_unit1_value = nvl(budget_unit1_value,0) - nvl(l_budget_unit1_value,0),
          budget_unit2_value = nvl(budget_unit2_value,0) - nvl(l_budget_unit2_value,0),
          budget_unit3_value = nvl(budget_unit3_value,0) - nvl(l_budget_unit3_value,0)
      where worksheet_detail_id = l_parent_wkd_id;
Line: 1729

   pqh_worksheet_details_api.DELETE_WORKSHEET_DETAIL(
   P_WORKSHEET_DETAIL_ID => p_worksheet_detail_id,
   P_EFFECTIVE_DATE      => trunc(sysdate),
   P_OBJECT_VERSION_NUMBER => l_object_version_number);
Line: 1734

procedure delete_wkd(p_worksheet_detail_id in number,
                     p_object_version_number in number) is
   l_proc varchar2(100) := g_package||'delete_wkd' ;
Line: 1743

      select position_id,worksheet_detail_id
      from pqh_worksheet_details
      where worksheet_detail_id = p_worksheet_detail_id;
Line: 1752

      Position transaction should be updated to null
   else
      delete the dependent records of worksheet period, budgetsets etc.
      delete the worksheet_detail
      update the parent worksheet_detail balances
   end if;
Line: 1759

   delete the dependent records of worksheet period, budgetsets etc.
   delete the worksheet_detail
   update the parent worksheet_detail balances
end if;
Line: 1769

      select budgeted_entity_cd,budget_style_cd into l_budgeted_entity_cd,l_budget_style_cd
      from pqh_budgets where budget_id = l_budget_id;
Line: 1773

            update_wkd_pot(p_worksheet_detail_id => p_worksheet_detail_id);
Line: 1784

end delete_wkd;
Line: 1788

cursor gms is select a.status, a.application_id, b.application_short_name
from
fnd_product_installations a, fnd_application b
where
a.application_id = b.application_id
and
b.application_short_name = 'GMS' and status = 'I';