8: ------------------------------------------------------------------------
9: -- Define global variable to store defined_balance_id's and the
10: -- corresponding balance values for BBR.
11: ------------------------------------------------------------------------
12: p_balance_value_tab_payment pay_balance_pkg.t_balance_value_tab;
13: p_balance_value_tab_ytd pay_balance_pkg.t_balance_value_tab;
14: p_context_table pay_balance_pkg.t_context_tab;
15: p_result_table pay_balance_pkg.t_detailed_bal_out_tab;
16:
9: -- Define global variable to store defined_balance_id's and the
10: -- corresponding balance values for BBR.
11: ------------------------------------------------------------------------
12: p_balance_value_tab_payment pay_balance_pkg.t_balance_value_tab;
13: p_balance_value_tab_ytd pay_balance_pkg.t_balance_value_tab;
14: p_context_table pay_balance_pkg.t_context_tab;
15: p_result_table pay_balance_pkg.t_detailed_bal_out_tab;
16:
17: ------------------------------------------------------------------------
10: -- corresponding balance values for BBR.
11: ------------------------------------------------------------------------
12: p_balance_value_tab_payment pay_balance_pkg.t_balance_value_tab;
13: p_balance_value_tab_ytd pay_balance_pkg.t_balance_value_tab;
14: p_context_table pay_balance_pkg.t_context_tab;
15: p_result_table pay_balance_pkg.t_detailed_bal_out_tab;
16:
17: ------------------------------------------------------------------------
18: -- Returns the Currency Code for the Business Group.
11: ------------------------------------------------------------------------
12: p_balance_value_tab_payment pay_balance_pkg.t_balance_value_tab;
13: p_balance_value_tab_ytd pay_balance_pkg.t_balance_value_tab;
14: p_context_table pay_balance_pkg.t_context_tab;
15: p_result_table pay_balance_pkg.t_detailed_bal_out_tab;
16:
17: ------------------------------------------------------------------------
18: -- Returns the Currency Code for the Business Group.
19: ------------------------------------------------------------------------
173: p_context_table(1).tax_unit_id := p_tax_unit_id;
174:
175: /* get the balances using BBR. Bug 3609072 */
176:
177: pay_balance_pkg.get_value(p_assignment_action_id => p_assignment_action_id
178: ,p_defined_balance_lst=>p_balance_value_tab_payment
179: ,p_context_lst => p_context_table
180: ,p_output_table=> p_result_table);
181:
215: end if;
216:
217: /* get the balances using BBR. Bug 3609072 */
218:
219: pay_balance_pkg.get_value(p_assignment_action_id => p_assignment_action_id,
220: p_defined_balance_lst=>p_balance_value_tab_ytd,
221: p_context_lst =>p_context_table,
222: p_output_table=>p_result_table);
223:
453: FETCH csr_get_date_earned INTO l_date_earned, l_tax_unit_id;
454: CLOSE csr_get_date_earned;
455:
456: g_sql := 'SELECT /*+ USE_NL(pbt) */ NVL(pbt.reporting_name, pbt.balance_name) COL04
457: , TO_CHAR(pay_balance_pkg.get_value( pdb_ptd.defined_balance_id
458: , ' || l_assignment_action_id || '
459: , ' || l_tax_unit_id || '
460: , NULL
461: , NULL
464: , fnd_date.canonical_to_date(''' || fnd_date.date_to_canonical(l_date_earned) || ''')
465: , NULL
466: , NULL)
467: , fnd_currency.get_format_mask(:G_CURRENCY_CODE,40)) COL16
468: , TO_CHAR(pay_balance_pkg.get_value( pdb_ytd.defined_balance_id
469: , ' || l_assignment_action_id || '
470: , ' || l_tax_unit_id || '
471: , NULL
472: , NULL
715: FETCH csr_get_date_earned INTO l_date_earned, l_business_group_id, l_tax_unit_id;
716: CLOSE csr_get_date_earned;
717:
718: g_sql := 'SELECT org.org_information7 COL02
719: , TO_CHAR(pay_balance_pkg.get_value( pdb.defined_balance_id
720: , ' || l_assignment_action_id || '
721: , ' || l_tax_unit_id || '
722: , NULL
723: , NULL
733: AND org.org_information_context = ''Business Group:SOE Detail''
734: AND org.org_information1 = ''BALANCE''
735: AND pdb.balance_type_id = org.org_information4
736: AND pdb.balance_dimension_id = org.org_information5
737: AND pay_balance_pkg.get_value( pdb.defined_balance_id
738: , ' || l_assignment_action_id || '
739: , ' || l_tax_unit_id || '
740: , NULL
741: , NULL