DBA Data[Home] [Help]

APPS.PAY_DEFINED_BALANCES_PKG SQL Statements

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

Line: 25

     select dfb.defined_balance_id
     from   pay_defined_balances dfb
     where  dfb.balance_type_id = p_balance_type_id
       and  dfb.balance_dimension_id = p_balance_dimension_id
       and  nvl(dfb.business_group_id,nvl(p_business_group_id,0)) =
              nvl(p_business_group_id,0)
       and  nvl(dfb.legislation_code,nvl(p_legislation_code,' ')) =
              nvl(p_legislation_code,' ')
       and  (p_row_id is null or
	    (p_row_id is not null and chartorowid(p_row_id) <> dfb.rowid));
Line: 63

 procedure chk_delete_defined_balance
 (
  p_defined_balance_id number
 ) is
--
   cursor csr_org_pay_meth is
     select opm.org_payment_method_id
     from   pay_org_payment_methods_f opm
     where  opm.defined_balance_id = p_defined_balance_id;
Line: 74

     select br.backpay_set_id
     from   pay_backpay_rules br
     where  br.defined_balance_id = p_defined_balance_id;
Line: 79

   select balance_attribute_id
   from   pay_balance_attributes
   where  defined_balance_id = p_def_bal;
Line: 111

      pay_balance_attribute_api.delete_balance_attribute
         (p_balance_attribute_id => each_pba.balance_attribute_id);
Line: 114

 end chk_delete_defined_balance;
Line: 128

 procedure delete_defined_balance
 (
  p_defined_balance_id number
 ) is
--
 begin
--
   delete /*+ INDEX(alb PAY_ASSIGNMENT_LATEST_BALA_FK2)*/
   from pay_assignment_latest_balances alb
   where  alb.defined_balance_id = p_defined_balance_id;
Line: 139

   delete /*+ INDEX(plb PAY_PERSON_LATEST_BALANCES_FK1)*/
   from pay_person_latest_balances plb
   where  plb.defined_balance_id = p_defined_balance_id;
Line: 143

 end delete_defined_balance;
Line: 160

select pbc.save_run_balance_enabled
from   pay_balance_categories_f pbc
where  pbc.balance_category_id = (p_cat_id)
and    p_eff_date between pbc.effective_start_date
                      and pbc.effective_end_date;
Line: 168

select dim.save_run_balance_enabled
from   pay_balance_dimensions dim
where  dim.balance_dimension_id = p_dim_id
and    dim.dimension_type = 'R';
Line: 211

procedure insert_default_attrib_wrapper(p_balance_dimension_id number
                                       ,p_balance_category_id  number
                                       ,p_def_bal_bg_id        number
                                       ,p_def_bal_leg_code     varchar2
                                       ,p_defined_balance_id   number
                                       ,p_effective_date       date)
is
cursor get_bg_leg(p_bg number)
is
select legislation_code
from   per_business_groups
where  business_group_id = p_bg;
Line: 226

select effective_date
from   fnd_sessions
where  session_id = userenv('sessionid');
Line: 272

  insert_default_attributes
        (p_balance_dimension_id => p_balance_dimension_id
        ,p_balance_category_id  => p_balance_category_id
        ,p_ctl_bg_id            => l_ctl_business_group_id
        ,p_ctl_leg_code         => l_ctl_legislation_code
        ,p_ctl_sess_date        => l_ctl_session_date
        ,p_defined_balance_id   => p_defined_balance_id
        ,p_dfbl_bg_id           => p_def_bal_bg_id
        ,p_dfbl_leg_code        => p_def_bal_leg_code);
Line: 281

end insert_default_attrib_wrapper;
Line: 287

procedure insert_default_attributes(p_balance_dimension_id number
                                   ,p_balance_category_id  number
                                   ,p_ctl_bg_id            number
                                   ,p_ctl_leg_code         varchar2
                                   ,p_ctl_sess_date        date
                                   ,p_defined_balance_id   number
                                   ,p_dfbl_bg_id           number
                                   ,p_dfbl_leg_code        varchar2)
is
--
cursor get_default_attributes(p_dim_id              number
                             ,p_cat_id              number
                             ,ctl_business_group_id number
                             ,ctl_legislation_code  varchar2
                             ,ctl_session_date      date)
is
select pbd.attribute_id
,      pbd.bal_attribute_default_id
from   pay_bal_attribute_defaults pbd
,      pay_balance_categories_f pbc
,      pay_bal_attribute_definitions bad
where  bad.attribute_id = pbd.attribute_id
and    ((ctl_business_group_id is not null
       and bad.alterable = 'Y')
       or ctl_business_group_id is null)
and nvl(pbd.business_group_id, nvl(ctl_business_group_id,-1))
                               = nvl(ctl_business_group_id,-1)
and nvl(pbd.legislation_code, nvl(ctl_legislation_code,' '))
                            = nvl(ctl_legislation_code,' ')
and    pbc.balance_category_id = pbd.balance_category_id
and    ctl_session_date between pbc.effective_start_date
                            and pbc.effective_end_date
and    pbd.balance_dimension_id = p_dim_id
and    pbd.balance_category_id = p_cat_id
order by pbd.attribute_id;
Line: 328

select null
from   pay_balance_attributes
where  attribute_id = p_att_id
and    defined_balance_id = p_def_bal_id
and    nvl(business_group_id,-1) = nvl(p_bg, -1)
and    nvl(legislation_code, 'NULL') = nvl(p_leg,'NULL');
Line: 365

end insert_default_attributes;
Line: 384

 PROCEDURE Insert_Row(X_Rowid                    IN OUT NOCOPY VARCHAR2,
                      X_Defined_Balance_Id       IN OUT NOCOPY NUMBER,
                      X_Business_Group_Id               NUMBER,
                      X_Legislation_Code                VARCHAR2,
                      X_Balance_Type_Id                 NUMBER,
                      X_Balance_Dimension_Id            NUMBER,
                      X_Force_Latest_Balance_Flag       VARCHAR2,
                      X_Legislation_Subgroup            VARCHAR2,
                      X_Grossup_Allowed_Flag            VARCHAR2 DEFAULT 'N',
                      x_balance_category_id             number default null,
                      x_effective_date                  date default null,
                      x_mode                            varchar2 default null)
 IS
--
   CURSOR C IS SELECT rowid FROM pay_defined_balances
               WHERE  defined_balance_id = X_Defined_Balance_Id;
Line: 401

   CURSOR C2 IS SELECT pay_defined_balances_s.nextval FROM sys.dual;
Line: 403

   CURSOR C3 IS SELECT count(*) from pay_defined_balances
                WHERE  Balance_Type_Id = X_Balance_Type_Id
                AND    Grossup_Allowed_Flag = 'Y';
Line: 409

   select balance_category_id
   from   pay_balance_types
   where  balance_type_id = p_bal_type;
Line: 415

   select effective_date
   from   fnd_sessions
   where  session_id = userenv('sessionid');
Line: 425

 hr_utility.set_location('Entering pay_defined_balances_pkg.insert_row', 5);
Line: 434

   hr_utility.set_location('pay_defined_balances_pkg.insert_row', 10);
Line: 447

   hr_utility.set_location('pay_defined_balances_pkg.insert_row', 15);
Line: 456

   hr_utility.set_location('pay_defined_balances_pkg.insert_row', 20);
Line: 470

       hr_utility.set_location('pay_defined_balances_pkg.insert_row', 25);
Line: 477

       hr_utility.set_location('pay_defined_balances_pkg.insert_row', 30);
Line: 482

    hr_utility.set_location('pay_defined_balances_pkg.insert_row', 35);
Line: 489

      hr_utility.set_location('pay_defined_balances_pkg.insert_row', 40);
Line: 498

   hr_utility.set_location('pay_defined_balances_pkg.insert_row', 45);
Line: 500

     INSERT INTO pay_defined_balances
     (defined_balance_id,
      business_group_id,
      legislation_code,
      balance_type_id,
      balance_dimension_id,
      force_latest_balance_flag,
      legislation_subgroup,
      grossup_allowed_flag,
      save_run_balance)
     VALUES
     (X_Defined_Balance_Id,
      X_Business_Group_Id,
      X_Legislation_Code,
      X_Balance_Type_Id,
      X_Balance_Dimension_Id,
      X_Force_Latest_Balance_Flag,
      X_Legislation_Subgroup,
      X_Grossup_Allowed_Flag,
      l_save_run_bal_flag);
Line: 528

                                    'pay_defined_balances_pkg.insert_row');
Line: 546

    hr_utility.set_location('pay_defined_balances_pkg.insert_row', 50);
Line: 549

      hr_utility.set_location('pay_defined_balances_pkg.insert_row', 55);
Line: 550

      insert_default_attrib_wrapper
           (p_balance_dimension_id => x_balance_dimension_id
           ,p_balance_category_id  => l_bal_cat_id
           ,p_def_bal_bg_id        => x_business_group_id
           ,p_def_bal_leg_code     => x_legislation_code
           ,p_defined_balance_id   => x_defined_balance_id
           ,p_effective_date       => l_eff_date
           );
Line: 558

    hr_utility.set_location('pay_defined_balances_pkg.insert_row', 60);
Line: 564

                                    'pay_defined_balances_pkg.insert_row');
Line: 568

 END Insert_Row;
Line: 593

   CURSOR C IS SELECT * FROM pay_defined_balances
               WHERE  rowid = X_Rowid FOR UPDATE of Defined_Balance_Id NOWAIT;
Line: 663

 PROCEDURE Update_Row(X_Rowid                               VARCHAR2,
                      X_Defined_Balance_Id                  NUMBER,
                      X_Business_Group_Id                   NUMBER,
                      X_Legislation_Code                    VARCHAR2,
                      X_Balance_Type_Id                     NUMBER,
                      X_Balance_Dimension_Id                NUMBER,
                      X_Force_Latest_Balance_Flag           VARCHAR2,
                      X_Legislation_Subgroup                VARCHAR2,
                      X_Grossup_Allowed_Flag                VARCHAR2) IS
--
 l_exists number;
Line: 675

   CURSOR C3 IS SELECT count(*) from pay_defined_balances
                WHERE  Balance_Type_Id = X_Balance_Type_Id
                AND    Grossup_Allowed_Flag = 'Y';
Line: 686

     UPDATE pay_defined_balances
     SET defined_balance_id          =    X_Defined_Balance_Id,
         business_group_id           =    X_Business_Group_Id,
         legislation_code            =    X_Legislation_Code,
         balance_type_id             =    X_Balance_Type_Id,
         balance_dimension_id        =    X_Balance_Dimension_Id,
         force_latest_balance_flag   =    X_Force_Latest_Balance_Flag,
         legislation_subgroup        =    X_Legislation_Subgroup,
         grossup_allowed_flag        =    X_Grossup_Allowed_Flag
     WHERE rowid = X_rowid;
Line: 700

                                    'pay_defined_balances_pkg.update_row');
Line: 708

                                    'pay_defined_balances_pkg.update_row');
Line: 713

   END Update_Row;
Line: 727

 PROCEDURE Delete_Row(X_Rowid               VARCHAR2,
		      -- Extra Columns
		      X_Defined_Balance_Id  NUMBER) IS
--
 BEGIN
--
   -- Check that the delete is valid.
   chk_delete_defined_balance(X_Defined_Balance_Id);
Line: 737

   delete_defined_balance(X_Defined_Balance_Id);
Line: 739

   DELETE FROM pay_defined_balances
   WHERE  rowid = X_Rowid;
Line: 745

                                  'pay_defined_balances_pkg.delete_row');
Line: 750

 END Delete_Row;
Line: 770

 select 1
 from   pay_balance_validation pbv
 ,      pay_run_balances prb
 where  pbv.run_balance_status = 'V'
 and    pbv.defined_balance_id = p_def_bal_id
 and    pbv.defined_balance_id = prb.defined_balance_id;