The following lines contain the word 'select', 'insert', 'update' or 'delete':
* Name : CONSTRUCT_SELECT, CONSTRUCT_FROM, CONSTRUCT_WHERE *
* Purpose : These procedures are used to construct the complete *
* SELECT statement *
* *
**************************************************************************/
PROCEDURE CONSTRUCT_SELECT;
* 1. Before Report - where it constructs the basic SELECT *
* 2. Bind - binds the variables *
* *
**************************************************************************/
PROCEDURE GET_WITHHOLDING_TAX (request_id in number,
section_name in varchar2,
retcode out NOCOPY number,
errbuf out NOCOPY varchar2)
IS
BEGIN
fa_rx_util_pkg.debug('jgrx_wt.get_withholding_tax()+');
'jgrx_wt.wht_bind(:CURSOR_SELECT);',
* Purpose : This procedure constructs the basic SELECT and INSERT *
* statement to populate the interface table JG_ZZ_AP_WHT_ITF *
* *
***************************************************************************/
PROCEDURE before_report
IS
BEGIN
fa_rx_util_pkg.debug('jgrx_wt.before_report(+)');
select name, currency_code, chart_of_accounts_id
into jgrx_wt.var.reporting_sob_name,
jgrx_wt.var.func_currency_code, l_coa_id
from gl_sets_of_books
where set_of_books_id = jgrx_wt.var.sob_id;
-- Call to construct the basic select, from and where clauses
CONSTRUCT_SELECT;
* Purpose : This procedure accepts an integer parameter :CURSOR_SELECT *
* and binds the parameter to variables *
* *
***************************************************************************/
PROCEDURE wht_bind(c in integer)
IS
b_gldate_from date;
select sum(nvl(ind.base_amount,ind.amount))
into l_amount
from ap_invoice_distributions_all ind
where ind.invoice_id = jgrx_wt.var.invoice_id
and ind.line_type_lookup_code = 'AWT'
and ind.org_id = jgrx_wt.var.org_id;
* Name : CONSTRUCT_SELECT, CONSTRUCT_FROM, CONSTRUCT_WHERE *
* Purpose : These procedures are used to construct the complete *
* SELECT statement *
* *
**************************************************************************/
PROCEDURE CONSTRUCT_SELECT
IS
BEGIN
-- Write the basic select statement, From and Where clause
fa_rx_util_pkg.assign_column('1', 'hrl1.location_code', 'location_name',
'jgrx_wt.var.location_name', 'VARCHAR2', 60);
END CONSTRUCT_SELECT;
Select 'PO', lookup_type, lookup_code, displayed_field
from po_lookup_codes
where lookup_type in ('ORGANIZATION TYPE')
and sysdate < nvl(inactive_date, sysdate+1)
union all
select 'FND',lookup_type, lookup_code, meaning
from fnd_lookups
where lookup_type in ('JAKR_AP_AWT_BIZ_INC_SUB_CAT',
'JAKR_AP_AWT_TAX_TYPE',
'JAKR_AP_AWT_INC_CAT_DOMESTIC',
'JAKR_AP_AWT_INC_CAT_FOREIGN')
and enabled_flag = 'Y';