DBA Data[Home] [Help]

APPS.PQH_WORKFLOW SQL Statements

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

Line: 9

   select assignment_id,position_id
   into p_assignment_id, p_position_id
   from   per_all_assignments_f
   where  person_id = p_person_id
   and    primary_flag ='Y'
   AND    assignment_type = 'E'  -- bug 7330323
   and    p_effective_date between effective_start_date and effective_end_date;
Line: 29

   select user_id,employee_id
   into l_user_id,l_employee_id
   from fnd_user
   where user_name = p_user_name;
Line: 47

   select user_name,employee_id
   into l_user_name,l_employee_id
   from fnd_user
   where user_id = p_user_id;
Line: 62

   select freeze_status_cd,setup_type_cd
   into l_freeze_status_cd,l_setup_type_cd
   from pqh_transaction_categories
   where transaction_category_id = p_tran_cat_id
   and nvl(enable_flag,'Y') = 'Y';
Line: 79

   select 'TRUE' into l_return
   from per_pos_structure_elements
   where subordinate_position_id = p_position_id
   and pos_structure_version_id = p_pos_str_ver_id;
Line: 92

      select 'TRUE' into l_return
      from per_pos_structure_elements
      where parent_position_id = p_position_id
      and pos_structure_version_id = p_pos_str_ver_id;
Line: 116

   cursor c1 is select name
                from pqh_transaction_categories
                where transaction_category_id = p_transaction_category_id;
Line: 129

   cursor c1 is select role_name
                from pqh_roles
                where role_id = p_role_id;
Line: 145

          select decode(information_type, 'PQH_ROLE_USERS', to_number(pei.pei_information3), 0) role_id
          from per_people_extra_info pei , per_all_people_f ppf, fnd_user usr
          WHERE information_type = 'PQH_ROLE_USERS' and pei.person_id = ppf.person_id
          and p_session_date between ppf.effective_start_date and ppf.effective_end_date
          and usr.employee_id = ppf.person_id
          and nvl(pei.pei_information5,'Y')='Y'
          and nvl(pei.pei_information4,'N')='Y'
          and usr.user_id = p_user_id;
Line: 176

      select employee_id
      from fnd_user
      where user_id = p_user_id;
Line: 181

       select member_cd, workflow_enable_flag
       from   pqh_transaction_categories tct
       where  transaction_category_id = p_transaction_category_id;
Line: 186

         select asg.assignment_id,asg.position_id
         from per_all_assignments_f asg
            , fnd_user fu
         where asg.person_id = fu.employee_id
           and fu.user_id = p_user_id
           and asg.primary_flag = 'Y'
	   AND asg.assignment_type = 'E'  -- Bug 7422915
           and p_session_date between asg.effective_start_date and asg.effective_end_date;
Line: 196

          select decode(information_type, 'PQH_POS_ROLE_ID' , to_number(poei_information3), -1) ROLE_ID
          from per_position_extra_info pei, hr_all_positions_f pos, per_all_assignments_f asg
          where pei.position_id=pos.position_id and pei.information_type='PQH_POS_ROLE_ID'
          and pos.position_id = asg.position_id
          and p_session_date between pos.effective_start_date and pos.effective_end_date
          and p_session_date between asg.effective_start_date and asg.effective_end_date
          and asg.assignment_id = p_assignment_id;
Line: 279

   cursor c1 is select template_id
                from pqh_role_templates
                where role_id = p_role_id
                and transaction_category_id = p_transaction_category_id
                and enable_flag = 'Y';
Line: 379

   cursor c1 is select role_name from pqh_roles
                where role_id = p_role_id
                and nvl(enable_flag,'X') = 'Y';
Line: 382

   cursor c3 is select 'X'
          from per_people_extra_info pei , per_all_people_f ppf, fnd_user usr
          WHERE information_type = 'PQH_ROLE_USERS' and pei.person_id = ppf.person_id
          and p_session_date between ppf.effective_start_date and ppf.effective_end_date
          and usr.employee_id = ppf.person_id
          and decode(information_type, 'PQH_ROLE_USERS', to_number(pei.pei_information3), 0)= p_role_id
          and nvl(pei.pei_information5,'Y')='Y'
          and usr.user_id = p_user_id ;
Line: 430

         select role_id
         from pqh_routing_history rht, pqh_routing_list_members rlm
         where rht.forwarded_to_member_id = rlm.routing_list_member_id
         and rht.routing_history_id = p_routing_history_id;
Line: 435

         select 'X'
         from per_people_extra_info pei , per_all_people_f ppf, fnd_user usr
         WHERE information_type = 'PQH_ROLE_USERS' and pei.person_id = ppf.person_id
         and sysdate between ppf.effective_start_date and ppf.effective_end_date
         and usr.employee_id = ppf.person_id
         and decode(information_type, 'PQH_ROLE_USERS', to_number(pei.pei_information3), 0)= p_role_id
         and nvl(pei.pei_information5,'Y')='Y'
         and usr.user_id = p_user_id ;
Line: 479

       select employee_id from fnd_user
       where user_id = p_user_id;
Line: 482

       SELECT decode(information_type, 'PQH_POS_ROLE_ID' , to_number(poei_information3), -1) ROLE_ID
       from per_position_extra_info pei
       WHERE pei.position_id=p_position_id
       and pei.information_type='PQH_POS_ROLE_ID';
Line: 488

         select position_id
         from per_all_assignments_f
         where assignment_id = p_assignment_id
         and person_id = l_person_id
         and primary_flag = 'Y'
         and sysdate between effective_start_date and effective_end_date;
Line: 496

         select decode(information_type, 'PQH_ROLE_USERS', to_number(pei.pei_information3), 0) role_id
         from per_people_extra_info pei , per_all_people_f ppf
         WHERE information_type = 'PQH_ROLE_USERS' and pei.person_id = ppf.person_id
         and sysdate between ppf.effective_start_date and ppf.effective_end_date
         and ppf.person_id = p_person_id
         and nvl(pei.pei_information5,'Y')='Y'
         and nvl(pei.pei_information4,'N')='Y';
Line: 515

      select forwarded_to_member_id, forwarded_to_position_id,forwarded_to_assignment_id
      into l_rht_member_id,l_rht_position_id,l_rht_assignment_id
      from pqh_routing_history
      where routing_history_id = p_routing_history_id;
Line: 600

   select transaction_category_id
   into l_local_txncat_id
   from pqh_transaction_categories
   where business_group_id = nvl(p_business_group_id,-1)
   and short_name = p_short_name
   and nvl(enable_flag,'Y') = 'Y';
Line: 613

         select transaction_category_id
         into l_global_txncat_id
         from pqh_transaction_categories
         where business_group_id is null
         and short_name = p_short_name;
Line: 648

procedure insert_rout_crit(p_attribute_id   in number,
                           p_used_for       in varchar default null,
                           p_rule_name      in varchar default null,
                           p_attribute_type in varchar default null,
                           p_from_char      in varchar default null,
                           p_to_char        in varchar default null,
                           p_from_num       in number  default null,
                           p_to_num         in number  default null,
                           p_from_date      in date    default null,
                           p_to_date        in date    default null,
                           p_value_char     in varchar default null,
                           p_value_num      in number  default null,
                           p_value_date     in date    default null) is
   l_proc varchar2(81) := g_package||'insert_rout_crit';
Line: 699

end insert_rout_crit;
Line: 700

procedure delete_rout_crit(p_used_for in varchar,
                           p_rule_name in varchar) is
   l_proc varchar2(81) := g_package||'delete_rout_crit1';
Line: 712

            g_routing_criterion.delete(i);
Line: 713

            hr_utility.set_location('row deleted'||l_proc,10);
Line: 723

      hr_utility.set_location('error in delete_routing criterion'||l_proc,140);
Line: 725

end delete_rout_crit;
Line: 726

procedure delete_rout_crit(p_used_for in varchar) is
   l_proc varchar2(81) := g_package||'delete_rout_crit';
Line: 736

            g_routing_criterion.delete(i);
Line: 737

            hr_utility.set_location('row deleted'||l_proc,10);
Line: 747

      hr_utility.set_location('error in delete_routing criterion'||l_proc,140);
Line: 749

end delete_rout_crit;
Line: 753

   cursor c1 is select role_id,user_id
                from pqh_routing_list_members
                where routing_list_member_id = p_member_id ;
Line: 778

   cursor c1 is select override_role_id,override_user_id,override_position_id,override_assignment_id
                from pqh_routing_categories
                where routing_category_id = p_routing_category_id
                and nvl(enable_flag,'X') = 'Y'
                and nvl(delete_flag,'N') = 'N';
Line: 850

   cursor c1 is select forwarded_by_position_id,forwarded_by_assignment_id,forwarded_by_user_id,forwarded_by_role_id,
                       forwarded_by_member_id,routing_category_id
                from pqh_routing_history
                where routing_history_id = l_max_routing_history_id;
Line: 854

   cursor c2 is select rlm.role_id
                from pqh_routing_categories rc,pqh_routing_list_members rlm
                where rc.routing_category_id = l_rh_routing_category_id
                and rc.routing_list_id = rlm.routing_list_id
                and rlm.routing_list_member_id = l_member_id
                and nvl(rc.enable_flag,'X') = 'Y'
                and nvl(rlm.enable_flag,'X') = 'Y'
                and nvl(rc.delete_flag,'X') <> 'Y';
Line: 875

        select max(routing_history_id)
        into l_max_routing_history_id
        from pqh_routing_history
        where transaction_category_id = p_transaction_category_id
        and transaction_id = p_transaction_id
        and approval_cd ='APPROVED' ;
Line: 921

              hr_utility.set_location('From_clause selected '||l_proc,40);
Line: 936

	      hr_utility.set_location('CATg selected'||to_char(l_routing_category_id)||l_range_name||l_proc,50);
Line: 938

	         hr_utility.set_location('selected routing catg was used for approval'||l_proc,52);
Line: 944

	      hr_utility.set_location('errors in selecting routing_category'||l_proc,60);
Line: 1176

      hr_utility.set_location('from clause selected '||l_proc,30);
Line: 1265

         hr_utility.set_location('from clause selected '||l_proc,30);
Line: 1361

         hr_utility.set_location('from clause selected '||l_proc,30);
Line: 1445

  cursor c1 is select person_id
               from per_all_assignments_f
               where position_id = p_position_id
               and primary_flag = 'Y'
               and p_value_date between effective_start_date and effective_end_date;
Line: 1507

 cursor c1 is select user_id
              from fnd_user
              where employee_id = p_person_id
	      and p_value_date between nvl(start_date,p_value_date)
                                   and nvl(end_date,p_value_date);
Line: 1624

     hr_utility.set_location('From_clause selected '||l_proc,60);
Line: 1665

	   hr_utility.set_location('CATg selected'||to_char(p_routing_category_id)||p_range_name||l_proc,70);
Line: 1667

	   hr_utility.set_location('errors in selecting routing_category'||l_proc,70);
Line: 1799

  cursor c1 is select person_id
               from per_all_assignments_f
               where assignment_id = p_assignment_id
	       and p_value_date between effective_start_date and effective_end_date;
Line: 1940

        hr_utility.set_location('user selected, checking applicability'||l_proc,110);
Line: 2110

        hr_utility.set_location('user selected '||to_char(p_position_id)||l_proc,90);
Line: 2260

         hr_utility.set_location('next assignment selected, checking '||l_proc,80);
Line: 2323

cursor c0 is select wks.budget_id
             from pqh_worksheets wks, pqh_worksheet_details wdt
             where wdt.worksheet_detail_id = p_transaction_id
             and wdt.worksheet_id = wks.worksheet_id
             and wks.wf_transaction_category_id = p_tran_cat_id;
Line: 2328

cursor c1 is select attribute_name,column_name
             from pqh_attributes_vl
             where attribute_id = p_attribute_id
             and nvl(enable_flag,'X') ='Y';
Line: 2332

cursor c2 is select sty.shared_type_name unit_name,lkp.description avail_desc
             from pqh_budgets bgt, per_shared_types sty, hr_lookups lkp
             where bgt.budget_id = l_budget_id
             and bgt.budget_unit1_aggregate = lkp.lookup_code
             and lkp.lookup_type ='PQH_BGT_UOM_AGGREGATE'
             and bgt.budget_unit1_id = sty.shared_type_id ;
Line: 2338

cursor c3 is select sty.shared_type_name unit_name, lkp.description avail_desc
             from pqh_budgets bgt, per_shared_types sty, hr_lookups lkp
             where bgt.budget_id = l_budget_id
             and bgt.budget_unit2_aggregate = lkp.lookup_code
             and lkp.lookup_type ='PQH_BGT_UOM_AGGREGATE'
             and bgt.budget_unit2_id = sty.shared_type_id ;
Line: 2344

cursor c4 is select sty.shared_type_name unit_name, lkp.description avail_desc
             from pqh_budgets bgt, per_shared_types sty, hr_lookups lkp
             where bgt.budget_id = l_budget_id
             and bgt.budget_unit3_aggregate = lkp.lookup_code
             and lkp.lookup_type ='PQH_BGT_UOM_AGGREGATE'
             and bgt.budget_unit3_id = sty.shared_type_id ;
Line: 2435

   cursor c0 is select member_cd
                from pqh_transaction_categories
                where transaction_category_id = p_tran_cat_id;
Line: 2439

   select routing_list_id ,routing_category_id
   from pqh_routing_categories
   where transaction_category_id = p_tran_cat_id
   and nvl(enable_flag,'N') ='Y'
   and nvl(default_flag,'N') = 'Y'
   and nvl(delete_flag,'N') = 'N'
   and routing_list_id is not null;
Line: 2448

   select position_structure_id ,routing_category_id
   from pqh_routing_categories
   where transaction_category_id = p_tran_cat_id
   and nvl(enable_flag,'N') ='Y'
   and nvl(default_flag,'N') = 'Y'
   and nvl(delete_flag,'N') = 'N'
   and position_structure_id is not null;
Line: 2457

   select routing_category_id
   from pqh_routing_categories
   where transaction_category_id = p_tran_cat_id
   and nvl(enable_flag,'N') ='Y'
   and nvl(default_flag,'N') = 'Y'
   and nvl(delete_flag,'N') = 'N'
   and routing_list_id is null
   and position_structure_id is null;
Line: 2484

  delete_rout_crit(p_used_for => nvl(p_used_for,'L'));
Line: 2485

  hr_utility.set_location('data deleted for rout select '||l_proc,40);
Line: 2532

        select distinct ar.routing_category_id, ar.range_name
        from pqh_attribute_ranges ar
        where ar.routing_list_member_id is null
        and ar.position_id is null
        and ar.assignment_id is null
        and nvl(ar.enable_flag,'X')  = 'Y'
        and nvl(ar.delete_flag,'N')  = 'N'
        and routing_category_id in (select routing_category_id
                                    from pqh_routing_categories rc, pqh_transaction_categories tc
                                    where rc.transaction_category_id = p_tran_cat_id
                                    and tc.transaction_category_id = rc.transaction_category_id
                                    and ((tc.member_cd = 'R' and rc.routing_list_id is not null) or
                                        (tc.member_cd = 'P' and rc.Position_structure_id is not null) or
                                        (tc.member_cd = 'S' and rc.routing_list_id is null and rc.position_structure_id is null))
                                    and nvl(rc.enable_flag,'X')  = 'Y'
                                    and nvl(rc.delete_flag,'N')  = 'N'
                                    and nvl(rc.default_flag,'X') <> 'Y' );
Line: 2550

        select att.attribute_id,att.attribute_name,att.column_name,att.column_type
        from pqh_attributes att, pqh_txn_category_attributes tca
        where att.attribute_id = tca.attribute_id
	and tca.transaction_category_id = p_tran_cat_id
        and tca.list_identifying_flag = 'Y'
        and nvl(att.enable_flag,'X') = 'Y';
Line: 2557

        select ar.from_char,ar.to_char,ar.from_date,ar.to_date,ar.from_number,
               ar.to_number,rc.routing_category_id,ar.range_name
        from pqh_attribute_ranges ar,pqh_routing_categories rc
        where ar.attribute_id = p_attribute_id
        and ar.routing_category_id = rc.routing_category_id
        and rc.transaction_category_id = p_tran_cat_id
	and ar.routing_list_member_id is null
	and ar.position_id is null
	and ar.assignment_id is null
        and nvl(ar.enable_flag,'X') = 'Y'
        and nvl(rc.delete_flag,'N') = 'N'
        and nvl(ar.delete_flag,'N') = 'N'
        and nvl(rc.enable_flag,'X') = 'Y'
        and nvl(rc.default_flag,'X') <> 'Y';
Line: 2572

        select tc.member_cd,rc.routing_list_id,rc.position_structure_id
        from pqh_routing_categories rc, pqh_transaction_categories tc
        where rc.routing_category_id = p_routing_category_id
        and tc.transaction_category_id = rc.transaction_category_id
        and nvl(rc.delete_flag,'N') = 'N'
        and nvl(rc.enable_flag,'X') = 'Y';
Line: 2589

   selected_flag boolean) ;
Line: 2612

  delete_rout_crit(p_used_for => p_used_for);
Line: 2618

     l_hierarchy(l_rule_cnt).selected_flag := TRUE ;
Line: 2636

           execute immediate 'select '||i.column_name||' '||p_from_clause
           into l_attribute_value_char ;
Line: 2643

                hr_utility.set_location('error in select table'||l_proc,70);
Line: 2644

                hr_utility.set_message(8302,'PQH_SELECT_FAILED');
Line: 2666

           execute immediate 'select '||i.column_name||' '||p_from_clause
           into l_attribute_value_date ;
Line: 2673

                hr_utility.set_location('error in select table'||l_proc,70);
Line: 2674

                hr_utility.set_message(8302,'PQH_SELECT_FAILED');
Line: 2696

           execute immediate 'select '||i.column_name||' '||p_from_clause
           into l_attribute_value_num ;
Line: 2703

                hr_utility.set_location('error in select table'||l_proc,70);
Line: 2704

                hr_utility.set_message(8302,'PQH_SELECT_FAILED');
Line: 2728

         insert_rout_crit(p_attribute_id   => i.attribute_id,
                          p_used_for       => p_used_for,
                          p_rule_name      => j.range_name,
                          p_attribute_type => i.column_type,
                          p_from_num       => j.from_number,
                          p_to_num         => j.to_number,
                          p_value_num      => l_attribute_value_num,
                          p_from_char      => j.from_char,
                          p_to_char        => j.to_char,
                          p_value_char     => l_attribute_value_char,
                          p_from_date      => j.from_date,
                          p_to_date        => j.to_date,
                          p_value_date     => l_attribute_value_date);
Line: 2764

           hr_utility.set_location('Value not in range deselect range '||l_proc,150);
Line: 2767

                l_hierarchy(k).selected_flag := FALSE ;
Line: 2768

		hr_utility.set_location('catg deleted'||to_char(j.routing_category_id)||j.range_name||l_proc,155);
Line: 2774

    hr_utility.set_location('Picking selected range '||l_proc,160);
Line: 2777

       if l_hierarchy(i).selected_flag = TRUE then
          if l_range_found_flag = TRUE then
             -- hard coding the value of routing catg to 0
             p_routing_category_id := 0;
Line: 2791

             delete_rout_crit(p_used_for       => p_used_for,
                              p_rule_name      => p_range_name);
Line: 2813

       select count(*) into l_standard_setup
       from pqh_routing_categories
       where transaction_category_id = p_tran_cat_id
       and nvl(default_flag,'X') ='Y'
       and nvl(delete_flag,'N') = 'N'
       and nvl(enable_flag,'X') = 'Y';
Line: 2833

          hr_utility.set_message(8302,'PQH_NO_RANGE_SELECTED');
Line: 2840

     select count(*) into l_rout_cat
     from pqh_routing_categories
     where transaction_category_id = p_tran_cat_id
     and nvl(delete_flag,'N') = 'N'
     and nvl(enable_flag,'X') = 'Y';
Line: 2850

           select tc.member_cd,rc.routing_list_id,rc.position_structure_id,rc.routing_category_id
           into p_member_cd,p_routing_list_id,p_pos_str_id,p_routing_category_id
           from pqh_routing_categories rc, pqh_transaction_categories tc
           where tc.transaction_category_id = p_tran_cat_id
           and tc.transaction_category_id = rc.transaction_category_id
           and nvl(rc.enable_flag,'X') = 'Y'
           and nvl(rc.delete_flag,'N') = 'N' ;
Line: 2890

        select distinct range_name, NVL(approver_flag,'N') approve_flag
        from pqh_attribute_ranges
        where assignment_id = p_assignment_id
        and routing_category_id = p_routing_category_id
        and nvl(enable_flag,'X') = 'Y'
        and nvl(delete_flag,'N') = 'N';
Line: 2897

        select att.attribute_id,att.attribute_name,att.column_name,att.column_type
        from pqh_attributes att, pqh_txn_category_attributes tca
        where att.attribute_id = tca.attribute_id and
	tca.transaction_category_id = p_tran_cat_id
        and tca.member_identifying_flag = 'Y'
        and nvl(att.enable_flag,'X') = 'Y';
Line: 2904

        select range_name,from_char,to_char,from_date,to_date,from_number,to_number,approver_flag
        from pqh_attribute_ranges
        where attribute_id = p_attribute_id
        and assignment_id = p_assignment_id
        and routing_category_id = p_routing_category_id
        and nvl(delete_flag,'N') = 'N'
        and nvl(enable_flag,'X') = 'Y';
Line: 2917

   selected_flag boolean ) ;
Line: 2940

   delete_rout_crit(p_used_for => p_used_for);
Line: 2946

      l_assignment_rules(l_rule_cnt).selected_flag := TRUE ;
Line: 2963

               execute immediate 'select '||i.column_name||' '||p_from_clause
               into l_attribute_value_char ;
Line: 2970

                  hr_utility.set_location('error in select table'||l_proc,92);
Line: 2971

                  hr_utility.set_message(8302,'PQH_SELECT_FAILED');
Line: 2977

               execute immediate 'select '||i.column_name||' '||p_from_clause
               into l_attribute_value_date ;
Line: 2984

                  hr_utility.set_location('error in select table'||l_proc,92);
Line: 2985

                  hr_utility.set_message(8302,'PQH_SELECT_FAILED');
Line: 2991

               execute immediate 'select '||i.column_name||' '||p_from_clause
               into l_attribute_value_num ;
Line: 2998

                  hr_utility.set_location('error in select table'||l_proc,92);
Line: 2999

                  hr_utility.set_message(8302,'PQH_SELECT_FAILED');
Line: 3005

            insert_rout_crit(p_attribute_id   => i.attribute_id,
                             p_used_for       => p_used_for,
                             p_attribute_type => i.column_type,
                             p_from_num       => j.from_number,
                             p_to_num         => j.to_number,
                             p_value_num      => l_attribute_value_num,
                             p_from_char      => j.from_char,
                             p_to_char        => j.to_char,
                             p_value_char     => l_attribute_value_char,
                             p_from_date      => j.from_date,
                             p_to_date        => j.to_date,
                             p_value_date     => l_attribute_value_date);
Line: 3046

                     l_assignment_rules(k).selected_flag := FALSE ;
Line: 3054

          if l_assignment_rules(i).selected_flag = TRUE then
             if p_used_for = 'C' then
                g_current_member_range := l_assignment_rules(i).range_name;
Line: 3060

             delete_rout_crit(p_used_for => p_used_for,
                              p_rule_name => l_assignment_rules(i).range_name);
Line: 3115

 Select attribute_id,nvl(approver_flag,'N') approver_flag
        from pqh_attribute_ranges
        where position_id = p_position_id
        and routing_category_id = p_routing_category_id
        and nvl(delete_flag,'N') = 'N'
        and nvl(enable_flag,'X') ='Y'
        and range_name = p_range_name;
Line: 3163

 cursor c1 is select distinct range_name
              from pqh_attribute_ranges
              where position_id = p_position_id
              and routing_category_id = p_routing_category_id
              and nvl(delete_flag,'N') = 'N'
              and nvl(enable_flag,'X') ='Y';
Line: 3170

        select att.attribute_id,att.attribute_name,att.column_name,att.column_type
        from pqh_attributes att,pqh_txn_category_attributes tca
        where att.attribute_id = tca.attribute_id and
	tca.transaction_category_id = p_tran_cat_id
        and tca.member_identifying_flag = 'Y'
        and nvl(att.enable_flag,'X') = 'Y';
Line: 3177

        select range_name,from_char,to_char,from_date,to_date,from_number,to_number,approver_flag
        from pqh_attribute_ranges
        where attribute_id = p_attribute_id
        and position_id = p_position_id
        and routing_category_id = p_routing_category_id
        and nvl(delete_flag,'N') = 'N'
        and nvl(enable_flag,'X') ='Y';
Line: 3190

   selected_flag boolean ) ;
Line: 3238

      l_position_rules(l_rule_cnt).selected_flag := TRUE ;
Line: 3243

   delete_rout_crit(p_used_for => p_used_for);
Line: 3251

               execute immediate 'select '||i.column_name||' '||p_from_clause
               into l_attribute_value_char ;
Line: 3258

                  hr_utility.set_location('error in select table'||l_proc,92);
Line: 3259

                  hr_utility.set_message(8302,'PQH_SELECT_FAILED');
Line: 3265

               execute immediate 'select '||i.column_name||' '||p_from_clause
               into l_attribute_value_date ;
Line: 3272

                  hr_utility.set_location('error in select table'||l_proc,92);
Line: 3273

                  hr_utility.set_message(8302,'PQH_SELECT_FAILED');
Line: 3279

               execute immediate 'select '||i.column_name||' '||p_from_clause
               into l_attribute_value_num ;
Line: 3286

                  hr_utility.set_location('error in select table'||l_proc,92);
Line: 3287

                  hr_utility.set_message(8302,'PQH_SELECT_FAILED');
Line: 3292

            insert_rout_crit(p_attribute_id   => i.attribute_id,
                             p_used_for       => p_used_for,
                             p_attribute_type => i.column_type,
                             p_from_num       => j.from_number,
                             p_to_num         => j.to_number,
                             p_value_num      => l_attribute_value_num,
                             p_from_char      => j.from_char,
                             p_to_char        => j.to_char,
                             p_value_char     => l_attribute_value_char,
                             p_from_date      => j.from_date,
                             p_to_date        => j.to_date,
                             p_value_date     => l_attribute_value_date);
Line: 3336

                     hr_utility.set_location('not in range, deselecting'||l_proc,125);
Line: 3337

                     l_position_rules(k).selected_flag := FALSE ;
Line: 3345

         if l_position_rules(i).selected_flag = TRUE then
            if p_used_for = 'C' then
               g_current_member_range := l_position_rules(i).range_name;
Line: 3351

            delete_rout_crit(p_used_for => p_used_for,
                             p_rule_name => l_position_rules(i).range_name);
Line: 3401

 cursor c1 is select distinct range_name, NVL(approver_flag,'N') approve_flag
              from pqh_attribute_ranges
              where routing_list_member_id = p_member_id
              and routing_category_id = p_routing_category_id
              and nvl(delete_flag,'N') = 'N'
              and nvl(enable_flag,'X') ='Y';
Line: 3408

        select att.attribute_id,att.attribute_name,att.column_name,att.column_type
        from pqh_attributes att, pqh_txn_category_attributes tca
        where att.attribute_id = tca.attribute_id and
	tca.transaction_category_id = p_tran_cat_id
        and tca.member_identifying_flag = 'Y'
        and nvl(att.enable_flag,'X') = 'Y';
Line: 3415

        select range_name,from_char,to_char,from_date,to_date,from_number,to_number,approver_flag
        from pqh_attribute_ranges
        where attribute_id = p_attribute_id
        and routing_list_member_id = p_member_id
        and routing_category_id = p_routing_category_id
        and nvl(delete_flag,'N') = 'N'
        and nvl(enable_flag,'X') ='Y';
Line: 3422

 cursor c4 is select approver_flag
              from pqh_routing_list_members
              where routing_list_member_id = p_member_id
              and nvl(enable_flag,'X') = 'Y';
Line: 3432

   selected_flag boolean ) ;
Line: 3460

      l_member_rules(l_rule_cnt).selected_flag := TRUE ;
Line: 3472

   delete_rout_crit(p_used_for => p_used_for);
Line: 3481

               execute immediate 'select '||i.column_name||' '||p_from_clause
               into l_attribute_value_char ;
Line: 3488

                  hr_utility.set_location('error in select table'||l_proc,72);
Line: 3489

                  hr_utility.set_message(8302,'PQH_SELECT_FAILED');
Line: 3495

               execute immediate 'select '||i.column_name||' '||p_from_clause
               into l_attribute_value_date ;
Line: 3502

                  hr_utility.set_location('error in select table'||l_proc,82);
Line: 3503

                  hr_utility.set_message(8302,'PQH_SELECT_FAILED');
Line: 3509

               execute immediate 'select '||i.column_name||' '||p_from_clause
               into l_attribute_value_num ;
Line: 3516

                  hr_utility.set_location('error in select table'||l_proc,92);
Line: 3517

                  hr_utility.set_message(8302,'PQH_SELECT_FAILED');
Line: 3522

            insert_rout_crit(p_attribute_id   => i.attribute_id,
                             p_used_for       => p_used_for,
                             p_attribute_type => i.column_type,
                             p_from_num       => j.from_number,
                             p_to_num         => j.to_number,
                             p_value_num      => l_attribute_value_num,
                             p_from_char      => j.from_char,
                             p_to_char        => j.to_char,
                             p_value_char     => l_attribute_value_char,
                             p_from_date      => j.from_date,
                             p_to_date        => j.to_date,
                             p_value_date     => l_attribute_value_date);
Line: 3564

                     l_member_rules(k).selected_flag := FALSE ;
Line: 3565

                     hr_utility.set_location('not in range, deselecting'||l_member_rules(k).range_name||l_proc,132);
Line: 3574

         if l_member_rules(k).selected_flag = TRUE then
            if l_member_rules(k).approve_flag = TRUE then
               p_can_approve := TRUE;
Line: 3587

            delete_rout_crit(p_used_for => p_used_for,
                             p_rule_name => l_member_rules(k).range_name);
Line: 3647

 cursor c2 is select supervisor_id
              from per_all_assignments_f
              where assignment_id = p_cur_assignment_id
              and primary_flag ='Y'
              and p_value_date between effective_start_date and effective_end_date;
Line: 3838

  cursor c1 is select rou.from_clause,rou.where_clause
               from pqh_transaction_categories cat ,pqh_table_route rou
               where cat.transaction_category_id = p_tran_cat_id
               and cat.consolidated_table_route_id = rou.table_route_id ;
Line: 4141

  cursor c1 is select position_structure_id
               from per_pos_structure_versions
               where pos_structure_version_id = p_pos_str_ver_id ;
Line: 4166

  cursor c1 is select max(pos_structure_version_id)
               from per_pos_structure_versions
               where position_structure_id = p_pos_str_id ;
Line: 4206

  cursor c1 is select role_id,role_name
               from pqh_roles
               where role_name = nvl(p_role_name,role_name)
	       and role_id = nvl(p_role_id,role_id)
               and nvl(enable_flag,'X') ='Y';
Line: 4211

  cursor c2 is select routing_list_member_id
               from pqh_routing_list_members
               where routing_list_id = p_routing_list_id
               and role_id = p_role_id
               and user_id = p_user_id
               and nvl(enable_flag,'X') ='Y';
Line: 4217

  cursor c3 is select routing_list_member_id
               from pqh_routing_list_members
               where routing_list_id = p_routing_list_id
               and role_id = p_role_id and user_id is null
               and nvl(enable_flag,'X') ='Y';
Line: 4224

  cursor c4 is select routing_list_member_id
               from pqh_routing_list_members
               where routing_list_id = p_routing_list_id
               and role_id = p_old_role_id
               and user_id = p_old_user_id
               and nvl(enable_flag,'X') ='Y';
Line: 4230

  cursor c5 is select routing_list_member_id
               from pqh_routing_list_members
               where routing_list_id = p_routing_list_id
               and role_id = p_old_role_id
               and (user_id is null or user_id = p_user_id)
               and nvl(enable_flag,'X') ='Y';
Line: 4374

  cursor c1 is select max(routing_history_id)
               from pqh_routing_history
               where transaction_category_id = p_tran_cat_id
               and transaction_id = p_trans_id
               and user_action_cd <> 'APPLY';
Line: 4379

  cursor c2 is select rh.forwarded_to_position_id,rh.forwarded_to_role_id,rh.forwarded_to_user_id,rh.forwarded_to_member_id,
                      rh.forwarded_to_assignment_id,rh.pos_structure_version_id,rc.routing_list_id
               from pqh_routing_history rh,pqh_routing_categories rc
               where routing_history_id = p_routing_history_id
               and rh.routing_category_id = rc.routing_category_id;
Line: 4454

	select routing_list_member_id,role_id,user_id
        from pqh_routing_list_members
        where routing_list_id = p_routing_list_id
        and seq_no = (select min(seq_no)
                      from pqh_routing_list_members
                      where routing_list_id = p_routing_list_id
                      and seq_no > (select seq_no
                                    from pqh_routing_list_members
                                    where routing_list_id = p_routing_list_id
                                    and routing_list_member_id = p_cur_member_id)
                      and nvl(enable_flag,'X') = 'Y');
Line: 4465

 cursor c2 is select routing_list_member_id,role_id,user_id
        from pqh_routing_list_members
        where routing_list_id = p_routing_list_id
        and seq_no = (select min(seq_no)
                      from pqh_routing_list_members
                      where routing_list_id = p_routing_list_id
                      and nvl(enable_flag,'X') = 'Y');
Line: 4519

	       select parent_position_id
               from per_pos_structure_elements
               where subordinate_position_id = l_position_id
               and pos_structure_version_id = p_pos_str_ver_id ;
Line: 4570

      select wf_transaction_category_id
      into l_txn_cat_id
      from pqh_position_transactions
      where position_transaction_id = p_transaction_id;
Line: 4575

      select wks.wf_transaction_category_id
      into l_txn_cat_id
      from pqh_worksheet_details wkd, pqh_worksheets wks
      where worksheet_detail_id = p_transaction_id
        and wks.worksheet_id = wkd.worksheet_id;
Line: 4581

      select wf_transaction_category_id
      into l_txn_cat_id
      from pqh_budget_pools
      where pool_id = p_transaction_id;
Line: 4620

           select member_cd,freeze_status_cd,name
           from pqh_transaction_categories
           where transaction_category_id = p_transaction_category_id
           and nvl(enable_flag,'Y') = 'Y';
Line: 4625

   	   select employee_id
           from fnd_user
           where user_id = p_user_id;
Line: 4629

  	select ppos.date_start, ppos.actual_termination_date
  	from per_periods_of_service ppos
  	where ppos.person_id = l_person_id
        and p_date between ppos.date_start and nvl(ppos.actual_termination_date, hr_general.end_of_time) ;
Line: 4635

  	select min(ppos.date_start)
  	from per_periods_of_service ppos
  	where ppos.person_id = l_person_id;
Line: 4640

  	select user_action_cd
  	from    pqh_routing_history
  	where routing_history_id = p_routing_history_id;
Line: 4656

      SELECT  effective_date
      INTO    l_session_date
      FROM    fnd_sessions
      WHERE   session_id      = userenv('sessionid');
Line: 4662

        insert into fnd_sessions (session_id, effective_date) values(userenv('sessionid'),trunc(sysdate));
Line: 4770

            select max(routing_history_id)
            into l_routing_history_id
            from pqh_routing_history
            where routing_history_id          > nvl(p_routing_history_id,0)
                  and transaction_id          = p_transaction_id
                  and transaction_category_id = p_wf_transaction_category_id;
Line: 4862

Select
decode(information_type, 'PQH_ROLE_USERS', to_number(pei.pei_information3), 0) role_id
from per_people_extra_info pei , fnd_user usr
WHERE usr.user_id = p_user_id
  and usr.employee_id = pei.person_id
  and information_type = 'PQH_ROLE_USERS'
 /** Check if default role **/
  and nvl(pei.pei_information4,'N') = 'Y'
 /** Check if enabled **/
  and nvl(pei.pei_information5,'Y')='Y';