DBA Data[Home] [Help]

APPS.PY_ROLLBACK_PKG SQL Statements

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

Line: 82

     select rule_mode
       into l_rule_value
       from pay_legislation_rules
      where legislation_code = p_leg_code
        and rule_type = p_rule_name;
Line: 91

        if (p_rule_name = 'RETRO_DELETE') then
           l_rule_value := 'Y';
Line: 141

select pre_payment_id
  from pay_pre_payments
 where payroll_action_id = p_pact;
Line: 148

    update pay_contributing_payments
       set pre_payment_id = null
     where pre_payment_id = payrec.pre_payment_id;
Line: 151

    delete from pay_pre_payments
     where pre_payment_id = payrec.pre_payment_id;
Line: 166

   select action_information_id
     from pay_action_information
    where action_context_id = cp_action_context_id
      and action_context_type = cp_action_context_type;
Line: 175

         /* delete Action Information */
         delete from pay_action_information
          where action_information_id = actionrec.action_information_id;
Line: 190

   select archive_item_id
     from ff_archive_items
    where context1 = p_source
      and nvl(archive_type, 'AAP') = p_archive_type;
Line: 200

      delete from ff_archive_item_contexts
      where archive_item_id = arcrec.archive_item_id;
Line: 204

      delete from ff_archive_items
      where archive_item_id = arcrec.archive_item_id;
Line: 217

   delete from pay_file_details
    where source_id = p_source_id
      and source_type = p_source_type;
Line: 230

   select pee.element_entry_id
     from pay_element_entries_f pee,
          pay_assignment_actions paa
    where paa.assignment_action_id = p_assact_id
      and pee.assignment_id        = paa.assignment_id
      and pee.creator_id           = paa.assignment_action_id
      and pee.creator_type         = 'P';
Line: 243

   /* Delete the entry values before the element entry */
   for ceevrec in ceev loop
       delete from pay_element_entry_values_f pev
       where element_entry_id = ceevrec.element_entry_id;
Line: 248

       delete from pay_element_entries_f
       where creator_id   = p_assact_id
       and   creator_type = 'P'
       and element_entry_id = ceevrec.element_entry_id;
Line: 266

   select pee.element_entry_id
     from pay_element_entries_f pee,
          pay_assignment_actions paa
    where paa.assignment_action_id = p_assact_id
      and pee.assignment_id        = paa.assignment_id
      and pee.creator_id           = paa.assignment_action_id
      and pee.creator_type         = 'D';
Line: 279

   /* Delete the entry values before the element entry */
   for aeevrec in aeev loop
       delete from pay_element_entry_values_f pev
       where element_entry_id = aeevrec.element_entry_id;
Line: 284

       delete from pay_element_entries_f
       where creator_id   = p_assact_id
       and   creator_type = 'D'
       and element_entry_id = aeevrec.element_entry_id;
Line: 300

   select pee.element_entry_id
     from pay_element_entries_f pee,
          pay_assignment_actions paa
    where paa.assignment_action_id = p_assact_id
      and pee.assignment_id        = paa.assignment_id
      and pee.creator_id           = paa.assignment_action_id
      and pee.creator_type         in ('AD', 'AE','D');
Line: 313

   /* Delete the entry values before the element entry */
   for aeevrec in aeev loop
       delete from pay_element_entry_values_f pev
       where element_entry_id = aeevrec.element_entry_id;
Line: 318

       delete from pay_element_entries_f
       where creator_id   = p_assact_id
       and   creator_type in ('AD', 'AE','D')
       and   element_entry_id = aeevrec.element_entry_id;
Line: 333

   select pee.element_entry_id
     from pay_element_entries_f pee,
          pay_assignment_actions paa
    where paa.assignment_action_id = p_assact_id
      and pee.assignment_id        = paa.assignment_id
      and pee.creator_id           = paa.assignment_action_id
      and pee.creator_type         = 'R';
Line: 346

   /* Delete the entry values before the element entry */
   for raeevrec in raeev loop
       delete from pay_element_entry_values_f pev
       where element_entry_id = raeevrec.element_entry_id;
Line: 351

       delete from pay_element_entries_f
       where creator_id   = p_assact_id
       and   creator_type = 'R'
       and element_entry_id = raeevrec.element_entry_id;
Line: 367

   select pee.element_entry_id
     from pay_element_entries_f pee,
          pay_assignment_actions paa
    where paa.assignment_action_id = p_assact_id
      and pee.creator_id           = paa.assignment_action_id
      and pee.creator_type         in ('RR', 'EE', 'NR', 'PR') ;
Line: 377

  select min(pre.reprocess_date)
    from pay_retro_entries pre,
         pay_retro_assignments pra
   where pre.retro_assignment_id = pra.retro_assignment_id
     and pra.retro_assignment_action_id = p_assact_id;
Line: 389

   /* Delete the entry values before the element entry */
   for eev_rec in remove_eev loop
       delete from pay_element_entry_values_f pev
       where element_entry_id = eev_rec.element_entry_id;
Line: 394

       delete from pay_entry_process_details
       where  element_entry_id = eev_rec.element_entry_id;
Line: 397

       delete from pay_element_entries_f
       where creator_id   = p_assact_id
       and   creator_type in ('RR', 'EE', 'NR', 'PR')
       and element_entry_id = eev_rec.element_entry_id;
Line: 422

   update pay_retro_assignments  ra
      set ra.retro_assignment_action_id = null,
          ra.reprocess_date = nvl(l_reprocess_date,ra.reprocess_date)
    where ra.retro_assignment_action_id = p_assact_id;
Line: 436

 *  Procedure to delete entries from gl_interface tables.
 */
procedure remove_gl_entries(p_info in rollback_rec) is
   c_indent varchar2(40);
Line: 453

          select upper(parameter_value)
          into mtgl_mode
          from pay_action_parameters
          where parameter_name = 'TRANSGL_THREAD';
Line: 467

       select user_je_source_name
       into l_source_name
       from gl_je_sources
       where je_source_name = 'Payroll';
Line: 475

       delete from gl_interface gl
       where  gl.reference21 = to_char(p_info.pact_id)
       and    gl.user_je_source_name = l_source_name;
Line: 488

       delete from pay_gl_interface pgl
       where  pgl.assignment_action_id = p_info.assact_id;
Line: 500

   select pea.external_account_id
     from pay_external_accounts          pea,
          pay_payment_types              ppt,
          pay_personal_payment_methods_f ppm,
          pay_org_payment_methods_f      opm,
          pay_pre_payments               ppp,
          pay_payroll_actions            ppa,
          pay_assignment_actions         paa
    where paa.assignment_action_id       = asgact
    and   paa.payroll_action_id          = ppa.payroll_action_id
    and   paa.pre_payment_id             = ppp.pre_payment_id
    and   ppp.org_payment_method_id      = opm.org_payment_method_id
    and   ppp.personal_payment_method_id = ppm.personal_payment_method_id
    and   opm.payment_type_id            = ppt.payment_type_id
    and   ppt.pre_validation_required    = 'Y'
    and   ppt.validation_value           = ppp.value
    and   ppm.external_account_id        = pea.external_account_id
    and   ppa.effective_date between ppm.effective_start_date
                                 and ppm.effective_end_date
    and   ppa.effective_date between opm.effective_start_date
                                 and opm.effective_end_date;
Line: 523

      update pay_external_accounts
         set prenote_date = null
       where external_account_id = eacrec.external_account_id
       and   prenote_date is not null;
Line: 538

   select prr.run_result_id
   from   pay_run_results       prr
   where  prr.assignment_action_id = p_info.assact_id;
Line: 564

        delete from pay_run_result_values rrv
        where  rrv.run_result_id = crrvrec.run_result_id;
Line: 571

     delete from pay_run_results RR
     where  RR.assignment_action_id = p_info.assact_id;
Line: 580

     update pay_run_results RR
        set RR.status = 'B'
      where RR.assignment_action_id = p_info.assact_id;
Line: 597

   delete from pay_action_contexts
    where assignment_action_id = p_assact_id;
Line: 606

 *  Deletes all latest balances and associated balance
 *  context values for the specified assignment action id.
 *  balances are only removed if a prev balance does not exist,
 *  other wise the prev blance is assigned to the latest balance
 *
 *  Deletes all latest balances if the action before rolled back is a
 *  balance adjustment or a balance initialisation.  This is because as
 *  these are 'special' types of sequenced actions, their results may
 *  have fed the balances without the latest balances being owned by them.
 */

procedure remove_balances(p_info in rollback_rec) is
   c_indent varchar2(40);
Line: 621

   select /*+ INDEX(plb PAY_PERSON_LATEST_BALANCES_N3)*/
          plb.latest_balance_id,
          plb.prev_balance_value,
          plb.prev_assignment_action_id,
          plb.expired_value,
          plb.expired_assignment_action_id,
          plb.assignment_action_id
   from   pay_person_latest_balances plb,
          pay_defined_balances  pdb,
          pay_balance_feeds_f   pbf,
          pay_run_result_values rrv,
          pay_run_results       prr
   where prr.assignment_action_id = p_info.assact_id
   and   rrv.run_result_id        = prr.run_result_id
   and   rrv.result_value is not null
   and   pbf.input_value_id       = rrv.input_value_id
   and   pdb.balance_type_id      = pbf.balance_type_id
   and   plb.defined_balance_id   = pdb.defined_balance_id
   and   plb.person_id            = l_person_id
   and   p_info.action_date between pbf.effective_start_date
                                and pbf.effective_end_date;
Line: 644

   select /*+ INDEX(alb PAY_ASSIGNMENT_LATEST_BALA_N3)*/
          alb.latest_balance_id,
          alb.prev_balance_value,
          alb.prev_assignment_action_id,
          alb.expired_value,
          alb.expired_assignment_action_id,
          alb.assignment_action_id
   from   pay_assignment_latest_balances alb,
          pay_defined_balances  pdb,
          pay_balance_feeds_f   pbf,
          pay_run_result_values rrv,
          pay_run_results       prr
   where prr.assignment_action_id = p_info.assact_id
   and   rrv.run_result_id        = prr.run_result_id
   and   rrv.result_value is not null
   and   pbf.input_value_id       = rrv.input_value_id
   and   pdb.balance_type_id      = pbf.balance_type_id
   and   alb.defined_balance_id   = pdb.defined_balance_id
   and   alb.assignment_id        = p_info.assignment_id
   and   p_info.action_date between pbf.effective_start_date
                                and pbf.effective_end_date;
Line: 667

   select
          lb.latest_balance_id,
          lb.prev_balance_value,
          lb.prev_assignment_action_id,
          lb.prev_expiry_date,
          lb.expired_value,
          lb.expired_assignment_action_id,
          lb.assignment_action_id
   from   pay_latest_balances   lb,
          pay_defined_balances  pdb,
          pay_balance_feeds_f   pbf,
          pay_run_result_values rrv,
          pay_run_results       prr
   where prr.assignment_action_id = p_info.assact_id
   and   rrv.run_result_id        = prr.run_result_id
   and   rrv.result_value is not null
   and   pbf.input_value_id       = rrv.input_value_id
   and   pdb.balance_type_id      = pbf.balance_type_id
   and   lb.defined_balance_id    = pdb.defined_balance_id
   and   lb.person_id             = l_person_id
   and    (   lb.assignment_id         = p_info.assignment_id
           or lb.assignment_id is null)
   and    (   lb.process_group_id   = (select distinct pog.parent_object_group_id
                                         from pay_object_groups pog
                                        where pog.source_id = p_info.assignment_id
                                          and pog.source_type = 'PAF')
           or lb.process_group_id is null)
   and   p_info.action_date between pbf.effective_start_date
                                and pbf.effective_end_date;
Line: 698

   select plb.latest_balance_id,
          plb.prev_balance_value,
          plb.prev_assignment_action_id,
          plb.expired_value,
          plb.expired_assignment_action_id
   from   pay_person_latest_balances plb
   where  plb.assignment_action_id = p_info.assact_id;
Line: 707

   select alb.latest_balance_id,
          alb.prev_balance_value,
          alb.prev_assignment_action_id,
          alb.expired_value,
          alb.expired_assignment_action_id
   from   pay_assignment_latest_balances alb
   where  alb.assignment_action_id = p_info.assact_id;
Line: 716

   select lb.latest_balance_id,
          lb.prev_balance_value,
          lb.prev_assignment_action_id,
          lb.prev_expiry_date,
          lb.expired_value,
          lb.expired_assignment_action_id
   from   pay_latest_balances lb
   where  lb.assignment_action_id = p_info.assact_id;
Line: 746

       select person_id
       into l_person_id
       from per_all_assignments_f
       where assignment_id = p_info.assignment_id
       and   p_info.action_date between
             effective_start_date and effective_end_date;
Line: 765

                  delete from pay_balance_context_values bcv
                  where  bcv.latest_balance_id = bplbrec.latest_balance_id;
Line: 768

                  delete from pay_person_latest_balances plb
                  where plb.latest_balance_id = bplbrec.latest_balance_id;
Line: 773

                     update pay_person_latest_balances
                     set expired_assignment_action_id = -9999,
                         expired_value = -9999
                     where pay_person_latest_balances.latest_balance_id =
                                          bplbrec.latest_balance_id;
Line: 779

                  update pay_person_latest_balances
                  set assignment_action_id = bplbrec.prev_assignment_action_id,
                      value = bplbrec.prev_balance_value,
                      prev_assignment_action_id = -9999,
                      prev_balance_value = -9999
                  where pay_person_latest_balances.latest_balance_id =
                                          bplbrec.latest_balance_id;
Line: 788

               delete from pay_balance_context_values bcv
               where  bcv.latest_balance_id = bplbrec.latest_balance_id;
Line: 791

               delete from pay_person_latest_balances plb
               where plb.latest_balance_id = bplbrec.latest_balance_id;
Line: 802

                  delete from pay_balance_context_values bcv
                  where  bcv.latest_balance_id = balbrec.latest_balance_id;
Line: 805

                  delete from pay_assignment_latest_balances alb
                  where alb.latest_balance_id = balbrec.latest_balance_id;
Line: 810

                     update pay_assignment_latest_balances
                     set expired_assignment_action_id = -9999,
                         expired_value = -9999
                     where pay_assignment_latest_balances.latest_balance_id =
                                          balbrec.latest_balance_id;
Line: 816

                  update pay_assignment_latest_balances
                  set assignment_action_id = balbrec.prev_assignment_action_id,
                      value = balbrec.prev_balance_value,
                      prev_assignment_action_id = -9999,
                      prev_balance_value = -9999
                  where pay_assignment_latest_balances.latest_balance_id =
                                          balbrec.latest_balance_id;
Line: 825

               delete from pay_balance_context_values bcv
               where  bcv.latest_balance_id = balbrec.latest_balance_id;
Line: 828

               delete from pay_assignment_latest_balances alb
               where alb.latest_balance_id = balbrec.latest_balance_id;
Line: 841

                  delete from pay_latest_balances lb
                  where lb.latest_balance_id = blbrec.latest_balance_id;
Line: 846

                     update pay_latest_balances
                     set expired_assignment_action_id = -9999,
                         expired_value = -9999,
                         expired_date = null
                     where pay_latest_balances.latest_balance_id =
                                          blbrec.latest_balance_id;
Line: 853

                  update pay_latest_balances
                  set assignment_action_id = blbrec.prev_assignment_action_id,
                      value = blbrec.prev_balance_value,
                      expiry_date = blbrec.prev_expiry_date,
                      prev_assignment_action_id = -9999,
                      prev_balance_value = -9999,
                      prev_expiry_date = null
                  where pay_latest_balances.latest_balance_id =
                                          blbrec.latest_balance_id;
Line: 864

               delete from pay_latest_balances alb
               where alb.latest_balance_id = blbrec.latest_balance_id;
Line: 884

             delete from pay_balance_context_values bcv
             where  bcv.latest_balance_id = calbrec.latest_balance_id;
Line: 886

             delete from pay_assignment_latest_balances alb
             where alb.latest_balance_id=calbrec.latest_balance_id;
Line: 893

              update pay_assignment_latest_balances
              set expired_assignment_action_id=-9999,
                  expired_value=-9999
              where  pay_assignment_latest_balances.latest_balance_id =
                                          calbrec.latest_balance_id;
Line: 899

            update pay_assignment_latest_balances
            set assignment_action_id=calbrec.prev_assignment_action_id,
                value=calbrec.prev_balance_value,
                prev_assignment_action_id=-9999,
                prev_balance_value=-9999
          where  pay_assignment_latest_balances.latest_balance_id =
                                          calbrec.latest_balance_id;
Line: 920

             delete from pay_balance_context_values bcv
             where  bcv.latest_balance_id = cplbrec.latest_balance_id;
Line: 922

             delete from pay_person_latest_balances plb
             where plb.latest_balance_id=cplbrec.latest_balance_id;
Line: 929

              update pay_person_latest_balances
              set expired_assignment_action_id=-9999,
                  expired_value=-9999
              where  pay_person_latest_balances.latest_balance_id =
                                          cplbrec.latest_balance_id;
Line: 935

            update pay_person_latest_balances
            set assignment_action_id=cplbrec.prev_assignment_action_id,
                value=cplbrec.prev_balance_value,
                prev_assignment_action_id=-9999,
                 prev_balance_value=-9999
            where  pay_person_latest_balances.latest_balance_id =
                                       cplbrec.latest_balance_id;
Line: 954

              delete from pay_latest_balances lb
              where lb.latest_balance_id=clbrec.latest_balance_id;
Line: 961

               update pay_latest_balances
               set expired_assignment_action_id=-9999,
                   expired_value=-9999,
                   expired_date = null
               where  pay_latest_balances.latest_balance_id =
                                           clbrec.latest_balance_id;
Line: 968

             update pay_latest_balances
             set assignment_action_id=clbrec.prev_assignment_action_id,
                 value=clbrec.prev_balance_value,
                 expiry_date = clbrec.prev_expiry_date,
                 prev_assignment_action_id=-9999,
                 prev_balance_value=-9999,
                 prev_expiry_date = null
           where  pay_latest_balances.latest_balance_id =
                                           clbrec.latest_balance_id;
Line: 987

 *  Delete all entries and entry values that were inserted
 *  by a balance adjustment.
 *  It is only called for a balance adjustment action.
 */
procedure undo_bal_adjust(p_action_date in date, p_assact_id in number) is
   -- Batch balance adjustment can have many adjustments
   -- for an assignment action.
   cursor c1 is
   select pee.element_entry_id
   from   pay_element_entries_f  pee,
          pay_assignment_actions paa
   where  paa.assignment_action_id = p_assact_id
   and    pee.assignment_id        = paa.assignment_id
   and    pee.creator_id           = paa.assignment_action_id
   and    pee.creator_type         = 'B'  -- (B)alance Adjustment
   and    p_action_date between
          pee.effective_start_date and pee.effective_end_date;
Line: 1010

      delete from pay_element_entry_values_f pev
      where  pev.element_entry_id = c1rec.element_entry_id
      and    p_action_date between
             pev.effective_start_date and pev.effective_end_date;
Line: 1020

      delete from pay_element_entries_f pee
      where  pee.element_entry_id = c1rec.element_entry_id
      and    p_action_date between
             pee.effective_start_date and pee.effective_end_date;
Line: 1032

 *  Delete all messages (from pay_message_lines) as specified
 *  by the source_type. in other words:
 *  P : payroll_action_id
 *  A : assignment_action_id
 */
procedure remove_messages(p_info in rollback_rec, p_source_type in varchar2) is
begin
   delete from pay_message_lines pml
   where  pml.source_type = p_source_type
   and    pml.source_id   =
       decode(p_source_type,
                'P', p_info.pact_id,
                'A', p_info.assact_id);
Line: 1064

   select pac.business_group_id,
          pac.effective_date,
          pac.start_date,
          hrl.meaning,
          pac.action_type,
          pac.action_status,
          trunc(sysdate),
          pay.payroll_name,
          grp.name,
          grp.legislation_code,
          pac.date_earned,
          pac.purge_phase,
          pac.retro_definition_id,
          pac.batch_id,
          decode(pac.action_type, 'T',
                                   nvl(pay_core_utils.get_parameter('SLA_MODE',
                                                      pac.legislative_parameters),
                                       'N'),
                                  'N')
   into   p_info.bg_id,
          p_info.action_date,
          p_info.action_start_date,
          p_info.action_name,
          p_info.action_type,
          p_info.action_status,
          p_info.current_date,
          p_info.payroll_name,
          p_info.bg_name,
          p_info.legislation_code,
          p_info.date_earned,
          p_info.purge_phase,
          p_info.retro_definition_id,
          p_info.batch_id,
          p_info.sub_ledger_acc
   from   pay_payroll_actions      pac,
          pay_all_payrolls_f       pay,
          per_business_groups_perf grp,
          hr_lookups               hrl
   where  pac.payroll_action_id     = p_info.pact_id
   and    hrl.lookup_code           = pac.action_type
   and    hrl.lookup_type           = 'ACTION_TYPE'
   and    grp.business_group_id     = pac.business_group_id + 0
   and    pay.payroll_id (+)        = pac.payroll_id
   and    pac.effective_date between
          pay.effective_start_date (+) and pay.effective_end_date (+);
Line: 1131

      select null
      into   dummy
      from   pay_action_classifications CLASS
      where  CLASS.action_type         = p_info.action_type
      and    CLASS.classification_name = 'SEQUENCED';
Line: 1149

     select /*+ INDEX(paa PAY_ASSIGNMENT_ACTIONS_N50)*/
            decode (ppa.action_type,
                    'X', paa.object_type,
                    decode(paa.object_type,
                           'PAF', null,
                           paa.object_type))
       into p_info.object_type
       from pay_assignment_actions paa,
            pay_payroll_actions    ppa
      where paa.payroll_action_id = p_info.pact_id
        and p_info.pact_id = ppa.payroll_action_id
        and paa.source_action_id is null
        and rownum = 1;
Line: 1170

 *  Insert a message indicating a rollback has occurred. This
 *  is used for both assignment and payroll action rollback.
 */
procedure ins_rollback_message(p_info in rollback_rec, p_level in varchar2) is
   c_indent varchar2(40);
Line: 1209

         select ppt.payment_type_name
         into   l_action_name
         from   pay_payroll_actions pac,
                pay_payment_types   ppt
         where  pac.payroll_action_id = p_info.pact_id
         and    ppt.payment_type_id   = pac.payment_type_id;
Line: 1246

   insert  into pay_message_lines (
           line_sequence,
           payroll_id,
           message_level,
           source_id,
           source_type,
           line_text)
   values (pay_message_lines_s.nextval,
           l_payroll_id,
           'I',    -- information.
           l_source_id,
           l_source_type,
           l_line_text);
Line: 1264

 *  overloaded procedure to insert a rollback message on successful
 *  completion of the rolling back of a payroll action. This must
 *  be callable externally, since the rollback process needs to be
 *  able to insert this message, independently of the plsql.
 */
procedure ins_rollback_message(p_payroll_action_id in number) is
   info     rollback_rec;
Line: 1277

/*------------------------ undo_stop_update -----------------------------*/
/*
 *  This procedure is called when we have detected the need to undo the
 *  effect of a stop or update recurring entry formula result rule.
 *  Note that, due to the complexity of calculating entry end dates, we
 *  call the existing routine, but trap error messages that are
 *  inappropriate for our application.
 */
procedure undo_stop_update(
   p_ee_id in number,
   p_mult  in varchar,
   p_date  in date,
   p_mode  in varchar2) is
--
   -- Local variables.
   effstart   date;
Line: 1306

      c_indent := 'py_rollback_pkg.undo_stop_update';
Line: 1309

   select pee.effective_start_date,
          pee.effective_end_date,
          pee.original_entry_id,
          pee.assignment_id,
          pee.element_link_id
   into   effstart, effend, orig_ee_id, asg_id, el_id
   from   pay_element_entries_f pee
   where  pee.element_entry_id = p_ee_id
   and    p_date between
          pee.effective_start_date and pee.effective_end_date;
Line: 1326

   if(p_mode = 'DELETE_NEXT_CHANGE') then
      begin
         if g_debug then
            hr_utility.set_location(c_indent, 20);
Line: 1331

         select min(ee.effective_end_date)
         into   next_end
         from   pay_element_entries_f ee
         where  ee.element_entry_id     = p_ee_id
         and    ee.effective_start_date > effend;
Line: 1377

         if(p_mode = 'DELETE_NEXT_CHANGE') then
              update pay_element_entries_f ee
              set    updating_action_id=NULL
                      ,updating_action_type =NULL
              where  ee.element_entry_id     = p_ee_id
              and    ee.effective_start_date = val_start;
Line: 1384

              update pay_element_entries_f ee
              set    updating_action_id=NULL
                      ,updating_action_type =NULL
              where  ee.element_entry_id   = p_ee_id
              and  ee.effective_start_date = effstart;
Line: 1398

   if(p_mode = 'DELETE_NEXT_CHANGE') then
      hr_utility.set_location(c_indent, 40);
Line: 1400

      delete from pay_element_entries_f ee
      where  ee.element_entry_id     = p_ee_id
      and    ee.effective_start_date = val_start;
Line: 1405

      delete from pay_element_entry_values_f eev
      where  eev.element_entry_id     = p_ee_id
      and    eev.effective_start_date = val_start;
Line: 1410

      update pay_element_entries_f ee
      set    ee.effective_end_date   = next_end
      where  ee.element_entry_id     = p_ee_id
      and    ee.effective_start_date = effstart;
Line: 1416

      update pay_element_entry_values_f eev
      set    eev.effective_end_date   = next_end
      where  eev.element_entry_id     = p_ee_id
      and    eev.effective_start_date = effstart;
Line: 1424

      delete from pay_element_entries_f ee
      where  ee.element_entry_id     = p_ee_id
      and    ee.effective_start_date > effstart;
Line: 1429

      delete from pay_element_entry_values_f eev
      where  eev.element_entry_id     = p_ee_id
      and    eev.effective_start_date > effstart;
Line: 1434

      update pay_element_entries_f ee
      set    ee.effective_end_date = max_end,
             ee.updating_action_id=NULL,
			 ee.updating_action_type=NULL
      where  ee.element_entry_id   = p_ee_id
      and  ee.effective_start_date = effstart;
Line: 1441

      /*check for the additional assignment id (in case of an STOP RECURRING after an UPDATE RECURRING)*/
      select ee.prev_upd_action_id
      into prev_asgact_id
      from pay_element_entries_f ee
      where ee.element_entry_id   = p_ee_id
      and  ee.effective_start_date = effstart;
Line: 1447

      /*If it is the case then update the updating_action_id with the asg_action_id of the previous UPDATE RECURRING operation*/
      if(prev_asgact_id is not null) then
            update pay_element_entries_f ee
              set    ee.updating_action_id=prev_asgact_id,
                     ee.prev_upd_action_id=NULL,
                     ee.updating_action_type='U'
              where  ee.element_entry_id   = p_ee_id
              and  ee.effective_start_date = effstart;
Line: 1459

      update pay_element_entry_values_f eev
      set    eev.effective_end_date   = max_end
      where  eev.element_entry_id     = p_ee_id
      and    eev.effective_start_date = effstart;
Line: 1465

end undo_stop_update;
Line: 1469

 *  update formula result rules. Due to the implementation of
 *  this functionality, the undo is non-deterministic, i.e. we
 *  cannot guarantee to return the database to the exact state
 *  it was in before the Payroll Run or QuickPay was processed.
 */
procedure proc_entry_dml(p_info in rollback_rec) is
   -- This cursor returns candidates for possible undo
   -- of stop ree frr. i.e. recurring entries that have
   -- an effective_end_date that is same as runs date earned.
   cursor stp is
   select pet.multiple_entries_allowed_flag,
          pee.element_entry_id,pee.updating_action_type
   from   pay_element_types_f   pet,
          pay_element_links_f   pel,
          pay_element_entries_f pee
   where  pee.assignment_id      = p_info.assignment_id
   and    pee.entry_type         = 'E'
   and    pel.element_link_id    = pee.element_link_id
   and    p_info.action_date between
          pel.effective_start_date and pel.effective_end_date
   and    pet.element_type_id    = pel.element_type_id
   and    p_info.action_date between
          pet.effective_start_date and pet.effective_end_date
   and    pet.processing_type    = 'R'
   and    pee.updating_action_id   = p_info.assact_id
   and    ((pee.effective_end_date = p_info.date_earned
            and    pee.effective_start_date <> p_info.action_date
            and    pee.updating_action_type is NULL
            and    p_info.date_earned between
              pee.effective_start_date and pee.effective_end_date)
          or(pee.updating_action_type='S'));
Line: 1506

   select pet.multiple_entries_allowed_flag,
          pee.element_entry_id
   from   pay_element_types_f   pet,
          pay_element_links_f   pel,
          pay_element_entries_f pee
   where  pee.assignment_id        = p_info.assignment_id
   and    pee.entry_type           = 'E'
   and    ((pee.effective_start_date = p_info.action_date
            and    pee.updating_action_type is NULL)
            or pee.updating_action_type='U')
   and    pee.updating_action_id   = p_info.assact_id
   and    pel.element_link_id      = pee.element_link_id
   and    p_info.action_date between
          pel.effective_start_date and pel.effective_end_date
   and    pet.element_type_id      = pel.element_type_id
   and    p_info.action_date between
          pet.effective_start_date and pet.effective_end_date
   and    pet.processing_type      = 'R';
Line: 1542

      select max(pee.effective_end_date)
      into   v_max_date
      from   pay_element_entries_f pee
      where  pee.element_entry_id = stprec.element_entry_id;
Line: 1553

         undo_stop_update (stprec.element_entry_id,
                           stprec.multiple_entries_allowed_flag,
                           p_info.date_earned, 'FUTURE_CHANGE');
Line: 1566

      undo_stop_update (updrec.element_entry_id,
                        updrec.multiple_entries_allowed_flag,
                        (p_info.action_date - 1), 'DELETE_NEXT_CHANGE');
Line: 1593

         update pay_assignment_actions
         set    action_status = 'M'
         where  source_action_id = p_info.assact_id;
Line: 1597

         update pay_assignment_actions
         set    action_status = 'M'
         where  assignment_action_id = p_info.assact_id;
Line: 1606

         update pay_assignment_actions
         set    action_status = 'B'
         where  source_action_id = p_info.assact_id;
Line: 1610

         update pay_assignment_actions
         set    action_status = 'B'
         where  assignment_action_id = p_info.assact_id;
Line: 1620

         delete from pay_action_interlocks lck
         where  lck.locking_action_id = p_info.assact_id;
Line: 1626

         delete from pay_assignment_actions
          where source_action_id = p_info.assact_id;
Line: 1629

         delete from pay_assignment_actions
         where  assignment_action_id = p_info.assact_id;
Line: 1641

         delete from pay_assignment_actions
          where source_action_id = p_info.assact_id;
Line: 1644

         delete from pay_action_interlocks lck
         where  lck.locking_action_id = p_info.assact_id;
Line: 1673

select paa_chd.assignment_action_id
from pay_assignment_actions paa_chd
where paa_chd.source_action_id = p_asgact_id
order by paa_chd.action_sequence desc;
Line: 1711

        delete from pay_action_interlocks
         where locking_action_id = chld_info.assact_id;
Line: 1716

        delete from pay_assignment_actions
         where assignment_action_id = chld_info.assact_id;
Line: 1737

        delete from pay_run_balances
        where  assignment_action_id = p_info.assact_id;
Line: 1743

        update pay_run_balances
           set balance_value = 0
        where  assignment_action_id = p_info.assact_id;
Line: 1771

           select ppa.element_type_id
             into l_et_id
             from pay_assignment_actions paa,
                  pay_payroll_actions    ppa
            where ppa.payroll_action_id = paa.payroll_action_id
              and paa.assignment_action_id = p_info.assact_id;
Line: 1786

      proc_entry_dml(p_info);               -- stop/update ree frr.
Line: 1794

      delete from pay_pre_payments ppp
      where  ppp.assignment_action_id = p_info.assact_id;
Line: 1802

      delete from pay_costs pc
      where  pc.assignment_action_id = p_info.assact_id;
Line: 1807

      delete from pay_payment_costs ppc
      where  ppc.assignment_action_id = p_info.assact_id;
Line: 1815

         pay_sla_pkg.delete_event(p_info.assact_id);
Line: 1877

      delete from pay_purge_rollup_balances rub
      where  rub.assignment_action_id = p_info.assact_id;
Line: 1884

      delete from pay_contributing_payments
      where assignment_action_id = p_info.assact_id;
Line: 1915

         delete from pay_quickpay_exclusions exc
         where  exc.assignment_action_id = p_info.assact_id;
Line: 1918

         delete from pay_quickpay_inclusions inc
         where  inc.assignment_action_id = p_info.assact_id;
Line: 1970

        select null,
               ACT.action_sequence,
               ACT.action_status,
               ACT.secondary_status,
               null,
               PEO.person_id,
               substr(PEO.full_name,1,80),
               null
        into   p_info.assignment_id,
               l_action_sequence,
               l_action_status,
               l_sec_status,
               p_info.payroll_id,
               l_person_id,
               p_info.full_name,
               p_info.assignment_number
        from
               per_all_people_f           PEO,
               pay_object_groups      POG_PER,
               pay_assignment_actions ACT
        where  ACT.assignment_action_id = p_info.assact_id
        and    ACT.source_action_id     is null
        and    ACT.object_id            = POG_PER.object_group_id
        and    POG_PER.source_id        = PEO.person_id
        and    p_info.action_date between
                       PEO.effective_start_date and PEO.effective_end_date;
Line: 2000

        select null,
               ACT.action_sequence,
               ACT.action_status,
               ACT.secondary_status,
               null,
               null,
               null,
               null
        into   p_info.assignment_id,
               l_action_sequence,
               l_action_status,
               l_sec_status,
               p_info.payroll_id,
               l_person_id,
               p_info.full_name,
               p_info.assignment_number
        from   pay_assignment_actions ACT
        where  ACT.assignment_action_id = p_info.assact_id;
Line: 2026

      select ACT.assignment_id,
             ACT.action_sequence,
             ACT.action_status,
             ACT.secondary_status,
             ASS.payroll_id,
             PEO.person_id,
             substr(PEO.full_name,1,80),
             ASS.assignment_number
      into   p_info.assignment_id,
             l_action_sequence,
             l_action_status,
             l_sec_status,
             p_info.payroll_id,
             l_person_id,
             p_info.full_name,
             p_info.assignment_number
      from   per_all_assignments_f      ASS,
             per_all_people_f           PEO,
             pay_assignment_actions ACT
      where  ACT.assignment_action_id = p_info.assact_id
      and    ASS.assignment_id        = ACT.assignment_id
      and    PEO.person_id            = ASS.person_id
      and    ((p_info.action_type = 'X'
               and ASS.effective_start_date = (select max(ASS2.effective_start_date)
                                               from   per_all_assignments_f ASS2
                                               where  ASS2.assignment_id = ASS.assignment_id)
               and PEO.effective_start_date = (select max(PEO2.effective_start_date)
                                               from   per_all_people_f PEO2
                                               where  PEO2.person_id = PEO.person_id)
              )
             or
              ((p_info.action_type = 'Z' or p_info.action_type = 'PRU')
               and ASS.effective_start_date = (select max(ASS2.effective_start_date)
                                               from   per_all_assignments_f ASS2
                                               where  ASS2.assignment_id = ASS.assignment_id
                                               and    ASS2.effective_start_date <= p_info.action_date)
               and PEO.effective_start_date = (select max(PEO2.effective_start_date)
                                               from   per_all_people_f PEO2
                                               where  PEO2.person_id = PEO.person_id
                                               and    PEO2.effective_start_date <= p_info.action_date)
              )
             or
              (p_info.action_type = 'BEE'
               and ASS.effective_start_date = (select max(ASS2.effective_start_date)
                                            from   per_all_assignments_f ASS2,
                                                   pay_batch_lines pbl
                                            where  ASS2.assignment_id = ASS.assignment_id
                                            and    pbl.batch_id (+) = p_info.batch_id
                                            and    pbl.assignment_id (+) = ASS.assignment_id
                                            and    pbl.effective_Date (+) between ASS2.effective_start_date
                                                   and ASS2.effective_end_date)
               and PEO.effective_start_date = (select max(PEO2.effective_start_date)
                                            from   per_all_people_f PEO2,
                                                   pay_batch_lines pbl
                                            where  PEO2.person_id = PEO.person_id
                                            and    PEO2.person_id = ASS.person_id
                                            and    pbl.batch_id (+) = p_info.batch_id
                                            and    pbl.assignment_id (+) = ASS.assignment_id
                                            and    pbl.effective_Date (+) between PEO2.effective_start_date
                                                   and PEO2.effective_end_date)
              )
             or
             (p_info.action_type not in ('BEE','Z','X', 'PRU')
              and    p_info.action_date between
                    ASS.effective_start_date and ASS.effective_end_date
              and    p_info.action_date between
                     PEO.effective_start_date and PEO.effective_end_date));
Line: 2157

         select null
         into   dummy
         from   dual
         where  not exists (
                select null
                from   pay_action_interlocks int,
                       pay_assignment_actions act
                where  int.locked_action_id     =  p_info.assact_id
                and    act.assignment_action_id =  int.locking_action_id
                and    ((exists
                         (select null
                            from pay_payroll_actions pac
                           where pac.payroll_action_id = act.payroll_action_id
                             and action_type in ('A','H','M', 'PP', 'PRU')
                             and act.action_status = 'M'
                         )
                        )
                          or act.action_status        <> 'M'
                       ));
Line: 2183

         select null
         into   dummy
         from   dual
         where  not exists (
                select null
                from   pay_action_interlocks int
                where  int.locked_action_id = p_info.assact_id);
Line: 2220

               select null into dummy
               from   dual
               where  not exists
                  (select null
                   from   pay_assignment_actions      ACT,
                          pay_payroll_actions        PACT,
                          pay_action_classifications CLASS
                   where  ACT.assignment_id         = p_info.assignment_id
                   and    ACT.action_sequence       > l_action_sequence
                   and    ACT.action_status         in ('C', 'S')
                   and    ACT.payroll_action_id     = PACT.payroll_action_id
                   and    PACT.action_type          = CLASS.action_type
                   and    CLASS.classification_name = 'SEQUENCED');
Line: 2234

               select null into dummy
               from   dual
               where  not exists
                  (select null
                   from   pay_assignment_actions      ACT,
                          pay_payroll_actions        PACT,
                          pay_action_classifications CLASS
                   where  ACT.assignment_id         = p_info.assignment_id
                   and    ACT.action_sequence       > l_action_sequence
                   and    ACT.action_status         in ('C', 'S','M')
                   and    ACT.payroll_action_id     = PACT.payroll_action_id
                   and    PACT.action_type          = CLASS.action_type
                   and    CLASS.classification_name = 'SEQUENCED');
Line: 2260

                 select null into dummy
                 from   dual
                 where  not exists
                    (select null
                     from   pay_action_classifications CLASS,
                            pay_payroll_actions        PACT,
                            pay_assignment_actions     ACT,
                            pay_object_groups          POG_ASG,
                            pay_object_groups          POG_PER,
                            pay_assignment_actions     PAA_RET
                     where  PAA_RET.assignment_action_id = p_info.assact_id
                       and  POG_PER.object_group_id = PAA_RET.object_id
                       and  POG_PER.source_type = 'PPF'
                       and  POG_ASG.parent_object_group_id = POG_PER.object_group_id
                       and  POG_ASG.source_type = 'PAF'
                       and  POG_ASG.source_id = ACT.assignment_id
                       and  ACT.action_sequence       > l_action_sequence
                       and  ACT.action_status         in ('C', 'S')
                       and  ACT.payroll_action_id     = PACT.payroll_action_id
                       and  PACT.action_type          = CLASS.action_type
                       and  CLASS.classification_name = 'SEQUENCED');
Line: 2282

                 select null into dummy
                 from   dual
                 where  not exists
                    (select null
                     from   pay_action_classifications CLASS,
                            pay_payroll_actions        PACT,
                            pay_assignment_actions     ACT,
                            pay_object_groups          POG_ASG,
                            pay_object_groups          POG_PER,
                            pay_assignment_actions     PAA_RET
                     where  PAA_RET.assignment_action_id = p_info.assact_id
                       and  POG_PER.object_group_id = PAA_RET.object_id
                       and  POG_PER.source_type = 'PPF'
                       and  POG_ASG.parent_object_group_id = POG_PER.object_group_id
                       and  POG_ASG.source_type = 'PAF'
                       and  POG_ASG.source_id = ACT.assignment_id
                       and  ACT.action_sequence       > l_action_sequence
                       and  ACT.action_status         in ('C', 'S', 'M')
                       and  ACT.payroll_action_id     = PACT.payroll_action_id
                       and  PACT.action_type          = CLASS.action_type
                       and  CLASS.classification_name = 'SEQUENCED');
Line: 2308

                 select null into dummy
                 from   dual
                 where  not exists
                    (select null
                     from   pay_action_classifications CLASS,
                            pay_payroll_actions        PACT,
                            pay_assignment_actions     ACT,
                            pay_object_groups          POG_ASG,
                            pay_object_groups          POG_ASG2
                     where   POG_ASG.source_type = 'PAF'
                       and  POG_ASG2.source_type = 'PAF'
                       and  POG_ASG.source_id = p_info.assignment_id
                       and  POG_ASG.parent_object_group_id = POG_ASG2.parent_object_group_id
                       and  POG_ASG2.source_id = ACT.assignment_id
                       and  ACT.action_sequence       > l_action_sequence
                       and  ACT.action_status         in ('C', 'S')
                       and  ACT.payroll_action_id     = PACT.payroll_action_id
                       and  PACT.action_type          = CLASS.action_type
                       and  CLASS.classification_name = 'SEQUENCED');
Line: 2328

                 select null into dummy
                 from   dual
                 where  not exists
                    (select null
                     from   pay_action_classifications CLASS,
                            pay_payroll_actions        PACT,
                            pay_assignment_actions     ACT,
                            pay_object_groups          POG_ASG,
                            pay_object_groups          POG_ASG2
                     where   POG_ASG.source_type = 'PAF'
                       and  POG_ASG2.source_type = 'PAF'
                       and  POG_ASG.source_id = p_info.assignment_id
                       and  POG_ASG.parent_object_group_id = POG_ASG2.parent_object_group_id
                       and  POG_ASG2.source_id = ACT.assignment_id
                       and  ACT.action_sequence       > l_action_sequence
                       and  ACT.action_status         in ('C', 'S', 'M')
                       and  ACT.payroll_action_id     = PACT.payroll_action_id
                       and  PACT.action_type          = CLASS.action_type
                       and  CLASS.classification_name = 'SEQUENCED');
Line: 2359

               select null into dummy
               from   dual
               where  not exists
                  (select null
                   from   pay_action_classifications CLASS,
                          pay_payroll_actions        PACT,
                          pay_assignment_actions     ACT,
                          per_all_assignments_f      ASS,
                          per_periods_of_service     POS
                   where  POS.person_id             = l_person_id
                   and    ASS.period_of_service_id  = POS.period_of_service_id
                   and    ACT.assignment_id         = ASS.assignment_id
                   and    ACT.action_sequence       > l_action_sequence
                   and    ACT.action_status         in ('C', 'S')
                   and    ACT.payroll_action_id     = PACT.payroll_action_id
                   and    PACT.action_type          = CLASS.action_type
                   and    CLASS.classification_name = 'SEQUENCED');
Line: 2377

               select null into dummy
               from   dual
               where  not exists
                  (select null
                   from   pay_action_classifications CLASS,
                          pay_payroll_actions        PACT,
                          pay_assignment_actions     ACT,
                          per_all_assignments_f      ASS,
                          per_periods_of_service     POS
                   where  POS.person_id             = l_person_id
                   and    ASS.period_of_service_id  = POS.period_of_service_id
                   and    ACT.assignment_id         = ASS.assignment_id
                   and    ACT.action_sequence       > l_action_sequence
                   and    ACT.action_status         in ('C', 'S', 'M')
                   and    ACT.payroll_action_id     = PACT.payroll_action_id
                   and    PACT.action_type          = CLASS.action_type
                   and    CLASS.classification_name = 'SEQUENCED');
Line: 2403

       select null
         into dummy
         from dual
        where not exists (select null
                        from
                             pay_assignment_actions paac2,
                             pay_assignment_actions paac,
                             pay_action_interlocks  pai
                       where pai.locking_action_id = p_info.assact_id
                         and pai.locked_action_id  = paac.assignment_action_id
                         and paac.pre_payment_id   = paac2.pre_payment_id
                         and paac2.action_sequence  > paac.action_sequence);
Line: 2461

   insert  into pay_message_lines (
           line_sequence,
           payroll_id,
           message_level,
           source_id,
           source_type,
           line_text)
   values (pay_message_lines_s.nextval,
           p_info.payroll_id,
           'F',    -- it's a fatal message.
           p_info.assact_id,
           'A',    -- assignment action level.
           message_text);
Line: 2520

      select rge.chunk_number,
             rge.starting_person_id,
             rge.ending_person_id
      into   range_info
      from   pay_population_ranges rge
      where  rge.payroll_action_id = p_info.pact_id
      and    rge.range_status      = 'U'
      and    rownum < 2
      for update of rge.chunk_number;
Line: 2535

      update pay_population_ranges pop
      set    pop.range_status      = 'P'
      where  pop.payroll_action_id = p_info.pact_id
      and    pop.chunk_number      = range_info.chunk_number;
Line: 2622

   select /*+ ORDERED*/ act.assignment_action_id,
          asg.period_of_service_id
   from   per_all_assignments_f  asg,
          pay_assignment_actions act
   where  act.payroll_action_id    = p_info.pact_id
   and    asg.assignment_id        = act.assignment_id
   and    act.source_action_id is null
   and    ((p_info.action_type = 'X'
           and asg.effective_start_date = (select max(asg2.effective_start_date)
                                           from per_all_assignments_f asg2
                                           where asg2.assignment_id =
                                                        asg.assignment_id)
           )
          or
           ((p_info.action_type = 'PRU' or p_info.action_type = 'Z')
           and asg.effective_start_date = (select max(asg2.effective_start_date)
                                           from per_all_assignments_f asg2
                                           where asg2.assignment_id =
                                                        asg.assignment_id
                                           and asg2.effective_start_date <=
                                                        p_info.action_date)
            )
           or
            (p_info.action_type = 'BEE'
            and asg.effective_start_date = (select max(ASS2.effective_start_date)
                                            from   per_all_assignments_f ASS2,
                                                   pay_batch_lines pbl
                                            where  ASS2.assignment_id = asg.assignment_id
                                            and    pbl.batch_id (+) =  p_info.batch_id
                                            and    pbl.assignment_id (+) = asg.assignment_id
                                            and    pbl.effective_Date (+) between ASS2.effective_start_date
                                                   and ASS2.effective_end_date))
           or
            (p_info.action_type not in ('BEE','Z','X')
            and p_info.action_date between
                asg.effective_start_date and asg.effective_end_date))
   and    asg.person_id between
          range_info.starting_person and range_info.ending_person
   for update of act.action_status,
                 asg.assignment_id
   order by act.action_sequence desc;
Line: 2665

   select act.assignment_action_id
   from   pay_assignment_actions act
   where  act.payroll_action_id    = p_info.pact_id
   and    act.source_action_id is null
   and    act.object_id between
          range_info.starting_person and range_info.ending_person
   for update of act.action_status
   order by act.action_sequence desc;
Line: 2675

   select pos.period_of_service_id
   from   per_periods_of_service pos
   where  pos.period_of_service_id = c_period_of_service_id
   for update of pos.period_of_service_id;
Line: 2724

      delete from pay_population_ranges range
      where  range.payroll_action_id = p_info.pact_id
      and    range.chunk_number      = range_info.chunk_number;
Line: 2783

         select count(*)
         into   l_complete
         from   pay_assignment_actions act
         where  act.payroll_action_id = p_info.pact_id
         and    act.secondary_status  = 'C';
Line: 2807

      select distinct pac.payroll_action_id
        from pay_assignment_actions  act2,
             pay_action_interlocks   pai,
             pay_assignment_actions  act,
             pay_payroll_actions     pac,
             pay_payroll_actions     pac2
       where pac2.payroll_action_id = p_info.pact_id
         and act2.payroll_action_id = pac2.payroll_action_id
         and pac.payroll_action_id = act.payroll_action_id
         and pai.locking_action_id = act.assignment_action_id
         and pai.locked_action_id = act2.assignment_action_id
         and pac.action_status <> 'C'
         and pac.action_type in ('A', 'H', 'M', 'PP');
Line: 2913

 *  single threaded mode, we need to insert a range
 *  row. This allows the processing to have the same
 *  interface for both multi and single-thread modes.
 *  NOTE: no date track restriction is required for
 *  this statement, as we obtaining min and max
 *  values.  This happens to be convenient for Purge.
 */
procedure single_thread_range(p_info in rollback_rec)
is
   l_payroll_action_id number;
Line: 2931

   delete from pay_population_ranges range
   where  range.payroll_action_id = l_payroll_action_id;
Line: 2939

      insert into pay_population_ranges (
             payroll_action_id,
             chunk_number,
             starting_person_id,
             ending_person_id,
             range_status)
      select /*+ USE_NL(asg)
                 INDEX(asg PER_ASSIGNMENTS_F_PK) */
             pac.payroll_action_id,
             1,
             min(asg.person_id),
             max(asg.person_id),
             'U'
      from   pay_payroll_actions    pac,
             pay_assignment_actions act,
             per_all_assignments_f  asg
      where  pac.payroll_action_id = l_payroll_action_id
      and    act.payroll_action_id = pac.payroll_action_id
      and    asg.assignment_id     = act.assignment_id
      group by pac.payroll_action_id;
Line: 2960

      insert into pay_population_ranges (
             payroll_action_id,
             chunk_number,
             starting_person_id,
             ending_person_id,
             range_status)
      select pac.payroll_action_id,
             1,
             min(act.object_id),
             max(act.object_id),
             'U'
      from   pay_payroll_actions    pac,
             pay_assignment_actions act
      where  pac.payroll_action_id = l_payroll_action_id
      and    act.payroll_action_id = pac.payroll_action_id
      group by pac.payroll_action_id;
Line: 2986

 *  deleted, otherwise we do not wish to remove the payroll
 *  action.
 */
function rollback_complete(p_payroll_action_id in number)
return boolean is
   dummy number;
Line: 2993

   select null
   into   dummy
   from   sys.dual
   where  exists (
          select null
          from   pay_assignment_actions act
          where  act.payroll_action_id = p_payroll_action_id);
Line: 3021

   select count(*)
   into   action_count
   from   pay_assignment_actions act
   where  act.payroll_action_id = p_info.pact_id
   and    rownum < (p_info.max_single_undo + 2);
Line: 3092

   info.retro_purge := legislation_rule(info.legislation_code, 'RETRO_DELETE');
Line: 3151

     delete from pay_run_balances
     where  payroll_action_id = info.pact_id;
Line: 3194

      delete from pay_chunk_status
       where payroll_action_id = info.pact_id;
Line: 3196

      delete from pay_payroll_actions pac
      where  pac.payroll_action_id = info.pact_id;
Line: 3205

              select max(date_earned)
              into   l_date_earned
              from   pay_payroll_actions    locked_pact,
                     pay_assignment_actions locked,
                     pay_assignment_actions locking,
                     pay_action_interlocks  locks
              where  locking.payroll_action_id    =info.pact_id
              and    locking.assignment_action_id =locks.locking_action_id
              and    locked.assignment_action_id  =locks.locked_action_id
              and    locked.payroll_action_id     =locked_pact.payroll_action_id;
Line: 3216

              update pay_payroll_actions pac
              set    pac.date_earned              = l_date_earned
              where  pac.payroll_action_id        = info.pact_id;
Line: 3270

   select act.payroll_action_id, act.source_action_id, act.object_type
   into   info.pact_id, src_action_id, info.object_type
   from   pay_assignment_actions act
   where  act.assignment_action_id = p_assignment_action_id;
Line: 3297

   info.retro_purge := legislation_rule(info.legislation_code, 'RETRO_DELETE');
Line: 3311

      select assignment_id
        into info.assignment_id
        from pay_assignment_actions
       where assignment_action_id = info.assact_id;
Line: 3351

                  select max(locked_pact.date_earned), locking_pact.date_earned
                  into   l_date_earned, l_current_date_earned
                  from   pay_payroll_actions    locked_pact,
                         pay_assignment_actions locked,
                         pay_assignment_actions locking,
                         pay_action_interlocks  locks,
                         pay_payroll_actions    locking_pact
                  where  locking_pact.payroll_action_id =info.pact_id
                  and    locking.payroll_action_id    =locking_pact.payroll_action_id
                  and    locking.assignment_action_id =locks.locking_action_id
                  and    locked.assignment_action_id  =locks.locked_action_id
                  and    locked.payroll_action_id     =locked_pact.payroll_action_id
                  group by locking_pact.date_earned;
Line: 3366

                    update pay_payroll_actions pac
                    set    pac.date_earned              = l_date_earned
                    where  pac.payroll_action_id        = info.pact_id;
Line: 3373

                    update pay_payroll_actions pac
                    set    pac.date_earned              = null
                    where  pac.payroll_action_id        = info.pact_id;
Line: 3386

           delete from pay_run_balances
            where payroll_action_id = info.pact_id;