[Home] [Help]
471: --
472: cursor c_get_contribution is
473: -- index hint applied for bug 4737028 to avoid bitmap conversion and usage of proper index
474: -- index PAY_ELEMENT_ENTRIES_F_N53 is now used in hint to resolve bug 5677610
475: -- index PAY_INPUT_VALUES_F_N50 is now used in hint to resolve bug 6621800
476:
477: select /*+ index(pee PAY_ELEMENT_ENTRIES_F_N53,iv PAY_INPUT_VALUES_F_N50 )*/ fnd_number.canonical_to_number(pev.screen_entry_value) amount,
478: -- Bug 4551666, bug6621800
479: ncr.add_or_subtract add_or_subtract
473: -- index hint applied for bug 4737028 to avoid bitmap conversion and usage of proper index
474: -- index PAY_ELEMENT_ENTRIES_F_N53 is now used in hint to resolve bug 5677610
475: -- index PAY_INPUT_VALUES_F_N50 is now used in hint to resolve bug 6621800
476:
477: select /*+ index(pee PAY_ELEMENT_ENTRIES_F_N53,iv PAY_INPUT_VALUES_F_N50 )*/ fnd_number.canonical_to_number(pev.screen_entry_value) amount,
478: -- Bug 4551666, bug6621800
479: ncr.add_or_subtract add_or_subtract
480: from pay_accrual_plans pap,
481: pay_net_calculation_rules ncr,
480: from pay_accrual_plans pap,
481: pay_net_calculation_rules ncr,
482: pay_element_entries_f pee,
483: pay_element_entry_values_f pev,
484: pay_input_values_f iv
485: where pap.accrual_plan_id = p_plan_id
486: and pee.assignment_id = p_assignment_id
487: and pee.element_entry_id = pev.element_entry_id
488: and pev.input_value_id = ncr.input_value_id
497: and iv.input_value_id = ncr.input_value_id
498: and p_calculation_date between iv.effective_start_date and iv.effective_end_date
499: and pee.element_type_id = iv.element_type_id
500: and exists
501: (select /*+ index(piv2 PAY_INPUT_VALUES_F_N50)*/ null -- bug6621800
502: from pay_element_entry_values_f pev1,
503: pay_input_values_f piv2
504: where pev1.element_entry_id = pev.element_entry_id
505: and pev1.input_value_id = ncr.date_input_value_id
499: and pee.element_type_id = iv.element_type_id
500: and exists
501: (select /*+ index(piv2 PAY_INPUT_VALUES_F_N50)*/ null -- bug6621800
502: from pay_element_entry_values_f pev1,
503: pay_input_values_f piv2
504: where pev1.element_entry_id = pev.element_entry_id
505: and pev1.input_value_id = ncr.date_input_value_id
506: and pev1.effective_start_date = pev.effective_start_date
507: and pev1.effective_end_date = pev.effective_end_date
612: p_calculation_date)) expiry_date
613: from pay_accrual_plans pap,
614: pay_element_entry_values_f pev,
615: pay_element_entry_values_f pev1,
616: pay_input_values_f piv,
617: pay_input_values_f piv1,
618: pay_element_entries_f pee
619: where pap.accrual_plan_id = p_plan_id
620: and pee.assignment_id = p_assignment_id
613: from pay_accrual_plans pap,
614: pay_element_entry_values_f pev,
615: pay_element_entry_values_f pev1,
616: pay_input_values_f piv,
617: pay_input_values_f piv1,
618: pay_element_entries_f pee
619: where pap.accrual_plan_id = p_plan_id
620: and pee.assignment_id = p_assignment_id
621: and pee.element_entry_id = pev.element_entry_id
630: and pee.element_type_id = piv1.element_type_id
631: and exists
632: (select null
633: from pay_element_entry_values_f pev2,
634: pay_input_values_f piv2
635: where pev2.element_entry_id = pev.element_entry_id
636: and pev2.input_value_id = pap.co_date_input_value_id
637: and pev2.input_value_id = piv2.input_value_id
638: and pev2.effective_start_date = pev.effective_start_date