DBA Data[Home] [Help]

APPS.PAY_AUTOGN SQL Statements

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

Line: 3

   procedure insert_bf_dimensions is
      x number;
Line: 5

      procedure my_dimension_insert ( p_route_id             number,
                                      p_payments_flag        varchar2,
                                      p_database_item_suffix varchar2,
                                      p_dimension_name       varchar2,
                                      p_dimension_type       varchar2,
                                      p_description          varchar2,
                                      p_feed_checking_type   varchar2,
                                      p_feed_checking_code   varchar2,
                                      p_expiry_checking_level varchar2,
                                      p_expiry_checking_code varchar2) is
      begin
         hr_utility.trace('p_dimension_name is ' || p_dimension_name);
Line: 29

      end my_dimension_insert;
Line: 30

      function do_child_inserts return number is
         x number;
Line: 36

         hr_utility.set_location('pay_autogn.insert_bf_dimensions',20);
Line: 37

         insert into ff_route_context_usages
         (route_id,
          context_id,
          sequence_no)
         select ff_routes_s.currval,
                CON.context_id,
                1
         from   ff_contexts CON
         where  CON.context_name = 'ASSIGNMENT_ACTION_ID';
Line: 49

         hr_utility.set_location('pay_autogn.insert_bf_dimensions',30);
Line: 50

         insert into ff_route_parameters
         (route_parameter_id,
          route_id,
          sequence_no,
          parameter_name,
          data_type)
         values
         (ff_route_parameters_s.nextval,
          ff_routes_s.currval,
          1,
          'Balance Type ID',
          'N');
Line: 62

         hr_utility.set_location('pay_autogn.insert_bf_dimensions',40);
Line: 63

         select ff_routes_s.currval into x from dual;
Line: 67

      end do_child_inserts;
Line: 70

hr_utility.set_location('pay_autogn.insert_bf_dimensions',1);
Line: 71

insert into ff_routes
(route_id,
 user_defined_flag,
 route_name,
 description,
 text)
values
(ff_routes_s.nextval,
 'N',
 'BF Person-level Tax Year to Date Balance Dimension',
 'Summed data for the PERSON-LEVEL BF TAX YEAR TO DATE balance dimension',
'        pay_balance_feeds_f     FEED
       ,pay_run_result_values    TARGET
       ,pay_run_results          RR
       ,pay_payroll_actions      PACT
       ,pay_assignment_actions   ASSACT
       ,pay_payroll_actions      BACT
       ,pay_assignment_actions   BAL_ASSACT
       ,per_assignments_f         ASS
       ,per_assignments_f         START_ASS
where  BAL_ASSACT.assignment_action_id = &B1
and    BAL_ASSACT.payroll_action_id = BACT.payroll_action_id
and    FEED.balance_type_id    = &U1
and    FEED.input_value_id     = TARGET.input_value_id
and    TARGET.run_result_id    = RR.run_result_id
and    RR.assignment_action_id = ASSACT.assignment_action_id
and    ASSACT.payroll_action_id = PACT.payroll_action_id
and    PACT.effective_date between
          FEED.effective_start_date and FEED.effective_end_date
and    RR.status in (''P'',''PA'')
and    PACT.effective_date >=
          (select to_date(''06-04-'' || to_char( fnd_number.canonical_to_number(
                  to_char( BACT.effective_date,''YYYY''))
           +  decode(sign( BACT.effective_date - to_date(''06-04-''
               || to_char(BACT.effective_date,''YYYY''),''DD-MM-YYYY'')),
           -1,-1,0)),''DD-MM-YYYY'')
           from dual)
and    ASSACT.action_sequence <= BAL_ASSACT.action_sequence
and    START_ASS.assignment_id = BAL_ASSACT.assignment_id
and    ASS.period_of_service_id = START_ASS.period_of_service_id
and    ASSACT.assignment_id = ASS.assignment_id
and    BACT.effective_date between
          ASS.effective_start_date and ASS.effective_end_date
and    PACT.effective_date between
          START_ASS.effective_start_date and START_ASS.effective_end_date');
Line: 120

   x := do_child_inserts;
Line: 124

   my_dimension_insert(x,
    'N',
    '_YTD',
    'Person-level BF Tax Year to Date',
    'P',
    'Summed data for all a person''s assignments in the BF tax year',
    null, -- feed checking type (always feed)
    null, -- always feed
    'P',                  -- expiry check at payroll action level
    'pay_bf_expc.pytd_ec'    -- expry checking procedure.
   );
Line: 136

hr_utility.set_location('pay_autogn.insert_bf_dimensions',2);
Line: 137

insert into ff_routes
(route_id,
 user_defined_flag,
 route_name,
 description,
 text)
values
(ff_routes_s.nextval,
 'N',
 'BF Assignment-level Tax Year to Date Balance Dimension',
 'Summed data for the ASSIGNMENT-LEVEL BF TAX YEAR TO DATE balance dimension',
'        pay_balance_feeds_f     FEED
       ,pay_run_result_values    TARGET
       ,pay_run_results          RR
       ,pay_payroll_actions      PACT
       ,pay_assignment_actions   ASSACT
       ,pay_payroll_actions      BACT
       ,pay_assignment_actions   BAL_ASSACT
where  BAL_ASSACT.assignment_action_id = &B1
and    BAL_ASSACT.payroll_action_id = BACT.payroll_action_id
and    FEED.balance_type_id    = &U1
and    FEED.input_value_id     = TARGET.input_value_id
and    TARGET.run_result_id    = RR.run_result_id
and    RR.assignment_action_id = ASSACT.assignment_action_id
and    ASSACT.payroll_action_id = PACT.payroll_action_id
and    PACT.effective_date between
          FEED.effective_start_date and FEED.effective_end_date
and    RR.status in (''P'',''PA'')
and    PACT.effective_date >=
          (select to_date(''06-04-'' || to_char( fnd_number.canonical_to_number(
                  to_char( BACT.effective_date,''YYYY''))
           +  decode(sign( BACT.effective_date - to_date(''06-04-''
               || to_char(BACT.effective_date,''YYYY''),''DD-MM-YYYY'')),
           -1,-1,0)),''DD-MM-YYYY'')
           from dual)
and    ASSACT.action_sequence <= BAL_ASSACT.action_sequence
and    ASSACT.assignment_id = BAL_ASSACT.assignment_id');
Line: 178

   x := do_child_inserts;
Line: 182

   my_dimension_insert(x,
    'N',
    '_AYTD',
    'Assignment-level BF Tax Year to Date',
    'A',
    'Summed data for a single assignment in the BF tax year',
    null,                 --  always feed (no checking type)
    null,                 --  always feed (no code)
    'P',
    'pay_bf_expc.aytd_ec'    -- checking code.
   );
Line: 194

hr_utility.set_location('pay_autogn.insert_bf_dimensions',3);
Line: 195

insert into ff_routes
(route_id,
 user_defined_flag,
 route_name,
 description,
 text)
values
(ff_routes_s.nextval,
 'N',
 'BF Person-level Period to Date Balance Dimension',
 'Summed data for the PERSON-LEVEL PERIOD TO DATE balance dimension',
'        pay_balance_feeds_f     FEED
       ,pay_run_result_values    TARGET
       ,pay_run_results          RR
       ,pay_payroll_actions      PACT
       ,pay_assignment_actions   ASSACT
       ,pay_payroll_actions      BACT
       ,pay_assignment_actions   BAL_ASSACT
       ,per_assignments_f         ASS
       ,per_assignments_f         START_ASS
where  BAL_ASSACT.assignment_action_id = &B1
and    BAL_ASSACT.payroll_action_id = BACT.payroll_action_id
and    FEED.balance_type_id    = &U1
and    FEED.input_value_id     = TARGET.input_value_id
and    TARGET.run_result_id    = RR.run_result_id
and    RR.assignment_action_id = ASSACT.assignment_action_id
and    ASSACT.payroll_action_id = PACT.payroll_action_id
and    PACT.effective_date between
          FEED.effective_start_date and FEED.effective_end_date
and    RR.status in (''P'',''PA'')
and    PACT.effective_date >=
          (select PTP.start_date from per_time_periods PTP
           where BACT.effective_date
              between PTP.start_date and PTP.end_date
           and   PTP.payroll_id = PACT.payroll_id
          )
and    ASSACT.action_sequence <= BAL_ASSACT.action_sequence
and    START_ASS.assignment_id = BAL_ASSACT.assignment_id
and    ASS.period_of_service_id = START_ASS.period_of_service_id
and    ASSACT.assignment_id = ASS.assignment_id
and    BACT.effective_date between
          ASS.effective_start_date and ASS.effective_end_date
and    PACT.effective_date between
          START_ASS.effective_start_date and START_ASS.effective_end_date');
Line: 243

   x := do_child_inserts;
Line: 247

   my_dimension_insert(x,
    'N',
    '_PTD',
    'Person-level Period to Date',
    'P',
   'Summed data for all a person''s assignments in the current earnings period',
    null,                  -- always feed
    null,                  -- always feed
    'P',                   -- expiry check at Payroll Action level
    'pay_bf_expc.pptd_ec'     -- expiry checking procedure.
   );
Line: 259

hr_utility.set_location('pay_autogn.insert_bf_dimensions',5);
Line: 260

insert into ff_routes
(route_id,
 user_defined_flag,
 route_name,
 description,
 text)
values
(ff_routes_s.nextval,
 'N',
 'BF Assignment-level Period to Date Balance Dimension',
 'Summed data for the ASSIGNMENT-LEVEL PERIOD TO DATE balance dimension',
'        pay_balance_feeds_f     FEED
       ,pay_run_result_values    TARGET
       ,pay_run_results          RR
       ,pay_payroll_actions      PACT
       ,pay_assignment_actions   ASSACT
       ,pay_payroll_actions      BACT
       ,pay_assignment_actions   BAL_ASSACT
where  BAL_ASSACT.assignment_action_id = &B1
and    BAL_ASSACT.payroll_action_id = BACT.payroll_action_id
and    FEED.balance_type_id    = &U1
and    FEED.input_value_id     = TARGET.input_value_id
and    TARGET.run_result_id    = RR.run_result_id
and    RR.assignment_action_id = ASSACT.assignment_action_id
and    ASSACT.payroll_action_id = PACT.payroll_action_id
and    PACT.effective_date between
          FEED.effective_start_date and FEED.effective_end_date
and    RR.status in (''P'',''PA'')
and    PACT.effective_date >=
          (select PTP.start_date from per_time_periods PTP
           where BACT.effective_date
              between PTP.start_date and PTP.end_date
           and   PTP.payroll_id = PACT.payroll_id
          )
and    ASSACT.action_sequence <= BAL_ASSACT.action_sequence
and    ASSACT.assignment_id = BAL_ASSACT.assignment_id');
Line: 300

   x := do_child_inserts;
Line: 304

   my_dimension_insert(x,
    'N',
    '_APTD',
    'Assignment-level Period to Date',
    'A',
    'Summed data for a single assignment in the current earnings period',
    null,                -- always feed
    null,                -- always feed
    'P',                 -- expiry check at Payroll Action level
    'pay_bf_expc.aptd_ec'   -- expiry checking procedure.
   );
Line: 316

hr_utility.set_location('pay_autogn.insert_bf_dimensions',4);
Line: 317

insert into ff_routes
(route_id,
 user_defined_flag,
 route_name,
 description,
 text)
values
(ff_routes_s.nextval,
 'N',
 'BF Person-level Period to Date Balance Dimension (test)',
 'Summed data for the PERSON-LEVEL PERIOD TO DATE balance dimension (test)',
'        pay_balance_feeds_f     FEED
       ,pay_run_result_values    TARGET
       ,pay_run_results          RR
       ,pay_payroll_actions      PACT
       ,pay_assignment_actions   ASSACT
       ,pay_payroll_actions      BACT
       ,pay_assignment_actions   BAL_ASSACT
       ,per_assignments_f         ASS
       ,per_assignments_f         START_ASS
where  BAL_ASSACT.assignment_action_id = &B1
and    BAL_ASSACT.payroll_action_id = BACT.payroll_action_id
and    FEED.balance_type_id    = &U1
and    FEED.input_value_id     = TARGET.input_value_id
and    TARGET.run_result_id    = RR.run_result_id
and    RR.assignment_action_id = ASSACT.assignment_action_id
and    ASSACT.payroll_action_id = PACT.payroll_action_id
and    PACT.effective_date between
          FEED.effective_start_date and FEED.effective_end_date
and    RR.status in (''P'',''PA'')
and    PACT.effective_date >=
          (select PTP.start_date from per_time_periods PTP
           where BACT.effective_date
              between PTP.start_date and PTP.end_date
           and   PTP.payroll_id = PACT.payroll_id
          )
and    ASSACT.action_sequence <= BAL_ASSACT.action_sequence
and    START_ASS.assignment_id = BAL_ASSACT.assignment_id
and    ASS.period_of_service_id = START_ASS.period_of_service_id
and    ASSACT.assignment_id = ASS.assignment_id
and    BACT.effective_date between
          ASS.effective_start_date and ASS.effective_end_date
and    PACT.effective_date between
          START_ASS.effective_start_date and START_ASS.effective_end_date');
Line: 365

   x := do_child_inserts;
Line: 369

   my_dimension_insert(x,
    'N',
    '_TSTPTD',
    'Person-level Period to Date (test)',
    'P',
   'Summed data for all a person''s assignments in the current earnings period',
    null,    -- always feed
    null,    -- always feed
    'A',     -- expiry check at Assignment Action level
    'pay_bf_expc.pptd_alc_ec'
   );
Line: 381

hr_utility.set_location('pay_autogn.insert_bf_dimensions',6);
Line: 382

insert into ff_routes
(route_id,
 user_defined_flag,
 route_name,
 description,
 text)
values
(ff_routes_s.nextval,
 'N',
 'BF Person-level User Cleared Balance Dimension',
 'Summed data for the PERSON-LEVEL USER CLEARED balance dimension',
'        pay_balance_feeds_f     FEED
       ,pay_run_result_values    TARGET
       ,pay_run_results          RR
       ,pay_payroll_actions      PACT
       ,pay_assignment_actions   ASSACT
       ,pay_payroll_actions      BACT
       ,pay_assignment_actions   BAL_ASSACT
       ,per_assignments_f         ASS
       ,per_assignments_f         START_ASS
where  BAL_ASSACT.assignment_action_id = &B1
and    BAL_ASSACT.payroll_action_id = BACT.payroll_action_id
and    FEED.balance_type_id    = &U1
and    FEED.input_value_id     = TARGET.input_value_id
and    TARGET.run_result_id    = RR.run_result_id
and    RR.assignment_action_id = ASSACT.assignment_action_id
and    ASSACT.payroll_action_id = PACT.payroll_action_id
and    PACT.effective_date between
          FEED.effective_start_date and FEED.effective_end_date
and    RR.status in (''P'',''PA'')
and    ASSACT.action_sequence <= BAL_ASSACT.action_sequence
and    START_ASS.assignment_id = BAL_ASSACT.assignment_id
and    ASS.period_of_service_id = START_ASS.period_of_service_id
and    ASSACT.assignment_id = ASS.assignment_id
and    BACT.effective_date between
          ASS.effective_start_date and ASS.effective_end_date
and    PACT.effective_date between
          START_ASS.effective_start_date and START_ASS.effective_end_date');
Line: 424

   x := do_child_inserts;
Line: 428

   my_dimension_insert(x,
    'N',
    '_USER',
    'Person-level User Cleared',
    'P',
    'Summed data for all a person''s assignments since last cleared down',
    null,                -- always feed
    null,                -- always feed
    'P',                 -- expiry check at payroll action level.
    'pay_bf_expc.never_expires'
   );
Line: 440

hr_utility.set_location('pay_autogn.insert_bf_dimensions',7);
Line: 441

insert into ff_routes
(route_id,
 user_defined_flag,
 route_name,
 description,
 text)
values
(ff_routes_s.nextval,
 'N',
 'BF Assignment-level User Cleared Balance Dimension',
 'Summed data for the ASSIGNMENT-LEVEL USER CLEARED balance dimension',
'        pay_balance_feeds_f     FEED
       ,pay_run_result_values    TARGET
       ,pay_run_results          RR
       ,pay_payroll_actions      PACT
       ,pay_assignment_actions   ASSACT
       ,pay_payroll_actions      BACT
       ,pay_assignment_actions   BAL_ASSACT
where  BAL_ASSACT.assignment_action_id = &B1
and    BAL_ASSACT.payroll_action_id = BACT.payroll_action_id
and    FEED.balance_type_id    = &U1
and    FEED.input_value_id     = TARGET.input_value_id
and    TARGET.run_result_id    = RR.run_result_id
and    RR.assignment_action_id = ASSACT.assignment_action_id
and    ASSACT.payroll_action_id = PACT.payroll_action_id
and    PACT.effective_date between
          FEED.effective_start_date and FEED.effective_end_date
and    RR.status in (''P'',''PA'')
and    ASSACT.action_sequence <= BAL_ASSACT.action_sequence
and    ASSACT.assignment_id = BAL_ASSACT.assignment_id');
Line: 475

   x := do_child_inserts;
Line: 479

   my_dimension_insert(x,
    'N',
    '_AUSER',
    'Assignment-level User Cleared',
    'P',
    'Summed data for a single assignment since last cleared down',
    null,   -- always feed
    null,   -- always feed
    'P',    -- expiry check at Payroll Action level
    'pay_bf_expc.never_expires'
   );
Line: 491

hr_utility.set_location('pay_autogn.insert_bf_dimensions',8);
Line: 492

insert into ff_routes
(route_id,
 user_defined_flag,
 route_name,
 description,
 text)
values
(ff_routes_s.nextval,
 'N',
 'BF Assignment-level User Cleared Balance Dimension (not fed)',
 'Summed data for the ASSIGNMENT-LEVEL USER balance dimension (not fed)',
'        pay_balance_feeds_f     FEED
       ,pay_run_result_values    TARGET
       ,pay_run_results          RR
       ,pay_payroll_actions      PACT
       ,pay_assignment_actions   ASSACT
       ,pay_payroll_actions      BACT
       ,pay_assignment_actions   BAL_ASSACT
where  BAL_ASSACT.assignment_action_id = &B1
and    BAL_ASSACT.payroll_action_id = BACT.payroll_action_id
and    FEED.balance_type_id    = &U1
and    FEED.input_value_id     = TARGET.input_value_id
and    TARGET.run_result_id    = RR.run_result_id
and    RR.assignment_action_id = ASSACT.assignment_action_id
and    ASSACT.payroll_action_id = PACT.payroll_action_id
and    PACT.effective_date between
          FEED.effective_start_date and FEED.effective_end_date
and    RR.status in (''P'',''PA'')
and    ASSACT.action_sequence <= BAL_ASSACT.action_sequence
and    ASSACT.assignment_id = BAL_ASSACT.assignment_id');
Line: 526

   x := do_child_inserts;
Line: 530

   my_dimension_insert(x,
    'N',
    '_ANOTFEDUSER',
    'Assignment-level User Cleared (not fed)',
    'N',
    'Summed data for a single assignment since last cleared down (not fed)',
    null,   -- never fed or stored
    null,   -- never fed or stored
    null,   -- never fed or stored
    null    -- never fed or stored
   );
Line: 542

hr_utility.set_location('pay_autogn.insert_bf_dimensions',9);
Line: 543

insert into ff_routes
(route_id,
 user_defined_flag,
 route_name,
 description,
 text)
values
(ff_routes_s.nextval,
 'N',
 'BF Assignment-level Current Run Balance Dimension',
 'Summed data for the ASSIGNMENT-LEVEL CURRENT RUN balance dimension',
'        pay_balance_feeds_f     FEED
       ,pay_run_result_values    TARGET
       ,pay_run_results          RR
       ,pay_payroll_actions      PACT
       ,pay_assignment_actions   ASSACT
where  ASSACT.assignment_action_id = &B1
and    FEED.balance_type_id    = &U1
and    FEED.input_value_id     = TARGET.input_value_id
and    TARGET.run_result_id    = RR.run_result_id
and    RR.assignment_action_id = ASSACT.assignment_action_id
and    ASSACT.payroll_action_id = PACT.payroll_action_id
and    PACT.effective_date between
          FEED.effective_start_date and FEED.effective_end_date
and    RR.status in (''P'',''PA'')');
Line: 572

   x := do_child_inserts;
Line: 576

   my_dimension_insert(x,
    'N',
    '_RUN',
    'Assignment-level Current Run',
    'F',
    'Summed data for an assignment within a run',
    null,   --  always feed
    null,   --  always feed
    null,   --  never stored, no expiry details needed
    null   --  never stored, no expiry details needed
   );
Line: 588

hr_utility.set_location('pay_autogn.insert_bf_dimensions',10);
Line: 589

insert into ff_routes
(route_id,
 user_defined_flag,
 route_name,
 description,
 text)
values
(ff_routes_s.nextval,
 'N',
 'BF Person-level Contracted In YTD Balance Dimension',
 'Summed data for the PERSON-LEVEL CONTRACTED IN YTD balance dimension',
'        pay_balance_feeds_f     FEED
       ,pay_run_result_values    TARGET
       ,pay_run_results          RR
       ,pay_payroll_actions      PACT
       ,pay_assignment_actions   ASSACT
       ,pay_payroll_actions      BACT
       ,pay_assignment_actions   BAL_ASSACT
       ,per_assignments_f         ASS
       ,per_assignments_f         START_ASS
where  BAL_ASSACT.assignment_action_id = &B1
and    BAL_ASSACT.payroll_action_id = BACT.payroll_action_id
and    FEED.balance_type_id    = &U1
and    FEED.input_value_id     = TARGET.input_value_id
and    TARGET.run_result_id    = RR.run_result_id
and    RR.assignment_action_id = ASSACT.assignment_action_id
and    ASSACT.payroll_action_id = PACT.payroll_action_id
and    PACT.effective_date between
          FEED.effective_start_date and FEED.effective_end_date
and    RR.status in (''P'',''PA'')
and    START_ASS.assignment_id = BAL_ASSACT.assignment_id
and    ASS.period_of_service_id = START_ASS.period_of_service_id
and    ASSACT.assignment_id = ASS.assignment_id
and    nvl(ASS.ass_attribute1, ''CO'') = ''CI''
and    BACT.effective_date between
          ASS.effective_start_date and ASS.effective_end_date
and    PACT.effective_date between
          START_ASS.effective_start_date and START_ASS.effective_end_date');
Line: 631

   x := do_child_inserts;
Line: 635

   my_dimension_insert(x,
    'N',
    '_CI_YTD',
    'Person-level Contracted In YTD',
    'P',
  'Summed data for all a person''s contracted-in assignments (in BF tax year)',
    'P',                   -- we must always feed check.
    'pay_bf_expc.pcon_fc',    -- feed checking procedure.
    'P',                   -- expiry check at payroll action level.
    'pay_bf_expc.pcon_ec'     -- expiry checking procedure.
   );
Line: 647

hr_utility.set_location('pay_autogn.insert_bf_dimensions',11);
Line: 648

insert into ff_routes
(route_id,
 user_defined_flag,
 route_name,
 description,
 text)
values
(ff_routes_s.nextval,
 'N',
 'BF Payments Balance Dimension',
 'Summed data for the PAYMENTS balance dimension',
'        pay_balance_feeds_f     FEED
       ,pay_run_result_values    TARGET
       ,pay_run_results          RR
       ,pay_payroll_actions      PACT
       ,pay_assignment_actions   ASSACT
       ,pay_action_interlocks     INTLK
       ,pay_payroll_actions      BACT
       ,pay_assignment_actions   BAL_ASSACT
where  BAL_ASSACT.assignment_action_id = &B1
and    BAL_ASSACT.payroll_action_id = BACT.payroll_action_id
and    FEED.balance_type_id    = &U1
and    FEED.input_value_id     = TARGET.input_value_id
and    TARGET.run_result_id    = RR.run_result_id
and    RR.assignment_action_id = ASSACT.assignment_action_id
and    ASSACT.payroll_action_id = PACT.payroll_action_id
and    PACT.effective_date between
          FEED.effective_start_date and FEED.effective_end_date
and    RR.status in (''P'',''PA'')
and    ASSACT.assignment_action_id = INTLK.locked_action_id
and    INTLK.locking_action_id = BAL_ASSACT.assignment_action_id
and    ASSACT.assignment_id = BAL_ASSACT.assignment_id');
Line: 684

   x := do_child_inserts;
Line: 688

   my_dimension_insert(x,
    'Y',
    '_PAYMENTS',
    'Payments',
    'N',
  'Summed data for all an assignments runs being handled within a payment run',
    null,     --  never held or stored
    null,     --  never held or stored
    null,     --  never held or stored
    null      --  never held or stored
   );
Line: 699

   end insert_bf_dimensions;