DBA Data[Home] [Help]

APPS.PY_W2_DBITEMS SQL Statements

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

Line: 14

  procedure insert_route_context_usages
  (
      p_context_id    in  number,
      p_sequence_no   in  number
  ) is
  begin                       -- [
      hr_utility.set_location('gbstrdbi.insert_route_context_usages', 1);
Line: 21

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              p_context_id,
              p_sequence_no
      from    dual;
Line: 29

  end insert_route_context_usages;  -- ]
Line: 33

  procedure insert_user_entity
  (
      p_user_entity_name  in varchar2,
      p_description       in varchar2
  ) is
  begin -- [
      hr_utility.set_location('gbstrdbi.insert_user_entity', 1);
Line: 40

      insert into ff_user_entities
             (user_entity_id,
              business_group_id,
              legislation_code,
              route_id,
              notfound_allowed_flag,
              user_entity_name,
              creator_id,
              creator_type,
              entity_description,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      --
      values (ff_user_entities_s.nextval,
              null,
              'US',
              ff_routes_s.currval,
              'N',
              p_user_entity_name ,
              0,
              'SEH',               /* SEH */
              p_description,
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 70

  end insert_user_entity;  -- ]
Line: 74

  procedure insert_curr_database_item
  (
      p_user_name          in varchar2,
      p_definition_text    in varchar2,
      p_description        in varchar2,
      p_data_type          in varchar2,
      p_null_allowed_flag  in varchar2
  ) is
  begin -- [
      hr_utility.set_location('gbstrdbi.insert_curr_database_item', 1);
Line: 85

      insert into ff_database_items (
              user_name,
              user_entity_id,
              data_type,
              definition_text,
              null_allowed_flag,
              description,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      --
      values (p_user_name,
              ff_user_entities_s.currval,
              p_data_type,
              p_definition_text,
              p_null_allowed_flag,
              p_description,
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 109

  end insert_curr_database_item;  -- ]
Line: 114

   procedure insert_database_item
  (
      p_user_name          in varchar2,
      p_user_entity_id     in number,
      p_definition_text    in varchar2,
      p_description        in varchar2,
      p_data_type          in varchar2,
      p_null_allowed_flag  in varchar2
  ) is
  begin -- [
      hr_utility.set_location('gbstrdbi.insert_database_item', 1);
Line: 126

      insert into ff_database_items (
              user_name,
              user_entity_id,
              data_type,
              definition_text,
              null_allowed_flag,
              description,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      --
      values (p_user_name,
              p_user_entity_id,
              p_data_type,
              p_definition_text,
              p_null_allowed_flag,
              p_description,
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 150

  end insert_database_item;  -- ]
Line: 155

  procedure insert_route
  (
      p_route_name    in varchar2,
      p_description   in varchar2,
      p_text          in varchar2
  ) is
  begin -- [
      hr_utility.trace ('creating route : ' || p_route_name);
Line: 163

      hr_utility.set_location('gbstrdbi.insert_route', 1);
Line: 164

      insert into ff_routes
             (route_id,
              route_name,
              user_defined_flag,
              description,
              text,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      values (ff_routes_s.nextval,
              p_route_name,
              'N',
              p_description,
              p_text,
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 185

  end insert_route;  -- ]
Line: 197

   select context_id
   into   l_tax_unit_context_id
   from   ff_contexts
  where  context_name = 'TAX_UNIT_ID';
Line: 327

   select context_id
   into   l_context1
   from   ff_contexts
   where  context_name = 'PAYROLL_ACTION_ID';
Line: 332

   select context_id
   into   l_context2
   from   ff_contexts
   where  context_name = 'TAX_UNIT_ID';
Line: 337

  insert_route
  ('SEH_SQWL_NUM_EMPS_US',
   'Derives the number of employees before you run the report',
   'pay_assignment_actions paa
where  paa.payroll_action_id = B1
and    paa.tax_unit_id       = B2');
Line: 344

  insert_route_context_usages
  (l_context1,1);
Line: 347

  insert_route_context_usages
  (l_context2,2);
Line: 350

  insert_user_entity
  ('SEH_SQWL_NUM_EMPS_US',
  'Number of State Employees for a specific Quarter');
Line: 354

  insert_curr_database_item
  ('SQWL_NUM_EMPS_GRE_PACTID',
  'count(*)',
   'Number of State Employees for a specific Quarter',
   'N',
   'Y');
Line: 368

  select 'Y'
  from ff_route_context_usages frcu
  where route_id = p_route_id
  and   context_id = p_context_id;
Line: 385

     select context_id
     into   l_tax_unit_context_id
     from   ff_contexts
     where  context_name = 'TAX_UNIT_ID';
Line: 390

     select context_id
     into   l_assignment_action_context_id
     from   ff_contexts
     where  context_name = 'ASSIGNMENT_ACTION_ID';
Line: 395

     select context_id
     into   l_payroll_action_context_id
     from   ff_contexts
     where  context_name = 'PAYROLL_ACTION_ID';
Line: 401

     select context_id
     into   l_jurisdiction_context_id
     from   ff_contexts
     where  context_name = 'JURISDICTION_CODE';
Line: 424

    hr_utility.trace('selecting the route_id for EMPLOYER_ARCHIVE');
Line: 426

    select route_id into l_route_id
    from ff_routes where route_name = 'EMPLOYER_ARCHIVE';
Line: 431

    update ff_routes
    set text = l_text
    where route_id = l_route_id;
Line: 437

    /* delete ff_route_context_usages
    where route_id = l_route_id; */
Line: 444

    hr_utility.trace('inserting ff_route_context_usages for EMPLOYER_ARCHIVE');
Line: 446

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (l_route_id,
              l_payroll_action_context_id,
              1);
Line: 454

    hr_utility.trace('inserting ff_route_context_usages for EMPLOYER_ARCHIVE');
Line: 456

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (l_route_id,
              l_tax_unit_context_id,
              2 );
Line: 468

    hr_utility.trace('inserting ff_routes for EMPLOYER_ARCHIVE');
Line: 470

      insert into ff_routes
             (route_id,
              route_name,
              user_defined_flag,
              description,
              text,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      values (ff_routes_s.nextval,
              'EMPLOYER_ARCHIVE',
              'N',
              'sql to retrieve GRE based archived items',
              l_text,
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 493

    hr_utility.trace('inserting ff_route_parameters for EMPLOYER_ARCHIVE');
Line: 495

     insert into ff_route_parameters
             (ROUTE_PARAMETER_ID,
              ROUTE_ID,
              DATA_TYPE,
              PARAMETER_NAME,
              SEQUENCE_NO )
      select ff_route_parameters_s.nextval,
             ff_routes_s.currval,
             'N',
             'User Entity ID',
             1 from dual;
Line: 509

    hr_utility.trace('inserting ff_route_context_usages for EMPLOYER_ARCHIVE');
Line: 511

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              l_payroll_action_context_id,
              1
              from dual;
Line: 520

    hr_utility.trace('inserting ff_route_context_usages for EMPLOYER_ARCHIVE');
Line: 522

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              l_tax_unit_context_id,
              2
              from dual;
Line: 549

    select route_id into l_route_id
    from ff_routes where route_name = 'EMPLOYER_ARCHIVE_DATE';
Line: 552

    update ff_routes
    set text = l_text
    where route_id = l_route_id;
Line: 556

    /* delete ff_route_context_usages
    where route_id = l_route_id; */
Line: 563

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (l_route_id,
              l_payroll_action_context_id,
              1);
Line: 571

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (l_route_id,
              l_tax_unit_context_id,
              2 );
Line: 584

      insert into ff_routes
             (route_id,
              route_name,
              user_defined_flag,
              description,
              text,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      values (ff_routes_s.nextval,
              'EMPLOYER_ARCHIVE_DATE',
              'N',
              'sql to retrieve GRE based date archived items',
              l_text,
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 608

     insert into ff_route_parameters
             (ROUTE_PARAMETER_ID,
              ROUTE_ID,
              DATA_TYPE,
              PARAMETER_NAME,
              SEQUENCE_NO )
      select ff_route_parameters_s.nextval,
             ff_routes_s.currval,
             'N',
             'User Entity ID',
             1 from dual;
Line: 622

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              l_payroll_action_context_id,
              1
              from dual;
Line: 631

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              l_tax_unit_context_id,
              2
              from dual;
Line: 658

    select route_id into l_route_id
    from ff_routes where route_name = 'EMPLOYER_ARCHIVE_NUMBER';
Line: 661

    update ff_routes
    set text = l_text
    where route_id = l_route_id;
Line: 665

    /* delete ff_route_context_usages
    where route_id = l_route_id; */
Line: 673

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values ( l_route_id,
              l_payroll_action_context_id,
              1);
Line: 681

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (l_route_id,
              l_tax_unit_context_id,
              2 );
Line: 695

      insert into ff_routes
             (route_id,
              route_name,
              user_defined_flag,
              description,
              text,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      values (ff_routes_s.nextval,
              'EMPLOYER_ARCHIVE_NUMBER',
              'N',
              'sql to retrieve GRE based numeric archived items',
              l_text,
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 719

     insert into ff_route_parameters
             (ROUTE_PARAMETER_ID,
              ROUTE_ID,
              DATA_TYPE,
              PARAMETER_NAME,
              SEQUENCE_NO )
      select ff_route_parameters_s.nextval,
             ff_routes_s.currval,
             'N',
             'User Entity ID',
             1 from dual;
Line: 733

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              l_payroll_action_context_id,
              1
              from dual;
Line: 742

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              l_tax_unit_context_id,
              2
              from dual;
Line: 779

    hr_utility.trace('selecting route id for EMPLOYER_TAX_UNIT_ARCHIVE_DATE');
Line: 781

    select route_id into l_route_id
    from ff_routes where route_name = 'EMPLOYER_TAX_UNIT_ARCHIVE_DATE';
Line: 786

    update ff_routes
    set text = l_text
    where route_id = l_route_id;
Line: 792

    /* delete ff_route_context_usages
    where route_id = l_route_id; */
Line: 799

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (l_route_id,
              l_payroll_action_context_id,
              1);
Line: 807

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (l_route_id,
              l_tax_unit_context_id,
              2 );
Line: 818

      insert into ff_routes
             (route_id,
              route_name,
              user_defined_flag,
              description,
              text,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      values (ff_routes_s.nextval,
              'EMPLOYER_TAX_UNIT_ARCHIVE_DATE',
              'N',
              'sql to retrieve GRE based employer archived items',
              l_text,
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 841

     insert into ff_route_parameters
             (ROUTE_PARAMETER_ID,
              ROUTE_ID,
              DATA_TYPE,
              PARAMETER_NAME,
              SEQUENCE_NO )
      select ff_route_parameters_s.nextval,
             ff_routes_s.currval,
             'N',
             'User Entity ID',
             1 from dual;
Line: 855

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              l_payroll_action_context_id,
              1
              from dual;
Line: 864

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              l_tax_unit_context_id,
              2
              from dual;
Line: 902

    hr_utility.trace('selecting route_id for EMPLOYER_TAX_UNIT_ARCHIVE_NUMBER');
Line: 904

    select route_id into l_route_id
    from ff_routes where route_name = 'EMPLOYER_TAX_UNIT_ARCHIVE_NUMBER';
Line: 910

    update ff_routes
    set text = l_text
    where route_id = l_route_id;
Line: 916

    /* delete ff_route_context_usages
    where route_id = l_route_id; */
Line: 924

    hr_utility.trace('inserting ff_route_context_usages for EMPLOYER_TAX_UNIT_ARCHIVE_NUMBER');
Line: 926

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (l_route_id,
              l_payroll_action_context_id,
              1);
Line: 934

    hr_utility.trace('inserting ff_route_context_usages for EMPLOYER_TAX_UNIT_ARCHIVE_NUMBER');
Line: 936

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (l_route_id,
              l_tax_unit_context_id,
              2 );
Line: 948

    hr_utility.trace('inserting ff_routes for EMPLOYER_TAX_UNIT_ARCHIVE_NUMBER');
Line: 950

      insert into ff_routes
             (route_id,
              route_name,
              user_defined_flag,
              description,
              text,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      values (ff_routes_s.nextval,
              'EMPLOYER_TAX_UNIT_ARCHIVE_NUMBER',
              'N',
              'sql to retrieve GRE based employer archived items',
              l_text,
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 973

     insert into ff_route_parameters
             (ROUTE_PARAMETER_ID,
              ROUTE_ID,
              DATA_TYPE,
              PARAMETER_NAME,
              SEQUENCE_NO )
      select ff_route_parameters_s.nextval,
             ff_routes_s.currval,
             'N',
             'User Entity ID',
             1 from dual;
Line: 987

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              l_payroll_action_context_id,
              1
              from dual;
Line: 996

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              l_tax_unit_context_id,
              2
              from dual;
Line: 1033

    hr_utility.trace('selecting route_id for EMPLOYER_TAX_UNIT_ARCHIVE');
Line: 1035

    select route_id into l_route_id
    from ff_routes where route_name = 'EMPLOYER_TAX_UNIT_ARCHIVE';
Line: 1040

    update ff_routes
    set text = l_text
    where route_id = l_route_id;
Line: 1046

    /* delete ff_route_context_usages
    where route_id = l_route_id; */
Line: 1049

    hr_utility.trace('inserting ff_route_context_usages for EMPLOYER_TAX_UNIT_ARCHIVE');
Line: 1055

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (l_route_id,
              l_payroll_action_context_id,
              1);
Line: 1063

    hr_utility.trace('inserting ff_route_context_usages for EMPLOYER_TAX_UNIT_ARCHIVE');
Line: 1065

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (l_route_id,
              l_tax_unit_context_id,
              2 );
Line: 1077

      insert into ff_routes
             (route_id,
              route_name,
              user_defined_flag,
              description,
              text,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      values (ff_routes_s.nextval,
              'EMPLOYER_TAX_UNIT_ARCHIVE',
              'N',
              'sql to retrieve GRE based employer archived items',
              l_text,
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 1100

     insert into ff_route_parameters
             (ROUTE_PARAMETER_ID,
              ROUTE_ID,
              DATA_TYPE,
              PARAMETER_NAME,
              SEQUENCE_NO )
      select ff_route_parameters_s.nextval,
             ff_routes_s.currval,
             'N',
             'User Entity ID',
             1 from dual;
Line: 1114

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              l_payroll_action_context_id,
              1
              from dual;
Line: 1123

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              l_tax_unit_context_id,
              2
              from dual;
Line: 1166

    select route_id into l_route_id
    from ff_routes where route_name = 'EMPLOYER_JURSD_ARCHIVE';
Line: 1169

    update ff_routes
    set text = l_text
    where route_id = l_route_id;
Line: 1173

    /* delete ff_route_context_usages
     where route_id = l_route_id; */
Line: 1181

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values  (l_route_id,
              l_payroll_action_context_id,
              1);
Line: 1189

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (l_route_id,
              l_tax_unit_context_id,
              2);
Line: 1197

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (l_route_id,
              l_jurisdiction_context_id,
              3 );
Line: 1209

      insert into ff_routes
             (route_id,
              route_name,
              user_defined_flag,
              description,
              text,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      values (ff_routes_s.nextval,
              'EMPLOYER_JURSD_ARCHIVE',
              'N',
              'sql to retrieve GRE based employer archived items',
              l_text,
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 1232

     insert into ff_route_parameters
             (ROUTE_PARAMETER_ID,
              ROUTE_ID,
              DATA_TYPE,
              PARAMETER_NAME,
              SEQUENCE_NO )
      select ff_route_parameters_s.nextval,
             ff_routes_s.currval,
             'N',
             'User Entity ID',
             1 from dual;
Line: 1246

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              l_payroll_action_context_id,
              1
              from dual;
Line: 1255

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              l_tax_unit_context_id,
              2
              from dual;
Line: 1264

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              l_jurisdiction_context_id,
              3
              from dual;
Line: 1306

    select route_id into l_route_id
    from ff_routes where route_name = 'EMPLOYER_JURSD_ARCHIVE_DATE';
Line: 1309

    update ff_routes
    set text = l_text
    where route_id = l_route_id;
Line: 1313

    /* delete ff_route_context_usages
    where route_id = l_route_id; */
Line: 1321

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (l_route_id,
              l_payroll_action_context_id,
              1);
Line: 1329

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (l_route_id,
              l_tax_unit_context_id,
              2);
Line: 1337

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (l_route_id,
              l_jurisdiction_context_id,
              3 );
Line: 1349

      insert into ff_routes
             (route_id,
              route_name,
              user_defined_flag,
              description,
              text,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      values (ff_routes_s.nextval,
              'EMPLOYER_JURSD_ARCHIVE_DATE',
              'N',
              'sql to retrieve GRE based employer archived items',
              l_text,
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 1372

     insert into ff_route_parameters
             (ROUTE_PARAMETER_ID,
              ROUTE_ID,
              DATA_TYPE,
              PARAMETER_NAME,
              SEQUENCE_NO )
      select ff_route_parameters_s.nextval,
             ff_routes_s.currval,
             'N',
             'User Entity ID',
             1 from dual;
Line: 1386

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              l_payroll_action_context_id,
              1
              from dual;
Line: 1395

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              l_tax_unit_context_id,
              2
              from dual;
Line: 1404

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              l_jurisdiction_context_id,
              3
              from dual;
Line: 1446

    select route_id into l_route_id
    from ff_routes where route_name = 'EMPLOYER_JURSD_ARCHIVE_NUMBER';
Line: 1449

    update ff_routes
    set text = l_text
    where route_id = l_route_id;
Line: 1453

    /* delete ff_route_context_usages
    where route_id = l_route_id; */
Line: 1461

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (l_route_id,
              l_payroll_action_context_id,
              1);
Line: 1469

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (l_route_id,
              l_tax_unit_context_id,
              2);
Line: 1477

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (l_route_id,
              l_jurisdiction_context_id,
              3 );
Line: 1489

      insert into ff_routes
             (route_id,
              route_name,
              user_defined_flag,
              description,
              text,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      values (ff_routes_s.nextval,
              'EMPLOYER_JURSD_ARCHIVE_NUMBER',
              'N',
              'sql to retrieve GRE based employer archived items',
              l_text,
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 1512

     insert into ff_route_parameters
             (ROUTE_PARAMETER_ID,
              ROUTE_ID,
              DATA_TYPE,
              PARAMETER_NAME,
              SEQUENCE_NO )
      select ff_route_parameters_s.nextval,
             ff_routes_s.currval,
             'N',
             'User Entity ID',
             1 from dual;
Line: 1526

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              l_payroll_action_context_id,
              1
              from dual;
Line: 1535

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              l_tax_unit_context_id,
              2
              from dual;
Line: 1544

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              l_jurisdiction_context_id,
              3
              from dual;
Line: 1563

    select route_id into l_route_id
    from ff_routes where route_name = 'ASSIGNMENT_ARCHIVE';
Line: 1566

    update ff_routes
    set text = l_text
    where route_id = l_route_id;
Line: 1573

      insert into ff_routes
             (route_id,
              route_name,
              user_defined_flag,
              description,
              text,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      values (ff_routes_s.nextval,
              'ASSIGNMENT_ARCHIVE',
              'N',
              'sql to retrieve Assignment based archived items',
              l_text,
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 1596

     insert into ff_route_parameters
             (ROUTE_PARAMETER_ID,
              ROUTE_ID,
              DATA_TYPE,
              PARAMETER_NAME,
              SEQUENCE_NO )
      select ff_route_parameters_s.nextval,
             ff_routes_s.currval,
             'N',
             'User Entity ID',
             1 from dual;
Line: 1610

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              l_assignment_action_context_id,
              1
              from dual;
Line: 1630

    select route_id into l_route_id
    from ff_routes where route_name = 'ASSIGNMENT_ARCHIVE_DATE';
Line: 1633

    update ff_routes
    set text = l_text
    where route_id = l_route_id;
Line: 1640

      insert into ff_routes
             (route_id,
              route_name,
              user_defined_flag,
              description,
              text,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      values (ff_routes_s.nextval,
              'ASSIGNMENT_ARCHIVE_DATE',
              'N',
              'sql to retrieve Assignment based archived items',
              l_text,
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 1663

     insert into ff_route_parameters
             (ROUTE_PARAMETER_ID,
              ROUTE_ID,
              DATA_TYPE,
              PARAMETER_NAME,
              SEQUENCE_NO )
      select ff_route_parameters_s.nextval,
             ff_routes_s.currval,
             'N',
             'User Entity ID',
             1 from dual;
Line: 1677

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              l_assignment_action_context_id,
              1
              from dual;
Line: 1697

    select route_id into l_route_id
    from ff_routes where route_name = 'ASSIGNMENT_ARCHIVE_NUMBER';
Line: 1700

    update ff_routes
    set text = l_text
    where route_id = l_route_id;
Line: 1707

      insert into ff_routes
             (route_id,
              route_name,
              user_defined_flag,
              description,
              text,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      values (ff_routes_s.nextval,
              'ASSIGNMENT_ARCHIVE_NUMBER', 'N',
              'sql to retrieve Assignment based archived items',
              l_text,
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 1729

     insert into ff_route_parameters
             (ROUTE_PARAMETER_ID,
              ROUTE_ID,
              DATA_TYPE,
              PARAMETER_NAME,
              SEQUENCE_NO )
      select ff_route_parameters_s.nextval,
             ff_routes_s.currval,
             'N',
             'User Entity ID',
             1 from dual;
Line: 1743

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      select  ff_routes_s.currval,
              l_assignment_action_context_id,
              1
              from dual;
Line: 1774

     select route_id into l_route_id
     from ff_routes where route_name = 'ASSIGNMENT_GRE_ARCHIVE';
Line: 1777

     update ff_routes
     set text = l_text
     where route_id = l_route_id;
Line: 1783

      insert into ff_routes
             (route_id,
              route_name,
              user_defined_flag,
              description,
              text,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      values (ff_routes_s.nextval,
              'ASSIGNMENT_GRE_ARCHIVE',
              'N',
              'sql to retrieve Assignment and GRE based archived items',
              l_text,
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 1806

     insert into ff_route_parameters
             (ROUTE_PARAMETER_ID,
              ROUTE_ID,
              DATA_TYPE,
              PARAMETER_NAME,
              SEQUENCE_NO )
      values (ff_route_parameters_s.nextval,
             ff_routes_s.currval,
             'N',
             'User Entity ID',
             1);
Line: 1820

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (ff_routes_s.currval,
              l_assignment_action_context_id,
              1);
Line: 1828

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (ff_routes_s.currval,
              l_tax_unit_context_id,
              2);
Line: 1860

     select route_id into l_route_id
     from ff_routes where route_name = 'ASSIGNMENT_JD_ARCHIVE';
Line: 1863

     update ff_routes
     set text = l_text
     where route_id = l_route_id;
Line: 1869

      insert into ff_routes
             (route_id,
              route_name,
              user_defined_flag,
              description,
              text,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      values (ff_routes_s.nextval,
              'ASSIGNMENT_JD_ARCHIVE',
              'N',
              'sql to retrieve Assignment and JD based archived items',
              l_text,
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 1892

     insert into ff_route_parameters
             (ROUTE_PARAMETER_ID,
              ROUTE_ID,
              DATA_TYPE,
              PARAMETER_NAME,
              SEQUENCE_NO )
      values (ff_route_parameters_s.nextval,
             ff_routes_s.currval,
             'N',
             'User Entity ID',
             1);
Line: 1906

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (ff_routes_s.currval,
              l_assignment_action_context_id,
              1);
Line: 1914

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (ff_routes_s.currval,
              l_jurisdiction_context_id,
              2);
Line: 1951

     select route_id into l_route_id
     from ff_routes where route_name = 'ASSIGNMENT_GRE_CITY_JD_ARCHIVE';
Line: 1954

     update ff_routes
     set text = l_text
     where route_id = l_route_id;
Line: 1961

      insert into ff_routes
             (route_id,
              route_name,
              user_defined_flag,
              description,
              text,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      values (ff_routes_s.nextval,
              'ASSIGNMENT_GRE_CITY_JD_ARCHIVE',
              'N',
              'sql to retrieve Assignment,GRE and city JD based archived items',
              l_text,
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 1984

     insert into ff_route_parameters
             (ROUTE_PARAMETER_ID,
              ROUTE_ID,
              DATA_TYPE,
              PARAMETER_NAME,
              SEQUENCE_NO )
      values (ff_route_parameters_s.nextval,
             ff_routes_s.currval,
             'N',
             'User Entity ID',
             1);
Line: 1998

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (ff_routes_s.currval,
              l_assignment_action_context_id,
              1);
Line: 2006

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (ff_routes_s.currval,
              l_tax_unit_context_id,
              2);
Line: 2014

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (ff_routes_s.currval,
              l_jurisdiction_context_id,
              3);
Line: 2051

     select route_id into l_route_id
     from ff_routes where route_name = 'ASSIGNMENT_GRE_COUNTY_JD_ARCHIVE';
Line: 2054

     update ff_routes
     set text = l_text
     where route_id = l_route_id;
Line: 2061

      insert into ff_routes
             (route_id,
              route_name,
              user_defined_flag,
              description,
              text,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      values (ff_routes_s.nextval,
              'ASSIGNMENT_GRE_COUNTY_JD_ARCHIVE',
              'N',
              'sql to retrieve Assignment,GRE and county JD based archived items',
              l_text,
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 2084

     insert into ff_route_parameters
             (ROUTE_PARAMETER_ID,
              ROUTE_ID,
              DATA_TYPE,
              PARAMETER_NAME,
              SEQUENCE_NO )
      values (ff_route_parameters_s.nextval,
             ff_routes_s.currval,
             'N',
             'User Entity ID',
             1);
Line: 2098

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (ff_routes_s.currval,
              l_assignment_action_context_id,
              1);
Line: 2106

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (ff_routes_s.currval,
              l_tax_unit_context_id,
              2);
Line: 2114

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (ff_routes_s.currval,
              l_jurisdiction_context_id,
              3);
Line: 2150

     select route_id into l_route_id
     from ff_routes where route_name = 'ASSIGNMENT_GRE_STATE_JD_ARCHIVE';
Line: 2153

     update ff_routes
     set text = l_text
     where route_id = l_route_id;
Line: 2160

      insert into ff_routes
             (route_id,
              route_name,
              user_defined_flag,
              description,
              text,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      values (ff_routes_s.nextval,
              'ASSIGNMENT_GRE_STATE_JD_ARCHIVE',
              'N',
              'sql to retrieve Assignment,GRE and state JD based archived items',
              l_text,
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 2183

     insert into ff_route_parameters
             (ROUTE_PARAMETER_ID,
              ROUTE_ID,
              DATA_TYPE,
              PARAMETER_NAME,
              SEQUENCE_NO )
      values (ff_route_parameters_s.nextval,
             ff_routes_s.currval,
             'N',
             'User Entity ID',
             1);
Line: 2197

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (ff_routes_s.currval,
              l_assignment_action_context_id,
              1);
Line: 2205

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (ff_routes_s.currval,
              l_tax_unit_context_id,
              2);
Line: 2213

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (ff_routes_s.currval,
              l_jurisdiction_context_id,
              3);
Line: 2249

     select route_id into l_route_id
     from ff_routes where route_name = 'ASSIGNMENT_GRE_SCHOOL_JD_ARCHIVE';
Line: 2252

     update ff_routes
     set text = l_text
     where route_id = l_route_id;
Line: 2259

      insert into ff_routes
             (route_id,
              route_name,
              user_defined_flag,
              description,
              text,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      values (ff_routes_s.nextval,
              'ASSIGNMENT_GRE_SCHOOL_JD_ARCHIVE',
              'N',
              'sql to retrieve Assignment,GRE and school JD based archived items',
              l_text,
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 2282

     insert into ff_route_parameters
             (ROUTE_PARAMETER_ID,
              ROUTE_ID,
              DATA_TYPE,
              PARAMETER_NAME,
              SEQUENCE_NO )
      values (ff_route_parameters_s.nextval,
             ff_routes_s.currval,
             'N',
             'User Entity ID',
             1);
Line: 2296

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (ff_routes_s.currval,
              l_assignment_action_context_id,
              1);
Line: 2304

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (ff_routes_s.currval,
              l_tax_unit_context_id,
              2);
Line: 2312

      insert into ff_route_context_usages
             (route_id,
              context_id,
              sequence_no)
      values (ff_routes_s.currval,
              l_jurisdiction_context_id,
              3);
Line: 2351

  select ue.notfound_allowed_flag,
         ue.creator_type,
         ue.entity_description,
         ue.route_id,
         dbi.null_allowed_flag,
         dbi.description ,
         dbi.data_type
         into l_ue_notfound_allowed_flag,
         l_ue_creator_type,
         l_ue_entity_description,
         l_live_route_id,
         l_dbi_null_allowed_flag,
         l_dbi_description,
         l_dbi_data_type
         from ff_database_items dbi,
              ff_user_entities ue
         where dbi.user_name = SUBSTR(p_item_name,3,LENGTH(p_item_name)-2)
         and dbi.user_entity_id = ue.user_entity_id;
Line: 2372

 select count(1) into l_asg_count from ff_route_context_usages rc,
                      ff_contexts c
        where rc.context_id = c.context_id
        and rc.route_id = l_live_route_id
        and context_name like 'ASSIGNMENT%';
Line: 2378

 select ff_user_entities_s.nextval into l_user_entity_seq
        from dual;
Line: 2382

 select route_id into l_er_archive_route_id
        from ff_routes where
        route_name = 'EMPLOYER_ARCHIVE';
Line: 2386

 select route_id into l_er_archive_date_route_id
        from ff_routes where
        route_name = 'EMPLOYER_ARCHIVE_DATE';
Line: 2390

 select route_id into l_er_archive_number_route_id
        from ff_routes where
        route_name = 'EMPLOYER_ARCHIVE_NUMBER';
Line: 2394

 select route_id into l_ass_archive_route_id
        from ff_routes where
        route_name = 'ASSIGNMENT_ARCHIVE';
Line: 2398

 select route_id into l_ass_archive_date_route_id
        from ff_routes where
        route_name = 'ASSIGNMENT_ARCHIVE_DATE';
Line: 2402

 select route_id into l_ass_archive_number_route_id
        from ff_routes where
        route_name = 'ASSIGNMENT_ARCHIVE_NUMBER';
Line: 2425

 select ROUTE_PARAMETER_ID into l_route_parameter_id
        from ff_route_parameters
        where parameter_name = 'User Entity ID'
        and route_id = l_route_id;
Line: 2430

 insert into ff_user_entities
             (user_entity_id,
              business_group_id,
              legislation_code,
              route_id,
              notfound_allowed_flag,
              user_entity_name,
              creator_id,
              creator_type,
              entity_description,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      values( l_user_entity_seq,              /* user_entity_id */
              null,			     /* business_group_id */
              'US',			     /* legislation_code */
              l_route_id,		     /* route_id */
              l_ue_notfound_allowed_flag,    /* notfound_allowed_flag */
              p_item_name,		     /* user_entity_name */
              0,			     /* creator_id */
              'X',               	     /* archive extract creator_type */
	      substr('Archive of '||l_ue_creator_type||' entity '||
              l_ue_entity_description,1,240),/* entity_description */
              sysdate,			     /* last_update_date */
              0,			     /* last_updated_by */
              0,			     /* last_update_login */
              0,			     /* created_by */
              sysdate);          	     /* creation_date */
Line: 2461

        insert into ff_route_parameter_values (
              route_parameter_id,
              user_entity_id,
              value,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      --
      values( l_route_parameter_id,
              l_user_entity_seq,
              l_user_entity_seq,
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 2480

        insert into ff_database_items (
              user_name,
              user_entity_id,
              data_type,
              definition_text,
              null_allowed_flag,
              description,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
      --
      values( p_item_name,
              l_user_entity_seq,
              l_dbi_data_type,
              l_definition_text,
              l_dbi_null_allowed_flag,
              substr('Archive of item '||l_dbi_description,1,240),
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 2560

  select ue.notfound_allowed_flag,
         ue.creator_type,
         ue.entity_description,
         ue.route_id,
         dbi.null_allowed_flag,
         dbi.description ,
         dbi.data_type
         from ff_database_items dbi,
              ff_user_entities ue
         where dbi.user_name = SUBSTR(p_item_name,3,LENGTH(p_item_name)-2)
         and dbi.user_entity_id = ue.user_entity_id;
Line: 2573

  select c.context_name,
         rc.context_id,
         rc.sequence_no
         from ff_route_context_usages rc,
         ff_contexts c
         where rc.context_id = c.context_id
         and rc.route_id= l_live_route_id
         order by 3;
Line: 2583

         select user_entity_id,
                route_id
         from ff_user_entities
         where user_entity_name = p_item_name;
Line: 2589

         select jurisdiction_level
         from pay_balance_types pbt,
              pay_defined_balances pdb
         where pbt.balance_type_id = pdb.balance_type_id
         and   pdb.defined_balance_id = p_defined_balance_id;
Line: 2601

 	select route_id into l_er_archive_route_id
        from ff_routes where
        route_name = 'EMPLOYER_ARCHIVE';
Line: 2605

 	select route_id into l_er_archive_date_route_id
        from ff_routes where
        route_name = 'EMPLOYER_ARCHIVE_DATE';
Line: 2609

 	select route_id into l_er_archive_number_route_id
        from ff_routes where
        route_name = 'EMPLOYER_ARCHIVE_NUMBER';
Line: 2613

 	select route_id into l_er_tax_unit_arch_rid
        from ff_routes where
        route_name = 'EMPLOYER_TAX_UNIT_ARCHIVE';
Line: 2617

 	select route_id into l_er_tax_unit_arch_date_rid
        from ff_routes where
        route_name = 'EMPLOYER_TAX_UNIT_ARCHIVE_DATE';
Line: 2621

 	select route_id into l_er_tax_unit_arch_number_rid
        from ff_routes where
        route_name = 'EMPLOYER_TAX_UNIT_ARCHIVE_NUMBER';
Line: 2625

 	select route_id into l_er_jursd_arch_rid
        from ff_routes where
        route_name = 'EMPLOYER_JURSD_ARCHIVE';
Line: 2629

 	select route_id into l_er_jursd_arch_date_rid
        from ff_routes where
        route_name = 'EMPLOYER_JURSD_ARCHIVE_DATE';
Line: 2633

 	select route_id into l_er_jursd_arch_number_rid
        from ff_routes where
        route_name = 'EMPLOYER_JURSD_ARCHIVE_NUMBER';
Line: 2637

 	select route_id into l_ass_archive_route_id
        from ff_routes where
        route_name = 'ASSIGNMENT_ARCHIVE';
Line: 2641

 	select route_id into l_ass_archive_date_route_id
        from ff_routes where
        route_name = 'ASSIGNMENT_ARCHIVE_DATE';
Line: 2645

 	select route_id into l_ass_archive_number_route_id
        from ff_routes where
        route_name = 'ASSIGNMENT_ARCHIVE_NUMBER';
Line: 2649

 	select route_id into l_ass_gre_archive_route_id
        from ff_routes where
        route_name = 'ASSIGNMENT_GRE_ARCHIVE';
Line: 2653

 	select route_id into l_ass_jd_archive_route_id
        from ff_routes where
        route_name = 'ASSIGNMENT_JD_ARCHIVE';
Line: 2658

select route_id into l_ass_gre_jd_archive_route_id
        from ff_routes where
        route_name = 'ASSIGNMENT_GRE_JD_ARCHIVE';
Line: 2662

 	select route_id into l_ass_gre_ct_jd_arch_route_id
        from ff_routes where
        route_name = 'ASSIGNMENT_GRE_CITY_JD_ARCHIVE';
Line: 2666

 	select route_id into l_ass_gre_cn_jd_arch_route_id
        from ff_routes where
        route_name = 'ASSIGNMENT_GRE_COUNTY_JD_ARCHIVE';
Line: 2670

 	select route_id into l_ass_gre_st_jd_arch_route_id
        from ff_routes where
        route_name = 'ASSIGNMENT_GRE_STATE_JD_ARCHIVE';
Line: 2674

 	select route_id into l_ass_gre_sd_jd_arch_route_id
        from ff_routes where
        route_name = 'ASSIGNMENT_GRE_SCHOOL_JD_ARCHIVE';
Line: 2838

      select ROUTE_PARAMETER_ID into l_route_parameter_id
      from ff_route_parameters
      where parameter_name = 'User Entity ID'
      and route_id = l_route_id;
Line: 2851

         /* Update the route id if required */
         if l_route_id <> l_exist_route_id then

             hr_utility.trace ('Existing Route  id : '||
                                to_char(l_exist_route_id));
Line: 2860

            update ff_user_entities
            set route_id = l_route_id
            where user_entity_id = l_user_entity_id;
Line: 2864

            update ff_route_parameter_values
            set route_parameter_id = l_route_parameter_id
            where user_entity_id = l_user_entity_id;
Line: 2872

 	 select ff_user_entities_s.nextval
         into l_user_entity_seq
         from dual;
Line: 2876

         insert into ff_user_entities
              (user_entity_id,
              business_group_id,
              legislation_code,
              route_id,
              notfound_allowed_flag,
              user_entity_name,
              creator_id,
              creator_type,
              entity_description,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
          values( l_user_entity_seq,         /* user_entity_id */
              null,			     /* business_group_id */
              'US',			     /* legislation_code */
              l_route_id,		     /* route_id */
              l_ue_notfound_allowed_flag,    /* notfound_allowed_flag */
              p_item_name,		     /* user_entity_name */
              0,			     /* creator_id */
              'X',               	     /* archive extract creator_type */
	      substr('Archive of '||l_ue_creator_type||' entity '||
              l_ue_entity_description,1,240),/* entity_description */
              sysdate,			     /* last_update_date */
              0,			     /* last_updated_by */
              0,			     /* last_update_login */
              0,			     /* created_by */
              sysdate);          	     /* creation_date */
Line: 2907

          insert into ff_route_parameter_values (
              route_parameter_id,
              user_entity_id,
              value,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
          values( l_route_parameter_id,
              l_user_entity_seq,
              l_user_entity_seq,
              sysdate,
              0,
              0,
              0,
              sysdate);
Line: 2925

          insert into ff_database_items (
              user_name,
              user_entity_id,
              data_type,
              definition_text,
              null_allowed_flag,
              description,
              last_update_date,
              last_updated_by,
              last_update_login,
              created_by,
              creation_date)
          values( p_item_name,
              l_user_entity_seq,
              l_dbi_data_type,
              l_definition_text,
              l_dbi_null_allowed_flag,
              substr('Archive of item '||l_dbi_description,1,240),
              sysdate,
              0,
              0,
              0,
              sysdate);