DBA Data[Home] [Help]

APPS.PAY_QPQ_API SQL Statements

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

Line: 91

        select  /*+ ORDERED INDEX(PAY_ACTION PAY_PAYROLL_ACTIONS_PK)
                            INDEX(ASGT_ACTION PAY_ASSIGNMENT_ACTIONS_N50)
                            INDEX(QP_INCL PAY_QUICKPAY_INCLUSIONS_FK2)
                            INDEX(ENTRY PAY_ELEMENT_ENTRIES_F_PK)
                            INDEX(LINK PAY_ELEMENT_LINKS_F_PK)
                            INDEX(ELEMENT PAY_ELEMENT_TYPES_F_PK)
                            INDEX(CLASS PAY_ELEMENT_CLASSIFICATION_PK)
                            INDEX(ENTVAL PAY_ELEMENT_ENTRY_VALUES_F_N50)
            USE_NL(PAY_ACTION, ASGT_ACTION) USE_NL(ASGT_ACTION, QP_INCL)
            USE_NL(QP_INCL, ENTRY) USE_NL(ENTRY, LINK)  USE_NL(LINK, ELEMENT)
            USE_NL(ELEMENT, CLASS) USE_NL(CLASS, ENTVAL) */
                count (*) TOTAL_OF_ROWS
        from    pay_payroll_actions             PAY_ACTION,
                pay_assignment_actions          ASGT_ACTION,
                pay_quickpay_inclusions         QP_INCL,
                pay_element_entries_f           ENTRY,
                pay_element_links_f             LINK,
                pay_element_types_f             ELEMENT,
                pay_element_classifications     CLASS,
                pay_element_entry_values_f      ENTVAL
	where	pay_action.payroll_action_id = PI_PAYROLL_ACTION_ID
	and	asgt_action.payroll_action_id = pay_action.payroll_action_id
	and	asgt_action.assignment_action_id = qp_incl.assignment_action_id
	and	qp_incl.element_entry_id = entry.element_entry_id
	and	entry.element_link_id = link.element_link_id
	and	link.element_type_id = element.element_type_id
	and	entry.element_entry_id = entval.element_entry_id (+)
	and	(entval.element_entry_value_id is null
		or pay_action.effective_date between entval.effective_start_date
						and entval.effective_end_date)
	and	pay_action.effective_date between entry.effective_start_date
						and entry.effective_end_date
	and	pay_action.effective_date between link.effective_start_date
						and link.effective_end_date
	and	pay_action.effective_date between element.effective_start_date
						and element.effective_end_date
	and	element.classification_id = class.classification_id
	/* and the element is an earnings element */
	and	class.classification_name in (	'Earnings',
						'Imputed Earnings',
						'Supplemental Earnings')
	/* and the element is in a US legislation */
	and	(element.legislation_code = 'US'
		or (element.legislation_code is null
		   and exists (
			select 1
			from per_business_groups_perf BIZ_GRP
			where element.business_group_id = biz_grp.business_group_id
			and biz_grp.legislation_code = 'US')))
	/* and there is or is not an input value indicating that the entry must be
	processed separately, depending upon the parameter */
	and	(nvl (PI_LOOK_FOR_SEPARATE_CHECK, 'NO') = 'YES'
		and exists (
			select 1
			from pay_input_values_f INPVAL
			where inpval.element_type_id = element.element_type_id
			and ((upper (inpval.name) in (	'SEPARATE CHECK',
							'TAX SEPARATELY')
                             and entval.screen_entry_value = 'Y')
                        or  (upper (inpval.name) = 'DEDUCTION PROCESSING'
                             and entval.screen_entry_value in ('T', 'PTT')))
			and inpval.input_value_id = entval.input_value_id
			and pay_action.effective_date
				between inpval.effective_start_date
				and inpval.effective_end_date)
		or (nvl (PI_LOOK_FOR_SEPARATE_CHECK, 'NO') <> 'YES'
		    and NOT exists (
			select 1
			from pay_input_values_f INPVAL
			where inpval.element_type_id = element.element_type_id
			and ((upper (inpval.name) in (	'SEPARATE CHECK',
							'TAX SEPARATELY')
                             and entval.screen_entry_value = 'Y')
                        or  (upper (inpval.name) = 'DEDUCTION PROCESSING'
                             and entval.screen_entry_value in ('T', 'PTT')))
			and inpval.input_value_id = entval.input_value_id
			and pay_action.effective_date
				between inpval.effective_start_date
				and inpval.effective_end_date)));
Line: 187

        select  /*+ ORDERED INDEX(PAY_ACTION PAY_PAYROLL_ACTIONS_PK)
                            INDEX(ASGT_ACTION PAY_ASSIGNMENT_ACTIONS_N50)
                            INDEX(ENTRY PAY_ELEMENT_ENTRIES_F_N50)
                            INDEX(LINK PAY_ELEMENT_LINKS_F_PK)
                            INDEX(ELEMENT PAY_ELEMENT_TYPES_F_PK)
                            INDEX(CLASS PAY_ELEMENT_CLASSIFICATION_PK)
                            INDEX(ENTVAL PAY_ELEMENT_ENTRY_VALUES_F_N50)
            USE_NL(PAY_ACTION, ASGT_ACTION) USE_NL(ENTRY, LINK)
            USE_NL(LINK, ELEMENT) USE_NL(ELEMENT, CLASS)
            USE_NL(CLASS, ENTVAL) */
                count (*) TOTAL_OF_ROWS
        from    pay_payroll_actions             PAY_ACTION,
                pay_assignment_actions          ASGT_ACTION,
                pay_element_entries_f           ENTRY,
                pay_element_links_f             LINK,
                pay_element_types_f             ELEMENT,
                pay_element_classifications     CLASS,
                pay_element_entry_values_f      ENTVAL
	where	pay_action.payroll_action_id = PI_PAYROLL_ACTION_ID
	and	asgt_action.payroll_action_id = pay_action.payroll_action_id
  and asgt_action.assignment_id = entry.assignment_id
  /* and entry doesn't exist in Pay_Quickpay_Exclusions */
  and not (
    exists (
      select 'x'
      from pay_quickpay_exclusions QP_EXCL
      where qp_excl.assignment_action_id = asgt_action.assignment_action_id
      and qp_excl.element_entry_id = entry.element_entry_id
      )
    )
	and	entry.element_link_id = link.element_link_id
	and	link.element_type_id = element.element_type_id
	and	entry.element_entry_id = entval.element_entry_id (+)
	and	(entval.element_entry_value_id is null
		or pay_action.effective_date between entval.effective_start_date
						and entval.effective_end_date)
	and	pay_action.effective_date between entry.effective_start_date
						and entry.effective_end_date
	and	pay_action.effective_date between link.effective_start_date
						and link.effective_end_date
	and	pay_action.effective_date between element.effective_start_date
						and element.effective_end_date
	and	element.classification_id = class.classification_id
	/* and the element is an earnings element */
	and	class.classification_name in (	'Earnings',
						'Imputed Earnings',
						'Supplemental Earnings')
	/* and the element is in a US legislation */
	and	(element.legislation_code = 'US'
		or (element.legislation_code is null
		   and exists (
			select 1
			from per_business_groups_perf BIZ_GRP
			where element.business_group_id = biz_grp.business_group_id
			and biz_grp.legislation_code = 'US')))
	/* and there is or is not an input value indicating that the entry must be
	processed separately, depending upon the parameter */
	and	(nvl (PI_LOOK_FOR_SEPARATE_CHECK, 'NO') = 'YES'
		and exists (
			select 1
			from pay_input_values_f INPVAL
			where inpval.element_type_id = element.element_type_id
			and ((upper (inpval.name) in (	'SEPARATE CHECK',
							'TAX SEPARATELY')
                             and entval.screen_entry_value = 'Y')
                        or  (upper (inpval.name) = 'DEDUCTION PROCESSING'
                             and entval.screen_entry_value in ('T', 'PTT')))
			and inpval.input_value_id = entval.input_value_id
			and pay_action.effective_date
				between inpval.effective_start_date
				and inpval.effective_end_date)
		or (nvl (PI_LOOK_FOR_SEPARATE_CHECK, 'NO') <> 'YES'
		    and NOT exists (
			select 1
			from pay_input_values_f INPVAL
			where inpval.element_type_id = element.element_type_id
			and ((upper (inpval.name) in (	'SEPARATE CHECK',
							'TAX SEPARATELY')
                             and entval.screen_entry_value = 'Y')
                        or  (upper (inpval.name) = 'DEDUCTION PROCESSING'
                             and entval.screen_entry_value in ('T', 'PTT')))
			and inpval.input_value_id = entval.input_value_id
			and pay_action.effective_date
				between inpval.effective_start_date
				and inpval.effective_end_date)));
Line: 409

    select 'Y'
      from fnd_sessions         ses
         , per_assignments_f    asg
     where ses.session_id           = userenv('SESSIONID')
       and ses.effective_date between asg.effective_start_date
                                  and asg.effective_end_date
       and asg.payroll_id      is not null
       and asg.assignment_id        = p_assignment_id;
Line: 459

    select 'Y'
      from per_assignments_f   asg
     where asg.assignment_id       = v_assignment_id
       and asg.payroll_id     is not null
       and v_new_date        between asg.effective_start_date
                                 and asg.effective_end_date;
Line: 540

    select 'Y'
      from per_assignments_f
     where assignment_id           = p_assignment_id
       and business_group_id + 0   = p_business_group_id
       and p_effective_date  between effective_start_date
                                 and effective_end_date;
Line: 604

    select 'Y'
      from pay_consolidation_sets
     where consolidation_set_id  = p_consolidation_set_id
       and business_group_id + 0 = p_business_group_id;
Line: 674

    select time_period_id
         , period_name
      from per_time_periods
     where payroll_id       = p_payroll_id
       and p_date     between start_date
                          and end_date;
Line: 751

    select time_period_id
         , period_name
      from per_time_periods
     where payroll_id       = p_payroll_id
       and p_date           = regular_payment_date;
Line: 817

    select p.start_date
         , p.end_date
         , a.payroll_id
      from per_time_periods  p
         , per_assignments_f a
     where a.assignment_id        = p_assignment_id
       and p_effective_date between a.effective_start_date
                                and a.effective_end_date
       and p.payroll_id           = a.payroll_id
       and p_effective_date       = p.regular_payment_date;
Line: 834

    select a.effective_start_date
         , a.effective_end_date
         , a.payroll_id
      from per_assignments_f a
     where a.assignment_id         = p_assignment_id
       and a.effective_end_date   >= v_period_start
       and a.effective_start_date <= v_period_end
  order by a.effective_start_date;
Line: 951

    select 'Y'
      from per_time_periods
     where time_period_id       = p_time_period_id
       and regular_payment_date = p_effective_date;
Line: 997

    select asg.payroll_id
      from per_assignments_f asg
     where /* Payroll as of effective date */
           asg.assignment_id       = p_assignment_id
       and asg.payroll_id     is not null
       and p_effective_date  between asg.effective_start_date
                                 and asg.effective_end_date;
Line: 1006

    select rule_mode
      from pay_legislation_rules
     where rule_type = 'ENABLE_QP_OFFSET'
       and legislation_code = p_legislation_code;
Line: 1197

    select asg.payroll_id
      from per_assignments_f asg
     where /* Payroll as of date_earned */
           asg.assignment_id      = p_assignment_id
       and asg.payroll_id    is not null
       and p_date_earned    between asg.effective_start_date
                                and asg.effective_end_date;
Line: 1206

    select rule_mode
      from pay_legislation_rules
     where rule_type = 'ENABLE_QP_OFFSET'
       and legislation_code = p_legislation_code;
Line: 1334

    select 'Y'
      from per_assignments_f asg1
         , per_assignments_f asg2
     where /* Payroll as of date_earned */
           asg1.assignment_id       = p_assignment_id
       and p_date_earned      between asg1.effective_start_date
                                  and asg1.effective_end_date
       and asg1.payroll_id     is not null
           /* Payroll as of the effective date */
       and asg2.assignment_id       = p_assignment_id
       and p_effective_date   between asg2.effective_start_date
                                  and asg2.effective_end_date
       and asg2.payroll_id     is not null
           /* Payrolls are the same */
       and asg1.payroll_id          = asg2.payroll_id;
Line: 1592

  select lfi.rule_mode
    from pay_legislative_field_info lfi
   where lfi.field_name = 'TAX_PROCESSING_TYPE'
     and lfi.target_location = 'PAYWSRQP'
     and lfi.rule_type = 'RUN_TYPE_FLAG'
     and lfi.validation_type = 'ITEM_PROPERTY'
     and lfi.validation_name = 'DISPLAY'  ;
Line: 1601

  select rt.run_type_id
    from pay_run_types_f rt
   where rt.run_type_id = p_run_type_id
     and (rt.legislation_code = p_legislation_code
          or (rt.legislation_code is null
              and rt.business_group_id = p_business_group_id)
          or (rt.legislation_code is null and rt.business_group_id is null))
   and not exists
         ( select null
              from pay_legislative_field_info lfi
             where lfi.validation_type = 'EXCLUDE'
               and lfi.rule_type = 'DATA_VALIDATION'
               and lfi.field_name = 'TAX_PROCESSING_TYPE'
               and lfi.target_location = 'PAYWSRQP'
               and lfi.legislation_code = p_legislation_code
               and upper(lfi.validation_name) = upper(rt.run_type_name))
   and p_effective_date between rt.effective_start_date
                     and rt.effective_end_date;
Line: 1721

    select request_id
      from pay_payroll_actions
     where payroll_action_id = p_payroll_action_id;
Line: 1805

    select legislation_code
      from per_business_groups_perf
     where business_group_id  = p_business_group_id;
Line: 2049

Procedure check_non_updateable_args(p_rec in g_rec_type) is
--
  v_proc      varchar2(72) := g_package||'check_non_updateable_args';
Line: 2095

End check_non_updateable_args;
Line: 2130

Procedure pre_insert
  (p_rec                      in out nocopy g_rec_type
  ,p_action_type                 out nocopy pay_payroll_actions.action_type%TYPE
  ,p_action_population_status    out nocopy
     pay_payroll_actions.action_population_status%TYPE
  ) is
--
  v_proc  varchar2(72) := g_package||'pre_insert';
Line: 2139

  Cursor C_Sel1 is select pay_payroll_actions_s.nextval from sys.dual;
Line: 2170

End pre_insert;
Line: 2197

Procedure pre_update(p_rec in g_rec_type) is
--
  v_proc  varchar2(72) := g_package||'pre_update';
Line: 2205

End pre_update;
Line: 2234

Procedure pre_delete(p_rec in g_rec_type) is
--
  v_proc  varchar2(72) := g_package||'pre_delete';
Line: 2242

End pre_delete;
Line: 2281

procedure post_insert
  (p_rec                     in     g_rec_type
  ,p_assignment_id           in     number     default null
  ,p_validate                in     boolean    default false
  ,p_assignment_action_id       out nocopy number
  ,p_a_object_version_number    out nocopy number
  ) is
--
  v_assignment_action_id  pay_assignment_actions.assignment_action_id%TYPE;
Line: 2291

  v_proc                  varchar2(72) := g_package||'post_insert';
Line: 2330

end post_insert;
Line: 2359

Procedure post_update(p_rec in g_rec_type) is
--
  v_proc  varchar2(72) := g_package||'post_update';
Line: 2367

End post_update;
Line: 2396

Procedure post_delete(p_rec in g_rec_type) is
--
  v_proc  varchar2(72) := g_package||'post_delete';
Line: 2404

End post_delete;
Line: 2444

Procedure insert_dml
  (p_rec                       in out nocopy g_rec_type
  ,p_action_type               in     pay_payroll_actions.action_type%TYPE
  ,p_payroll_id                in     pay_payroll_actions.payroll_id%TYPE
  ,p_time_period_id            in     pay_payroll_actions.time_period_id%TYPE
  ,p_action_population_status  in
     pay_payroll_actions.action_population_status%TYPE
  ) is
--
  v_proc  varchar2(72) := g_package||'insert_dml';
Line: 2463

  insert into pay_payroll_actions
    (payroll_action_id
    ,action_type
    ,business_group_id
    ,consolidation_set_id
    ,payroll_id
    ,action_population_status
    ,action_status
    ,effective_date
    ,comments
    ,current_task
    ,legislative_parameters
    ,run_type_id
    ,date_earned
    ,pay_advice_date
    ,pay_advice_message
    ,object_version_number
    ,time_period_id
    )
    values
    (p_rec.payroll_action_id
    ,p_action_type
    ,p_rec.business_group_id
    ,p_rec.consolidation_set_id
    ,p_payroll_id
    ,p_action_population_status
    ,p_rec.action_status
    ,p_rec.effective_date
    ,p_rec.comments
    ,null
    ,p_rec.legislative_parameters
    ,p_rec.run_type_id
    ,p_rec.date_earned
    ,p_rec.pay_advice_date
    ,p_rec.pay_advice_message
    ,p_rec.object_version_number
    ,p_time_period_id
    );
Line: 2535

End insert_dml;
Line: 2577

Procedure update_dml(p_rec in out nocopy g_rec_type) is
--
  v_proc  varchar2(72) := g_package||'update_dml';
Line: 2594

  update pay_payroll_actions set
     business_group_id        = p_rec.business_group_id
    ,consolidation_set_id     = p_rec.consolidation_set_id
    ,action_status            = p_rec.action_status
    ,effective_date           = p_rec.effective_date
    ,comments                 = p_rec.comments
    ,legislative_parameters   = p_rec.legislative_parameters
    ,run_type_id              = p_rec.run_type_id
    ,date_earned              = p_rec.date_earned
    ,pay_advice_date          = p_rec.pay_advice_date
    ,pay_advice_message       = p_rec.pay_advice_message
    ,object_version_number    = p_rec.object_version_number
  where payroll_action_id = p_rec.payroll_action_id;
Line: 2644

end update_dml;
Line: 2685

Procedure delete_dml(p_rec in g_rec_type) is
--
  v_proc  varchar2(72) := g_package||'delete_dml';
Line: 2698

  delete from pay_payroll_actions
  where payroll_action_id = p_rec.payroll_action_id;
Line: 2722

End delete_dml;
Line: 2799

    select pya.payroll_action_id
         , pya.business_group_id
         , pya.consolidation_set_id
         , pya.action_status
         , pya.effective_date
         , pya.comments
         , pya.current_task
         , pya.legislative_parameters
         , pya.run_type_id
         , pya.date_earned
         , pya.pay_advice_date
         , pya.pay_advice_message
         , pya.object_version_number
         , pya.action_type
         , aga.action_status
         , aga.object_version_number
      from pay_payroll_actions    pya
         , pay_assignment_actions aga
     where /* Payroll action lock */
           pya.payroll_action_id  = p_payroll_action_id
       and (   pya.action_type          = p_only_action_type
            or (    p_only_action_type is null
                and pya.action_type    in ('Q', 'U','X')--Code added for archive
               )
           )
           /* Assignment action lock */
       and aga.payroll_action_id  = pya.payroll_action_id
       for update nowait;
Line: 3144

procedure insert_validate
  (p_rec             in out nocopy g_rec_type
  ,p_assignment_id   in     number
  ,p_payroll_id         out nocopy pay_payroll_actions.payroll_id%TYPE
  ,p_time_period_id     out nocopy pay_payroll_actions.time_period_id%TYPE
  ) is
  --
  v_unused_return_b    boolean;
Line: 3157

  v_proc               varchar2(72) := g_package||'insert_validate';
Line: 3260

End insert_validate;
Line: 3289

procedure update_validate
  (p_rec in g_rec_type
  ) is
--
  v_legislation_code  per_business_groups.legislation_code%TYPE;
Line: 3294

  v_proc              varchar2(72) := g_package||'update_validate';
Line: 3314

  check_non_updateable_args(p_rec => p_rec);
Line: 3364

End update_validate;
Line: 3393

Procedure delete_validate(p_rec in g_rec_type) is
--
  v_proc  varchar2(72) := g_package||'delete_validate';
Line: 3416

End delete_validate;
Line: 3461

  insert_validate
    (p_rec            => p_rec
    ,p_assignment_id  => p_assignment_id
    ,p_payroll_id     => v_payroll_id
    ,p_time_period_id => v_time_period_id
    );
Line: 3470

  pre_insert
    (p_rec                      => p_rec
    ,p_action_type              => v_action_type
    ,p_action_population_status => v_action_population_status
    );
Line: 3478

  insert_dml
    (p_rec                      => p_rec
    ,p_action_type              => v_action_type
    ,p_payroll_id               => v_payroll_id
    ,p_time_period_id           => v_time_period_id
    ,p_action_population_status => v_action_population_status
    );
Line: 3488

  post_insert
    (p_rec                     => p_rec
    ,p_assignment_id           => p_assignment_id
    ,p_validate                => p_validate
    ,p_assignment_action_id    => v_assignment_action_id
    ,p_a_object_version_number => v_a_object_version_number
    );
Line: 3629

  update_validate
    (p_rec => convert_defs(p_rec)
    );
Line: 3635

  pre_update(p_rec);
Line: 3639

  update_dml(p_rec);
Line: 3643

  post_update(p_rec);
Line: 3756

  delete_validate(p_rec);
Line: 3760

  pre_delete(p_rec);
Line: 3764

  delete_dml(p_rec);
Line: 3768

  post_delete(p_rec);
Line: 3854

    select effective_date
      from fnd_sessions ses
     where ses.session_id = userenv('sessionid');
Line: 3859

    select /*+ ORDERED INDEX(asg PER_ASSIGNMENTS_F_PK) */
           asg.payroll_id
         , pro.consolidation_set_id
         , con.consolidation_set_name
         , bus.legislation_code
         , hr_general.decode_lookup('ASSIGNMENT_ACTION_STATUS', 'U')
         , hr_general.decode_lookup('ASSIGNMENT_ACTION_STATUS', 'M')
         , hr_general.decode_lookup('ASSIGNMENT_ACTION_STATUS', 'C')
         , hr_general.decode_lookup('ASSIGNMENT_ACTION_STATUS', 'E')
         , hr_general.decode_lookup('ACTION_TYPE', 'Q')
      from per_assignments_f        asg
         , pay_payrolls_f           pro
         , pay_consolidation_sets   con
         , per_business_groups_perf bus
     where /* Assignment's Payroll details */
           asg.assignment_id        = p_assignment_id
       and v_cur_date         between asg.effective_start_date
                                  and asg.effective_end_date
       and pro.payroll_id           = asg.payroll_id
       and v_cur_date         between pro.effective_start_date
                                  and pro.effective_end_date
           /* Consolidation Set details */
       and con.consolidation_set_id = pro.consolidation_set_id
           /* Business group's legislation code details */
       and bus.business_group_id    = asg.business_group_id;
Line: 3888

    select tim.regular_payment_date
         , tim.period_name
      from per_time_periods tim
     where tim.payroll_id       = v_pay_id
       and v_cur_date     between tim.start_date
                              and tim.end_date;
Line: 4139

    select pya.action_status
         , pya.display_run_number
         , aga.action_status
      from pay_payroll_actions    pya
         , pay_assignment_actions aga
     where pya.payroll_action_id = p_payroll_action_id
       and aga.payroll_action_id = pya.payroll_action_id;
Line: 4199

  select rule_mode
    from pay_legislative_field_info
   where legislation_code = v_leg_code
     and target_location = 'PAYWSRQP'
     and validation_type = 'DISPLAY'
     and rule_type = 'DISP_NTG_MSG';
Line: 4212

     SELECT EE.element_entry_id
     FROM   pay_element_types_f            ET,
            pay_element_links_f            EL,
            pay_element_entries_f          EE,
            pay_assignment_actions         ACT,
            pay_payroll_actions            PACT
     WHERE  ACT.assignment_action_id = v_asactid
     AND    PACT.payroll_action_id   = p_payroll_action_id
     AND    EE.assignment_id         = ACT.assignment_id
     AND  ((p_use_qpay_excl_model = 'N'
            AND EXISTS (
            SELECT null
            FROM   pay_quickpay_inclusions INC
            WHERE  INC.assignment_action_id = ACT.assignment_action_id
            AND    INC.element_entry_id     = EE.element_entry_id)
            OR  EXISTS (
            SELECT null
            FROM   pay_quickpay_inclusions INC
            WHERE  INC.assignment_action_id = ACT.assignment_action_id
            AND    INC.element_entry_id     = EE.target_entry_id)
           )
         OR
           (p_use_qpay_excl_model = 'Y'
            AND NOT (
              EXISTS (
              SELECT null
              FROM   pay_quickpay_exclusions EXC
              WHERE  EXC.assignment_action_id = ACT.assignment_action_id
              AND    EXC.element_entry_id     = EE.element_entry_id)
              OR EXISTS (
              SELECT null
              FROM   pay_quickpay_exclusions EXC
              WHERE  EXC.assignment_action_id = ACT.assignment_action_id
              AND    EXC.element_entry_id     = EE.target_entry_id))
           )
          )
     AND    EE.entry_type              <>  'B'
     AND    PACT.date_earned BETWEEN  EE.effective_start_date
                                  AND  EE.effective_end_date
     AND    EE.element_link_id          =  EL.element_link_id
     AND    PACT.date_earned BETWEEN  EL.effective_start_date
                                  AND  EL.effective_end_date
     AND    nvl(EE.date_earned, to_date('01/01/0001', 'DD/MM/YYYY')) <=
               PACT.date_earned
     AND    EL.element_type_id          =  ET.element_type_id
     AND    ET.grossup_flag             = 'Y'
     AND    PACT.date_earned BETWEEN  ET.effective_start_date
                                  AND  ET.effective_end_date
     AND    ET.process_in_run_flag     <>  'N'
     AND    (ET.processing_type       =  'N' OR EE.entry_type = 'D')
     AND    NOT (ACT.action_status = 'B' AND EE.creator_type = 'P')
     AND    NOT (ACT.action_status = 'B' AND EE.creator_type = 'R')
     AND    NOT (ACT.action_status = 'B' AND EE.creator_type = 'RR')
     AND    NOT (ACT.action_status = 'B' AND EE.creator_type = 'EE')
     UNION ALL
     SELECT EE.element_entry_id
     FROM   pay_element_types_f            ET,
            pay_element_links_f            EL,
            pay_element_entries_f          EE,
            pay_assignment_actions         ACT,
            pay_payroll_actions           PACT,
            pay_element_entry_values_f     EEV
     WHERE  PACT.payroll_action_id = p_payroll_action_id
     and    PACT.payroll_action_id = ACT.payroll_action_id
     and    ACT.action_status not in ('C', 'S')
     AND    EE.assignment_id         = ACT.assignment_id
     AND  ((p_use_qpay_excl_model = 'N'
            AND EXISTS (
            SELECT null
            FROM   pay_quickpay_inclusions INC
            WHERE  INC.assignment_action_id = ACT.assignment_action_id
            AND    INC.element_entry_id     = EE.element_entry_id)
            OR  EXISTS (
            SELECT null
            FROM   pay_quickpay_inclusions INC
            WHERE  INC.assignment_action_id = ACT.assignment_action_id
            AND    INC.element_entry_id     = EE.target_entry_id)
           )
         OR
           (p_use_qpay_excl_model = 'Y'
            AND NOT (
              EXISTS (
              SELECT null
              FROM   pay_quickpay_exclusions EXC
              WHERE  EXC.assignment_action_id = ACT.assignment_action_id
              AND    EXC.element_entry_id     = EE.element_entry_id)
              OR EXISTS (
              SELECT null
              FROM   pay_quickpay_exclusions EXC
              WHERE  EXC.assignment_action_id = ACT.assignment_action_id
              AND    EXC.element_entry_id     = EE.target_entry_id))
           )
          )
     AND    EE.entry_type              NOT IN ('B', 'D')
     AND    EE.effective_start_date <= PACT.date_earned
     and    EE.effective_end_date   >=
                  decode(ET.proration_group_id,
                         null, PACT.date_earned,
                         pay_interpreter_pkg.prorate_start_date (v_asactid, ET.proration_group_id))
     AND    EE.element_link_id          =  EL.element_link_id
     AND    PACT.date_earned BETWEEN  EL.effective_start_date
                                  AND  EL.effective_end_date
     AND    EL.element_type_id          =  ET.element_type_id
     AND    ET.grossup_flag             = 'Y'
     AND    PACT.date_earned BETWEEN  ET.effective_start_date
                                  AND  ET.effective_end_date
     AND    ET.process_in_run_flag     <>  'N'
     AND    EEV.element_entry_id (+)    =  EE.element_entry_id
     AND    EE.effective_start_date     = nvl(EEV.effective_start_date,
                                            EE.effective_start_date)
     AND    EE.effective_end_date       = nvl(EEV.effective_end_date,
                                            EE.effective_end_date)
     AND    ET.processing_type          =  'R'
     AND    EXISTS ( select ''
                     from pay_payroll_actions ppa,
                          per_time_periods    ptp,
                          pay_element_entries_f pee
                    where pee.element_entry_id = EE.element_entry_id
                      and ppa.payroll_action_id = ACT.payroll_action_id
                      and ppa.payroll_id = ptp.payroll_id
                      and PACT.date_earned between ptp.start_date
                                                    and ptp.end_date
                      and pee.effective_start_date <= ptp.end_date
                      and pee.effective_end_date  >= ptp.start_date
                 )
     AND    NOT (ACT.action_status = 'B' AND EE.creator_type = 'P')
     AND    NOT (ACT.action_status = 'B' AND EE.creator_type = 'R')
     AND    NOT (ACT.action_status = 'B' AND EE.creator_type = 'RR')
     AND    NOT (ACT.action_status = 'B' AND EE.creator_type = 'EE');
Line: 4365

  select pbg.legislation_code
  into   v_leg_code
  from   per_business_groups_perf pbg,
         pay_payroll_actions ppa
  where  ppa.payroll_action_id = p_payroll_action_id
  and    pbg.business_group_id = ppa.business_group_id;
Line: 4422

           SELECT assignment_action_id
           INTO   v_asactid
           FROM   pay_assignment_actions
           WHERE  payroll_action_id = p_payroll_action_id;
Line: 4473

        update pay_payroll_actions
           set request_id = v_request_id
         where payroll_action_id = p_payroll_action_id;
Line: 4509

    select request_id
      from pay_payroll_actions
     where payroll_action_id = p_payroll_action_id;
Line: 4514

    select fnd_number.canonical_to_number(parameter_value)
      from pay_action_parameters
     where parameter_name = 'QUICKPAY_MAX_WAIT_SEC';
Line: 4519

    select fnd_number.canonical_to_number(parameter_value)
      from pay_action_parameters
     where parameter_name = 'QUICKPAY_INTERVAL_WAIT_SEC';