DBA Data[Home] [Help]

APPS.PAY_RUN_BALANCE_BUILD SQL Statements

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

Line: 52

    l_update boolean;
Line: 56

  l_update := FALSE;
Line: 59

       l_update := TRUE;
Line: 62

    l_update := TRUE;
Line: 65

  if (l_update = TRUE) then
     begin
--
       select balance_validation_id
         into l_bal_valid_id
         from pay_balance_validation
        where defined_balance_id = p_defined_balace_id
          and business_group_id = p_business_group_id;
Line: 74

        update pay_balance_validation
           set run_balance_status = p_status,
               balance_load_date = g_start_date
         where balance_validation_id = l_bal_valid_id;
Line: 82

       insert into pay_balance_validation
                      (balance_validation_id,
                       defined_balance_id,
                       business_group_id,
                       run_balance_status,
                       balance_load_date)
       values ( pay_balance_validation_s.nextval,
                p_defined_balace_id,
                p_business_group_id,
                p_status,
                g_start_date);
Line: 110

    select pdb.defined_balance_id,
           ppa.business_group_id,
           nvl(pay_core_utils.get_parameter('BAL_LVL',
                                            ppa.legislative_parameters),
               'BOTH') balance_level,
           pbd.dimension_level
      from pay_payroll_actions    ppa,
           per_business_groups    pbg,
           pay_defined_balances   pdb,
           pay_balance_dimensions pbd
     where ppa.payroll_action_id = p_pact_id
       and ppa.business_group_id = pbg.business_group_id
       and ((pdb.business_group_id = pbg.business_group_id
             and pdb.legislation_code is null)
           or
            (pdb.legislation_code = pbg.legislation_code
             and pdb.business_group_id is null)
           or
            (pdb.legislation_code is null
             and pdb.business_group_id is null)
          )
       and pdb.save_run_balance = 'Y'
       and pbd.dimension_type = 'R'
       and pdb.balance_dimension_id = pbd.balance_dimension_id
       and ((pbd.dimension_level =
                  nvl(pay_core_utils.get_parameter('BAL_LVL',
                                                   ppa.legislative_parameters),
                      'BOTH'))
           or
            (nvl(pay_core_utils.get_parameter('BAL_LVL',
                                               ppa.legislative_parameters),
                 'BOTH')
                            = 'BOTH')
           );
Line: 153

    select business_group_id, request_id
      into l_bus_grp, l_request_id
      from pay_payroll_actions
     where payroll_action_id = p_pactid;
Line: 159

update pay_balance_validation bv
  set RUN_BALANCE_STATUS = 'I'
  where RUN_BALANCE_STATUS <> 'I'
    and bv.business_group_id = l_bus_grp
    and not exists ( select 'run balance candidate' from pay_balance_dimensions bd,
                  pay_defined_balances db
                 where   db.defined_balance_id = bv.defined_balance_id
                 and bd.balance_dimension_id = db.balance_dimension_id
                 and bd.dimension_type = 'R'
                 and bd.DIMENSION_LEVEL in ('ASG','GRP'));
Line: 170

    select fcp.CONCURRENT_PROGRAM_NAME
           into g_program_name
      from FND_CONCURRENT_REQUESTS fcr,
           FND_CONCURRENT_PROGRAMS fcp
     where fcr.REQUEST_ID = l_request_id
       and fcp.CONCURRENT_PROGRAM_ID = fcr.CONCURRENT_PROGRAM_ID;
Line: 181

       select defined_balance_id,
              balance_load_date,
              run_balance_status,
              case when run_balance_status = 'V' and balance_load_date <= g_start_date then g_start_date else hr_api.g_eot end del_bal_before,
              case when run_balance_status = 'V' and balance_load_date <= g_start_date then 'Y' else 'N' end purge_only
              bulk collect into g_old_balance_validation_tab
        from  pay_balance_validation
        where business_group_id = l_bus_grp;
Line: 208

           select nvl(pbv.run_balance_status, 'I'), nvl(pbv.balance_load_date,hr_api.g_eot)
             into l_run_bal_stat, l_old_balance_load_date
             from pay_defined_balances pdb,
                  pay_balance_validation pbv
            where pdb.defined_balance_id = dbrec.defined_balance_id
              and pbv.defined_balance_id (+) = pdb.defined_balance_id
              and pbv.business_group_id (+) = dbrec.business_group_id;
Line: 235

              update pay_balance_validation
                 set balance_load_date = g_start_date
               where dbrec.defined_balance_id = defined_balance_id
                 and dbrec.business_group_id = business_group_id;
Line: 251

      select nvl(pbv.run_balance_status, 'I'), nvl(pbv.balance_load_date,hr_api.g_eot)

        into l_run_bal_stat, l_old_balance_load_date
        from pay_defined_balances pdb,
             pay_balance_validation pbv
       where pdb.defined_balance_id = g_def_bal_id
         and pbv.defined_balance_id (+) = pdb.defined_balance_id
         and pbv.business_group_id (+) = l_bus_grp;
Line: 262

         update pay_payroll_actions set legislative_parameters = legislative_parameters || ' PURGE_ONLY=Y'
                where payroll_action_id = p_pactid
                and   legislative_parameters not like '%PURGE_ONLY%';
Line: 282

         update pay_balance_validation
            set balance_load_date = g_start_date
          where defined_balance_id = g_def_bal_id
            and business_group_id = l_bus_grp;
Line: 304

      select
             pay_core_utils.get_parameter('DEF_BAL_ID',
                                          pa1.legislative_parameters),
             nvl(pay_core_utils.get_parameter('BAL_LVL',
                                          pa1.legislative_parameters),
                 'BOTH'),
             nvl(pay_core_utils.get_parameter('PROC_MODE',
                                          pa1.legislative_parameters),
                 'ALL'),
             to_date(pay_core_utils.get_parameter('BAL_START_DATE',
                                          pa1.legislative_parameters),
                     'YYYY/MM/DD'),
             nvl(pay_core_utils.get_parameter('LOAD_TYPE',
                                          pa1.legislative_parameters),
                 'ALL'),
             pbg.legislation_code,
             pbg.business_group_id,
             'GEN_BAL_'||p_pact_id,
             p_pact_id generate_pact
        into
             g_def_bal_id,
             g_bal_lvl,
             g_proc_mode,
             g_start_date,
             g_load_type,
             g_leg_code,
             g_bus_grp,
             g_att_name,
             g_generate_pact
        from pay_payroll_actions    pa1,
             per_business_groups    pbg
       where pa1.payroll_action_id    = p_pact_id
         and pa1.business_group_id    = pbg.business_group_id;
Line: 339

        select rule_mode
          into g_save_run_bals
          from pay_legislation_rules
         where legislation_code = g_leg_code
           and rule_type = 'SAVE_RUN_BAL';
Line: 350

        select rule_mode
          into g_save_asg_run_bals
          from pay_legislation_rules
         where legislation_code = g_leg_code
           and rule_type = 'SAVE_ASG_RUN_BAL';
Line: 364

        select nvl(pbd.dimension_level, 'ASG')
          into g_bal_lvl
          from pay_defined_balances   pdb,
               pay_balance_dimensions pbd
         where pdb.defined_balance_id = g_def_bal_id
           and pdb.balance_dimension_id = pbd.balance_dimension_id;
Line: 397

    l_delete_bals  boolean;
Line: 420

     l_delete_bals := FALSE;
Line: 423

         l_delete_bals := TRUE;
Line: 426

     if (l_delete_bals) then
--
       if l_rb_row_status in ('I','U','O') then
          delete /*+ INDEX(prb PAY_RUN_BALANCES_N2) */
            from pay_run_balances prb
           where prb.defined_balance_id = g_def_bal_id
             and prb.assignment_action_id = p_asg_act_id;
Line: 460

     l_delete_bals := FALSE;
Line: 463

         l_delete_bals := TRUE;
Line: 466

     if (l_delete_bals) then
       null;
Line: 504

    l_delete_bals boolean;
Line: 526

     l_delete_bals := FALSE;
Line: 529

         l_delete_bals := TRUE;
Line: 532

     if (l_delete_bals) then
--
     --
     hr_utility.set_location(
               'pay_run_balance_build.calculate_full_asg_balances',30);
Line: 539

           delete /*+ INDEX(prb PAY_RUN_BALANCES_N2) */
           from pay_run_balances prb
           where prb.defined_balance_id = g_def_bal_id
             and prb.assignment_action_id = p_asg_act_id;
Line: 546

     if not(l_delete_bals) then
--
     --
     hr_utility.set_location(
               'pay_run_balance_build.calculate_full_asg_balances',40);
Line: 569

     l_delete_bals := FALSE;
Line: 572

         l_delete_bals := TRUE;
Line: 575

     if (l_delete_bals) then
     --
       hr_utility.set_location(
                 'pay_run_balance_build.calculate_full_asg_balances',60);
Line: 613

    select /*+ ORDERED USE_NL(ppa prt)
           INDEX(ppa PAY_PAYROLL_ACTIONS_PK)
           INDEX(prt PAY_RUN_TYPES_PK) */
           paa.assignment_action_id,
           ppa.effective_date,
           nvl(prt.run_method, 'N') run_method,
           ppa.business_group_id
      from pay_assignment_actions      paa,
           pay_payroll_actions         ppa,
           pay_run_types_f             prt
     where paa.assignment_id = p_assid
       and paa.assignment_action_id in
       ( select assignment_action_id from pay_assignment_actions where assignment_id = p_assid
          minus select source_action_id from pay_assignment_actions where assignment_id = p_assid)
       and paa.payroll_action_id = ppa.payroll_action_id
       and ppa.action_type in ('R', 'Q', 'V', 'B', 'I')
       and ppa.effective_date >= nvl(p_bal_load_date, ppa.effective_date)
       and nvl(paa.run_type_id, -999) = prt.run_type_id (+)
       and ppa.effective_date between nvl(prt.effective_start_date, ppa.effective_date)
                                  and nvl(prt.effective_end_date, ppa.effective_date)
    order by 2;
Line: 660

         select pba.defined_balance_id
         bulk collect
         INTO g_tab_def_bal
         from   pay_balance_attributes pba
         ,      pay_bal_attribute_definitions bad
         where  pba.attribute_id = bad.attribute_id
         and    bad.attribute_name = g_att_name;
Line: 672

           delete
           from pay_run_balances prb
           where  prb.assignment_id = p_asg_id
           and    prb.defined_balance_id = g_tab_def_bal(a);
Line: 691

                        delete from pay_run_balances
                          where defined_balance_id = g_old_balance_validation_tab(old_bv).defined_balance_id
                          and effective_date < g_old_balance_validation_tab(old_bv).del_bal_before
                          and assignment_id = p_asg_id;
Line: 698

                          hr_utility.trace('process_asg_lvl_balances.  Delete rbs by load date. p_asg_id:'||p_asg_id||
                                           ' cnt:'||sql%rowcount);
Line: 704

              if not g_purge_only then --{ not purge only so rb delete not by load date
                 delete /*+ INDEX(prb PAY_RUN_BALANCES_N1) */
                   from pay_run_balances prb
                  where prb.assignment_id = p_asg_id;
Line: 709

                    hr_utility.trace('process_asg_lvl_balances.  Delete rbs by asg . p_asg_id:'||p_asg_id||
                                     ' cnt:'||sql%rowcount);
Line: 717

           delete /*+ INDEX(prb PAY_RUN_BALANCES_N1) */
             from pay_run_balances prb
            where prb.assignment_id = p_asg_id
              and exists (select ''
                            from pay_balance_validation pbv
                           where pbv.defined_balance_id = prb.defined_balance_id
                             and pbv.business_group_id = p_bus_grp
                             and prb.effective_date < greatest(nvl(pbv.balance_load_date,
                                                               to_date('0001/01/01 00:00:00',
                                                                       'YYYY/MM/DD HH24:MI:SS')
                                                             ),
                                                           nvl(g_start_date,
                                                               to_date('0001/01/01 00:00:00',
                                                                       'YYYY/MM/DD HH24:MI:SS')
                                                             )
                                                          )
                          );
Line: 746

         select balance_load_date,
                run_balance_status
           into l_bal_load_date,
                l_run_bal_status
           from pay_balance_validation
          where defined_balance_id = g_def_bal_id
            and business_group_id = p_bus_grp;
Line: 761

delete from pay_run_balances where assignment_id = p_asg_id and
effective_date < l_bal_load_date
and defined_balance_id = g_def_bal_id;
Line: 765

   hr_utility.trace('pay_run_balance_build.process_asg_lvl_balance delete rb rows before load date:' ||SQL%ROWCOUNT);
Line: 839

lt_tab_getaa.delete;
Line: 864

    l_delete_bals  boolean;
Line: 878

        l_delete_bals := FALSE;
Line: 881

            l_delete_bals := TRUE;
Line: 884

        if (l_delete_bals) then
--
          delete from pay_run_balances
           where defined_balance_id = g_def_bal_id
             and payroll_action_id  = p_pactid;
Line: 916

        l_delete_bals := FALSE;
Line: 919

            l_delete_bals := TRUE;
Line: 922

        if (l_delete_bals) then
--
          if (g_proc_mode = 'INVALID') then
--
            delete from pay_run_balances prb
             where prb.payroll_action_id  = p_pactid
               and exists (select ''
                             from pay_balance_validation pbv
                            where pbv.defined_balance_id =
                                           prb.defined_balance_id
                              and pbv.run_balance_status = 'P'
                              and pbv.business_group_id = p_bus_grp);
Line: 940

              delete from pay_run_balances
               where payroll_action_id  = p_pactid;
Line: 943

              delete
                from pay_run_balances prb
               where prb.payroll_action_id  = p_pactid
                 and g_start_date is not null
                 and g_start_date > p_eff_date;
Line: 990

    l_delete_bals boolean;
Line: 1001

        l_delete_bals := FALSE;
Line: 1004

            l_delete_bals := TRUE;
Line: 1007

        if (l_delete_bals) then
--
          delete from pay_run_balances
           where defined_balance_id = g_def_bal_id
             and payroll_action_id  = p_pactid;
Line: 1012

            hr_utility.trace('calculate_full_grp_balances1.  Delete by pact . p_pactid:'||p_pactid|| ' cnt:'||sql%rowcount);
Line: 1029

        l_delete_bals := FALSE;
Line: 1032

            l_delete_bals := TRUE;
Line: 1035

        if (l_delete_bals) then
--
          if (g_proc_mode = 'INVALID') then
--
            delete from pay_run_balances prb
             where prb.payroll_action_id  = p_pactid
               and exists (select ''
                             from pay_balance_validation pbv
                            where pbv.defined_balance_id = prb.defined_balance_id
                              and pbv.run_balance_status = 'P'
                              and pbv.business_group_id = p_bus_grp);
Line: 1046

            hr_utility.trace('calculate_full_grp_balances2.  Delete by pact . p_pactid:'||p_pactid|| ' cnt:'||sql%rowcount);
Line: 1052

               delete from pay_run_balances
               where payroll_action_id  = p_pactid;
Line: 1054

            hr_utility.trace('calculate_full_grp_balances3.  Delete by pact . p_pactid:'||p_pactid|| ' cnt:'||sql%rowcount);
Line: 1095

   select ppa.effective_date,
          ppa.business_group_id,
          pbg.legislation_code
     into l_grp_eff_date,
          l_bus_grp,
          l_leg_code
     from pay_payroll_actions ppa,
          per_business_groups pbg
    where ppa.payroll_action_id = p_pactid
      and ppa.business_group_id = pbg.business_group_id;
Line: 1120

          delete /*+ INDEX(prb PAY_RUN_BALANCES_N4) */
            from pay_run_balances prb
           where prb.payroll_action_id = p_pactid
             and exists (select /*+ INDEX(pbv PAY_BALANCE_VALIDATION_UK1) */ ''
                           from pay_balance_validation pbv
                          where pbv.defined_balance_id = prb.defined_balance_id
                            and pbv.run_balance_status = 'P'
                            and pbv.business_group_id = l_bus_grp);
Line: 1129

                          hr_utility.trace('process_group_lvl_balances1.  Delete rbs by rbstatus . p_pactid:'||p_pactid||
                                           ' cnt:'||sql%rowcount);
Line: 1143

                          delete /*+ INDEX(prb PAY_RUN_BALANCES_N4) */ from pay_run_balances prb
                            where prb.defined_balance_id = g_old_balance_validation_tab(old_bv).defined_balance_id
                            and prb.effective_date < g_old_balance_validation_tab(old_bv).del_bal_before
                            and prb.payroll_action_id = p_pactid;
Line: 1152

                          hr_utility.trace('process_group_lvl_balances.  Delete rbs by load date. p_pactid:'||p_pactid||
                                           ' cnt:'||l_del_cnt);
Line: 1157

               delete /*+ INDEX(prb PAY_RUN_BALANCES_N4) */
                 from pay_run_balances prb
                where prb.payroll_action_id = p_pactid;
Line: 1161

                          hr_utility.trace('process_group_lvl_balances3.  Delete rbs by pact . p_pactid:'||p_pactid||
                                           ' cnt:'||sql%rowcount);
Line: 1168

             delete /*+ INDEX(prb PAY_RUN_BALANCES_N4) */
               from pay_run_balances prb
              where prb.payroll_action_id = p_pactid
                and exists (select ''
                              from pay_balance_validation pbv
                             where pbv.defined_balance_id = prb.defined_balance_id
                               and pbv.business_group_id = l_bus_grp
                               and prb.effective_date < greatest(nvl(pbv.balance_load_date,
                                                                 to_date('0001/01/01 00:00:00',
                                                                         'YYYY/MM/DD HH24:MI:SS')
                                                               ),
                                                             nvl(g_start_date,
                                                                 to_date('0001/01/01 00:00:00',
                                                                         'YYYY/MM/DD HH24:MI:SS')
                                                               )
                                                            )
                            );
Line: 1186

                          hr_utility.trace('process_group_lvl_balances4.  Delete rbs date . p_pactid:'||p_pactid||
                                           ' cnt:'||sql%rowcount);
Line: 1199

          select balance_load_date,
                 run_balance_status
            into l_bal_load_date,
                 l_run_bal_status
            from pay_balance_validation
           where defined_balance_id = g_def_bal_id
             and business_group_id = l_bus_grp;
Line: 1254

    select paa.assignment_action_id,
           ppa.effective_date,
           nvl(prt.run_method, 'N') run_method,
           ppa.business_group_id
      from pay_assignment_actions paa,
           pay_payroll_actions    ppa,
           pay_run_types_f        prt,
           pay_assignment_actions paa_arch
     where paa_arch.assignment_action_id = p_assactid
       and paa_arch.assignment_id = paa.assignment_id
       and paa.payroll_action_id = ppa.payroll_action_id
       and ppa.action_type in ('R', 'Q', 'V', 'B', 'I')
       and nvl(paa.run_type_id, -999) = prt.run_type_id (+)
       and ppa.effective_date between nvl(prt.effective_start_date, ppa.effective_date)
                                  and nvl(prt.effective_end_date, ppa.effective_date)
    order by 2;
Line: 1275

    l_delete_bals boolean;
Line: 1285

    select paa.payroll_action_id,
           paa.object_id,
           paa.assignment_id,
           paa.chunk_number,
           ppa.business_group_id
      into l_payroll_action_id, l_object_id, l_asg_id, l_chunk_number, l_bus_grp
      from pay_assignment_actions paa,
           pay_payroll_actions    ppa
     where paa.assignment_action_id = p_assactid
       and ppa.payroll_action_id = paa.payroll_action_id;
Line: 1303

    select sysdate
      into current_date
      from sys.dual;
Line: 1383

     select
            pdb.defined_balance_id
       from
            pay_balance_types      pbt,
            pay_defined_balances   pdb,
            pay_balance_dimensions pbd
      where pbd.dimension_level = 'GRP'
        and pdb.save_run_balance = 'Y'
        and pbd.dimension_type = 'R'
        and pdb.balance_dimension_id = pbd.balance_dimension_id
        and pdb.balance_type_id = pbt.balance_type_id
        and ((pdb.business_group_id = p_bus_grp_id
               and pdb.legislation_code is null)
             or
              (pdb.legislation_code = p_leg_code
               and pdb.business_group_id is null)
             or
              (pdb.legislation_code is null
               and pdb.business_group_id is null)
            )
        and (    p_bal_list <> 'INVALID'
              or (    p_bal_list = 'INVALID'
                  and exists (select ''
                                from pay_balance_validation pbv
                               where pbv.defined_balance_id = pdb.defined_balance_id
                                 and pbv.business_group_id = p_bus_grp_id
                                 and pbv.run_balance_status = 'P')
                 )
            )
        and (   p_def_bal is null
             or p_def_bal = pdb.defined_balance_id
            );
Line: 1421

     select
            pdb.defined_balance_id
       from
            pay_balance_types    pbt,
            pay_defined_balances pdb,
            pay_balance_dimensions pbd
      where pbd.dimension_level = 'ASG'
        and pdb.save_run_balance = 'Y'
        and pbd.dimension_type = 'R'
        and pdb.balance_dimension_id = pbd.balance_dimension_id
        and pdb.balance_type_id = pbt.balance_type_id
        and (    p_bal_list <> 'INVALID'
              or (    p_bal_list = 'INVALID'
                  and exists (select ''
                                from pay_balance_validation pbv
                               where pbv.defined_balance_id = pdb.defined_balance_id
                                 and pbv.business_group_id = p_bus_grp_id
                                 and pbv.run_balance_status = 'P')
                 )
            )
        and (   p_def_bal is null
             or p_def_bal = pdb.defined_balance_id
            )
        and ((pdb.business_group_id = p_bus_grp_id
               and pdb.legislation_code is null)
             or
              (pdb.legislation_code = p_leg_code
               and pdb.business_group_id is null)
             or
              (pdb.legislation_code is null
               and pdb.business_group_id is null)
            );
Line: 1467

         select pay_bal_attribute_definition_s.nextval
           into l_attribute_id
           from dual;
Line: 1471

         insert into pay_bal_attribute_definitions
           (attribute_id,
            attribute_name,
            alterable,
            business_group_id)
         values (l_attribute_id,
                 l_attribute_name,
                 'N',
                 g_bus_grp);
Line: 1510

               insert into pay_balance_attributes
                  (balance_attribute_id,
                   attribute_id,
                   defined_balance_id
                  )
               values
                  (pay_balance_attributes_s.nextval,
                   l_attribute_id,
                   grprec.defined_balance_id
                  );
Line: 1554

               insert into pay_balance_attributes
                  (balance_attribute_id,
                   attribute_id,
                   defined_balance_id
                  )
               values
                  (pay_balance_attributes_s.nextval,
                   l_attribute_id,
                   asgrec.defined_balance_id
                  );
Line: 1574

     Purpose   : This returns the select statement that is used to created the
                 range rows for the Tax Filing (FLS) Archiver.
     Arguments :
     Notes     :
  */

  PROCEDURE action_range_cursor( p_payroll_action_id in number
                              ,p_sqlstr           out nocopy varchar2)
  IS
--
    lv_sql_string  VARCHAR2(32000);
Line: 1592

'select 1
   from dual
  where 1 = 0
    and 1 = :payroll_action_id';
Line: 1601

'select ppa_r.payroll_action_id
   from pay_payroll_actions    ppa,
        pay_payroll_actions    ppa_r
  where ppa.payroll_action_id = :payroll_action_id
    and ppa_r.action_type in (''R'',''Q'',''B'', ''I'',''V'')
    and ppa.business_group_id = ppa_r.business_group_id
order by ppa_r.payroll_action_id';
Line: 1612

'select distinct asg.person_id
   from
        per_periods_of_service pos,
        per_assignments_f      asg,
        pay_payroll_actions    ppa
  where ppa.payroll_action_id = :payroll_action_id
    and pos.person_id         = asg.person_id
    and pos.period_of_service_id = asg.period_of_service_id
    and pos.business_group_id = ppa.business_group_id
    and asg.business_group_id = ppa.business_group_id
order by asg.person_id';
Line: 1655

      select ppa.payroll_action_id
      from pay_payroll_actions ppa,
           pay_payroll_actions ppa_arc
      where  ppa.payroll_action_id between stpactid and enpactid
        and  ppa_arc.payroll_action_id = pact_id
        and  ppa.business_group_id = ppa_arc.business_group_id
        and  ppa.action_type in ('R', 'Q', 'B', 'I', 'V')
      order by 1;
Line: 1668

      select distinct
             paf.assignment_id assignment_id,
             paf.person_id
      from
             per_periods_of_service     pos,
             per_all_assignments_f      paf,
             pay_payroll_actions        ppa
      where pos.person_id between stperson and endperson
        and pos.person_id         = paf.person_id
        and pos.period_of_service_id = paf.period_of_service_id
        and pos.business_group_id = ppa.business_group_id
        and  ppa.payroll_action_id = pact_id
        and  ppa.business_group_id = paf.business_group_id
      order by 1, 2;
Line: 1686

      select distinct
             paf.assignment_id assignment_id,
             paf.person_id
      from
             per_periods_of_service     pos,
             per_all_assignments_f      paf,
             pay_payroll_actions        ppa,
             pay_population_ranges      ppr
      where ppr.chunk_number      = c_chunk
        and ppr.payroll_action_id = ppa.payroll_action_id
        and pos.person_id         = ppr.person_id
        and pos.person_id         = paf.person_id
        and pos.period_of_service_id = paf.period_of_service_id
        and pos.business_group_id = ppa.business_group_id
        and  ppa.payroll_action_id = p_payroll_action_id
        and  ppa.business_group_id = paf.business_group_id
      order by 1, 2;
Line: 1719

           select pay_assignment_actions_s.nextval
             into   ln_lockingactid
             from   dual;
Line: 1747

           insert into pay_assignment_actions (
             assignment_action_id,
             assignment_id,
             payroll_action_id,
             action_status,
             chunk_number,
             action_sequence,
             object_version_number )
           select
             pay_assignment_actions_s.nextval assignment_action_id,
             asg.assignment_id assignment_id,
             p_payroll_action_id payroll_action_id,
             'U' action_status,
             p_chunk chunk_number,
             pay_assignment_actions_s.currval action_sequence,
             1 object_version_number
            from
             ( select distinct paf.assignment_id from
                      per_periods_of_service     pos,
                      per_all_assignments_f      paf,
                      pay_payroll_actions        ppa,
                      pay_population_ranges      ppr
               where ppr.chunk_number      = p_chunk
                 and ppr.payroll_action_id = ppa.payroll_action_id
                 and pos.person_id         = ppr.person_id
                 and pos.person_id         = paf.person_id
                 and pos.period_of_service_id = paf.period_of_service_id
                 and pos.business_group_id = ppa.business_group_id
                 and  ppa.payroll_action_id = p_payroll_action_id
                 and  ppa.business_group_id = paf.business_group_id
               order by 1 ) asg ;
Line: 1781

           insert into pay_assignment_actions (
             assignment_action_id,
             assignment_id,
             payroll_action_id,
             action_status,
             chunk_number,
             action_sequence,
             object_version_number )
           select
             pay_assignment_actions_s.nextval assignment_action_id,
             asg.assignment_id assignment_id,
             p_payroll_action_id payroll_action_id,
             'U' action_status,
             p_chunk chunk_number,
             pay_assignment_actions_s.currval action_sequence,
             1 object_version_number
           from
             ( select distinct paf.assignment_id from
                      per_periods_of_service     pos,
                      per_all_assignments_f      paf,
                      pay_payroll_actions        ppa,
                      pay_population_ranges      ppr
               where pos.person_id between p_start_person_id and p_end_person_id
                 and ppr.payroll_action_id = ppa.payroll_action_id
                 and pos.person_id         = paf.person_id
                 and pos.period_of_service_id = paf.period_of_service_id
                 and pos.business_group_id = ppa.business_group_id
                 and  ppa.payroll_action_id = p_payroll_action_id
                 and  ppa.business_group_id = paf.business_group_id
               order by 1 ) asg ;
Line: 1840

         select to_number(parameter_value),
                sysdate
           into l_timeout_sec,
                current_time
           from pay_action_parameters
          where parameter_name = 'PROCESS_TIMEOUT';
Line: 1871

       select business_group_id, request_id,
           nvl(pay_core_utils.get_parameter('PURGE_ONLY', legislative_parameters), 'N') parm_purge_only
         into l_bus_grp, l_request_id, l_parm_purge_only
         from pay_payroll_actions
       where payroll_action_id = p_payroll_action_id;
Line: 1877

      select fcp.CONCURRENT_PROGRAM_NAME
             into g_program_name
        from FND_CONCURRENT_REQUESTS fcr,
             FND_CONCURRENT_PROGRAMS fcp
       where fcr.REQUEST_ID = l_request_id
         and fcp.CONCURRENT_PROGRAM_ID = fcr.CONCURRENT_PROGRAM_ID;
Line: 1890

       select defined_balance_id,
              balance_load_date,
              run_balance_status,
              case when balance_status is null then g_start_date else hr_api.g_eot end del_bal_before,
              case when balance_status is null then 'Y' else 'N' end purge_only
              bulk collect into g_old_balance_validation_tab
        from  ( select bv.defined_balance_id,
                       bv.balance_load_date, run_balance_status, bv.business_group_id,
                       (select 'P' from pay_bal_attribute_definitions bad,
                        pay_balance_attributes ba
                       where bad.attribute_name = g_att_name
                       and bad.ATTRIBUTE_ID = ba.ATTRIBUTE_ID
                      and ba.defined_balance_id = bv.defined_balance_id) balance_status
                      from pay_balance_validation bv
                      where bv.business_group_id = l_bus_grp) bv2;
Line: 1933

    select ppa.payroll_action_id ,
           ppa.action_sequence,
           ppa.effective_date,
           ppa.business_group_id
      from
           pay_payroll_actions    ppa_arch,
           pay_payroll_actions    ppa
     where ppa_arch.payroll_action_id = p_pact_id
       and ppa_arch.business_group_id = ppa.business_group_id
       and ppa.action_type in ('R', 'Q', 'V', 'B', 'I')
    order by 2;
Line: 1949

  l_delete_bals boolean;
Line: 1987

        select count(*)
          into act_com
          from pay_assignment_actions
         where payroll_action_id = pactid
           and action_status <> 'C';
Line: 1999

          select pay_core_utils.get_parameter('REMOVE_ACT',
                                              pa1.legislative_parameters)
            into remove_act
            from pay_payroll_actions    pa1
           where pa1.payroll_action_id    = pactid;
Line: 2009

             delete from pay_balance_attributes
              where attribute_id in (select attribute_id
                                       from pay_bal_attribute_definitions
                                      where attribute_name = g_att_name
                                     );
Line: 2014

             delete from pay_bal_attribute_definitions
              where attribute_name = g_att_name;