DBA Data[Home] [Help]

APPS.PAY_ELEMENT_SETS_PKG SQL Statements

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

Line: 25

   30-Sep-05  tvankayl      115.6        Added delete validation for element
                                         sets of element_set_type = 'E'.
                                         The changes were initially made in
                                         the branch version 115.2.1159.2.
 ============================================================================*/
--
 -----------------------------------------------------------------------------
 -- Name                                                                    --
 --   lock_element_set                                                      --
 -- Purpose                                                                 --
 --   Places a lock on the element set.                                     --
 -- Arguments                                                               --
 --   See Be;ow.                                                            --
Line: 53

     select els.element_set_id
     from   pay_element_sets els
     where  els.element_set_id = p_element_set_id
     for update;
Line: 102

     select ecl.costing_debit_or_credit
     from   pay_element_classifications ecl
     where  ecl.classification_id = p_classification_id
       and  exists
            (select null
             from   pay_element_type_rules etr,
		    pay_element_types_f et,
                    pay_element_classifications ecl2
             where  etr.element_set_id = p_element_set_id
	       and  et.element_type_id = etr.element_type_id
               and  ecl2.classification_id = et.classification_id
               and  ecl2.costing_debit_or_credit <>
                      ecl.costing_debit_or_credit);
Line: 117

     select ecl.costing_debit_or_credit
     from   pay_element_classifications ecl
     where  ecl.classification_id = p_classification_id
       and  exists
            (select null
             from   pay_ele_classification_rules ecr,
                    pay_element_classifications ecl2
             where  ecr.element_set_id = p_element_set_id
               and  ecl2.classification_id = ecr.classification_id
               and  ecl2.costing_debit_or_credit <>
                      ecl.costing_debit_or_credit);
Line: 184

     select els.element_set_id
     from   pay_element_sets els
     where  upper(els.element_set_name) = upper(p_element_set_name)
       and  nvl(els.business_group_id,nvl(p_business_group_id,0)) =
	      nvl(p_business_group_id,0)
       and  nvl(els.legislation_code,nvl(p_legislation_code,' ')) =
	      nvl(p_legislation_code,' ')
       and  (p_rowid is null or
	    (p_rowid is not null and chartorowid(p_rowid) <> els.rowid));
Line: 222

 procedure chk_delete_element_set
 (
  p_element_set_id   number,
  p_element_set_type varchar2
 ) is
--
   cursor csr_element_links is
     select el.element_set_id
     from   pay_element_links_f el
     where  el.element_set_id = p_element_set_id;
Line: 234

     select pa.element_set_id
     from   pay_payroll_actions pa
     where  pa.element_set_id = p_element_set_id;
Line: 239

     select fnd_number.canonical_to_number(rv.value)
     from  pay_restriction_values rv
     where rv.restriction_code = 'ELEMENT_SET'
       and rv.value = to_char(p_element_set_id);
Line: 245

     select egu.element_set_id
     from   pay_event_group_usages egu
     where  egu.element_set_id = p_element_set_id;
Line: 260

       hr_utility.set_message(801, 'HR_6051_ELE_SET_SET_DELETES');
Line: 273

       hr_utility.set_message(801, 'HR_6054_ELE_SET_SET_DELETES');
Line: 286

       hr_utility.set_message(801, 'HR_6050_ELE_SET_SET_DELETES');
Line: 305

 end chk_delete_element_set;
Line: 318

 procedure delete_element_set_cascade
 (
  p_element_set_id number
 ) is
--
 begin
--
   delete from pay_element_type_rules
   where  element_set_id = p_element_set_id;
Line: 328

   delete from pay_ele_classification_rules
   where  element_set_id = p_element_set_id;
Line: 331

 end delete_element_set_cascade;
Line: 345

 PROCEDURE Insert_Row(X_Rowid            IN OUT NOCOPY VARCHAR2,
                      X_Element_Set_Id              IN OUT NOCOPY NUMBER,
                      X_Business_Group_Id                   NUMBER,
                      X_Legislation_Code                    VARCHAR2,
                      X_Element_Set_Name                    VARCHAR2,
                      X_Element_Set_Type                    VARCHAR2,
                      X_Comments                            VARCHAR2,
                      -- Extra Columns
                      X_Session_Business_Group_Id           NUMBER,
                      X_Session_Legislation_Code            VARCHAR2) IS
--
   CURSOR C IS SELECT rowid FROM pay_element_sets
               WHERE  element_set_id = X_Element_Set_Id;
Line: 359

   CURSOR C2 IS SELECT pay_element_sets_s.nextval FROM sys.dual;
Line: 382

   INSERT INTO pay_element_sets
   (element_set_id,
    business_group_id,
    legislation_code,
    element_set_name,
    element_set_type,
    comments
    )
   VALUES
   (X_Element_Set_Id,
    X_Business_Group_Id,
    X_Legislation_Code,
    X_Element_Set_Name,
    X_Element_Set_Type,
    X_Comments
    );
Line: 411

                                  'pay_element_sets_pkg.insert_row');
Line: 417

 END Insert_Row;
Line: 439

   CURSOR C IS SELECT * FROM  pay_element_sets
               WHERE  rowid = X_Rowid FOR UPDATE of Element_Set_Id NOWAIT;
Line: 503

 PROCEDURE Update_Row(X_Rowid                               VARCHAR2,
                      X_Element_Set_Id                      NUMBER,
                      X_Business_Group_Id                   NUMBER,
                      X_Legislation_Code                    VARCHAR2,
                      X_Element_Set_Name                    VARCHAR2,
                      X_Element_Set_Type                    VARCHAR2,
                      X_Comments                            VARCHAR2,
                      -- Extra Columns
                      X_Session_Business_Group_Id           NUMBER,
                      X_Session_Legislation_Code            VARCHAR2,
		      X_Base_Element_Set_Name in varchar2 default hr_api.g_varchar2) IS
 BEGIN
--
   check_unique_set
     (X_Rowid,
      X_Session_Business_Group_Id,
      X_Session_Legislation_Code,
      X_Element_Set_Name);
Line: 522

UPDATE pay_element_sets
   SET element_set_id       =    X_Element_Set_Id,
       business_group_id    =    X_Business_Group_Id,
       legislation_code     =    X_Legislation_Code,
       element_set_name     =    X_Element_Set_Name,
       element_set_type     =    X_Element_Set_Type,
       comments             =    X_Comments
   WHERE rowid = X_rowid;
Line: 542

   UPDATE pay_element_sets
   SET element_set_id       =    X_Element_Set_Id,
       business_group_id    =    X_Business_Group_Id,
       legislation_code     =    X_Legislation_Code,
       element_set_name     =    X_Base_Element_Set_Name,
       element_set_type     =    X_Element_Set_Type,
       comments             =    X_Comments
   WHERE rowid = X_rowid;
Line: 558

                                  'pay_element_sets_pkg.update_row');
Line: 563

 END Update_Row;
Line: 577

 PROCEDURE Delete_Row(X_Rowid                               VARCHAR2,
                      -- Extra Columns
                      X_Element_Set_Id                      NUMBER,
                      X_Element_Set_Type                    VARCHAR2) IS
 BEGIN
--
   chk_delete_element_set
     (X_Element_Set_Id,
      X_Element_Set_Type);
Line: 587

   delete_element_set_cascade
     (X_Element_Set_Id);
Line: 596

   DELETE FROM pay_element_sets
   WHERE  rowid = X_Rowid;
Line: 602

                                  'pay_element_sets_pkg.delete_row');
Line: 607

 END Delete_Row;
Line: 614

  delete from PAY_ELEMENT_SETS_TL T
  where not exists
    (select NULL
     from PAY_ELEMENT_SETS B
     where B.ELEMENT_SET_ID = T.ELEMENT_SET_ID
    );
Line: 620

  update PAY_ELEMENT_SETS_TL T
  set (ELEMENT_SET_NAME) =
  (select B.ELEMENT_SET_NAME
   from PAY_ELEMENT_SETS_TL B
   where B.ELEMENT_SET_ID = T.ELEMENT_SET_ID
   and B.LANGUAGE = T.SOURCE_LANG)
  where (T.ELEMENT_SET_ID,T.LANGUAGE) in
  (select SUBT.ELEMENT_SET_ID,SUBT.LANGUAGE
    from PAY_ELEMENT_SETS_TL SUBB, PAY_ELEMENT_SETS_TL SUBT
    where SUBB.ELEMENT_SET_ID = SUBT.ELEMENT_SET_ID
    and SUBB.LANGUAGE = SUBT.SOURCE_LANG
    and (SUBB.ELEMENT_SET_NAME <> SUBT.ELEMENT_SET_NAME
  ));
Line: 634

  insert into PAY_ELEMENT_SETS_TL (
    ELEMENT_SET_ID,
    ELEMENT_SET_NAME,
    LAST_UPDATE_DATE,
    LAST_UPDATED_BY,
    LAST_UPDATE_LOGIN,
    CREATED_BY,
    CREATION_DATE,
    LANGUAGE,
    SOURCE_LANG
  ) select
    B.ELEMENT_SET_ID,
    B.ELEMENT_SET_NAME,
    B.LAST_UPDATE_DATE,
    B.LAST_UPDATED_BY,
    B.LAST_UPDATE_LOGIN,
    B.CREATED_BY,
    B.CREATION_DATE,
    L.LANGUAGE_CODE,
    B.SOURCE_LANG
  from PAY_ELEMENT_SETS_TL B, FND_LANGUAGES L
  where L.INSTALLED_FLAG in ('I', 'B')
  and B.LANGUAGE = userenv('LANG')
  and not exists
    (select NULL
    from PAY_ELEMENT_SETS_TL T
    where T.ELEMENT_SET_ID = B.ELEMENT_SET_ID
    and T.LANGUAGE = L.LANGUAGE_CODE);
Line: 670

  UPDATE PAY_ELEMENT_SETS_TL
    SET ELEMENT_SET_NAME = nvl(X_ELEMENT_SET_NAME,ELEMENT_SET_NAME),
        last_update_date = SYSDATE,
        last_updated_by = decode(x_owner,'SEED',1,0),
        last_update_login = 0,
        source_lang = userenv('LANG')
  WHERE userenv('LANG') IN (language,source_lang)
    AND ELEMENT_SET_ID in
        (select ELEMENT_SET_ID
           from PAY_ELEMENT_SETS
          where nvl(ELEMENT_SET_NAME,'~null~')=nvl(X_B_ELEMENT_SET_NAME,'~null~')
            and nvl(LEGISLATION_CODE,'~null~') = nvl(X_B_LEGISLATION_CODE,'~null~')
            and BUSINESS_GROUP_ID is NULL);
Line: 720

       SELECT  1
	 FROM  pay_element_sets_tl est,
	       pay_element_sets    els
	 WHERE upper(est.element_set_name)=upper(p_element_set_name)
	 AND   est.element_set_id = els.element_set_id
	 AND   est.language = p_language
	 AND   (els.element_set_id <> p_element_set_id OR p_element_set_id IS NULL)
	 AND   (nvl(els.business_group_id,-1) = nvl(p_bus_grp_id,-1) OR p_bus_grp_id IS NULL)
	 AND   (nvl(els.LEGISLATION_CODE,'~null~') = nvl(p_leg_code,'~null~') OR p_leg_code IS NULL);