7: | |
8: | DESCRIPTION |
9: | |
10: | This procedure is the inner procedure for the RXi report. It uses |
11: | the appropriate fa_rx_util_pkg routines to bild the report |
12: | |
13: | PSEUDO CODE/LOGIC |
14: | |
15: | PARAMETERS |
56: l_profile_rsob_id NUMBER := NULL;
57: l_client_info_rsob_id NUMBER := NULL;
58: BEGIN
59:
60: fa_rx_util_pkg.debug('arrx_rc_unapp.ar_unapp_reg()+');
61:
62: /* Assign the parameters to the global variables
63: These will be used in the before_report trigger */
64: var.request_id := request_id ;
83: var.p_receipt_number_high := p_receipt_number_high ;
84:
85:
86:
87: fa_rx_util_pkg.debug('p_reporting_level = '||var.p_reporting_level);
88: fa_rx_util_pkg.debug('p_reporting_entity_id = '||var.p_reporting_entity_id);
89: fa_rx_util_pkg.debug('request_id = '||var.request_id);
90: fa_rx_util_pkg.debug('p_sob_id = '||var.p_sob_id);
91: fa_rx_util_pkg.debug('p_coa_id = '||var.p_coa_id);
84:
85:
86:
87: fa_rx_util_pkg.debug('p_reporting_level = '||var.p_reporting_level);
88: fa_rx_util_pkg.debug('p_reporting_entity_id = '||var.p_reporting_entity_id);
89: fa_rx_util_pkg.debug('request_id = '||var.request_id);
90: fa_rx_util_pkg.debug('p_sob_id = '||var.p_sob_id);
91: fa_rx_util_pkg.debug('p_coa_id = '||var.p_coa_id);
92: fa_rx_util_pkg.debug('p_co_seg_low = '||var.p_co_seg_low);
85:
86:
87: fa_rx_util_pkg.debug('p_reporting_level = '||var.p_reporting_level);
88: fa_rx_util_pkg.debug('p_reporting_entity_id = '||var.p_reporting_entity_id);
89: fa_rx_util_pkg.debug('request_id = '||var.request_id);
90: fa_rx_util_pkg.debug('p_sob_id = '||var.p_sob_id);
91: fa_rx_util_pkg.debug('p_coa_id = '||var.p_coa_id);
92: fa_rx_util_pkg.debug('p_co_seg_low = '||var.p_co_seg_low);
93: fa_rx_util_pkg.debug('p_co_seg_high = '||var.p_co_seg_high);
86:
87: fa_rx_util_pkg.debug('p_reporting_level = '||var.p_reporting_level);
88: fa_rx_util_pkg.debug('p_reporting_entity_id = '||var.p_reporting_entity_id);
89: fa_rx_util_pkg.debug('request_id = '||var.request_id);
90: fa_rx_util_pkg.debug('p_sob_id = '||var.p_sob_id);
91: fa_rx_util_pkg.debug('p_coa_id = '||var.p_coa_id);
92: fa_rx_util_pkg.debug('p_co_seg_low = '||var.p_co_seg_low);
93: fa_rx_util_pkg.debug('p_co_seg_high = '||var.p_co_seg_high);
94: fa_rx_util_pkg.debug('p_gl_date_from = '||var.p_gl_date_from);
87: fa_rx_util_pkg.debug('p_reporting_level = '||var.p_reporting_level);
88: fa_rx_util_pkg.debug('p_reporting_entity_id = '||var.p_reporting_entity_id);
89: fa_rx_util_pkg.debug('request_id = '||var.request_id);
90: fa_rx_util_pkg.debug('p_sob_id = '||var.p_sob_id);
91: fa_rx_util_pkg.debug('p_coa_id = '||var.p_coa_id);
92: fa_rx_util_pkg.debug('p_co_seg_low = '||var.p_co_seg_low);
93: fa_rx_util_pkg.debug('p_co_seg_high = '||var.p_co_seg_high);
94: fa_rx_util_pkg.debug('p_gl_date_from = '||var.p_gl_date_from);
95: fa_rx_util_pkg.debug('p_gl_date_to = '||var.p_gl_date_to);
88: fa_rx_util_pkg.debug('p_reporting_entity_id = '||var.p_reporting_entity_id);
89: fa_rx_util_pkg.debug('request_id = '||var.request_id);
90: fa_rx_util_pkg.debug('p_sob_id = '||var.p_sob_id);
91: fa_rx_util_pkg.debug('p_coa_id = '||var.p_coa_id);
92: fa_rx_util_pkg.debug('p_co_seg_low = '||var.p_co_seg_low);
93: fa_rx_util_pkg.debug('p_co_seg_high = '||var.p_co_seg_high);
94: fa_rx_util_pkg.debug('p_gl_date_from = '||var.p_gl_date_from);
95: fa_rx_util_pkg.debug('p_gl_date_to = '||var.p_gl_date_to);
96: fa_rx_util_pkg.debug('p_entered_currency = '||var.p_entered_currency);
89: fa_rx_util_pkg.debug('request_id = '||var.request_id);
90: fa_rx_util_pkg.debug('p_sob_id = '||var.p_sob_id);
91: fa_rx_util_pkg.debug('p_coa_id = '||var.p_coa_id);
92: fa_rx_util_pkg.debug('p_co_seg_low = '||var.p_co_seg_low);
93: fa_rx_util_pkg.debug('p_co_seg_high = '||var.p_co_seg_high);
94: fa_rx_util_pkg.debug('p_gl_date_from = '||var.p_gl_date_from);
95: fa_rx_util_pkg.debug('p_gl_date_to = '||var.p_gl_date_to);
96: fa_rx_util_pkg.debug('p_entered_currency = '||var.p_entered_currency);
97: fa_rx_util_pkg.debug('p_batch_name_low = '||var.p_batch_name_low);
90: fa_rx_util_pkg.debug('p_sob_id = '||var.p_sob_id);
91: fa_rx_util_pkg.debug('p_coa_id = '||var.p_coa_id);
92: fa_rx_util_pkg.debug('p_co_seg_low = '||var.p_co_seg_low);
93: fa_rx_util_pkg.debug('p_co_seg_high = '||var.p_co_seg_high);
94: fa_rx_util_pkg.debug('p_gl_date_from = '||var.p_gl_date_from);
95: fa_rx_util_pkg.debug('p_gl_date_to = '||var.p_gl_date_to);
96: fa_rx_util_pkg.debug('p_entered_currency = '||var.p_entered_currency);
97: fa_rx_util_pkg.debug('p_batch_name_low = '||var.p_batch_name_low);
98: fa_rx_util_pkg.debug('p_batch_name_high = '||var.p_batch_name_high);
91: fa_rx_util_pkg.debug('p_coa_id = '||var.p_coa_id);
92: fa_rx_util_pkg.debug('p_co_seg_low = '||var.p_co_seg_low);
93: fa_rx_util_pkg.debug('p_co_seg_high = '||var.p_co_seg_high);
94: fa_rx_util_pkg.debug('p_gl_date_from = '||var.p_gl_date_from);
95: fa_rx_util_pkg.debug('p_gl_date_to = '||var.p_gl_date_to);
96: fa_rx_util_pkg.debug('p_entered_currency = '||var.p_entered_currency);
97: fa_rx_util_pkg.debug('p_batch_name_low = '||var.p_batch_name_low);
98: fa_rx_util_pkg.debug('p_batch_name_high = '||var.p_batch_name_high);
99: fa_rx_util_pkg.debug('p_batch_src_low = '||var.p_batch_src_low);
92: fa_rx_util_pkg.debug('p_co_seg_low = '||var.p_co_seg_low);
93: fa_rx_util_pkg.debug('p_co_seg_high = '||var.p_co_seg_high);
94: fa_rx_util_pkg.debug('p_gl_date_from = '||var.p_gl_date_from);
95: fa_rx_util_pkg.debug('p_gl_date_to = '||var.p_gl_date_to);
96: fa_rx_util_pkg.debug('p_entered_currency = '||var.p_entered_currency);
97: fa_rx_util_pkg.debug('p_batch_name_low = '||var.p_batch_name_low);
98: fa_rx_util_pkg.debug('p_batch_name_high = '||var.p_batch_name_high);
99: fa_rx_util_pkg.debug('p_batch_src_low = '||var.p_batch_src_low);
100: fa_rx_util_pkg.debug('p_batch_src_high = '||var.p_batch_src_high);
93: fa_rx_util_pkg.debug('p_co_seg_high = '||var.p_co_seg_high);
94: fa_rx_util_pkg.debug('p_gl_date_from = '||var.p_gl_date_from);
95: fa_rx_util_pkg.debug('p_gl_date_to = '||var.p_gl_date_to);
96: fa_rx_util_pkg.debug('p_entered_currency = '||var.p_entered_currency);
97: fa_rx_util_pkg.debug('p_batch_name_low = '||var.p_batch_name_low);
98: fa_rx_util_pkg.debug('p_batch_name_high = '||var.p_batch_name_high);
99: fa_rx_util_pkg.debug('p_batch_src_low = '||var.p_batch_src_low);
100: fa_rx_util_pkg.debug('p_batch_src_high = '||var.p_batch_src_high);
101: fa_rx_util_pkg.debug('p_customer_name_low = '||var.p_customer_name_low);
94: fa_rx_util_pkg.debug('p_gl_date_from = '||var.p_gl_date_from);
95: fa_rx_util_pkg.debug('p_gl_date_to = '||var.p_gl_date_to);
96: fa_rx_util_pkg.debug('p_entered_currency = '||var.p_entered_currency);
97: fa_rx_util_pkg.debug('p_batch_name_low = '||var.p_batch_name_low);
98: fa_rx_util_pkg.debug('p_batch_name_high = '||var.p_batch_name_high);
99: fa_rx_util_pkg.debug('p_batch_src_low = '||var.p_batch_src_low);
100: fa_rx_util_pkg.debug('p_batch_src_high = '||var.p_batch_src_high);
101: fa_rx_util_pkg.debug('p_customer_name_low = '||var.p_customer_name_low);
102: fa_rx_util_pkg.debug('p_customer_name_high = '||var.p_customer_name_high);
95: fa_rx_util_pkg.debug('p_gl_date_to = '||var.p_gl_date_to);
96: fa_rx_util_pkg.debug('p_entered_currency = '||var.p_entered_currency);
97: fa_rx_util_pkg.debug('p_batch_name_low = '||var.p_batch_name_low);
98: fa_rx_util_pkg.debug('p_batch_name_high = '||var.p_batch_name_high);
99: fa_rx_util_pkg.debug('p_batch_src_low = '||var.p_batch_src_low);
100: fa_rx_util_pkg.debug('p_batch_src_high = '||var.p_batch_src_high);
101: fa_rx_util_pkg.debug('p_customer_name_low = '||var.p_customer_name_low);
102: fa_rx_util_pkg.debug('p_customer_name_high = '||var.p_customer_name_high);
103: fa_rx_util_pkg.debug('p_customer_number_low = '||var.p_customer_number_low);
96: fa_rx_util_pkg.debug('p_entered_currency = '||var.p_entered_currency);
97: fa_rx_util_pkg.debug('p_batch_name_low = '||var.p_batch_name_low);
98: fa_rx_util_pkg.debug('p_batch_name_high = '||var.p_batch_name_high);
99: fa_rx_util_pkg.debug('p_batch_src_low = '||var.p_batch_src_low);
100: fa_rx_util_pkg.debug('p_batch_src_high = '||var.p_batch_src_high);
101: fa_rx_util_pkg.debug('p_customer_name_low = '||var.p_customer_name_low);
102: fa_rx_util_pkg.debug('p_customer_name_high = '||var.p_customer_name_high);
103: fa_rx_util_pkg.debug('p_customer_number_low = '||var.p_customer_number_low);
104: fa_rx_util_pkg.debug('p_customer_number_high = '||var.p_customer_number_high);
97: fa_rx_util_pkg.debug('p_batch_name_low = '||var.p_batch_name_low);
98: fa_rx_util_pkg.debug('p_batch_name_high = '||var.p_batch_name_high);
99: fa_rx_util_pkg.debug('p_batch_src_low = '||var.p_batch_src_low);
100: fa_rx_util_pkg.debug('p_batch_src_high = '||var.p_batch_src_high);
101: fa_rx_util_pkg.debug('p_customer_name_low = '||var.p_customer_name_low);
102: fa_rx_util_pkg.debug('p_customer_name_high = '||var.p_customer_name_high);
103: fa_rx_util_pkg.debug('p_customer_number_low = '||var.p_customer_number_low);
104: fa_rx_util_pkg.debug('p_customer_number_high = '||var.p_customer_number_high);
105: fa_rx_util_pkg.debug('p_receipt_number_low = '||var.p_receipt_number_low);
98: fa_rx_util_pkg.debug('p_batch_name_high = '||var.p_batch_name_high);
99: fa_rx_util_pkg.debug('p_batch_src_low = '||var.p_batch_src_low);
100: fa_rx_util_pkg.debug('p_batch_src_high = '||var.p_batch_src_high);
101: fa_rx_util_pkg.debug('p_customer_name_low = '||var.p_customer_name_low);
102: fa_rx_util_pkg.debug('p_customer_name_high = '||var.p_customer_name_high);
103: fa_rx_util_pkg.debug('p_customer_number_low = '||var.p_customer_number_low);
104: fa_rx_util_pkg.debug('p_customer_number_high = '||var.p_customer_number_high);
105: fa_rx_util_pkg.debug('p_receipt_number_low = '||var.p_receipt_number_low);
106: fa_rx_util_pkg.debug('p_receipt_number_high = '||var.p_receipt_number_high);
99: fa_rx_util_pkg.debug('p_batch_src_low = '||var.p_batch_src_low);
100: fa_rx_util_pkg.debug('p_batch_src_high = '||var.p_batch_src_high);
101: fa_rx_util_pkg.debug('p_customer_name_low = '||var.p_customer_name_low);
102: fa_rx_util_pkg.debug('p_customer_name_high = '||var.p_customer_name_high);
103: fa_rx_util_pkg.debug('p_customer_number_low = '||var.p_customer_number_low);
104: fa_rx_util_pkg.debug('p_customer_number_high = '||var.p_customer_number_high);
105: fa_rx_util_pkg.debug('p_receipt_number_low = '||var.p_receipt_number_low);
106: fa_rx_util_pkg.debug('p_receipt_number_high = '||var.p_receipt_number_high);
107:
100: fa_rx_util_pkg.debug('p_batch_src_high = '||var.p_batch_src_high);
101: fa_rx_util_pkg.debug('p_customer_name_low = '||var.p_customer_name_low);
102: fa_rx_util_pkg.debug('p_customer_name_high = '||var.p_customer_name_high);
103: fa_rx_util_pkg.debug('p_customer_number_low = '||var.p_customer_number_low);
104: fa_rx_util_pkg.debug('p_customer_number_high = '||var.p_customer_number_high);
105: fa_rx_util_pkg.debug('p_receipt_number_low = '||var.p_receipt_number_low);
106: fa_rx_util_pkg.debug('p_receipt_number_high = '||var.p_receipt_number_high);
107:
108: /* Set the appropriate sob type into the global variable var.ca_sob_type */
101: fa_rx_util_pkg.debug('p_customer_name_low = '||var.p_customer_name_low);
102: fa_rx_util_pkg.debug('p_customer_name_high = '||var.p_customer_name_high);
103: fa_rx_util_pkg.debug('p_customer_number_low = '||var.p_customer_number_low);
104: fa_rx_util_pkg.debug('p_customer_number_high = '||var.p_customer_number_high);
105: fa_rx_util_pkg.debug('p_receipt_number_low = '||var.p_receipt_number_low);
106: fa_rx_util_pkg.debug('p_receipt_number_high = '||var.p_receipt_number_high);
107:
108: /* Set the appropriate sob type into the global variable var.ca_sob_type */
109: select to_number(nvl(replace(substr(userenv('CLIENT_INFO'),45,10),' '),-99))
102: fa_rx_util_pkg.debug('p_customer_name_high = '||var.p_customer_name_high);
103: fa_rx_util_pkg.debug('p_customer_number_low = '||var.p_customer_number_low);
104: fa_rx_util_pkg.debug('p_customer_number_high = '||var.p_customer_number_high);
105: fa_rx_util_pkg.debug('p_receipt_number_low = '||var.p_receipt_number_low);
106: fa_rx_util_pkg.debug('p_receipt_number_high = '||var.p_receipt_number_high);
107:
108: /* Set the appropriate sob type into the global variable var.ca_sob_type */
109: select to_number(nvl(replace(substr(userenv('CLIENT_INFO'),45,10),' '),-99))
110: into l_client_info_rsob_id
113: fnd_profile.get('MRC_REPORTING_SOB_ID', l_profile_rsob_id);
114: IF (l_client_info_rsob_id = NVL(l_profile_rsob_id,-1)) OR
115: (l_client_info_rsob_id = -99)
116: THEN
117: fa_rx_util_pkg.debug('Setting the sob type to P');
118: var.ca_sob_type := 'P';
119: ELSE
120: fa_rx_util_pkg.debug('Setting the sob type to R');
121: var.ca_sob_id := l_client_info_rsob_id;
116: THEN
117: fa_rx_util_pkg.debug('Setting the sob type to P');
118: var.ca_sob_type := 'P';
119: ELSE
120: fa_rx_util_pkg.debug('Setting the sob type to R');
121: var.ca_sob_id := l_client_info_rsob_id;
122: var.ca_sob_type := 'R';
123: END IF;
124:
122: var.ca_sob_type := 'R';
123: END IF;
124:
125: /* Initialize the request */
126: fa_rx_util_pkg.debug('Initializing the request');
127: fa_rx_util_pkg.init_request('arrx_rc_unapp.ar_unapp_reg',request_id, 'AR_RECEIPTS_REP_ITF');
128:
129: /* Assign the report triggers to this report.
130: NOTE:
123: END IF;
124:
125: /* Initialize the request */
126: fa_rx_util_pkg.debug('Initializing the request');
127: fa_rx_util_pkg.init_request('arrx_rc_unapp.ar_unapp_reg',request_id, 'AR_RECEIPTS_REP_ITF');
128:
129: /* Assign the report triggers to this report.
130: NOTE:
131: before_report is assigned 'arrx_rc_unapp.before_report;'
134: Each trigger event is assigned with the full procedure name (including package name).
135: They end with a ';'.
136: The bind trigger requires one host variable ':CURSOR_SELECT'.
137: */
138: fa_rx_util_pkg.debug('Assigning the report triggers');
139: fa_rx_util_pkg.assign_report('AR UNAPPLIED',
140: true,
141: 'arrx_rc_unapp.before_report;',
142: 'arrx_rc_unapp.bind(:CURSOR_SELECT);',
135: They end with a ';'.
136: The bind trigger requires one host variable ':CURSOR_SELECT'.
137: */
138: fa_rx_util_pkg.debug('Assigning the report triggers');
139: fa_rx_util_pkg.assign_report('AR UNAPPLIED',
140: true,
141: 'arrx_rc_unapp.before_report;',
142: 'arrx_rc_unapp.bind(:CURSOR_SELECT);',
143: 'arrx_rc_unapp.after_fetch;',
143: 'arrx_rc_unapp.after_fetch;',
144: null);
145:
146: /* Run the report */
147: fa_rx_util_pkg.debug('Running the report');
148: fa_rx_util_pkg.run_report('arrx_rc_unapp.ar_unapp_reg',retcode, errbuf);
149:
150: fa_rx_util_pkg.debug('arrx_rc_unapp.ar_unapp_reg()-');
151:
144: null);
145:
146: /* Run the report */
147: fa_rx_util_pkg.debug('Running the report');
148: fa_rx_util_pkg.run_report('arrx_rc_unapp.ar_unapp_reg',retcode, errbuf);
149:
150: fa_rx_util_pkg.debug('arrx_rc_unapp.ar_unapp_reg()-');
151:
152:
146: /* Run the report */
147: fa_rx_util_pkg.debug('Running the report');
148: fa_rx_util_pkg.run_report('arrx_rc_unapp.ar_unapp_reg',retcode, errbuf);
149:
150: fa_rx_util_pkg.debug('arrx_rc_unapp.ar_unapp_reg()-');
151:
152:
153: EXCEPTION
154: WHEN OTHERS THEN
151:
152:
153: EXCEPTION
154: WHEN OTHERS THEN
155: fa_rx_util_pkg.log(sqlcode);
156: fa_rx_util_pkg.log(sqlerrm);
157: fa_rx_util_pkg.debug(sqlcode);
158: fa_rx_util_pkg.debug(sqlerrm);
159: fa_rx_util_pkg.debug('arrx_rc_unapp.ar_unapp_reg(EXCEPTION)-');
152:
153: EXCEPTION
154: WHEN OTHERS THEN
155: fa_rx_util_pkg.log(sqlcode);
156: fa_rx_util_pkg.log(sqlerrm);
157: fa_rx_util_pkg.debug(sqlcode);
158: fa_rx_util_pkg.debug(sqlerrm);
159: fa_rx_util_pkg.debug('arrx_rc_unapp.ar_unapp_reg(EXCEPTION)-');
160: END ar_unapp_reg;
153: EXCEPTION
154: WHEN OTHERS THEN
155: fa_rx_util_pkg.log(sqlcode);
156: fa_rx_util_pkg.log(sqlerrm);
157: fa_rx_util_pkg.debug(sqlcode);
158: fa_rx_util_pkg.debug(sqlerrm);
159: fa_rx_util_pkg.debug('arrx_rc_unapp.ar_unapp_reg(EXCEPTION)-');
160: END ar_unapp_reg;
161:
154: WHEN OTHERS THEN
155: fa_rx_util_pkg.log(sqlcode);
156: fa_rx_util_pkg.log(sqlerrm);
157: fa_rx_util_pkg.debug(sqlcode);
158: fa_rx_util_pkg.debug(sqlerrm);
159: fa_rx_util_pkg.debug('arrx_rc_unapp.ar_unapp_reg(EXCEPTION)-');
160: END ar_unapp_reg;
161:
162: PROCEDURE before_report IS
155: fa_rx_util_pkg.log(sqlcode);
156: fa_rx_util_pkg.log(sqlerrm);
157: fa_rx_util_pkg.debug(sqlcode);
158: fa_rx_util_pkg.debug(sqlerrm);
159: fa_rx_util_pkg.debug('arrx_rc_unapp.ar_unapp_reg(EXCEPTION)-');
160: END ar_unapp_reg;
161:
162: PROCEDURE before_report IS
163: CO_SEG_WHERE VARCHAR2(4000);
187: L_RA_ORG_WHERE VARCHAR2(4000);
188: L_PS_ORG_WHERE VARCHAR2(4000);
189: BEGIN
190:
191: fa_rx_util_pkg.debug('arrx_rc_unapp.before_report()+');
192:
193: fa_rx_util_pkg.debug('Set of Books ID : '||var.p_sob_id);
194: fa_rx_util_pkg.debug('Get Chart of Accounts ID ');
195:
189: BEGIN
190:
191: fa_rx_util_pkg.debug('arrx_rc_unapp.before_report()+');
192:
193: fa_rx_util_pkg.debug('Set of Books ID : '||var.p_sob_id);
194: fa_rx_util_pkg.debug('Get Chart of Accounts ID ');
195:
196: select CHART_OF_ACCOUNTS_ID,CURRENCY_CODE,NAME
197: into var.p_coa_id,var.functional_currency_code,var.organization_name
190:
191: fa_rx_util_pkg.debug('arrx_rc_unapp.before_report()+');
192:
193: fa_rx_util_pkg.debug('Set of Books ID : '||var.p_sob_id);
194: fa_rx_util_pkg.debug('Get Chart of Accounts ID ');
195:
196: select CHART_OF_ACCOUNTS_ID,CURRENCY_CODE,NAME
197: into var.p_coa_id,var.functional_currency_code,var.organization_name
198: from GL_SETS_OF_BOOKS
197: into var.p_coa_id,var.functional_currency_code,var.organization_name
198: from GL_SETS_OF_BOOKS
199: where SET_OF_BOOKS_ID = var.p_sob_id;
200:
201: fa_rx_util_pkg.debug('Chart of Accounts ID : '||var.p_coa_id);
202: fa_rx_util_pkg.debug('Functional Currency : '||var.functional_currency_code);
203: fa_rx_util_pkg.debug('Organization Name : '||var.organization_name);
204:
205: XLA_MO_REPORTING_API.Initialize(var.p_reporting_level, var.p_reporting_entity_id, 'AUTO');
198: from GL_SETS_OF_BOOKS
199: where SET_OF_BOOKS_ID = var.p_sob_id;
200:
201: fa_rx_util_pkg.debug('Chart of Accounts ID : '||var.p_coa_id);
202: fa_rx_util_pkg.debug('Functional Currency : '||var.functional_currency_code);
203: fa_rx_util_pkg.debug('Organization Name : '||var.organization_name);
204:
205: XLA_MO_REPORTING_API.Initialize(var.p_reporting_level, var.p_reporting_entity_id, 'AUTO');
206:
199: where SET_OF_BOOKS_ID = var.p_sob_id;
200:
201: fa_rx_util_pkg.debug('Chart of Accounts ID : '||var.p_coa_id);
202: fa_rx_util_pkg.debug('Functional Currency : '||var.functional_currency_code);
203: fa_rx_util_pkg.debug('Organization Name : '||var.organization_name);
204:
205: XLA_MO_REPORTING_API.Initialize(var.p_reporting_level, var.p_reporting_entity_id, 'AUTO');
206:
207:
213: L_BS_ORG_WHERE := XLA_MO_REPORTING_API.Get_Predicate('BS','push_subq');
214: L_RA_ORG_WHERE := XLA_MO_REPORTING_API.Get_Predicate('RA','push_subq');
215: L_PS_ORG_WHERE := XLA_MO_REPORTING_API.Get_Predicate('PS','push_subq');
216:
217: fa_rx_util_pkg.debug('L_CR_ORG_WHERE : '||L_CR_ORG_WHERE);
218: fa_rx_util_pkg.debug('L_CRH_ORG_WHERE : '||L_CRH_ORG_WHERE);
219: fa_rx_util_pkg.debug('L_ABA_ORG_WHERE : '||L_ABA_ORG_WHERE);
220: fa_rx_util_pkg.debug('L_CRH_CURR_ORG_WHERE : '||L_CRH_CURR_ORG_WHERE);
221: fa_rx_util_pkg.debug('L_BAT_ORG_WHERE : '||L_BAT_ORG_WHERE);
214: L_RA_ORG_WHERE := XLA_MO_REPORTING_API.Get_Predicate('RA','push_subq');
215: L_PS_ORG_WHERE := XLA_MO_REPORTING_API.Get_Predicate('PS','push_subq');
216:
217: fa_rx_util_pkg.debug('L_CR_ORG_WHERE : '||L_CR_ORG_WHERE);
218: fa_rx_util_pkg.debug('L_CRH_ORG_WHERE : '||L_CRH_ORG_WHERE);
219: fa_rx_util_pkg.debug('L_ABA_ORG_WHERE : '||L_ABA_ORG_WHERE);
220: fa_rx_util_pkg.debug('L_CRH_CURR_ORG_WHERE : '||L_CRH_CURR_ORG_WHERE);
221: fa_rx_util_pkg.debug('L_BAT_ORG_WHERE : '||L_BAT_ORG_WHERE);
222: fa_rx_util_pkg.debug('L_BS_ORG_WHERE : '||L_BS_ORG_WHERE);
215: L_PS_ORG_WHERE := XLA_MO_REPORTING_API.Get_Predicate('PS','push_subq');
216:
217: fa_rx_util_pkg.debug('L_CR_ORG_WHERE : '||L_CR_ORG_WHERE);
218: fa_rx_util_pkg.debug('L_CRH_ORG_WHERE : '||L_CRH_ORG_WHERE);
219: fa_rx_util_pkg.debug('L_ABA_ORG_WHERE : '||L_ABA_ORG_WHERE);
220: fa_rx_util_pkg.debug('L_CRH_CURR_ORG_WHERE : '||L_CRH_CURR_ORG_WHERE);
221: fa_rx_util_pkg.debug('L_BAT_ORG_WHERE : '||L_BAT_ORG_WHERE);
222: fa_rx_util_pkg.debug('L_BS_ORG_WHERE : '||L_BS_ORG_WHERE);
223: fa_rx_util_pkg.debug('L_RA_ORG_WHERE : '||L_RA_ORG_WHERE);
216:
217: fa_rx_util_pkg.debug('L_CR_ORG_WHERE : '||L_CR_ORG_WHERE);
218: fa_rx_util_pkg.debug('L_CRH_ORG_WHERE : '||L_CRH_ORG_WHERE);
219: fa_rx_util_pkg.debug('L_ABA_ORG_WHERE : '||L_ABA_ORG_WHERE);
220: fa_rx_util_pkg.debug('L_CRH_CURR_ORG_WHERE : '||L_CRH_CURR_ORG_WHERE);
221: fa_rx_util_pkg.debug('L_BAT_ORG_WHERE : '||L_BAT_ORG_WHERE);
222: fa_rx_util_pkg.debug('L_BS_ORG_WHERE : '||L_BS_ORG_WHERE);
223: fa_rx_util_pkg.debug('L_RA_ORG_WHERE : '||L_RA_ORG_WHERE);
224: fa_rx_util_pkg.debug('L_PS_ORG_WHERE : '||L_PS_ORG_WHERE);
217: fa_rx_util_pkg.debug('L_CR_ORG_WHERE : '||L_CR_ORG_WHERE);
218: fa_rx_util_pkg.debug('L_CRH_ORG_WHERE : '||L_CRH_ORG_WHERE);
219: fa_rx_util_pkg.debug('L_ABA_ORG_WHERE : '||L_ABA_ORG_WHERE);
220: fa_rx_util_pkg.debug('L_CRH_CURR_ORG_WHERE : '||L_CRH_CURR_ORG_WHERE);
221: fa_rx_util_pkg.debug('L_BAT_ORG_WHERE : '||L_BAT_ORG_WHERE);
222: fa_rx_util_pkg.debug('L_BS_ORG_WHERE : '||L_BS_ORG_WHERE);
223: fa_rx_util_pkg.debug('L_RA_ORG_WHERE : '||L_RA_ORG_WHERE);
224: fa_rx_util_pkg.debug('L_PS_ORG_WHERE : '||L_PS_ORG_WHERE);
225:
218: fa_rx_util_pkg.debug('L_CRH_ORG_WHERE : '||L_CRH_ORG_WHERE);
219: fa_rx_util_pkg.debug('L_ABA_ORG_WHERE : '||L_ABA_ORG_WHERE);
220: fa_rx_util_pkg.debug('L_CRH_CURR_ORG_WHERE : '||L_CRH_CURR_ORG_WHERE);
221: fa_rx_util_pkg.debug('L_BAT_ORG_WHERE : '||L_BAT_ORG_WHERE);
222: fa_rx_util_pkg.debug('L_BS_ORG_WHERE : '||L_BS_ORG_WHERE);
223: fa_rx_util_pkg.debug('L_RA_ORG_WHERE : '||L_RA_ORG_WHERE);
224: fa_rx_util_pkg.debug('L_PS_ORG_WHERE : '||L_PS_ORG_WHERE);
225:
226: fa_rx_util_pkg.debug('Building Company Segment Where');
219: fa_rx_util_pkg.debug('L_ABA_ORG_WHERE : '||L_ABA_ORG_WHERE);
220: fa_rx_util_pkg.debug('L_CRH_CURR_ORG_WHERE : '||L_CRH_CURR_ORG_WHERE);
221: fa_rx_util_pkg.debug('L_BAT_ORG_WHERE : '||L_BAT_ORG_WHERE);
222: fa_rx_util_pkg.debug('L_BS_ORG_WHERE : '||L_BS_ORG_WHERE);
223: fa_rx_util_pkg.debug('L_RA_ORG_WHERE : '||L_RA_ORG_WHERE);
224: fa_rx_util_pkg.debug('L_PS_ORG_WHERE : '||L_PS_ORG_WHERE);
225:
226: fa_rx_util_pkg.debug('Building Company Segment Where');
227:
220: fa_rx_util_pkg.debug('L_CRH_CURR_ORG_WHERE : '||L_CRH_CURR_ORG_WHERE);
221: fa_rx_util_pkg.debug('L_BAT_ORG_WHERE : '||L_BAT_ORG_WHERE);
222: fa_rx_util_pkg.debug('L_BS_ORG_WHERE : '||L_BS_ORG_WHERE);
223: fa_rx_util_pkg.debug('L_RA_ORG_WHERE : '||L_RA_ORG_WHERE);
224: fa_rx_util_pkg.debug('L_PS_ORG_WHERE : '||L_PS_ORG_WHERE);
225:
226: fa_rx_util_pkg.debug('Building Company Segment Where');
227:
228: IF var.p_co_seg_low IS NULL AND var.p_co_seg_high IS NULL THEN
222: fa_rx_util_pkg.debug('L_BS_ORG_WHERE : '||L_BS_ORG_WHERE);
223: fa_rx_util_pkg.debug('L_RA_ORG_WHERE : '||L_RA_ORG_WHERE);
224: fa_rx_util_pkg.debug('L_PS_ORG_WHERE : '||L_PS_ORG_WHERE);
225:
226: fa_rx_util_pkg.debug('Building Company Segment Where');
227:
228: IF var.p_co_seg_low IS NULL AND var.p_co_seg_high IS NULL THEN
229: CO_SEG_WHERE := NULL;
230: ELSIF var.p_co_seg_low IS NULL THEN
258: p_function => 'BETWEEN',
259: p_operand1 => var.p_co_seg_low,
260: p_operand2 => var.p_co_seg_high);
261: END IF;
262: fa_rx_util_pkg.debug('CO_SEG_WHERE = '||substr(CO_SEG_WHERE,1,100));
263:
264: fa_rx_util_pkg.debug('Building GL Date Where ');
265:
266: IF var.p_gl_date_from IS NULL and var.p_gl_date_to IS NULL THEN
260: p_operand2 => var.p_co_seg_high);
261: END IF;
262: fa_rx_util_pkg.debug('CO_SEG_WHERE = '||substr(CO_SEG_WHERE,1,100));
263:
264: fa_rx_util_pkg.debug('Building GL Date Where ');
265:
266: IF var.p_gl_date_from IS NULL and var.p_gl_date_to IS NULL THEN
267: GL_DATE_WHERE := NULL;
268: ELSIF var.p_gl_date_from IS NULL THEN
272: ELSE
273: GL_DATE_WHERE := ' AND RA.GL_DATE BETWEEN :p_gl_date_from AND :p_gl_date_to';
274: END IF;
275:
276: fa_rx_util_pkg.debug('GL_DATE_WHERE = '||GL_DATE_WHERE);
277:
278: fa_rx_util_pkg.debug('Building GL Date Closed Where ');
279:
280: IF var.p_gl_date_from IS NULL and var.p_gl_date_to IS NULL THEN
274: END IF;
275:
276: fa_rx_util_pkg.debug('GL_DATE_WHERE = '||GL_DATE_WHERE);
277:
278: fa_rx_util_pkg.debug('Building GL Date Closed Where ');
279:
280: IF var.p_gl_date_from IS NULL and var.p_gl_date_to IS NULL THEN
281: GL_DATE_CLOSED_WHERE := 'AND PS.GL_DATE_CLOSED = TO_DATE(''31-12-4712'',''DD-MM-YYYY'')';
282: END IF;
286: IF var.p_gl_date_to IS NOT NULL THEN
287: GL_DATE_CLOSED_WHERE := 'AND PS.GL_DATE_CLOSED >= :p_gl_date_to';
288: END IF;
289:
290: fa_rx_util_pkg.debug('GL_DATE_CLOSED_WHERE = '||GL_DATE_CLOSED_WHERE);
291:
292: fa_rx_util_pkg.debug('Building Currency Code Where ');
293: IF var.p_entered_currency IS NULL THEN
294: CURRENCY_CODE_WHERE := NULL;
288: END IF;
289:
290: fa_rx_util_pkg.debug('GL_DATE_CLOSED_WHERE = '||GL_DATE_CLOSED_WHERE);
291:
292: fa_rx_util_pkg.debug('Building Currency Code Where ');
293: IF var.p_entered_currency IS NULL THEN
294: CURRENCY_CODE_WHERE := NULL;
295: ELSE
296: CURRENCY_CODE_WHERE := ' AND CR.CURRENCY_CODE = :p_entered_currency';
295: ELSE
296: CURRENCY_CODE_WHERE := ' AND CR.CURRENCY_CODE = :p_entered_currency';
297: END IF;
298:
299: fa_rx_util_pkg.debug('Building Batch Name Where ');
300: IF var.p_batch_name_low IS NULL and var.p_batch_name_high IS NULL THEN
301: BATCH_NAME_WHERE := NULL;
302: ELSIF var.p_batch_name_low IS NULL THEN
303: BATCH_NAME_WHERE := ' AND BAT.NAME <= :p_batch_name_high';
306: ELSE
307: BATCH_NAME_WHERE := ' AND BAT.NAME BETWEEN :p_batch_name_low AND :p_batch_name_high';
308: END IF;
309:
310: fa_rx_util_pkg.debug('Building Batch Source Name Where ');
311: IF var.p_batch_src_low IS NULL and var.p_batch_src_high IS NULL THEN
312: BATCH_SRC_NAME_WHERE := NULL;
313: ELSIF var.p_batch_src_low IS NULL THEN
314: BATCH_SRC_NAME_WHERE := ' AND BS.NAME <= :p_batch_src_high';
317: ELSE
318: BATCH_SRC_NAME_WHERE := ' AND BS.NAME BETWEEN :p_batch_src_low AND :p_batch_src_high';
319: END IF;
320:
321: fa_rx_util_pkg.debug('Building Customer Name Where');
322: IF var.p_customer_name_low IS NULL AND var.p_customer_name_high IS NULL THEN
323: CUSTOMER_NAME_WHERE := NULL;
324: ELSIF var.p_customer_name_low IS NULL THEN
325: CUSTOMER_NAME_WHERE := ' AND PARTY.PARTY_NAME <= :p_customer_name_high';
328: ELSE
329: CUSTOMER_NAME_WHERE := ' AND PARTY.PARTY_NAME BETWEEN :p_customer_name_low AND :p_customer_name_high';
330: END IF;
331:
332: fa_rx_util_pkg.debug('Building Customer Number Where');
333: IF var.p_customer_number_low IS NULL AND var.p_customer_number_high IS NULL THEN
334: CUSTOMER_NUMBER_WHERE := NULL;
335: ELSIF var.p_customer_number_low IS NULL THEN
336: CUSTOMER_NUMBER_WHERE := ' AND CUST.ACCOUNT_NUMBER <= :p_customer_number_high';
339: ELSE
340: CUSTOMER_NUMBER_WHERE := ' AND CUST.ACCOUNT_NUMBER BETWEEN :p_customer_number_low AND :p_customer_number_high';
341: END IF;
342:
343: fa_rx_util_pkg.debug('Building Receipt Number Where');
344: IF var.p_receipt_number_low IS NULL AND var.p_receipt_number_high IS NULL THEN
345: RECEIPT_NUMBER_WHERE := NULL;
346: ELSIF var.p_receipt_number_low IS NULL THEN
347: RECEIPT_NUMBER_WHERE := ' AND CR.RECEIPT_NUMBER <= :p_receipt_number_high';
350: ELSE
351: RECEIPT_NUMBER_WHERE := ' AND CR.RECEIPT_NUMBER BETWEEN :p_receipt_number_low AND :p_receipt_number_high';
352: END IF;
353:
354: fa_rx_util_pkg.debug('Building the DECODE statements');
355:
356: CR_STATUS_DECODE := 'DECODE(CR.STATUS,''APP'',:L_APP,''NSF'',:L_NSF,''REV'',:L_REV,''STOP'',:L_STOP,''UNAPP'',:L_UNAPP,''UNID'',:L_UNID)';
357: CRH_STATUS_DECODE := 'DECODE(CRH.STATUS,''APPROVED'',:L_APPROVED,''CLEARED'',:L_CLEARED,''CONFIRMED'',:L_CONFIRMED,''REMITTED'',:L_REMITTED,''REVERSED'',:L_REVERSED)';
358: ON_ACC_AMT_DECODE := 'SUM(DECODE(RA.STATUS,
381:
382: FORMAT_CURRENCY_DECODE := 'DECODE(:P_ENTERED_CURRENCY,NULL,:P_FUNCTIONAL_CURRENCY,CR.CURRENCY_CODE)';
383:
384: /* Assign the Select List */
385: fa_rx_util_pkg.debug('Assign Select List');
386:
387: fa_rx_util_pkg.assign_column('10',null ,'ORGANIZATION_NAME'
388: ,'arrx_rc_unapp.var.organization_name' ,'VARCHAR2', 50);
389: fa_rx_util_pkg.assign_column('20',null ,'FUNCTIONAL_CURRENCY_CODE'
383:
384: /* Assign the Select List */
385: fa_rx_util_pkg.debug('Assign Select List');
386:
387: fa_rx_util_pkg.assign_column('10',null ,'ORGANIZATION_NAME'
388: ,'arrx_rc_unapp.var.organization_name' ,'VARCHAR2', 50);
389: fa_rx_util_pkg.assign_column('20',null ,'FUNCTIONAL_CURRENCY_CODE'
390: ,'arrx_rc_unapp.var.functional_currency_code' ,'VARCHAR2', 15);
391: fa_rx_util_pkg.assign_column('30','BAT.BATCH_ID' ,'BATCH_ID'
385: fa_rx_util_pkg.debug('Assign Select List');
386:
387: fa_rx_util_pkg.assign_column('10',null ,'ORGANIZATION_NAME'
388: ,'arrx_rc_unapp.var.organization_name' ,'VARCHAR2', 50);
389: fa_rx_util_pkg.assign_column('20',null ,'FUNCTIONAL_CURRENCY_CODE'
390: ,'arrx_rc_unapp.var.functional_currency_code' ,'VARCHAR2', 15);
391: fa_rx_util_pkg.assign_column('30','BAT.BATCH_ID' ,'BATCH_ID'
392: ,'arrx_rc_unapp.var.batch_id' ,'NUMBER');
393: fa_rx_util_pkg.assign_column('40','BAT.NAME' ,'BATCH_NAME'
387: fa_rx_util_pkg.assign_column('10',null ,'ORGANIZATION_NAME'
388: ,'arrx_rc_unapp.var.organization_name' ,'VARCHAR2', 50);
389: fa_rx_util_pkg.assign_column('20',null ,'FUNCTIONAL_CURRENCY_CODE'
390: ,'arrx_rc_unapp.var.functional_currency_code' ,'VARCHAR2', 15);
391: fa_rx_util_pkg.assign_column('30','BAT.BATCH_ID' ,'BATCH_ID'
392: ,'arrx_rc_unapp.var.batch_id' ,'NUMBER');
393: fa_rx_util_pkg.assign_column('40','BAT.NAME' ,'BATCH_NAME'
394: ,'arrx_rc_unapp.var.batch_name' ,'VARCHAR2', 20);
395: fa_rx_util_pkg.assign_column('50 ','CR.CASH_RECEIPT_ID' ,'CASH_RECEIPT_ID'
389: fa_rx_util_pkg.assign_column('20',null ,'FUNCTIONAL_CURRENCY_CODE'
390: ,'arrx_rc_unapp.var.functional_currency_code' ,'VARCHAR2', 15);
391: fa_rx_util_pkg.assign_column('30','BAT.BATCH_ID' ,'BATCH_ID'
392: ,'arrx_rc_unapp.var.batch_id' ,'NUMBER');
393: fa_rx_util_pkg.assign_column('40','BAT.NAME' ,'BATCH_NAME'
394: ,'arrx_rc_unapp.var.batch_name' ,'VARCHAR2', 20);
395: fa_rx_util_pkg.assign_column('50 ','CR.CASH_RECEIPT_ID' ,'CASH_RECEIPT_ID'
396: ,'arrx_rc_unapp.var.cash_receipt_id' ,'NUMBER');
397: fa_rx_util_pkg.assign_column('60','CR.RECEIPT_NUMBER' ,'RECEIPT_NUMBER'
391: fa_rx_util_pkg.assign_column('30','BAT.BATCH_ID' ,'BATCH_ID'
392: ,'arrx_rc_unapp.var.batch_id' ,'NUMBER');
393: fa_rx_util_pkg.assign_column('40','BAT.NAME' ,'BATCH_NAME'
394: ,'arrx_rc_unapp.var.batch_name' ,'VARCHAR2', 20);
395: fa_rx_util_pkg.assign_column('50 ','CR.CASH_RECEIPT_ID' ,'CASH_RECEIPT_ID'
396: ,'arrx_rc_unapp.var.cash_receipt_id' ,'NUMBER');
397: fa_rx_util_pkg.assign_column('60','CR.RECEIPT_NUMBER' ,'RECEIPT_NUMBER'
398: ,'arrx_rc_unapp.var.receipt_number' ,'VARCHAR2', 30);
399: fa_rx_util_pkg.assign_column('70','CR.CURRENCY_CODE' ,'RECEIPT_CURRENCY_CODE'
393: fa_rx_util_pkg.assign_column('40','BAT.NAME' ,'BATCH_NAME'
394: ,'arrx_rc_unapp.var.batch_name' ,'VARCHAR2', 20);
395: fa_rx_util_pkg.assign_column('50 ','CR.CASH_RECEIPT_ID' ,'CASH_RECEIPT_ID'
396: ,'arrx_rc_unapp.var.cash_receipt_id' ,'NUMBER');
397: fa_rx_util_pkg.assign_column('60','CR.RECEIPT_NUMBER' ,'RECEIPT_NUMBER'
398: ,'arrx_rc_unapp.var.receipt_number' ,'VARCHAR2', 30);
399: fa_rx_util_pkg.assign_column('70','CR.CURRENCY_CODE' ,'RECEIPT_CURRENCY_CODE'
400: ,'arrx_rc_unapp.var.receipt_currency_code' ,'VARCHAR2', 15);
401: fa_rx_util_pkg.assign_column('80','CR.EXCHANGE_RATE' ,'EXCHANGE_RATE'
395: fa_rx_util_pkg.assign_column('50 ','CR.CASH_RECEIPT_ID' ,'CASH_RECEIPT_ID'
396: ,'arrx_rc_unapp.var.cash_receipt_id' ,'NUMBER');
397: fa_rx_util_pkg.assign_column('60','CR.RECEIPT_NUMBER' ,'RECEIPT_NUMBER'
398: ,'arrx_rc_unapp.var.receipt_number' ,'VARCHAR2', 30);
399: fa_rx_util_pkg.assign_column('70','CR.CURRENCY_CODE' ,'RECEIPT_CURRENCY_CODE'
400: ,'arrx_rc_unapp.var.receipt_currency_code' ,'VARCHAR2', 15);
401: fa_rx_util_pkg.assign_column('80','CR.EXCHANGE_RATE' ,'EXCHANGE_RATE'
402: ,'arrx_rc_unapp.var.exchange_rate' ,'NUMBER');
403: fa_rx_util_pkg.assign_column('90','CR.EXCHANGE_DATE' ,'EXCHANGE_DATE'
397: fa_rx_util_pkg.assign_column('60','CR.RECEIPT_NUMBER' ,'RECEIPT_NUMBER'
398: ,'arrx_rc_unapp.var.receipt_number' ,'VARCHAR2', 30);
399: fa_rx_util_pkg.assign_column('70','CR.CURRENCY_CODE' ,'RECEIPT_CURRENCY_CODE'
400: ,'arrx_rc_unapp.var.receipt_currency_code' ,'VARCHAR2', 15);
401: fa_rx_util_pkg.assign_column('80','CR.EXCHANGE_RATE' ,'EXCHANGE_RATE'
402: ,'arrx_rc_unapp.var.exchange_rate' ,'NUMBER');
403: fa_rx_util_pkg.assign_column('90','CR.EXCHANGE_DATE' ,'EXCHANGE_DATE'
404: ,'arrx_rc_unapp.var.exchange_date' ,'DATE');
405: fa_rx_util_pkg.assign_column('100','CR.EXCHANGE_RATE_TYPE' ,'EXCHANGE_TYPE'
399: fa_rx_util_pkg.assign_column('70','CR.CURRENCY_CODE' ,'RECEIPT_CURRENCY_CODE'
400: ,'arrx_rc_unapp.var.receipt_currency_code' ,'VARCHAR2', 15);
401: fa_rx_util_pkg.assign_column('80','CR.EXCHANGE_RATE' ,'EXCHANGE_RATE'
402: ,'arrx_rc_unapp.var.exchange_rate' ,'NUMBER');
403: fa_rx_util_pkg.assign_column('90','CR.EXCHANGE_DATE' ,'EXCHANGE_DATE'
404: ,'arrx_rc_unapp.var.exchange_date' ,'DATE');
405: fa_rx_util_pkg.assign_column('100','CR.EXCHANGE_RATE_TYPE' ,'EXCHANGE_TYPE'
406: ,'arrx_rc_unapp.var.exchange_type' ,'VARCHAR2',30);
407: fa_rx_util_pkg.assign_column('110','DOCSEQ.NAME' ,'DOC_SEQUENCE_NAME'
401: fa_rx_util_pkg.assign_column('80','CR.EXCHANGE_RATE' ,'EXCHANGE_RATE'
402: ,'arrx_rc_unapp.var.exchange_rate' ,'NUMBER');
403: fa_rx_util_pkg.assign_column('90','CR.EXCHANGE_DATE' ,'EXCHANGE_DATE'
404: ,'arrx_rc_unapp.var.exchange_date' ,'DATE');
405: fa_rx_util_pkg.assign_column('100','CR.EXCHANGE_RATE_TYPE' ,'EXCHANGE_TYPE'
406: ,'arrx_rc_unapp.var.exchange_type' ,'VARCHAR2',30);
407: fa_rx_util_pkg.assign_column('110','DOCSEQ.NAME' ,'DOC_SEQUENCE_NAME'
408: ,'arrx_rc_unapp.var.doc_sequence_name' ,'VARCHAR2',30);
409: fa_rx_util_pkg.assign_column('120','CR.DOC_SEQUENCE_VALUE' ,'DOC_SEQUENCE_VALUE'
403: fa_rx_util_pkg.assign_column('90','CR.EXCHANGE_DATE' ,'EXCHANGE_DATE'
404: ,'arrx_rc_unapp.var.exchange_date' ,'DATE');
405: fa_rx_util_pkg.assign_column('100','CR.EXCHANGE_RATE_TYPE' ,'EXCHANGE_TYPE'
406: ,'arrx_rc_unapp.var.exchange_type' ,'VARCHAR2',30);
407: fa_rx_util_pkg.assign_column('110','DOCSEQ.NAME' ,'DOC_SEQUENCE_NAME'
408: ,'arrx_rc_unapp.var.doc_sequence_name' ,'VARCHAR2',30);
409: fa_rx_util_pkg.assign_column('120','CR.DOC_SEQUENCE_VALUE' ,'DOC_SEQUENCE_VALUE'
410: ,'arrx_rc_unapp.var.doc_sequence_value' ,'NUMBER');
411: fa_rx_util_pkg.assign_column('130','CR.DEPOSIT_DATE' ,'DEPOSIT_DATE'
405: fa_rx_util_pkg.assign_column('100','CR.EXCHANGE_RATE_TYPE' ,'EXCHANGE_TYPE'
406: ,'arrx_rc_unapp.var.exchange_type' ,'VARCHAR2',30);
407: fa_rx_util_pkg.assign_column('110','DOCSEQ.NAME' ,'DOC_SEQUENCE_NAME'
408: ,'arrx_rc_unapp.var.doc_sequence_name' ,'VARCHAR2',30);
409: fa_rx_util_pkg.assign_column('120','CR.DOC_SEQUENCE_VALUE' ,'DOC_SEQUENCE_VALUE'
410: ,'arrx_rc_unapp.var.doc_sequence_value' ,'NUMBER');
411: fa_rx_util_pkg.assign_column('130','CR.DEPOSIT_DATE' ,'DEPOSIT_DATE'
412: ,'arrx_rc_unapp.var.deposit_date' ,'DATE');
413: fa_rx_util_pkg.assign_column('140','CR.RECEIPT_DATE' ,'RECEIPT_DATE'
407: fa_rx_util_pkg.assign_column('110','DOCSEQ.NAME' ,'DOC_SEQUENCE_NAME'
408: ,'arrx_rc_unapp.var.doc_sequence_name' ,'VARCHAR2',30);
409: fa_rx_util_pkg.assign_column('120','CR.DOC_SEQUENCE_VALUE' ,'DOC_SEQUENCE_VALUE'
410: ,'arrx_rc_unapp.var.doc_sequence_value' ,'NUMBER');
411: fa_rx_util_pkg.assign_column('130','CR.DEPOSIT_DATE' ,'DEPOSIT_DATE'
412: ,'arrx_rc_unapp.var.deposit_date' ,'DATE');
413: fa_rx_util_pkg.assign_column('140','CR.RECEIPT_DATE' ,'RECEIPT_DATE'
414: ,'arrx_rc_unapp.var.receipt_date' ,'DATE');
415: fa_rx_util_pkg.assign_column('150',CR_STATUS_DECODE ,'RECEIPT_STATUS'
409: fa_rx_util_pkg.assign_column('120','CR.DOC_SEQUENCE_VALUE' ,'DOC_SEQUENCE_VALUE'
410: ,'arrx_rc_unapp.var.doc_sequence_value' ,'NUMBER');
411: fa_rx_util_pkg.assign_column('130','CR.DEPOSIT_DATE' ,'DEPOSIT_DATE'
412: ,'arrx_rc_unapp.var.deposit_date' ,'DATE');
413: fa_rx_util_pkg.assign_column('140','CR.RECEIPT_DATE' ,'RECEIPT_DATE'
414: ,'arrx_rc_unapp.var.receipt_date' ,'DATE');
415: fa_rx_util_pkg.assign_column('150',CR_STATUS_DECODE ,'RECEIPT_STATUS'
416: ,'arrx_rc_unapp.var.receipt_status' ,'VARCHAR2',40);
417: fa_rx_util_pkg.assign_column('160','ABB.BANK_NAME' ,'BANK_NAME'
411: fa_rx_util_pkg.assign_column('130','CR.DEPOSIT_DATE' ,'DEPOSIT_DATE'
412: ,'arrx_rc_unapp.var.deposit_date' ,'DATE');
413: fa_rx_util_pkg.assign_column('140','CR.RECEIPT_DATE' ,'RECEIPT_DATE'
414: ,'arrx_rc_unapp.var.receipt_date' ,'DATE');
415: fa_rx_util_pkg.assign_column('150',CR_STATUS_DECODE ,'RECEIPT_STATUS'
416: ,'arrx_rc_unapp.var.receipt_status' ,'VARCHAR2',40);
417: fa_rx_util_pkg.assign_column('160','ABB.BANK_NAME' ,'BANK_NAME'
418: ,'arrx_rc_unapp.var.bank_name' ,'VARCHAR2',60);
419: fa_rx_util_pkg.assign_column('170','ABB.BANK_NAME_ALT' ,'BANK_NAME_ALT'
413: fa_rx_util_pkg.assign_column('140','CR.RECEIPT_DATE' ,'RECEIPT_DATE'
414: ,'arrx_rc_unapp.var.receipt_date' ,'DATE');
415: fa_rx_util_pkg.assign_column('150',CR_STATUS_DECODE ,'RECEIPT_STATUS'
416: ,'arrx_rc_unapp.var.receipt_status' ,'VARCHAR2',40);
417: fa_rx_util_pkg.assign_column('160','ABB.BANK_NAME' ,'BANK_NAME'
418: ,'arrx_rc_unapp.var.bank_name' ,'VARCHAR2',60);
419: fa_rx_util_pkg.assign_column('170','ABB.BANK_NAME_ALT' ,'BANK_NAME_ALT'
420: ,'arrx_rc_unapp.var.bank_name_alt' ,'VARCHAR2',320);
421: fa_rx_util_pkg.assign_column('180','ABB.BANK_BRANCH_NAME' ,'BANK_BRANCH_NAME'
415: fa_rx_util_pkg.assign_column('150',CR_STATUS_DECODE ,'RECEIPT_STATUS'
416: ,'arrx_rc_unapp.var.receipt_status' ,'VARCHAR2',40);
417: fa_rx_util_pkg.assign_column('160','ABB.BANK_NAME' ,'BANK_NAME'
418: ,'arrx_rc_unapp.var.bank_name' ,'VARCHAR2',60);
419: fa_rx_util_pkg.assign_column('170','ABB.BANK_NAME_ALT' ,'BANK_NAME_ALT'
420: ,'arrx_rc_unapp.var.bank_name_alt' ,'VARCHAR2',320);
421: fa_rx_util_pkg.assign_column('180','ABB.BANK_BRANCH_NAME' ,'BANK_BRANCH_NAME'
422: ,'arrx_rc_unapp.var.bank_branch_name' ,'VARCHAR2',60);
423: fa_rx_util_pkg.assign_column('190','ABB.BANK_BRANCH_NAME_ALT' ,'BANK_BRANCH_NAME_ALT'
417: fa_rx_util_pkg.assign_column('160','ABB.BANK_NAME' ,'BANK_NAME'
418: ,'arrx_rc_unapp.var.bank_name' ,'VARCHAR2',60);
419: fa_rx_util_pkg.assign_column('170','ABB.BANK_NAME_ALT' ,'BANK_NAME_ALT'
420: ,'arrx_rc_unapp.var.bank_name_alt' ,'VARCHAR2',320);
421: fa_rx_util_pkg.assign_column('180','ABB.BANK_BRANCH_NAME' ,'BANK_BRANCH_NAME'
422: ,'arrx_rc_unapp.var.bank_branch_name' ,'VARCHAR2',60);
423: fa_rx_util_pkg.assign_column('190','ABB.BANK_BRANCH_NAME_ALT' ,'BANK_BRANCH_NAME_ALT'
424: ,'arrx_rc_unapp.var.bank_name_alt' ,'VARCHAR2',320);
425: fa_rx_util_pkg.assign_column('200','ABB.BANK_NUMBER' ,'BANK_NUMBER'
419: fa_rx_util_pkg.assign_column('170','ABB.BANK_NAME_ALT' ,'BANK_NAME_ALT'
420: ,'arrx_rc_unapp.var.bank_name_alt' ,'VARCHAR2',320);
421: fa_rx_util_pkg.assign_column('180','ABB.BANK_BRANCH_NAME' ,'BANK_BRANCH_NAME'
422: ,'arrx_rc_unapp.var.bank_branch_name' ,'VARCHAR2',60);
423: fa_rx_util_pkg.assign_column('190','ABB.BANK_BRANCH_NAME_ALT' ,'BANK_BRANCH_NAME_ALT'
424: ,'arrx_rc_unapp.var.bank_name_alt' ,'VARCHAR2',320);
425: fa_rx_util_pkg.assign_column('200','ABB.BANK_NUMBER' ,'BANK_NUMBER'
426: ,'arrx_rc_unapp.var.bank_number' ,'VARCHAR2',30);
427: fa_rx_util_pkg.assign_column('210','ABB.BRANCH_NUMBER' ,'BANK_BRANCH_NUMBER'
421: fa_rx_util_pkg.assign_column('180','ABB.BANK_BRANCH_NAME' ,'BANK_BRANCH_NAME'
422: ,'arrx_rc_unapp.var.bank_branch_name' ,'VARCHAR2',60);
423: fa_rx_util_pkg.assign_column('190','ABB.BANK_BRANCH_NAME_ALT' ,'BANK_BRANCH_NAME_ALT'
424: ,'arrx_rc_unapp.var.bank_name_alt' ,'VARCHAR2',320);
425: fa_rx_util_pkg.assign_column('200','ABB.BANK_NUMBER' ,'BANK_NUMBER'
426: ,'arrx_rc_unapp.var.bank_number' ,'VARCHAR2',30);
427: fa_rx_util_pkg.assign_column('210','ABB.BRANCH_NUMBER' ,'BANK_BRANCH_NUMBER'
428: ,'arrx_rc_unapp.var.bank_branch_number' ,'VARCHAR2',25);
429: fa_rx_util_pkg.assign_column('220','ABA.BANK_ACCOUNT_NAME' ,'BANK_ACCOUNT_NAME'
423: fa_rx_util_pkg.assign_column('190','ABB.BANK_BRANCH_NAME_ALT' ,'BANK_BRANCH_NAME_ALT'
424: ,'arrx_rc_unapp.var.bank_name_alt' ,'VARCHAR2',320);
425: fa_rx_util_pkg.assign_column('200','ABB.BANK_NUMBER' ,'BANK_NUMBER'
426: ,'arrx_rc_unapp.var.bank_number' ,'VARCHAR2',30);
427: fa_rx_util_pkg.assign_column('210','ABB.BRANCH_NUMBER' ,'BANK_BRANCH_NUMBER'
428: ,'arrx_rc_unapp.var.bank_branch_number' ,'VARCHAR2',25);
429: fa_rx_util_pkg.assign_column('220','ABA.BANK_ACCOUNT_NAME' ,'BANK_ACCOUNT_NAME'
430: ,'arrx_rc_unapp.var.bank_account_name' ,'VARCHAR2', 80);
431: fa_rx_util_pkg.assign_column('230','ABA.BANK_ACCOUNT_NAME_ALT', 'BANK_ACCOUNT_NAME_ALT'
425: fa_rx_util_pkg.assign_column('200','ABB.BANK_NUMBER' ,'BANK_NUMBER'
426: ,'arrx_rc_unapp.var.bank_number' ,'VARCHAR2',30);
427: fa_rx_util_pkg.assign_column('210','ABB.BRANCH_NUMBER' ,'BANK_BRANCH_NUMBER'
428: ,'arrx_rc_unapp.var.bank_branch_number' ,'VARCHAR2',25);
429: fa_rx_util_pkg.assign_column('220','ABA.BANK_ACCOUNT_NAME' ,'BANK_ACCOUNT_NAME'
430: ,'arrx_rc_unapp.var.bank_account_name' ,'VARCHAR2', 80);
431: fa_rx_util_pkg.assign_column('230','ABA.BANK_ACCOUNT_NAME_ALT', 'BANK_ACCOUNT_NAME_ALT'
432: ,'arrx_rc_unapp.var.bank_account_name_alt' ,'VARCHAR2', 320);
433: fa_rx_util_pkg.assign_column('240','ABA.CURRENCY_CODE' ,'BANK_ACCOUNT_CURRENCY'
427: fa_rx_util_pkg.assign_column('210','ABB.BRANCH_NUMBER' ,'BANK_BRANCH_NUMBER'
428: ,'arrx_rc_unapp.var.bank_branch_number' ,'VARCHAR2',25);
429: fa_rx_util_pkg.assign_column('220','ABA.BANK_ACCOUNT_NAME' ,'BANK_ACCOUNT_NAME'
430: ,'arrx_rc_unapp.var.bank_account_name' ,'VARCHAR2', 80);
431: fa_rx_util_pkg.assign_column('230','ABA.BANK_ACCOUNT_NAME_ALT', 'BANK_ACCOUNT_NAME_ALT'
432: ,'arrx_rc_unapp.var.bank_account_name_alt' ,'VARCHAR2', 320);
433: fa_rx_util_pkg.assign_column('240','ABA.CURRENCY_CODE' ,'BANK_ACCOUNT_CURRENCY'
434: ,'arrx_rc_unapp.var.bank_account_currency' ,'VARCHAR2',15);
435: fa_rx_util_pkg.assign_column('250','ARM.NAME' ,'RECEIPT_METHOD'
429: fa_rx_util_pkg.assign_column('220','ABA.BANK_ACCOUNT_NAME' ,'BANK_ACCOUNT_NAME'
430: ,'arrx_rc_unapp.var.bank_account_name' ,'VARCHAR2', 80);
431: fa_rx_util_pkg.assign_column('230','ABA.BANK_ACCOUNT_NAME_ALT', 'BANK_ACCOUNT_NAME_ALT'
432: ,'arrx_rc_unapp.var.bank_account_name_alt' ,'VARCHAR2', 320);
433: fa_rx_util_pkg.assign_column('240','ABA.CURRENCY_CODE' ,'BANK_ACCOUNT_CURRENCY'
434: ,'arrx_rc_unapp.var.bank_account_currency' ,'VARCHAR2',15);
435: fa_rx_util_pkg.assign_column('250','ARM.NAME' ,'RECEIPT_METHOD'
436: ,'arrx_rc_unapp.var.receipt_method' ,'VARCHAR2',30);
437: fa_rx_util_pkg.assign_column('260','CRH.CASH_RECEIPT_HISTORY_ID','CASH_RECEIPT_HISTORY_ID'
431: fa_rx_util_pkg.assign_column('230','ABA.BANK_ACCOUNT_NAME_ALT', 'BANK_ACCOUNT_NAME_ALT'
432: ,'arrx_rc_unapp.var.bank_account_name_alt' ,'VARCHAR2', 320);
433: fa_rx_util_pkg.assign_column('240','ABA.CURRENCY_CODE' ,'BANK_ACCOUNT_CURRENCY'
434: ,'arrx_rc_unapp.var.bank_account_currency' ,'VARCHAR2',15);
435: fa_rx_util_pkg.assign_column('250','ARM.NAME' ,'RECEIPT_METHOD'
436: ,'arrx_rc_unapp.var.receipt_method' ,'VARCHAR2',30);
437: fa_rx_util_pkg.assign_column('260','CRH.CASH_RECEIPT_HISTORY_ID','CASH_RECEIPT_HISTORY_ID'
438: ,'arrx_rc_unapp.var.cash_receipt_history_id' ,'NUMBER');
439: fa_rx_util_pkg.assign_column('270','MAX(RA.GL_DATE)' ,'GL_DATE'
433: fa_rx_util_pkg.assign_column('240','ABA.CURRENCY_CODE' ,'BANK_ACCOUNT_CURRENCY'
434: ,'arrx_rc_unapp.var.bank_account_currency' ,'VARCHAR2',15);
435: fa_rx_util_pkg.assign_column('250','ARM.NAME' ,'RECEIPT_METHOD'
436: ,'arrx_rc_unapp.var.receipt_method' ,'VARCHAR2',30);
437: fa_rx_util_pkg.assign_column('260','CRH.CASH_RECEIPT_HISTORY_ID','CASH_RECEIPT_HISTORY_ID'
438: ,'arrx_rc_unapp.var.cash_receipt_history_id' ,'NUMBER');
439: fa_rx_util_pkg.assign_column('270','MAX(RA.GL_DATE)' ,'GL_DATE'
440: ,'arrx_rc_unapp.var.gl_date' ,'DATE');
441: fa_rx_util_pkg.assign_column('280','CRH_CURR.AMOUNT' ,'RECEIPT_AMOUNT'
435: fa_rx_util_pkg.assign_column('250','ARM.NAME' ,'RECEIPT_METHOD'
436: ,'arrx_rc_unapp.var.receipt_method' ,'VARCHAR2',30);
437: fa_rx_util_pkg.assign_column('260','CRH.CASH_RECEIPT_HISTORY_ID','CASH_RECEIPT_HISTORY_ID'
438: ,'arrx_rc_unapp.var.cash_receipt_history_id' ,'NUMBER');
439: fa_rx_util_pkg.assign_column('270','MAX(RA.GL_DATE)' ,'GL_DATE'
440: ,'arrx_rc_unapp.var.gl_date' ,'DATE');
441: fa_rx_util_pkg.assign_column('280','CRH_CURR.AMOUNT' ,'RECEIPT_AMOUNT'
442: ,'arrx_rc_unapp.var.receipt_amount' ,'NUMBER');
443: fa_rx_util_pkg.assign_column('290','CRH_CURR.ACCTD_AMOUNT' ,'ACCTD_RECEIPT_AMOUNT'
437: fa_rx_util_pkg.assign_column('260','CRH.CASH_RECEIPT_HISTORY_ID','CASH_RECEIPT_HISTORY_ID'
438: ,'arrx_rc_unapp.var.cash_receipt_history_id' ,'NUMBER');
439: fa_rx_util_pkg.assign_column('270','MAX(RA.GL_DATE)' ,'GL_DATE'
440: ,'arrx_rc_unapp.var.gl_date' ,'DATE');
441: fa_rx_util_pkg.assign_column('280','CRH_CURR.AMOUNT' ,'RECEIPT_AMOUNT'
442: ,'arrx_rc_unapp.var.receipt_amount' ,'NUMBER');
443: fa_rx_util_pkg.assign_column('290','CRH_CURR.ACCTD_AMOUNT' ,'ACCTD_RECEIPT_AMOUNT'
444: ,'arrx_rc_unapp.var.acctd_receipt_amount' ,'NUMBER');
445: fa_rx_util_pkg.assign_column('300','CRH_CURR.FACTOR_DISCOUNT_AMOUNT','FACTOR_DISCOUNT_AMOUNT'
439: fa_rx_util_pkg.assign_column('270','MAX(RA.GL_DATE)' ,'GL_DATE'
440: ,'arrx_rc_unapp.var.gl_date' ,'DATE');
441: fa_rx_util_pkg.assign_column('280','CRH_CURR.AMOUNT' ,'RECEIPT_AMOUNT'
442: ,'arrx_rc_unapp.var.receipt_amount' ,'NUMBER');
443: fa_rx_util_pkg.assign_column('290','CRH_CURR.ACCTD_AMOUNT' ,'ACCTD_RECEIPT_AMOUNT'
444: ,'arrx_rc_unapp.var.acctd_receipt_amount' ,'NUMBER');
445: fa_rx_util_pkg.assign_column('300','CRH_CURR.FACTOR_DISCOUNT_AMOUNT','FACTOR_DISCOUNT_AMOUNT'
446: ,'arrx_rc_unapp.var.factor_discount_amount' ,'NUMBER');
447: fa_rx_util_pkg.assign_column('310','CRH_CURR.ACCTD_FACTOR_DISCOUNT_AMOUNT','ACCTD_FACTOR_DISCOUNT_AMOUNT'
441: fa_rx_util_pkg.assign_column('280','CRH_CURR.AMOUNT' ,'RECEIPT_AMOUNT'
442: ,'arrx_rc_unapp.var.receipt_amount' ,'NUMBER');
443: fa_rx_util_pkg.assign_column('290','CRH_CURR.ACCTD_AMOUNT' ,'ACCTD_RECEIPT_AMOUNT'
444: ,'arrx_rc_unapp.var.acctd_receipt_amount' ,'NUMBER');
445: fa_rx_util_pkg.assign_column('300','CRH_CURR.FACTOR_DISCOUNT_AMOUNT','FACTOR_DISCOUNT_AMOUNT'
446: ,'arrx_rc_unapp.var.factor_discount_amount' ,'NUMBER');
447: fa_rx_util_pkg.assign_column('310','CRH_CURR.ACCTD_FACTOR_DISCOUNT_AMOUNT','ACCTD_FACTOR_DISCOUNT_AMOUNT'
448: ,'arrx_rc_unapp.var.acctd_factor_discount_amount' ,'NUMBER');
449: fa_rx_util_pkg.assign_column('320',CRH_STATUS_DECODE ,'RECEIPT_HISTORY_STATUS'
443: fa_rx_util_pkg.assign_column('290','CRH_CURR.ACCTD_AMOUNT' ,'ACCTD_RECEIPT_AMOUNT'
444: ,'arrx_rc_unapp.var.acctd_receipt_amount' ,'NUMBER');
445: fa_rx_util_pkg.assign_column('300','CRH_CURR.FACTOR_DISCOUNT_AMOUNT','FACTOR_DISCOUNT_AMOUNT'
446: ,'arrx_rc_unapp.var.factor_discount_amount' ,'NUMBER');
447: fa_rx_util_pkg.assign_column('310','CRH_CURR.ACCTD_FACTOR_DISCOUNT_AMOUNT','ACCTD_FACTOR_DISCOUNT_AMOUNT'
448: ,'arrx_rc_unapp.var.acctd_factor_discount_amount' ,'NUMBER');
449: fa_rx_util_pkg.assign_column('320',CRH_STATUS_DECODE ,'RECEIPT_HISTORY_STATUS'
450: ,'arrx_rc_unapp.var.receipt_history_status' ,'VARCHAR2', 40);
451: fa_rx_util_pkg.assign_column('330','CUST.CUST_ACCOUNT_ID' ,'CUSTOMER_ID'
445: fa_rx_util_pkg.assign_column('300','CRH_CURR.FACTOR_DISCOUNT_AMOUNT','FACTOR_DISCOUNT_AMOUNT'
446: ,'arrx_rc_unapp.var.factor_discount_amount' ,'NUMBER');
447: fa_rx_util_pkg.assign_column('310','CRH_CURR.ACCTD_FACTOR_DISCOUNT_AMOUNT','ACCTD_FACTOR_DISCOUNT_AMOUNT'
448: ,'arrx_rc_unapp.var.acctd_factor_discount_amount' ,'NUMBER');
449: fa_rx_util_pkg.assign_column('320',CRH_STATUS_DECODE ,'RECEIPT_HISTORY_STATUS'
450: ,'arrx_rc_unapp.var.receipt_history_status' ,'VARCHAR2', 40);
451: fa_rx_util_pkg.assign_column('330','CUST.CUST_ACCOUNT_ID' ,'CUSTOMER_ID'
452: ,'arrx_rc_unapp.var.customer_id' ,'NUMBER');
453: fa_rx_util_pkg.assign_column('340','NVL(SUBSTRB(PARTY.PARTY_NAME,1,50),:L_UNID_CUST)', 'CUSTOMER_NAME'
447: fa_rx_util_pkg.assign_column('310','CRH_CURR.ACCTD_FACTOR_DISCOUNT_AMOUNT','ACCTD_FACTOR_DISCOUNT_AMOUNT'
448: ,'arrx_rc_unapp.var.acctd_factor_discount_amount' ,'NUMBER');
449: fa_rx_util_pkg.assign_column('320',CRH_STATUS_DECODE ,'RECEIPT_HISTORY_STATUS'
450: ,'arrx_rc_unapp.var.receipt_history_status' ,'VARCHAR2', 40);
451: fa_rx_util_pkg.assign_column('330','CUST.CUST_ACCOUNT_ID' ,'CUSTOMER_ID'
452: ,'arrx_rc_unapp.var.customer_id' ,'NUMBER');
453: fa_rx_util_pkg.assign_column('340','NVL(SUBSTRB(PARTY.PARTY_NAME,1,50),:L_UNID_CUST)', 'CUSTOMER_NAME'
454: ,'arrx_rc_unapp.var.customer_name' ,'VARCHAR2', 50);
455: fa_rx_util_pkg.assign_column('350','DECODE(PARTY.PARTY_TYPE, ''ORGANIZATION'',PARTY.ORGANIZATION_NAME_PHONETIC, NULL)' ,'CUSTOMER_NAME_ALT'
449: fa_rx_util_pkg.assign_column('320',CRH_STATUS_DECODE ,'RECEIPT_HISTORY_STATUS'
450: ,'arrx_rc_unapp.var.receipt_history_status' ,'VARCHAR2', 40);
451: fa_rx_util_pkg.assign_column('330','CUST.CUST_ACCOUNT_ID' ,'CUSTOMER_ID'
452: ,'arrx_rc_unapp.var.customer_id' ,'NUMBER');
453: fa_rx_util_pkg.assign_column('340','NVL(SUBSTRB(PARTY.PARTY_NAME,1,50),:L_UNID_CUST)', 'CUSTOMER_NAME'
454: ,'arrx_rc_unapp.var.customer_name' ,'VARCHAR2', 50);
455: fa_rx_util_pkg.assign_column('350','DECODE(PARTY.PARTY_TYPE, ''ORGANIZATION'',PARTY.ORGANIZATION_NAME_PHONETIC, NULL)' ,'CUSTOMER_NAME_ALT'
456: ,'arrx_rc_unapp.var.customer_name_alt' ,'VARCHAR2',320);
457: fa_rx_util_pkg.assign_column('360','CUST.ACCOUNT_NUMBER' ,'CUSTOMER_NUMBER'
451: fa_rx_util_pkg.assign_column('330','CUST.CUST_ACCOUNT_ID' ,'CUSTOMER_ID'
452: ,'arrx_rc_unapp.var.customer_id' ,'NUMBER');
453: fa_rx_util_pkg.assign_column('340','NVL(SUBSTRB(PARTY.PARTY_NAME,1,50),:L_UNID_CUST)', 'CUSTOMER_NAME'
454: ,'arrx_rc_unapp.var.customer_name' ,'VARCHAR2', 50);
455: fa_rx_util_pkg.assign_column('350','DECODE(PARTY.PARTY_TYPE, ''ORGANIZATION'',PARTY.ORGANIZATION_NAME_PHONETIC, NULL)' ,'CUSTOMER_NAME_ALT'
456: ,'arrx_rc_unapp.var.customer_name_alt' ,'VARCHAR2',320);
457: fa_rx_util_pkg.assign_column('360','CUST.ACCOUNT_NUMBER' ,'CUSTOMER_NUMBER'
458: ,'arrx_rc_unapp.var.customer_number' ,'VARCHAR2', 30);
459: fa_rx_util_pkg.assign_column('370','BS.NAME' ,'BATCH_SOURCE'
453: fa_rx_util_pkg.assign_column('340','NVL(SUBSTRB(PARTY.PARTY_NAME,1,50),:L_UNID_CUST)', 'CUSTOMER_NAME'
454: ,'arrx_rc_unapp.var.customer_name' ,'VARCHAR2', 50);
455: fa_rx_util_pkg.assign_column('350','DECODE(PARTY.PARTY_TYPE, ''ORGANIZATION'',PARTY.ORGANIZATION_NAME_PHONETIC, NULL)' ,'CUSTOMER_NAME_ALT'
456: ,'arrx_rc_unapp.var.customer_name_alt' ,'VARCHAR2',320);
457: fa_rx_util_pkg.assign_column('360','CUST.ACCOUNT_NUMBER' ,'CUSTOMER_NUMBER'
458: ,'arrx_rc_unapp.var.customer_number' ,'VARCHAR2', 30);
459: fa_rx_util_pkg.assign_column('370','BS.NAME' ,'BATCH_SOURCE'
460: ,'arrx_rc_unapp.var.batch_source' ,'VARCHAR2',30);
461: fa_rx_util_pkg.assign_column('380',ON_ACC_AMT_DECODE ,'ON_ACCOUNT_AMOUNT'
455: fa_rx_util_pkg.assign_column('350','DECODE(PARTY.PARTY_TYPE, ''ORGANIZATION'',PARTY.ORGANIZATION_NAME_PHONETIC, NULL)' ,'CUSTOMER_NAME_ALT'
456: ,'arrx_rc_unapp.var.customer_name_alt' ,'VARCHAR2',320);
457: fa_rx_util_pkg.assign_column('360','CUST.ACCOUNT_NUMBER' ,'CUSTOMER_NUMBER'
458: ,'arrx_rc_unapp.var.customer_number' ,'VARCHAR2', 30);
459: fa_rx_util_pkg.assign_column('370','BS.NAME' ,'BATCH_SOURCE'
460: ,'arrx_rc_unapp.var.batch_source' ,'VARCHAR2',30);
461: fa_rx_util_pkg.assign_column('380',ON_ACC_AMT_DECODE ,'ON_ACCOUNT_AMOUNT'
462: ,'arrx_rc_unapp.var.on_acc_amount' ,'NUMBER');
463: fa_rx_util_pkg.assign_column('390',UNAPP_AMT_DECODE ,'UNAPP_AMOUNT'
457: fa_rx_util_pkg.assign_column('360','CUST.ACCOUNT_NUMBER' ,'CUSTOMER_NUMBER'
458: ,'arrx_rc_unapp.var.customer_number' ,'VARCHAR2', 30);
459: fa_rx_util_pkg.assign_column('370','BS.NAME' ,'BATCH_SOURCE'
460: ,'arrx_rc_unapp.var.batch_source' ,'VARCHAR2',30);
461: fa_rx_util_pkg.assign_column('380',ON_ACC_AMT_DECODE ,'ON_ACCOUNT_AMOUNT'
462: ,'arrx_rc_unapp.var.on_acc_amount' ,'NUMBER');
463: fa_rx_util_pkg.assign_column('390',UNAPP_AMT_DECODE ,'UNAPP_AMOUNT'
464: ,'arrx_rc_unapp.var.unapp_amount' ,'NUMBER');
465: fa_rx_util_pkg.assign_column('400',CLAIM_AMT_DECODE ,'CLAIM_AMOUNT'
459: fa_rx_util_pkg.assign_column('370','BS.NAME' ,'BATCH_SOURCE'
460: ,'arrx_rc_unapp.var.batch_source' ,'VARCHAR2',30);
461: fa_rx_util_pkg.assign_column('380',ON_ACC_AMT_DECODE ,'ON_ACCOUNT_AMOUNT'
462: ,'arrx_rc_unapp.var.on_acc_amount' ,'NUMBER');
463: fa_rx_util_pkg.assign_column('390',UNAPP_AMT_DECODE ,'UNAPP_AMOUNT'
464: ,'arrx_rc_unapp.var.unapp_amount' ,'NUMBER');
465: fa_rx_util_pkg.assign_column('400',CLAIM_AMT_DECODE ,'CLAIM_AMOUNT'
466: ,'arrx_rc_unapp.var.claim_amount' ,'NUMBER');
467: fa_rx_util_pkg.assign_column('410',PREPAY_AMT_DECODE ,'PREPAY_AMOUNT'
461: fa_rx_util_pkg.assign_column('380',ON_ACC_AMT_DECODE ,'ON_ACCOUNT_AMOUNT'
462: ,'arrx_rc_unapp.var.on_acc_amount' ,'NUMBER');
463: fa_rx_util_pkg.assign_column('390',UNAPP_AMT_DECODE ,'UNAPP_AMOUNT'
464: ,'arrx_rc_unapp.var.unapp_amount' ,'NUMBER');
465: fa_rx_util_pkg.assign_column('400',CLAIM_AMT_DECODE ,'CLAIM_AMOUNT'
466: ,'arrx_rc_unapp.var.claim_amount' ,'NUMBER');
467: fa_rx_util_pkg.assign_column('410',PREPAY_AMT_DECODE ,'PREPAY_AMOUNT'
468: ,'arrx_rc_unapp.var.prepay_amount' ,'NUMBER');
469: fa_rx_util_pkg.assign_column('420',TOTAL_UNRESOLVED_AMT_DECODE,'TOTAL_UNRESOLVED_AMOUNT'
463: fa_rx_util_pkg.assign_column('390',UNAPP_AMT_DECODE ,'UNAPP_AMOUNT'
464: ,'arrx_rc_unapp.var.unapp_amount' ,'NUMBER');
465: fa_rx_util_pkg.assign_column('400',CLAIM_AMT_DECODE ,'CLAIM_AMOUNT'
466: ,'arrx_rc_unapp.var.claim_amount' ,'NUMBER');
467: fa_rx_util_pkg.assign_column('410',PREPAY_AMT_DECODE ,'PREPAY_AMOUNT'
468: ,'arrx_rc_unapp.var.prepay_amount' ,'NUMBER');
469: fa_rx_util_pkg.assign_column('420',TOTAL_UNRESOLVED_AMT_DECODE,'TOTAL_UNRESOLVED_AMOUNT'
470: ,'arrx_rc_unapp.var.total_unresolved_amount' ,'NUMBER');
471: fa_rx_util_pkg.assign_column('430',FORMAT_CURRENCY_DECODE ,'FORMAT_CURRENCY_CODE'
465: fa_rx_util_pkg.assign_column('400',CLAIM_AMT_DECODE ,'CLAIM_AMOUNT'
466: ,'arrx_rc_unapp.var.claim_amount' ,'NUMBER');
467: fa_rx_util_pkg.assign_column('410',PREPAY_AMT_DECODE ,'PREPAY_AMOUNT'
468: ,'arrx_rc_unapp.var.prepay_amount' ,'NUMBER');
469: fa_rx_util_pkg.assign_column('420',TOTAL_UNRESOLVED_AMT_DECODE,'TOTAL_UNRESOLVED_AMOUNT'
470: ,'arrx_rc_unapp.var.total_unresolved_amount' ,'NUMBER');
471: fa_rx_util_pkg.assign_column('430',FORMAT_CURRENCY_DECODE ,'FORMAT_CURRENCY_CODE'
472: ,'arrx_rc_unapp.var.format_currency_code' ,'VARCHAR2',15);
473: fa_rx_util_pkg.assign_column('440','MAX(GC.CODE_COMBINATION_ID)' ,'ACCOUNT_CODE_COMBINATION_ID'
467: fa_rx_util_pkg.assign_column('410',PREPAY_AMT_DECODE ,'PREPAY_AMOUNT'
468: ,'arrx_rc_unapp.var.prepay_amount' ,'NUMBER');
469: fa_rx_util_pkg.assign_column('420',TOTAL_UNRESOLVED_AMT_DECODE,'TOTAL_UNRESOLVED_AMOUNT'
470: ,'arrx_rc_unapp.var.total_unresolved_amount' ,'NUMBER');
471: fa_rx_util_pkg.assign_column('430',FORMAT_CURRENCY_DECODE ,'FORMAT_CURRENCY_CODE'
472: ,'arrx_rc_unapp.var.format_currency_code' ,'VARCHAR2',15);
473: fa_rx_util_pkg.assign_column('440','MAX(GC.CODE_COMBINATION_ID)' ,'ACCOUNT_CODE_COMBINATION_ID'
474: ,'arrx_rc_unapp.var.account_code_combination_id' ,'NUMBER');
475: fa_rx_util_pkg.assign_column('450',NULL ,'DEBIT_BALANCING'
469: fa_rx_util_pkg.assign_column('420',TOTAL_UNRESOLVED_AMT_DECODE,'TOTAL_UNRESOLVED_AMOUNT'
470: ,'arrx_rc_unapp.var.total_unresolved_amount' ,'NUMBER');
471: fa_rx_util_pkg.assign_column('430',FORMAT_CURRENCY_DECODE ,'FORMAT_CURRENCY_CODE'
472: ,'arrx_rc_unapp.var.format_currency_code' ,'VARCHAR2',15);
473: fa_rx_util_pkg.assign_column('440','MAX(GC.CODE_COMBINATION_ID)' ,'ACCOUNT_CODE_COMBINATION_ID'
474: ,'arrx_rc_unapp.var.account_code_combination_id' ,'NUMBER');
475: fa_rx_util_pkg.assign_column('450',NULL ,'DEBIT_BALANCING'
476: ,'arrx_rc_unapp.var.debit_balancing' ,'VARCHAR2',240);
477: fa_rx_util_pkg.assign_column('460',APP_AMT_DECODE,'AMOUNT_APPLIED'
471: fa_rx_util_pkg.assign_column('430',FORMAT_CURRENCY_DECODE ,'FORMAT_CURRENCY_CODE'
472: ,'arrx_rc_unapp.var.format_currency_code' ,'VARCHAR2',15);
473: fa_rx_util_pkg.assign_column('440','MAX(GC.CODE_COMBINATION_ID)' ,'ACCOUNT_CODE_COMBINATION_ID'
474: ,'arrx_rc_unapp.var.account_code_combination_id' ,'NUMBER');
475: fa_rx_util_pkg.assign_column('450',NULL ,'DEBIT_BALANCING'
476: ,'arrx_rc_unapp.var.debit_balancing' ,'VARCHAR2',240);
477: fa_rx_util_pkg.assign_column('460',APP_AMT_DECODE,'AMOUNT_APPLIED'
478: ,'arrx_rc_unapp.var.app_amount' ,'NUMBER');
479:
473: fa_rx_util_pkg.assign_column('440','MAX(GC.CODE_COMBINATION_ID)' ,'ACCOUNT_CODE_COMBINATION_ID'
474: ,'arrx_rc_unapp.var.account_code_combination_id' ,'NUMBER');
475: fa_rx_util_pkg.assign_column('450',NULL ,'DEBIT_BALANCING'
476: ,'arrx_rc_unapp.var.debit_balancing' ,'VARCHAR2',240);
477: fa_rx_util_pkg.assign_column('460',APP_AMT_DECODE,'AMOUNT_APPLIED'
478: ,'arrx_rc_unapp.var.app_amount' ,'NUMBER');
479:
480:
481: /* Assign the From Clause */
478: ,'arrx_rc_unapp.var.app_amount' ,'NUMBER');
479:
480:
481: /* Assign the From Clause */
482: fa_rx_util_pkg.debug(' Assigning the FROM CLAUSE');
483:
484: IF NVL(var.ca_sob_type,'P') = 'P' THEN
485: fa_rx_util_pkg.debug(' Report is run for Primary Set of Books');
486: fa_rx_util_pkg.From_Clause := '
481: /* Assign the From Clause */
482: fa_rx_util_pkg.debug(' Assigning the FROM CLAUSE');
483:
484: IF NVL(var.ca_sob_type,'P') = 'P' THEN
485: fa_rx_util_pkg.debug(' Report is run for Primary Set of Books');
486: fa_rx_util_pkg.From_Clause := '
487: AR_CASH_RECEIPTS_ALL CR,
488: FND_DOCUMENT_SEQUENCES DOCSEQ,
489: -- AP_BANK_ACCOUNTS_ALL ABA,
482: fa_rx_util_pkg.debug(' Assigning the FROM CLAUSE');
483:
484: IF NVL(var.ca_sob_type,'P') = 'P' THEN
485: fa_rx_util_pkg.debug(' Report is run for Primary Set of Books');
486: fa_rx_util_pkg.From_Clause := '
487: AR_CASH_RECEIPTS_ALL CR,
488: FND_DOCUMENT_SEQUENCES DOCSEQ,
489: -- AP_BANK_ACCOUNTS_ALL ABA,
490: -- AP_BANK_BRANCHES ABB,
501: AR_BATCH_SOURCES_ALL BS,
502: AR_RECEIVABLE_APPLICATIONS_ALL RA,
503: AR_PAYMENT_SCHEDULES_ALL PS';
504: ELSE
505: fa_rx_util_pkg.debug(' Report is run for Reporting Set of Books');
506: fa_rx_util_pkg.From_Clause := '
507: AR_CASH_RECEIPTS_ALL_MRC_V CR,
508: FND_DOCUMENT_SEQUENCES DOCSEQ,
509: -- AP_BANK_ACCOUNTS_ALL ABA,
502: AR_RECEIVABLE_APPLICATIONS_ALL RA,
503: AR_PAYMENT_SCHEDULES_ALL PS';
504: ELSE
505: fa_rx_util_pkg.debug(' Report is run for Reporting Set of Books');
506: fa_rx_util_pkg.From_Clause := '
507: AR_CASH_RECEIPTS_ALL_MRC_V CR,
508: FND_DOCUMENT_SEQUENCES DOCSEQ,
509: -- AP_BANK_ACCOUNTS_ALL ABA,
510: CE_BANK_ACCT_USES_ALL USES,
521: AR_RECEIVABLE_APPS_ALL_MRC_V RA,
522: AR_PAYMENT_SCHEDULES_ALL_MRC_V PS';
523: END IF;
524:
525: fa_rx_util_pkg.debug('Assigning the Where Clause ');
526: fa_rx_util_pkg.Where_Clause := '
527: NVL(RA.CONFIRMED_FLAG,''Y'') = ''Y''
528: AND RA.STATUS IN (''UNAPP'',''ACC'',''UNID'',''OTHER ACC'',''APP'')
529: AND PS.CASH_RECEIPT_ID = RA.CASH_RECEIPT_ID
522: AR_PAYMENT_SCHEDULES_ALL_MRC_V PS';
523: END IF;
524:
525: fa_rx_util_pkg.debug('Assigning the Where Clause ');
526: fa_rx_util_pkg.Where_Clause := '
527: NVL(RA.CONFIRMED_FLAG,''Y'') = ''Y''
528: AND RA.STATUS IN (''UNAPP'',''ACC'',''UNID'',''OTHER ACC'',''APP'')
529: AND PS.CASH_RECEIPT_ID = RA.CASH_RECEIPT_ID
530: AND PS.CLASS = ''PMT''
559: '||L_RA_ORG_WHERE||'
560: '||L_PS_ORG_WHERE||'
561: '||CO_SEG_WHERE||' '||GL_DATE_WHERE||' '||CURRENCY_CODE_WHERE||' '||BATCH_NAME_WHERE||' '||BATCH_SRC_NAME_WHERE||' '||CUSTOMER_NAME_WHERE||' '||CUSTOMER_NUMBER_WHERE||' '||RECEIPT_NUMBER_WHERE;
562:
563: fa_rx_util_pkg.debug('Assigning the Group By Clause ');
564: fa_rx_util_pkg.Group_By_Clause := '
565: BAT.BATCH_ID,
566: BAT.NAME,
567: CR.CASH_RECEIPT_ID,
560: '||L_PS_ORG_WHERE||'
561: '||CO_SEG_WHERE||' '||GL_DATE_WHERE||' '||CURRENCY_CODE_WHERE||' '||BATCH_NAME_WHERE||' '||BATCH_SRC_NAME_WHERE||' '||CUSTOMER_NAME_WHERE||' '||CUSTOMER_NUMBER_WHERE||' '||RECEIPT_NUMBER_WHERE;
562:
563: fa_rx_util_pkg.debug('Assigning the Group By Clause ');
564: fa_rx_util_pkg.Group_By_Clause := '
565: BAT.BATCH_ID,
566: BAT.NAME,
567: CR.CASH_RECEIPT_ID,
568: CR.RECEIPT_NUMBER,
598: CUST.ACCOUNT_NUMBER,
599: BS.NAME, '||
600: FORMAT_CURRENCY_DECODE;
601:
602: fa_rx_util_pkg.debug('Assigning the Having Clause ');
603: fa_rx_util_pkg.Having_Clause :=
604: ON_ACC_AMT_DECODE ||' <> 0
605: OR ' || UNAPP_AMT_DECODE ||' <> 0
606: OR ' || CLAIM_AMT_DECODE ||' <> 0
599: BS.NAME, '||
600: FORMAT_CURRENCY_DECODE;
601:
602: fa_rx_util_pkg.debug('Assigning the Having Clause ');
603: fa_rx_util_pkg.Having_Clause :=
604: ON_ACC_AMT_DECODE ||' <> 0
605: OR ' || UNAPP_AMT_DECODE ||' <> 0
606: OR ' || CLAIM_AMT_DECODE ||' <> 0
607: OR ' || PREPAY_AMT_DECODE||' <> 0 ';
607: OR ' || PREPAY_AMT_DECODE||' <> 0 ';
608:
609:
610:
611: fa_rx_util_pkg.debug('arrx_rc_unapp.before_report()-');
612:
613:
614: END before_report;
615:
626: l_unapp VARCHAR2(80);
627: l_unid VARCHAR2(80);
628: l_unid_cust VARCHAR2(80);
629: begin
630: fa_rx_util_pkg.debug('arrx_rc_unapp.bind()+');
631:
632: IF var.p_gl_date_from IS NOT NULL THEN
633: dbms_sql.bind_variable(c, 'p_gl_date_from', var.p_gl_date_from);
634: END IF;
712: dbms_sql.bind_variable(c, 'L_CONFIRMED' , L_CONFIRMED);
713: dbms_sql.bind_variable(c, 'L_REMITTED' , L_REMITTED);
714: dbms_sql.bind_variable(c, 'L_REVERSED' , L_REVERSED);
715:
716: fa_rx_util_pkg.debug('arrx_rc_unapp.bind()-');
717:
718: END bind;
719: PROCEDURE after_fetch IS
720: begin
717:
718: END bind;
719: PROCEDURE after_fetch IS
720: begin
721: fa_rx_util_pkg.debug('arrx_rc_unapp.after_fetch()+');
722:
723: var.debit_balancing := fa_rx_flex_pkg.get_value(
724: p_application_id => 101,
725: p_id_flex_code => 'GL#',
728: p_ccid => var.account_code_combination_id);
729:
730:
731:
732: fa_rx_util_pkg.debug('arrx_rc_unapp.after_fetch()-');
733: end after_fetch;
734:
735: END ARRX_RC_UNAPP;