DBA Data[Home] [Help]

APPS.HRSTRDBI SQL Statements

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

Line: 171

                              New procedure insert_user_tables to seed
                              user tables.
     alogue     16-MAR-1999 - R11.5 Entity Horizon changes:
                              Outer join for per_phones in SEH_PER_PERSON_DETAILS
                              New ACCRUAL formula type.
                              Route ACCRUAL_PLAN_VALUES and its dbitems.
                              Route CARRIED_OVER_VALUES and its dbitems.
                              Route ACCRUAL_PLAN_SERVICE_DATES and its dbitems.
                              Route ACCRUAL_PLAN_DATES and its dbitems.
                              Added TEMPLATE_BIS_DAYS_TO_HOURS, TEMPLATE_FTE,
                              TEMPLATE_HEAD, EXAMPLE_BIS_OT_BAND1 to
                              ff_formulas_f.
                              Created insert_formula to insert PTO_PAYROLL_CARRYOVER,
                              PTO_PAYROLL_PERIOD_ACCRUAL, PTO_PAYROLL_CALCULATION,
                              PTO_ROLLING_CARRYOVER, PTO_ROLLING_PERIOD_ACCRUAL,
                              PTO_ROLLING_ACCRUAL, PTO_SIMPLE_CARRYOVER,
                              PTO_SIMPLE_PERIOD_ACCRUAL, PTO_SIMPLE_MULTIPLIER
                              into ff_formulas_f.
                              Created insert_functions to insert GET_HOURS_WORKED,
                              CURRENCY_CONVERT_AMOUNT, GET_RATE_TYPE,
                              CHECK_RATE_TYPE and accrual functions
                              into ff_functions.
     alogue     11-JAN-1999 - R11.5 Entity Horizon changes:
                              OAB and other new ff_contexts, route
                              ASSIGNMENT_BUDGET_VALUES and dbitems,
                              ASSIGNMENT_FULL_TIME_CONDITIONS route
                              and dbitems.
                              R11.5 change whereby date contexts are passed
                              into routes as dates (and thus don't require
                              a to_date() on them).
                              Change to SEH_SADMIN_LAST_PERFORM_REV route.
                              New routes SEH_CON_PERSON_DETAILS_2,
                              SEH_ASS_PERSON_DETAILS_3, SEH_PER_PERSON_DETAILS_2
                              and dbitems.
     alogue     13-JUL-1998 - Legislative Check formula type.
     alogue     20-MAY-1998 - Performance fixes for SEH_ASS_PERSON_DETAILS and
                              SEH_PER_PERSON_DETAILS routes.
     alogue     13-NOV-1997 - Rename PER_CONTACTS table to
                              PER_CONTACT_RELATIONSHIPS.
     alogue     11-NOV-1997 - user entity PAY_PAYROLLS_ENTITY fix.
     alogue     07-NOV-1997 - New database item EMP_PROJ_TERM_DATE.
     rfine      13-OCT-97   110.5  563034  Changed parent table name from
                                           PER_PEOPLE_F to PER_ALL_PEOPLE_F
     alogue     07-OCT-1997 - fix of SEH_ASS_PERSON_DETAILS route.
     alogue     12-AUG-1997 - per_phones put into various routes
     alogue     07-AUG-1997 - ff_context TAX_GROUP.
     alogue     05-AUG-1997 - Rename use of fnd_territories to
                              fnd_territories_vl.
     alogue     29-MAY-1997 - Fix to PAY_PAYROLLS_ROUTE.
     alogue     19-MAY-1997 - Renamed database item ARREARS_FLAG to
                              PAYROLL_ARREARS_FLAG.
     alogue     07-APR-1997 - New routes: TARGET_PAYROLL_ACTION_ROUTE
                              (for action_type item) and PAY_PAYROLLS_ROUTE
                              (for arrears_flag item) for advance pay.
                              Also tidy up reflecting bug 374466
                              SEH_ASS_PERSON_DETAILS route fix.
     mwcallag   01-SEP-1995 - sysdate and Session date routes and DB items
                              added.
     mwcallag   24-APR-1995 - Cheque number DB items added (UK, US spelling).
     mwcallag   31-MAR-1995 - Entity for PAY_PROC_PERIOD_NUMBER DB items now
                              has not_found_allowed = 'Y'.
     mwcallag   06-JAN-1995 - Performance changes resulting from the DEC
                              Benchmark.  These include:
                              --
                              A new route : SEH_ASS_PERSON_DETAILS_2  - this
                              holds DB items that were previously being slowed
                              down in route SEH_ASS_PERSON_DETAILS.
                              --
                              Index for pay_basis_id disabled in the route
                              SEH_SADMIN_SALARY_ELEMENT.
                              --
                              The following routes used to use the synonym
                              fnd_lookups.  Originally this was a simple
                              table, but now is a complex view, and hence
                              these routes now refer to the view hr_lookups,
                              and also use the application id column (= 800)
                              for improved performance:
                              SEH_PER_PERSON_DETAILS
                              SEH_ASS_PERSON_DETAILS
                              SEH_CON_PERSON_DETAILS
                              SEH_REC_DETAILS
                              SEH_SUP_DETAILS
                              --
                              The following routes use the view hr_lookups.
                              They have been modified to also use the
                              application id column (= 800) for improved
                              performance:
                              SEH_EMP_PERSON_SERVICE_2
                              SEH_SADMIN_SALARY_BASIS
                              SEH_SADMIN_SALARY_PROPOSALS
                              SEH_ASSIGN_HR_ADDRESS_US
                              SEH_ASSIGN_ADDRESS_US
                              SEH_ASSIGN_HR_ADDRESS_UK
                              SEH_ASSIGN_ADDRESS_UK
                              --
     mwcallag   24-OCT-1994 - New context of ORIGINAL_ENTRY_ID added to
                              payroll and element skip formual types
     mwcallag   15-OCT-1994 - Various changes ready for US benchmark:
                              Date restriction added to Person and contact
                              address routes (bug no. 240009).
                              SEH_PAY_DETAILS route now uses the context of
                              payroll action rather than payroll id to improve
                              performance.
                              New DB item added to route SEH_PAY_DETAILS:
                              PAY_PROC_PERIOD_NUMBER
                              PAY_PROC_PERIOD_ID
                              PAY_PROC_PERIOD_NAME
                              --
                              'PAY_PROC_PERIOD_NUMBER' replaces the old
                              'ASG_PROC_PERIOD_NUMBER' DB item.
                              ASG_LAST_PROC_PERIOD_NUMBER route changed to use
                              the context of assignment id (the previous
                              change to use payroll action was wrong), also
                              uses the DB change of time_period_id on the
                              payroll actions table to improve performance.
                              New DB item added to this route:
                              ASG_LAST_PROC_PERIOD_NAME
                              ASG_LAST_PROC_PERIOD_ID
                              ASG_LAST_PROC_PAYROLL_NAME
                              --
     mwcallag   28-JUL-1994 - Payroll period DB items added.
     mwcallag   16-JUN-1994 - Route SEH_EMP_PERSON_SERVICE_2 altered, nvl
                              added.
                              This ensures a row is always returned.
     mwcallag   29-APR-1994 - Route SEH_ASS_LAST_PER_NUM tuned, now uses the
                              context of payroll action id rather than
                              assignment id. (ASG_LAST_PROC_PERIOD_NUMBER).
                              Route SEH_EMP_PERSON_SERVICE split into 2 for
                              performance purposes.
     mwcallag   25-MAR-1994 - Not found flag for all ASG_%_LAST% DB item
                              set to yes.
     mwcallag   18-MAR-1994 - Not found flag for ASG_LAST_PROC_PERIOD_NUMBER
                              set to yes - there wont be an entry for the
                              first run.
     mwcallag   28-FEB-1994 - Database name changed from 'ASS_%' to 'ASG_%'.
     mwcallag   11-JAN-1994 - New context of Element type id added to
                              ff_contexts.
     mwcallag   06-JAN-1994 - Contact routes changed to use contact_person_id.
     mwcallag   15-DEC-1993 - HR location (general, GB and US) DB items added.
                              G417 ASS_SALARY changed to Number data type.
                              ASS_SALARY_BASIS_CODE DB item added.
     mwcallag   09-DEC-1993 - G337 Payroll DB items added: PAY_PERIODS_PER_YEAR
                              and PAY_PROC_PERIOD_DATE_PAID.
     mwcallag   02-DEC-1993 - Salary Admin Db items added.
     mwcallag   02-NOV-1993 - 'User Table Validation' formula type added.
     mwcallag   22-OCT-1993 - Further formula types and contexts added.
     mwcallag   08-OCT-1993 - Payroll DB items : null allowed set to 'N'.
     mwcallag   07-SEP-1993 - ********************************
                              * DIVERGENCE FROM FROZEN CODE  *
                              ********************************
                              More Static DB items added, together with
                              new routes for payroll processing.
     mwcallag   31-AUG-1993 - Person type definition texts changed from
                              'system_person_type' to 'user_person_type'.
                              Payroll formula type changed to include fewer
                              context usages.
     mwcallag   11-AUG-1993 - New contexts for payment formula type.
     mwcallag   22-JUL-1993 - Routine split into 2 procedures for easier
                              re-building.
     mwcallag   20-JUL-1993 - Some DB items changed from number to text type.
     mwcallag   21-JUN-1993 - 'Element Input Validation' formula type added.
     mwcallag   15-JUN-1993 - minor changes to routes to ensure a row is
                              always returned (outer joins added, etc).
     mwcallag   04-JUN-1993 - general mods and application details route added
     mwcallag   28-MAY-1993 - minor change to person assignment details route.
     mwcallag   26-MAY-1993 - creator type changed following database change.
     mwcallag   17-MAY-1993 - created.
*/
procedure insert_context is
--
--   +==================================================================+
--   |    Insert FF contexts                                            |
--   +==================================================================+
--
begin
   declare
      procedure do_insert (l_context_name varchar2, l_data_type varchar2) is
         x number;
Line: 352

         hr_utility.set_location('hrstrdbi.ff_context_do_insert', 1);
Line: 353

         insert into ff_contexts
         (context_id,
          context_level,
          context_name,
          data_type)
         values
         (ff_contexts_s.nextval,
          x,
          l_context_name,
          l_data_type);
Line: 365

      do_insert ('BUSINESS_GROUP_ID',     'N');
Line: 366

      do_insert ('PAYROLL_ID',            'N');
Line: 367

      do_insert ('PAYROLL_ACTION_ID',     'N');
Line: 368

      do_insert ('ASSIGNMENT_ID',         'N');
Line: 369

      do_insert ('ASSIGNMENT_ACTION_ID',  'N');
Line: 370

      do_insert ('DATE_EARNED',           'D');
Line: 371

      do_insert ('ORG_PAY_METHOD_ID',     'N');
Line: 372

      do_insert ('PER_PAY_METHOD_ID',     'N');
Line: 373

      do_insert ('ORGANIZATION_ID',       'N');
Line: 374

      do_insert ('TAX_UNIT_ID',           'N');
Line: 375

      do_insert ('JURISDICTION_CODE',     'T');
Line: 376

      do_insert ('BALANCE_DATE',          'D');
Line: 377

      do_insert ('ELEMENT_ENTRY_ID',      'N');
Line: 378

      do_insert ('ELEMENT_TYPE_ID',       'N');
Line: 379

      do_insert ('ORIGINAL_ENTRY_ID',     'N');
Line: 380

      do_insert ('TAX_GROUP',             'T');
Line: 381

      do_insert ('PGM_ID',                'N');
Line: 382

      do_insert ('PL_ID',                 'N');
Line: 383

      do_insert ('PL_TYP_ID',             'N');
Line: 384

      do_insert ('OPT_ID',                'N');
Line: 385

      do_insert ('LER_ID',                'N');
Line: 386

      do_insert ('COMM_TYP_ID',           'N');
Line: 387

      do_insert ('ACT_TYP_ID',            'N');
Line: 388

      do_insert ('ACCRUAL_PLAN_ID',       'N');
Line: 389

      do_insert ('PERSON_ID',             'N');
Line: 390

      do_insert ('SOURCE_ID',             'N');
Line: 391

      do_insert ('SOURCE_TEXT',           'T');
Line: 399

       procedure do_insert
       (
           p_formula_type_name  in varchar2
       ) is
       begin
           hr_utility.set_location('hrstrdbi.ff_type_do_insert', 1);
Line: 405

           insert into ff_formula_types
                 (formula_type_id,
                  formula_type_name,
                  last_update_date,
                  last_updated_by,
                  last_update_login,
                  created_by,
                  creation_date)
          values (ff_formula_types_s.nextval,
                  p_formula_type_name,
                  sysdate,
                  0,
                  0,
                  0,
                  sysdate);
Line: 420

       end do_insert;
Line: 422

       do_insert ('Oracle Payroll');
Line: 423

       hr_utility.set_location('hrstrdbi.insert_context', 1);
Line: 424

       insert into ff_ftype_context_usages (formula_type_id, context_id)
       select ff_formula_types_s.currval, CON.context_id
       from ff_contexts CON
       where context_name in ('BUSINESS_GROUP_ID',
                              'PAYROLL_ID',
                              'PAYROLL_ACTION_ID',
                              'ASSIGNMENT_ID',
                              'ASSIGNMENT_ACTION_ID',
                              'DATE_EARNED',
			      'TAX_UNIT_ID',
			      'JURISDICTION_CODE',
			      'BALANCE_DATE',
                              'ELEMENT_ENTRY_ID',
                              'ELEMENT_TYPE_ID',
                              'ORIGINAL_ENTRY_ID',
                              'SOURCE_ID',
                              'TAX_GROUP',
                              'SOURCE_TEXT');
Line: 443

       do_insert ('Payment');
Line: 444

       hr_utility.set_location('hrstrdbi.insert_context', 2);
Line: 445

       insert into ff_ftype_context_usages (formula_type_id, context_id)
       select ff_formula_types_s.currval, CON.context_id
       from ff_contexts CON
       where context_name in ('BUSINESS_GROUP_ID',
                              'PAYROLL_ID',
                              'PAYROLL_ACTION_ID',
                              'ASSIGNMENT_ID',
                              'ASSIGNMENT_ACTION_ID',
                              'DATE_EARNED',
			      'ORG_PAY_METHOD_ID',
			      'PER_PAY_METHOD_ID',
			      'ORGANIZATION_ID',
			      'TAX_UNIT_ID',
			      'JURISDICTION_CODE');
Line: 460

       do_insert ('Assignment Set');
Line: 461

       hr_utility.set_location('hrstrdbi.insert_context', 3);
Line: 462

       insert into ff_ftype_context_usages (formula_type_id, context_id)
       select ff_formula_types_s.currval, CON.context_id
       from ff_contexts CON
       where context_name in ('DATE_EARNED', 'ASSIGNMENT_ID');
Line: 467

       do_insert ('QuickPaint');
Line: 468

       hr_utility.set_location('hrstrdbi.insert_context', 4);
Line: 469

       insert into ff_ftype_context_usages (formula_type_id, context_id)
       select ff_formula_types_s.currval, CON.context_id
       from ff_contexts CON
       where context_name in ('DATE_EARNED', 'ASSIGNMENT_ID');
Line: 474

       do_insert ('Element Input Validation');
Line: 475

       hr_utility.set_location('hrstrdbi.insert_context', 5);
Line: 476

       insert into ff_ftype_context_usages (formula_type_id, context_id)
       select ff_formula_types_s.currval, CON.context_id
       from ff_contexts CON
       where context_name in ('DATE_EARNED',
                              'ASSIGNMENT_ID', 'BUSINESS_GROUP_ID');
Line: 482

       do_insert ('Element Skip');
Line: 483

       hr_utility.set_location('hrstrdbi.insert_context', 6);
Line: 484

       insert into ff_ftype_context_usages (formula_type_id, context_id)
       select ff_formula_types_s.currval, CON.context_id
       from ff_contexts CON
       where context_name in ('BUSINESS_GROUP_ID',
                              'PAYROLL_ID',
                              'PAYROLL_ACTION_ID',
                              'ASSIGNMENT_ID',
                              'ASSIGNMENT_ACTION_ID',
                              'DATE_EARNED',
                              'TAX_UNIT_ID',
                              'JURISDICTION_CODE',
			      'ELEMENT_ENTRY_ID',
                              'ELEMENT_TYPE_ID',
                              'ORIGINAL_ENTRY_ID',
                              'SOURCE_ID',
                              'TAX_GROUP');
Line: 501

       do_insert ('Legislative Check');
Line: 502

       hr_utility.set_location('hrstrdbi.insert_context', 7);
Line: 503

       insert into ff_ftype_context_usages (formula_type_id, context_id)
       select ff_formula_types_s.currval, CON.context_id
       from ff_contexts CON
       where context_name in ('ASSIGNMENT_ID',
                              'ASSIGNMENT_ACTION_ID',
                              'DATE_EARNED');
Line: 510

       do_insert ('Accrual');
Line: 511

       hr_utility.set_location('hrstrdbi.insert_context', 8);
Line: 512

       insert into ff_ftype_context_usages (formula_type_id, context_id)
       select ff_formula_types_s.currval, CON.context_id
       from ff_contexts CON
       where context_name in ('ASSIGNMENT_ID',
                              'ASSIGNMENT_ACTION_ID',
                              'DATE_EARNED',
                              'ACCRUAL_PLAN_ID',
                              'PAYROLL_ID',
                              'BUSINESS_GROUP_ID',
                              'PERSON_ID');
Line: 523

       do_insert ('Accrual Subformula');
Line: 524

       hr_utility.set_location('hrstrdbi.insert_context', 9);
Line: 525

       insert into ff_ftype_context_usages (formula_type_id, context_id)
       select ff_formula_types_s.currval, CON.context_id
       from ff_contexts CON
       where context_name in ('ASSIGNMENT_ID',
                              'DATE_EARNED',
                              'ACCRUAL_PLAN_ID',
                              'PAYROLL_ID',
                              'BUSINESS_GROUP_ID');
Line: 534

       do_insert ('Accrual Carryover');
Line: 535

       hr_utility.set_location('hrstrdbi.insert_context', 10);
Line: 536

       insert into ff_ftype_context_usages (formula_type_id, context_id)
       select ff_formula_types_s.currval, CON.context_id
       from ff_contexts CON
       where context_name in ('ASSIGNMENT_ID',
                              'DATE_EARNED',
                              'ACCRUAL_PLAN_ID',
                              'PAYROLL_ID',
                              'BUSINESS_GROUP_ID');
Line: 545

       do_insert ('Accrual Ineligibility');
Line: 546

       hr_utility.set_location('hrstrdbi.insert_context', 11);
Line: 547

       insert into ff_ftype_context_usages (formula_type_id, context_id)
       select ff_formula_types_s.currval, CON.context_id
       from ff_contexts CON
       where context_name in ('ASSIGNMENT_ID',
                              'DATE_EARNED',
                              'ACCRUAL_PLAN_ID',
                              'PAYROLL_ID',
                              'BUSINESS_GROUP_ID');
Line: 556

       do_insert ('Net to Gross');
Line: 557

       hr_utility.set_location('hrstrdbi.insert_context', 12);
Line: 558

       insert into ff_ftype_context_usages (formula_type_id, context_id)
       select ff_formula_types_s.currval, CON.context_id
       from ff_contexts CON
       where context_name in ('BUSINESS_GROUP_ID',
                              'PAYROLL_ID',
                              'PAYROLL_ACTION_ID',
                              'ASSIGNMENT_ID',
                              'DATE_EARNED',
                              'ELEMENT_ENTRY_ID',
                              'ASSIGNMENT_ACTION_ID',
                              'ELEMENT_TYPE_ID');
Line: 570

       do_insert('CAGR');
Line: 571

       hr_utility.set_location('hrstrdbi.insert_context', 13);
Line: 572

       insert into ff_ftype_context_usages (formula_type_id, context_id)
       select ff_formula_types_s.currval, CON.context_id
       from ff_contexts CON
       where context_name in ('BUSINESS_GROUP_ID',
                              'PAYROLL_ID',
                              'ASSIGNMENT_ID',
                              'DATE_EARNED',
                              'ORGANIZATION_ID',
                              'TAX_UNIT_ID',
                              'PERSON_ID');
Line: 583

       do_insert('Promotion');
Line: 584

       hr_utility.set_location('hrstrdbi.insert_context', 14);
Line: 585

       insert into ff_ftype_context_usages (formula_type_id, context_id)
       select ff_formula_types_s.currval, CON.context_id
       from ff_contexts CON
       where context_name in ('ASSIGNMENT_ID',
                              'DATE_EARNED');
Line: 591

       do_insert('Payroll Run Proration');
Line: 592

       hr_utility.set_location('hrstrdbi.insert_context', 15);
Line: 593

       insert into ff_ftype_context_usages (formula_type_id, context_id)
       select ff_formula_types_s.currval, CON.context_id
       from ff_contexts CON
       where context_name in ('BUSINESS_GROUP_ID',
                              'PAYROLL_ID',
                              'PAYROLL_ACTION_ID',
                              'ASSIGNMENT_ID',
                              'ASSIGNMENT_ACTION_ID',
                              'DATE_EARNED',
                              'TAX_UNIT_ID',
                              'JURISDICTION_CODE',
                              'BALANCE_DATE',
                              'ELEMENT_ENTRY_ID',
                              'ELEMENT_TYPE_ID',
                              'ORIGINAL_ENTRY_ID',
                              'TAX_GROUP',
                              'SOURCE_ID',
                              'SOURCE_TEXT');
Line: 614

       do_insert ('User Table Validation');
Line: 617

end insert_context;
Line: 619

PROCEDURE insert_routes_db_items is
l_text                          long;
Line: 634

procedure insert_route_parameters
(
    p_parameter_name  in  varchar2,
    p_data_type       in  varchar2,
    p_sequence_no     in  number
) is
begin
    hr_utility.set_location('hrstrdbi.insert_route_parameters', 1);
Line: 642

    insert into ff_route_parameters
          (route_id,
           sequence_no,
           parameter_name,
           data_type,
           route_parameter_id)
   select  ff_routes_s.currval,
           p_sequence_no,
           p_parameter_name,
           p_data_type,
           ff_route_parameters_s.nextval
   from    dual;
Line: 654

end insert_route_parameters;
Line: 658

procedure insert_route_parameter_values
(
    p_route_parameter_id  in  number,
    p_value               in  varchar2
) is
begin
    hr_utility.set_location('hrstrdbi.insert_route_parameter_values', 1);
Line: 665

    insert into ff_route_parameter_values
           (route_parameter_id,
            user_entity_id,
            value,
            last_update_date,
            creation_date)
    values (p_route_parameter_id,
            ff_user_entities_s.currval,
            p_value,
            sysdate,
            sysdate);
Line: 676

end insert_route_parameter_values;
Line: 680

procedure insert_route_context_usages
(
    p_context_id    in  number,
    p_sequence_no   in  number
) is
begin
    hr_utility.set_location('hrstrdbi.insert_route_context_usages', 1);
Line: 687

    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: 695

end insert_route_context_usages;
Line: 699

procedure insert_user_entity
(
    p_user_entity_name       in varchar2,
    p_description            in varchar2,
    p_notfound_allowed_flag  in varchar2 default 'N'
) is
begin
    hr_utility.set_location('hrstrdbi.insert_user_entity', 1);
Line: 707

    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,
            null,
            ff_routes_s.currval,
            p_notfound_allowed_flag,
            p_user_entity_name,
            0,
            'SEH',
            p_description,
            sysdate,
            0,
            0,
            0,
            sysdate);
Line: 737

end insert_user_entity;
Line: 741

procedure insert_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('hrstrdbi.insert_database_item', 1);
Line: 752

    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: 776

end insert_database_item;
Line: 781

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: 789

    hr_utility.set_location('hrstrdbi.insert_route', 1);
Line: 790

    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: 811

end insert_route;
Line: 819

    hr_utility.set_location('hrstrdbi.insert_routes_db_items', 1);
Line: 820

    select context_id
    into   l_date_earned_context_id
    from   ff_contexts
    where  context_name = 'DATE_EARNED';
Line: 825

    hr_utility.set_location('hrstrdbi.insert_routes_db_items', 2);
Line: 826

    select context_id
    into   l_assign_id_context_id
    from   ff_contexts
    where  context_name = 'ASSIGNMENT_ID';
Line: 831

    hr_utility.set_location('hrstrdbi.insert_routes_db_items', 3);
Line: 832

    select context_id
    into   l_payroll_action_id_context_id
    from   ff_contexts
    where  context_name = 'PAYROLL_ACTION_ID';
Line: 837

    hr_utility.set_location('hrstrdbi.insert_routes_db_items', 4);
Line: 838

    select context_id
    into   l_assign_action_id_context_id
    from   ff_contexts
    where  context_name = 'ASSIGNMENT_ACTION_ID';
Line: 843

    hr_utility.set_location('hrstrdbi.insert_routes_db_items', 5);
Line: 844

    select context_id
    into   l_payroll_id_context_id
    from   ff_contexts
    where  context_name = 'PAYROLL_ID';
Line: 849

    hr_utility.set_location('hrstrdbi.insert_routes_db_items', 6);
Line: 850

    select context_id
    into   l_accrual_plan_id_context_id
    from   ff_contexts
    where  context_name = 'ACCRUAL_PLAN_ID';
Line: 855

    hr_utility.set_location('hrstrdbi.insert_routes_db_items', 7);
Line: 856

    select context_id
    into   l_original_entry_id
    from   ff_contexts
    where  context_name = 'ORIGINAL_ENTRY_ID';
Line: 861

    hr_utility.set_location('hrstrdbi.insert_routes_db_items', 8);
Line: 862

    select context_id
    into   l_element_entry_id
    from   ff_contexts
    where  context_name = 'ELEMENT_ENTRY_ID';
Line: 867

    hr_utility.set_location('hrstrdbi.insert_routes_db_items', 9);
Line: 868

    select context_id
    into   l_element_type_id
    from   ff_contexts
    where  context_name = 'ELEMENT_TYPE_ID';
Line: 931

    insert_route ('SEH_PER_PERSON_DETAILS',
                  'person details route',
                  l_text);
Line: 935

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 936

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 938

    insert_user_entity ('PERSON_DETAILS',
                        'person details for an assignment');
Line: 983

    insert_route ('SEH_PER_PERSON_DETAILS_PERF',
                  'person details route (performant version)',
                  l_text);
Line: 987

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 988

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 990

    insert_user_entity ('PERSON_DETAILS_PERF',
                        'person details for an assignment (performant version)');
Line: 995

    insert_database_item ('PER_PERSON_TYPE',
                          'PTYPE.user_person_type',
                          'Type of person, eg. employee, applicant, etc.',
                          'T',
                          'N');
Line: 1001

    insert_database_item ('PTU_PER_PERSON_TYPE',
                          'hr_person_type_usage_info.get_user_person_type(SES.effective_date, PEOPLE.person_id) user_person_type',
                          'Type of person, eg. employee, applicant, etc.',
                          'T',
                          'N');
Line: 1007

    insert_database_item ('PER_LAST_NAME',
                          'PEOPLE.last_name',
                          'The person''s last name',
                          'T',
                          'N');
Line: 1013

    insert_database_item ('PER_FIRST_NAME',
                          'PEOPLE.first_name',
                          'The person''s first name',
                          'T',
                          'Y');
Line: 1019

    insert_database_item ('PER_KNOWN_AS',
                          'PEOPLE.known_as',
                          'The person''s preferred name',
                          'T',
                          'Y');
Line: 1025

    insert_database_item ('PER_MIDDLE_NAMES',
                          'PEOPLE.middle_names',
                          'The person''s middle names',
                          'T',
                          'Y');
Line: 1031

    insert_database_item ('PER_FULL_NAME',
                          'PEOPLE.full_name',
                          'The person''s full name',
                          'T',
                          'Y');
Line: 1037

    insert_database_item ('PER_APPLICANT_NUMBER',
                          'PEOPLE.applicant_number',
                          'The person''s applicant number',
                          'T',
                          'Y');
Line: 1043

    insert_database_item ('PER_DATE_VERIFIED',
                          'PEOPLE.date_employee_data_verified',
         'The date the employee last verified his/her personal data',
                          'D',
                          'Y');
Line: 1049

    insert_database_item ('PER_DATE_OF_BIRTH',
                          'PEOPLE.date_of_birth',
                          'The person''s date of birth',
                          'D',
                          'Y');
Line: 1055

    insert_database_item ('PER_EMP_NUMBER',
                          'PEOPLE.employee_number',
                          'The person''s employee number',
                          'T',
                          'Y');
Line: 1061

    insert_database_item ('PER_NATIONAL_IDENTIFIER',
                          'PEOPLE.national_identifier',
                          'The person''s national identifier',
                          'T',
                          'Y');
Line: 1067

    insert_database_item ('PER_PREV_LAST_NAME',
                          'PEOPLE.previous_last_name',
                          'The person''s previous last name',
                          'T',
                          'Y');
Line: 1073

    insert_database_item ('PER_WORK_PHONE',
                          'NVL(PHONE.phone_number,PEOPLE.work_telephone)',
                          'The person''s work telephone number',
                          'T',
                          'Y');
Line: 1079

    insert_database_item ('PER_MAIL_DESTINATION',
                          'PEOPLE.expense_check_send_to_address',
                          'The person''s mail destination',
                          'T',
                          'Y');
Line: 1085

    insert_database_item ('PER_AGE',
          'TRUNC(MONTHS_BETWEEN(SES.EFFECTIVE_DATE, PEOPLE.date_of_birth)/12)',
                          'The person''s age',
                          'N',
                          'Y');
Line: 1091

    insert_database_item ('PER_CURRENT_APP',
                          'a.meaning',
                       'Whether the person is a current applicant (yes/no)',
                          'T',
                          'Y');
Line: 1097

    insert_database_item ('PER_CURRENT_EMP',
                          'c.meaning',
                 'Whether the person is a current employee (yes/no)',
                          'T',
                          'Y');
Line: 1103

    insert_database_item ('PER_DISABLED',
                          'd.meaning',
                          'Whether the person is disabled (yes/no)',
                          'T',
                          'Y');
Line: 1109

    insert_database_item ('PER_SEND_EXPENSES',
        		  'hr_general.decode_lookup(''HOME_OFFICE'',
        		      PEOPLE.expense_check_send_to_address)',
                    'Where to send the person''s expenses (home/office)',
                          'T',
                          'Y');
Line: 1116

    insert_database_item ('PER_MARITAL_STATUS',
                          'hr_general.decode_lookup(''MAR_STATUS'',
                         	 PEOPLE.marital_status)',
                          'The person''s maritial status',
                          'T',
                          'Y');
Line: 1123

    insert_database_item ('PER_NATIONALITY',
                          'hr_general.decode_lookup(''NATIONALITY'',
                          	PEOPLE.nationality)',
                          'The person''s nationality',
                          'T',
                          'Y');
Line: 1130

    insert_database_item ('PER_SEX',
                          'hr_general.decode_lookup(''SEX'',PEOPLE.sex)',
                          'The person''s sex',
                          'T',
                          'Y');
Line: 1136

    insert_database_item ('PER_TITLE',
                          'hr_general.decode_lookup(''TITLE'',PEOPLE.title)',
                          'The person''s title',
                          'T',
                          'Y');
Line: 1142

    insert_database_item ('PER_PREFIX',
                          'PEOPLE.pre_name_adjunct',
                          'The employee''s name prefix',
                          'T',
                          'Y');
Line: 1148

    insert_database_item ('PER_SUFFIX',
                          'PEOPLE.suffix',
                          'The employee''s name suffix',
                          'T',
                          'Y');
Line: 1154

    insert_database_item ('PER_1099R_NAME',
                          '''TRANSFER_LN=''||people.last_name||''TRANSFER_FN=''||
                            people.first_name||''TRANSFER_MN=''|| people.middle_names||
                            ''TRANSFER_SSN=''||people.national_identifier',
                          'Employee Details for 1099R',
                          'T',
                          'N');
Line: 1192

    insert_route ('SEH_PER_PERSON_DETAILS_2',
                  'person details',
                  l_text);
Line: 1196

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 1197

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 1199

    insert_user_entity ('PERSON_DETAILS_2',
                        'person details 2');
Line: 1224

    insert_route ('SEH_PER_PERSON_DETAILS_2_PERF',
                  'person details (performant version)',
                  l_text);
Line: 1228

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 1229

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 1231

    insert_user_entity ('PERSON_DETAILS_2_PERF',
                        'person details 2 (performant version)');
Line: 1236

    insert_database_item ('PER_DPDNT_ADOPTION_DATE',
                          'PEOPLE.DPDNT_ADOPTION_DATE',
                          'Dependents Adoption Date',
                          'D',
                          'Y');
Line: 1242

    insert_database_item ('PER_RECEIPT_OF_DEATH_CERT_DATE',
                          'PEOPLE.RECEIPT_OF_DEATH_CERT_DATE',
                          'Date of receipt of the persons death certificate',
                          'D',
                          'Y');
Line: 1248

    insert_database_item ('PER_ORIGINAL_DATE_OF_HIRE',
                          'PEOPLE.ORIGINAL_DATE_OF_HIRE',
                          'Date the person was first hired',
                          'D',
                          'Y');
Line: 1254

    insert_database_item ('PER_DATE_OF_DEATH',
                          'PEOPLE.DATE_OF_DEATH',
                          'Persons date of death',
                          'D',
                          'Y');
Line: 1260

    insert_database_item ('PER_COORD_BEN_MED_PLN_NO',
                          'PEOPLE.COORD_BEN_MED_PLN_NO',
                          'Coordination of Benefits Medical Plan Number',
                          'T',
                          'Y');
Line: 1266

    insert_database_item ('PER_COORD_BEN_NO_CVG_FLAG',
                          'hr_general.decode_lookup(''YES_NO'',
                          	nvl(PEOPLE.coord_ben_no_cvg_flag,''N''))',
                          'Coordination of Benefits No Other Coverage',
                          'T',
                          'Y');
Line: 1273

    insert_database_item ('PER_DPDNT_VLNTRY_SVCE_FLAG',
                          'hr_general.decode_lookup(''YES_NO'',
                           	nvl(PEOPLE.dpdnt_vlntry_svce_flag,''N''))',
                          'Dependant on voluntary service',
                          'T',
                          'Y');
Line: 1280

    insert_database_item ('PER_BENEFIT_GROUP_ID',
                          'PEOPLE.BENEFIT_GROUP_ID',
                          'Benefit Group ID',
                          'N',
                          'Y');
Line: 1286

    insert_database_item ('PER_USES_TOBACCO_FLAG',
                          'hr_general.decode_lookup(''TOBACCO_USER'',
                          	PEOPLE.uses_tobacco_flag)',
                          'Uses Tobacco Flag',
                          'T',
                          'Y');
Line: 1310

    insert_route ('SEH_EMP_PERSON_SERVICE_1',
                  'employee person period of service route 1 (date details)',
                  l_text);
Line: 1314

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 1315

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 1317

    insert_user_entity ('EMPLOYEE_PERSON_SERVICE_DETAILS_1',
                        'employee person current service date details');
Line: 1322

    insert_database_item ('EMP_HIRE_DATE',
                          'SERVICE.date_start',
                          'The employee''s hire date',
                          'D',
                          'Y');
Line: 1328

    insert_database_item ('EMP_TERM_DATE',
                          'SERVICE.actual_termination_date',
                          'The employee''s termination date',
                          'D',
                          'Y');
Line: 1334

    insert_database_item ('EMP_LAST_PROCESS_DATE',
                          'SERVICE.last_standard_process_date',
                          'The date the employee was last processed',
                          'D',
                          'Y');
Line: 1340

    insert_database_item ('EMP_PROJ_TERM_DATE',
                          'SERVICE.projected_termination_date',
                          'The employee''s projected termination date',
                          'D',
                          'Y');
Line: 1368

    insert_route ('SEH_EMP_PERSON_SERVICE_2',
                  'employee person period of service route (other details)',
                  l_text);
Line: 1372

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 1373

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 1375

    insert_user_entity ('EMPLOYEE_PERSON_SERVICE_DETAILS_2',
                        'employee person current service other details');
Line: 1380

    insert_database_item ('EMP_LEAVING_REASON',
                          'LOOK1.meaning',
                          'The reason the employee left',
                          'T',
                          'Y');
Line: 1386

    insert_database_item ('EMP_TERM_ACCEPTED_BY',
                          'PEOPLE.full_name',
                          'The person who accepted the employee''s notice',
                          'T',
                          'Y');
Line: 1412

    insert_route ('SEH_PER_PERSON_ADDRESS',
                  'employee person address route',
                  l_text);
Line: 1416

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 1417

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 1419

    insert_user_entity ('EMPLOYEE_PERSON_ADDRESS_DETAILS',
                        'employee person address details');
Line: 1425

    insert_database_item ('PER_ADR_DATE_FROM',
                          'ADDR.date_from',
     'The first date on which the person can be contacted at this address',
                          'D',
                          'Y');
Line: 1431

    insert_database_item ('PER_ADR_DATE_TO',
                          'ADDR.date_to',
        'The last date on which the person can be contacted at this address',
                          'D',
                          'Y');
Line: 1437

    insert_database_item ('PER_ADR_LINE_1',
                          'ADDR.address_line1',
                          'The first line of the person''s address',
                          'T',
                          'Y');
Line: 1443

    insert_database_item ('PER_ADR_LINE_2',
                          'ADDR.address_line2',
                          'The second line of the person''s address',
                          'T',
                          'Y');
Line: 1449

    insert_database_item ('PER_ADR_LINE_3',
                          'ADDR.address_line3',
                          'The third line of the person''s address',
                          'T',
                          'Y');
Line: 1455

    insert_database_item ('PER_ADR_CITY',
                          'ADDR.town_or_city',
                          'The name of the person''s town or city',
                          'T',
                          'Y');
Line: 1461

    insert_database_item ('PER_ADR_REGION_1',
                          'ADDR.region_1',
                          'The first line of the person''s region',
                          'T',
                          'Y');
Line: 1467

    insert_database_item ('PER_ADR_REGION_2',
                          'ADDR.region_2',
                          'The second line of the person''s region',
                          'T',
                          'Y');
Line: 1473

    insert_database_item ('PER_ADR_REGION_3',
                          'ADDR.region_3',
                          'The third line of the person''s region',
                          'T',
                          'Y');
Line: 1479

    insert_database_item ('PER_ADR_POSTAL_CODE',
                          'ADDR.postal_code',
                          'The person''s postal code',
                          'T',
                          'Y');
Line: 1485

    insert_database_item ('PER_ADR_PHONE_1',
                          'ADDR.TELEPHONE_NUMBER_1',
                          'The person''s first contact number',
                          'T',
                          'Y');
Line: 1491

    insert_database_item ('PER_ADR_PHONE_2',
                          'ADDR.TELEPHONE_NUMBER_2',
                          'The person''s second contact number',
                          'T',
                          'Y');
Line: 1497

    insert_database_item ('PER_ADR_PHONE_3',
                          'ADDR.TELEPHONE_NUMBER_3',
                          'The person''s third contact number',
                          'T',
                          'Y');
Line: 1503

    insert_database_item ('PER_ADR_COUNTRY',
                          'a.territory_short_name',
                          'The name of the person''s country',
                          'T',
                          'Y');
Line: 1509

    insert_database_item ('PER_ADR_COUNTRY_CODE',
                          'a.territory_code',
                          '** Person''s country code **',
                          'T',
                          'Y');
Line: 1594

    insert_route ('SEH_ASS_PERSON_DETAILS',
                  'person assignment route',
                  l_text);
Line: 1598

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 1599

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 1601

    insert_user_entity ('PERSON_ASSIGNMENT_DETAILS',
                        'person assignment details');
Line: 1664

    insert_route ('SEH_ASS_PERSON_DETAILS_PERF',
                  'person assignment route (performant version)',
                  l_text);
Line: 1668

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 1669

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 1671

    insert_user_entity ('PERSON_ASSIGNMENT_DETAILS_PERF',
                        'person assignment details ( performant version )');
Line: 1677

    insert_database_item ('ASG_GRADE',
                          'GRADE.name',
                          'The employee''s grade',
                          'T',
                          'Y');
Line: 1683

    insert_database_item ('ASG_GRADE_DATE_FROM',
                          'GRADE.date_from',
          'The date from which this assignment grade information is effective',
                          'D',
                          'Y');
Line: 1689

    insert_database_item ('ASG_GRADE_DATE_TO',
                          'GRADE.date_to',
           'The date to which this assignment grade information is effective',
                          'D',
                          'Y');
Line: 1695

    insert_database_item ('ASG_JOB',
                          'JOB.name',
                          'The employee''s job',
                          'T',
                          'Y');
Line: 1701

    insert_database_item ('ASG_JOB_DATE_FROM',
                          'JOB.date_from',
            'The date from which this assignment job information is effective',
                          'D',
                          'Y');
Line: 1707

    insert_database_item ('ASG_JOB_DATE_TO',
                          'JOB.date_to',
             'The date to which this assignment job information is effective',
                          'D',
                          'Y');
Line: 1713

    insert_database_item ('ASG_STATUS',
                          'AST.user_status',
                          'The primary status for the assignment',
                          'T',
                          'N');
Line: 1719

    insert_database_item ('ASG_PAYROLL',
                          'PAYROLL.payroll_name',
                          'The employee''s payroll',
                          'T',
                          'Y');
Line: 1725

    insert_database_item ('ASG_LOCATION',
                          'LOC.location_code',
                          'The employee''s location',
                          'T',
                          'Y');
Line: 1731

    insert_database_item ('ASG_LOC_INACTIVE_DATE',
                          'LOC.inactive_date',
                    'The date to which the location information is effective',
                          'D',
                          'Y');
Line: 1737

    insert_database_item ('ASG_ORG',
                          'ORG.name',
                          'The employee''s organization',
                          'T',
                          'N');
Line: 1743

    insert_database_item ('ASG_ORG_DATE_FROM',
                          'ORG.date_from',
       'The date from which assignment organization information is effective',
                          'D',
                          'N');
Line: 1749

    insert_database_item ('ASG_ORG_DATE_TO',
                          'ORG.date_to',
         'The date to which assignment organization information is effective',
                          'D',
                          'Y');
Line: 1755

    insert_database_item ('ASG_GROUP',
                          'GRP.group_name',
                          'The employee''s group',
                          'T',
                          'Y');
Line: 1761

    insert_database_item ('ASG_VACANCY',
                          'VAC.name',
                          'The name of the vacancy applied for',
                          'T',
                          'Y');
Line: 1767

    insert_database_item ('ASG_TYPE',
                          'HR1.meaning',
                         'Whether this assignment is an employee or applicant',
                          'T',
                          'Y');
Line: 1773

    insert_database_item ('ASG_PROB_UNITS',
                          'hr_general.decode_lookup(''UNITS'',
                          	ASSIGN.probation_unit)',
                          'The units of the assignment''s probation period',
                          'T',
                          'Y');
Line: 1780

    insert_database_item ('ASG_PRIMARY',
                          'FND1.meaning',
                	  'Whether this is the employee''s primary assignment (yes/no)',
                          'T',
                          'N');
Line: 1786

    insert_database_item ('ASG_MANAGER',
                          'hr_general.decode_lookup(''YES_NO'',
                          		ASSIGN.manager_flag)',
               'Whether the assignment is a managerial assignment (yes/no)',
                          'T',
                          'Y');
Line: 1793

    insert_database_item ('ASG_POSITION',
                          'POS1.name',
                          'The employee''s position',
                          'T',
                          'Y');
Line: 1799

    insert_database_item ('ASG_POS_DATE_FROM',
                          'POS1.date_effective',
      'The date from which this assignment position information is effective',
                          'D',
                          'Y');
Line: 1805

    insert_database_item ('ASG_POS_DATE_TO',
                          'POS1.date_end',
        'The date to which this assignment position information is effective',
                          'D',
                          'Y');
Line: 1811

    insert_database_item ('ASG_POS_HOURS',
                          'POS1.working_hours',
                     'The standard number of working hours for the position',
                          'N',
                          'Y');
Line: 1817

    insert_database_item ('ASG_POS_START_TIME',
                          'POS1.time_normal_start',
                       'The standard start time for the assignment position',
                          'T',
                          'Y');
Line: 1823

    insert_database_item ('ASG_POS_END_TIME',
                          'POS1.time_normal_finish',
                          'The standard end time for the assignment position',
                          'T',
                          'Y');
Line: 1829

    insert_database_item ('ASG_POS_PROB_PERIOD',
                          'POS1.probation_period',
                          'The probation period for the assignment position',
                          'N',
                          'Y');
Line: 1835

    insert_database_item ('ASG_POS_FREQ',
                          'hr_general.decode_lookup(''FREQUENCY'',
                          	POS1.frequency)',
       'The frequency for which the assignment position''s hours is measured',
                          'T',
                          'Y');
Line: 1842

    insert_database_item ('ASG_SUCCESSOR',
                          'POS2.name',
                      'The position name that will succeed into this position',
                          'T',
                          'Y');
Line: 1848

    insert_database_item ('ASG_RELIEF',
                          'POS3.name',
             'The relief position if the current position hoilder is absent',
                          'T',
                          'Y');
Line: 1854

    insert_database_item ('ASG_REC_FULL_NAME',
                          'PEOPLE1.full_name',
                          'The full name for the recruiter',
                          'T',
                          'Y');
Line: 1860

    insert_database_item ('ASG_SUP_FULL_NAME',
                          'PEOPLE2.full_name',
                          'The full name for the supervisor',
                          'T',
                          'Y');
Line: 1868

    insert_database_item ('ASG_EMPLOYMENT_CATEGORY',
                          'hr_general.decode_lookup(''EMP_CAT'',
                          	ASSIGN.employment_category)',
                          'The employment category for the assignment',
                          'T',
                          'Y');
Line: 1875

    insert_database_item ('ASG_ASSIGNMENT_CATEGORY',
                          'decode(ASSIGN.employment_category
                                 ,''E'', hr_general.decode_lookup(''EMP_CAT'',
                          	         ASSIGN.employment_category)
                                 ,''C'', hr_general.decode_lookup(''CWK_ASG_CATEGORY'',
                                         ASSIGN.employment_category))',
                          'The assignment category for the assignment',
                          'T',
                          'Y');
Line: 1885

    insert_database_item ('ASG_PERFORMANCE_REVIEW_FREQUENCY',
                          'hr_general.decode_lookup(''FREQUENCY'',
                          	ASSIGN.perf_review_period_frequency)',
                 'The performance review frequency for the assignment',
                          'T',
                          'Y');
Line: 1892

    insert_database_item ('ASG_SALARY_REVIEW_FREQUENCY',
                          'hr_general.decode_lookup(''FREQUENCY'',
                          	ASSIGN.sal_review_period_frequency)',
                          'The salary review frequency for the assignment',
                          'T',
                          'Y');
Line: 1901

    insert_database_item ('ASG_PRIMARY_CODE',
                          'FND1.lookup_code',
                          'Primary Code',
                          'T',
                          'N');
Line: 1907

    insert_user_entity ('BIS_PERSON_ASSIGNMENT_DETAILS_PERF',
                        'person assignment details',
                        'Y');
Line: 1911

    insert_database_item ('ASG_EMPLOYMENT_CATEGORY_CODE',
                          'ASSIGN.employment_category',
                          'Employment Category Code',
                          'T',
                          'Y');
Line: 1940

    insert_route ('SEH_ASS_PERSON_DETAILS_2',
                  'person assignment route 2',
                  l_text);
Line: 1944

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 1945

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 1947

    insert_user_entity ('PERSON_ASSIGNMENT_DETAILS_2',
                        'person assignment details 2');
Line: 1953

    insert_database_item ('ASG_DATE_FROM',
                          'ASSIGN.effective_start_date',
               'The date from which this assignment information is effective',
                          'D',
                          'N');
Line: 1959

    insert_database_item ('ASG_DATE_TO',
                          'ASSIGN.effective_end_date',
                'The date to which this assignment information is effective',
                          'D',
                          'N');
Line: 1965

    insert_database_item ('ASG_INT_ADDR_LINE',
                          'ASSIGN.internal_address_line',
                          'The internal address of the assignment',
                          'T',
                          'Y');
Line: 1971

    insert_database_item ('ASG_ASSIGNMENT_SEQUENCE',
                          'ASSIGN.assignment_sequence',
                          'This is used as a default for assignment number',
                          'N',
                          'N');
Line: 1977

    insert_database_item ('ASG_NUMBER',
                          'ASSIGN.assignment_number',
                          'The assignment number',
                          'T',
                          'Y');
Line: 1983

    insert_database_item ('ASG_PROB_END_DATE',
                          'ASSIGN.date_probation_end',
                          'The probation period end date',
                          'D',
                          'Y');
Line: 1989

    insert_database_item ('ASG_PROB_PERIOD',
                          'ASSIGN.probation_period',
                          'The assignment''s probation period',
                          'N',
                          'Y');
Line: 1995

    insert_database_item ('ASG_HOURS',
                          'ASSIGN.normal_hours',
                     'The standard number of working hours for the assignment',
                          'N',
                          'Y');
Line: 2001

    insert_database_item ('ASG_START_TIME',
                          'ASSIGN.time_normal_start',
                          'The standard start time for the assignment',
                          'T',
                          'Y');
Line: 2007

    insert_database_item ('ASG_END_TIME',
                          'ASSIGN.time_normal_finish',
                          'The standard end time for the assignment',
                          'T',
                          'Y');
Line: 2013

    insert_database_item ('ASG_PERFORMANCE_REVIEW_PERIOD',
                          'ASSIGN.perf_review_period',
                          'The performance review period for the assignment',
                          'N',
                          'Y');
Line: 2019

    insert_database_item ('ASG_SALARY_REVIEW_PERIOD',
                          'ASSIGN.sal_review_period',
                          'The salary review period for the assignment',
                          'N',
                          'Y');
Line: 2025

    insert_database_item ('ASG_FREQ',
                          'HR3.meaning',
          'The frequency for which the assignment working hours are measured',
                          'T',
                          'Y');
Line: 2031

    insert_database_item ('ASG_CHANGE_REASON',
                          'HR4.meaning',
                          'The change reason for the assignment',
                          'T',
                          'Y');
Line: 2039

    insert_user_entity ('BIS_PERSON_ASSIGNMENT_DETAILS_2',
                        'person assignment details 2',
                        'Y');
Line: 2043

    insert_database_item ('ASG_FREQ_CODE',
                          'HR3.lookup_code',
                          'Assignment Working Hours Frequency Code',
                          'T',
                          'Y');
Line: 2070

    insert_route ('SEH_ASS_PERSON_DETAILS_3',
                  'person assignment route 3',
                  l_text);
Line: 2074

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 2075

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 2077

    insert_user_entity ('PERSON_ASSIGNMENT_DETAILS_3',
                        'person assignment details 3');
Line: 2096

    insert_route ('SEH_ASS_PERSON_DETAILS_3_PERF',
                  'person assignment route 3 (performant version)',
                  l_text);
Line: 2100

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 2101

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 2103

    insert_user_entity ('PERSON_ASSIGNMENT_DETAILS_3_PERF',
                        'person assignment details 3 (performant version)');
Line: 2108

    insert_database_item ('ASG_LABOUR_UNION_MEMBER_FLAG',
                          'hr_general.decode_lookup(''YES_NO'',
                          	nvl(ASSIGN.LABOUR_UNION_MEMBER_FLAG,''N''))',
                          'Labour Union Member',
                          'T',
                          'Y');
Line: 2115

    insert_database_item ('ASG_BARGAINING_UNIT_CODE',
                          'hr_general.decode_lookup(''BARGAINING_UNIT_CODE'',
                          	ASSIGN.BARGAINING_UNIT_CODE)',
                          'Bargaining Unit Code',
                          'T',
                          'Y');
Line: 2183

    insert_route ('SEH_CON_PERSON_DETAILS',
                  'assignment contact details',
                  l_text);
Line: 2187

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 2188

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 2190

    insert_user_entity ('ASSIGNMENT_CONTACT_DETAILS',
                        'assignment contact details');
Line: 2239

    insert_route ('SEH_CON_PERSON_DETAILS_PERF',
                  'assignment contact details (performant version)',
                  l_text);
Line: 2243

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 2244

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 2246

    insert_user_entity ('ASSIGNMENT_CONTACT_DETAILS_PERF',
                        'assignment contact details (performant version)');
Line: 2253

    insert_database_item ('CON_NATIONAL_IDENTIFIER',
                          'PEOPLE.national_identifier',
                          'The contacts national identifier',
                          'T',
                          'Y');
Line: 2259

    insert_database_item ('CON_START_DATE',
                          'PEOPLE.effective_start_date',
                'The date from which this contact information is effective',
                          'D',
                          'Y');
Line: 2265

    insert_database_item ('CON_END_DATE',
                          'PEOPLE.effective_end_date',
                  'The date to which this contact information is effective',
                          'D',
                          'Y');
Line: 2271

    insert_database_item ('CON_FULL_NAME',
                          'PEOPLE.full_name',
                          'The contact''s full name',
                          'T',
                          'Y');
Line: 2277

    insert_database_item ('CON_LAST_NAME',
                          'PEOPLE.last_name',
                          'The contact''s last name',
                          'T',
                          'Y');
Line: 2283

    insert_database_item ('CON_FIRST_NAME',
                          'PEOPLE.first_name',
                          'The contact''s first name',
                          'T',
                          'Y');
Line: 2289

    insert_database_item ('CON_KNOWN_AS',
                          'PEOPLE.known_as',
                          'The contact''s preferred name',
                          'T',
                          'Y');
Line: 2295

    insert_database_item ('CON_MIDDLE_NAMES',
                          'PEOPLE.middle_names',
                          'The contact''s middle names',
                          'T',
                          'Y');
Line: 2301

    insert_database_item ('CON_APP_NUMBER',
                          'PEOPLE.applicant_number',
                          'The contact''s applicant number',
                          'T',
                          'Y');
Line: 2307

    insert_database_item ('CON_DATE_OF_BIRTH',
                          'PEOPLE.date_of_birth',
                          'The contact''s date of birth',
                          'D',
                          'Y');
Line: 2313

    insert_database_item ('CON_EMP_NUMBER',
                          'PEOPLE.employee_number',
                          'The contact''s employee number',
                          'T',
                          'Y');
Line: 2319

    insert_database_item ('CON_WORK_PHONE',
                          'NVL(PHONE.phone_number,PEOPLE.work_telephone)',
                          'The contact''s work telephone number',
                          'T',
                          'Y');
Line: 2325

    insert_database_item ('CON_AGE',
         'TRUNC(MONTHS_BETWEEN(SES.EFFECTIVE_DATE, PEOPLE.date_of_birth)/12)',
                          'The contact''s age',
                          'N',
                          'Y');
Line: 2331

    insert_database_item ('CON_PERSON_TYPE',
                          'PTYPE.user_person_type',
                          'The contact''s person type,  employee, etc.',
                          'T',
                          'Y');
Line: 2337

    insert_database_item ('PTU_CON_PERSON_TYPE',
                          'hr_person_type_usage_info.get_user_person_type(SES.effective_date,PEOPLE.person_id) user_person_type',
                          'The contact''s person type,  employee, etc.',
                          'T',
                          'Y');
Line: 2343

    insert_database_item ('CON_CURRENT_APP',
                          'a.meaning',
                      'Whether the contact is a current applicant (yes/no)',
                          'T',
                          'Y');
Line: 2348

    insert_database_item ('CON_CURRENT_EMP',
                          'c.meaning',
                          'Whether the contact is a current employee (yes/no)',
                          'T',
                          'Y');
Line: 2354

    insert_database_item ('CON_DISABLED',
                          'd.meaning',
                          'Whether the contact is disabled (yes/no)',
                          'T',
                          'Y');
Line: 2360

    insert_database_item ('CON_MARITAL_STATUS',
                          'hr_general.decode_lookup(''MAR_STATUS'',
                          	PEOPLE.marital_status)',
                          'The contact''s maritial status',
                          'T',
                          'Y');
Line: 2367

    insert_database_item ('CON_NATIONALITY',
                          'hr_general.decode_lookup(''NATIONALITY'',
                          	PEOPLE.nationality)',
                          'The contact''s nationality',
                          'T',
                          'Y');
Line: 2374

    insert_database_item ('CON_SEX',
                          'hr_general.decode_lookup(''SEX'',
                          	PEOPLE.sex)',
                          'The contact''s sex',
                          'T',
                          'Y');
Line: 2381

    insert_database_item ('CON_TITLE',
                          'hr_general.decode_lookup(''TITLE'',
                          	PEOPLE.title)',
                          'The contact''s title',
                          'T',
                          'Y');
Line: 2388

    insert_database_item ('CON_RELATIONSHIP',
                          'hr_general.decode_lookup(''CONTACT'',
                          	CONTACT.contact_type)',
                   'The relationship of the contact to the employee',
                          'T',
                          'Y');
Line: 2441

    insert_route ('SEH_CON_PERSON_DETAILS_2',
                  'contact details',
                  l_text);
Line: 2445

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 2446

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 2448

    insert_user_entity ('CONTACT_DETAILS',
                        'contact details');
Line: 2455

    insert_database_item ('CON_DATE_START',
                          'CONTACT.DATE_START',
                'Start date of the contact relationship',
                          'D',
                          'Y');
Line: 2461

    insert_database_item ('CON_DATE_END',
                          'CONTACT.DATE_END',
                'End date of the contact relationship',
                          'D',
                          'Y');
Line: 2467

    insert_database_item ('CON_START_LIFE_REASON_ID',
                          'BEN1.name',
                  'Reason for the start of the relationship',
                          'T',
                          'Y');
Line: 2473

    insert_database_item ('CON_END_LIFE_REASON_ID',
                          'BEN2.name',
                  'Reason for the end of the relationship',
                          'T',
                          'Y');
Line: 2479

    insert_database_item ('CON_RLTD_PER_RSDS_W_DSGNTR',
                          'a.meaning',
                          'Related person resides with designator',
                          'T',
                          'Y');
Line: 2485

    insert_database_item ('CON_PERSONAL_FLAG',
                          'b.meaning',
                          'Personal Relationship Flag',
                          'T',
                          'Y');
Line: 2491

    insert_database_item ('CON_THIRD_PARTY_PAY_FLAG',
                          'c.meaning',
                          'Third Party Payments Relationship Flag',
                          'T',
                          'Y');
Line: 2497

    insert_database_item ('CON_BENEFICIARY_FLAG',
                          'd.meaning',
                          'Beneficiary Flag',
                          'T',
                          'Y');
Line: 2503

    insert_database_item ('CON_DEPENDENT_FLAG',
                          'e.meaning',
                          'Dependent Flag',
                          'T',
                          'Y');
Line: 2509

    insert_database_item ('CON_SEQUENCE_NUMBER',
                          'CONTACT.SEQUENCE_NUMBER',
                          'Sequence number',
                          'N',
                          'Y');
Line: 2546

    insert_route ('SEH_CON_PERSON_ADDRESS',
                  'contact address details',
                  l_text);
Line: 2550

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 2551

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 2553

    insert_user_entity ('CONTACT_ADDRESS_DETAILS',
                        'contact address details');
Line: 2559

    insert_database_item ('CON_ADR_DATE_FROM',
                          'ADDR.date_from',
     'The first date on which the contact can be contacted at this address',
                          'D',
                          'Y');
Line: 2565

    insert_database_item ('CON_ADR_DATE_TO',
                          'ADDR.date_to',
     'The last date on which the contact can be contacted at this address',
                          'D',
                          'Y');
Line: 2571

    insert_database_item ('CON_ADR_LINE_1',
                          'ADDR.address_line1',
                          'The first line of the contact''s address',
                          'T',
                          'Y');
Line: 2577

    insert_database_item ('CON_ADR_LINE_2',
                          'ADDR.address_line2',
                          'The second line of the contact''s address',
                          'T',
                          'Y');
Line: 2583

    insert_database_item ('CON_ADR_LINE_3',
                          'ADDR.address_line3',
                          'The third line of the contact''s address',
                          'T',
                          'Y');
Line: 2589

    insert_database_item ('CON_ADR_CITY',
                          'ADDR.town_or_city',
                          'The name of the contact''s town or city',
                          'T',
                          'Y');
Line: 2595

    insert_database_item ('CON_ADR_REGION_1',
                          'ADDR.region_1',
                          'The first line of the contact''s region',
                          'T',
                          'Y');
Line: 2601

    insert_database_item ('CON_ADR_REGION_2',
                          'ADDR.region_2',
                          'The second line of the contact''s region',
                          'T',
                          'Y');
Line: 2607

    insert_database_item ('CON_ADR_REGION_3',
                          'ADDR.region_3',
                          'The third line of the contact''s region',
                          'T',
                          'Y');
Line: 2613

    insert_database_item ('CON_ADR_POSTAL_CODE',
                          'ADDR.postal_code',
                          'The contact''s postal code',
                          'T',
                          'Y');
Line: 2619

    insert_database_item ('CON_ADR_PHONE_1',
                          'ADDR.telephone_number_1',
                          'The contact''s first telephone number',
                          'T',
                          'Y');
Line: 2625

    insert_database_item ('CON_ADR_PHONE_2',
                          'ADDR.telephone_number_2',
                          'The contact''s second telephone number',
                          'T',
                          'Y');
Line: 2631

    insert_database_item ('CON_ADR_PHONE_3',
                          'ADDR.telephone_number_3',
                          'The contact''s third telephone number',
                          'T',
                          'Y');
Line: 2637

    insert_database_item ('CON_ADR_COUNTRY',
                          'a.territory_short_name',
                          'The name of the contact''s country',
                          'T',
                          'Y');
Line: 2696

    insert_route ('SEH_REC_DETAILS',
                  'recruiter details',
                  l_text);
Line: 2700

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 2701

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 2703

    insert_user_entity ('RECRUITER_DETAILS',
                        'recruiter details');
Line: 2759

    insert_route ('SEH_REC_DETAILS_PERF',
                  'recruiter details (performant version)',
                  l_text);
Line: 2763

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 2764

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 2766

    insert_user_entity ('RECRUITER_DETAILS_PERF',
                        'recruiter details (performant version)');
Line: 2772

    insert_database_item ('REC_EMP_NUMBER',
                          'PEOPLE.employee_number',
                          'The recruiter''s employee number',
                          'T',
                          'Y');
Line: 2778

    insert_database_item ('REC_WORK_PHONE',
                          'NVL(PHONE.phone_number,PEOPLE.work_telephone)',
                          'The recruiter''s work telephone number',
                          'T',
                          'Y');
Line: 2784

    insert_database_item ('REC_PERSON_TYPE',
                          'PTYPE.user_person_type',
                          'Type of person, eg. employee, applicant, etc.',
                          'T',
                          'Y');
Line: 2790

    insert_database_item ('PTU_REC_PERSON_TYPE',
                          'hr_person_type_usage_info.get_user_person_type(people.effective_end_date, people.person_id) user_person_type',
                          'Type of person, eg. employee, applicant, etc.',
                          'T',
                          'Y');
Line: 2796

    insert_database_item ('REC_CURRENT_APP',
                          'a.meaning',
                       'Whether the recruiter is a current applicant (yes/no)',
                          'T',
                          'Y');
Line: 2802

    insert_database_item ('REC_CURRENT_EMP',
                          'c.meaning',
                        'Whether the recruiter is a current employee (yes/no)',
                          'T',
                          'Y');
Line: 2808

    insert_database_item ('REC_GRADE',
                          'Grade.name',
                          'The grade of the recruiter',
                          'T',
                          'Y');
Line: 2814

    insert_database_item ('REC_JOB',
                          'JOB.name',
                          'The job of the recruiter',
                          'T',
                          'Y');
Line: 2820

    insert_database_item ('REC_LOCATION',
                          'LOC.location_code',
                          'The location of the recruiter',
                          'T',
                          'Y');
Line: 2826

    insert_database_item ('REC_ORG',
                          'ORG.name',
                          'The organization name of the recruiter',
                          'T',
                          'Y');
Line: 2832

    insert_database_item ('REC_INT_ADDR_LINE',
                          'RASSIGN.internal_address_line',
                          'The internal address of the recruiter',
                          'T',
                          'Y');
Line: 2838

    insert_database_item ('REC_MANAGER',
                          'hr_general.decode_lookup(''YES_NO'',
                          	RASSIGN.manager_flag)',
               'Whether the assignment is a managerial assignment (yes/no)',
                          'T',
                          'Y');
Line: 2845

    insert_database_item ('REC_POSITION',
                          'POS.name',
                          'The position name of the recruiter',
                          'T',
                          'Y');
Line: 2900

    insert_route ('SEH_SUP_DETAILS',
                  'supervisor details',
                  l_text);
Line: 2904

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 2905

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 2907

    insert_user_entity ('SUPERVISOR_DETAILS',
                        'supervisor details');
Line: 2960

    insert_route ('SEH_SUP_DETAILS_PERF',
                  'supervisor details (performant version)',
                  l_text);
Line: 2964

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 2965

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 2967

    insert_user_entity ('SUPERVISOR_DETAILS_PERF',
                        'supervisor details (performant version)');
Line: 2974

    insert_database_item ('SUP_EMP_NUMBER',
                          'PEOPLE.employee_number',
                          'The employee number of the supervisor',
                          'T',
                          'Y');
Line: 2980

    insert_database_item ('SUP_WORK_PHONE',
                          'NVL(PHONE.phone_number,PEOPLE.work_telephone)',
                          'The supervisor''s work telephone number',
                          'T',
                          'Y');
Line: 2986

    insert_database_item ('SUP_PERSON_TYPE',
                          'PTYPE.user_person_type',
                          'Type of person, eg. employee, applicant, etc.',
                          'T',
                          'Y');
Line: 2992

    insert_database_item ('PTU_SUP_PERSON_TYPE',
                          'hr_person_type_usage_info.get_user_person_type(PEOPLE.effective_end_date,PEOPLE.person_id) user_person_type',
                          'Type of person, eg. employee, applicant, etc.',
                          'T',
                          'Y');
Line: 2998

    insert_database_item ('SUP_DATE_FROM',
                          'SASSIGN.effective_start_date',
           'The date from which this supervisor information is effective',
                          'D',
                          'Y');
Line: 3004

    insert_database_item ('SUP_DATE_TO',
                          'SASSIGN.effective_end_date',
             'The date to which this supervisor information is effective',
                          'D',
                          'Y');
Line: 3010

    insert_database_item ('SUP_INT_ADDR_LINE',
                          'SASSIGN.internal_address_line',
                          'The internal address of the supervisor',
                          'T',
                          'Y');
Line: 3016

    insert_database_item ('SUP_GRADE',
                          'Grade.name',
                          'The grade of the supervisor',
                          'T',
                          'Y');
Line: 3022

    insert_database_item ('SUP_JOB',
                          'JOB.name',
                          'The job of the supervisor',
                          'T',
                          'Y');
Line: 3028

    insert_database_item ('SUP_LOCATION',
                          'LOC.location_code',
                          'The location of the the supervisor',
                          'T',
                          'Y');
Line: 3034

    insert_database_item ('SUP_ORG',
                          'ORG.name',
                          'The organization name of the supervisor',
                          'T',
                          'Y');
Line: 3040

    insert_database_item ('SUP_POSITION',
                          'POS.name',
                          'The position name of the supervisor',
                          'T',
                          'Y');
Line: 3046

    insert_database_item ('SUP_CURRENT_EMP',
                          'c.meaning',
                    'Whether the supervisor is a current employee (yes/no)',
                          'T',
                          'Y');
Line: 3052

    insert_database_item ('SUP_MANAGER',
                          'hr_general.decode_lookup(''YES_NO'',
                          	SASSIGN.manager_flag)',
                 'Whether the assignment is a managerial assignment (yes/no)',
                          'T',
                          'Y');
Line: 3059

    insert_database_item ('SUP_EMAIL_ADDRESS',
                          'people.email_address',
                          'Persons email address',
                          'T',
                          'Y');
Line: 3079

    insert_route ('SEH_APL_DETAILS',
                  'application details',
                  l_text);
Line: 3083

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 3084

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 3086

    insert_user_entity ('APPLICATION_DETAILS',
                        'application details');
Line: 3091

    insert_database_item ('APL_DATE_RECEIVED',
                          'APPLIC.date_received',
                          'The date the application was received',
                          'D',
                          'Y');
Line: 3097

    insert_database_item ('APL_DATE_END',
                          'APPLIC.date_end',
                          'The date the application ended',
                          'D',
                          'Y');
Line: 3119

    insert_route ('SEH_ASS_PER_STATUS_DP',
                  'Personal status (Date paid context)',
                  l_text);
Line: 3123

    insert_route_context_usages (l_assign_id_context_id,   1);
Line: 3125

    insert_user_entity ('ASSIGNMENT_DP_STATUS',
                        'Personal status (Date paid context)');
Line: 3130

    insert_database_item ('ASG_PER_STATUS_DP',
                          'STYPE.per_system_status',
                     'Personal status for the assignment (Date paid context)',
                          'T',
                          'Y');
Line: 3150

       select max (ASSACT2.action_sequence)
       from   pay_payroll_actions              PACT2
       ,      pay_assignment_actions           ASSACT2
       where  ASSACT2.assignment_id          = &B1
       and    ASSACT2.action_status          = ''C''
       and    PACT2.payroll_action_id        = ASSACT2.payroll_action_id
       and    PACT2.action_type             in (''R'', ''Q'')
      )
and    PACT.payroll_action_id          = ASSACT.payroll_action_id
and    PACT.time_period_id             = TIMEP.time_period_id
and    PAYROLL.payroll_id              = PACT.payroll_id
and    PACT.effective_date       BETWEEN PAYROLL.effective_start_date
                                     AND PAYROLL.effective_end_date';
Line: 3164

    insert_route ('SEH_ASS_LAST_PER_NUM',
                  'Period number the assignment last processed',
                  l_text);
Line: 3168

    insert_route_context_usages (l_assign_id_context_id, 1);
Line: 3170

    insert_user_entity ('LAST_PER_NUMBER',
                        'Period number the assignment last processed',
                        'Y');
Line: 3176

    insert_database_item ('ASG_LAST_PROC_PERIOD_NUMBER',
                          '/*+ INDEX(ASSACT PAY_ASSIGNMENT_ACTIONS N1)*/ TIMEP.period_num',
                     'The period number the assignment was last processed',
                          'N',
                          'N');
Line: 3182

    insert_database_item ('ASG_LAST_PROC_PERIOD_NAME',
                          '/*+ INDEX(ASSACT PAY_ASSIGNMENT_ACTIONS N1)*/ TIMEP.period_name',
                          'The period name the assignment was last processed',
                          'T',
                          'N');
Line: 3188

    insert_database_item ('ASG_LAST_PROC_PERIOD_ID',
                          '/*+ INDEX(ASSACT PAY_ASSIGNMENT_ACTIONS N1)*/ TIMEP.time_period_id',
                          'The Time period id the assignment was last processed',
                          'N',
                          'N');
Line: 3194

    insert_database_item ('ASG_LAST_PROC_PAYROLL_NAME',
                          '/*+ INDEX(ASSACT PAY_ASSIGNMENT_ACTIONS N1)*/ PAYROLL.payroll_name',
                          'The payroll name the assignment was last processed',
                          'T',
                          'N');
Line: 3214

       select max (ASSACT2.action_sequence)
       from   pay_payroll_actions              PACT2
       ,      pay_assignment_actions           ASSACT2
       where  ASSACT2.assignment_id          = &B1
       and    ASSACT2.action_status          = ''C''
       and    PACT2.payroll_action_id        = ASSACT2.payroll_action_id
       and    PACT2.action_type             in (''R'', ''Q'')
      )
and    PACT.payroll_action_id          = ASSACT.payroll_action_id
and    PACT.time_period_id             = TIMEP.time_period_id
and    PAYROLL.payroll_id              = PACT.payroll_id
and    PACT.date_earned       BETWEEN PAYROLL.effective_start_date
                                  AND PAYROLL.effective_end_date';
Line: 3228

    insert_route ('SEH_ASG_LAST_EARNED_PER_NUM',
                  'Period number the assignment last processed as of date earned',
                  l_text);
Line: 3232

    insert_route_context_usages (l_assign_id_context_id, 1);
Line: 3234

    insert_user_entity ('LAST_EARNED_PER_NUMBER',
                        'Period number the assignment last processed as of date earned',
                        'Y');
Line: 3240

    insert_database_item ('ASG_LAST_EARNED_PERIOD_NUMBER',
                          '/*+ INDEX(ASSACT PAY_ASSIGNMENT_ACTIONS N1)*/ TIMEP.period_num',
                     'The period number the assignment was last processed as of date earned',
                          'N',
                          'N');
Line: 3246

    insert_database_item ('ASG_LAST_EARNED_PERIOD_NAME',
                          '/*+ INDEX(ASSACT PAY_ASSIGNMENT_ACTIONS N1)*/ TIMEP.period_name',
                          'The period name the assignment was last processed as of date earned',
                          'T',
                          'N');
Line: 3252

    insert_database_item ('ASG_LAST_EARNED_PERIOD_ID',
                          '/*+ INDEX(ASSACT PAY_ASSIGNMENT_ACTIONS N1)*/ TIMEP.time_period_id',
                          'The Time period id the assignment was last processed as of date earned',
                          'N',
                          'N');
Line: 3258

    insert_database_item ('ASG_LAST_EARNED_PAYROLL_NAME',
                          '/*+ INDEX(ASSACT PAY_ASSIGNMENT_ACTIONS N1)*/ PAYROLL.payroll_name',
                          'The payroll name the assignment was last processed as of date earned',
                          'T',
                          'N');
Line: 3274

    insert_route ('SEH_ASS_START_DATE',
                  'Start date for the assignment',
                  l_text);
Line: 3278

    insert_route_context_usages (l_assign_id_context_id,   1);
Line: 3280

    insert_user_entity ('ASS_START_DATE',
                        'The start date of the assignment');
Line: 3285

    insert_database_item ('ASG_START_DATE',
                          'min (effective_start_date)',
                          'The start date of the assignment',
                          'D',
                          'Y');
Line: 3301

    insert_route ('SEH_ASS_ACTION',
                  'Assignment action route',
                  l_text);
Line: 3305

    insert_route_context_usages (l_assign_action_id_context_id,   1);
Line: 3307

    insert_user_entity ('SEH_ASS_ACTION',
                        'Assignment action route');
Line: 3312

    insert_database_item ('CHEQUE_UK_NUMBER',
                          'serial_number',
              'The cheque number for the assignment action (UK spelling)',
                          'T',
                          'Y');
Line: 3318

    insert_database_item ('CHECK_US_NUMBER',
                          'serial_number',
              'The cheque number for the assignment action (US spelling)',
                          'T',
                          'Y');
Line: 3338

    insert_route ('SEH_PAY_DETAILS',
                  'Payroll details',
                  l_text);
Line: 3342

    insert_route_context_usages (l_payroll_action_id_context_id, 1);
Line: 3344

    insert_user_entity ('PAY_DETAILS',
                        'Payroll details',
                        'Y');
Line: 3351

    insert_database_item ('PAY_PROC_PERIOD_NUMBER',
                          'TPERIOD.period_num',
                          'The current period number for the payroll',
                          'N',
                          'N');
Line: 3357

    insert_database_item ('PAY_PROC_PERIOD_START_DATE',
                          'TPERIOD.start_date',
                          'The start date of the payroll period',
                          'D',
                          'N');
Line: 3363

    insert_database_item ('PAY_PROC_PERIOD_END_DATE',
                          'TPERIOD.end_date',
                          'The end date of the payroll period',
                          'D',
                          'N');
Line: 3369

    insert_database_item ('PAY_PROC_PERIOD_DIRECT_DEPOSIT_DATE',
                          'TPERIOD.default_dd_date',
                          'The direct deposit date for the payroll period',
                          'D',
                          'Y');
Line: 3375

    insert_database_item ('PAY_PROC_PERIOD_PAY_ADVICE_DATE',
                          'TPERIOD.pay_advice_date',
                          'The pay advice date for the payroll period',
                          'D',
                          'Y');
Line: 3381

    insert_database_item ('PAY_PROC_PERIOD_CUT_OFF_DATE',
                          'TPERIOD.cut_off_date',
                          'The cut off date for the payroll period',
                          'D',
                          'Y');
Line: 3387

    insert_database_item ('PAY_PROC_PERIOD_ID',
                          'TPERIOD.time_period_id',
                          'The id of the time period for the payroll',
                          'N',
                          'N');
Line: 3393

    insert_database_item ('PAY_PROC_PERIOD_NAME',
                          'TPERIOD.period_name',
                          'The period name for the payroll',
                          'T',
                          'N');
Line: 3399

    insert_database_item ('PAY_PERIODS_PER_YEAR',
                          'TPTYPE.number_per_fiscal_year',
                          'The number of payable periods in the year',
                          'N',
                          'N');
Line: 3415

    insert_route ('SEH_PAY_ACTION_DETAILS',
                  'Payroll action details',
                  l_text);
Line: 3419

    insert_route_context_usages (l_payroll_action_id_context_id, 1);
Line: 3421

    insert_user_entity ('PAY_ACTION_DETAILS',
                        'Payroll action details');
Line: 3427

    insert_database_item ('PAY_PROC_PERIOD_DATE_PAID',
                          'PACTION.effective_date',
                          'The date the payroll was paid',
                          'D',
                          'N');
Line: 3467

    insert_route ('SEH_SADMIN_SALARY_BASIS',
                  'Salary basis route for salary admin',
                  l_text);
Line: 3471

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 3472

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 3474

    insert_user_entity ('SADMIN_SALARY_BASIS',
                        'Salary basis');
Line: 3507

    insert_route ('SEH_SADMIN_SALARY_BASIS_PERF',
                  'Salary basis route for salary admin (performant version)',
                  l_text);
Line: 3511

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 3512

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 3514

    insert_user_entity ('SADMIN_SALARY_BASIS_PERF',
                        'Salary basis (performant version)');
Line: 3519

    insert_database_item ('ASG_SALARY_BASIS_NAME',
                          'BASES.name',
                          'The salary basis name for the assignment',
                          'T',
                          'Y');
Line: 3525

    insert_database_item ('ASG_SALARY_BASIS',
                          'hr_general.decode_lookup(''PAY_BASIS'',
                          	BASES.pay_basis)',
    'The payment basis (ie. frequency) for the assignment, eg. monthly',
                          'T',
                          'Y');
Line: 3532

    insert_database_item ('ASG_SALARY_BASIS_CODE',
                          'BASES.pay_basis',
                          'The payment basis lookup code for the assignment',
                          'T',
                          'Y');
Line: 3538

    insert_database_item ('ASG_SALARY_BASIS_ANNUALIZATION_FACTOR',
                          'BASES.pay_annualization_factor',
                          'The payment basis pay annualization factor for the assignment',
                          'N',
                          'Y');
Line: 3544

    insert_database_item ('ASG_SALARY_BASIS_GRADE_ANNUALIZATION_FACTOR',
                          'BASES.grade_annualization_factor',
                          'The payment basis grade annualization factor for the assignment',
                          'N',
                          'Y');
Line: 3550

    insert_database_item ('ASG_SALARY_ELEMENT',
                          'ETYPE.element_name',
                          'The display element name',
                          'T',
                          'Y');
Line: 3556

    insert_database_item ('ASG_SALARY_ELEMENT_VALUE_NAME',
                          'INPUTV.name',
                          'The display input value name',
                          'T',
                          'Y');
Line: 3562

    insert_database_item ('ASG_SALARY_GRADE_RATE',
                          'RATE.name',
                          'The display rate name',
                          'T',
                          'Y');
Line: 3568

    insert_database_item ('ASG_SALARY_RATE_BASIS',
                          'hr_general.decode_lookup(''PAY_BASIS'',
                          	BASES.rate_basis)',
                          'The salary rate basis (ie. frequency)',
                          'T',
                          'Y');
Line: 3599

    insert_route ('SEH_SADMIN_SALARY_ELEMENT',
                  'Salary element route for salary admin',
                  l_text);
Line: 3603

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 3604

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 3610

    insert_user_entity ('SADMIN_SALARY_ELEMENT',
                        'Salary element',
                        'Y');
Line: 3616

    insert_database_item ('ASG_SALARY',
                          'fnd_number.canonical_to_number (EEV.screen_entry_value)',
                          'The current salary for an employee',
                          'N',
                          'Y');
Line: 3646

        (select  max (PRO2.change_date)
         from    per_pay_proposals         PRO2
         where   PRO2.change_date       <= &B1
         and     PRO2.assignment_id      = PRO.assignment_id)';
Line: 3651

    insert_route ('SEH_SADMIN_SALARY_PROPOSALS',
                  'Salary Proposals route for salary admin',
                  l_text);
Line: 3655

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 3656

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 3658

    insert_user_entity ('SEH_SADMIN_SALARY_PROPOSALS',
                        'Salary element',
                        'Y');
Line: 3689

        (select  max (PRO2.change_date)
         from    per_pay_proposals         PRO2
         where   PRO2.change_date       <= &B1
         and     PRO2.assignment_id      = PRO.assignment_id)';
Line: 3694

    insert_route ('SEH_SADMIN_SALARY_PROPOSALS_PERF',
                  'Salary Proposals route for salary admin ( performant version)',
                  l_text);
Line: 3698

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 3699

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 3701

    insert_user_entity ('SEH_SADMIN_SALARY_PROPOSALS_PERF',
                        'Salary element (performant version)',
                        'Y');
Line: 3707

    insert_database_item ('ASG_LAST_SALARY_CHANGE_APPROVED',
          'decode (EE.element_entry_id, null, HRNO.meaning, HRYES.meaning)',
              'Whether the last proposed salary change has been approved ',
                          'T',
                          'N');
Line: 3734

        (select  max (PRO2.change_date)
         from    per_pay_proposals          PRO2
         where   PRO2.change_date        <= &B1
         and     PRO2.assignment_id       = PRO.assignment_id)';
Line: 3739

    insert_route ('SEH_SADMIN_SALARY_PROPOSALS_2',
                  'Salary Proposals route for salary admin',
                  l_text);
Line: 3743

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 3744

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 3746

    insert_user_entity ('SEH_SADMIN_SALARY_PROPOSALS_2',
                        'Salary element',
                        'Y');
Line: 3772

        (select  max (PRO2.change_date)
         from    per_pay_proposals          PRO2
         where   PRO2.change_date        <= &B1
         and     PRO2.assignment_id       = PRO.assignment_id)';
Line: 3777

    insert_route ('SEH_SADMIN_SALARY_PROPOSALS_2_PERF',
                  'Salary Proposals route for salary admin (performant version)',
                  l_text);
Line: 3781

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 3782

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 3784

    insert_user_entity ('SEH_SADMIN_SALARY_PROPOSALS_2_PERF',
                        'Salary element (performant version)',
                        'Y');
Line: 3791

    insert_database_item ('ASG_LAST_SALARY_DATE',
                          'PRO.change_date',
                          'The last salary change date',
                          'D',
                          'Y');
Line: 3797

    insert_database_item ('ASG_LAST_CHANGE_REASON',
                          'hr_general.decode_lookup(''PROPOSAL_REASON'',
                          	PRO.proposal_reason)',
                          'The reason the salary was changed',
                          'T',
                          'Y');
Line: 3804

    insert_database_item ('ASG_NEXT_SALARY_DATE',
                          'PRO.next_sal_review_date',
                          'The date of the next salary change',
                          'D',
                          'Y');
Line: 3828

        (select  max (PRO2.review_date)
         from    per_performance_reviews       PRO2
         where   PRO2.person_id        = PRO.person_id
         and     PRO2.review_date     <= &B1)
and     EVENT.event_id                    (+)= PRO.event_id
and     HR1.lookup_code                   (+)= EVENT.type
and     HR1.lookup_type                   (+)= ''EMP_INTERVIEW_TYPE''
and     HR2.lookup_code                   (+)= PRO.performance_rating
and     HR2.lookup_type                   (+)= ''PERFORMANCE_RATING''
and     LOC.location_id                   (+)= EVENT.location_id';
Line: 3839

    insert_route ('SEH_SADMIN_LAST_PERFORM_REVIEW',
                  'Last performance review route for salary admin',
                  l_text);
Line: 3843

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 3844

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 3846

    insert_user_entity ('SEH_SADMIN_LAST_REVIEW',
                        'Salary element',
                        'Y');
Line: 3870

        (select  max (PRO2.review_date)
         from    per_performance_reviews       PRO2
         where   PRO2.person_id        = PRO.person_id
         and     PRO2.review_date     <= &B1)
and     EVENT.event_id                    (+)= PRO.event_id
and     LOC.location_id                   (+)= EVENT.location_id';
Line: 3877

    insert_route ('SEH_SADMIN_LAST_PERFORM_REVIEW_PERF',
                  'Last performance review route for salary admin (performant version)',
                  l_text);
Line: 3881

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 3882

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 3884

    insert_user_entity ('SEH_SADMIN_LAST_REVIEW_PERF',
                        'Salary element (performant version)',
                        'Y');
Line: 3890

    insert_database_item ('ASG_LAST_PERFORMANCE_DATE',
          'decode (PRO.event_id, null, PRO.review_date, EVENT.date_start)',
                          'Last performance review date',
                          'D',
                          'Y');
Line: 3896

    insert_database_item ('ASG_LAST_PERFORMANCE_TYPE',
                          'hr_general.decode_lookup(''EMP_INTERVIEW_TYPE'',
                          	EVENT.type)',
                          'Last performance review type',
                          'T',
                          'Y');
Line: 3903

    insert_database_item ('ASG_LAST_PERFORMANCE_LOCATION',
                          'LOC.location_code',
                          'Last performance review location',
                          'T',
                          'Y');
Line: 3909

    insert_database_item ('ASG_LAST_PERFORMANCE_RATING',
                          'hr_general.decode_lookup(''PERFORMANCE_RATING'',
                          	PRO.performance_rating)',
                          'Last performance review rating',
                          'T',
                          'Y');
Line: 3916

    insert_database_item ('ASG_NEXT_PERFORMANCE_DATE',
                          'PRO.next_perf_review_date',
                          'Next performance review date',
                          'D',
                          'Y');
Line: 3956

        (select  max(PRO2.change_date)
         from    per_pay_proposals        PRO2
         where   PRO2.change_date      <= &B1
         and     PRO2.assignment_id     = PRO.assignment_id)';
Line: 3961

    insert_route ('SEH_SADMIN_LAST_SALARY_CHANGE',
                  'Last salary change route for salary admin',
                  l_text);
Line: 3965

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 3966

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 3968

    insert_user_entity ('SEH_SADMIN_LAST_SALARY_CHANGE',
                        'Last salary change',
                        'Y');
Line: 3974

    insert_database_item ('ASG_LAST_PROPOSED_SALARY_CHANGE',
   'decode(BASES1.pay_basis, BASES2.pay_basis, (PRO.proposed_salary_n -
    EEV.screen_entry_value), null)',
                          'The proposed salary change',
                          'N',
                          'Y');
Line: 3981

    insert_database_item ('ASG_LAST_PROPOSED_SALARY_PERCENT',
  'decode(BASES1.pay_basis, BASES2.pay_basis, (((PRO.proposed_salary_n -
   EEV.screen_entry_value) *100)/EEV.screen_entry_value), null)',
                          'The proposed salary change as a percentage',
                          'N',
                          'Y');
Line: 4005

    insert_route ('SEH_ASSIGN_HR_ADDRESS',
                  'The work address for the assignment (general legislation)',
                  l_text);
Line: 4009

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 4010

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 4012

    insert_user_entity ('SEH_ASSIGN_HR_ADDRESS',
                 'The work address for the assignment (general legislation)',
                        'Y');
Line: 4019

    insert_database_item ('LOC_ADR_LINE_1',
                          'HRLOC.address_line_1',
                          'The first line of the assignment''s work address',
                          'T',
                          'Y');
Line: 4025

    insert_database_item ('LOC_ADR_LINE_2',
                          'HRLOC.address_line_2',
                          'The second line of the assignment''s work address',
                          'T',
                          'Y');
Line: 4031

    insert_database_item ('LOC_ADR_LINE_3',
                          'HRLOC.address_line_3',
                          'The third line of the assignment''s work address',
                          'T',
                          'Y');
Line: 4037

    insert_database_item ('LOC_ADR_POSTAL_CODE',
                          'HRLOC.postal_code',
                          'The postal code for the assignment''s work address',
                          'T',
                          'Y');
Line: 4043

    insert_database_item ('LOC_ADR_REGION_1',
                          'HRLOC.region_1',
                          'The first line of the assignment''s region',
                          'T',
                          'Y');
Line: 4049

    insert_database_item ('LOC_ADR_REGION_2',
                          'HRLOC.region_2',
                          'The second line of the assignment''s region',
                          'T',
                          'Y');
Line: 4055

    insert_database_item ('LOC_ADR_REGION_3',
                          'HRLOC.region_3',
                          'The third line of the assignment''s region',
                          'T',
                          'Y');
Line: 4061

    insert_database_item ('LOC_ADR_PHONE_1',
                          'HRLOC.telephone_number_1',
                          'The assignment''s first work telephone number',
                          'T',
                          'Y');
Line: 4067

    insert_database_item ('LOC_ADR_PHONE_2',
                          'HRLOC.telephone_number_2',
                          'The assignment''s second work telephone number',
                          'T',
                          'Y');
Line: 4073

    insert_database_item ('LOC_ADR_PHONE_3',
                          'HRLOC.telephone_number_3',
                          'The assignment''s third work telephone number',
                          'T',
                          'Y');
Line: 4079

    insert_database_item ('LOC_ADR_CITY',
                          'HRLOC.town_or_city',
                          'The town or city where the assignment works',
                          'T',
                          'Y');
Line: 4085

    insert_database_item ('LOC_ADR_COUNTRY',
                          'TER.territory_short_name',
                          'The country where the assignment works',
                          'T',
                          'Y');
Line: 4110

    insert_route ('SEH_ASSIGN_HR_ADDRESS_US',
                  'The work address for the assignment (US legislation)',
                  l_text);
Line: 4114

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 4115

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 4117

    insert_user_entity ('SEH_ASSIGN_HR_ADDRESS_US',
                 'The work address for the assignment (US legislation)',
                        'Y');
Line: 4123

    insert_database_item ('LOC_ADR_US_COUNTY',
                          'HRLOC.region_1',
                          'The assignment''s work county (US only)',
                          'T',
                          'Y');
Line: 4129

    insert_database_item ('LOC_ADR_US_STATE',
                          'HR1.meaning',
                          'The assignment''s work state (US only)',
                          'T',
                          'Y');
Line: 4135

    insert_database_item ('LOC_ADR_US_STATE_CODE',
                          'HRLOC.region_2',
                          'The assignment''s work state code (US only)',
                          'T',
                          'Y');
Line: 4161

    insert_route ('SEH_ASSIGN_ADDRESS_US',
                  'The home address for the assignment (US legislation)',
                  l_text);
Line: 4165

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 4166

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 4168

    insert_user_entity ('SEH_ASSIGN_ADDRESS_US',
                 'The home address for the assignment (US legislation)',
                        'Y');
Line: 4174

    insert_database_item ('PER_ADR_US_COUNTY',
                          'ADDR.region_1',
                          'The assignment''s county (US only)',
                          'T',
                          'Y');
Line: 4180

    insert_database_item ('PER_ADR_US_STATE',
                          'HR1.meaning',
                          'The assignment''s state (US only)',
                          'T',
                          'Y');
Line: 4186

    insert_database_item ('PER_ADR_US_STATE_CODE',
                          'ADDR.region_2',
                          'The assignment''s state code (US only)',
                          'T',
                          'Y');
Line: 4211

    insert_route ('SEH_ASSIGN_HR_ADDRESS_UK',
                  'The work address for the assignment (GB legislation)',
                  l_text);
Line: 4215

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 4216

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 4218

    insert_user_entity ('SEH_ASSIGN_HR_ADDRESS_UK',
                 'The work address for the assignment (GB legislation)',
                        'Y');
Line: 4224

    insert_database_item ('LOC_ADR_UK_COUNTY',
                          'HR1.meaning',
                          'The assignment''s work county (UK only)',
                          'T',
                          'Y');
Line: 4250

    insert_route ('SEH_ASSIGN_ADDRESS_UK',
                  'The home address for the assignment (GB legislation)',
                  l_text);
Line: 4254

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 4255

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 4257

    insert_user_entity ('SEH_ASSIGN_ADDRESS_UK',
                 'The home address for the assignment (GB legislation)',
                        'Y');
Line: 4263

    insert_database_item ('PER_ADR_UK_COUNTY',
                          'HR1.meaning',
                          'The assignment''s home county (UK only)',
                          'T',
                          'Y');
Line: 4277

        insert_route ('SEH_SYSDATE',
                      'sysdate route',
                      l_text);
Line: 4281

    insert_user_entity ('SEH_SYSDATE',
                        'sysdate route');
Line: 4287

    insert_database_item ('SYSDATE',
                          'sysdate',
                          'The system date',
                          'D',
                          'N');
Line: 4301

        insert_route ('SEH_SESSION_DATE',
                      'session date route',
                      l_text);
Line: 4305

    insert_user_entity ('SEH_SESSION_DATE',
                        'session date route',
                        'Y');
Line: 4312

    insert_database_item ('SESSION_DATE',
                          'effective_date',
                          'The session date',
                          'D',
                          'N');
Line: 4330

    insert_route ('TARGET_PAYROLL_ACTION_ROUTE',
                  'Route for Target payroll action',
                  l_text);
Line: 4334

    insert_route_context_usages (l_payroll_action_id_context_id, 1);
Line: 4336

    insert_user_entity ('TARGET_PAYROLL_ACTION_ENTITY',
                        'Entity for payroll target action',
                        'Y');
Line: 4342

    insert_database_item ('ACTION_TYPE',
                          'TARGET.ACTION_TYPE',
                          'Actual Value of Action_Type',
                          'T',
                          'N');
Line: 4360

    insert_route ('PAY_PAYROLLS_ROUTE',
                  'Route for pay_payrolls',
                  l_text);
Line: 4364

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 4365

    insert_route_context_usages (l_payroll_id_context_id, 2);
Line: 4367

    insert_user_entity ('PAY_PAYROLLS_ENTITY',
                        'Entity for pay_payrolls',
                        'Y');
Line: 4373

    insert_database_item ('PAYROLL_ARREARS_FLAG',
                          'PAYROLL.ARREARS_FLAG',
                          'Actual Value of Arrears_Flag',
                          'T',
                          'Y');
Line: 4392

    insert_route ('ASSIGNMENT_BUDGET_VALUES',
                  'Route for Assignment Budget Values',
                  l_text);
Line: 4396

    insert_route_context_usages (l_assign_id_context_id,   1);
Line: 4397

    insert_route_context_usages (l_date_earned_context_id, 2);
Line: 4399

    insert_route_parameters ('UNIT', 'T', 1);
Line: 4401

    insert_user_entity ('ASSIGNMENT_FTE_BUDGET_VALUES',
                        'Entity for FTE Assignment Budget Values',
                        'Y');
Line: 4405

    select ff_route_parameters_s.currval
    into   l_route_parameters_id
    from   dual;
Line: 4409

    insert_route_parameter_values ( l_route_parameters_id,
                                    '''FTE''');
Line: 4414

    insert_database_item ('ASG_FTE_VALUE',
                          'BUDGET.VALUE',
                          'Full Time Equivalent Budget Actual Value',
                          'N',
                          'N');
Line: 4420

    insert_user_entity ('ASSIGNMENT_HEAD_BUDGET_VALUES',
                        'Entity for Assignment HEAD Budget Values',
                        'Y');
Line: 4424

    insert_route_parameter_values ( l_route_parameters_id,
                                    '''HEAD''');
Line: 4429

    insert_database_item ('ASG_HEAD_VALUE',
                          'BUDGET.VALUE',
                          'HEAD Budget Actual Value',
                          'N',
                          'N');
Line: 4435

    insert_user_entity ('ASSIGNMENT_MONEY_BUDGET_VALUES',
                        'Entity for Assignment Money Budget Values',
                        'Y');
Line: 4439

    insert_route_parameter_values ( l_route_parameters_id,
                                    '''MONEY''');
Line: 4444

    insert_database_item ('ASG_MONEY_VALUE',
                          'BUDGET.VALUE',
                          'Money Budget Actual Value',
                          'N',
                          'N');
Line: 4450

    insert_user_entity ('ASSIGNMENT_PFT_BUDGET_VALUES',
                        'Entity for Assignment PFT Budget Values',
                        'Y');
Line: 4454

    insert_route_parameter_values ( l_route_parameters_id,
                                    '''PFT''');
Line: 4459

    insert_database_item ('ASG_PFT_VALUE',
                          'BUDGET.VALUE',
                          'PFT Budget Actual Value',
                          'N',
                          'N');
Line: 4489

    insert_route ('ASSIGNMENT_FULL_TIME_CONDITIONS',
                  'Route for Assignment Full Time Conditions for pay_payrolls',
                  l_text);
Line: 4493

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 4494

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 4496

    insert_user_entity ('ASSIGNMENT_FULL_TIME_CONDITIONS',
                        'Entity for Assignment Full Time Conditions',
                        'Y');
Line: 4502

    insert_database_item ('ASG_FULL_TIME_HOURS',
                          'nvl(POS.WORKING_HOURS,nvl(ORG.WORKING_HOURS,BUS.WORKING_HOURS))',
                          'Full Time Working Hours',
                          'N',
                          'N');
Line: 4508

    insert_database_item ('ASG_FULL_TIME_FREQ',
                          'nvl(POS.FREQUENCY,nvl(ORG.FREQUENCY,BUS.FREQUENCY))',
                          'Full Time Frequency',
                          'T',
                          'N');
Line: 4525

    insert_route ('ACCRUAL_PLAN_VALUES',
                  'Route for Accrual Plans',
                  l_text);
Line: 4529

    insert_route_context_usages (l_accrual_plan_id_context_id, 1);
Line: 4531

    insert_user_entity ('ACP_NAME',
                        'Entity for Accrual PLans',
                        'Y');
Line: 4537

    insert_database_item ('ACP_NAME',
                          'PAP.ACCRUAL_PLAN_NAME',
                          'Name of accrual plan',
                          'T',
                          'N');
Line: 4543

    insert_database_item ('ACP_CATEGORY',
                          'PAP.ACCRUAL_CATEGORY',
                          'Accrual Category - Sick, Vacation etc',
                          'T',
                          'N');
Line: 4549

    insert_database_item ('ACP_START',
                          'PAP.ACCRUAL_START',
                          'Accrual Start - BOY, HD etc',
                          'T',
                          'Y');
Line: 4555

    insert_database_item ('ACP_UOM',
                          'PAP.ACCRUAL_UNITS_OF_MEASURE',
                          'Unit of measure used for accrual plan',
                          'T',
                          'N');
Line: 4561

    insert_database_item ('ACP_INELIGIBILITY_PERIOD_TYPE',
                          'PAP.INELIGIBLE_PERIOD_TYPE',
                          'Type of period before eligibility commences',
                          'T',
                          'Y');
Line: 4567

    insert_database_item ('ACP_INELIGIBILITY_PERIOD_LENGTH',
                          'PAP.INELIGIBLE_PERIOD_LENGTH',
                          'Number of periods before eligibility is attained',
                          'N',
                          'Y');
Line: 4592

and not exists (select 1
                from pay_element_entry_values_f pev3,
                     pay_element_entries_f      pee1
                where pee1.element_entry_id = pev3.element_entry_id
                and pev3.element_entry_id != pev1.element_entry_id
                and pev3.input_value_id = pev1.input_value_id
                and pev3.screen_entry_value <= fnd_date.date_to_canonical(&B3)
                and (  (pev3.screen_entry_value > pev1.screen_entry_value)
                    or (pev3.screen_entry_value = pev1.screen_entry_value)
                        and pee1.entry_type = ''S''))';
Line: 4603

    insert_route ('CARRIED_OVER_VALUES',
                  'Route for Accrual Plans',
                  l_text);
Line: 4607

    insert_route_context_usages (l_accrual_plan_id_context_id, 1);
Line: 4608

    insert_route_context_usages (l_assign_id_context_id, 2);
Line: 4609

    insert_route_context_usages (l_date_earned_context_id, 3);
Line: 4611

    insert_user_entity ('ACP_CARRIED_OVER_PTO',
                        'Entity for carried over values',
                        'Y');
Line: 4617

    insert_database_item ('ACP_CARRIED_OVER_PTO',
                          'PEV2.SCREEN_ENTRY_VALUE',
                          'Amount of PTO carried over',
                          'N',
                          'N');
Line: 4623

    insert_database_item ('ACP_CARRIED_OVER_DATE',
                          'PEV1.SCREEN_ENTRY_VALUE',
                          'Date on which CO is effective',
                          'N',
                          'N');
Line: 4644

    insert_route ('ACCRUAL_PLAN_SERVICE_DATES',
                  'Route for Accrual Plan Service Dates',
                  l_text);
Line: 4648

    insert_route_context_usages (l_assign_id_context_id, 1);
Line: 4649

    insert_route_context_usages (l_date_earned_context_id, 2);
Line: 4651

    insert_user_entity ('ACP_SERVICE_DATES',
                        'Entity for accrual plan service dates',
                        'Y');
Line: 4657

    insert_database_item ('ACP_TERMINATION_DATE',
                          'PPS.ACTUAL_TERMINATION_DATE',
                          'Termination Date',
                          'D',
                          'Y');
Line: 4663

    insert_database_item ('ACP_SERVICE_START_DATE',
                          'PPS.DATE_START',
                          'Hire Date',
                          'D',
                          'N');
Line: 4694

    insert_route ('ACCRUAL_PLAN_ENROLLMENT_DATES',
                  'Route for Accrual Plan Dates',
                  l_text);
Line: 4698

    insert_route_context_usages (l_accrual_plan_id_context_id, 1);
Line: 4699

    insert_route_context_usages (l_assign_id_context_id, 2);
Line: 4700

    insert_route_context_usages (l_date_earned_context_id, 3);
Line: 4702

    insert_user_entity ('ACCRUAL_PLAN_ENROLLMENT_DATES',
                        'Entity for Date of enrollment in a plan',
                        'Y');
Line: 4708

    insert_database_item ('ACP_ENROLLMENT_START_DATE',
                          'LEAST(PEE.EFFECTIVE_START_DATE)',
                          'Enrollment Date',
                          'D',
                          'N');
Line: 4714

    insert_database_item ('ACP_ENROLLMENT_END_DATE',
                          'GREATEST(PEE.EFFECTIVE_END_DATE)',
                          'Enrollment Date',
                          'D',
                          'N');
Line: 4755

    insert_route ('ACCRUAL_PLAN_CONT_SERVICE_DATES',
                  'Route for Accrual Plan Dates',
                  l_text);
Line: 4759

    insert_route_context_usages (l_accrual_plan_id_context_id, 1);
Line: 4760

    insert_route_context_usages (l_assign_id_context_id, 2);
Line: 4761

    insert_route_context_usages (l_date_earned_context_id, 3);
Line: 4763

    insert_user_entity ('ACCRUAL_PLAN_CONT_SERVICE_DATES',
                        'Entity for CSD of person enrolled in plan',
                        'Y');
Line: 4769

    insert_database_item ('ACP_CONTINUOUS_SERVICE_DATE',
                          'FND_DATE.CANONICAL_TO_DATE(PEV.SCREEN_ENTRY_VALUE)',
                          'Continuous Service Date',
                          'D',
                          'Y');
Line: 4786

    insert_route ('ORIGINAL_ENTRY_ATTRIBUTES',
                  'Route for Original Element Entry attributes',
                  l_text);
Line: 4790

    insert_route_context_usages (l_original_entry_id, 1);
Line: 4792

    insert_user_entity ('ORIGINAL_ENTRY_ATTRIBUTES',
                        'Entity for original entry details');
Line: 4795

    insert_database_item ('ENTRY_START_DATE',
                          'min(TARGET.effective_start_date)',
                          'start date of the original entry',
                          'D',
                          'N');
Line: 4801

    insert_database_item ('ENTRY_END_DATE',
                          'max(TARGET.effective_end_date)',
                          'end date of the original entry',
                          'D',
                          'N');
Line: 4821

    insert_route ('PAY_EARNED_PERIOD_CORE',
                  'Route for pay earned period',
                  l_text);
Line: 4825

    insert_route_context_usages (l_payroll_action_id_context_id, 1);
Line: 4827

    insert_user_entity ('PAY_PD_DETAILS_CORE',
                        'Entity for original entry details',
                        'Y');
Line: 4831

    insert_database_item ('PAY_EARNED_START_DATE',
                          'PTP.start_date',
                          'The start date of the earned period',
                          'D',
                          'N');
Line: 4837

    insert_database_item ('PAY_EARNED_END_DATE',
                          'PTP.end_date',
                          'The end date of the earned period',
                          'D',
                          'N');
Line: 4843

    insert_database_item ('PAY_EARNED_DIRECT_DEPOSIT_DATE',
                          'PTP.default_dd_date',
                          'The direct deposit date of the earned period',
                          'D',
                          'N');
Line: 4849

    insert_database_item ('PAY_EARNED_PAY_ADVICE_DATE',
                          'PTP.pay_advice_date',
                          'The pay advice date of the earned period',
                          'D',
                          'N');
Line: 4855

    insert_database_item ('PAY_EARNED_CUT_OFF_DATE',
                          'PTP.cut_off_date',
                          'The cut off date of the earned period',
                          'D',
                          'N');
Line: 4861

    insert_database_item ('PAY_EARNED_PERIOD_NAME',
                          'PTP.period_name',
                          'The period name for the earned period',
                          'T',
                          'N');
Line: 4867

    insert_database_item ('PAY_EARNED_PERIOD_NUMBER',
                          'PTP.period_num',
                          'The period number for the earned period',
                          'N',
                          'N');
Line: 4873

    insert_database_item ('PAY_EARNED_PERIOD_ID',
                          'PTP.time_period_id',
                          'The time period id for the earned period',
                          'N',
                          'N');
Line: 4907

and   not exists (select ''''
                    from pay_grossup_bal_exclusions pgb
                   where prr.source_id = pgb.source_id
                     and pgb.balance_type_id = pbt.balance_type_id
                     and pgb.source_type = ''EE''
                  )
and   not exists (select ''''
                    from pay_grossup_bal_exclusions pgb
                   where prr.element_type_id = pgb.source_id
                     and pgb.balance_type_id = pbt.balance_type_id
                     and pgb.source_type = ''ET''
                  )';
Line: 4920

    insert_route ('GROSSUP_AMOUNT',
                  'Route for gross up amount',
                  l_text);
Line: 4924

    insert_route_context_usages (l_assign_action_id_context_id,   1);
Line: 4925

    insert_route_context_usages (l_element_entry_id, 2);
Line: 4927

    insert_user_entity ('GROSSUP_AMOUNT',
                        'Entity for gross up');
Line: 4930

    insert_database_item ('GROSSUP_AMOUNT',
                          'nvl(sum(pay_balance_pkg.get_value(pdb.defined_balance_id,paa.assignment_action_id)), 0)',
                          'Gross up amount to be added to the Net',
                          'N',
                          'N');
Line: 4951

    insert_route ('ASSIGNMENT_CONTRACTS_ROUTE',
                  'Route for Assignment Contracts',
                  l_text);
Line: 4955

    insert_route_context_usages (l_assign_id_context_id, 1);
Line: 4956

    insert_route_context_usages (l_date_earned_context_id, 2);
Line: 4958

    insert_user_entity ('insert_route_context_usages',
                        'Entity for Assignment Contracts',
                        'Y');
Line: 4962

    insert_database_item ('CTR_TYPE',
                          'target.type',
                          'Contract Type (code)',
                          'T',
                          'Y');
Line: 4968

    insert_database_item ('CTR_STATUS',
                          'target.status',
                          'Contract Status (code)',
                          'T',
                          'Y');
Line: 4974

    insert_database_item ('CTR_TYPE_MEANING',
                          'hr_general.decode_lookup(''CONTRACT_TYPE'',target.type)',
                          'Contract Type (meaning)',
                          'T',
                          'Y');
Line: 4980

    insert_database_item ('CTR_STATUS_MEANING',
                          'hr_general.decode_lookup(''CONTRACT_STATUS'',target.status)',
                          'Contract Status (meaning)',
                          'T',
                          'Y');
Line: 5000

    insert_route ('PER_TIME_PERIODS_INFO',
                  'PER_TIME_PERIODS_INFO based on payroll_action_id and effective_date',
                  l_text);
Line: 5004

    insert_route_context_usages (l_payroll_action_id_context_id, 1);
Line: 5006

    insert_user_entity ('PER_TIME_PERIOD_DETAILS',
                        'PER_TIME_PERIOD_DETAILS',
                        'Y');
Line: 5010

    insert_database_item ('PAY_NO_OF_SCHEDULED_PAYMENTS',
                          'Count(target.REGULAR_PAYMENT_DATE)',
                          'Number of Scheduled Payments Per Year',
                          'N',
                          'Y');
Line: 5029

    insert_route ('ELEMENT_TYPE_ATTRIBUTES',
                  'Route for Element Type attributes',
                  l_text);
Line: 5033

    insert_route_context_usages (l_element_type_id, 1);
Line: 5034

    insert_route_context_usages (l_date_earned_context_id, 2);
Line: 5036

    insert_user_entity ('ELEMENT_TYPE_ATTRIBUTES',
                        'Entity for element type details');
Line: 5039

    insert_database_item ('ELEMENT_NAME',
                          'TARGET.element_name',
                          'element name of the element being processed',
                          'T',
                          'N');
Line: 5045

    insert_database_item ('CURRENT_ELEMENT_TYPE_ID',
                          'TARGET.element_type_id',
                          'The element type id of the element being processed',
                          'N',
                          'N');
Line: 5068

    insert_route ('ACCRUAL_PLAN_PAYROLL_PROCESS_1',
                  'Route for Accrual Plan ID',
                  l_text);
Line: 5072

    insert_route_context_usages (l_element_entry_id, 1);
Line: 5073

    insert_route_context_usages (l_date_earned_context_id, 2);
Line: 5075

    insert_user_entity ('ACCRUAL_PLAN_PAYROLL_PROCESS_1',
                        'Entity for ID of a plan',
                        'Y');
Line: 5079

    insert_database_item ('PTO_ACCRUAL_PLAN_ID',
                          'DISTINCT PAP.ACCRUAL_PLAN_ID',
                          'Accrual Plan ID',
                          'N',
                          'N');
Line: 5098

    insert_route ('ACCRUAL_PLAN_PAYROLL_PROCESS_2',
                  'Route for Accrual Plan Dates',
                  l_text);
Line: 5102

    insert_route_context_usages (l_assign_action_id_context_id,   1);
Line: 5104

    insert_user_entity ('ACCRUAL_PLAN_PAYROLL_PROCESS_2',
                        'Entity for start and end calculation dates for pto',
                        'Y');
Line: 5108

    insert_database_item ('PTO_DATE_PAID_CALCULATION_DATE',
                          'PPA.EFFECTIVE_DATE',
                          'Date Paid for current period',
                          'D',
                          'Y');
Line: 5114

    insert_database_item ('PTO_DATE_EARNED_CALCULATION_DATE',
                          'PPA.DATE_EARNED',
                          'Date Earned for current period',
                          'D',
                          'Y');
Line: 5138

  and    prr.element_type_id = (SELECT pap.balance_element_type_id
                                FROM   pay_accrual_plans pap
                                WHERE  pap.accrual_plan_element_type_id = &B2)
  and    ppa.action_type in (''R'',''Q'',''V'',''B'')';
Line: 5143

    insert_route ('ACCRUAL_PLAN_PAYROLL_PROCESS_3',
                  'Route for Accrual Plan Dates',
                  l_text);
Line: 5147

    insert_route_context_usages (l_assign_action_id_context_id, 1);
Line: 5148

    insert_route_context_usages (l_element_type_id, 2);
Line: 5150

    insert_user_entity ('ACCRUAL_PLAN_PAYROLL_PROCESS_3',
                        'Entity for start and end calculation dates for pto',
                        'Y');
Line: 5154

    insert_database_item ('PTO_DATE_PAID_START_DATE',
                          'MAX(PPA.EFFECTIVE_DATE) + 1',
                          'Date Paid for previous period',
                          'D',
                          'Y');
Line: 5160

    insert_database_item ('PTO_DATE_EARNED_START_DATE',
                          'MAX(PPA.DATE_EARNED) + 1',
                          'Date Earned for previous period',
                          'D',
                          'Y');
Line: 5190

    insert_route ('ASG_ORG_ROUTE',
                  'Route for Assignment Organizations',
                  l_text);
Line: 5194

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 5195

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 5197

    insert_user_entity ('ASG_ORG',
                        'The Assignment Organization User Entity',
                        'Y');
Line: 5201

    insert_database_item ('ASG_ORG_LOCATION',
                          'loc.location_code',
                          'Assignment Organization Location',
                          'T',
                          'Y');
Line: 5207

    insert_database_item ('ASG_ORG_TYPE',
                          'org_type.meaning',
                          'Assignment Organization Type',
                          'T',
                          'Y');
Line: 5213

    insert_database_item ('ASG_ORG_INT_EXT',
                          'int_ext.meaning',
                          'Assignment Organization Internal External Flag',
                          'T',
                          'Y');
Line: 5246

    insert_route ('ASG_POS_ROUTE',
                  'Route for Assignment Positions',
                  l_text);
Line: 5250

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 5251

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 5253

    insert_user_entity ('ASG_POS',
                        'The Assignment Position User Entity',
                        'Y');
Line: 5257

    insert_database_item ('ASG_POS_LOCATION',
                          'loc.location_code',
                          'Assignment Position Location',
                          'T',
                          'Y');
Line: 5263

    insert_database_item ('ASG_POS_FREQUENCY',
                          'frequency.meaning',
                          'Assignment Position Frequency',
                          'T',
                          'Y');
Line: 5269

    insert_database_item ('ASG_POS_WORKING_HOURS',
                          'target.working_hours',
                          'Assignment Position Working Hours',
                          'N',
                          'Y');
Line: 5275

    insert_database_item ('ASG_POS_PROBATION_PERIOD',
                          'target.probation_period',
                          'Assignment Position Probation Period',
                          'T',
                          'Y');
Line: 5281

    insert_database_item ('ASG_POS_PROBATION_PERIOD_UNITS',
                          'period.meaning',
                          'Assignment Position Probation Period Units',
                          'T',
                          'Y');
Line: 5287

    insert_database_item ('ASG_POS_FTE',
                          'target.fte',
                          'Assignment Position FTE',
                          'T',
                          'Y');
Line: 5306

    insert_route ('SEH_ASSIGNMENT_DETAILS',
                  'Assignment Details',
                  l_text);
Line: 5310

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 5311

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 5313

    insert_user_entity ('SEH_ASSIGNMENT_DETAILS',
                        'Assignment Details',
                        'Y');
Line: 5317

    insert_database_item ('ASG_WORK_AT_HOME',
                          'ASSIGN.work_at_home',
                          'The work at home code for an assignment',
                          'T',
                          'Y');
Line: 5336

    insert_route ('HRI_ASG_DETAILS',
                  'HRI Assignment only',
                  l_text);
Line: 5340

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 5341

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 5343

    insert_user_entity ('HRI_ASG_DETAILS',
                        'HRI Assignment Details',
                        'Y');
Line: 5347

    insert_database_item ('HRI_ASG_PRIMARY_CODE',
                          'asg.primary_flag',
                          'Primary Assignment Code',
                          'T',
                          'N');
Line: 5352

    insert_database_item ('HRI_ASG_EMPLOYMENT_CATEGORY_CODE',
                          'asg.employment_category',
                          'Employment Category Code',
                          'T',
                          'Y');
Line: 5357

    insert_database_item ('HRI_ASG_FREQ_CODE',
                          'asg.frequency',
                          'Assignment Working Hours Frequency Code',
                          'T',
                          'Y');
Line: 5362

    insert_database_item ('HRI_ASG_HOURS',
                          'asg.normal_hours',
                          'Assignment Normal Working Hours',
                          'N',
                          'Y');
Line: 5394

    insert_route ('HRI_ASG_INHRTD_WRK_CNDTNS',
                  'HRI Assignment Inherited Working Conditions',
                  l_text);
Line: 5398

    insert_route_context_usages (l_date_earned_context_id, 1);
Line: 5399

    insert_route_context_usages (l_assign_id_context_id,   2);
Line: 5401

    insert_user_entity ('HRI_ASG_INHRTD_WRK_CNDTNS',
                        'HRI Assignment Inherited Working Conditions',
                        'Y');
Line: 5405

    insert_database_item ('HRI_ASG_FULL_TIME_HOURS',
                          'NVL(hpf.working_hours,NVL(oi_org.org_information3,oi_bus.org_information3))',
                          'Full Time Working Hours',
                          'N',
                          'Y');
Line: 5410

    insert_database_item ('HRI_ASG_FULL_TIME_FREQ',
                          'NVL(hpf.frequency,NVL(oi_org.org_information4,oi_bus.org_information4))',
                          'Full Time Frequency',
                          'T',
                          'N');
Line: 5431

    insert_route ('LAST_REGULAR_PAYMENT_PERIOD',
                  'Last Regular Payment Period',
                  l_text);
Line: 5435

    insert_route_context_usages (l_payroll_action_id_context_id, 1);
Line: 5437

    insert_user_entity ('LAST_REGULAR_PAYMENT_PERIOD',
                        'Last Regular Payment Period',
                        'Y');
Line: 5441

    insert_database_item ('LAST_REG_PAYMENT_PERIOD',
                          'nvl(max(period_num), 1)',
                          'Last Regular Payment Period',
                          'N',
                          'N');
Line: 5460

                    (select min (tp.regular_payment_date)
                     from pay_payroll_actions ppa,
                          per_time_periods tp
                     where ppa.payroll_action_id = &B1
                     and   tp.payroll_id         = ppa.payroll_id
                     and   to_char(tp.regular_payment_date,''YYYY'') =
                           to_char(ppa.effective_date,''YYYY'')))';
Line: 5468

    insert_route ('LAST_REG_PAYMENT_PERIOD_START_DATE',
                  'Last Regular Payment Period Start Date',
                  l_text);
Line: 5472

    insert_route_context_usages (l_payroll_action_id_context_id, 1);
Line: 5474

    insert_user_entity ('LAST_REG_PAYMENT_PERIOD_START_DATE',
                        'Last Regular Payment Period Start Date',
                        'Y');
Line: 5478

    insert_database_item ('LAST_REG_PAYMENT_PERIOD_START_DATE',
                          'Max(target.START_DATE)',
                          'Last Regular Payment Period Start Date',
                          'D',
                          'N');
Line: 5496

    insert_route ('ASSIGNMENT_ACTION_DATES_ROUTE',
                  'Assignment Action Start Date',
                  l_text);
Line: 5500

    insert_route_context_usages (l_assign_action_id_context_id, 1);
Line: 5502

    insert_user_entity ('ASSIGNMENT_ACTION_DATES_UENT',
                        'Entity for the assignment Action Dates',
                        'Y');
Line: 5506

    insert_database_item ('ASSIGNMENT_ACTION_START_DATE',
                          'target.START_DATE',
                          'Assignment Action Start Date',
                          'D',
                          'Y');
Line: 5512

    insert_database_item ('ASSIGNMENT_ACTION_END_DATE',
                          'target.END_DATE',
                          'Assignment Action End Date',
                          'D',
                          'Y');
Line: 5520

end insert_routes_db_items;
Line: 5522

PROCEDURE insert_functions is
l_text                          long;
Line: 5535

      select ff_functions_s.nextval
      into l_function_id
      from dual;
Line: 5539

      insert into ff_functions
      (FUNCTION_ID
      ,BUSINESS_GROUP_ID
      ,LEGISLATION_CODE
      ,CLASS
      ,NAME
      ,ALIAS_NAME
      ,DATA_TYPE
      ,DEFINITION
      ,LAST_UPDATE_DATE
      ,LAST_UPDATED_BY
      ,LAST_UPDATE_LOGIN
      ,CREATED_BY
      ,CREATION_DATE
      ,DESCRIPTION
      )
      values(l_function_id
      ,      null
      ,      null
      ,      'E'
      ,      p_name
      ,      p_alias
      ,      p_type
      ,      p_definition
      ,      sysdate
      ,      -1
      ,      -1
      ,      -1
      ,      sysdate
      ,      p_description
      );
Line: 5583

     insert into ff_function_parameters
     (FUNCTION_ID
     ,SEQUENCE_NUMBER
     ,CLASS
     ,CONTINUING_PARAMETER
     ,DATA_TYPE
     ,NAME
     ,OPTIONAL
      )
     values
     (p_function_id
     ,p_sequence_no
     ,'I'
     ,'N'
     ,p_data_type
     ,p_name
     ,'N'
     );
Line: 5611

     select context_id
     into l_context_id
     from ff_contexts
     where context_name = p_context_name;
Line: 5616

     insert into ff_function_context_usages
     (FUNCTION_ID
     ,SEQUENCE_NUMBER
     ,CONTEXT_ID
     )
     values
     (p_function_id
	     ,p_sequence_no
     ,l_context_id
     );
Line: 5634

     hr_utility.set_location ('hrstrdbi.insert_functions' , 10);
Line: 5643

     hr_utility.set_location ('hrstrdbi.insert_functions' , 11);
Line: 5648

     hr_utility.set_location ('hrstrdbi.insert_functions' , 12);
Line: 5655

     hr_utility.set_location ('hrstrdbi.insert_functions' , 10);
Line: 5663

     hr_utility.set_location ('hrstrdbi.insert_functions' , 11);
Line: 5668

     hr_utility.set_location ('hrstrdbi.insert_functions', 12);
Line: 5673

     hr_utility.set_location ('hrstrdbi.insert_functions', 13);
Line: 5678

     hr_utility.set_location ('hrstrdbi.insert_functions', 14);
Line: 5709

     hr_utility.set_location ('hrstrdbi.insert_functions', 15);
Line: 5732

     hr_utility.set_location ('hrstrdbi.insert_functions', 16);
Line: 5747

     hr_utility.set_location ('hrstrdbi.insert_functions', 17);
Line: 6152

     hr_utility.set_location ('hrstrdbi.insert_functions', 15);
Line: 6168

     hr_utility.set_location ('hrstrdbi.insert_functions', 16);
Line: 6184

     hr_utility.set_location ('hrstrdbi.insert_functions', 17);
Line: 6210

     hr_utility.set_location ('hrstrdbi.insert_functions', 18);
Line: 6228

     hr_utility.set_location ('hrstrdbi.insert_functions', 19);
Line: 6246

     hr_utility.set_location ('hrstrdbi.insert_functions', 20);
Line: 6260

     hr_utility.set_location ('hrstrdbi.insert_functions', 21);
Line: 6295

end insert_functions;
Line: 6298

PROCEDURE insert_formula is
l_text                          long;
Line: 6398

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'QuickPaint';
Line: 6403

    INSERT INTO ff_formulas_f
    (formula_id,
     effective_start_date,
     effective_end_date,
     business_group_id,
     legislation_code,
     formula_type_id,
     formula_name,
     description,
     formula_text,
     sticky_flag)
    VALUES
    (ff_formulas_s.nextval,
     to_date('01/01/0001','DD/MM/YYYY'),
     to_date('31/12/4712','DD/MM/YYYY'),
     NULL,
     NULL,
     l_ftype_id,
     'TEMPLATE_BIS_DAYS_TO_HOURS',
     'Template conversion from Days to Hours',
     l_text,
     NULL);
Line: 6426

     hr_utility.set_location ('hrstrdbi.insert_formula', 114);
Line: 6578

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'QuickPaint';
Line: 6583

    INSERT INTO ff_formulas_f
    (formula_id,
     effective_start_date,
     effective_end_date,
     business_group_id,
     legislation_code,
     formula_type_id,
     formula_name,
     description,
     formula_text,
     sticky_flag)
    VALUES
    (ff_formulas_s.nextval,
     to_date('01/01/0001','DD/MM/YYYY'),
     to_date('31/12/4712','DD/MM/YYYY'),
     NULL,
     NULL,
     l_ftype_id,
     'TEMPLATE_FTE',
     'Calculates Assignment Full Time Equivalent Value',
     l_text,
     NULL);
Line: 6606

     hr_utility.set_location ('hrstrdbi.insert_formula', 115);
Line: 6652

     select formula_type_id
     into   l_ftype_id
     from   ff_formula_types
     where  formula_type_name = 'QuickPaint';
Line: 6657

      INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'TEMPLATE_HEAD',
      'Calculates Assignment Headcount Value',
      l_text,
      NULL);
Line: 6680

     hr_utility.set_location ('hrstrdbi.insert_formula', 116);
Line: 6726

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'QuickPaint';
Line: 6731

      INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'EXAMPLE_BIS_OT_BAND1',
      'Calculate Overtime',
      l_text,
      NULL);
Line: 6754

     hr_utility.set_location ('hrstrdbi.insert_formula', 117);
Line: 6864

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'Accrual Carryover';
Line: 6869

      INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'PTO_PAYROLL_CARRYOVER',
      'Seeded carry over payroll formula for PTO accruals',
      l_text,
      NULL);
Line: 6892

     hr_utility.set_location ('hrstrdbi.insert_formula', 118);
Line: 7029

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'Accrual Subformula';
Line: 7034

     INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'PTO_PAYROLL_PERIOD_ACCRUAL',
      'Seeded looping payroll formula for PTO accruals',
      l_text,
      NULL);
Line: 7057

    hr_utility.set_location ('hrstrdbi.insert_formula', 119);
Line: 7404

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'Accrual';
Line: 7409

     INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'PTO_PAYROLL_CALCULATION',
      'Seeded top level payroll formula for PTO accruals',
      l_text,
      NULL);
Line: 7432

    hr_utility.set_location ('hrstrdbi.insert_formula', 120);
Line: 7452

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'Accrual Carryover';
Line: 7457

    INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'PTO_ROLLING_CARRYOVER',
      'Seeded carry over rolling formula for PTO accruals',
      l_text,
      NULL);
Line: 7480

    hr_utility.set_location ('hrstrdbi.insert_formula', 121);
Line: 7576

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'Accrual Subformula';
Line: 7581

    INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'PTO_ROLLING_PERIOD_ACCRUAL',
      'Seeded looping rolling formula for PTO accruals',
      l_text,
      NULL);
Line: 7604

    hr_utility.set_location ('hrstrdbi.insert_formula', 122);
Line: 7915

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'Accrual';
Line: 7920

    INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'PTO_ROLLING_ACCRUAL',
      'Seeded top level rolling formula for PTO accruals',
      l_text,
      NULL);
Line: 7943

    hr_utility.set_location ('hrstrdbi.insert_formula', 123);
Line: 7978

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'Accrual Carryover';
Line: 7983

    INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'PTO_SIMPLE_CARRYOVER',
      'Seeded simple carryover formula for PTO accruals',
      l_text,
      NULL);
Line: 8006

    hr_utility.set_location ('hrstrdbi.insert_formula', 124);
Line: 8100

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'Accrual Subformula';
Line: 8105

    INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'PTO_SIMPLE_PERIOD_ACCRUAL',
      'Seeded simple looping formula for PTO accruals',
      l_text,
      NULL);
Line: 8128

    hr_utility.set_location ('hrstrdbi.insert_formula', 125);
Line: 8444

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'Accrual';
Line: 8449

    INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'PTO_SIMPLE_MULTIPLIER',
      'Seeded simple top level formula for PTO accruals',
      l_text,
      NULL);
Line: 8473

    hr_utility.set_location ('hrstrdbi.insert_formula', 126);
Line: 8607

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'Accrual Ineligibility';
Line: 8612

    INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'PTO_INELIGIBILITY_CALCULATION',
      'Seeded formula allowing paymix to cope with PTO accruals upgrade',
      l_text,
      NULL);
Line: 8635

    hr_utility.set_location ('hrstrdbi.insert_formula', 127);
Line: 8661

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'User Table Validation';
Line: 8666

    INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'CHECK_RATE_TYPE',
      'Checks that conversion type exists',
      l_text,
      NULL);
Line: 8689

    hr_utility.set_location ('hrstrdbi.insert_formula', 128);
Line: 8757

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'QuickPaint';
Line: 8762

    INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'TEMPLATE_BIS_TRAINING_CONVERT_DURATION',
      'Seeded formula to Calculate Training Duration',
      l_text,
      NULL);
Line: 8785

    hr_utility.set_location ('hrstrdbi.insert_formula', 128);
Line: 8914

    INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'TEMPLATE_ABSENCE_DURATION',
      'formula template for absence duration calculation',
      l_text,
      NULL);
Line: 8937

    hr_utility.set_location ('hrstrdbi.insert_formula', 129);
Line: 8960

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'Oracle Payroll';
Line: 8965

    INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'CALC_GROSSUP_PAY_VALUE',
      'This formula is used in the grossup calculations',
      l_text,
      NULL);
Line: 8988

    hr_utility.set_location ('hrstrdbi.insert_formula', 130);
Line: 9101

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'Net to Gross';
Line: 9106

    INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'DEFAULT_GROSSUP',
      'This formula is used in the grossup calculations',
      l_text,
      NULL);
Line: 9129

    hr_utility.set_location ('hrstrdbi.insert_formula', 131);
Line: 9144

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'QuickPaint';
Line: 9149

    INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'QH_ASSIGNMENT_NAME',
      'This formula is used to get a job assignment_name',
      l_text,
      NULL);
Line: 9172

    hr_utility.set_location ('hrstrdbi.insert_formula', 132);
Line: 9204

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'Element Skip';
Line: 9209

     INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'PTO_ORACLE_SKIP_RULE',
      'Skips PTO elements that have already been processed in the same period',
      l_text,
      NULL);
Line: 9232

    hr_utility.set_location ('hrstrdbi.insert_formula', 133);
Line: 9689

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'Accrual';
Line: 9694

     INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'PTO_PAYROLL_BALANCE_CALCULATION',
      'Seeded top level payroll formula for PTO accruals',
      l_text,
      NULL);
Line: 9717

    hr_utility.set_location ('hrstrdbi.insert_formula', 134);
Line: 9726

    but must be amended, according to the documentaion, by inserting the
    name of the database item which was created with your defined balance.
    This defined balance should have been created immediately after the
    accrual plan.
   ---------------------------------------------------------------------*/

DEFAULT FOR ACP_INELIGIBILITY_PERIOD_TYPE IS ''CM''
DEFAULT FOR ACP_INELIGIBILITY_PERIOD_LENGTH IS 0
DEFAULT FOR ACP_CONTINUOUS_SERVICE_DATE IS ''4712/12/31 00:00:00'' (date)
DEFAULT FOR ACP_ENROLLMENT_END_DATE IS ''4712/12/31 00:00:00'' (date)
DEFAULT FOR ACP_TERMINATION_DATE IS ''4712/12/31 00:00:00'' (date)
DEFAULT FOR ACP_ENROLLMENT_START_DATE IS ''4712/12/31 00:00:00'' (date)
DEFAULT FOR ACP_SERVICE_START_DATE IS ''4712/12/31 00:00:00'' (date)

default for Accrual_Start_Date is ''4712/12/31 00:00:00'' (date)
default for Accrual_Latest_Balance is 0

INPUTS ARE
Calculation_Date (date),
Accrual_Start_Date (date),
Accrual_Latest_Balance

E = SET_NUMBER(''CEILING'', 20)
E = SET_NUMBER(''ACCRUAL_RATE'', 2)

Accruing_Frequency = ''M''   /* Month */
Accruing_Multiplier = 1

E = SET_TEXT(''ACCRUING_FREQUENCY'', Accruing_Frequency)
E = SET_NUMBER(''ACCRUING_MULTIPLIER'', Accruing_Multiplier)

Beginning_Of_Calculation_Year = to_date(''0106''||to_char(Calculation_Date,''YYYY''),
                                        ''DDMMYYYY'')

IF (Beginning_Of_Calculation_Year > Calculation_Date) THEN
(
  Beginning_of_Calculation_Year = ADD_MONTHS(Beginning_Of_Calculation_Year, -12)
)

IF Accrual_Start_Date < Beginning_Of_Calculation_Year THEN
(
  Accrual_Start_Date = Beginning_Of_Calculation_Year
)

E = SET_DATE(''BEGINNING_OF_CALCULATION_YEAR'', Beginning_Of_Calculation_Year)

E = GET_PERIOD_DATES(Beginning_of_Calculation_Year,
                     Accruing_Frequency,
                     Beginning_Of_Calculation_Year,
                     Accruing_Multiplier)

First_Period_SD = get_date(''PERIOD_START_DATE'')
First_Period_ED = get_date(''PERIOD_END_DATE'')

/* ------------------------------------------------------------------------
   Set the Calculation_Date to the Termination Date if not null
-------------------------------------------------------------------------- */

IF NOT (ACP_TERMINATION_DATE WAS DEFAULTED) OR
    NOT (ACP_ENROLLMENT_END_DATE WAS DEFAULTED) THEN
(
  Early_End_Date = least(ACP_TERMINATION_DATE, ACP_ENROLLMENT_END_DATE)

  IF (Early_End_Date < First_Period_ED) THEN
  (
    Total_Accrued_PTO = 0
    E = PUT_MESSAGE(''HR_52794_PTO_FML_ASG_TER'')
   )

  IF (Early_End_Date < Calculation_Date) THEN
  (
    Calculation_Date = Early_End_Date
  )
)

/* ------------------------------------------------------------------------
   Get the last whole period prior to the Calculation Date and ensure that it is within the
   Year (if the Calculation Date is the End of a Period then use that period)
   ------------------------------------------------------------------------ */

E = GET_PERIOD_DATES(Calculation_Date,
                     Accruing_Frequency,
                     Beginning_of_Calculation_Year,
                     Accruing_Multiplier)

Calculation_Period_SD  = get_date(''PERIOD_START_DATE'')
Calculation_Period_ED = get_date(''PERIOD_END_DATE'')

IF (Calculation_Date <> Calculation_Period_ED) THEN
    (
     E = GET_PERIOD_DATES(ADD_DAYS(Calculation_Period_SD,-1),
                                                Accruing_Frequency,
                                                Beginning_of_Calculation_Year,
                                                Accruing_Multiplier)

    Calculation_Period_SD  = get_date(''PERIOD_START_DATE'')
    Calculation_Period_ED = get_date(''PERIOD_END_DATE'')
   )

If (Calculation_Period_ED < First_Period_ED) THEN
   (
    Total_Accrued_PTO = 0
    E = PUT_MESSAGE(''HR_52795_PTO_FML_CALC_DATE'')
    )

/* ------------------------------------------------------------------------
   Set the Continuous Service Global Variable, whilst also
   ensuring that the continuous service date is before the Calculation Period
  ------------------------------------------------------------------------ */

IF (ACP_CONTINUOUS_SERVICE_DATE WAS DEFAULTED) THEN
    (
    E = set_date(''CONTINUOUS_SERVICE_DATE'', ACP_SERVICE_START_DATE)
    )
ELSE IF(ACP_CONTINUOUS_SERVICE_DATE > Calculation_Period_SD) THEN
   (
    Total_Accrued_PTO = 0
    E = PUT_MESSAGE(''HR_52796_PTO_FML_CSD'')
    E = set_date(''CONTINUOUS_SERVICE_DATE'', ACP_CONTINUOUS_SERVICE_DATE)
   )
ELSE
  (
    E = set_date(''CONTINUOUS_SERVICE_DATE'', ACP_CONTINUOUS_SERVICE_DATE)
  )

Continuous_Service_Date = get_date(''CONTINUOUS_SERVICE_DATE'')

First_Eligible_To_Accrue_Date  = Continuous_Service_Date

/*------------------------------------------------------------------------
   Determine the date on which accrued PTo may first be registered, i.e the date on which the
   Ineligibility Period expires
   ------------------------------------------------------------------------ */

Accrual_Ineligibility_Expired_Date = First_Eligible_To_Accrue_Date

IF (ACP_INELIGIBILITY_PERIOD_LENGTH > 0) THEN
   (
   IF ACP_INELIGIBILITY_PERIOD_TYPE = ''BM'' THEN
      (
      Accrual_Ineligibility_Expired_Date = add_months(Continuous_Service_Date,
                                                      ACP_INELIGIBILITY_PERIOD_LENGTH*2)
      )
   ELSE IF ACP_INELIGIBILITY_PERIOD_TYPE = ''F'' THEN
      (
      Accrual_Ineligibility_Expired_Date = add_days(Continuous_Service_Date,
                                                    ACP_INELIGIBILITY_PERIOD_LENGTH*14)
      )
   ELSE IF ACP_INELIGIBILITY_PERIOD_TYPE = ''CM'' THEN
      (
      Accrual_Ineligibility_Expired_Date = add_months(Continuous_Service_Date,
                                                      ACP_INELIGIBILITY_PERIOD_LENGTH)
      )
   ELSE IF ACP_INELIGIBILITY_PERIOD_TYPE = ''LM'' THEN
      (
      Accrual_Ineligibility_Expired_Date = add_days(Continuous_Service_Date,
                                                    ACP_INELIGIBILITY_PERIOD_LENGTH*28)
      )
   ELSE IF ACP_INELIGIBILITY_PERIOD_TYPE = ''Q'' THEN
      (
      Accrual_Ineligibility_Expired_Date = add_months(Continuous_Service_Date,
                                                      ACP_INELIGIBILITY_PERIOD_LENGTH*3)
      )
   ELSE IF ACP_INELIGIBILITY_PERIOD_TYPE = ''SM'' THEN
      (
      Accrual_Ineligibility_Expired_Date = add_months(Continuous_Service_Date,
                                                      ACP_INELIGIBILITY_PERIOD_LENGTH/2)
      )
   ELSE IF ACP_INELIGIBILITY_PERIOD_TYPE = ''SY'' THEN
      (
      Accrual_Ineligibility_Expired_Date = add_months(Continuous_Service_Date,
                                                      ACP_INELIGIBILITY_PERIOD_LENGTH*6)
      )
   ELSE IF ACP_INELIGIBILITY_PERIOD_TYPE = ''W'' THEN
      (
      Accrual_Ineligibility_Expired_Date = add_days(Continuous_Service_Date,
                                                    ACP_INELIGIBILITY_PERIOD_LENGTH*7)
      )
   ELSE IF ACP_INELIGIBILITY_PERIOD_TYPE = ''Y'' THEN
      (
      Accrual_Ineligibility_Expired_Date = add_months(Continuous_Service_Date,
                                                      ACP_INELIGIBILITY_PERIOD_LENGTH*12)
      )

   IF Accrual_Ineligibility_Expired_Date > First_Eligible_To_Accrue_Date
   AND Calculation_Date < Accrual_Ineligibility_Expired_Date THEN
      (
      First_Eligible_To_Accrue_Date = Accrual_Ineligibility_Expired_Date
      )
   )

/* ------------------------------------------------------------------------
   Get the first full period following the First_Eligible_To_Accrue_Date
   (if it falls on the beginning of the period then use that period)
------------------------------------------------------------------------- */

Latest_Balance = 0

IF (not Accrual_Start_Date was defaulted) AND
   ((Calculation_Date < Accrual_Ineligibility_Expired_Date) OR
    (Accrual_Start_Date > Accrual_Ineligibility_Expired_Date)) THEN
(
  Adjusted_Start_Date = Get_Start_Date(Accrual_Start_Date,
                                       Beginning_Of_Calculation_Year)

  IF (Adjusted_Start_Date < Accrual_Start_Date) THEN
  (
    Process_Full_Term = ''Y''
  )
  ELSE
  (
    Process_Full_Term = ''N''
  )
)
ELSE
(
  Process_Full_Term = ''Y''
)

IF (Process_Full_Term = ''N'') AND
   (Accrual_Start_Date >= First_Eligible_To_Accrue_Date) THEN
(

  E = GET_PERIOD_DATES(Adjusted_Start_Date,
                       Accruing_Frequency,
                       Beginning_Of_Calculation_Year,
                       Accruing_Multiplier)

  First_Eligible_To_Accrue_Period_SD = get_date(''PERIOD_START_DATE'')
  First_Eligible_To_Accrue_Period_ED = get_date(''PERIOD_END_DATE'')

  Latest_Balance = Accrual_Latest_Balance
  Effective_Start_Date = Accrual_Start_Date

)
ELSE IF First_Eligible_To_Accrue_Date > Beginning_Of_Calculation_Year THEN
(
  IF (not Accrual_Start_Date was defaulted) THEN
  (
    Latest_Balance = Accrual_Latest_Balance
  )
  ELSE
  (
    Latest_Balance = 0
  )

  E = GET_PERIOD_DATES(First_Eligible_To_Accrue_Date,
                       Accruing_Frequency,
                       Beginning_Of_Calculation_Year,
                       Accruing_Multiplier)

  First_Eligible_To_Accrue_Period_SD  = get_date(''PERIOD_START_DATE'')
  First_Eligible_To_Accrue_Period_ED  = get_date(''PERIOD_END_DATE'')

  IF First_Eligible_To_Accrue_Date <> First_Eligible_To_Accrue_Period_SD THEN
      (
       E = GET_PERIOD_DATES(add_days(First_Eligible_To_Accrue_Period_ED,1),
                                                  Accruing_Frequency,
                                                  Beginning_Of_Calculation_Year,
                                                  Accruing_Multiplier)

       First_Eligible_To_Accrue_Period_SD  = get_date(''PERIOD_START_DATE'')
       First_Eligible_To_Accrue_Period_ED  = get_date(''PERIOD_END_DATE'')
       )

  IF (First_Eligible_To_Accrue_Period_SD > Calculation_Period_ED) THEN
     (
       Total_Accrued_PTO = 0
       E = PUT_MESSAGE(''HR_52793_PTO_FML_ASG_INELIG'')
    )

  Effective_Start_Date = First_Eligible_To_Accrue_Date
)
ELSE
(
  IF (not Accrual_Start_Date was defaulted) THEN
  (
    Latest_Balance = Accrual_Latest_Balance
  )
  ELSE
  (
    Latest_Balance = 0
  )

  First_Eligible_To_Accrue_Period_SD  = First_Period_SD
  First_Eligible_To_Accrue_Period_ED  = First_Period_ED

  Effective_Start_Date = Beginning_Of_Calculation_Year
)
/* ------------------------------------------------------------------------
   Determine the date on which PTO actually starts accruing based on Hire Date,
   Continuous Service Date and plan Enrollment Start Date. Remember, we have already determined
   whether to user hire date or CSD earlier in the formula.
   If this date is after the 1st period and the fisrt eligible date then establish the first full period
   after this date (if the Actual Start Date falls on the beginning of a period then use this period)
 ------------------------------------------------------------------------ */

IF Continuous_Service_date = ACP_CONTINUOUS_SERVICE_DATE THEN
(
  Actual_Accrual_Start_Date = Continuous_service_Date
)
ELSE
(
  Actual_Accrual_Start_Date = greatest(Continuous_Service_Date,
                                       ACP_ENROLLMENT_START_DATE,
                                       First_Period_SD)
)

/* -------------------------------------------------------------------------
       Determine the actual start of the accrual calculation
-------------------------------------------------------------------------*/
IF (Actual_Accrual_Start_Date > First_Period_SD AND
     Actual_Accrual_Start_Date > First_Eligible_To_Accrue_Period_SD) THEN
    (
     E = GET_PERIOD_DATES(Actual_Accrual_Start_Date,
                          Accruing_Frequency,
                          Beginning_Of_Calculation_Year,
                          Accruing_Multiplier)

     Accrual_Start_Period_SD = get_date(''PERIOD_START_DATE'')
     Accrual_Start_Period_ED = get_date(''PERIOD_END_DATE'')

     IF Actual_Accrual_Start_Date > Accrual_Start_Period_SD THEN
         (
          E = GET_PERIOD_DATES(add_days(Accrual_Start_Period_ED,1),
                               Accruing_Frequency,
                               Beginning_of_Calculation_Year,
                               Accruing_Multiplier)

          Accrual_Start_Period_SD = get_date(''PERIOD_START_DATE'')
          Accrual_Start_Period_ED = get_date(''PERIOD_END_DATE'')
         )

/* -----------------------------------------------------------------
        If the Actual Acrual Period is after the Calculation Period then end the processing.
----------------------------------------------------------------- */
        IF (Accrual_Start_Period_SD > Calculation_Period_ED) THEN
            (
            Total_Accrued_PTO = 0
            E = PUT_MESSAGE(''HR_52797_PTO_FML_ACT_ACCRUAL'')
            )
     )

ELSE IF (First_Eligible_To_Accrue_Period_SD > First_Period_SD) THEN
     (
      Accrual_Start_Period_SD = First_Eligible_To_Accrue_Period_SD
      Accrual_Start_Period_ED = First_Eligible_To_Accrue_Period_ED
     )
ELSE
    (
      Accrual_Start_Period_SD = First_Period_SD
      Accrual_Start_Period_ED = First_Period_ED
    )

 /* -------------------------------------------------------------------
       Now set up the information that will be used in when looping through the periods
--------------------------------------------------------------------- */

IF Calculation_Period_ED >= Accrual_Start_Period_ED THEN
(
  E = set_date(''PERIOD_SD'',Accrual_Start_Period_SD)
  E = set_date(''PERIOD_ED'',Accrual_Start_Period_ED)
  E = set_date(''LAST_PERIOD_SD'',Calculation_Period_SD)
  E = set_date(''LAST_PERIOD_ED'',Calculation_Period_ED)

  IF (Process_Full_Term = ''N'') THEN
  (
    E = set_number(''TOTAL_ACCRUED_PTO'', Latest_Balance)
  )
  ELSE
  (
    E = set_number(''TOTAL_ACCRUED_PTO'', 0)
  )

  E = LOOP_CONTROL(''PTO_SIMPLE_PERIOD_ACCRUAL'')

  Total_Accrued_PTO = get_number(''TOTAL_ACCRUED_PTO'') - Latest_Balance

)
ELSE
(
  Total_Accrued_PTO = 0
)


IF Accrual_Start_Period_SD <= Calculation_Period_SD THEN
(
  Accrual_end_date = Calculation_Period_ED
)

IF Process_Full_Term = ''Y'' AND
   Effective_Start_Date > Actual_Accrual_Start_Date THEN
(
  Effective_Start_Date = Actual_Accrual_Start_Date
)

Effective_End_Date = Calculation_Date

IF Effective_Start_Date >= Effective_End_Date THEN
(
  Effective_Start_Date = Effective_End_Date
)

RETURN Total_Accrued_PTO, Effective_start_date, Effective_end_date, Accrual_end_date
';
Line: 10132

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'Accrual';
Line: 10137

     INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'PTO_SIMPLE_BALANCE_MULTIPLIER',
      'Seeded top level formula for PTO accruals',
      l_text,
      NULL);
Line: 10160

    hr_utility.set_location ('hrstrdbi.insert_formula', 135);
Line: 10563

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'Accrual';
Line: 10568

     INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'PTO_HD_ANNIVERSARY_BALANCE',
      'Seeded simple top level formula for PTO accruals',
      l_text,
      NULL);
Line: 10591

    hr_utility.set_location ('hrstrdbi.insert_formula', 136);
Line: 10685

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'Accrual Subformula';
Line: 10690

     INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'PTO_HD_ANNIVERSARY_PERIOD_ACCRUAL',
      'Seeded hire date anniversary looping formula for PTO accruals',
      l_text,
      NULL);
Line: 10713

    hr_utility.set_location ('hrstrdbi.insert_formula', 137);
Line: 10746

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'Accrual Carryover';
Line: 10751

     INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'PTO_HD_ANNIVERSARY_CARRYOVER',
      'Seeded simple carryover formula for PTO accruals',
      l_text,
      NULL);
Line: 10774

    hr_utility.set_location ('hrstrdbi.insert_formula', 138);
Line: 10795

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'Oracle Payroll';
Line: 10800

     INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'PTO_TAGGING_FORMULA',
      'Seeded top level payroll formula for PTO accruals',
      l_text,
      NULL);
Line: 10823

    hr_utility.set_location ('hrstrdbi.insert_formula', 139);
Line: 10898

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'CAGR';
Line: 10903

     INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01-01-1951','DD-MM-YYYY'),
      to_date('31-12-4712','DD-MM-YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'HR_CAGR_PYS_TEMPLATE',
      'HR_CAGR_PYS_TEMPLATE',
      l_text,
      NULL);
Line: 10926

    hr_utility.set_location ('hrstrdbi.insert_formula', 140);
Line: 11002

    select formula_type_id
    into   l_ftype_id
    from   ff_formula_types
    where  formula_type_name = 'CAGR';
Line: 11007

     INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01-01-1951','DD-MM-YYYY'),
      to_date('31-12-4712','DD-MM-YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'HR_CAGR_TEMPLATE',
      'HR_CAGR_TEMPLATE',
      l_text,
      NULL);
Line: 11030

    hr_utility.set_location ('hrstrdbi.insert_formula', 141);
Line: 11095

   select formula_type_id
   into l_ftype_id
   from ff_formula_types
   where formula_type_name = 'Promotion';
Line: 11100

    INSERT INTO ff_formulas_f
     (formula_id,
      effective_start_date,
      effective_end_date,
      business_group_id,
      legislation_code,
      formula_type_id,
      formula_name,
      description,
      formula_text,
      sticky_flag)
   VALUES
     (ff_formulas_s.nextval,
      to_date('01/01/0001','DD/MM/YYYY'),
      to_date('31/12/4712','DD/MM/YYYY'),
      NULL,
      NULL,
      l_ftype_id,
      'PROMOTION_TEMPLATE',
      'Seeded Promotions Formula',
      l_text,
      NULL);
Line: 11123

    hr_utility.set_location ('hrstrdbi.insert_formula', 142);
Line: 11126

end insert_formula;
Line: 11128

procedure insert_user_tables is
--
  l_formula_id number;
Line: 11132

    hr_utility.set_location ('hrstrdbi.insert_user_tables', 1);
Line: 11135

     select formula_id into l_formula_id
      FROM ff_formulas_f
      WHERE formula_name = 'CHECK_RATE_TYPE'
      AND EFFECTIVE_START_DATE = to_date('01-01-0001', 'DD-MM-YYYY')
      AND EFFECTIVE_END_DATE = to_date('31-12-4712', 'DD-MM-YYYY');
Line: 11145

   insert into pay_user_tables (
                              USER_TABLE_ID
                            , BUSINESS_GROUP_ID
                            , LEGISLATION_CODE
                            , RANGE_OR_MATCH
                            , USER_KEY_UNITS
                            , USER_TABLE_NAME
                            , LEGISLATION_SUBGROUP
                            , USER_ROW_TITLE
                            , LAST_UPDATE_DATE
                            , LAST_UPDATED_BY
                            , LAST_UPDATE_LOGIN
                            , CREATED_BY
                            , CREATION_DATE
                            )
              select          pay_user_tables_s.nextval
                            , NULL
		            , NULL
                            , 'M'
                            , 'T'
                            , 'EXCHANGE_RATE_TYPES'
                            , NULL
                            , 'Processing Type'
                            , trunc(sysdate)
                            , NULL
                            , NULL
                            , NULL
                            , trunc(sysdate)
                from         sys.dual;
Line: 11175

   insert into pay_user_columns (
 		USER_COLUMN_ID
		,BUSINESS_GROUP_ID
		,LEGISLATION_CODE
		,USER_TABLE_ID
		,FORMULA_ID
		,USER_COLUMN_NAME
		,LEGISLATION_SUBGROUP
		,LAST_UPDATE_DATE
		,LAST_UPDATED_BY
		,LAST_UPDATE_LOGIN
		,CREATED_BY
		,CREATION_DATE )
	 select pay_user_columns_s.nextval
		,''
		,NULL
		,udt.user_table_id
		,l_formula_id
		,'Conversion Rate Type'
		,''
		,sysdate
		,1
		,1
		,1
		,sysdate
	 from pay_user_tables udt
         where udt.user_table_name = 'EXCHANGE_RATE_TYPES';
Line: 11203

  insert into pay_user_rows (
 		USER_ROW_ID
 	        ,EFFECTIVE_START_DATE
	        ,EFFECTIVE_END_DATE
		,BUSINESS_GROUP_ID
		,LEGISLATION_CODE
		,USER_TABLE_ID
		,ROW_LOW_RANGE_OR_NAME
		,LEGISLATION_SUBGROUP
		,ROW_HIGH_RANGE
		,LAST_UPDATE_DATE
		,LAST_UPDATED_BY
		,LAST_UPDATE_LOGIN
		,CREATED_BY
		,CREATION_DATE )
         select pay_user_rows_s.nextval
   	        , to_date('01-01-0001', 'DD-MM-YYYY')
		, to_date('31-12-4712', 'DD-MM-YYYY')
		,NULL
		,NULL
		,udt.user_table_id
		,'BIS'
		,''
		,''
	        ,''
		,1
		,1
		,1
		,sysdate
	from pay_user_tables udt
        where udt.user_table_name = 'EXCHANGE_RATE_TYPES';
Line: 11235

  insert into pay_user_rows (
 		USER_ROW_ID
 	        ,EFFECTIVE_START_DATE
	        ,EFFECTIVE_END_DATE
		,BUSINESS_GROUP_ID
		,LEGISLATION_CODE
		,USER_TABLE_ID
		,ROW_LOW_RANGE_OR_NAME
		,LEGISLATION_SUBGROUP
		,ROW_HIGH_RANGE
		,LAST_UPDATE_DATE
		,LAST_UPDATED_BY
		,LAST_UPDATE_LOGIN
		,CREATED_BY
		,CREATION_DATE )
	 select pay_user_rows_s.nextval
   	        , to_date('01-01-0001', 'DD-MM-YYYY')
		, to_date('31-12-4712', 'DD-MM-YYYY')
		,NULL
		,NULL
		,udt.user_table_id
		,'HRMS'
		,''
		,''
	        ,''
		,1
		,1
		,1
		,sysdate
	 from pay_user_tables udt
	 where udt.user_table_name = 'EXCHANGE_RATE_TYPES';
Line: 11267

  insert into pay_user_rows (
 		USER_ROW_ID
 	        ,EFFECTIVE_START_DATE
	        ,EFFECTIVE_END_DATE
		,BUSINESS_GROUP_ID
		,LEGISLATION_CODE
		,USER_TABLE_ID
		,ROW_LOW_RANGE_OR_NAME
		,LEGISLATION_SUBGROUP
		,ROW_HIGH_RANGE
		,LAST_UPDATE_DATE
		,LAST_UPDATED_BY
		,LAST_UPDATE_LOGIN
		,CREATED_BY
		,CREATION_DATE )
	 select pay_user_rows_s.nextval
   	        , to_date('01-01-0001', 'DD-MM-YYYY')
		, to_date('31-12-4712', 'DD-MM-YYYY')
		,NULL
		,NULL
		,udt.user_table_id
		,'PAY'
		,''
		,''
	        ,''
		,1
		,1
		,1
		,sysdate
	 from pay_user_tables udt
	 where udt.user_table_name = 'EXCHANGE_RATE_TYPES';
Line: 11299

    hr_utility.set_location ('hrstrdbi.insert_user_tables', 2);
Line: 11301

end insert_user_tables;
Line: 11303

procedure insert_monetary_units is
 TYPE eur_info_type is RECORD (name VARCHAR2(150), value NUMBER);
Line: 11326

    insert into pay_monetary_units
    (MONETARY_UNIT_ID,
     CURRENCY_CODE,
     MONETARY_UNIT_NAME,
     RELATIVE_VALUE,
     COMMENTS,
     CREATION_DATE)
     values
     (pay_monetary_units_s.nextval,
      'EUR',
      eur_info(i).name,
      eur_info(i).value,
      NULL,
      sysdate);
Line: 11343

end insert_monetary_units;
Line: 11347

    insert_context;
Line: 11348

    insert_routes_db_items;
Line: 11349

    insert_functions;
Line: 11350

    insert_formula;
Line: 11351

    insert_user_tables;
Line: 11352

    insert_monetary_units;