DBA Data[Home] [Help]

APPS.BEN_EXTRACT_SEED SQL Statements

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

Line: 8

select '1' from dual where
exists (
select '1' from ben_ext_rcd r,
      ben_ext_rcd_in_file rif,
      ben_ext_file f
WHERE f.business_group_id is NULL
and f.ext_file_id =rif.ext_file_id
and r.ext_rcd_id = rif.ext_rcd_id
and f.name = p_file_name
AND f.name in ('ANSI-834 Full Profile','ANSI-834 Change Event')
and r.name = 'EC-Employment Class'
);
Line: 28

        update ben_ext_rcd_in_file
               set seq_num = seq_num * 10
        where ext_FILE_ID = (select ext_FILE_ID from
                        ben_ext_file f
                        where f.business_group_id is NULL
                        and f.name = p_file_name
                        AND f.name in ('ANSI-834 Full Profile','ANSI-834 Change Event'));
Line: 36

       update ben_EXT_DATA_ELMT_IN_RCD
              set seq_num = seq_num * 10
       where ext_rcd_id = (select rcd.ext_rcd_id from
                        ben_ext_file f
                       ,ben_ext_rcd rcd
                       ,BEN_EXT_RCD_IN_FILE rif
                        where f.business_group_id is NULL
                        and f.name = p_file_name
                        and   rcd.EXT_RCD_ID =rif.ext_rcd_id
                        and   f.EXT_FILE_ID =rif.EXT_FILE_ID
                        AND f.name in ('ANSI-834 Full Profile','ANSI-834 Change Event')
                        and ( (rcd.name = 'INS- Insured Benefit_021' and f.name = 'ANSI-834 Full Profile')
                              or  (rcd.name = 'INS- Insured Benefit_001' and f.name = 'ANSI-834 Change Event'))
                        );
Line: 59

procedure  delete_crit_adv_conditon
                  (p_ext_crit_prfl_id in number ) is


cursor c1 is
select  ecv.ext_crit_val_id ,
        ecv.object_version_number ,
        ecv.LEGISLATION_CODE
from ben_ext_crit_val ecv ,
     ben_ext_crit_typ ect
where  ect.ext_crit_prfl_id = p_ext_crit_prfl_id
  and  ect.ext_crit_typ_id  = ecv.ext_crit_typ_id
  and  ect.crit_typ_cd      = 'ADV'
  ;
Line: 77

select ext_crit_cmbn_id ,
       object_version_number ,
       LEGISLATION_CODE
  from ben_ext_crit_cmbn
 where ext_crit_val_id = p_ext_crit_val_id
 ;
Line: 84

 l_proc                   varchar2(100) := 'BEN_EXT_SEED.delete_crit_adv_conditon' ;
Line: 96

       BEN_ext_crit_cmbn_API.delete_ext_crit_cmbn
                (p_validate           => FALSE
                ,p_EXT_CRIT_CMBN_ID   => k.EXT_CRIT_CMBN_ID
                ,p_LEGISLATION_CODE   => k.LEGISLATION_CODE
                ,p_OBJECT_VERSION_NUMBER => l_OBJECT_VERSION_NUMBER
                ,p_effective_date => trunc(sysdate)
                );
Line: 106

    BEN_ext_crit_val_API.delete_ext_crit_val
            (p_validate           => FALSE
            ,p_EXT_CRIT_VAL_ID    => I.EXT_CRIT_VAL_ID
            ,p_LEGISLATION_CODE   => I.LEGISLATION_CODE
            ,p_OBJECT_VERSION_NUMBER => l_OBJECT_VERSION_NUMBER
          );
Line: 116

  g_Ext_adv_crit_cmbn.delete ;
Line: 236

        select business_group_id
          into  g_business_group_id
        from per_business_groups_perf
        where name = p_business_group ;
Line: 292

select 'x' from hr_lookups
where  lookup_type = p_lookup_type
and    lookup_code = p_val
;
Line: 388

cursor c1 is select meaning
             from   hr_lookups
             where  lookup_type = 'US_STATE'
             and    lookup_code = p_val;
Line: 394

cursor c2 is select  name
                from  ben_benfts_grp
                where benfts_grp_id = p_val;
Line: 398

cursor c3 is SELECT user_status from PER_ASSIGNMENT_STATUS_TYPES
            WHERE active_flag ='Y'
            and assignment_status_type_id = p_val;
Line: 402

cursor c4 is SELECT name from PER_ORGANIZATION_UNITS
            WHERE internal_external_flag = 'INT'
            and organization_id = p_val;
Line: 406

cursor c5 is select location_code from hr_locations
        where trunc(sysdate) <=
        nvl(inactive_date,to_date('31124712','DDMMYYYY'))
        and location_id = p_val;
Line: 411

cursor c6 is SELECT name from hr_tax_units_v
            WHERE nvl(business_group_id,nvl(p_business_group_id,-1))
                   = nvl(p_business_group_id,-1)
            and trunc(sysdate)
         between nvl(date_from,trunc(sysdate))
         and nvl(date_to,trunc(sysdate))
         and tax_unit_id = p_val;
Line: 419

cursor c7 is SELECT full_name||'   '||national_identifier
           ||'   '||employee_number from per_all_people_f
            WHERE nvl(business_group_id,nvl(p_business_group_id,-1))
                   = nvl(p_business_group_id,-1)
            and trunc(sysdate)
         between nvl(effective_start_date,trunc(sysdate))
         and nvl(effective_end_date,trunc(sysdate))
         and person_id = p_val;
Line: 430

cursor c8 is select  formula_name
             from    ff_formulas_f
             where   --nvl(legislation_code,nvl(p_legislation_code,'~~nvl~~'))
--                      = nvl(p_legislation_code,'~~nvl~~')
--             and     nvl(business_group_id,nvl(p_business_group_id,-1))
--                      = nvl(p_business_group_id,-1) and
                  trunc(sysdate) between effective_start_date
                     and effective_end_date
             and     formula_id = p_val;
Line: 440

cursor c9 is select  name
             from    ben_ler_f
             where   nvl(business_group_id,nvl(p_business_group_id,-1))
                      = nvl(p_business_group_id,-1)
             and     trunc(sysdate) between effective_start_date
                     and effective_end_date
             and     ler_id = p_val;
Line: 448

cursor c10 is select  user_person_type
              from    per_person_types
              where   nvl(business_group_id,nvl(p_business_group_id,-1))
                       = nvl(p_business_group_id,-1)
              and     active_flag = 'Y'
              and     person_type_id = p_val;
Line: 455

cursor ca is SELECT name from ben_cm_typ_f
            WHERE   nvl(business_group_id,nvl(p_business_group_id,-1))
                   = nvl(p_business_group_id,-1)
                and cm_typ_id = p_val;
Line: 461

cursor cb is SELECT payroll_name from pay_all_payrolls_f
          WHERE   nvl(business_group_id,nvl(p_business_group_id,-1))
                   = nvl(p_business_group_id,-1)
            and trunc(sysdate)
         between nvl(effective_start_date,trunc(sysdate))
         and nvl(effective_end_date,trunc(sysdate))
         and payroll_id = p_val;
Line: 470

cursor cc is SELECT element_name from pay_element_types_f
              WHERE   nvl(business_group_id,nvl(p_business_group_id,-1))
                   = nvl(p_business_group_id,-1)
             and element_type_id = p_val;
Line: 476

cursor cd is SELECT name from pay_input_values_f
             WHERE   nvl(business_group_id,nvl(p_business_group_id,-1))
                   = nvl(p_business_group_id,-1)
             and input_value_id = p_val;
Line: 482

cursor ce is select  name
             from    ben_pl_f
             where   business_group_id = p_business_group_id
             and     trunc(sysdate) between nvl(effective_start_date,trunc(sysdate))
                                    and nvl(effective_end_date,trunc(sysdate))
             and     pl_id = p_val;
Line: 489

cursor cf is select  name
             from    ben_rptg_grp_v
               WHERE   nvl(business_group_id,nvl(p_business_group_id,-1))
                   = nvl(p_business_group_id,-1)
             and     rptg_grp_id = p_val;
Line: 496

cursor cf is select meaning
             from   hr_lookups
             where  lookup_type = 'BEN_PER_IN_LER_STAT'
             and    lookup_code = p_val;
Line: 502

cursor cg is select meaning
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_SUSPEND'
             and    lookup_code = p_val;
Line: 507

cursor ch is select  name
             from    ben_ler_v
             where   business_group_id = p_business_group_id
             and    trunc(sysdate) between nvl(effective_start_date,trunc(sysdate))
                                and nvl(effective_end_date,trunc(sysdate))
             and     ler_id = p_val;
Line: 515

cursor ci is select  name
             from    ben_pgm_f
             where   business_group_id = p_business_group_id
             and     trunc(sysdate) between nvl(effective_start_date,trunc(sysdate))
                             and nvl(effective_end_date,trunc(sysdate))
             and     pgm_id = p_val;
Line: 523

cursor cj is select  name
             from    ben_pl_f
             where   business_group_id = p_business_group_id
             and     trunc(sysdate) between nvl(effective_start_date,trunc(sysdate))
                             and nvl(effective_end_date,trunc(sysdate))
             and     pl_id = p_val;
Line: 530

cursor ck is select  name
             from    ben_rptg_grp_v
             where   business_group_id = p_business_group_id
             and     rptg_grp_id = p_val;
Line: 536

cursor cl is select meaning
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_CRIT_MISC'
             and    lookup_code = p_val;
Line: 542

cursor cm is select  name
             from    ben_pl_typ_f
             where   business_group_id = p_business_group_id
             and     trunc(sysdate) between nvl(effective_start_date,trunc(sysdate))
                             and nvl(effective_end_date,trunc(sysdate))
             and     pl_typ_id = p_val;
Line: 550

cursor cn is select  start_date||' - '||end_date
              from    ben_yr_perd
              where   business_group_id = p_business_group_id
              and     yr_perd_id = p_val;
Line: 555

cursor co is select meaning
              from   hr_lookups
              where  lookup_type = 'BEN_EXT_CRIT_MISC'
              and    lookup_code = p_val;
Line: 560

cursor cp is select meaning
              from   hr_lookups
              where  lookup_type = 'BEN_EXT_SUSPEND'
              and    lookup_code = p_val;
Line: 565

cursor cq is select meaning
             from   hr_lookups
             where  lookup_type = 'BEN_ENRT_RSLT_MTHD'
             and    lookup_code = p_val;
Line: 570

cursor cr is select meaning
             from   hr_lookups
             where  lookup_type = 'BEN_PRTT_ENRT_RSLT_STAT'
             and    lookup_code = p_val;
Line: 575

cursor cs is select meaning
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    lookup_code = p_val;
Line: 580

cursor ct is select  name
             from    ben_actn_typ
             where   actn_typ_id = p_val ;
Line: 585

cursor cu is select meaning
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    lookup_code = p_val
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 595

cursor cv is select meaning
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    lookup_code = p_val
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 603

cursor cw is select meaning
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_CHG_EVT'
             and    lookup_code = p_val
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))  ;
Line: 610

cursor cep is select event_group_name
         from  pay_event_groups
         where  event_group_id =  p_val
        ;
Line: 615

cursor cx is select user_name
             from   fnd_user
             where  user_id = p_val
             and    trunc(sysdate) between nvl(start_date, trunc(sysdate))
                                 and nvl(end_date, trunc(sysdate));
Line: 621

cursor cy is select meaning
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    lookup_code = p_val
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
            ;
Line: 629

cursor cz is select meaning
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    lookup_code = p_val
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 637

cursor caa is select meaning
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    lookup_code = p_val
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 645

cursor cab is select meaning
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    lookup_code = p_val
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 653

cursor cac is select meaning
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    lookup_code = p_val
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 661

cursor cad is select meaning
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    lookup_code = p_val
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 669

cursor cae is select meaning
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    lookup_code = p_val
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 677

cursor caf is select meaning
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    lookup_code = p_val
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 685

cursor cag is select meaning
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    lookup_code = p_val
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 694

cursor cah is select meaning
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    lookup_code = p_val
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 705

  select meaning
  from   hr_lookups
  where  lookup_type = 'BEN_EXT_DT'
  and    lookup_code = p_val;
Line: 712

  select meaning
  from   hr_lookups
  where  lookup_type = 'BEN_EXT_DT'
  and    lookup_code = p_val;
Line: 719

  select meaning
  from   hr_lookups
  where  lookup_type = 'BEN_EXT_CHG_EVT'
  and    lookup_code = p_val;
Line: 726

  select meaning
  from   hr_lookups
  where  lookup_type = 'BEN_EXT_CHG_EVT'
  and    lookup_code = p_val;
Line: 733

  select meaning
  from   hr_lookups
  where  lookup_type = 'BEN_EXT_TTL_COND_OPER'
  and    lookup_code = p_val; --p_oper_cd;
Line: 741

    select meaning
    from   hr_lookups
    where  lookup_type = 'BEN_EXT_ASMT_TO_USE'
    and    lookup_code = p_val;  --  value for the criteria Person Assignment To Use
Line: 747

      select MEANING
      from   HR_LOOKUPS
      where  LOOKUP_CODE = p_crit_typ_cd
      and    lookup_type = 'BEN_EXT_CRIT_TYP'
      and    substr(lookup_code, 1, 1) = 'C'
      and    lookup_code not in ('CBU')
      and    trunc(sysdate) between
             nvl(start_date_active, trunc(sysdate))
      and    nvl(end_date_active, trunc(sysdate))
      ;
Line: 760

    select meaning
    from   hr_lookups
    where  lookup_type = 'BEN_ENRT_MTHD'
    and    lookup_code = p_val;  --  value for the criteria Enrollment method
Line: 767

    select  to_char(enp.strt_dt, 'DD-MON-RRRR') || ' - ' || to_char( enp.end_dt, 'DD-MON-RRRR')
    from  ben_enrt_perd enp
    where ENRT_PERD_ID = p_val
   ;
Line: 774

   select meaning
    from   hr_lookups
    where  lookup_type = p_type
    and    lookup_code = p_val;  --
Line: 780

  select name
  from  per_jobs_vl job
  where job_id =   p_val;
Line: 785

  select name
  from  per_business_groups_perf
  where business_group_id =   p_val;
Line: 790

  select name
  from   HR_ALL_POSITIONS_F  job
  where position_id =  p_val
  and trunc(sysdate) between
      EFFECTIVE_START_DATE
      and   EFFECTIVE_END_DATE ;
Line: 798

 select ASSIGNMENT_SET_NAME from
 hr_assignment_sets
 where ASSIGNMENT_SET_ID = p_val
 ;
Line: 1137

cursor c1 is select lookup_code
             from   hr_lookups
             where  lookup_type = 'US_STATE'
             and    meaning = p_meaning
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and     nvl(end_date_active, trunc(sysdate))
             ;
Line: 1146

cursor c2 is select benfts_grp_id
                from    ben_benfts_grp
                where nvl(business_group_id,nvl(p_business_group_id,-1))
                       = nvl(p_business_group_id,-1)
                  and name  = p_meaning;
Line: 1152

cursor c3 is SELECT  assignment_status_type_id
             from PER_ASSIGNMENT_STATUS_TYPES
            WHERE
             --    nvl(legislation_code,nvl(p_legislation_code,'~~nvl~~'))
             --    = nvl(p_legislation_code,'~~nvl~~') and
            nvl(business_group_id,nvl(p_business_group_id,-1))
                    = nvl(p_business_group_id,-1)
            and active_flag ='Y'
            and user_status  = p_meaning;
Line: 1162

cursor c4 is SELECT organization_id  from PER_ORGANIZATION_UNITS
            WHERE nvl(business_group_id,nvl(p_business_group_id,-1))
                    = nvl(p_business_group_id,-1)
            and trunc(sysdate)
                    between nvl(date_from,trunc(sysdate))
                     and nvl(date_to,trunc(sysdate))
            and internal_external_flag = 'INT'
            and name  = p_meaning;
Line: 1171

cursor c5 is select location_id from hr_locations
        where trunc(sysdate) <=
        nvl(inactive_date,to_date('31124712','DDMMYYYY'))
        and location_code  = p_meaning ;
Line: 1176

cursor c6 is SELECT tax_unit_id  from hr_tax_units_v
            WHERE nvl(business_group_id,nvl(p_business_group_id,-1))
                   = nvl(p_business_group_id,-1)
            and trunc(sysdate)
         between nvl(date_from,trunc(sysdate))
         and nvl(date_to,trunc(sysdate))
         and name  = p_meaning ;
Line: 1184

cursor c7 is  SELECT person_id
            from per_all_people_f
            WHERE nvl(business_group_id,nvl(p_business_group_id,-1))
                   = nvl(p_business_group_id,-1)
            and trunc(sysdate)
         between nvl(effective_start_date,trunc(sysdate))
         and nvl(effective_end_date,trunc(sysdate))
         and   full_name||'   '||national_identifier||'   '||employee_number  = p_meaning
         and  full_name like SUBSTR(p_meaning,1, INSTR(p_meaning,'   ')-1)||'%'; -- 4300295. Perf fix.
Line: 1194

cursor c8 is select  formula_id --formula_name
             from    ff_formulas_f
             where   --nvl(legislation_code,nvl(p_legislation_code,'~~nvl~~'))
--                      = nvl(p_legislation_code,'~~nvl~~')
--             and     nvl(business_group_id,nvl(p_business_group_id,-1))
--                      = nvl(p_business_group_id,-1) and
                  trunc(sysdate) between effective_start_date
                     and effective_end_date
             and     formula_name = p_meaning;
Line: 1203

cursor c9 is select  ler_id
             from    ben_ler_f
             where   nvl(business_group_id,nvl(p_business_group_id,-1))
                      = nvl(p_business_group_id,-1)
             and     trunc(sysdate) between effective_start_date
                     and effective_end_date
             and     name = p_meaning;
Line: 1211

cursor c10 is select  person_type_id
              from    per_person_types
              where   nvl(business_group_id,nvl(p_business_group_id,-1))
                       = nvl(p_business_group_id,-1)
              and     active_flag = 'Y'
              and     user_person_type = p_meaning;
Line: 1218

cursor ca is SELECT cm_typ_id from ben_cm_typ_f
            WHERE nvl(business_group_id ,nvl(p_business_group_id,-1))
                = nvl(p_business_group_id,-1)
                and name = p_meaning ;
Line: 1224

cursor cb is SELECT payroll_id from pay_all_payrolls_f
            WHERE nvl(business_group_id ,nvl(p_business_group_id,-1))
                = nvl(p_business_group_id,-1)
            and trunc(sysdate)
         between nvl(effective_start_date,trunc(sysdate))
         and nvl(effective_end_date,trunc(sysdate))
         and payroll_name  = p_meaning;
Line: 1233

cursor cc is SELECT element_type_id from pay_element_types_f
            WHERE   nvl(business_group_id ,nvl(p_business_group_id,-1))
                = nvl(p_business_group_id,-1)
              and  element_name = p_meaning;
Line: 1239

cursor cd is SELECT input_value_id from pay_input_values_f
            WHERE  nvl(business_group_id ,nvl(p_business_group_id,-1))
                = nvl(p_business_group_id,-1)
            and name = p_meaning
            and element_type_id = (SELECT element_type_id from pay_element_types_f
            WHERE nvl(business_group_id ,nvl(p_business_group_id,-1))
                  = nvl(p_business_group_id,-1)
              and element_name = p_parent_meaning);
Line: 1249

cursor ce is select  pl_id
             from    ben_pl_f
             where   business_group_id = p_business_group_id
             and     trunc(sysdate) between nvl(effective_start_date,trunc(sysdate))
                                    and nvl(effective_end_date,trunc(sysdate))
             and     name = p_meaning ;
Line: 1256

cursor cf is select  name
             from    ben_rptg_grp_v
             where   business_group_id = p_business_group_id
             and     rptg_grp_id = p_val_1;
Line: 1262

cursor cf is select lookup_code
             from   hr_lookups
             where  lookup_type = 'BEN_PER_IN_LER_STAT'
             and    meaning = p_meaning;
Line: 1267

cursor cg is select lookup_code
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_SUSPEND'
             and    meaning = p_meaning;
Line: 1272

cursor ch is select  name
             from    ben_ler_v
             where   business_group_id = p_business_group_id
             and    trunc(sysdate) between nvl(effective_start_date,trunc(sysdate))
                                and nvl(effective_end_date,trunc(sysdate))
             and     ler_id = p_val_1;
Line: 1280

cursor ci is select  pgm_id
             from    ben_pgm_f
             where   business_group_id = p_business_group_id
             and     trunc(sysdate) between nvl(effective_start_date,trunc(sysdate))
                             and nvl(effective_end_date,trunc(sysdate))
             and     name  = p_meaning ;
Line: 1288

cursor cj is select  pl_id
             from    ben_pl_f
             where   business_group_id = p_business_group_id
             and     trunc(sysdate) between nvl(effective_start_date,trunc(sysdate))
                             and nvl(effective_end_date,trunc(sysdate))
             and     name  = p_meaning ;
Line: 1295

cursor ck is select  rptg_grp_id
             from    ben_rptg_grp_v
             where   business_group_id = p_business_group_id
             and      name  = p_meaning  ;
Line: 1300

cursor cl is select lookup_code
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_CRIT_MISC'
             and     meaning = p_meaning;
Line: 1306

cursor cm is select  pl_typ_id
             from    ben_pl_typ_f
             where   business_group_id = p_business_group_id
             and     trunc(sysdate) between nvl(effective_start_date,trunc(sysdate))
                             and nvl(effective_end_date,trunc(sysdate))
             and     name  = p_meaning;
Line: 1314

cursor cn is select   yr_perd_id
              from    ben_yr_perd
              where   business_group_id = p_business_group_id
              and     start_date||' - '||end_date  = p_meaning;
Line: 1319

cursor co is select lookup_code
              from   hr_lookups
              where  lookup_type = 'BEN_EXT_CRIT_MISC'
              and    meaning = p_meaning;
Line: 1324

cursor cp is select lookup_code
              from   hr_lookups
              where  lookup_type = 'BEN_EXT_SUSPEND'
              and    meaning = p_meaning;
Line: 1329

cursor cq is select lookup_code
             from   hr_lookups
             where  lookup_type = 'BEN_ENRT_RSLT_MTHD'
             and    meaning = p_meaning;
Line: 1334

cursor cr is select lookup_code
             from   hr_lookups
             where  lookup_type = 'BEN_PRTT_ENRT_RSLT_STAT'
             and    meaning = p_meaning;
Line: 1339

cursor cs is select lookup_code
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    meaning = p_meaning;
Line: 1344

cursor ct is select  actn_typ_id
             from    ben_actn_typ
             where   name  = p_meaning ;
Line: 1350

cursor cu is select lookup_code
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    meaning = p_meaning
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 1360

cursor cv is select lookup_code
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    meaning = p_meaning
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 1368

cursor cw is select lookup_code
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_CHG_EVT'
             and    meaning = p_meaning
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
              ;
Line: 1375

cursor cep is select event_group_id
             from   pay_event_groups
             where  event_group_name  = p_meaning
             and     nvl(business_group_id,nvl(p_business_group_id,-1))
                      = nvl(p_business_group_id,-1)
              ;
Line: 1382

cursor cx is select user_id
             from   fnd_user
             where  user_name  = p_meaning
             and    trunc(sysdate) between nvl(start_date, trunc(sysdate))
                                 and nvl(end_date, trunc(sysdate));
Line: 1388

cursor cy is select lookup_code
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    meaning = p_meaning
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 1396

cursor cz is select lookup_code
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    meaning = p_meaning
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 1404

cursor caa is select lookup_code
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    meaning = p_meaning
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 1412

cursor cab is select lookup_code
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    meaning = p_meaning
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 1421

cursor cac is select lookup_code
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    meaning = p_meaning
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 1429

cursor cad is select lookup_code
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    meaning = p_meaning
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 1437

cursor cae is select lookup_code
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    meaning = p_meaning
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 1445

cursor caf is select lookup_code
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    meaning = p_meaning
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 1453

cursor cag is select lookup_code
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    meaning = p_meaning
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 1462

cursor cah is select lookup_code
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_DT'
             and    meaning = p_meaning
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 1473

  select lookup_code
  from   hr_lookups
  where  lookup_type = 'BEN_EXT_DT'
  and    meaning = p_meaning;
Line: 1480

  select lookup_code
  from   hr_lookups
  where  lookup_type = 'BEN_EXT_DT'
  and    meaning = p_meaning;
Line: 1487

  select lookup_code
  from   hr_lookups
  where  lookup_type = 'BEN_EXT_CHG_EVT'
  and    meaning = p_meaning;
Line: 1494

  select lookup_code
  from   hr_lookups
  where  lookup_type = 'BEN_EXT_CHG_EVT'
  and    meaning = p_meaning;
Line: 1501

  select lookup_code
  from   hr_lookups
  where  lookup_type = 'BEN_EXT_TTL_COND_OPER'
  and    meaning = p_meaning; --p_oper_cd;
Line: 1508

      select lookup_code
      from   HR_LOOKUPS
      where  LOOKUP_CODE = p_crit_typ_cd
      and    lookup_type = 'BEN_EXT_CRIT_TYP'
      and    substr(lookup_code, 1, 1) = 'C'
      and    lookup_code not in ('CBU')
      and    trunc(sysdate) between
             nvl(start_date_active, trunc(sysdate))
      and    nvl(end_date_active, trunc(sysdate))
      ;
Line: 1521

    select lookup_code
    from   hr_lookups
    where  lookup_type = 'BEN_EXT_ASMT_TO_USE'
    and    meaning = p_meaning;    --  code for the criteria Person Assignment To Use
Line: 1529

    select lookup_code
    from   hr_lookups
    where  lookup_type = 'BEN_ENRT_MTHD'
    and    meaning = p_meaning;  --  value for the criteria Enrollment method
Line: 1536

    select ENRT_PERD_ID
    from  ben_enrt_perd enp ,
          ben_pl_f  pl,
          ben_popl_enrt_typ_cycl_f pet
    where to_char(enp.strt_dt, 'DD-MON-RRRR') || ' - ' || to_char( enp.end_dt, 'DD-MON-RRRR')  = p_meaning
    and pl.name = p_parent_meaning
    and pl.pl_id = pet.pl_id
    and pet.popl_enrt_typ_cycl_id  = enp.popl_enrt_typ_cycl_id
    and     trunc(sysdate) between nvl(pl.effective_start_date,trunc(sysdate))
                             and nvl(pl.effective_end_date,trunc(sysdate))
    and enp.business_group_id = p_business_group_id
   ;
Line: 1552

   select lookup_code
    from   hr_lookups
    where lookup_type = p_type
    and   meaning  = p_meaning
   ;  --
Line: 1559

  select job_id
  from  per_jobs_vl job
  where  name  =   p_meaning
  and business_group_id = p_business_group_id
   ;
Line: 1566

  select business_group_id
  from  per_business_groups_perf
  where name  =    p_meaning
   ;
Line: 1572

  select position_id
  from   HR_ALL_POSITIONS_F  job
  where name  =  p_meaning
  and trunc(sysdate) between
      EFFECTIVE_START_DATE
      and   EFFECTIVE_END_DATE
  and business_group_id = p_business_group_id
  ;
Line: 1583

 select ASSIGNMENT_SET_ID  from
 hr_assignment_sets
 where ASSIGNMENT_SET_NAME  = p_meaning
  and  nvl(business_group_id,nvl(p_business_group_id,-1))
       = nvl(p_business_group_id,-1)
 ;
Line: 1907

                        ,p_last_update_vc in VARCHAR2
                        ,p_last_update_date OUT NOCOPY DATE
                        ,p_last_updated_by  OUT NOCOPY VARCHAR2
                        ,p_legislation_code IN OUT NOCOPY VARCHAR2
                        ,p_business_group   in   VARCHAR2
                        ,p_business_group_id out NOCOPY  NUMBER
                        ) is
begin
  p_last_update_date := TO_DATE(p_last_update_vc, 'YYYY/MM/DD HH24:MI:SS');
Line: 1918

     p_last_updated_by := 1;
Line: 1920

     p_last_updated_by := 0;
Line: 1957

                       ,p_last_update_date IN VARCHAR2
                       ,p_legislation_code IN VARCHAR2
                       ,p_business_group   in VARCHAR2
                       ) is
--
l_ext_file_id           NUMBER;
Line: 1968

l_last_update_date      DATE;
Line: 1969

l_last_updated_by       NUMBER;
Line: 1983

                ,p_last_update_vc    => p_last_update_date
                ,p_last_update_date  => l_last_update_date
                ,p_last_updated_by   => l_last_updated_by
                ,p_legislation_code  => l_legislation_code
                ,p_business_group    => p_business_group
                ,p_business_group_id => l_new_business_group_id );
Line: 1990

        SELECT ext_file_id ,
               OBJECT_VERSION_NUMBER ,
                XML_TAG_NAME
        INTO   l_ext_file_id ,
               l_ovn,
               l_xml_tag_name
        FROM   ben_ext_file
        WHERE  name             = p_file_name
           AND    nvl(l_new_business_group_id, -1) = nvl(business_group_id , -1)
           AND    nvl(legislation_code,'~NULL~')   = nvl(l_legislation_code,'~NULL~');
Line: 2002

       select erf.ext_rcd_in_file_id,
              rcd.ext_rcd_id
         into l_ext_rcd_in_file_id  ,
              l_ext_rcd_id
         from ben_Ext_rcd_in_file erf,
              ben_Ext_rcd  rcd
        where rcd.name =  p_ext_group_record
          and rcd.ext_rcd_id = erf.ext_rcd_id
          and erf.ext_file_id = l_ext_file_id
        ;
Line: 2014

       select  der.Ext_data_elmt_in_rcd_id
         into  l_ext_data_elmt_in_rcd_id1
          from ben_Ext_data_elmt elmt  ,
               ben_Ext_data_elmt_in_rcd der
          where der.ext_rcd_id = l_Ext_rcd_id
            and elmt.ext_data_elmt_id =  der.ext_data_elmt_id
            and elmt.name   = p_ext_group_elmt1
       ;
Line: 2025

          select  der.Ext_data_elmt_in_rcd_id
            into  l_ext_data_elmt_in_rcd_id2
             from ben_Ext_data_elmt elmt  ,
                  ben_Ext_data_elmt_in_rcd der
             where der.ext_rcd_id = l_Ext_rcd_id
               and elmt.ext_data_elmt_id =  der.ext_data_elmt_id
               and elmt.name   = p_ext_group_elmt2
          ;
Line: 2067

                       ,p_last_update_date IN VARCHAR2
                       ,p_legislation_code IN VARCHAR2
                       ,p_business_group   in VARCHAR2
                       ,p_xml_tag_name     in VARCHAR2
                       ,p_ext_group_record in  VARCHAR2
                       ,p_ext_group_elmt1  in  VARCHAR2
                       ,p_ext_group_elmt2  in  VARCHAR2
                       ) is
--
l_ext_file_id           NUMBER;
Line: 2080

l_last_update_date      DATE;
Line: 2081

l_last_updated_by       NUMBER;
Line: 2101

  SELECT USERENV('SESSIONID')
  INTO   l_sessionid
  FROM   DUAL;
Line: 2120

                ,p_last_update_vc    => p_last_update_date
                ,p_last_update_date  => l_last_update_date
                ,p_last_updated_by   => l_last_updated_by
                ,p_legislation_code  => l_legislation_code
                ,p_business_group    => p_business_group
                ,p_business_group_id => l_new_business_group_id );
Line: 2127

    SELECT ext_file_id ,
           OBJECT_VERSION_NUMBER ,
            XML_TAG_NAME
    INTO   l_ext_file_id ,
           l_ovn,
           l_xml_tag_name
    FROM   ben_ext_file
    WHERE  name             = p_file_name
       AND    nvl(l_new_business_group_id, -1) = nvl(business_group_id , -1)
       AND    nvl(legislation_code,'~NULL~')   = nvl(l_legislation_code,'~NULL~');
Line: 2165

                   ,p_last_update_date      => l_last_update_date
                   ,p_creation_date         => l_last_update_date
                   ,p_last_update_login     => 0
                   ,p_created_by            => l_last_updated_by
                   ,p_last_updated_by       => l_last_updated_by
                   ,p_object_version_number => l_object_version_number
                   ,p_xml_tag_name          => p_xml_tag_name
                   );
Line: 2181

                     ,p_last_update_date IN VARCHAR2
                     ,p_rcd_type_cd      IN VARCHAR2
                     ,p_low_lvl_cd       IN VARCHAR2
                     ,p_legislation_code IN VARCHAR2
                     ,p_business_group   IN VARCHAR2
                     ,p_xml_tag_name     in VARCHAR2
                     ) IS
--
l_ext_rcd_id number;
Line: 2193

l_last_update_date      DATE;
Line: 2194

l_last_updated_by        NUMBER;
Line: 2204

                ,p_last_update_vc    => p_last_update_date
                ,p_last_update_date  => l_last_update_date
                ,p_last_updated_by   => l_last_updated_by
                ,p_legislation_code  => l_legislation_code
                ,p_business_group    => p_business_group
                ,p_business_group_id => l_new_business_group_id );
Line: 2212

    SELECT EXT_RCD_ID,
           OBJECT_VERSION_NUMBER,
           XML_TAG_NAME,
           RCD_TYPE_CD ,
           LOW_LVL_CD
    INTO   l_ext_rcd_id,
           l_ovn,
           l_xml_tag_name,
           l_RCD_TYPE_CD,
           l_LOW_LVL_CD
    FROM   ben_ext_rcd
    WHERE  name             = p_record_name
    AND    nvl(l_new_business_group_id, -1) = nvl(business_group_id , -1)
    AND    nvl(legislation_code,'~NULL~') =  nvl(l_legislation_code,'~NULL~');
Line: 2234

      ben_xrc_upd.upd(p_effective_date       => l_last_update_date
                    ,p_ext_rcd_id            => l_ext_rcd_id
                    ,p_name                  => p_record_name
                    ,p_rcd_type_cd           => p_rcd_type_cd
                    ,p_low_lvl_cd            => p_low_lvl_cd
                    ,p_business_group_id     => l_new_business_group_id
                    ,p_legislation_code      => l_legislation_code
                    ,p_object_version_number => l_ovn
                    ,p_xml_tag_name          => p_xml_tag_name   );
Line: 2248

     ben_xrc_ins.ins(p_effective_date        => l_last_update_date
                    ,p_ext_rcd_id            => l_ext_rcd_id
                    ,p_name                  => p_record_name
                    ,p_rcd_type_cd           => p_rcd_type_cd
                    ,p_low_lvl_cd            => p_low_lvl_cd
                    ,p_business_group_id     => l_new_business_group_id
                    ,p_legislation_code      => l_legislation_code
                    ,p_last_update_date      => l_last_update_date
                    ,p_creation_date         => l_last_update_date
                    ,p_last_update_login     => 0
                    ,p_created_by            => l_last_updated_by
                    ,p_last_updated_by       => l_last_updated_by
                    ,p_object_version_number => l_object_version_number
                    ,p_xml_tag_name          => p_xml_tag_name   );
Line: 2273

                             ,p_last_update_date     IN VARCHAR2
                             ,p_rqd_flag             IN VARCHAR2 default 'N'
                             ,p_hide_flag            IN VARCHAR2 default 'N'
                             ,p_CHG_RCD_UPD_FLAG     IN VARCHAR2 default 'N'
                             ,p_seq_num              IN VARCHAR2
                             ,p_sprs_cd              IN VARCHAR2
                             ,p_any_or_all_cd        IN VARCHAR2 default 'N'
                             ,p_sort1_element        IN VARCHAR2 DEFAULT NULL
                             ,p_sort2_element        IN VARCHAR2 DEFAULT NULL
                             ,p_sort3_element        IN VARCHAR2 DEFAULT NULL
                             ,p_sort4_element        IN VARCHAR2 DEFAULT NULL
                             ,p_legislation_code     IN VARCHAR2
                             ,p_business_group       in VARCHAR2
                             ) IS
--
l_ext_file_id           NUMBER;
Line: 2294

l_last_update_date      DATE;
Line: 2295

l_last_updated_by       NUMBER;
Line: 2310

 SELECT EXT_DATA_ELMT_IN_RCD_ID
 from   ben_ext_data_elmt_in_rcd eir , ben_ext_data_elmt elmt
 where  eir.ext_rcd_id =  c_ext_rcd_id
 and  eir.ext_data_elmt_id = elmt.ext_data_elmt_id
 and  elmt.name    =   c_sort_element
 and  NVL(eir.legislation_code,'~NULL~') =  NVL(c_legislation_code,'~NULL~')
 AND  nvl( c_new_business_group_id, -1) = nvl(eir.business_group_id , -1)
 ;
Line: 2328

                ,p_last_update_vc    => p_last_update_date
                ,p_last_update_date  => l_last_update_date
                ,p_last_updated_by   => l_last_updated_by
                ,p_legislation_code  => l_legislation_code
                ,p_business_group    => p_business_group
                ,p_business_group_id => l_new_business_group_id );
Line: 2337

   SELECT ext_file_id
   INTO   l_ext_file_id
   FROM   ben_ext_file
   WHERE name = p_file_name
   AND NVL(legislation_code,'~NULL~') =  NVL(l_legislation_code,'~NULL~')
    AND    nvl(l_new_business_group_id, -1) = nvl(business_group_id , -1);
Line: 2351

   SELECT ext_rcd_id
   INTO   l_ext_rcd_id
   FROM   ben_ext_rcd
   WHERE name = p_parent_record_name
   AND NVL(legislation_code,'~NULL~') =  NVL(l_legislation_code,'~NULL~')
   AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1);
Line: 2424

    SELECT ext_rcd_in_file_id,  object_version_number
    INTO   l_ext_rcd_in_file_id,l_object_version_number
    FROM   ben_ext_rcd_in_file
    WHERE  ext_file_id             = l_ext_file_id
    AND    ext_rcd_id              = l_ext_rcd_id
    AND    seq_num                 = p_seq_num
    AND    NVL(legislation_code,'~NULL~')    = NVL(l_legislation_code,'~NULL~')
    AND    NVL( l_new_business_group_id, -1) = NVL(business_group_id , -1);
Line: 2434

        (p_effective_date            => l_last_update_date
        ,p_ext_rcd_in_file_id        => l_ext_rcd_in_file_id
        ,p_seq_num                   => p_seq_num
        ,p_sprs_cd                   => p_sprs_cd
        ,p_ext_rcd_id                => l_ext_rcd_id
        ,p_ext_file_id               => l_ext_file_id
        ,p_business_group_id         => l_new_business_group_id
        ,p_legislation_code          => l_legislation_code
        ,p_last_update_date          => l_last_update_date
        ,p_creation_date             => l_last_update_date
        ,p_last_updated_by           => l_last_updated_by
        ,p_last_update_login         => 0
        ,p_created_by                => l_last_updated_by
        ,p_object_version_number     => l_object_version_number
        ,p_any_or_all_cd             => p_any_or_all_cd
        ,p_hide_flag                 => p_hide_flag
        ,p_rqd_flag                  => p_rqd_flag
        ,p_CHG_RCD_UPD_FLAG          => nvl(p_CHG_RCD_UPD_FLAG,'N')
        ,p_sort1_data_elmt_in_rcd_id => l_sort1_elm_in_rcd_id
        ,p_sort2_data_elmt_in_rcd_id => l_sort2_elm_in_rcd_id
        ,p_sort3_data_elmt_in_rcd_id => l_sort3_elm_in_rcd_id
        ,p_sort4_data_elmt_in_rcd_id => l_sort4_elm_in_rcd_id
         );
Line: 2461

      /*  If the Same Sequence Find Delete the Record for the Sequence  */
     declare
       cursor c1 (c_ext_rcd_in_file_id number) is
       select 'x'
       from ben_Ext_where_clause
       where ext_rcd_in_file_id = c_ext_rcd_in_file_id ;
Line: 2469

       select 'x'
       from ben_ext_incl_chg
       where ext_rcd_in_file_id = c_ext_rcd_in_file_id ;
Line: 2475

        select object_version_number,ext_rcd_in_file_id
          into l_object_version_number,l_rcd_in_file_id
        from ben_ext_rcd_in_file
        where  ext_file_id             = l_ext_file_id
         and   ext_rcd_id              <> nvl(l_ext_rcd_id,-1)
         and   seq_num                 = p_seq_num
         AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1) ;
Line: 2482

         /*  if the sequence found delete the old  reco   */
         -- this delete may error if it has child
         -- **** Before apply any delete keep in mind that every upload  recrod_in_file is
         --      called twice , one for the record_in_file and one for the sort order
         --      this is done in such way to keep the backward copatibility ****

         if  ( l_new_business_group_id is null or g_override = 'Y' ) and
             l_sort1_elm_in_rcd_id is null and
             l_sort2_elm_in_rcd_id is null and
             l_sort4_elm_in_rcd_id is null  then

             -- make sure there us no wheere clause child
             open c1(l_rcd_in_file_id) ;
Line: 2502

                    ben_xrf_del.del(p_effective_date        => l_last_update_date
                          ,p_ext_rcd_in_file_id    => l_rcd_in_file_id
                          ,p_legislation_code      => l_legislation_code
                          ,p_object_version_number => l_object_version_number);
Line: 2518

     /* Deleteion part is over for duplicate seq number */

     ben_xrf_ins.ins(p_effective_date        => l_last_update_date
                    ,p_ext_rcd_in_file_id    => l_rcd_in_file_id
                    ,p_legislation_code      => l_legislation_code
                    ,p_ext_rcd_id            => l_ext_rcd_id
                    ,p_ext_file_id           => l_ext_file_id
                    ,p_business_group_id     => l_new_business_group_id
                    ,p_seq_num               => p_seq_num
                    ,p_sprs_cd               => p_sprs_cd
                    ,p_any_or_all_cd         => p_any_or_all_cd
                    ,p_hide_flag             => p_hide_flag
                    ,p_rqd_flag              => p_rqd_flag
                    ,p_chg_rcd_upd_flag      => nvl(p_chg_rcd_upd_flag,'N')
                    ,p_sort1_data_elmt_in_rcd_id => l_sort1_elm_in_rcd_id
                    ,p_sort2_data_elmt_in_rcd_id => l_sort2_elm_in_rcd_id
                    ,p_sort3_data_elmt_in_rcd_id => l_sort3_elm_in_rcd_id
                    ,p_sort4_data_elmt_in_rcd_id => l_sort4_elm_in_rcd_id
                    ,p_last_update_date      => l_last_update_date
                    ,p_creation_date         => l_last_update_date
                    ,p_last_update_login     => 0
                    ,p_created_by            => l_last_updated_by
                    ,p_last_updated_by       => l_last_updated_by
                    ,p_object_version_number => l_object_version_number);
Line: 2554

                            ,p_last_update_date    IN VARCHAR2
                            ,p_ttl_fnctn_cd        IN VARCHAR2
                            ,p_ttl_cond_oper_cd    IN VARCHAR2
                            ,p_ttl_cond_val        IN VARCHAR2
                            ,p_data_elmt_typ_cd    IN VARCHAR2
                            ,p_data_elmt_rl        IN VARCHAR2
                            ,p_frmt_mask_cd        IN VARCHAR2
                            ,p_string_val          IN VARCHAR2
                            ,p_dflt_val            IN VARCHAR2
                            ,p_max_length_num      IN VARCHAR2
                            ,p_just_cd             IN VARCHAR2
                            ,p_legislation_code    IN VARCHAR2
                            ,p_business_group      in varchar2
                            ,p_xml_tag_name        in VARCHAR2
                            ,p_defined_balance     in VARCHAR2 DEFAULT NULL
                            ) IS


--
  l_ext_field_id          NUMBER;
Line: 2581

  l_last_update_date      DATE;
Line: 2582

  l_last_updated_by       NUMBER;
Line: 2591

                ,l_last_update_date in date ) IS
SELECT formula_id
FROM   ff_formulas_f
WHERE formula_name = p_data_elmt_rl
AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
AND   nvl(l_last_update_date,trunc(sysdate)) BETWEEN effective_start_date and effective_end_date ;
Line: 2603

                ,p_last_update_vc    => p_last_update_date
                ,p_last_update_date  => l_last_update_date
                ,p_last_updated_by   => l_last_updated_by
                ,p_legislation_code  => l_legislation_code
                ,p_business_group    => p_business_group
                ,p_business_group_id => l_new_business_group_id );
Line: 2628

           SELECT ext_data_elmt_id , object_version_number,string_val
           INTO l_tmp_id , l_tmp_ovn,l_string
           FROM ben_ext_data_elmt
           WHERE name = p_data_elemt_name
           AND   NVL(legislation_code,'~NULL~') =  NVL(l_legislation_code,'~NULL~')
            AND    ( ( nvl(l_new_business_group_id, -1) = nvl(business_group_id , -1)) or
           ( p_business_group is null and business_group_id is null ) ) ;
Line: 2665

                    ,p_last_update_date      => l_last_update_date
                    ,p_creation_date         => l_last_update_date
                    ,p_last_update_login     => 0
                    ,p_created_by            => l_last_updated_by
                    ,p_last_updated_by       => l_last_updated_by
                    ,p_object_version_number => l_tmp_ovn
                    ,p_xml_tag_name          => p_xml_tag_name );
Line: 2692

                    ,p_last_update_date      => l_last_update_date
                    ,p_creation_date         => l_last_update_date
                    ,p_last_update_login     => 0
                    ,p_created_by            => l_last_updated_by
                    ,p_last_updated_by       => l_last_updated_by
                    ,p_object_version_number => l_object_version_number
                    ,p_xml_tag_name         => p_xml_tag_name );
Line: 2704

           SELECT ext_data_elmt_id , object_version_number,string_val
           INTO l_tmp_id , l_tmp_ovn,l_string
           FROM ben_ext_data_elmt
           WHERE name = p_data_elemt_name
            AND    ( ( nvl(l_new_business_group_id, -1) = nvl(business_group_id , -1)) or
           ( p_business_group is null and business_group_id is null ) )
           --AND   nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
           AND   NVL(legislation_code,'~NULL~') =  NVL(l_legislation_code,'~NULL~');
Line: 2723

                     p_effective_date            => l_last_update_date
                    ,p_ext_data_elmt_id          => l_tmp_id
                    ,p_ttl_fnctn_cd              => p_ttl_fnctn_cd
                    ,p_ttl_cond_oper_cd          => p_ttl_cond_oper_cd
                    ,p_ttl_cond_val              => p_ttl_cond_val
                    ,p_data_elmt_typ_cd          => p_data_elmt_typ_cd
                    ,p_frmt_mask_cd              => p_frmt_mask_cd
                    ,p_string_val                => p_string_val
                    ,p_dflt_val                  => p_dflt_val
                    ,p_max_length_num            => p_max_length_num
                    ,p_just_cd                   => p_just_cd
                    ,p_legislation_code          => l_legislation_code
                    ,p_business_group_id         => l_new_business_group_id
                    ,p_last_update_date          => l_last_update_date
                    ,p_creation_date             => l_last_update_date
                    ,p_last_update_login         => 0
                    ,p_created_by                => l_last_updated_by
                    ,p_last_updated_by           => l_last_updated_by
                    ,p_object_version_number     => l_tmp_ovn
                    ,p_xml_tag_name              => p_xml_tag_name );
Line: 2747

              ben_xel_ins.ins(p_effective_date        => l_last_update_date
                    ,p_ext_data_elmt_id      => l_ext_data_elmt_id
                    ,p_name                  => p_data_elemt_name
                    ,p_ttl_fnctn_cd          => p_ttl_fnctn_cd
                    ,p_ttl_cond_oper_cd      => p_ttl_cond_oper_cd
                    ,p_ttl_cond_val          => p_ttl_cond_val
                    ,p_data_elmt_typ_cd      => p_data_elmt_typ_cd
                    ,p_ext_fld_id            => null
                    ,p_data_elmt_rl          => null
                    ,p_frmt_mask_cd          => p_frmt_mask_cd
                    ,p_string_val            => p_string_val
                    ,p_dflt_val              => p_dflt_val
                    ,p_max_length_num        => p_max_length_num
                    ,p_just_cd               => p_just_cd
                    ,p_legislation_code      => l_legislation_code
                    ,p_business_group_id     => l_new_business_group_id
                    ,p_last_update_date      => l_last_update_date
                    ,p_creation_date         => l_last_update_date
                    ,p_last_update_login     => 0
                    ,p_created_by            => l_last_updated_by
                    ,p_last_updated_by       => l_last_updated_by
                    ,p_object_version_number => l_object_version_number
                    ,p_xml_tag_name          => p_xml_tag_name );
Line: 2776

           SELECT ext_rcd_id
           INTO   l_ext_rcd_id
           FROM   ben_ext_rcd
           WHERE  name = p_parent_record_name
           AND   nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
           AND   NVL(legislation_code,'~NULL~') =  NVL(l_legislation_code,'~NULL~');
Line: 2792

           SELECT ext_data_elmt_id
           INTO   l_parent_data_elmt_id
           FROM   ben_ext_data_elmt
           WHERE  name = p_parent_data_element
            AND    ( ( nvl(l_new_business_group_id, -1) = nvl(business_group_id , -1)) or
           ( p_business_group is null and business_group_id is null ) )
           --AND   nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
           AND   NVL(legislation_code,'~NULL~') =  NVL(l_legislation_code,'~NULL~');
Line: 2812

        SELECT ext_data_elmt_id , object_version_number,string_val
        INTO l_tmp_id , l_tmp_ovn ,l_string
        FROM ben_ext_data_elmt
        WHERE name = p_data_elemt_name
         AND    ( ( nvl(l_new_business_group_id, -1) = nvl(business_group_id , -1)) or
           ( p_business_group is null and business_group_id is null ) )
        AND   NVL(legislation_code,'~NULL~') =  NVL(l_legislation_code,'~NULL~');
Line: 2829

                     p_effective_date            => l_last_update_date
                    ,p_ext_data_elmt_id          => l_tmp_id
                    ,p_ttl_cond_ext_data_elmt_id => l_ext_rcd_id
                    ,p_ttl_sum_ext_data_elmt_id  => l_parent_data_elmt_id
                    ,p_ttl_fnctn_cd              => p_ttl_fnctn_cd
                    ,p_ttl_cond_oper_cd          => p_ttl_cond_oper_cd
                    ,p_ttl_cond_val              => p_ttl_cond_val
                    ,p_data_elmt_typ_cd          => p_data_elmt_typ_cd
                    ,p_frmt_mask_cd              => p_frmt_mask_cd
                    ,p_dflt_val                  => p_dflt_val
                    ,p_max_length_num            => p_max_length_num
                    ,p_just_cd                   => p_just_cd
                    ,p_legislation_code          => l_legislation_code
                    ,p_business_group_id         => l_new_business_group_id
                    ,p_last_update_date          => l_last_update_date
                    ,p_creation_date             => l_last_update_date
                    ,p_last_update_login         => 0
                    ,p_created_by                => l_last_updated_by
                    ,p_last_updated_by           => l_last_updated_by
                    ,p_object_version_number     => l_tmp_ovn
                    ,p_xml_tag_name              => p_xml_tag_name);
Line: 2853

        ben_xel_ins.ins(p_effective_date         => l_last_update_date
                    ,p_ext_data_elmt_id          => l_ext_data_elmt_id
                    ,p_name                      => p_data_elemt_name
                    ,p_ttl_cond_ext_data_elmt_id => l_ext_rcd_id
                    ,p_ttl_sum_ext_data_elmt_id  => l_parent_data_elmt_id
                    ,p_ttl_fnctn_cd              => p_ttl_fnctn_cd
                    ,p_ttl_cond_oper_cd          => p_ttl_cond_oper_cd
                    ,p_ttl_cond_val              => p_ttl_cond_val
                    ,p_data_elmt_typ_cd          => p_data_elmt_typ_cd
                    ,p_ext_fld_id                => NULL
                    ,p_data_elmt_rl              => NULL
                    ,p_frmt_mask_cd              => p_frmt_mask_cd
                    ,p_string_val                => NULL
                    ,p_dflt_val                  => p_dflt_val
                    ,p_max_length_num            => p_max_length_num
                    ,p_just_cd                   => p_just_cd
                    ,p_legislation_code          => l_legislation_code
                    ,p_business_group_id         => l_new_business_group_id
                    ,p_last_update_date          => l_last_update_date
                    ,p_creation_date             => l_last_update_date
                    ,p_last_update_login         => 0
                    ,p_created_by                => l_last_updated_by
                    ,p_last_updated_by           => l_last_updated_by
                    ,p_object_version_number     => l_object_version_number
                    ,p_xml_tag_name              => p_xml_tag_name );
Line: 2886

           select c.defined_balance_id ID
           from  pay_defined_balances c ,
                 pay_balance_types    a ,
                 pay_balance_dimensions b
           where
                 a.balance_type_id = c.balance_type_id
             and c.balance_dimension_id = b.balance_dimension_id
             and b.dimension_level in ( 'PER' ,'ASG')
             and a.balance_name || '   [ ' || b.dimension_name || ' ]' = p_defined_balance
             AND   ( NVL(a.legislation_code,'~NULL~') =  NVL(l_legislation_code,'~NULL~') or l_legislation_code is null )
             AND  ( ( nvl(l_new_business_group_id, -1) = nvl(a.business_group_id , nvl(l_new_business_group_id, -1))) or
                  ( p_business_group is null and a.business_group_id is null ) ) ;
Line: 2913

           SELECT ext_data_elmt_id , object_version_number ,string_val
           INTO    l_tmp_id , l_tmp_ovn,l_string
           FROM   ben_ext_data_elmt
           WHERE name = p_data_elemt_name
            AND    ( ( nvl(l_new_business_group_id, -1) = nvl(business_group_id , -1)) or
             ( p_business_group is null and business_group_id is null ) )
           AND    NVL(legislation_code,'~NULL~') =  NVL(l_legislation_code,'~NULL~');
Line: 2930

                     p_effective_date            => l_last_update_date
                    ,p_ext_data_elmt_id          => l_tmp_id
                    ,p_ttl_fnctn_cd              => p_ttl_fnctn_cd
                    ,p_ttl_cond_oper_cd          => p_ttl_cond_oper_cd
                    ,p_ttl_cond_val              => p_ttl_cond_val
                    ,p_data_elmt_typ_cd          => p_data_elmt_typ_cd
                    ,p_ext_fld_id                => l_ext_field_id
                    ,p_string_val                => p_string_val
                    ,p_frmt_mask_cd              => p_frmt_mask_cd
                    ,p_dflt_val                  => p_dflt_val
                    ,p_max_length_num            => p_max_length_num
                    ,p_just_cd                   => p_just_cd
                    ,p_legislation_code          => l_legislation_code
                    ,p_business_group_id         => l_new_business_group_id
                    ,p_last_update_date          => l_last_update_date
                    ,p_creation_date             => l_last_update_date
                    ,p_last_update_login         => 0
                    ,p_created_by                => l_last_updated_by
                    ,p_last_updated_by           => l_last_updated_by
                    ,p_object_version_number     => l_tmp_ovn
                    ,p_defined_balance_id        => l_defined_balance_id
                    ,p_xml_tag_name             => p_xml_tag_name);
Line: 2957

             ben_xel_ins.ins(p_effective_date        => l_last_update_date
                    ,p_ext_data_elmt_id      => l_ext_data_elmt_id
                    ,p_name                  => p_data_elemt_name
                    ,p_ttl_fnctn_cd          => p_ttl_fnctn_cd
                    ,p_ttl_cond_oper_cd      => p_ttl_cond_oper_cd
                    ,p_ttl_cond_val          => p_ttl_cond_val
                    ,p_data_elmt_typ_cd      => p_data_elmt_typ_cd
                    ,p_ext_fld_id            => l_ext_field_id
                    ,p_data_elmt_rl          => null -- p_data_elmt_rl
                    ,p_frmt_mask_cd          => p_frmt_mask_cd
                    ,p_string_val            => p_string_val
                    ,p_dflt_val              => p_dflt_val
                    ,p_max_length_num        => p_max_length_num
                    ,p_just_cd               => p_just_cd
                    ,p_legislation_code      => l_legislation_code
                    ,p_business_group_id     => l_new_business_group_id
                    ,p_last_update_date      => l_last_update_date
                    ,p_creation_date         => l_last_update_date
                    ,p_last_update_login     => 0
                    ,p_created_by            => l_last_updated_by
                    ,p_last_updated_by       => l_last_updated_by
                    ,p_object_version_number => l_object_version_number
                    ,p_defined_balance_id    => l_defined_balance_id
                    ,p_xml_tag_name          => p_xml_tag_name);
Line: 2988

        SELECT ext_fld_id
        INTO   l_ext_field_id
        FROM   ben_ext_fld
        WHERE  short_name = p_field_short_name;
Line: 3000

         SELECT ext_data_elmt_id , object_version_number ,string_val
         INTO    l_tmp_id , l_tmp_ovn,l_string
         FROM   ben_ext_data_elmt
         WHERE name = p_data_elemt_name
          AND    ( ( nvl(l_new_business_group_id, -1) = nvl(business_group_id , -1)) or
           ( p_business_group is null and business_group_id is null ) )
         AND    NVL(legislation_code,'~NULL~') =  NVL(l_legislation_code,'~NULL~');
Line: 3017

                     p_effective_date            => l_last_update_date
                    ,p_ext_data_elmt_id          => l_tmp_id
                    ,p_ttl_fnctn_cd              => p_ttl_fnctn_cd
                    ,p_ttl_cond_oper_cd          => p_ttl_cond_oper_cd
                    ,p_ttl_cond_val              => p_ttl_cond_val
                    ,p_data_elmt_typ_cd          => p_data_elmt_typ_cd
                    ,p_ext_fld_id                => l_ext_field_id
                    ,p_string_val                => p_string_val
                    ,p_frmt_mask_cd              => p_frmt_mask_cd
                    ,p_dflt_val                  => p_dflt_val
                    ,p_max_length_num            => p_max_length_num
                    ,p_just_cd                   => p_just_cd
                    ,p_legislation_code          => l_legislation_code
                    ,p_business_group_id         => l_new_business_group_id
                    ,p_last_update_date          => l_last_update_date
                    ,p_creation_date             => l_last_update_date
                    ,p_last_update_login         => 0
                    ,p_created_by                => l_last_updated_by
                    ,p_last_updated_by           => l_last_updated_by
                    ,p_object_version_number     => l_tmp_ovn
                    ,p_xml_tag_name             => p_xml_tag_name);
Line: 3043

             ben_xel_ins.ins(p_effective_date        => l_last_update_date
                    ,p_ext_data_elmt_id      => l_ext_data_elmt_id
                    ,p_name                  => p_data_elemt_name
                    ,p_ttl_fnctn_cd          => p_ttl_fnctn_cd
                    ,p_ttl_cond_oper_cd      => p_ttl_cond_oper_cd
                    ,p_ttl_cond_val          => p_ttl_cond_val
                    ,p_data_elmt_typ_cd      => p_data_elmt_typ_cd
                    ,p_ext_fld_id            => l_ext_field_id
                    ,p_data_elmt_rl          => null -- p_data_elmt_rl
                    ,p_frmt_mask_cd          => p_frmt_mask_cd
                    ,p_string_val            => p_string_val
                    ,p_dflt_val              => p_dflt_val
                    ,p_max_length_num        => p_max_length_num
                    ,p_just_cd               => p_just_cd
                    ,p_legislation_code      => l_legislation_code
                    ,p_business_group_id     => l_new_business_group_id
                    ,p_last_update_date      => l_last_update_date
                    ,p_creation_date         => l_last_update_date
                    ,p_last_update_login     => 0
                    ,p_created_by            => l_last_updated_by
                    ,p_last_updated_by       => l_last_updated_by
                    ,p_object_version_number => l_object_version_number
                    ,p_xml_tag_name          => p_xml_tag_name);
Line: 3077

                                   ,p_last_update_date   IN VARCHAR2
                                   ,p_rqd_flag           IN VARCHAR2
                                   ,p_hide_flag          IN VARCHAR2
                                   ,p_seq_num            IN VARCHAR2
                                   ,p_strt_pos           IN VARCHAR2
                                   ,p_dlmtr_val          IN VARCHAR2
                                   ,p_sprs_cd            IN VARCHAR2
                                   ,p_any_or_all_cd      IN VARCHAR2
                                   ,p_legislation_code   IN VARCHAR2
                                   ,p_business_group     in VARCHAR2
                                    ) IS
--
l_ext_rcd_id                   NUMBER;
Line: 3095

l_last_update_date             DATE;
Line: 3096

l_last_updated_by              NUMBER;
Line: 3108

                ,p_last_update_vc    => p_last_update_date
                ,p_last_update_date  => l_last_update_date
                ,p_last_updated_by   => l_last_updated_by
                ,p_legislation_code  => l_legislation_code
                ,p_business_group    => p_business_group
                ,p_business_group_id => l_new_business_group_id );
Line: 3117

    SELECT ext_rcd_id
    INTO   l_ext_rcd_id
    FROM   ben_ext_rcd
    WHERE  name = p_record_name
    AND    NVL(legislation_code,'~NVL~') = NVL(l_legislation_code,'~NVL~')
    AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1) ;
Line: 3128

    SELECT ext_data_elmt_id
    INTO   l_ext_data_elmt_id
    FROM   ben_ext_data_elmt
    WHERE  name = p_data_element_name
     AND    ( ( nvl(l_new_business_group_id, -1) = nvl(business_group_id , -1)) or
           ( p_business_group is null and business_group_id is null ) )
    --AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
    AND    NVL(legislation_code,'~NULL~') =  NVL(l_legislation_code,'~NULL~');
Line: 3143

    SELECT OBJECT_VERSION_NUMBER,
           EXT_DATA_ELMT_IN_RCD_ID,
           STRT_POS ,
           DLMTR_VAL,
           RQD_FLAG,
           HIDE_FLAG,
           SPRS_CD
    INTO   l_ovn,
           l_EXT_DATA_ELMT_IN_RCD_ID,
           l_STRT_POS ,
           l_DLMTR_VAL,
           l_RQD_FLAG ,
           l_HIDE_FLAG,
           l_SPRS_CD
    FROM   ben_ext_data_elmt_in_rcd
    WHERE  ext_rcd_id                    = l_ext_rcd_id
    AND    ext_data_elmt_id              = l_ext_data_elmt_id
    AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
    AND    NVL(legislation_code,'~NVL~') = NVL(l_legislation_code,'~NVL~')
    AND    NVL(seq_num,-987123654) = NVL(p_seq_num,-987123654);
Line: 3176

       ben_xer_upd.upd(p_effective_date        => l_last_update_date
                    ,p_ext_data_elmt_in_rcd_id => l_ext_data_elmt_in_rcd_id
                    ,p_business_group_id       => l_new_business_group_id
                    ,p_legislation_code        => l_legislation_code
                    ,p_rqd_flag                => p_rqd_flag
                    ,p_hide_flag               => p_hide_flag
                    ,p_strt_pos                => p_strt_pos
                    ,p_dlmtr_val               => p_dlmtr_val
                    ,p_SPRS_CD                => p_SPRS_CD
                    ,p_object_version_number   => l_ovn);
Line: 3198

     /*  If the Same Sequence Find Delete the Record for the Sequence  */

     Declare


       cursor c_ext_where_clause (p_ext_data_elmt_in_rcd_id number)  is
       select ext_where_clause_id,object_version_number
       from ben_ext_where_clause
       where ext_data_elmt_in_rcd_id = p_ext_data_elmt_in_rcd_id;
Line: 3209

        select ext_incl_chg_id,object_version_number
         from ben_ext_incl_chg
       where ext_data_elmt_in_rcd_id = p_ext_data_elmt_in_rcd_id;
Line: 3217

       select object_version_number,ext_data_elmt_in_rcd_id
        from ben_ext_data_elmt_in_rcd
        where  ext_data_elmt_id       <> nvl(c_ext_data_elmt_id,-1)
         and   ext_rcd_id              = c_ext_rcd_id
         and   seq_num                 = p_seq_num ;
Line: 3229

         /*  if the sequence found delete the old  reco   */
         -- before deleting  make sure the chile in where and inclusion are deleted

         if  ( l_new_business_group_id is null  or g_override = 'Y' ) then
             --- delete where clause of the data element in rcd
             for i in  c_ext_where_clause( l_ext_data_elmt_in_rcd_id)
             Loop
                l_obj_ver_number := i.object_version_number ;
Line: 3261

              ben_xer_del.del(p_effective_date        => l_last_update_date
                      ,p_ext_data_elmt_in_rcd_id    => l_ext_data_elmt_in_rcd_id
                      ,p_object_version_number => l_object_version_number);
Line: 3275

       ben_xer_ins.ins(p_effective_date          => l_last_update_date
                    ,p_ext_data_elmt_in_rcd_id => l_ext_data_elmt_in_rcd_id
                    ,p_business_group_id       => l_new_business_group_id
                    ,p_ext_data_elmt_id        => l_ext_data_elmt_id
                    ,p_ext_rcd_id              => l_ext_rcd_id
                    ,p_legislation_code        => l_legislation_code
                    ,p_rqd_flag                => p_rqd_flag
                    ,p_hide_flag               => p_hide_flag
                    ,p_strt_pos                => p_strt_pos
                    ,p_dlmtr_val               => p_dlmtr_val
                    ,p_sprs_cd                 => p_sprs_cd
                    ,p_seq_num                 => p_seq_num
                    ,p_any_or_all_cd           => p_any_or_all_cd
                    ,p_last_update_date        => l_last_update_date
                    ,p_creation_date           => l_last_update_date
                    ,p_last_update_login       => 0
                    ,p_created_by              => l_last_updated_by
                    ,p_last_updated_by         => l_last_updated_by
                    ,p_object_version_number   => l_object_version_number);
Line: 3305

                               ,p_last_update_date       IN VARCHAR2
                               ,p_seq_num                IN VARCHAR2
                               ,p_oper_cd                IN VARCHAR2
                               ,p_val                    IN VARCHAR2
                               ,p_and_or_cd              IN VARCHAR2
                               ,p_legislation_code       IN VARCHAR2
                               ,p_business_group         IN VARCHAR2
                               ) is
l_ext_file_id                    NUMBER;
Line: 3324

l_last_update_date               DATE;
Line: 3325

l_last_updated_by                NUMBER;
Line: 3333

                ,p_last_update_vc   => p_last_update_date
                ,p_last_update_date => l_last_update_date
                ,p_last_updated_by  => l_last_updated_by
                ,p_legislation_code => l_legislation_code
                ,p_business_group    => p_business_group
                ,p_business_group_id => l_new_business_group_id );
Line: 3344

       SELECT ext_rcd_id
       INTO   l_ext_rcd_id
       FROM   ben_ext_rcd
       WHERE  name = p_record_name
       AND    NVL(legislation_code,'~NVL~') = NVL(l_legislation_code,'~NVL~')
       AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
       ;
Line: 3360

       SELECT ext_file_id
       INTO   l_ext_file_id
       FROM   ben_ext_file
       WHERE  name = p_file_name
       AND    NVL(legislation_code,'~NVL~') = NVL(l_legislation_code,'~NVL~')
       AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
       ;
Line: 3372

       SELECT ext_rcd_in_file_id
       INTO   l_ext_rcd_in_file_id
       FROM   ben_ext_rcd_in_file
       WHERE  ext_file_id             = l_ext_file_id
       AND    ext_rcd_id              = l_ext_rcd_id
       AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
       AND    NVL(legislation_code,'~NULL~') =  NVL(l_legislation_code,'~NULL~');
Line: 3389

    SELECT ext_data_elmt_id
    INTO   l_ext_data_elmt_id
    FROM   ben_ext_data_elmt
    WHERE  name = p_data_elmt_name
    AND    ( ( nvl(l_new_business_group_id, -1) = nvl(business_group_id , -1)) or
           ( p_business_group is null and business_group_id is null ) )
    AND    NVL(legislation_code,'~NULL~') =  NVL(l_legislation_code,'~NULL~')
    ;
Line: 3405

       SELECT ext_data_elmt_id
       INTO   l_cond_ext_data_elmt_id
       FROM   ben_ext_data_elmt
       WHERE  name = p_cond_ext_data_elmt_name
        AND    ( ( nvl(l_new_business_group_id, -1) = nvl(business_group_id , -1)) or
           ( p_business_group is null and business_group_id is null ) )
       --AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
       AND    NVL(legislation_code,'~NULL~') =  NVL(l_legislation_code,'~NULL~')
      ;
Line: 3425

       SELECT ext_data_elmt_in_rcd_id
       INTO   l_ext_data_elmt_in_rcd_id
       FROM   ben_ext_data_elmt_in_rcd rcd,
              ben_ext_data_elmt elmt
       WHERE  rcd.ext_rcd_id                    = l_ext_rcd_id
       and    elmt.name                         = l_record_data_elmt_name
       AND    rcd.ext_data_elmt_id              = elmt.ext_data_elmt_id
       AND    nvl( l_new_business_group_id, -1) = nvl(rcd.business_group_id , -1)
       AND    nvl( l_new_business_group_id, -1) = nvl(elmt.business_group_id , -1)
       AND    NVL(rcd.legislation_code,'~NVL~') = NVL(l_legislation_code,'~NVL~')
       AND    NVL(elmt.legislation_code,'~NVL~')= NVL(l_legislation_code,'~NVL~');
Line: 3439

       SELECT ext_data_elmt_in_rcd_id
       INTO   l_cond_ext_data_elmt_in_rcd_id
       FROM   ben_ext_data_elmt_in_rcd
       WHERE  ext_rcd_id                    = l_ext_rcd_id
       AND    ext_data_elmt_id              = l_ext_data_elmt_id
       AND    nvl(l_new_business_group_id, -1) = nvl(business_group_id , -1)
       AND    NVL(legislation_code,'~NVL~') = NVL(l_legislation_code,'~NVL~');
Line: 3461

       SELECT 'Y'
       INTO   l_temp
       FROM   ben_ext_where_clause
       WHERE  cond_ext_data_elmt_in_rcd_id  = l_cond_ext_data_elmt_in_rcd_id
       AND    ext_rcd_in_file_id = l_ext_rcd_in_file_id
       AND    seq_num               = p_seq_num
       --AND    ext_data_elmt_in_rcd_id = l_ext_data_elmt_in_rcd_id
       AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
       AND    NVL(legislation_code,'~NULL~') =  NVL(l_legislation_code,'~NULL~');
Line: 3474

       SELECT 'Y'
       INTO   l_temp
       FROM   ben_ext_where_clause
       WHERE  cond_ext_data_elmt_in_rcd_id  = l_cond_ext_data_elmt_in_rcd_id
       AND    seq_num               = p_seq_num
       AND    ext_data_elmt_in_rcd_id = l_ext_data_elmt_in_rcd_id
       AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
       AND    NVL(legislation_code,'~NULL~') =  NVL(l_legislation_code,'~NULL~');
Line: 3484

       SELECT 'Y'
       INTO   l_temp
       FROM   ben_ext_where_clause
       WHERE  ext_data_elmt_id = l_ext_data_elmt_id
       AND    cond_ext_data_elmt_id = l_cond_ext_data_elmt_id
       AND    seq_num               = p_seq_num
       AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
       AND    NVL(legislation_code,'~NULL~') =  NVL(l_legislation_code,'~NULL~');
Line: 3509

           SELECT ext_where_clause_id, object_version_number
           FROM ben_ext_where_clause xwc
           WHERE ( business_group_id is null
               or business_group_id = l_new_business_group_id )
           and (legislation_code is null
               or legislation_code = l_legislation_code )
           and (ext_rcd_in_file_id = p_ext_rcd_in_file_id
               or p_ext_rcd_in_file_id is null )
           and (ext_data_elmt_in_rcd_id  = p_ext_data_elmt_in_rcd_id
               or p_ext_data_elmt_in_rcd_id is null)
           and (ext_data_elmt_id = p_ext_data_elmt_id
               or p_ext_data_elmt_id is null)
           and seq_num = p_seq_num
             ;
Line: 3549

       ben_xwc_ins.ins(p_effective_date          => l_last_update_date
                   ,p_ext_where_clause_id     => l_ext_where_clause_id
                   ,p_seq_num                 => p_seq_num
                   ,p_oper_cd                 => p_oper_cd
                   ,p_val                     => p_val
                   ,p_and_or_cd               => p_and_or_cd
                   ,p_ext_data_elmt_id        => l_ext_data_elmt_id
                   ,p_cond_ext_data_elmt_id   => l_cond_ext_data_elmt_id
                   ,p_ext_rcd_in_file_id      => l_ext_rcd_in_file_id
                   ,p_ext_data_elmt_in_rcd_id => l_ext_data_elmt_in_rcd_id
                   ,p_cond_ext_data_elmt_in_rcd_id => l_cond_ext_data_elmt_in_rcd_id
                   ,p_business_group_id       => l_new_business_group_id
                   ,p_legislation_code        => l_legislation_code
                   ,p_last_update_date        => l_last_update_date
                   ,p_creation_date           => l_last_update_date
                   ,p_last_updated_by         => l_last_updated_by
                   ,p_last_update_login       => 0
                   ,p_created_by              => l_last_updated_by
                   ,p_object_version_number   => l_object_version_number);
Line: 3581

                         ,p_last_update_date IN VARCHAR2
                         ,p_legislation_code IN VARCHAR2
                         ,p_business_group     in VARCHAR2
                         ,p_chg_evt_source   IN VARCHAR2 DEFAULT NULL
                         ) IS


--
cursor cw (c_code varchar2)
           is select 'x'
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_CHG_EVT'
             and    lookup_code  = c_code
             and    enabled_flag = 'Y'
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 3610

l_last_update_date      DATE;
Line: 3611

l_last_updated_by        NUMBER;
Line: 3619

                ,p_last_update_vc    => p_last_update_date
                ,p_last_update_date  => l_last_update_date
                ,p_last_updated_by   => l_last_updated_by
                ,p_legislation_code  => l_legislation_code
                ,p_business_group    => p_business_group
                ,p_business_group_id => l_new_business_group_id );
Line: 3626

    SELECT ext_rcd_id
    INTO   l_ext_rcd_id
    FROM   ben_ext_rcd
    WHERE  name = p_record_name
    AND    NVL(legislation_code,'~NVL~') = NVL(l_legislation_code,'~NVL~')
    AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1) ;
Line: 3639

       SELECT ext_file_id
       INTO   l_ext_file_id
       FROM   ben_ext_file
       WHERE  name = p_file_name
       AND    NVL(legislation_code,'~NVL~') = NVL(l_legislation_code,'~NVL~')
       AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1) ;
Line: 3650

       SELECT ext_rcd_in_file_id
       INTO   l_ext_rcd_in_file_id
       FROM   ben_ext_rcd_in_file
       WHERE  ext_file_id             = l_ext_file_id
       AND    ext_rcd_id              = l_ext_rcd_id
       AND    NVL(legislation_code,'~NULL~')=  NVL(l_legislation_code,'~NULL~')
       AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1) ;
Line: 3669

        SELECT ext_data_elmt_id
        INTO   l_ext_data_elmt_id
        FROM   ben_ext_data_elmt
        WHERE  name = p_data_elmt_name
         AND    ( ( nvl(l_new_business_group_id, -1) = nvl(business_group_id , -1)) or
           ( p_business_group is null and business_group_id is null ) )
        --AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
        AND    NVL(legislation_code,'~NULL~')= NVL(l_legislation_code,'~NULL~');
Line: 3682

        SELECT ext_data_elmt_in_rcd_id
        INTO   l_ext_data_elmt_in_rcd_id
        FROM   ben_ext_data_elmt_in_rcd
        WHERE  ext_rcd_id                    = l_ext_rcd_id
        AND    ext_data_elmt_id              = l_ext_data_elmt_id
        AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
        AND    NVL(legislation_code,'~NVL~') = NVL(l_legislation_code,'~NVL~');
Line: 3732

         SELECT 'Y'
           INTO   l_temp
           FROM   ben_ext_incl_chg
            WHERE (l_ext_rcd_in_file_id IS NULL OR
                    ext_rcd_in_file_id      = l_ext_rcd_in_file_id)
             AND   (l_ext_data_elmt_in_rcd_id IS NULL OR
                    ext_data_elmt_in_rcd_id = l_ext_data_elmt_in_rcd_id)
             AND   chg_evt_cd               = l_chg_evt_cd
             AND   NVL(l_new_business_group_id, -1) = NVL(business_group_id , -1)
             AND   NVL(legislation_code,'~NULL~')    = NVL(l_legislation_code,'~NULL~');
Line: 3748

                      SELECT ext_incl_chg_id , object_version_number
                      FROM   ben_ext_incl_chg
                      WHERE (l_ext_rcd_in_file_id IS NULL OR
                             ext_rcd_in_file_id      = l_ext_rcd_in_file_id)
                      AND   (l_ext_data_elmt_in_rcd_id IS NULL OR
                             ext_data_elmt_in_rcd_id = l_ext_data_elmt_in_rcd_id)
                      AND   chg_evt_cd               = l_chg_evt_cd
                      AND   NVL(l_new_business_group_id, -1) = NVL(business_group_id , -1)
                      AND   NVL(legislation_code,'~NULL~') =  NVL(l_legislation_code,'~NULL~');
Line: 3762

                                    p_effective_date         => l_last_update_date,
                                    p_ext_incl_chg_id        => i.ext_incl_chg_id,
                                    p_object_version_number  => l_object_version_number
                                   );
Line: 3771

                      ben_xic_ins.ins(p_effective_date  => l_last_update_date
                       ,p_ext_incl_chg_id        => l_ext_incl_chg_id
                       ,p_chg_evt_cd             => l_chg_evt_cd
                       ,p_ext_rcd_in_file_id     => l_ext_rcd_in_file_id
                       ,p_ext_data_elmt_in_rcd_id=> l_ext_data_elmt_in_rcd_id
                       ,p_business_group_id       => l_new_business_group_id
                       ,p_legislation_code        => l_legislation_code
                       ,p_last_update_date        => l_last_update_date
                       ,p_creation_date           => l_last_update_date
                       ,p_last_updated_by         => l_last_updated_by
                       ,p_last_update_login       => 0
                       ,p_created_by              => l_last_updated_by
                       ,p_object_version_number   => l_object_version_number
                       ,p_chg_evt_source          => p_chg_evt_source );
Line: 3791

                ben_xic_ins.ins(p_effective_date => l_last_update_date
                       ,p_ext_incl_chg_id        => l_ext_incl_chg_id
                       ,p_chg_evt_cd             => l_chg_evt_cd
                       ,p_ext_rcd_in_file_id     => l_ext_rcd_in_file_id
                       ,p_ext_data_elmt_in_rcd_id=> l_ext_data_elmt_in_rcd_id
                       ,p_business_group_id       => l_new_business_group_id
                       ,p_legislation_code        => l_legislation_code
                       ,p_last_update_date        => l_last_update_date
                       ,p_creation_date           => l_last_update_date
                       ,p_last_updated_by         => l_last_updated_by
                       ,p_last_update_login       => 0
                       ,p_created_by              => l_last_updated_by
                       ,p_object_version_number   => l_object_version_number
                       ,p_chg_evt_source          => p_chg_evt_source );
Line: 3827

     ,p_last_update_date IN VARCHAR2
     ,p_legislation_code IN VARCHAR2
     ,p_business_group   in VARCHAR2
     ,p_ext_global_flag  in VARCHAR2 default 'N'
  ) IS
--
l_ext_prfl_id             NUMBER;
Line: 3837

l_last_update_date      DATE;
Line: 3838

l_last_updated_by        NUMBER;
Line: 3845

                ,p_last_update_vc    => p_last_update_date
                ,p_last_update_date  => l_last_update_date
                ,p_last_updated_by   => l_last_updated_by
                ,p_legislation_code  => l_legislation_code
                ,p_business_group    => p_business_group
                ,p_business_group_id => l_new_business_group_id );
Line: 3853

    SELECT ext_crit_prfl_id
    INTO   l_ext_prfl_id
    FROM   ben_ext_crit_prfl
    WHERE  name = p_profile_name
    AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
    AND    NVL(legislation_code,'~NVL~')    = NVL(l_legislation_code,'~NVL~');
Line: 3865

                     ,p_last_update_date      => l_last_update_date
                     ,p_creation_date         => l_last_update_date
                     ,p_last_update_login     => 0
                     ,p_created_by            => l_last_updated_by
                     ,p_last_updated_by       => l_last_updated_by
                     ,p_ext_global_flag       => nvl(p_ext_global_flag,'N')
                     ,p_object_version_number => l_object_version_number
                    );
Line: 3877

  delete_crit_adv_conditon
                  (p_ext_crit_prfl_id =>  l_ext_prfl_id  ) ;
Line: 3886

                            ,p_last_update_date IN VARCHAR2
                            ,p_crit_typ_cd      IN VARCHAR2
                            ,p_excld_flag       IN VARCHAR2
                            ,p_legislation_code IN VARCHAR2
                            ,p_business_group   IN VARCHAR2
                           ) IS
--
l_ext_prfl_id             NUMBER;
Line: 3898

l_last_update_date        DATE;
Line: 3899

l_last_updated_by        NUMBER;
Line: 3919

                ,p_last_update_vc    => p_last_update_date
                ,p_last_update_date  => l_last_update_date
                ,p_last_updated_by   => l_last_updated_by
                ,p_legislation_code  => l_legislation_code
                ,p_business_group    => p_business_group
                ,p_business_group_id => l_new_business_group_id );
Line: 3927

    SELECT ext_crit_prfl_id
    INTO   l_ext_prfl_id
    FROM   ben_ext_crit_prfl
    WHERE  name = p_profile_name
    AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
    AND    NVL(legislation_code,'~NVL~')    = NVL(l_legislation_code,'~NVL~');
Line: 3938

    SELECT 'Y'
    INTO   l_temp
    FROM   ben_ext_crit_typ
    WHERE  ext_crit_prfl_id = l_ext_prfl_id
    AND    crit_typ_cd = p_type_code
    AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
    AND    NVL(legislation_code,'~NVL~')    = NVL(l_legislation_code,'~NVL~');
Line: 3947

      ben_xct_ins.ins(p_effective_date        => l_last_update_date
                     ,p_ext_crit_typ_id       => l_ext_crit_typ_id
                     ,p_crit_typ_cd           => p_type_code
                     ,p_excld_flag            => p_excld_flag
                     ,p_ext_crit_prfl_id      => l_ext_prfl_id
                     ,p_business_group_id     => l_new_business_group_id
                     ,p_legislation_code      => l_legislation_code
                     ,p_last_update_date      => l_last_update_date
                     ,p_creation_date         => l_last_update_date
                     ,p_last_update_login     => 0
                     ,p_created_by            => l_last_updated_by
                     ,p_last_updated_by       => l_last_updated_by
                     ,p_object_version_number => l_object_version_number);
Line: 3970

                           ,p_last_update_date  IN VARCHAR2
                           ,p_val2              IN VARCHAR2
                           ,p_legislation_code  IN VARCHAR2
                           ,p_business_group    IN VARCHAR2
                           ,p_ext_crit_val_id   in varchar2 default null
                           ,p_lookup_code1      in varchar2 default null
                           ,p_lookup_code2      in varchar2 default null
                          ) IS
--
cursor cw (c_code varchar2)
           is select 'x'
             from   hr_lookups
             where  lookup_type = 'BEN_EXT_CHG_EVT'
             and    lookup_code  = c_code
             and    enabled_flag = 'Y'
             and    trunc(sysdate) between nvl(start_date_active, trunc(sysdate))
                                 and nvl(end_date_active, trunc(sysdate))
             ;
Line: 4000

l_last_update_date      DATE;
Line: 4001

l_last_updated_by        NUMBER;
Line: 4016

                ,p_last_update_vc    => p_last_update_date
                ,p_last_update_date  => l_last_update_date
                ,p_last_updated_by   => l_last_updated_by
                ,p_legislation_code  => l_legislation_code
                ,p_business_group    => p_business_group
                ,p_business_group_id => l_new_business_group_id );
Line: 4092

    SELECT ext_crit_prfl_id
    INTO   l_ext_prfl_id
    FROM   ben_ext_crit_prfl
    WHERE  name = p_profile_name
    AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
    AND    NVL(legislation_code,'~NVL~')    = NVL(l_legislation_code,'~NVL~');
Line: 4103

    SELECT ext_crit_typ_id
    INTO   l_ext_crit_typ_id
    FROM   ben_ext_crit_typ
    WHERE  ext_crit_prfl_id = l_ext_prfl_id
    AND    crit_typ_cd = p_TYPE_CODE
    AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
    AND    NVL(legislation_code,'~NVL~')    = NVL(l_legislation_code,'~NVL~');
Line: 4116

       SELECT 'Y'
       INTO   l_temp
       FROM   ben_ext_crit_val
       WHERE  ext_crit_typ_id = l_ext_crit_typ_id
       AND    val_1 = l_value
       AND    nvl(val_2,'~NVL~') = NVL(l_value2,'~NVL~')
       AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
       AND    NVL(legislation_code,'~NVL~')    = NVL(l_legislation_code,'~NVL~')
       ;
Line: 4130

         SELECT 'Y'
         FROM   ben_ext_crit_val
         WHERE  ext_crit_typ_id = l_ext_crit_typ_id
         AND    val_1 = l_value
         AND    nvl(val_2,'~NVL~') = NVL(l_value2,'~NVL~')
         AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
         AND    NVL(legislation_code,'~NVL~')    = NVL(l_legislation_code,'~NVL~')
         and    val_1 = p_val ;
Line: 4168

                     ,p_last_update_date      => l_last_update_date
                     ,p_creation_date         => l_last_update_date
                     ,p_last_update_login     => 0
                     ,p_created_by            => l_last_updated_by
                     ,p_last_updated_by       => l_last_updated_by
                     ,p_object_version_number => l_object_version_number);
Line: 4196

                          ,p_last_update_date   IN VARCHAR2
                          ,p_legislation_code   IN VARCHAR2
                          ,p_business_group     in VARCHAR2
                          ,p_ext_crit_val_id   in varchar2 default null
                          ,p_lookup_code1      in varchar2 default null
                          ,p_lookup_code2      in varchar2 default null
                          ) IS
--
l_ext_prfl_id             NUMBER;
Line: 4211

l_last_update_date      DATE;
Line: 4212

l_last_updated_by        NUMBER;
Line: 4232

                ,p_last_update_vc    => p_last_update_date
                ,p_last_update_date  => l_last_update_date
                ,p_last_updated_by   => l_last_updated_by
                ,p_legislation_code  => l_legislation_code
                ,p_business_group    => p_business_group
                ,p_business_group_id => l_new_business_group_id );
Line: 4286

    SELECT ext_crit_prfl_id
    INTO   l_ext_prfl_id
    FROM   ben_ext_crit_prfl
    WHERE  name = p_profile_name
    AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
    AND    NVL(legislation_code,'~NVL~')    = NVL(l_legislation_code,'~NVL~');
Line: 4299

    SELECT ext_crit_typ_id
    INTO   l_ext_crit_typ_id
    FROM   ben_ext_crit_typ
    WHERE  ext_crit_prfl_id = l_ext_prfl_id
    AND    crit_typ_cd = p_type_code
    AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
    AND    NVL(legislation_code,'~NVL~')    = NVL(l_legislation_code,'~NVL~');
Line: 4315

    SELECT ext_crit_val_id
    INTO   l_ext_crit_val_id
    FROM   ben_ext_crit_val
    WHERE  ext_crit_typ_id = l_ext_crit_typ_id
    --AND    val_1 = p_val
    AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
    AND    NVL(legislation_code,'~NVL~')    = NVL(l_legislation_code,'~NVL~');
Line: 4337

    SELECT 'Y'
    INTO   l_temp
    FROM   ben_ext_crit_cmbn
    WHERE  ext_crit_val_id = l_ext_crit_val_id
    AND    crit_typ_cd = p_crit_typ_cd
    and    oper_cd     = p_oper_cd
    AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
    AND    NVL(legislation_code,'~NVL~')    = NVL(l_legislation_code,'~NVL~');
Line: 4347

      ben_xcc_ins.ins(p_effective_date        => l_last_update_date
                     ,p_ext_crit_cmbn_id      => l_ext_crit_cmbn_id
                     ,p_ext_crit_val_id       => l_ext_crit_val_id
                     ,p_crit_typ_cd           => p_crit_typ_cd
                     ,p_oper_cd               => p_oper_cd
                     ,p_val_1                 => l_val_1
                     ,p_val_2                 => l_val_2
                     ,p_business_group_id     => l_new_business_group_id
                     ,p_legislation_code      => l_legislation_code
                     ,p_last_update_date      => l_last_update_date
                     ,p_creation_date         => l_last_update_date
                     ,p_last_update_login     => 0
                     ,p_created_by            => l_last_updated_by
                     ,p_last_updated_by       => l_last_updated_by
                     ,p_object_version_number => l_object_version_number);
Line: 4372

                         ,p_last_update_date         IN  VARCHAR2
                         ,p_kickoff_wrt_prc_flag     IN  VARCHAR2
                         ,p_apnd_rqst_id_flag        IN  VARCHAR2
                         ,p_prmy_sort_cd             IN  VARCHAR2
                         ,p_scnd_sort_cd             IN  VARCHAR2
                         ,p_strt_dt                  IN  VARCHAR2
                         ,p_end_dt                   IN  VARCHAR2
                         ,p_spcl_hndl_flag           IN  VARCHAR2
                         ,p_upd_cm_sent_dt_flag      IN  VARCHAR2
                         ,p_use_eff_dt_for_chgs_flag IN  VARCHAR2
                         ,p_data_typ_cd              IN  VARCHAR2
                         ,p_ext_typ_cd               IN  VARCHAR2
                         ,p_drctry_name              IN  VARCHAR2
                         ,p_output_name              IN  VARCHAR2
                         ,p_post_processing_rule     IN  VARCHAR2
                         ,p_legislation_code         IN  VARCHAR2
                         ,p_business_group           IN VARCHAR2
                         ,p_xml_tag_name             in VARCHAR2
                         ,p_output_type              in VARCHAR2
                         ,p_xdo_template_name        in VARCHAR2
                         ,p_ext_global_flag          in VARCHAR2 default 'N'
                         ,p_cm_display_flag          in VARCHAR2 default 'N'
                         ) IS
--
l_ext_prfl_id             NUMBER;
Line: 4403

l_last_update_date        DATE;
Line: 4404

l_last_updated_by         NUMBER;
Line: 4414

                ,p_last_update_vc    => p_last_update_date
                ,p_last_update_date  => l_last_update_date
                ,p_last_updated_by   => l_last_updated_by
                ,p_legislation_code  => l_legislation_code
                ,p_business_group    => p_business_group
                ,p_business_group_id => l_new_business_group_id );
Line: 4425

    SELECT ext_file_id
    INTO   l_ext_file_id
    FROM   ben_ext_file
    WHERE  name = p_file_name
    AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
    AND    NVL(legislation_code,'~NVL~')    = NVL(l_legislation_code,'~NVL~');
Line: 4439

      SELECT formula_id
      INTO   l_ext_post_prcs_rl
      FROM   ff_formulas_f
      WHERE formula_name = p_post_processing_rule
      AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
      AND    trunc(sysdate) BETWEEN effective_start_date and effective_end_date ;
Line: 4468

      select xdo.template_id
      from   xdo_templates_b xdo
      where  xdo.template_code =  P_xdo_template_name
      order by  decode(xdo.application_id ,FND_GLOBAL.resp_appl_id,1,2)
      ;
Line: 4487

       SELECT ext_crit_prfl_id
       INTO   l_ext_prfl_id
       FROM   ben_ext_crit_prfl
       WHERE  name = p_profile_name
       AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
       AND    NVL(legislation_code,'~NVL~')    = NVL(l_legislation_code,'~NVL~');
Line: 4508

                       ,p_last_update_date => p_last_update_date
                       ,p_legislation_code => p_legislation_code
                       ,p_business_group   => p_business_group
                       )  ;
Line: 4518

    SELECT object_version_number ,ext_dfn_id
    INTO   l_ovn,l_ext_dfn_id
    FROM   ben_ext_dfn
    WHERE  ext_file_id = l_ext_file_id
    AND    name = p_definition_name
    AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
    AND    NVL(legislation_code,'~NVL~')    = NVL(l_legislation_code,'~NVL~');
Line: 4583

                     ,p_last_update_date         => l_last_update_date
                     ,p_creation_date            => l_last_update_date
                     ,p_last_update_login        => 0
                     ,p_created_by               => l_last_updated_by
                     ,p_last_updated_by          => l_last_updated_by
                     ,p_ext_post_prcs_rl         => l_ext_post_prcs_rl
                     ,p_object_version_number    => l_object_version_number
                     ,p_xml_tag_name             => p_xml_tag_name
                     ,p_output_type              => l_output_type
                     ,p_xdo_template_id          => l_template_id
                     ,p_ext_global_flag          => nvl(p_ext_global_flag, 'N')
                     ,p_cm_display_flag          => nvl(p_cm_display_flag, 'N')
                     );
Line: 4604

                     ,p_last_update_date  IN VARCHAR2
                     ,p_val               IN VARCHAR2
                     ,p_dcd_val           IN VARCHAR2
                     ,p_legislation_code  IN VARCHAR2
                     ,p_business_group    IN VARCHAR2
                     ,p_chg_evt_source    in VARCHAR2 default null
                    ) is
l_ext_data_elmt_decd_id   NUMBER;
Line: 4617

l_last_update_date        DATE;
Line: 4618

l_last_updated_by         NUMBER;
Line: 4622

select decd_flag
from ben_ext_fld
where ext_fld_id = p_ext_fld_id ;
Line: 4630

                ,p_last_update_vc    => p_last_update_date
                ,p_last_update_date  => l_last_update_date
                ,p_last_updated_by   => l_last_updated_by
                ,p_legislation_code  => l_legislation_code
                ,p_business_group    => p_business_group
                ,p_business_group_id => l_new_business_group_id );
Line: 4638

    SELECT ext_data_elmt_id,ext_fld_id
    INTO   l_ext_data_elmt_id,l_ext_fld_id
    FROM   ben_ext_data_elmt
    WHERE  name = p_element_name
     AND    ( ( nvl(l_new_business_group_id, -1) = nvl(business_group_id , -1)) or
           ( p_business_group is null and business_group_id is null ) )
    --AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
    AND    NVL(legislation_code,'~NULL~') =  NVL(l_legislation_code,'~NULL~');
Line: 4684

    SELECT 'Y'
    INTO   l_temp
    FROM   ben_ext_data_elmt_decd
    WHERE  ext_data_elmt_id = l_ext_data_elmt_id
    AND    val = p_val
    AND    dcd_val = p_dcd_val
     AND    ( ( nvl(l_new_business_group_id, -1) = nvl(business_group_id , -1)) or
           ( p_business_group is null and business_group_id is null ) )
    --AND    nvl( l_new_business_group_id, -1) = nvl(business_group_id , -1)
    AND    NVL(legislation_code,'~NVL~')    = NVL(l_legislation_code,'~NVL~');
Line: 4703

               ,  p_last_update_date      => l_last_update_date
               ,  p_creation_date         => l_last_update_date
               ,  p_last_updated_by       => l_last_updated_by
               ,  p_last_update_login     => 0
               ,  p_created_by            => l_last_updated_by
               ,  p_object_version_number => l_object_version_number
               ,  p_chg_evt_source        => p_chg_evt_source );
Line: 4722

cursor cep is select event_group_name
         from  pay_event_groups
         where  event_group_id =  p_CHG_EVT_CD

         ;
Line: 4754

cursor cep is select event_group_id
             from   pay_event_groups
             where  event_group_name  = P_CHG_EVT_CD
             and     nvl(business_group_id,nvl(p_business_group_id,-1))
                      = nvl(p_business_group_id,-1)
              ;