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);
186: L_RA_ORG_WHERE VARCHAR2(4000);
187: L_PS_ORG_WHERE VARCHAR2(4000);
188: BEGIN
189:
190: fa_rx_util_pkg.debug('arrx_rc_unapp.before_report()+');
191:
192: fa_rx_util_pkg.debug('Set of Books ID : '||var.p_sob_id);
193: fa_rx_util_pkg.debug('Get Chart of Accounts ID ');
194:
188: BEGIN
189:
190: fa_rx_util_pkg.debug('arrx_rc_unapp.before_report()+');
191:
192: fa_rx_util_pkg.debug('Set of Books ID : '||var.p_sob_id);
193: fa_rx_util_pkg.debug('Get Chart of Accounts ID ');
194:
195: select CHART_OF_ACCOUNTS_ID,CURRENCY_CODE,NAME
196: into var.p_coa_id,var.functional_currency_code,var.organization_name
189:
190: fa_rx_util_pkg.debug('arrx_rc_unapp.before_report()+');
191:
192: fa_rx_util_pkg.debug('Set of Books ID : '||var.p_sob_id);
193: fa_rx_util_pkg.debug('Get Chart of Accounts ID ');
194:
195: select CHART_OF_ACCOUNTS_ID,CURRENCY_CODE,NAME
196: into var.p_coa_id,var.functional_currency_code,var.organization_name
197: from GL_SETS_OF_BOOKS
196: into var.p_coa_id,var.functional_currency_code,var.organization_name
197: from GL_SETS_OF_BOOKS
198: where SET_OF_BOOKS_ID = var.p_sob_id;
199:
200: fa_rx_util_pkg.debug('Chart of Accounts ID : '||var.p_coa_id);
201: fa_rx_util_pkg.debug('Functional Currency : '||var.functional_currency_code);
202: fa_rx_util_pkg.debug('Organization Name : '||var.organization_name);
203:
204: XLA_MO_REPORTING_API.Initialize(var.p_reporting_level, var.p_reporting_entity_id, 'AUTO');
197: from GL_SETS_OF_BOOKS
198: where SET_OF_BOOKS_ID = var.p_sob_id;
199:
200: fa_rx_util_pkg.debug('Chart of Accounts ID : '||var.p_coa_id);
201: fa_rx_util_pkg.debug('Functional Currency : '||var.functional_currency_code);
202: fa_rx_util_pkg.debug('Organization Name : '||var.organization_name);
203:
204: XLA_MO_REPORTING_API.Initialize(var.p_reporting_level, var.p_reporting_entity_id, 'AUTO');
205:
198: where SET_OF_BOOKS_ID = var.p_sob_id;
199:
200: fa_rx_util_pkg.debug('Chart of Accounts ID : '||var.p_coa_id);
201: fa_rx_util_pkg.debug('Functional Currency : '||var.functional_currency_code);
202: fa_rx_util_pkg.debug('Organization Name : '||var.organization_name);
203:
204: XLA_MO_REPORTING_API.Initialize(var.p_reporting_level, var.p_reporting_entity_id, 'AUTO');
205:
206:
212: L_BS_ORG_WHERE := XLA_MO_REPORTING_API.Get_Predicate('BS',NULL);
213: L_RA_ORG_WHERE := XLA_MO_REPORTING_API.Get_Predicate('RA',NULL);
214: L_PS_ORG_WHERE := XLA_MO_REPORTING_API.Get_Predicate('PS',NULL);
215:
216: fa_rx_util_pkg.debug('L_CR_ORG_WHERE : '||L_CR_ORG_WHERE);
217: fa_rx_util_pkg.debug('L_CRH_ORG_WHERE : '||L_CRH_ORG_WHERE);
218: fa_rx_util_pkg.debug('L_ABA_ORG_WHERE : '||L_ABA_ORG_WHERE);
219: fa_rx_util_pkg.debug('L_CRH_CURR_ORG_WHERE : '||L_CRH_CURR_ORG_WHERE);
220: fa_rx_util_pkg.debug('L_BAT_ORG_WHERE : '||L_BAT_ORG_WHERE);
213: L_RA_ORG_WHERE := XLA_MO_REPORTING_API.Get_Predicate('RA',NULL);
214: L_PS_ORG_WHERE := XLA_MO_REPORTING_API.Get_Predicate('PS',NULL);
215:
216: fa_rx_util_pkg.debug('L_CR_ORG_WHERE : '||L_CR_ORG_WHERE);
217: fa_rx_util_pkg.debug('L_CRH_ORG_WHERE : '||L_CRH_ORG_WHERE);
218: fa_rx_util_pkg.debug('L_ABA_ORG_WHERE : '||L_ABA_ORG_WHERE);
219: fa_rx_util_pkg.debug('L_CRH_CURR_ORG_WHERE : '||L_CRH_CURR_ORG_WHERE);
220: fa_rx_util_pkg.debug('L_BAT_ORG_WHERE : '||L_BAT_ORG_WHERE);
221: fa_rx_util_pkg.debug('L_BS_ORG_WHERE : '||L_BS_ORG_WHERE);
214: L_PS_ORG_WHERE := XLA_MO_REPORTING_API.Get_Predicate('PS',NULL);
215:
216: fa_rx_util_pkg.debug('L_CR_ORG_WHERE : '||L_CR_ORG_WHERE);
217: fa_rx_util_pkg.debug('L_CRH_ORG_WHERE : '||L_CRH_ORG_WHERE);
218: fa_rx_util_pkg.debug('L_ABA_ORG_WHERE : '||L_ABA_ORG_WHERE);
219: fa_rx_util_pkg.debug('L_CRH_CURR_ORG_WHERE : '||L_CRH_CURR_ORG_WHERE);
220: fa_rx_util_pkg.debug('L_BAT_ORG_WHERE : '||L_BAT_ORG_WHERE);
221: fa_rx_util_pkg.debug('L_BS_ORG_WHERE : '||L_BS_ORG_WHERE);
222: fa_rx_util_pkg.debug('L_RA_ORG_WHERE : '||L_RA_ORG_WHERE);
215:
216: fa_rx_util_pkg.debug('L_CR_ORG_WHERE : '||L_CR_ORG_WHERE);
217: fa_rx_util_pkg.debug('L_CRH_ORG_WHERE : '||L_CRH_ORG_WHERE);
218: fa_rx_util_pkg.debug('L_ABA_ORG_WHERE : '||L_ABA_ORG_WHERE);
219: fa_rx_util_pkg.debug('L_CRH_CURR_ORG_WHERE : '||L_CRH_CURR_ORG_WHERE);
220: fa_rx_util_pkg.debug('L_BAT_ORG_WHERE : '||L_BAT_ORG_WHERE);
221: fa_rx_util_pkg.debug('L_BS_ORG_WHERE : '||L_BS_ORG_WHERE);
222: fa_rx_util_pkg.debug('L_RA_ORG_WHERE : '||L_RA_ORG_WHERE);
223: fa_rx_util_pkg.debug('L_PS_ORG_WHERE : '||L_PS_ORG_WHERE);
216: fa_rx_util_pkg.debug('L_CR_ORG_WHERE : '||L_CR_ORG_WHERE);
217: fa_rx_util_pkg.debug('L_CRH_ORG_WHERE : '||L_CRH_ORG_WHERE);
218: fa_rx_util_pkg.debug('L_ABA_ORG_WHERE : '||L_ABA_ORG_WHERE);
219: fa_rx_util_pkg.debug('L_CRH_CURR_ORG_WHERE : '||L_CRH_CURR_ORG_WHERE);
220: fa_rx_util_pkg.debug('L_BAT_ORG_WHERE : '||L_BAT_ORG_WHERE);
221: fa_rx_util_pkg.debug('L_BS_ORG_WHERE : '||L_BS_ORG_WHERE);
222: fa_rx_util_pkg.debug('L_RA_ORG_WHERE : '||L_RA_ORG_WHERE);
223: fa_rx_util_pkg.debug('L_PS_ORG_WHERE : '||L_PS_ORG_WHERE);
224:
217: fa_rx_util_pkg.debug('L_CRH_ORG_WHERE : '||L_CRH_ORG_WHERE);
218: fa_rx_util_pkg.debug('L_ABA_ORG_WHERE : '||L_ABA_ORG_WHERE);
219: fa_rx_util_pkg.debug('L_CRH_CURR_ORG_WHERE : '||L_CRH_CURR_ORG_WHERE);
220: fa_rx_util_pkg.debug('L_BAT_ORG_WHERE : '||L_BAT_ORG_WHERE);
221: fa_rx_util_pkg.debug('L_BS_ORG_WHERE : '||L_BS_ORG_WHERE);
222: fa_rx_util_pkg.debug('L_RA_ORG_WHERE : '||L_RA_ORG_WHERE);
223: fa_rx_util_pkg.debug('L_PS_ORG_WHERE : '||L_PS_ORG_WHERE);
224:
225: fa_rx_util_pkg.debug('Building Company Segment Where');
218: fa_rx_util_pkg.debug('L_ABA_ORG_WHERE : '||L_ABA_ORG_WHERE);
219: fa_rx_util_pkg.debug('L_CRH_CURR_ORG_WHERE : '||L_CRH_CURR_ORG_WHERE);
220: fa_rx_util_pkg.debug('L_BAT_ORG_WHERE : '||L_BAT_ORG_WHERE);
221: fa_rx_util_pkg.debug('L_BS_ORG_WHERE : '||L_BS_ORG_WHERE);
222: fa_rx_util_pkg.debug('L_RA_ORG_WHERE : '||L_RA_ORG_WHERE);
223: fa_rx_util_pkg.debug('L_PS_ORG_WHERE : '||L_PS_ORG_WHERE);
224:
225: fa_rx_util_pkg.debug('Building Company Segment Where');
226:
219: fa_rx_util_pkg.debug('L_CRH_CURR_ORG_WHERE : '||L_CRH_CURR_ORG_WHERE);
220: fa_rx_util_pkg.debug('L_BAT_ORG_WHERE : '||L_BAT_ORG_WHERE);
221: fa_rx_util_pkg.debug('L_BS_ORG_WHERE : '||L_BS_ORG_WHERE);
222: fa_rx_util_pkg.debug('L_RA_ORG_WHERE : '||L_RA_ORG_WHERE);
223: fa_rx_util_pkg.debug('L_PS_ORG_WHERE : '||L_PS_ORG_WHERE);
224:
225: fa_rx_util_pkg.debug('Building Company Segment Where');
226:
227: IF var.p_co_seg_low IS NULL AND var.p_co_seg_high IS NULL THEN
221: fa_rx_util_pkg.debug('L_BS_ORG_WHERE : '||L_BS_ORG_WHERE);
222: fa_rx_util_pkg.debug('L_RA_ORG_WHERE : '||L_RA_ORG_WHERE);
223: fa_rx_util_pkg.debug('L_PS_ORG_WHERE : '||L_PS_ORG_WHERE);
224:
225: fa_rx_util_pkg.debug('Building Company Segment Where');
226:
227: IF var.p_co_seg_low IS NULL AND var.p_co_seg_high IS NULL THEN
228: CO_SEG_WHERE := NULL;
229: ELSIF var.p_co_seg_low IS NULL THEN
257: p_function => 'BETWEEN',
258: p_operand1 => var.p_co_seg_low,
259: p_operand2 => var.p_co_seg_high);
260: END IF;
261: fa_rx_util_pkg.debug('CO_SEG_WHERE = '||substr(CO_SEG_WHERE,1,100));
262:
263: fa_rx_util_pkg.debug('Building GL Date Where ');
264:
265: IF var.p_gl_date_from IS NULL and var.p_gl_date_to IS NULL THEN
259: p_operand2 => var.p_co_seg_high);
260: END IF;
261: fa_rx_util_pkg.debug('CO_SEG_WHERE = '||substr(CO_SEG_WHERE,1,100));
262:
263: fa_rx_util_pkg.debug('Building GL Date Where ');
264:
265: IF var.p_gl_date_from IS NULL and var.p_gl_date_to IS NULL THEN
266: GL_DATE_WHERE := NULL;
267: ELSIF var.p_gl_date_from IS NULL THEN
271: ELSE
272: GL_DATE_WHERE := ' AND RA.GL_DATE BETWEEN :p_gl_date_from AND :p_gl_date_to';
273: END IF;
274:
275: fa_rx_util_pkg.debug('GL_DATE_WHERE = '||GL_DATE_WHERE);
276:
277: fa_rx_util_pkg.debug('Building GL Date Closed Where ');
278:
279: IF var.p_gl_date_from IS NULL and var.p_gl_date_to IS NULL THEN
273: END IF;
274:
275: fa_rx_util_pkg.debug('GL_DATE_WHERE = '||GL_DATE_WHERE);
276:
277: fa_rx_util_pkg.debug('Building GL Date Closed Where ');
278:
279: IF var.p_gl_date_from IS NULL and var.p_gl_date_to IS NULL THEN
280: GL_DATE_CLOSED_WHERE := 'AND PS.GL_DATE_CLOSED = TO_DATE(''31-12-4712'',''DD-MM-YYYY'')';
281: ELSIF var.p_gl_date_from IS NOT NULL THEN
283: ELSIF var.p_gl_date_to IS NOT NULL THEN
284: GL_DATE_CLOSED_WHERE := 'AND PS.GL_DATE_CLOSED >= :p_gl_date_to';
285: END IF;
286:
287: fa_rx_util_pkg.debug('GL_DATE_CLOSED_WHERE = '||GL_DATE_CLOSED_WHERE);
288:
289: fa_rx_util_pkg.debug('Building Currency Code Where ');
290: IF var.p_entered_currency IS NULL THEN
291: CURRENCY_CODE_WHERE := NULL;
285: END IF;
286:
287: fa_rx_util_pkg.debug('GL_DATE_CLOSED_WHERE = '||GL_DATE_CLOSED_WHERE);
288:
289: fa_rx_util_pkg.debug('Building Currency Code Where ');
290: IF var.p_entered_currency IS NULL THEN
291: CURRENCY_CODE_WHERE := NULL;
292: ELSE
293: CURRENCY_CODE_WHERE := ' AND CR.CURRENCY_CODE = :p_entered_currency';
292: ELSE
293: CURRENCY_CODE_WHERE := ' AND CR.CURRENCY_CODE = :p_entered_currency';
294: END IF;
295:
296: fa_rx_util_pkg.debug('Building Batch Name Where ');
297: IF var.p_batch_name_low IS NULL and var.p_batch_name_high IS NULL THEN
298: BATCH_NAME_WHERE := NULL;
299: ELSIF var.p_batch_name_low IS NULL THEN
300: BATCH_NAME_WHERE := ' AND BAT.NAME <= :p_batch_name_high';
303: ELSE
304: BATCH_NAME_WHERE := ' AND BAT.NAME BETWEEN :p_batch_name_low AND :p_batch_name_high';
305: END IF;
306:
307: fa_rx_util_pkg.debug('Building Batch Source Name Where ');
308: IF var.p_batch_src_low IS NULL and var.p_batch_src_high IS NULL THEN
309: BATCH_SRC_NAME_WHERE := NULL;
310: ELSIF var.p_batch_src_low IS NULL THEN
311: BATCH_SRC_NAME_WHERE := ' AND BS.NAME <= :p_batch_src_high';
314: ELSE
315: BATCH_SRC_NAME_WHERE := ' AND BS.NAME BETWEEN :p_batch_src_low AND :p_batch_src_high';
316: END IF;
317:
318: fa_rx_util_pkg.debug('Building Customer Name Where');
319: IF var.p_customer_name_low IS NULL AND var.p_customer_name_high IS NULL THEN
320: CUSTOMER_NAME_WHERE := NULL;
321: ELSIF var.p_customer_name_low IS NULL THEN
322: CUSTOMER_NAME_WHERE := ' AND PARTY.PARTY_NAME <= :p_customer_name_high';
325: ELSE
326: CUSTOMER_NAME_WHERE := ' AND PARTY.PARTY_NAME BETWEEN :p_customer_name_low AND :p_customer_name_high';
327: END IF;
328:
329: fa_rx_util_pkg.debug('Building Customer Number Where');
330: IF var.p_customer_number_low IS NULL AND var.p_customer_number_high IS NULL THEN
331: CUSTOMER_NUMBER_WHERE := NULL;
332: ELSIF var.p_customer_number_low IS NULL THEN
333: CUSTOMER_NUMBER_WHERE := ' AND CUST.ACCOUNT_NUMBER <= :p_customer_number_high';
336: ELSE
337: CUSTOMER_NUMBER_WHERE := ' AND CUST.ACCOUNT_NUMBER BETWEEN :p_customer_number_low AND :p_customer_number_high';
338: END IF;
339:
340: fa_rx_util_pkg.debug('Building Receipt Number Where');
341: IF var.p_receipt_number_low IS NULL AND var.p_receipt_number_high IS NULL THEN
342: RECEIPT_NUMBER_WHERE := NULL;
343: ELSIF var.p_receipt_number_low IS NULL THEN
344: RECEIPT_NUMBER_WHERE := ' AND CR.RECEIPT_NUMBER <= :p_receipt_number_high';
347: ELSE
348: RECEIPT_NUMBER_WHERE := ' AND CR.RECEIPT_NUMBER BETWEEN :p_receipt_number_low AND :p_receipt_number_high';
349: END IF;
350:
351: fa_rx_util_pkg.debug('Building the DECODE statements');
352:
353: CR_STATUS_DECODE := 'DECODE(CR.STATUS,''APP'',:L_APP,''NSF'',:L_NSF,''REV'',:L_REV,''STOP'',:L_STOP,''UNAPP'',:L_UNAPP,''UNID'',:L_UNID)';
354: CRH_STATUS_DECODE := 'DECODE(CRH.STATUS,''APPROVED'',:L_APPROVED,''CLEARED'',:L_CLEARED,''CONFIRMED'',:L_CONFIRMED,''REMITTED'',:L_REMITTED,''REVERSED'',:L_REVERSED)';
355: ON_ACC_AMT_DECODE := 'SUM(DECODE(RA.STATUS,
375:
376: FORMAT_CURRENCY_DECODE := 'DECODE(:P_ENTERED_CURRENCY,NULL,:P_FUNCTIONAL_CURRENCY,CR.CURRENCY_CODE)';
377:
378: /* Assign the Select List */
379: fa_rx_util_pkg.debug('Assign Select List');
380:
381: fa_rx_util_pkg.assign_column('10',null ,'ORGANIZATION_NAME'
382: ,'arrx_rc_unapp.var.organization_name' ,'VARCHAR2', 50);
383: fa_rx_util_pkg.assign_column('20',null ,'FUNCTIONAL_CURRENCY_CODE'
377:
378: /* Assign the Select List */
379: fa_rx_util_pkg.debug('Assign Select List');
380:
381: fa_rx_util_pkg.assign_column('10',null ,'ORGANIZATION_NAME'
382: ,'arrx_rc_unapp.var.organization_name' ,'VARCHAR2', 50);
383: fa_rx_util_pkg.assign_column('20',null ,'FUNCTIONAL_CURRENCY_CODE'
384: ,'arrx_rc_unapp.var.functional_currency_code' ,'VARCHAR2', 15);
385: fa_rx_util_pkg.assign_column('30','BAT.BATCH_ID' ,'BATCH_ID'
379: fa_rx_util_pkg.debug('Assign Select List');
380:
381: fa_rx_util_pkg.assign_column('10',null ,'ORGANIZATION_NAME'
382: ,'arrx_rc_unapp.var.organization_name' ,'VARCHAR2', 50);
383: fa_rx_util_pkg.assign_column('20',null ,'FUNCTIONAL_CURRENCY_CODE'
384: ,'arrx_rc_unapp.var.functional_currency_code' ,'VARCHAR2', 15);
385: fa_rx_util_pkg.assign_column('30','BAT.BATCH_ID' ,'BATCH_ID'
386: ,'arrx_rc_unapp.var.batch_id' ,'NUMBER');
387: fa_rx_util_pkg.assign_column('40','BAT.NAME' ,'BATCH_NAME'
381: fa_rx_util_pkg.assign_column('10',null ,'ORGANIZATION_NAME'
382: ,'arrx_rc_unapp.var.organization_name' ,'VARCHAR2', 50);
383: fa_rx_util_pkg.assign_column('20',null ,'FUNCTIONAL_CURRENCY_CODE'
384: ,'arrx_rc_unapp.var.functional_currency_code' ,'VARCHAR2', 15);
385: fa_rx_util_pkg.assign_column('30','BAT.BATCH_ID' ,'BATCH_ID'
386: ,'arrx_rc_unapp.var.batch_id' ,'NUMBER');
387: fa_rx_util_pkg.assign_column('40','BAT.NAME' ,'BATCH_NAME'
388: ,'arrx_rc_unapp.var.batch_name' ,'VARCHAR2', 20);
389: fa_rx_util_pkg.assign_column('50 ','CR.CASH_RECEIPT_ID' ,'CASH_RECEIPT_ID'
383: fa_rx_util_pkg.assign_column('20',null ,'FUNCTIONAL_CURRENCY_CODE'
384: ,'arrx_rc_unapp.var.functional_currency_code' ,'VARCHAR2', 15);
385: fa_rx_util_pkg.assign_column('30','BAT.BATCH_ID' ,'BATCH_ID'
386: ,'arrx_rc_unapp.var.batch_id' ,'NUMBER');
387: fa_rx_util_pkg.assign_column('40','BAT.NAME' ,'BATCH_NAME'
388: ,'arrx_rc_unapp.var.batch_name' ,'VARCHAR2', 20);
389: fa_rx_util_pkg.assign_column('50 ','CR.CASH_RECEIPT_ID' ,'CASH_RECEIPT_ID'
390: ,'arrx_rc_unapp.var.cash_receipt_id' ,'NUMBER');
391: fa_rx_util_pkg.assign_column('60','CR.RECEIPT_NUMBER' ,'RECEIPT_NUMBER'
385: fa_rx_util_pkg.assign_column('30','BAT.BATCH_ID' ,'BATCH_ID'
386: ,'arrx_rc_unapp.var.batch_id' ,'NUMBER');
387: fa_rx_util_pkg.assign_column('40','BAT.NAME' ,'BATCH_NAME'
388: ,'arrx_rc_unapp.var.batch_name' ,'VARCHAR2', 20);
389: fa_rx_util_pkg.assign_column('50 ','CR.CASH_RECEIPT_ID' ,'CASH_RECEIPT_ID'
390: ,'arrx_rc_unapp.var.cash_receipt_id' ,'NUMBER');
391: fa_rx_util_pkg.assign_column('60','CR.RECEIPT_NUMBER' ,'RECEIPT_NUMBER'
392: ,'arrx_rc_unapp.var.receipt_number' ,'VARCHAR2', 30);
393: fa_rx_util_pkg.assign_column('70','CR.CURRENCY_CODE' ,'RECEIPT_CURRENCY_CODE'
387: fa_rx_util_pkg.assign_column('40','BAT.NAME' ,'BATCH_NAME'
388: ,'arrx_rc_unapp.var.batch_name' ,'VARCHAR2', 20);
389: fa_rx_util_pkg.assign_column('50 ','CR.CASH_RECEIPT_ID' ,'CASH_RECEIPT_ID'
390: ,'arrx_rc_unapp.var.cash_receipt_id' ,'NUMBER');
391: fa_rx_util_pkg.assign_column('60','CR.RECEIPT_NUMBER' ,'RECEIPT_NUMBER'
392: ,'arrx_rc_unapp.var.receipt_number' ,'VARCHAR2', 30);
393: fa_rx_util_pkg.assign_column('70','CR.CURRENCY_CODE' ,'RECEIPT_CURRENCY_CODE'
394: ,'arrx_rc_unapp.var.receipt_currency_code' ,'VARCHAR2', 15);
395: fa_rx_util_pkg.assign_column('80','CR.EXCHANGE_RATE' ,'EXCHANGE_RATE'
389: fa_rx_util_pkg.assign_column('50 ','CR.CASH_RECEIPT_ID' ,'CASH_RECEIPT_ID'
390: ,'arrx_rc_unapp.var.cash_receipt_id' ,'NUMBER');
391: fa_rx_util_pkg.assign_column('60','CR.RECEIPT_NUMBER' ,'RECEIPT_NUMBER'
392: ,'arrx_rc_unapp.var.receipt_number' ,'VARCHAR2', 30);
393: fa_rx_util_pkg.assign_column('70','CR.CURRENCY_CODE' ,'RECEIPT_CURRENCY_CODE'
394: ,'arrx_rc_unapp.var.receipt_currency_code' ,'VARCHAR2', 15);
395: fa_rx_util_pkg.assign_column('80','CR.EXCHANGE_RATE' ,'EXCHANGE_RATE'
396: ,'arrx_rc_unapp.var.exchange_rate' ,'NUMBER');
397: fa_rx_util_pkg.assign_column('90','CR.EXCHANGE_DATE' ,'EXCHANGE_DATE'
391: fa_rx_util_pkg.assign_column('60','CR.RECEIPT_NUMBER' ,'RECEIPT_NUMBER'
392: ,'arrx_rc_unapp.var.receipt_number' ,'VARCHAR2', 30);
393: fa_rx_util_pkg.assign_column('70','CR.CURRENCY_CODE' ,'RECEIPT_CURRENCY_CODE'
394: ,'arrx_rc_unapp.var.receipt_currency_code' ,'VARCHAR2', 15);
395: fa_rx_util_pkg.assign_column('80','CR.EXCHANGE_RATE' ,'EXCHANGE_RATE'
396: ,'arrx_rc_unapp.var.exchange_rate' ,'NUMBER');
397: fa_rx_util_pkg.assign_column('90','CR.EXCHANGE_DATE' ,'EXCHANGE_DATE'
398: ,'arrx_rc_unapp.var.exchange_date' ,'DATE');
399: fa_rx_util_pkg.assign_column('100','CR.EXCHANGE_RATE_TYPE' ,'EXCHANGE_TYPE'
393: fa_rx_util_pkg.assign_column('70','CR.CURRENCY_CODE' ,'RECEIPT_CURRENCY_CODE'
394: ,'arrx_rc_unapp.var.receipt_currency_code' ,'VARCHAR2', 15);
395: fa_rx_util_pkg.assign_column('80','CR.EXCHANGE_RATE' ,'EXCHANGE_RATE'
396: ,'arrx_rc_unapp.var.exchange_rate' ,'NUMBER');
397: fa_rx_util_pkg.assign_column('90','CR.EXCHANGE_DATE' ,'EXCHANGE_DATE'
398: ,'arrx_rc_unapp.var.exchange_date' ,'DATE');
399: fa_rx_util_pkg.assign_column('100','CR.EXCHANGE_RATE_TYPE' ,'EXCHANGE_TYPE'
400: ,'arrx_rc_unapp.var.exchange_type' ,'VARCHAR2',30);
401: fa_rx_util_pkg.assign_column('110','DOCSEQ.NAME' ,'DOC_SEQUENCE_NAME'
395: fa_rx_util_pkg.assign_column('80','CR.EXCHANGE_RATE' ,'EXCHANGE_RATE'
396: ,'arrx_rc_unapp.var.exchange_rate' ,'NUMBER');
397: fa_rx_util_pkg.assign_column('90','CR.EXCHANGE_DATE' ,'EXCHANGE_DATE'
398: ,'arrx_rc_unapp.var.exchange_date' ,'DATE');
399: fa_rx_util_pkg.assign_column('100','CR.EXCHANGE_RATE_TYPE' ,'EXCHANGE_TYPE'
400: ,'arrx_rc_unapp.var.exchange_type' ,'VARCHAR2',30);
401: fa_rx_util_pkg.assign_column('110','DOCSEQ.NAME' ,'DOC_SEQUENCE_NAME'
402: ,'arrx_rc_unapp.var.doc_sequence_name' ,'VARCHAR2',30);
403: fa_rx_util_pkg.assign_column('120','CR.DOC_SEQUENCE_VALUE' ,'DOC_SEQUENCE_VALUE'
397: fa_rx_util_pkg.assign_column('90','CR.EXCHANGE_DATE' ,'EXCHANGE_DATE'
398: ,'arrx_rc_unapp.var.exchange_date' ,'DATE');
399: fa_rx_util_pkg.assign_column('100','CR.EXCHANGE_RATE_TYPE' ,'EXCHANGE_TYPE'
400: ,'arrx_rc_unapp.var.exchange_type' ,'VARCHAR2',30);
401: fa_rx_util_pkg.assign_column('110','DOCSEQ.NAME' ,'DOC_SEQUENCE_NAME'
402: ,'arrx_rc_unapp.var.doc_sequence_name' ,'VARCHAR2',30);
403: fa_rx_util_pkg.assign_column('120','CR.DOC_SEQUENCE_VALUE' ,'DOC_SEQUENCE_VALUE'
404: ,'arrx_rc_unapp.var.doc_sequence_value' ,'NUMBER');
405: fa_rx_util_pkg.assign_column('130','CR.DEPOSIT_DATE' ,'DEPOSIT_DATE'
399: fa_rx_util_pkg.assign_column('100','CR.EXCHANGE_RATE_TYPE' ,'EXCHANGE_TYPE'
400: ,'arrx_rc_unapp.var.exchange_type' ,'VARCHAR2',30);
401: fa_rx_util_pkg.assign_column('110','DOCSEQ.NAME' ,'DOC_SEQUENCE_NAME'
402: ,'arrx_rc_unapp.var.doc_sequence_name' ,'VARCHAR2',30);
403: fa_rx_util_pkg.assign_column('120','CR.DOC_SEQUENCE_VALUE' ,'DOC_SEQUENCE_VALUE'
404: ,'arrx_rc_unapp.var.doc_sequence_value' ,'NUMBER');
405: fa_rx_util_pkg.assign_column('130','CR.DEPOSIT_DATE' ,'DEPOSIT_DATE'
406: ,'arrx_rc_unapp.var.deposit_date' ,'DATE');
407: fa_rx_util_pkg.assign_column('140','CR.RECEIPT_DATE' ,'RECEIPT_DATE'
401: fa_rx_util_pkg.assign_column('110','DOCSEQ.NAME' ,'DOC_SEQUENCE_NAME'
402: ,'arrx_rc_unapp.var.doc_sequence_name' ,'VARCHAR2',30);
403: fa_rx_util_pkg.assign_column('120','CR.DOC_SEQUENCE_VALUE' ,'DOC_SEQUENCE_VALUE'
404: ,'arrx_rc_unapp.var.doc_sequence_value' ,'NUMBER');
405: fa_rx_util_pkg.assign_column('130','CR.DEPOSIT_DATE' ,'DEPOSIT_DATE'
406: ,'arrx_rc_unapp.var.deposit_date' ,'DATE');
407: fa_rx_util_pkg.assign_column('140','CR.RECEIPT_DATE' ,'RECEIPT_DATE'
408: ,'arrx_rc_unapp.var.receipt_date' ,'DATE');
409: fa_rx_util_pkg.assign_column('150',CR_STATUS_DECODE ,'RECEIPT_STATUS'
403: fa_rx_util_pkg.assign_column('120','CR.DOC_SEQUENCE_VALUE' ,'DOC_SEQUENCE_VALUE'
404: ,'arrx_rc_unapp.var.doc_sequence_value' ,'NUMBER');
405: fa_rx_util_pkg.assign_column('130','CR.DEPOSIT_DATE' ,'DEPOSIT_DATE'
406: ,'arrx_rc_unapp.var.deposit_date' ,'DATE');
407: fa_rx_util_pkg.assign_column('140','CR.RECEIPT_DATE' ,'RECEIPT_DATE'
408: ,'arrx_rc_unapp.var.receipt_date' ,'DATE');
409: fa_rx_util_pkg.assign_column('150',CR_STATUS_DECODE ,'RECEIPT_STATUS'
410: ,'arrx_rc_unapp.var.receipt_status' ,'VARCHAR2',40);
411: fa_rx_util_pkg.assign_column('160','ABB.BANK_NAME' ,'BANK_NAME'
405: fa_rx_util_pkg.assign_column('130','CR.DEPOSIT_DATE' ,'DEPOSIT_DATE'
406: ,'arrx_rc_unapp.var.deposit_date' ,'DATE');
407: fa_rx_util_pkg.assign_column('140','CR.RECEIPT_DATE' ,'RECEIPT_DATE'
408: ,'arrx_rc_unapp.var.receipt_date' ,'DATE');
409: fa_rx_util_pkg.assign_column('150',CR_STATUS_DECODE ,'RECEIPT_STATUS'
410: ,'arrx_rc_unapp.var.receipt_status' ,'VARCHAR2',40);
411: fa_rx_util_pkg.assign_column('160','ABB.BANK_NAME' ,'BANK_NAME'
412: ,'arrx_rc_unapp.var.bank_name' ,'VARCHAR2',60);
413: fa_rx_util_pkg.assign_column('170','ABB.BANK_NAME_ALT' ,'BANK_NAME_ALT'
407: fa_rx_util_pkg.assign_column('140','CR.RECEIPT_DATE' ,'RECEIPT_DATE'
408: ,'arrx_rc_unapp.var.receipt_date' ,'DATE');
409: fa_rx_util_pkg.assign_column('150',CR_STATUS_DECODE ,'RECEIPT_STATUS'
410: ,'arrx_rc_unapp.var.receipt_status' ,'VARCHAR2',40);
411: fa_rx_util_pkg.assign_column('160','ABB.BANK_NAME' ,'BANK_NAME'
412: ,'arrx_rc_unapp.var.bank_name' ,'VARCHAR2',60);
413: fa_rx_util_pkg.assign_column('170','ABB.BANK_NAME_ALT' ,'BANK_NAME_ALT'
414: ,'arrx_rc_unapp.var.bank_name_alt' ,'VARCHAR2',320);
415: fa_rx_util_pkg.assign_column('180','ABB.BANK_BRANCH_NAME' ,'BANK_BRANCH_NAME'
409: fa_rx_util_pkg.assign_column('150',CR_STATUS_DECODE ,'RECEIPT_STATUS'
410: ,'arrx_rc_unapp.var.receipt_status' ,'VARCHAR2',40);
411: fa_rx_util_pkg.assign_column('160','ABB.BANK_NAME' ,'BANK_NAME'
412: ,'arrx_rc_unapp.var.bank_name' ,'VARCHAR2',60);
413: fa_rx_util_pkg.assign_column('170','ABB.BANK_NAME_ALT' ,'BANK_NAME_ALT'
414: ,'arrx_rc_unapp.var.bank_name_alt' ,'VARCHAR2',320);
415: fa_rx_util_pkg.assign_column('180','ABB.BANK_BRANCH_NAME' ,'BANK_BRANCH_NAME'
416: ,'arrx_rc_unapp.var.bank_branch_name' ,'VARCHAR2',60);
417: fa_rx_util_pkg.assign_column('190','ABB.BANK_BRANCH_NAME_ALT' ,'BANK_BRANCH_NAME_ALT'
411: fa_rx_util_pkg.assign_column('160','ABB.BANK_NAME' ,'BANK_NAME'
412: ,'arrx_rc_unapp.var.bank_name' ,'VARCHAR2',60);
413: fa_rx_util_pkg.assign_column('170','ABB.BANK_NAME_ALT' ,'BANK_NAME_ALT'
414: ,'arrx_rc_unapp.var.bank_name_alt' ,'VARCHAR2',320);
415: fa_rx_util_pkg.assign_column('180','ABB.BANK_BRANCH_NAME' ,'BANK_BRANCH_NAME'
416: ,'arrx_rc_unapp.var.bank_branch_name' ,'VARCHAR2',60);
417: fa_rx_util_pkg.assign_column('190','ABB.BANK_BRANCH_NAME_ALT' ,'BANK_BRANCH_NAME_ALT'
418: ,'arrx_rc_unapp.var.bank_name_alt' ,'VARCHAR2',320);
419: fa_rx_util_pkg.assign_column('200','ABB.BANK_NUMBER' ,'BANK_NUMBER'
413: fa_rx_util_pkg.assign_column('170','ABB.BANK_NAME_ALT' ,'BANK_NAME_ALT'
414: ,'arrx_rc_unapp.var.bank_name_alt' ,'VARCHAR2',320);
415: fa_rx_util_pkg.assign_column('180','ABB.BANK_BRANCH_NAME' ,'BANK_BRANCH_NAME'
416: ,'arrx_rc_unapp.var.bank_branch_name' ,'VARCHAR2',60);
417: fa_rx_util_pkg.assign_column('190','ABB.BANK_BRANCH_NAME_ALT' ,'BANK_BRANCH_NAME_ALT'
418: ,'arrx_rc_unapp.var.bank_name_alt' ,'VARCHAR2',320);
419: fa_rx_util_pkg.assign_column('200','ABB.BANK_NUMBER' ,'BANK_NUMBER'
420: ,'arrx_rc_unapp.var.bank_number' ,'VARCHAR2',30);
421: fa_rx_util_pkg.assign_column('210','ABB.BRANCH_NUMBER' ,'BANK_BRANCH_NUMBER'
415: fa_rx_util_pkg.assign_column('180','ABB.BANK_BRANCH_NAME' ,'BANK_BRANCH_NAME'
416: ,'arrx_rc_unapp.var.bank_branch_name' ,'VARCHAR2',60);
417: fa_rx_util_pkg.assign_column('190','ABB.BANK_BRANCH_NAME_ALT' ,'BANK_BRANCH_NAME_ALT'
418: ,'arrx_rc_unapp.var.bank_name_alt' ,'VARCHAR2',320);
419: fa_rx_util_pkg.assign_column('200','ABB.BANK_NUMBER' ,'BANK_NUMBER'
420: ,'arrx_rc_unapp.var.bank_number' ,'VARCHAR2',30);
421: fa_rx_util_pkg.assign_column('210','ABB.BRANCH_NUMBER' ,'BANK_BRANCH_NUMBER'
422: ,'arrx_rc_unapp.var.bank_branch_number' ,'VARCHAR2',25);
423: fa_rx_util_pkg.assign_column('220','ABA.BANK_ACCOUNT_NAME' ,'BANK_ACCOUNT_NAME'
417: fa_rx_util_pkg.assign_column('190','ABB.BANK_BRANCH_NAME_ALT' ,'BANK_BRANCH_NAME_ALT'
418: ,'arrx_rc_unapp.var.bank_name_alt' ,'VARCHAR2',320);
419: fa_rx_util_pkg.assign_column('200','ABB.BANK_NUMBER' ,'BANK_NUMBER'
420: ,'arrx_rc_unapp.var.bank_number' ,'VARCHAR2',30);
421: fa_rx_util_pkg.assign_column('210','ABB.BRANCH_NUMBER' ,'BANK_BRANCH_NUMBER'
422: ,'arrx_rc_unapp.var.bank_branch_number' ,'VARCHAR2',25);
423: fa_rx_util_pkg.assign_column('220','ABA.BANK_ACCOUNT_NAME' ,'BANK_ACCOUNT_NAME'
424: ,'arrx_rc_unapp.var.bank_account_name' ,'VARCHAR2', 80);
425: fa_rx_util_pkg.assign_column('230','ABA.BANK_ACCOUNT_NAME_ALT', 'BANK_ACCOUNT_NAME_ALT'
419: fa_rx_util_pkg.assign_column('200','ABB.BANK_NUMBER' ,'BANK_NUMBER'
420: ,'arrx_rc_unapp.var.bank_number' ,'VARCHAR2',30);
421: fa_rx_util_pkg.assign_column('210','ABB.BRANCH_NUMBER' ,'BANK_BRANCH_NUMBER'
422: ,'arrx_rc_unapp.var.bank_branch_number' ,'VARCHAR2',25);
423: fa_rx_util_pkg.assign_column('220','ABA.BANK_ACCOUNT_NAME' ,'BANK_ACCOUNT_NAME'
424: ,'arrx_rc_unapp.var.bank_account_name' ,'VARCHAR2', 80);
425: fa_rx_util_pkg.assign_column('230','ABA.BANK_ACCOUNT_NAME_ALT', 'BANK_ACCOUNT_NAME_ALT'
426: ,'arrx_rc_unapp.var.bank_account_name_alt' ,'VARCHAR2', 320);
427: fa_rx_util_pkg.assign_column('240','ABA.CURRENCY_CODE' ,'BANK_ACCOUNT_CURRENCY'
421: fa_rx_util_pkg.assign_column('210','ABB.BRANCH_NUMBER' ,'BANK_BRANCH_NUMBER'
422: ,'arrx_rc_unapp.var.bank_branch_number' ,'VARCHAR2',25);
423: fa_rx_util_pkg.assign_column('220','ABA.BANK_ACCOUNT_NAME' ,'BANK_ACCOUNT_NAME'
424: ,'arrx_rc_unapp.var.bank_account_name' ,'VARCHAR2', 80);
425: fa_rx_util_pkg.assign_column('230','ABA.BANK_ACCOUNT_NAME_ALT', 'BANK_ACCOUNT_NAME_ALT'
426: ,'arrx_rc_unapp.var.bank_account_name_alt' ,'VARCHAR2', 320);
427: fa_rx_util_pkg.assign_column('240','ABA.CURRENCY_CODE' ,'BANK_ACCOUNT_CURRENCY'
428: ,'arrx_rc_unapp.var.bank_account_currency' ,'VARCHAR2',15);
429: fa_rx_util_pkg.assign_column('250','ARM.NAME' ,'RECEIPT_METHOD'
423: fa_rx_util_pkg.assign_column('220','ABA.BANK_ACCOUNT_NAME' ,'BANK_ACCOUNT_NAME'
424: ,'arrx_rc_unapp.var.bank_account_name' ,'VARCHAR2', 80);
425: fa_rx_util_pkg.assign_column('230','ABA.BANK_ACCOUNT_NAME_ALT', 'BANK_ACCOUNT_NAME_ALT'
426: ,'arrx_rc_unapp.var.bank_account_name_alt' ,'VARCHAR2', 320);
427: fa_rx_util_pkg.assign_column('240','ABA.CURRENCY_CODE' ,'BANK_ACCOUNT_CURRENCY'
428: ,'arrx_rc_unapp.var.bank_account_currency' ,'VARCHAR2',15);
429: fa_rx_util_pkg.assign_column('250','ARM.NAME' ,'RECEIPT_METHOD'
430: ,'arrx_rc_unapp.var.receipt_method' ,'VARCHAR2',30);
431: fa_rx_util_pkg.assign_column('260','CRH.CASH_RECEIPT_HISTORY_ID','CASH_RECEIPT_HISTORY_ID'
425: fa_rx_util_pkg.assign_column('230','ABA.BANK_ACCOUNT_NAME_ALT', 'BANK_ACCOUNT_NAME_ALT'
426: ,'arrx_rc_unapp.var.bank_account_name_alt' ,'VARCHAR2', 320);
427: fa_rx_util_pkg.assign_column('240','ABA.CURRENCY_CODE' ,'BANK_ACCOUNT_CURRENCY'
428: ,'arrx_rc_unapp.var.bank_account_currency' ,'VARCHAR2',15);
429: fa_rx_util_pkg.assign_column('250','ARM.NAME' ,'RECEIPT_METHOD'
430: ,'arrx_rc_unapp.var.receipt_method' ,'VARCHAR2',30);
431: fa_rx_util_pkg.assign_column('260','CRH.CASH_RECEIPT_HISTORY_ID','CASH_RECEIPT_HISTORY_ID'
432: ,'arrx_rc_unapp.var.cash_receipt_history_id' ,'NUMBER');
433: fa_rx_util_pkg.assign_column('270','MAX(RA.GL_DATE)' ,'GL_DATE'
427: fa_rx_util_pkg.assign_column('240','ABA.CURRENCY_CODE' ,'BANK_ACCOUNT_CURRENCY'
428: ,'arrx_rc_unapp.var.bank_account_currency' ,'VARCHAR2',15);
429: fa_rx_util_pkg.assign_column('250','ARM.NAME' ,'RECEIPT_METHOD'
430: ,'arrx_rc_unapp.var.receipt_method' ,'VARCHAR2',30);
431: fa_rx_util_pkg.assign_column('260','CRH.CASH_RECEIPT_HISTORY_ID','CASH_RECEIPT_HISTORY_ID'
432: ,'arrx_rc_unapp.var.cash_receipt_history_id' ,'NUMBER');
433: fa_rx_util_pkg.assign_column('270','MAX(RA.GL_DATE)' ,'GL_DATE'
434: ,'arrx_rc_unapp.var.gl_date' ,'DATE');
435: fa_rx_util_pkg.assign_column('280','CRH_CURR.AMOUNT' ,'RECEIPT_AMOUNT'
429: fa_rx_util_pkg.assign_column('250','ARM.NAME' ,'RECEIPT_METHOD'
430: ,'arrx_rc_unapp.var.receipt_method' ,'VARCHAR2',30);
431: fa_rx_util_pkg.assign_column('260','CRH.CASH_RECEIPT_HISTORY_ID','CASH_RECEIPT_HISTORY_ID'
432: ,'arrx_rc_unapp.var.cash_receipt_history_id' ,'NUMBER');
433: fa_rx_util_pkg.assign_column('270','MAX(RA.GL_DATE)' ,'GL_DATE'
434: ,'arrx_rc_unapp.var.gl_date' ,'DATE');
435: fa_rx_util_pkg.assign_column('280','CRH_CURR.AMOUNT' ,'RECEIPT_AMOUNT'
436: ,'arrx_rc_unapp.var.receipt_amount' ,'NUMBER');
437: fa_rx_util_pkg.assign_column('290','CRH_CURR.ACCTD_AMOUNT' ,'ACCTD_RECEIPT_AMOUNT'
431: fa_rx_util_pkg.assign_column('260','CRH.CASH_RECEIPT_HISTORY_ID','CASH_RECEIPT_HISTORY_ID'
432: ,'arrx_rc_unapp.var.cash_receipt_history_id' ,'NUMBER');
433: fa_rx_util_pkg.assign_column('270','MAX(RA.GL_DATE)' ,'GL_DATE'
434: ,'arrx_rc_unapp.var.gl_date' ,'DATE');
435: fa_rx_util_pkg.assign_column('280','CRH_CURR.AMOUNT' ,'RECEIPT_AMOUNT'
436: ,'arrx_rc_unapp.var.receipt_amount' ,'NUMBER');
437: fa_rx_util_pkg.assign_column('290','CRH_CURR.ACCTD_AMOUNT' ,'ACCTD_RECEIPT_AMOUNT'
438: ,'arrx_rc_unapp.var.acctd_receipt_amount' ,'NUMBER');
439: fa_rx_util_pkg.assign_column('300','CRH_CURR.FACTOR_DISCOUNT_AMOUNT','FACTOR_DISCOUNT_AMOUNT'
433: fa_rx_util_pkg.assign_column('270','MAX(RA.GL_DATE)' ,'GL_DATE'
434: ,'arrx_rc_unapp.var.gl_date' ,'DATE');
435: fa_rx_util_pkg.assign_column('280','CRH_CURR.AMOUNT' ,'RECEIPT_AMOUNT'
436: ,'arrx_rc_unapp.var.receipt_amount' ,'NUMBER');
437: fa_rx_util_pkg.assign_column('290','CRH_CURR.ACCTD_AMOUNT' ,'ACCTD_RECEIPT_AMOUNT'
438: ,'arrx_rc_unapp.var.acctd_receipt_amount' ,'NUMBER');
439: fa_rx_util_pkg.assign_column('300','CRH_CURR.FACTOR_DISCOUNT_AMOUNT','FACTOR_DISCOUNT_AMOUNT'
440: ,'arrx_rc_unapp.var.factor_discount_amount' ,'NUMBER');
441: fa_rx_util_pkg.assign_column('310','CRH_CURR.ACCTD_FACTOR_DISCOUNT_AMOUNT','ACCTD_FACTOR_DISCOUNT_AMOUNT'
435: fa_rx_util_pkg.assign_column('280','CRH_CURR.AMOUNT' ,'RECEIPT_AMOUNT'
436: ,'arrx_rc_unapp.var.receipt_amount' ,'NUMBER');
437: fa_rx_util_pkg.assign_column('290','CRH_CURR.ACCTD_AMOUNT' ,'ACCTD_RECEIPT_AMOUNT'
438: ,'arrx_rc_unapp.var.acctd_receipt_amount' ,'NUMBER');
439: fa_rx_util_pkg.assign_column('300','CRH_CURR.FACTOR_DISCOUNT_AMOUNT','FACTOR_DISCOUNT_AMOUNT'
440: ,'arrx_rc_unapp.var.factor_discount_amount' ,'NUMBER');
441: fa_rx_util_pkg.assign_column('310','CRH_CURR.ACCTD_FACTOR_DISCOUNT_AMOUNT','ACCTD_FACTOR_DISCOUNT_AMOUNT'
442: ,'arrx_rc_unapp.var.acctd_factor_discount_amount' ,'NUMBER');
443: fa_rx_util_pkg.assign_column('320',CRH_STATUS_DECODE ,'RECEIPT_HISTORY_STATUS'
437: fa_rx_util_pkg.assign_column('290','CRH_CURR.ACCTD_AMOUNT' ,'ACCTD_RECEIPT_AMOUNT'
438: ,'arrx_rc_unapp.var.acctd_receipt_amount' ,'NUMBER');
439: fa_rx_util_pkg.assign_column('300','CRH_CURR.FACTOR_DISCOUNT_AMOUNT','FACTOR_DISCOUNT_AMOUNT'
440: ,'arrx_rc_unapp.var.factor_discount_amount' ,'NUMBER');
441: fa_rx_util_pkg.assign_column('310','CRH_CURR.ACCTD_FACTOR_DISCOUNT_AMOUNT','ACCTD_FACTOR_DISCOUNT_AMOUNT'
442: ,'arrx_rc_unapp.var.acctd_factor_discount_amount' ,'NUMBER');
443: fa_rx_util_pkg.assign_column('320',CRH_STATUS_DECODE ,'RECEIPT_HISTORY_STATUS'
444: ,'arrx_rc_unapp.var.receipt_history_status' ,'VARCHAR2', 40);
445: fa_rx_util_pkg.assign_column('330','CUST.CUST_ACCOUNT_ID' ,'CUSTOMER_ID'
439: fa_rx_util_pkg.assign_column('300','CRH_CURR.FACTOR_DISCOUNT_AMOUNT','FACTOR_DISCOUNT_AMOUNT'
440: ,'arrx_rc_unapp.var.factor_discount_amount' ,'NUMBER');
441: fa_rx_util_pkg.assign_column('310','CRH_CURR.ACCTD_FACTOR_DISCOUNT_AMOUNT','ACCTD_FACTOR_DISCOUNT_AMOUNT'
442: ,'arrx_rc_unapp.var.acctd_factor_discount_amount' ,'NUMBER');
443: fa_rx_util_pkg.assign_column('320',CRH_STATUS_DECODE ,'RECEIPT_HISTORY_STATUS'
444: ,'arrx_rc_unapp.var.receipt_history_status' ,'VARCHAR2', 40);
445: fa_rx_util_pkg.assign_column('330','CUST.CUST_ACCOUNT_ID' ,'CUSTOMER_ID'
446: ,'arrx_rc_unapp.var.customer_id' ,'NUMBER');
447: fa_rx_util_pkg.assign_column('340','NVL(SUBSTRB(PARTY.PARTY_NAME,1,50),:L_UNID_CUST)', 'CUSTOMER_NAME'
441: fa_rx_util_pkg.assign_column('310','CRH_CURR.ACCTD_FACTOR_DISCOUNT_AMOUNT','ACCTD_FACTOR_DISCOUNT_AMOUNT'
442: ,'arrx_rc_unapp.var.acctd_factor_discount_amount' ,'NUMBER');
443: fa_rx_util_pkg.assign_column('320',CRH_STATUS_DECODE ,'RECEIPT_HISTORY_STATUS'
444: ,'arrx_rc_unapp.var.receipt_history_status' ,'VARCHAR2', 40);
445: fa_rx_util_pkg.assign_column('330','CUST.CUST_ACCOUNT_ID' ,'CUSTOMER_ID'
446: ,'arrx_rc_unapp.var.customer_id' ,'NUMBER');
447: fa_rx_util_pkg.assign_column('340','NVL(SUBSTRB(PARTY.PARTY_NAME,1,50),:L_UNID_CUST)', 'CUSTOMER_NAME'
448: ,'arrx_rc_unapp.var.customer_name' ,'VARCHAR2', 50);
449: fa_rx_util_pkg.assign_column('350','DECODE(PARTY.PARTY_TYPE, ''ORGANIZATION'',PARTY.ORGANIZATION_NAME_PHONETIC, NULL)' ,'CUSTOMER_NAME_ALT'
443: fa_rx_util_pkg.assign_column('320',CRH_STATUS_DECODE ,'RECEIPT_HISTORY_STATUS'
444: ,'arrx_rc_unapp.var.receipt_history_status' ,'VARCHAR2', 40);
445: fa_rx_util_pkg.assign_column('330','CUST.CUST_ACCOUNT_ID' ,'CUSTOMER_ID'
446: ,'arrx_rc_unapp.var.customer_id' ,'NUMBER');
447: fa_rx_util_pkg.assign_column('340','NVL(SUBSTRB(PARTY.PARTY_NAME,1,50),:L_UNID_CUST)', 'CUSTOMER_NAME'
448: ,'arrx_rc_unapp.var.customer_name' ,'VARCHAR2', 50);
449: fa_rx_util_pkg.assign_column('350','DECODE(PARTY.PARTY_TYPE, ''ORGANIZATION'',PARTY.ORGANIZATION_NAME_PHONETIC, NULL)' ,'CUSTOMER_NAME_ALT'
450: ,'arrx_rc_unapp.var.customer_name_alt' ,'VARCHAR2',320);
451: fa_rx_util_pkg.assign_column('360','CUST.ACCOUNT_NUMBER' ,'CUSTOMER_NUMBER'
445: fa_rx_util_pkg.assign_column('330','CUST.CUST_ACCOUNT_ID' ,'CUSTOMER_ID'
446: ,'arrx_rc_unapp.var.customer_id' ,'NUMBER');
447: fa_rx_util_pkg.assign_column('340','NVL(SUBSTRB(PARTY.PARTY_NAME,1,50),:L_UNID_CUST)', 'CUSTOMER_NAME'
448: ,'arrx_rc_unapp.var.customer_name' ,'VARCHAR2', 50);
449: fa_rx_util_pkg.assign_column('350','DECODE(PARTY.PARTY_TYPE, ''ORGANIZATION'',PARTY.ORGANIZATION_NAME_PHONETIC, NULL)' ,'CUSTOMER_NAME_ALT'
450: ,'arrx_rc_unapp.var.customer_name_alt' ,'VARCHAR2',320);
451: fa_rx_util_pkg.assign_column('360','CUST.ACCOUNT_NUMBER' ,'CUSTOMER_NUMBER'
452: ,'arrx_rc_unapp.var.customer_number' ,'VARCHAR2', 30);
453: fa_rx_util_pkg.assign_column('370','BS.NAME' ,'BATCH_SOURCE'
447: fa_rx_util_pkg.assign_column('340','NVL(SUBSTRB(PARTY.PARTY_NAME,1,50),:L_UNID_CUST)', 'CUSTOMER_NAME'
448: ,'arrx_rc_unapp.var.customer_name' ,'VARCHAR2', 50);
449: fa_rx_util_pkg.assign_column('350','DECODE(PARTY.PARTY_TYPE, ''ORGANIZATION'',PARTY.ORGANIZATION_NAME_PHONETIC, NULL)' ,'CUSTOMER_NAME_ALT'
450: ,'arrx_rc_unapp.var.customer_name_alt' ,'VARCHAR2',320);
451: fa_rx_util_pkg.assign_column('360','CUST.ACCOUNT_NUMBER' ,'CUSTOMER_NUMBER'
452: ,'arrx_rc_unapp.var.customer_number' ,'VARCHAR2', 30);
453: fa_rx_util_pkg.assign_column('370','BS.NAME' ,'BATCH_SOURCE'
454: ,'arrx_rc_unapp.var.batch_source' ,'VARCHAR2',30);
455: fa_rx_util_pkg.assign_column('380',ON_ACC_AMT_DECODE ,'ON_ACCOUNT_AMOUNT'
449: fa_rx_util_pkg.assign_column('350','DECODE(PARTY.PARTY_TYPE, ''ORGANIZATION'',PARTY.ORGANIZATION_NAME_PHONETIC, NULL)' ,'CUSTOMER_NAME_ALT'
450: ,'arrx_rc_unapp.var.customer_name_alt' ,'VARCHAR2',320);
451: fa_rx_util_pkg.assign_column('360','CUST.ACCOUNT_NUMBER' ,'CUSTOMER_NUMBER'
452: ,'arrx_rc_unapp.var.customer_number' ,'VARCHAR2', 30);
453: fa_rx_util_pkg.assign_column('370','BS.NAME' ,'BATCH_SOURCE'
454: ,'arrx_rc_unapp.var.batch_source' ,'VARCHAR2',30);
455: fa_rx_util_pkg.assign_column('380',ON_ACC_AMT_DECODE ,'ON_ACCOUNT_AMOUNT'
456: ,'arrx_rc_unapp.var.on_acc_amount' ,'NUMBER');
457: fa_rx_util_pkg.assign_column('390',UNAPP_AMT_DECODE ,'UNAPP_AMOUNT'
451: fa_rx_util_pkg.assign_column('360','CUST.ACCOUNT_NUMBER' ,'CUSTOMER_NUMBER'
452: ,'arrx_rc_unapp.var.customer_number' ,'VARCHAR2', 30);
453: fa_rx_util_pkg.assign_column('370','BS.NAME' ,'BATCH_SOURCE'
454: ,'arrx_rc_unapp.var.batch_source' ,'VARCHAR2',30);
455: fa_rx_util_pkg.assign_column('380',ON_ACC_AMT_DECODE ,'ON_ACCOUNT_AMOUNT'
456: ,'arrx_rc_unapp.var.on_acc_amount' ,'NUMBER');
457: fa_rx_util_pkg.assign_column('390',UNAPP_AMT_DECODE ,'UNAPP_AMOUNT'
458: ,'arrx_rc_unapp.var.unapp_amount' ,'NUMBER');
459: fa_rx_util_pkg.assign_column('400',CLAIM_AMT_DECODE ,'CLAIM_AMOUNT'
453: fa_rx_util_pkg.assign_column('370','BS.NAME' ,'BATCH_SOURCE'
454: ,'arrx_rc_unapp.var.batch_source' ,'VARCHAR2',30);
455: fa_rx_util_pkg.assign_column('380',ON_ACC_AMT_DECODE ,'ON_ACCOUNT_AMOUNT'
456: ,'arrx_rc_unapp.var.on_acc_amount' ,'NUMBER');
457: fa_rx_util_pkg.assign_column('390',UNAPP_AMT_DECODE ,'UNAPP_AMOUNT'
458: ,'arrx_rc_unapp.var.unapp_amount' ,'NUMBER');
459: fa_rx_util_pkg.assign_column('400',CLAIM_AMT_DECODE ,'CLAIM_AMOUNT'
460: ,'arrx_rc_unapp.var.claim_amount' ,'NUMBER');
461: fa_rx_util_pkg.assign_column('410',PREPAY_AMT_DECODE ,'PREPAY_AMOUNT'
455: fa_rx_util_pkg.assign_column('380',ON_ACC_AMT_DECODE ,'ON_ACCOUNT_AMOUNT'
456: ,'arrx_rc_unapp.var.on_acc_amount' ,'NUMBER');
457: fa_rx_util_pkg.assign_column('390',UNAPP_AMT_DECODE ,'UNAPP_AMOUNT'
458: ,'arrx_rc_unapp.var.unapp_amount' ,'NUMBER');
459: fa_rx_util_pkg.assign_column('400',CLAIM_AMT_DECODE ,'CLAIM_AMOUNT'
460: ,'arrx_rc_unapp.var.claim_amount' ,'NUMBER');
461: fa_rx_util_pkg.assign_column('410',PREPAY_AMT_DECODE ,'PREPAY_AMOUNT'
462: ,'arrx_rc_unapp.var.prepay_amount' ,'NUMBER');
463: fa_rx_util_pkg.assign_column('420',TOTAL_UNRESOLVED_AMT_DECODE,'TOTAL_UNRESOLVED_AMOUNT'
457: fa_rx_util_pkg.assign_column('390',UNAPP_AMT_DECODE ,'UNAPP_AMOUNT'
458: ,'arrx_rc_unapp.var.unapp_amount' ,'NUMBER');
459: fa_rx_util_pkg.assign_column('400',CLAIM_AMT_DECODE ,'CLAIM_AMOUNT'
460: ,'arrx_rc_unapp.var.claim_amount' ,'NUMBER');
461: fa_rx_util_pkg.assign_column('410',PREPAY_AMT_DECODE ,'PREPAY_AMOUNT'
462: ,'arrx_rc_unapp.var.prepay_amount' ,'NUMBER');
463: fa_rx_util_pkg.assign_column('420',TOTAL_UNRESOLVED_AMT_DECODE,'TOTAL_UNRESOLVED_AMOUNT'
464: ,'arrx_rc_unapp.var.total_unresolved_amount' ,'NUMBER');
465: fa_rx_util_pkg.assign_column('430',FORMAT_CURRENCY_DECODE ,'FORMAT_CURRENCY_CODE'
459: fa_rx_util_pkg.assign_column('400',CLAIM_AMT_DECODE ,'CLAIM_AMOUNT'
460: ,'arrx_rc_unapp.var.claim_amount' ,'NUMBER');
461: fa_rx_util_pkg.assign_column('410',PREPAY_AMT_DECODE ,'PREPAY_AMOUNT'
462: ,'arrx_rc_unapp.var.prepay_amount' ,'NUMBER');
463: fa_rx_util_pkg.assign_column('420',TOTAL_UNRESOLVED_AMT_DECODE,'TOTAL_UNRESOLVED_AMOUNT'
464: ,'arrx_rc_unapp.var.total_unresolved_amount' ,'NUMBER');
465: fa_rx_util_pkg.assign_column('430',FORMAT_CURRENCY_DECODE ,'FORMAT_CURRENCY_CODE'
466: ,'arrx_rc_unapp.var.format_currency_code' ,'VARCHAR2',15);
467: fa_rx_util_pkg.assign_column('440','GC.CODE_COMBINATION_ID' ,'ACCOUNT_CODE_COMBINATION_ID'
461: fa_rx_util_pkg.assign_column('410',PREPAY_AMT_DECODE ,'PREPAY_AMOUNT'
462: ,'arrx_rc_unapp.var.prepay_amount' ,'NUMBER');
463: fa_rx_util_pkg.assign_column('420',TOTAL_UNRESOLVED_AMT_DECODE,'TOTAL_UNRESOLVED_AMOUNT'
464: ,'arrx_rc_unapp.var.total_unresolved_amount' ,'NUMBER');
465: fa_rx_util_pkg.assign_column('430',FORMAT_CURRENCY_DECODE ,'FORMAT_CURRENCY_CODE'
466: ,'arrx_rc_unapp.var.format_currency_code' ,'VARCHAR2',15);
467: fa_rx_util_pkg.assign_column('440','GC.CODE_COMBINATION_ID' ,'ACCOUNT_CODE_COMBINATION_ID'
468: ,'arrx_rc_unapp.var.account_code_combination_id' ,'NUMBER');
469: fa_rx_util_pkg.assign_column('450',NULL ,'DEBIT_BALANCING'
463: fa_rx_util_pkg.assign_column('420',TOTAL_UNRESOLVED_AMT_DECODE,'TOTAL_UNRESOLVED_AMOUNT'
464: ,'arrx_rc_unapp.var.total_unresolved_amount' ,'NUMBER');
465: fa_rx_util_pkg.assign_column('430',FORMAT_CURRENCY_DECODE ,'FORMAT_CURRENCY_CODE'
466: ,'arrx_rc_unapp.var.format_currency_code' ,'VARCHAR2',15);
467: fa_rx_util_pkg.assign_column('440','GC.CODE_COMBINATION_ID' ,'ACCOUNT_CODE_COMBINATION_ID'
468: ,'arrx_rc_unapp.var.account_code_combination_id' ,'NUMBER');
469: fa_rx_util_pkg.assign_column('450',NULL ,'DEBIT_BALANCING'
470: ,'arrx_rc_unapp.var.debit_balancing' ,'VARCHAR2',240);
471:
465: fa_rx_util_pkg.assign_column('430',FORMAT_CURRENCY_DECODE ,'FORMAT_CURRENCY_CODE'
466: ,'arrx_rc_unapp.var.format_currency_code' ,'VARCHAR2',15);
467: fa_rx_util_pkg.assign_column('440','GC.CODE_COMBINATION_ID' ,'ACCOUNT_CODE_COMBINATION_ID'
468: ,'arrx_rc_unapp.var.account_code_combination_id' ,'NUMBER');
469: fa_rx_util_pkg.assign_column('450',NULL ,'DEBIT_BALANCING'
470: ,'arrx_rc_unapp.var.debit_balancing' ,'VARCHAR2',240);
471:
472:
473: /* Assign the From Clause */
470: ,'arrx_rc_unapp.var.debit_balancing' ,'VARCHAR2',240);
471:
472:
473: /* Assign the From Clause */
474: fa_rx_util_pkg.debug(' Assigning the FROM CLAUSE');
475:
476: IF NVL(var.ca_sob_type,'P') = 'P' THEN
477: fa_rx_util_pkg.debug(' Report is run for Primary Set of Books');
478: fa_rx_util_pkg.From_Clause := '
473: /* Assign the From Clause */
474: fa_rx_util_pkg.debug(' Assigning the FROM CLAUSE');
475:
476: IF NVL(var.ca_sob_type,'P') = 'P' THEN
477: fa_rx_util_pkg.debug(' Report is run for Primary Set of Books');
478: fa_rx_util_pkg.From_Clause := '
479: AR_CASH_RECEIPTS_ALL CR,
480: FND_DOCUMENT_SEQUENCES DOCSEQ,
481: -- AP_BANK_ACCOUNTS_ALL ABA,
474: fa_rx_util_pkg.debug(' Assigning the FROM CLAUSE');
475:
476: IF NVL(var.ca_sob_type,'P') = 'P' THEN
477: fa_rx_util_pkg.debug(' Report is run for Primary Set of Books');
478: fa_rx_util_pkg.From_Clause := '
479: AR_CASH_RECEIPTS_ALL CR,
480: FND_DOCUMENT_SEQUENCES DOCSEQ,
481: -- AP_BANK_ACCOUNTS_ALL ABA,
482: -- AP_BANK_BRANCHES ABB,
493: AR_BATCH_SOURCES_ALL BS,
494: AR_RECEIVABLE_APPLICATIONS_ALL RA,
495: AR_PAYMENT_SCHEDULES_ALL PS';
496: ELSE
497: fa_rx_util_pkg.debug(' Report is run for Reporting Set of Books');
498: fa_rx_util_pkg.From_Clause := '
499: AR_CASH_RECEIPTS_ALL_MRC_V CR,
500: FND_DOCUMENT_SEQUENCES DOCSEQ,
501: -- AP_BANK_ACCOUNTS_ALL ABA,
494: AR_RECEIVABLE_APPLICATIONS_ALL RA,
495: AR_PAYMENT_SCHEDULES_ALL PS';
496: ELSE
497: fa_rx_util_pkg.debug(' Report is run for Reporting Set of Books');
498: fa_rx_util_pkg.From_Clause := '
499: AR_CASH_RECEIPTS_ALL_MRC_V CR,
500: FND_DOCUMENT_SEQUENCES DOCSEQ,
501: -- AP_BANK_ACCOUNTS_ALL ABA,
502: CE_BANK_ACCT_USES_OU_V USES,
513: AR_RECEIVABLE_APPS_ALL_MRC_V RA,
514: AR_PAYMENT_SCHEDULES_ALL_MRC_V PS';
515: END IF;
516:
517: fa_rx_util_pkg.debug('Assigning the Where Clause ');
518: fa_rx_util_pkg.Where_Clause := '
519: NVL(RA.CONFIRMED_FLAG,''Y'') = ''Y''
520: AND RA.STATUS IN (''UNAPP'',''ACC'',''UNID'',''OTHER ACC'')
521: AND PS.CASH_RECEIPT_ID = RA.CASH_RECEIPT_ID
514: AR_PAYMENT_SCHEDULES_ALL_MRC_V PS';
515: END IF;
516:
517: fa_rx_util_pkg.debug('Assigning the Where Clause ');
518: fa_rx_util_pkg.Where_Clause := '
519: NVL(RA.CONFIRMED_FLAG,''Y'') = ''Y''
520: AND RA.STATUS IN (''UNAPP'',''ACC'',''UNID'',''OTHER ACC'')
521: AND PS.CASH_RECEIPT_ID = RA.CASH_RECEIPT_ID
522: AND PS.CLASS = ''PMT''
551: '||L_RA_ORG_WHERE||'
552: '||L_PS_ORG_WHERE||'
553: '||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;
554:
555: fa_rx_util_pkg.debug('Assigning the Group By Clause ');
556: fa_rx_util_pkg.Group_By_Clause := '
557: BAT.BATCH_ID,
558: BAT.NAME,
559: CR.CASH_RECEIPT_ID,
552: '||L_PS_ORG_WHERE||'
553: '||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;
554:
555: fa_rx_util_pkg.debug('Assigning the Group By Clause ');
556: fa_rx_util_pkg.Group_By_Clause := '
557: BAT.BATCH_ID,
558: BAT.NAME,
559: CR.CASH_RECEIPT_ID,
560: CR.RECEIPT_NUMBER,
591: BS.NAME,
592: GC.CODE_COMBINATION_ID , '||
593: FORMAT_CURRENCY_DECODE;
594:
595: fa_rx_util_pkg.debug('Assigning the Having Clause ');
596: fa_rx_util_pkg.Having_Clause :=
597: ON_ACC_AMT_DECODE ||' <> 0
598: OR ' || UNAPP_AMT_DECODE ||' <> 0
599: OR ' || CLAIM_AMT_DECODE ||' <> 0
592: GC.CODE_COMBINATION_ID , '||
593: FORMAT_CURRENCY_DECODE;
594:
595: fa_rx_util_pkg.debug('Assigning the Having Clause ');
596: fa_rx_util_pkg.Having_Clause :=
597: ON_ACC_AMT_DECODE ||' <> 0
598: OR ' || UNAPP_AMT_DECODE ||' <> 0
599: OR ' || CLAIM_AMT_DECODE ||' <> 0
600: OR ' || PREPAY_AMT_DECODE||' <> 0 ';
600: OR ' || PREPAY_AMT_DECODE||' <> 0 ';
601:
602:
603:
604: fa_rx_util_pkg.debug('arrx_rc_unapp.before_report()-');
605:
606:
607: END before_report;
608:
619: l_unapp VARCHAR2(80);
620: l_unid VARCHAR2(80);
621: l_unid_cust VARCHAR2(80);
622: begin
623: fa_rx_util_pkg.debug('arrx_rc_unapp.bind()+');
624:
625: IF var.p_gl_date_from IS NOT NULL THEN
626: dbms_sql.bind_variable(c, 'p_gl_date_from', var.p_gl_date_from);
627: END IF;
705: dbms_sql.bind_variable(c, 'L_CONFIRMED' , L_CONFIRMED);
706: dbms_sql.bind_variable(c, 'L_REMITTED' , L_REMITTED);
707: dbms_sql.bind_variable(c, 'L_REVERSED' , L_REVERSED);
708:
709: fa_rx_util_pkg.debug('arrx_rc_unapp.bind()-');
710:
711: END bind;
712: PROCEDURE after_fetch IS
713: begin
710:
711: END bind;
712: PROCEDURE after_fetch IS
713: begin
714: fa_rx_util_pkg.debug('arrx_rc_unapp.after_fetch()+');
715:
716: var.debit_balancing := fa_rx_flex_pkg.get_value(
717: p_application_id => 101,
718: p_id_flex_code => 'GL#',
719: p_id_flex_num => var.p_coa_id,
720: p_qualifier => 'GL_BALANCING',
721: p_ccid => var.account_code_combination_id);
722:
723: fa_rx_util_pkg.debug('arrx_rc_unapp.after_fetch()-');
724: end after_fetch;
725:
726: END ARRX_RC_UNAPP;