DBA Data[Home] [Help]

APPS.HR_RUNGEN SQL Statements

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

Line: 25

  SELECT        ASA.assignment_id
  FROM          pay_assignment_actions  ASA
  WHERE ASA.payroll_action_id   = p_pyrll_action_id
  AND           ASA.action_status       = 'C';
Line: 62

        SELECT      COUNT(ELE.element_entry_id)
        INTO        l_taxsep_count
        FROM        pay_element_entries_f           ELE,
                    pay_element_entry_values_f      EEV,
                    pay_input_values_f              IPV
        WHERE       ELE.assignment_id               = asgrec.assignment_id
        AND         fnd_date.canonical_to_date(p_payact_earned_date)
                                            BETWEEN ELE.effective_start_date
                                                AND ELE.effective_end_date
        AND         EEV.element_entry_id            = ELE.element_entry_id
        AND         NVL(EEV.screen_entry_value,'N') = 'Y'
        AND         fnd_date.canonical_to_date(p_payact_earned_date)
                                            BETWEEN EEV.effective_start_date
                                                AND EEV.effective_end_date
        AND         IPV.input_value_id              = EEV.input_value_id
        AND         UPPER(IPV.name)                 = 'TAX SEPARATELY'
        AND EXISTS (SELECT 'x'
                    FROM    pay_element_entries_f           ELE2,
                            pay_element_entry_values_f      EEV2,
                            pay_input_values_f              IPV2
                    WHERE   ELE2.assignment_id
                                      = asgrec.assignment_id
                    AND     ELE2.element_entry_id
                                         = ELE.element_entry_id
                    AND     fnd_date.canonical_to_date(p_payact_earned_date)
                                            BETWEEN ELE2.effective_start_date
                                                AND ELE2.effective_end_date
                    AND     EEV2.element_entry_id
                                         = ELE2.element_entry_id
                    AND     EEV2.screen_entry_value         = 'N'
                    AND     fnd_date.canonical_to_date(p_payact_earned_date)
                                            BETWEEN EEV2.effective_start_date
                                                AND EEV2.effective_end_date
                    AND     IPV2.input_value_id
                                         = EEV2.input_value_id
                    AND     UPPER(IPV2.name)
                                         = 'SEPARATE CHECK');
Line: 104

        SELECT      COUNT(ELE.element_entry_id)
        INTO        l_dednproc_count
        FROM        pay_element_entries_f           ELE,
                    pay_element_entry_values_f      EEV,
                    pay_input_values_f              IPV
        WHERE       ELE.assignment_id               = asgrec.assignment_id
        AND         fnd_date.canonical_to_date(p_payact_earned_date)
                                            BETWEEN ELE.effective_start_date
                                                AND ELE.effective_end_date
        AND         EEV.element_entry_id            = ELE.element_entry_id
        AND         EEV.screen_entry_value          <> 'A'
        AND         fnd_date.canonical_to_date(p_payact_earned_date)
                                            BETWEEN EEV.effective_start_date
                                                AND EEV.effective_end_date
        AND         IPV.input_value_id              = EEV.input_value_id
        AND         UPPER(IPV.name)                 = 'DEDUCTION PROCESSING'
        AND EXISTS (SELECT 'x'
                    FROM    pay_element_entries_f           ELE2,
                            pay_element_entry_values_f      EEV2,
                            pay_input_values_f              IPV2
                    WHERE   ELE2.assignment_id              = asgrec.assignment_id
                    AND     ELE2.element_entry_id
                                     = ELE.element_entry_id
                    AND     fnd_date.canonical_to_date(p_payact_earned_date)
                                            BETWEEN ELE2.effective_start_date
                                                AND ELE2.effective_end_date
                    AND     EEV2.element_entry_id
                                     = ELE2.element_entry_id
                    AND     EEV2.screen_entry_value         = 'N'
                    AND     fnd_date.canonical_to_date(p_payact_earned_date)
                                            BETWEEN EEV2.effective_start_date
                                                AND EEV2.effective_end_date
                    AND     IPV2.input_value_id
                                     = EEV2.input_value_id
                    AND     UPPER(IPV2.name)                = 'SEPARATE CHECK')
        AND EXISTS (SELECT 'x'
                    FROM    pay_element_entries_f           ELE3,
                            pay_element_entry_values_f      EEV3,
                            pay_input_values_f              IPV3
                    WHERE   ELE3.assignment_id              = asgrec.assignment_id
                    AND     ELE3.element_entry_id
                                     = ELE.element_entry_id
                    AND     fnd_date.canonical_to_date(p_payact_earned_date)
                                            BETWEEN ELE3.effective_start_date
                                                AND ELE3.effective_end_date
                    AND     EEV3.element_entry_id
                                     = ELE3.element_entry_id
                    AND     EEV3.screen_entry_value         = 'N'
                    AND     fnd_date.canonical_to_date(p_payact_earned_date)
                                            BETWEEN EEV3.effective_start_date
                                                AND EEV3.effective_end_date
                    AND     IPV3.input_value_id
                                     = EEV3.input_value_id
                    AND     UPPER(IPV3.name)
                                     = 'TAX SEPARATELY');
Line: 164

        SELECT      COUNT(ELE.element_entry_id)
        INTO        l_dp_nots_count
        FROM        pay_element_entries_f           ELE,
                    pay_element_entry_values_f      EEV,
                    pay_input_values_f              IPV
        WHERE       ELE.assignment_id               = asgrec.assignment_id
        AND         fnd_date.canonical_to_date(p_payact_earned_date)
                                            BETWEEN ELE.effective_start_date
                                                AND ELE.effective_end_date
        AND         EEV.element_entry_id            = ELE.element_entry_id
        AND         EEV.screen_entry_value          <> 'A'
        AND         fnd_date.canonical_to_date(p_payact_earned_date)
                                            BETWEEN EEV.effective_start_date
                                                AND EEV.effective_end_date
        AND         IPV.input_value_id              = EEV.input_value_id
        AND         UPPER(IPV.name)                 = 'DEDUCTION PROCESSING'
        AND EXISTS (SELECT 'x'
                    FROM    pay_element_entries_f           ELE2,
                            pay_element_entry_values_f      EEV2,
                            pay_input_values_f              IPV2
                    WHERE   ELE2.assignment_id              = asgrec.assignment_id
                    AND     ELE2.element_entry_id
                                   = ELE.element_entry_id
                    AND     fnd_date.canonical_to_date(p_payact_earned_date)
                                            BETWEEN ELE2.effective_start_date
                                                AND ELE2.effective_end_date
                    AND     EEV2.element_entry_id
                                   = ELE2.element_entry_id
                    AND     EEV2.screen_entry_value         = 'N'
                    AND     fnd_date.canonical_to_date(p_payact_earned_date)
                                            BETWEEN EEV2.effective_start_date
                                                AND EEV2.effective_end_date
                    AND     IPV2.input_value_id
                                   = EEV2.input_value_id
                    AND     UPPER(IPV2.name)                = 'SEPARATE CHECK')
        AND NOT EXISTS (SELECT 'x'
                    FROM    pay_element_entries_f           ELE3,
                            pay_element_links_f             ELI3,
                            pay_input_values_f              IPV3
                    WHERE   ELE3.assignment_id              = asgrec.assignment_id
                    AND     ELE3.element_entry_id
                                   = ELE.element_entry_id
                    AND     fnd_date.canonical_to_date(p_payact_earned_date)
                                            BETWEEN ELE3.effective_start_date
                                                AND ELE3.effective_end_date
                    AND     ELI3.element_link_id
                                   = ELE3.element_link_id
                    AND     fnd_date.canonical_to_date(p_payact_earned_date)
                                            BETWEEN ELI3.effective_start_date
                                                AND ELI3.effective_end_date
                    AND     IPV3.element_type_id
                                   = ELI3.element_type_id
                    AND     UPPER(IPV3.name)
                                   = 'TAX SEPARATELY');
Line: 229

                SELECT        hr_assignment_sets_s.nextval
                INTO          l_ts_asg_set_id
                FROM          sys.dual;
Line: 233

                INSERT INTO   hr_assignment_sets (
                               ASSIGNMENT_SET_ID
                              ,BUSINESS_GROUP_ID
                              ,PAYROLL_ID
                              ,ASSIGNMENT_SET_NAME)
                VALUES (       l_ts_asg_set_id
                              ,p_business_group_id
                              ,p_payroll_id
                              ,l_set_name);
Line: 251

              INSERT INTO hr_assignment_set_amendments
                                     (ASSIGNMENT_ID
                                     ,ASSIGNMENT_SET_ID
                                     ,INCLUDE_OR_EXCLUDE
                                     )
              VALUES
                    (     asgrec.assignment_id
                         ,g_taxsep_asg_sets.set_id(l_ts_counter)
                         ,'I'
                    );
Line: 278

  SELECT        ASA.assignment_id
  FROM          pay_assignment_actions  ASA
  WHERE ASA.payroll_action_id   = p_pyrll_action_id
  AND           ASA.action_status       = 'C';
Line: 303

        SELECT      COUNT(ELE.element_entry_id)
        INTO        l_sc_count
        FROM        pay_element_entries_f           ELE,
                    pay_element_entry_values_f      EEV,
                    pay_input_values_f              IPV
        WHERE       ELE.assignment_id               = asgrec.assignment_id
        AND         fnd_date.canonical_to_date(p_payact_earned_date)
                                        BETWEEN ELE.effective_start_date
                                        AND ELE.effective_end_date
        AND         EEV.element_entry_id            = ELE.element_entry_id
        AND         NVL(EEV.screen_entry_value,'N') = 'Y'
        AND         fnd_date.canonical_to_date(p_payact_earned_date)
                                            BETWEEN EEV.effective_start_date
                                            AND EEV.effective_end_date
        AND         IPV.input_value_id              = EEV.input_value_id
        AND         UPPER(IPV.name)         = 'SEPARATE CHECK';
Line: 328

                SELECT        hr_assignment_sets_s.nextval
                INTO          l_sc_asg_set_id
                FROM          sys.dual;
Line: 332

                INSERT INTO   hr_assignment_sets (
                               ASSIGNMENT_SET_ID
                              ,BUSINESS_GROUP_ID
                              ,PAYROLL_ID
                              ,ASSIGNMENT_SET_NAME)
                VALUES (       l_sc_asg_set_id
                              ,p_business_group_id
                              ,p_payroll_id
                              ,l_set_name);
Line: 350

              INSERT INTO hr_assignment_set_amendments
                                     (ASSIGNMENT_ID
                                     ,ASSIGNMENT_SET_ID
                                     ,INCLUDE_OR_EXCLUDE
                                     )
              VALUES
                    (     asgrec.assignment_id
                         ,g_sepcheck_asg_sets.set_id(l_sc_counter)
                         ,'I'
                    );
Line: 454

    select 1
      into dummy
      from sys.dual
     where exists (select ''
                     from pay_assignment_actions
                    where payroll_action_id = p_payroll_act_id
                      and action_status <> 'C');
Line: 561

procedure delete_sepcheck_asg_set
is
l_num_sepchecks number;
Line: 571

       delete from hr_assignment_set_amendments
        where ASSIGNMENT_SET_ID = g_sepcheck_asg_sets.set_id(l_sc_counter);
Line: 574

       delete from hr_assignment_sets
        where ASSIGNMENT_SET_ID = g_sepcheck_asg_sets.set_id(l_sc_counter);
Line: 578

end delete_sepcheck_asg_set;
Line: 580

procedure delete_taxsep_asg_set
is
l_num_taxsep number;
Line: 590

       delete from hr_assignment_set_amendments
        where ASSIGNMENT_SET_ID = g_taxsep_asg_sets.set_id(l_ts_counter);
Line: 593

       delete from hr_assignment_sets
        where ASSIGNMENT_SET_ID = g_taxsep_asg_sets.set_id(l_ts_counter);
Line: 597

end delete_taxsep_asg_set;
Line: 611

   select payroll_action_id
     from pay_payroll_actions
    where target_payroll_action_id = p_primary_action_id
      and payroll_id = p_payroll_id
      and action_type = 'R'
      and effective_date = fnd_date.canonical_to_date(p_date_paid)
      and legislative_parameters like '%SPECIALPROC%'
    order by action_sequence;
Line: 649

   select payroll_action_id
     from pay_payroll_actions
    where target_payroll_action_id = p_primary_action_id
      and payroll_id = p_payroll_id
      and action_type = 'R'
      and effective_date = fnd_date.canonical_to_date(p_date_paid)
      and legislative_parameters like '%SEPCHECK%'
    order by action_sequence;
Line: 678

         select distinct asg2.payroll_action_id
           into l_prepay_id
           from pay_assignment_actions asg2,
                pay_action_interlocks  pai,
                pay_payroll_actions    ppa,
                pay_assignment_actions asg1
          where asg1.payroll_action_id = actrec.payroll_action_id
            and asg1.assignment_action_id = pai.locked_action_id
            and asg2.assignment_action_id = pai.locking_action_id
            and ppa.payroll_action_id = asg2.payroll_action_id
            and ppa.action_type = 'P';
Line: 700

           update pay_payroll_actions
              set consolidation_set_id = p_sc_con_set_id
            where payroll_action_id = actrec.payroll_action_id;
Line: 713

           SELECT    payroll_action_id
           INTO      l_sc_preact_id
           FROM      pay_payroll_actions
           WHERE     request_id = l_req_id
             AND     payroll_id = p_payroll_id
             AND     action_type = 'P'
             AND     effective_date = fnd_date.canonical_to_date(p_date_paid);
Line: 721

           update pay_payroll_actions
              set consolidation_set_id = p_master_con_set_id
            where payroll_action_id = actrec.payroll_action_id;
Line: 725

           update pay_payroll_actions
              set consolidation_set_id = p_master_con_set_id,
                  target_payroll_action_id = p_primary_action_id
            where payroll_action_id = l_sc_preact_id;
Line: 778

      SELECT        pay_consolidation_sets_s.nextval
      INTO          l_sc_consoset_id
      FROM          sys.dual;
Line: 782

      INSERT INTO   pay_consolidation_sets (
                    CONSOLIDATION_SET_ID,
                    BUSINESS_GROUP_ID,
                    CONSOLIDATION_SET_NAME)
      VALUES (      l_sc_consoset_id,
                    p_business_group_id,
                    l_sc_consoset_name);
Line: 823

          SELECT    payroll_action_id
          INTO      l_sc_payact_id
          FROM      pay_payroll_actions
          WHERE     request_id = l_req_id
            AND     payroll_id = p_payroll_id
            AND     action_type = 'R'
            AND     effective_date = fnd_date.canonical_to_date(p_date_paid);
Line: 838

          SELECT    payroll_action_id
          INTO      l_sc_preact_id
          FROM      pay_payroll_actions
          WHERE     request_id = l_req_id
            AND     payroll_id = p_payroll_id
            AND     action_type = 'P'
            AND     effective_date = fnd_date.canonical_to_date(p_date_paid);
Line: 847

         UPDATE   pay_payroll_actions
         SET      consolidation_set_id        = p_consolidation_set_id,
                  assignment_set_id           = NULL,
                  target_payroll_action_id    = p_primary_action_id
         WHERE    payroll_action_id           = l_sc_payact_id;
Line: 853

         UPDATE   pay_payroll_actions
         SET      consolidation_set_id        = p_consolidation_set_id,
                  target_payroll_action_id    = p_primary_action_id
         WHERE    payroll_action_id           = l_sc_preact_id;
Line: 862

      DELETE from pay_consolidation_sets
       WHERE consolidation_set_id = l_sc_preact_id;
Line: 865

      delete_sepcheck_asg_set;
Line: 935

          SELECT    payroll_action_id
          INTO      l_ts_payact_id
          FROM      pay_payroll_actions
          WHERE     request_id = l_req_id
            AND     payroll_id = p_payroll_id
            AND     action_type = 'R'
            AND     effective_date = fnd_date.canonical_to_date(p_date_paid);
Line: 944

         UPDATE   pay_payroll_actions
         SET      assignment_set_id           = NULL,
                  target_payroll_action_id    = p_primary_action_id
         WHERE    payroll_action_id           = l_ts_payact_id;
Line: 953

      delete_taxsep_asg_set;
Line: 1004

    SELECT DISTINCT business_group_id
    INTO          l_business_group_id
    FROM          pay_payrolls_f
    WHERE         payroll_id = p_payroll_id;
Line: 1028

    SELECT        payroll_action_id
    INTO          l_payact_id
    FROM          pay_payroll_actions
    WHERE request_id = l_req_id
      AND payroll_id = p_payroll_id
      AND action_type = 'R'
      AND effective_date = fnd_date.canonical_to_date(p_date_paid);
Line: 1041

      UPDATE      pay_payroll_actions
      SET         pay_advice_message      = p_pay_advice_message
      WHERE       payroll_action_id       = l_payact_id;
Line: 1057

    select payroll_id,
           consolidation_set_id,
           fnd_date.canonical_to_date(date_earned),
           fnd_date.canonical_to_date(effective_date),
           assignment_set_id,
           element_set_id,
           business_group_id
      into l_payroll_id,
           l_consolidation_set_id,
           l_earned_date,
           l_date_paid,
           l_assignment_set_id,
           l_ele_set_id,
           l_business_group_id
      from pay_payroll_actions
     where payroll_action_id = l_primary_action;
Line: 1130

  UPDATE        pay_payroll_actions
  SET           assignment_set_id = NULL
  WHERE         assignment_set_id = p_assignment_set_id;
Line: 1136

  DELETE FROM   hr_assignment_set_amendments
  WHERE         assignment_set_id       = p_assignment_set_id;