DBA Data[Home] [Help]

APPS.PQP_GB_PENSION_SCHEME_TEMPLATE SQL Statements

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

Line: 245

         SELECT element_type_id, object_version_number
           FROM pay_shadow_element_types
          WHERE template_id = l_template_id AND element_name = c_ele_name;
Line: 252

         SELECT balance_type_id, object_version_number
           FROM pay_shadow_balance_types
          WHERE template_id = l_template_id AND balance_name = c_bal_name;
Line: 259

         SELECT 'X'
           FROM pay_element_templates
          WHERE template_name = g_template_name
            AND business_group_id = p_business_group_id
            AND template_type = 'U'
            AND UPPER (base_name) = UPPER (p_ele_base_name);
Line: 284

            SELECT template_id
              FROM pay_element_templates
             WHERE template_name = g_template_name
               AND legislation_code = p_legislation_code
               AND template_type = 'T'
               AND business_group_id IS NULL;
Line: 329

            SELECT element_type_id
              FROM pay_element_types_f
             WHERE element_name = p_object_name
               AND business_group_id = p_business_group_id
               AND p_effective_start_date BETWEEN effective_start_date
                                              AND effective_end_date;
Line: 339

            SELECT ptco.core_object_id
              FROM pay_shadow_balance_types psbt
                  ,pay_template_core_objects ptco
             WHERE psbt.template_id = l_template_id
               AND psbt.balance_name = p_object_name
               AND ptco.template_id = psbt.template_id
               AND ptco.shadow_object_id = psbt.balance_type_id;
Line: 397

      PROCEDURE update_ipval_defval (
         p_ele_name    IN   VARCHAR2
        ,p_ip_name     IN   VARCHAR2
        ,p_def_value   IN   VARCHAR2
      )
      IS
         CURSOR csr_getinput (c_ele_name VARCHAR2, c_iv_name VARCHAR2)
         IS
            SELECT piv.input_value_id, piv.NAME, piv.element_type_id
              FROM pay_input_values_f piv, pay_element_types_f pet
             WHERE element_name = c_ele_name
               AND piv.element_type_id = pet.element_type_id
               AND piv.business_group_id = p_business_group_id
               AND piv.NAME = c_iv_name;
Line: 414

            SELECT     ROWID
                  FROM pay_input_values_f
                 WHERE input_value_id = c_ip_id
                   AND element_type_id = c_element_type_id
            FOR UPDATE NOWAIT;
Line: 424

                                        || 'update_ipval_defval';
Line: 455

               UPDATE pay_input_values_f
                  SET default_value = p_def_value
                WHERE ROWID = csr_updinput_rec.ROWID;
Line: 469

      END update_ipval_defval;
Line: 484

            SELECT fra.formula_id, fra.formula_name, fty.formula_type_id
                  ,fty.formula_type_name
              FROM ff_formulas_f fra
                  ,ff_formula_types fty
                  ,pay_status_processing_rules_f spr
             WHERE fty.formula_type_id = fra.formula_type_id
               AND fra.formula_id = spr.formula_id
               AND spr.assignment_status_type_id IS NULL
               AND spr.element_type_id = c_element_type_id
               AND p_effective_start_date BETWEEN fra.effective_start_date
                                              AND fra.effective_end_date
               AND p_effective_start_date BETWEEN spr.effective_start_date
                                              AND spr.effective_end_date;
Line: 602

            SELECT balance_name
              FROM pay_balance_types
             WHERE balance_type_id = p_balance_type_id
               AND (   (    business_group_id IS NOT NULL
                        AND business_group_id = p_business_group_id
                       )
                    OR (    legislation_code IS NOT NULL
                        AND legislation_code = g_template_leg_code
                       )
                    OR (business_group_id IS NULL AND legislation_code IS NULL)
                   );
Line: 660

            SELECT classification_name, default_priority
              FROM pay_element_classifications
             WHERE classification_id = p_classification_id;
Line: 721

            SELECT relative_processing_priority
              FROM pay_shadow_element_types
             WHERE element_type_id = p_element_type_id;
Line: 761

            SELECT pension_type_id, pension_type_name, effective_start_date
                  ,effective_end_date, pension_category
                  ,ee_contribution_percent, er_contribution_percent
                  ,ee_contribution_fixed_rate, er_contribution_fixed_rate
                  ,ee_contribution_bal_type_id, er_contribution_bal_type_id
              FROM pqp_pension_types_f
             WHERE pension_type_id = p_pension_type_id
               AND p_effective_start_date BETWEEN effective_start_date
                                              AND effective_end_date
               AND (   (    business_group_id IS NOT NULL
                        AND business_group_id = p_business_group_id
                       )
                    OR (    legislation_code IS NOT NULL
                        AND legislation_code = g_template_leg_code
                       )
                    OR (business_group_id IS NULL AND legislation_code IS NULL)
                   );
Line: 842

      PROCEDURE insert_validate
      IS
         --
         -- Cursor to check whether provider exists

         CURSOR csr_chk_provider_exists
         IS
            SELECT 'X'
              FROM hr_all_organization_units hou
                  ,hr_organization_information hoi
             WHERE hou.organization_id = p_pension_provider_id
               AND (   hou.business_group_id = p_business_group_id
                    OR hou.business_group_id IS NULL
                   )
               AND p_effective_start_date BETWEEN date_from
                                              AND NVL (
                                                     date_to
                                                    ,p_effective_start_date
                                                  )
               AND hoi.organization_id = hou.organization_id
               AND hoi.org_information_context = 'CLASS'
               AND hoi.org_information1 = 'FR_PENSION'
               AND hoi.org_information2 = 'Y';
Line: 870

            SELECT 'X'
              FROM hr_organization_information
             WHERE organization_id = p_pension_provider_id
               AND org_information_context = 'PQP_GB_PENSION_TYPES_INFO'
               AND org_information1 = p_pension_type_id;
Line: 880

            SELECT 'X'
              FROM pay_element_type_extra_info eeit, pay_element_types_f pet
             WHERE pet.element_type_id = c_element_type_id
               AND (   (    pet.business_group_id IS NOT NULL
                        AND pet.business_group_id = p_business_group_id
                       )
                    OR (    pet.legislation_code IS NOT NULL
                        AND pet.legislation_code = g_template_leg_code
                       )
                    OR (    pet.business_group_id IS NULL
                        AND pet.legislation_code IS NULL
                       )
                   )
               AND p_effective_start_date BETWEEN pet.effective_start_date
                                              AND pet.effective_end_date
               AND eeit.element_type_id = pet.element_type_id
               AND eeit.information_type = 'PQP_GB_PENSION_SCHEME_INFO'
               AND eeit.eei_information4 = 'OCP'
               AND eeit.eei_information12 IS NULL;
Line: 903

            SELECT org_information7
              FROM hr_organization_information
             WHERE organization_id = p_business_group_id
               AND org_information_context = 'Tax Details References';
Line: 912

            SELECT TRANSLATE (
                      UPPER (c_number)
                     ,'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
                     ,'AAAAAAAAAAAAAAAAAAAAAAAAAA9999999999'
                   )
              FROM DUAL;
Line: 921

                                                     || 'insert_validate';
Line: 1435

      END insert_validate;
Line: 1451

            SELECT formula_id
              FROM pay_shadow_formulas
             WHERE formula_name = p_formula_name
               AND business_group_id = p_business_group_id
               AND template_type = 'U';
Line: 1490

      PROCEDURE update_shadow_formula (
         p_formula_id       IN   NUMBER
        ,p_search_string    IN   VARCHAR2
        ,p_replace_string   IN   VARCHAR2
      )
      IS
         --
         -- Cursor to retrieve the formula information
         CURSOR csr_get_formula_info
         IS
            SELECT formula_text
              FROM pay_shadow_formulas
             WHERE formula_id = p_formula_id;
Line: 1506

                                      || 'update_shadow_formula';
Line: 1531

         UPDATE pay_shadow_formulas
            SET formula_text = l_formula_text
          WHERE formula_id = p_formula_id;
Line: 1540

      END update_shadow_formula;
Line: 1559

            SELECT input_value_id
              FROM pay_input_values_f
             WHERE NAME = p_input_value_name
               AND element_type_id = c_element_type_id
               AND p_effective_start_date BETWEEN effective_start_date
                                              AND effective_end_date;
Line: 1619

      PROCEDURE update_ipv_mandatory_flag (
         p_input_value_name   IN   VARCHAR2
        ,p_element_type_id    IN   NUMBER
        ,p_mandatory_flag     IN   VARCHAR2
      )
      IS
         --
         l_proc_name        VARCHAR2 (80)
                               :=    g_proc_name
                                  || 'update_ipv_mandatory_flag';
Line: 1648

         UPDATE pay_input_values_f
            SET mandatory_flag = p_mandatory_flag
          WHERE input_value_id = l_input_value_id
            AND p_effective_start_date BETWEEN effective_start_date
                                           AND effective_end_date;
Line: 1658

      END update_ipv_mandatory_flag;
Line: 1699

         pay_balance_feeds_f_pkg.insert_row (
            x_rowid                       => l_row_id
           ,x_balance_feed_id             => l_balance_feed_id
           ,x_effective_start_date        => p_effective_start_date
           ,x_effective_end_date          => hr_api.g_eot
           ,x_business_group_id           => p_business_group_id
           ,x_legislation_code            => NULL
           ,x_balance_type_id             => p_balance_type_id
           ,x_input_value_id              => l_input_value_id
           ,x_scale                       => p_scale
           ,x_legislation_subgroup        => NULL
         );
Line: 1729

            SELECT eei_information18
              FROM pay_element_type_extra_info
             WHERE element_type_id = p_element_type_id
               AND information_type = 'PQP_GB_PENSION_SCHEME_INFO';
Line: 1779

            SELECT classification_id
              FROM pay_element_classifications
             WHERE classification_name = p_classification_name
               AND legislation_code = g_template_leg_code
               AND business_group_id IS NULL;
Line: 1818

         pay_sub_class_rules_pkg.insert_row (
            p_rowid                       => l_rowid
           ,p_sub_classification_rule_id  => l_sub_class_rule_id
           ,p_effective_start_date        => p_effective_start_date
           ,p_effective_end_date          => hr_api.g_eot
           ,p_element_type_id             => p_element_type_id
           ,p_classification_id           => l_classification_id
           ,p_business_group_id           => p_business_group_id
           ,p_legislation_code            => NULL
           ,p_creation_date               => SYSDATE
           ,p_created_by                  => l_user_id
           ,p_last_update_date            => SYSDATE
           ,p_last_updated_by             => l_user_id
           ,p_last_update_login           => l_login_id
         );
Line: 1884

         insert_validate;
Line: 2394

      pay_shadow_element_api.update_shadow_element (
         p_validate                    => FALSE
        ,p_effective_date              => p_effective_start_date
        ,p_element_type_id             => l_element_type_id
        ,p_element_name                => l_ele_name (i)
        ,p_reporting_name              => p_ele_reporting_name
        ,p_description                 => p_ele_description
        ,p_classification_name         => l_ele_class_name
        ,p_skip_formula                => l_skip_formula
        ,p_third_party_pay_only_flag   => p_third_party_only_flag
        ,p_iterative_flag              => l_iterative_flag
        ,p_iterative_priority          => l_iterative_priority
        ,p_iterative_formula_name      => l_iterative_formula
        ,p_standard_link_flag          => l_standard_link
        ,p_post_termination_rule       => p_termination_rule
        ,p_object_version_number       => l_ele_obj_ver_number
      );
Line: 2461

               pay_shadow_element_api.update_shadow_element (
                  p_validate                    => FALSE
                 ,p_effective_date              => p_effective_start_date
                 ,p_element_type_id             => l_element_type_id
                 ,p_element_name                => l_ele_new_name (i)
                 ,p_third_party_pay_only_flag   => p_third_party_only_flag
                 ,p_standard_link_flag          => l_standard_link
                 ,p_post_termination_rule       => p_termination_rule
                 ,p_object_version_number       => l_ele_obj_ver_number
               );
Line: 2591

            pay_shadow_element_api.update_shadow_element (
               p_validate                    => FALSE
              ,p_effective_date              => p_effective_start_date
              ,p_element_type_id             => l_element_type_id
              ,p_element_name                => l_ele_name (i)
              ,p_classification_name         => l_ele_class_name
              ,p_third_party_pay_only_flag   => p_third_party_only_flag
              ,p_iterative_flag              => l_iterative_flag
              ,p_iterative_priority          => l_iterative_priority
              ,p_iterative_formula_name      => l_iterative_formula
              ,p_standard_link_flag          => l_standard_link
              ,p_post_termination_rule       => p_termination_rule
              ,p_object_version_number       => l_ele_obj_ver_number
            );
Line: 2664

         update_shadow_formula (
            p_formula_id                  => l_ees_cont_formula_id
           ,p_search_string               => l_search_string
           ,p_replace_string              => l_replace_string
         );
Line: 2686

         update_shadow_formula (
            p_formula_id                  => l_ers_cont_formula_id
           ,p_search_string               => l_search_string
           ,p_replace_string              => l_replace_string
         );
Line: 2704

            update_shadow_formula (
               p_formula_id                  => l_ers_cont_formula_id
              ,p_search_string               => l_search_string
              ,p_replace_string              => l_replace_string
            );
Line: 2712

            update_shadow_formula (
               p_formula_id                  => l_ers_cont_formula_id
              ,p_search_string               => l_search_string
              ,p_replace_string              => l_replace_string
            );
Line: 2737

            update_shadow_formula (
               p_formula_id                  => l_ers_cont_formula_id
              ,p_search_string               => l_search_string
              ,p_replace_string              => l_replace_string
            );
Line: 2770

         update_shadow_formula (
            p_formula_id                  => l_ees_cont_formula_id
           ,p_search_string               => l_search_string
           ,p_replace_string              => l_replace_string
         );
Line: 2787

            update_shadow_formula (
               p_formula_id                  => l_ers_cont_formula_id
              ,p_search_string               => l_search_string
              ,p_replace_string              => l_replace_string
            );
Line: 2805

            update_shadow_formula (
               p_formula_id                  => l_adl_cont_formula_id
              ,p_search_string               => l_search_string
              ,p_replace_string              => l_replace_string
            );
Line: 2823

            update_shadow_formula (
               p_formula_id                  => l_ayr_cont_formula_id
              ,p_search_string               => l_search_string
              ,p_replace_string              => l_replace_string
            );
Line: 2841

            update_shadow_formula (
               p_formula_id                  => l_fwd_cont_formula_id
              ,p_search_string               => l_search_string
              ,p_replace_string              => l_replace_string
            );
Line: 2860

            update_shadow_formula (
               p_formula_id                  => l_bb_fwc_cont_formula_id
              ,p_search_string               => l_search_string
              ,p_replace_string              => l_replace_string
            );
Line: 2910

      update_ipval_defval (
         p_ele_name                    => l_ele_name (i)
        , -- base element name
         p_ip_name                     => l_cont_iv_name
        ,p_def_value                   => l_iv_default_value
      );
Line: 2957

         update_ipval_defval (
            p_ele_name                    => l_ele_name (
                                                i
                                             ) -- employer contribution %
           ,p_ip_name                     => 'Contribution Percent'
           ,p_def_value                   => g_tab_pension_types_info (
                                                p_pension_type_id
                                             ).er_contribution_percent
         );
Line: 3003

         update_ipval_defval (
            p_ele_name                    => l_ele_name (
                                                i
                                             ) -- employer contribution FR
           ,p_ip_name                     => 'Contribution Amount'
           ,p_def_value                   => g_tab_pension_types_info (
                                                p_pension_type_id
                                             ).er_contribution_fixed_rate
         );
Line: 3158

      g_tab_formula_ids.DELETE;
Line: 3404

         SELECT fnd_number.canonical_to_number (eei_information17)
           FROM pay_element_type_extra_info
          WHERE element_type_id = c_element_type_id
            AND information_type = 'PQP_GB_PENSION_SCHEME_INFO';
Line: 3421

            SELECT 'X'
              FROM DUAL
             WHERE EXISTS ( SELECT 1
                              FROM pay_element_type_extra_info eei
                                  ,pay_element_types_f pet
                             WHERE pet.element_type_id = eei.element_type_id
                               AND pet.business_group_id =
                                                          p_business_group_id
                               AND eei.information_type =
                                                 'PQP_GB_PENSION_SCHEME_INFO'
                               AND UPPER (eei.eei_information1) =
                                                UPPER (p_pension_scheme_name)
                               AND eei.eei_information12 IS NULL);
Line: 3502

         g_tab_pension_types_info.DELETE;
Line: 3881

   PROCEDURE delete_user_template (
      p_business_group_id   IN   NUMBER
     ,p_ele_base_name       IN   VARCHAR2
     ,p_element_type_id     IN   NUMBER
     ,p_effective_date      IN   DATE
   )
   IS
      --
      l_template_id                  NUMBER;
Line: 3892

                                       || 'delete_user_template';
Line: 3901

         SELECT template_id
           FROM pay_element_templates
          WHERE base_name = p_ele_base_name
            AND template_name = g_template_name
            AND business_group_id = p_business_group_id
            AND template_type = 'U';
Line: 3912

         SELECT element_type_id
           FROM pay_template_core_objects pet, pay_element_types_f petf
          WHERE pet.template_id = c_template_id
            AND petf.element_type_id = pet.core_object_id
            AND pet.core_object_type = 'ET';
Line: 3922

         SELECT element_type_extra_info_id
           FROM pay_element_type_extra_info petei
          WHERE element_type_id = c_element_type_id;
Line: 3930

         SELECT sub.ROWID, sub.sub_classification_rule_id
           FROM pay_sub_classification_rules_f sub
               ,pay_element_classifications pec
          WHERE element_type_id = p_element_type_id
            AND sub.classification_id = pec.classification_id
            AND pec.classification_name IN
                      ('Pre Tax Employee Pension COSR'
                      ,'Pre Tax Employee Pension COMP'
                      )
            AND pec.legislation_code = g_template_leg_code;
Line: 3945

         SELECT iterative_rule_id, object_version_number
           FROM pay_iterative_rules_f
          WHERE element_type_id = c_element_type_id;
Line: 3952

         SELECT eei_information4, eei_information6
           FROM pay_element_type_extra_info
          WHERE element_type_id = p_element_type_id
            AND information_type = 'PQP_GB_PENSION_SCHEME_INFO';
Line: 3964

         SELECT 'X'
           FROM DUAL
          WHERE EXISTS ( SELECT 1
                           FROM pqp_gb_pension_schemes_v
                          WHERE (    associated_ocp_ele_type_id IS NOT NULL
                                 AND associated_ocp_ele_type_id =
                                                            p_element_type_id
                                )
                            AND business_group_id = p_business_group_id);
Line: 3978

         SELECT 'X'
           FROM DUAL
          WHERE EXISTS ( SELECT 1
                           FROM pay_element_templates
                          WHERE base_name =    p_ele_base_name
                                            || ' Fixed'
                            AND template_name = g_template_name
                            AND business_group_id = p_business_group_id
                            AND template_type = 'U');
Line: 4074

            pay_element_extra_info_api.delete_element_extra_info (
               p_validate                    => FALSE
              ,p_element_type_extra_info_id  => l_eei_info_id
              ,p_object_version_number       => l_ovn_eei
            );
Line: 4096

         pay_sub_class_rules_pkg.delete_row (
            p_rowid                       => l_rowid
           ,p_sub_classification_rule_id  => l_sub_classification_rule_id
           ,p_delete_mode                 => 'ZAP'
           ,p_validation_start_date       => p_effective_date
           ,p_validation_end_date         => p_effective_date
         );
Line: 4110

      pay_element_template_api.delete_user_structure (
         p_validate                    => FALSE
        ,p_drop_formula_packages       => TRUE
        ,p_template_id                 => l_template_id
      );
Line: 4120

   END delete_user_template;
Line: 4127

   PROCEDURE delete_user_template_swi (
      p_business_group_id   IN   NUMBER
     ,p_ele_base_name       IN   VARCHAR2
     ,p_element_type_id     IN   NUMBER
     ,p_effective_date      IN   DATE
   )
   IS
      --
      -- Variables for API Boolean parameters
      l_validate        BOOLEAN;
Line: 4144

                                   || 'delete_user_template_swi';
Line: 4151

      SAVEPOINT delete_user_template_swi;
Line: 4170

      delete_user_template (
         p_business_group_id           => p_business_group_id
        ,p_ele_base_name               => p_ele_base_name
        ,p_element_type_id             => p_element_type_id
        ,p_effective_date              => p_effective_date
      );
Line: 4201

         ROLLBACK TO delete_user_template_swi;
Line: 4216

         ROLLBACK TO delete_user_template_swi;
Line: 4232

   END delete_user_template_swi;