DBA Data[Home] [Help]

PACKAGE: APPS.AR_MO_CACHE_UTILS

Source


1 PACKAGE ar_mo_cache_utils AUTHID CURRENT_USER AS
2     /*$Header: ARMOCSHS.pls 120.16 2011/05/25 09:30:24 naneja ship $ */
3     /* Define a record type that encapsulates one row of operating
4        unit attributes   */
5 
6    TYPE GlobalsRecord is record(
7 
8   /* ------------------------------------------------------------------
9       Generic columns needed by all products
10      ------------------------------------------------------------------ */
11       set_of_books_id               gl_sets_of_books.set_of_books_id%TYPE,
12       set_of_books_name             gl_sets_of_books.name%TYPE,
13       chart_of_accounts_id          gl_sets_of_books.chart_of_accounts_id%TYPE,
14       currency_code                 fnd_currencies.currency_code%TYPE,
15       org_id                        ar_system_parameters.org_id%type,
16 
17    /* ----------------------------------------------------------------------
18       <COLUMN>                      <system options.column name>%TYPE
19       ---------------------------------------------------------------------- */
20       accounting_method             ar_system_parameters.accounting_method%type,
21       accrue_interest               ar_system_parameters.accrue_interest%type,
22       unearned_discount             ar_system_parameters.unearned_discount%type,
23       partial_discount_flag         ar_system_parameters.partial_discount_flag%type,
24       print_remit_to                ar_system_parameters.print_remit_to%type,
25       default_cb_due_date           ar_system_parameters.default_cb_due_date%type,
26       auto_site_numbering           ar_system_parameters.auto_site_numbering%type,
27       cash_basis_set_of_books_id    ar_system_parameters.cash_basis_set_of_books_id%type,
28       code_combination_id_gain      ar_system_parameters.code_combination_id_gain%type,
29       autocash_hierarchy_id         ar_system_parameters.autocash_hierarchy_id%type,
30       run_gl_journal_import_flag    ar_system_parameters.run_gl_journal_import_flag%type,
31       cer_split_amount              ar_system_parameters.cer_split_amount%type,
32       cer_dso_days                  ar_system_parameters.cer_dso_days%type,
33 
34       posting_days_per_cycle        ar_system_parameters.posting_days_per_cycle%type,
35       address_validation            ar_system_parameters.address_validation%type,
36       calc_discount_on_lines_flag   ar_system_parameters.calc_discount_on_lines_flag%type,
37       change_printed_invoice_flag   ar_system_parameters.change_printed_invoice_flag%type,
38       code_combination_id_loss      ar_system_parameters.code_combination_id_loss%type,
39       create_reciprocal_flag        ar_system_parameters.create_reciprocal_flag%type,
40       default_country               ar_system_parameters.default_country%type,
41       default_territory             ar_system_parameters.default_territory%type,
42 
43       generate_customer_number      ar_system_parameters.generate_customer_number%type,
44       invoice_deletion_flag         ar_system_parameters.invoice_deletion_flag%type,
45       location_structure_id         ar_system_parameters.location_structure_id%type,
46       site_required_flag            ar_system_parameters.site_required_flag%type,
47       tax_allow_compound_flag       ar_system_parameters.tax_allow_compound_flag%type,
48       tax_header_level_flag         ar_system_parameters.tax_header_level_flag%type,
49       tax_rounding_allow_override   ar_system_parameters.tax_rounding_allow_override%type,
50       tax_invoice_print             ar_system_parameters.tax_invoice_print%type,
51       tax_method                    ar_system_parameters.tax_method%type,
52 
53       tax_use_customer_exempt_flag  ar_system_parameters.tax_use_customer_exempt_flag%type,
54       tax_use_cust_exc_rate_flag    ar_system_parameters.tax_use_cust_exc_rate_flag%type,
55       tax_use_loc_exc_rate_flag     ar_system_parameters.tax_use_loc_exc_rate_flag%type,
56       tax_use_product_exempt_flag   ar_system_parameters.tax_use_product_exempt_flag%type,
57       tax_use_prod_exc_rate_flag    ar_system_parameters.tax_use_prod_exc_rate_flag%type,
58       tax_use_site_exc_rate_flag    ar_system_parameters.tax_use_site_exc_rate_flag%type,
59       ai_log_file_message_level     ar_system_parameters.ai_log_file_message_level%type,
60       ai_max_memory_in_bytes        ar_system_parameters.ai_max_memory_in_bytes%type,
61 
62       ai_acct_flex_key_left_prompt  ar_system_parameters.ai_acct_flex_key_left_prompt%type,
63       ai_mtl_items_key_left_prompt  ar_system_parameters.ai_mtl_items_key_left_prompt%type,
64       ai_territory_key_left_prompt  ar_system_parameters.ai_territory_key_left_prompt%type,
65       ai_purge_int_tables_flag      ar_system_parameters.ai_purge_interface_tables_flag%type,
66       ai_activate_sql_trace_flag    ar_system_parameters.ai_activate_sql_trace_flag%type,
67       default_grouping_rule_id      ar_system_parameters.default_grouping_rule_id%type,
68       salesrep_required_flag        ar_system_parameters.salesrep_required_flag%type,
69 
70       auto_rec_invoices_per_commit  ar_system_parameters.auto_rec_invoices_per_commit%type,
71       auto_rec_receipts_per_commit  ar_system_parameters.auto_rec_receipts_per_commit%type,
72       pay_unrelated_invoices_flag   ar_system_parameters.pay_unrelated_invoices_flag%type,
73       print_home_country_flag       ar_system_parameters.print_home_country_flag%type,
74       location_tax_account          ar_system_parameters.location_tax_account%type,
75       from_postal_code              ar_system_parameters.from_postal_code%type,
76       to_postal_code                ar_system_parameters.to_postal_code%type,
77 
78       tax_registration_number       ar_system_parameters.tax_registration_number%type,
79       populate_gl_segments_flag     ar_system_parameters.populate_gl_segments_flag%type,
80       unallocated_revenue_ccid      ar_system_parameters.unallocated_revenue_ccid%type,
81       period_set_name               gl_sets_of_books.period_set_name%type,
82 
83       base_precision                fnd_currencies.precision%type,
84       base_EXTENDED_PRECISION       fnd_currencies.EXTENDED_PRECISION%type,
85       base_MIN_ACCOUNTABLE_UNIT     fnd_currencies.MINIMUM_ACCOUNTABLE_UNIT%type,
86       salescredit_name              ra_salesreps.name%type,
87       yes_meaning                   ar_lookups.meaning%type,
88       no_meaning                    ar_lookups.meaning%type,
89       tax_exempt_flag_meaning       ar_lookups.meaning%type ,
90       inclusive_tax_used            ar_system_parameters.inclusive_tax_used%type,
91       tax_enforce_account_flag      ar_system_parameters.tax_enforce_account_flag%type,
92 
93       ta_installed_flag    	    ar_system_parameters.ta_installed_flag%type,
94       br_enabled_flag               ar_system_parameters.bills_receivable_enabled_flag%type,
95 
96 --new begin
97       attribute_category            ar_system_parameters.attribute_category%type,
98       attribute1                    ar_system_parameters.attribute1%type,
99       attribute2                    ar_system_parameters.attribute2%type,
100       attribute3                    ar_system_parameters.attribute3%type,
101       attribute4                    ar_system_parameters.attribute4%type,
102       attribute5                    ar_system_parameters.attribute5%type,
103       attribute6                    ar_system_parameters.attribute6%type,
104       attribute7                    ar_system_parameters.attribute7%type,
105       attribute8                    ar_system_parameters.attribute8%type,
106       attribute9                    ar_system_parameters.attribute9%type,
107       attribute10                   ar_system_parameters.attribute10%type,
108       attribute11                   ar_system_parameters.attribute11%type,
109       attribute12                   ar_system_parameters.attribute12%type,
110       attribute13                   ar_system_parameters.attribute13%type,
111       attribute14                   ar_system_parameters.attribute14%type,
112       attribute15                   ar_system_parameters.attribute15%type,
113 
114       created_by                    ar_system_parameters.created_by%type,
115       creation_date                 ar_system_parameters.creation_date%type,
116       last_updated_by               ar_system_parameters.last_updated_by%type,
117       last_update_date              ar_system_parameters.last_update_date%type,
118       last_update_login             ar_system_parameters.last_update_login%type,
119 
120       tax_code                      ar_system_parameters.tax_code%type,
121       tax_currency_code             ar_system_parameters.tax_currency_code%type,
122       tax_minimum_accountable_unit  ar_system_parameters.tax_minimum_accountable_unit%type,
123       tax_precision                 ar_system_parameters.tax_precision%type,
124       tax_rounding_rule             ar_system_parameters.tax_rounding_rule%type,
125       tax_use_acc_exc_rate_flag     ar_system_parameters.tax_use_account_exc_rate_flag%type,
126       tax_use_system_exc_rate_flag  ar_system_parameters.tax_use_system_exc_rate_flag%type,
127       tax_hier_site_exc_rate        ar_system_parameters.tax_hier_site_exc_rate%type,
128       tax_hier_cust_exc_rate        ar_system_parameters.tax_hier_cust_exc_rate%type,
129       tax_hier_prod_exc_rate        ar_system_parameters.tax_hier_prod_exc_rate%type,
130       tax_hier_account_exc_rate     ar_system_parameters.tax_hier_account_exc_rate%type,
131       tax_hier_system_exc_rate      ar_system_parameters.tax_hier_system_exc_rate%type,
132       tax_database_view_set         ar_system_parameters.tax_database_view_set%type,
133 
134       global_attribute1             ar_system_parameters.global_attribute1%type,
135       global_attribute2             ar_system_parameters.global_attribute2%type,
136       global_attribute3             ar_system_parameters.global_attribute3%type,
137       global_attribute4             ar_system_parameters.global_attribute4%type,
138       global_attribute5             ar_system_parameters.global_attribute5%type,
139       global_attribute6             ar_system_parameters.global_attribute6%type,
140       global_attribute7             ar_system_parameters.global_attribute7%type,
141       global_attribute8             ar_system_parameters.global_attribute8%type,
142       global_attribute9             ar_system_parameters.global_attribute9%type,
143       global_attribute10            ar_system_parameters.global_attribute10%type,
144       global_attribute11            ar_system_parameters.global_attribute11%type,
145       global_attribute12            ar_system_parameters.global_attribute12%type,
146       global_attribute13            ar_system_parameters.global_attribute13%type,
147       global_attribute14            ar_system_parameters.global_attribute14%type,
148       global_attribute15            ar_system_parameters.global_attribute15%type,
149       global_attribute16            ar_system_parameters.global_attribute16%type,
150       global_attribute17            ar_system_parameters.global_attribute17%type,
151       global_attribute18            ar_system_parameters.global_attribute18%type,
152       global_attribute19            ar_system_parameters.global_attribute19%type,
153       global_attribute20            ar_system_parameters.global_attribute20%type,
154       global_attribute_category     ar_system_parameters.global_attribute_category%type,
155 
156       rule_set_id                   ar_system_parameters.rule_set_id%type,
157       code_combination_id_round     ar_system_parameters.code_combination_id_round%type,
158       trx_header_level_rounding     ar_system_parameters.trx_header_level_rounding%type,
159       trx_header_round_ccid         ar_system_parameters.trx_header_round_ccid%type,
160       finchrg_receivables_trx_id    ar_system_parameters.finchrg_receivables_trx_id%type,
161       sales_tax_geocode             ar_system_parameters.sales_tax_geocode%type,
162       rev_transfer_clear_ccid       ar_system_parameters.rev_transfer_clear_ccid%type,
163       sales_credit_pct_limit        ar_system_parameters.sales_credit_pct_limit%type,
164       max_wrtoff_amount             ar_system_parameters.max_wrtoff_amount%type,
165       irec_cc_receipt_method_id     ar_system_parameters.irec_cc_receipt_method_id%type,
166       show_billing_number_flag      ar_system_parameters.show_billing_number_flag%type,
167       cross_currency_rate_type      ar_system_parameters.cross_currency_rate_type%type,
168       document_seq_gen_level        ar_system_parameters.document_seq_gen_level%type,
169       calc_tax_on_credit_memo_flag  ar_system_parameters.calc_tax_on_credit_memo_flag%type,
170       IREC_BA_RECEIPT_METHOD_ID     ar_system_parameters.IREC_BA_RECEIPT_METHOD_ID%type,
171       tm_installed_flag		    VARCHAR2(1),
172       tm_default_setup_flag         VARCHAR2(1),
173       payment_threshold             ar_system_parameters.payment_threshold%type,
174       standard_refund               ar_system_parameters.standard_refund%type,
175       credit_classification1        ar_system_parameters.credit_classification1%type,
176       credit_classification2        ar_system_parameters.credit_classification2%type,
177       credit_classification3        ar_system_parameters.credit_classification3%type,
178       unmtch_claim_creation_flag    ar_system_parameters.unmtch_claim_creation_flag%type,
179       matched_claim_creation_flag   ar_system_parameters.matched_claim_creation_flag%type,
180       matched_claim_excl_cm_flag    ar_system_parameters.matched_claim_excl_cm_flag%type,
181       min_wrtoff_amount             ar_system_parameters.min_wrtoff_amount%type,
182       min_refund_amount             ar_system_parameters.min_refund_amount%type,
183       create_detailed_dist_flag     ar_system_parameters.create_detailed_dist_flag%type,
184       default_rct_mthd_for_lc_inv   ar_system_parameters.default_rct_mthd_for_lc_inv%type
185 --new end
186     /*  End AR-specific fields  */ );
187 
188  /*  ----------------------------------------------------------------------------
189      Define data types (nested tables) for storing columns of the widely used
190      operating unit attributes:
191      ---------------------------------------------------------------------------- */
192 
193                 TYPE SetOfBooksIDTable
194                          IS TABLE OF gl_sets_of_books.set_of_books_id%TYPE;
195                 TYPE SetOfBooksNameTable
196                          IS TABLE OF gl_sets_of_books.name%TYPE;
197                 TYPE ChartOfAccountsIDTable
198                          IS TABLE OF gl_sets_of_books.chart_of_accounts_id%TYPE;
199                 TYPE CurrencyCodeTable
200                          IS TABLE OF fnd_currencies.currency_code%TYPE;
201 
202     /*-----------------------------------------------------------------------------------
203       Begin AR-specific nested tables definitions
204       -----------------------------------------------------------------------------------
205            e.g. TYPE <<column1Table>> IS TABLE OF <<system options.column1>>%TYPE;
206       ----------------------------------------------------------------------------------- */
207 
208 		TYPE  accountingmethodTable
209                         IS TABLE OF      ar_system_parameters.accounting_method%type;
210 		TYPE  accrueinterestTable
211                         IS TABLE OF      ar_system_parameters.accrue_interest%type;
212 		TYPE  unearneddiscountTable
213                         IS TABLE OF      ar_system_parameters.unearned_discount%type;
214 		TYPE  partialdiscountflagTable
215                         IS TABLE OF       ar_system_parameters.partial_discount_flag%type;
216 		TYPE  printremittoTable
217                         IS TABLE OF       ar_system_parameters.print_remit_to%type;
218 		TYPE  defaultcbduedateTable
219                         IS TABLE OF       ar_system_parameters.default_cb_due_date%type;
220 		TYPE  autositenumberingTable
221                         IS TABLE OF       ar_system_parameters.auto_site_numbering%type;
222 		TYPE  cashbasissetofbooksidTable
223                         IS TABLE OF       ar_system_parameters.cash_basis_set_of_books_id%type;
224 		TYPE  codecombinationidgainTable
225                         IS TABLE OF       ar_system_parameters.code_combination_id_gain%type;
226 		TYPE  autocashhierarchyidTable
227                         IS TABLE OF       ar_system_parameters.autocash_hierarchy_id%type;
228 		TYPE  rungljournalimportflagTable
229                         IS TABLE OF       ar_system_parameters.run_gl_journal_import_flag%type;
230 		TYPE  cersplitamountTable
231                         IS TABLE OF       ar_system_parameters.cer_split_amount%type;
232 		TYPE  cerdsodaysTable IS TABLE OF       ar_system_parameters.cer_dso_days%type;
233 		TYPE  postingdayspercycleTable
234                         IS TABLE OF       ar_system_parameters.posting_days_per_cycle%type;
235 		TYPE  addressvalidationTable
236                         IS TABLE OF       ar_system_parameters.address_validation%type;
237 		TYPE  calcdiscountonlinesflagTable
238                         IS TABLE OF       ar_system_parameters.calc_discount_on_lines_flag%type;
239 		TYPE  changeprintedinvoiceflagTable
240                         IS TABLE OF       ar_system_parameters.change_printed_invoice_flag%type;
241 		TYPE  codecombinationidlossTable
242                         IS TABLE OF       ar_system_parameters.code_combination_id_loss%type;
243 		TYPE  createreciprocalflagTable
244                         IS TABLE OF       ar_system_parameters.create_reciprocal_flag%type;
245 		TYPE  defaultcountryTable
246                         IS TABLE OF       ar_system_parameters.default_country%type;
247 		TYPE  defaultterritoryTable
248                         IS TABLE OF       ar_system_parameters.default_territory%type;
249 		TYPE  generatecustomernumberTable
250                         IS TABLE OF       ar_system_parameters.generate_customer_number%type;
251 		TYPE  invoicedeletionflagTable
252                         IS TABLE OF       ar_system_parameters.invoice_deletion_flag%type;
253 		TYPE  locationstructureidTable
254                         IS TABLE OF       ar_system_parameters.location_structure_id%type;
255 		TYPE  siterequiredflagTable
256                         IS TABLE OF       ar_system_parameters.site_required_flag%type;
257 		TYPE  taxallowcompoundflagTable
258                         IS TABLE OF       ar_system_parameters.tax_allow_compound_flag%type;
259 		TYPE  taxheaderlevelflagTable
260                         IS TABLE OF       ar_system_parameters.tax_header_level_flag%type;
261 		TYPE  taxroundingallowoverrideTable
262                         IS TABLE OF       ar_system_parameters.tax_rounding_allow_override%type;
263 		TYPE  taxinvoiceprintTable
264                         IS TABLE OF       ar_system_parameters.tax_invoice_print%type;
265 		TYPE  taxmethodTable   IS TABLE OF       ar_system_parameters.tax_method%type;
266 		TYPE  taxusecustomerexemptflagTable
267                         IS TABLE OF       ar_system_parameters.tax_use_customer_exempt_flag%type;
268 		TYPE  taxusecustexcrateflagTable
269                         IS TABLE OF       ar_system_parameters.tax_use_cust_exc_rate_flag%type;
270 		TYPE  taxuselocexcrateflagTable
271                         IS TABLE OF       ar_system_parameters.tax_use_loc_exc_rate_flag%type;
272 		TYPE  taxuseproductexemptflagTable
273                         IS TABLE OF       ar_system_parameters.tax_use_product_exempt_flag%type;
274 		TYPE  taxuseprodexcrateflagTable
275                         IS TABLE OF       ar_system_parameters.tax_use_prod_exc_rate_flag%type;
276 		TYPE  taxusesiteexcrateflagTable
277                         IS TABLE OF       ar_system_parameters.tax_use_site_exc_rate_flag%type;
278 		TYPE  ailogfilemessagelevelTable
279                         IS TABLE OF       ar_system_parameters.ai_log_file_message_level%type;
280 		TYPE  aimaxmemoryinbytesTable
281                         IS TABLE OF       ar_system_parameters.ai_max_memory_in_bytes%type;
282 		TYPE  aiacctflexkeyleftpromptTable
283                         IS TABLE OF       ar_system_parameters.ai_acct_flex_key_left_prompt%type;
284 		TYPE  aimtlitemskeyleftpromptTable
285                         IS TABLE OF       ar_system_parameters.ai_mtl_items_key_left_prompt%type;
286 		TYPE  aiterritorykeyleftpromptTable
287                         IS TABLE OF       ar_system_parameters.ai_territory_key_left_prompt%type;
288 		TYPE  aipurgeinttablesflagTable
289                         IS TABLE OF       ar_system_parameters.ai_purge_interface_tables_flag%type;
290 		TYPE  aiactivatesqltraceflagTable
291                         IS TABLE OF       ar_system_parameters.ai_activate_sql_trace_flag%type;
292 		TYPE  defaultgroupingruleidTable
293                         IS TABLE OF       ar_system_parameters.default_grouping_rule_id%type;
294 		TYPE  salesreprequiredflagTable
295                         IS TABLE OF       ar_system_parameters.salesrep_required_flag%type;
296 		TYPE  autorecinvoicespercommitTable
297                         IS TABLE OF       ar_system_parameters.auto_rec_invoices_per_commit%type;
298 		TYPE  autorecreceiptspercommitTable
299                         IS TABLE OF       ar_system_parameters.auto_rec_receipts_per_commit%type;
300 		TYPE  payunrelatedinvoicesflagTable
301                         IS TABLE OF       ar_system_parameters.pay_unrelated_invoices_flag%type;
302 		TYPE  printhomecountryflagTable
303                         IS TABLE OF       ar_system_parameters.print_home_country_flag%type;
304 		TYPE  locationtaxaccountTable
305                         IS TABLE OF       ar_system_parameters.location_tax_account%type;
306 		TYPE  frompostalcodeTable
307                         IS TABLE OF       ar_system_parameters.from_postal_code%type;
308 		TYPE  topostalcodeTable
309                         IS TABLE OF       ar_system_parameters.to_postal_code%type;
310 		TYPE  taxregistrationnumberTable
311                         IS TABLE OF       ar_system_parameters.tax_registration_number%type;
312 		TYPE  populateglsegmentsflagTable
313                         IS TABLE OF       ar_system_parameters.populate_gl_segments_flag%type;
314 		TYPE  unallocatedrevenueccidTable
315                         IS TABLE OF       ar_system_parameters.unallocated_revenue_ccid%type;
316 		TYPE  periodsetnameTable
320 		TYPE  baseEXTENDEDPRECISIONTable
317                         IS TABLE OF       gl_sets_of_books.period_set_name%type;
318 		TYPE  baseprecisionTable
319                         IS TABLE OF       fnd_currencies.precision%type;
321                         IS TABLE OF       fnd_currencies.EXTENDED_PRECISION%type;
322 		TYPE  baseMINACCOUNTABLEUNITTable
323                         IS TABLE OF       fnd_currencies.MINIMUM_ACCOUNTABLE_UNIT%type;
324 		TYPE  salescreditnameTable
325                         IS TABLE OF       ra_salesreps.name%type;
326 		TYPE  yesmeaningTable
327                         IS TABLE OF       ar_lookups.meaning%type;
328 		TYPE  nomeaningTable
329                         IS TABLE OF       ar_lookups.meaning%type;
330                 TYPE  taxexemptflagmeaning
331                         IS TABLE OF       ar_lookups.meaning%type ;
332 		TYPE  inclusivetaxusedTable
333                         IS TABLE OF       ar_system_parameters.inclusive_tax_used%type;
334 		TYPE  taxenforceaccountflagTable
335                         IS TABLE OF       ar_system_parameters.tax_enforce_account_flag%type;
336  --begin new chnages
337 
338                 TYPE  tainstalledflagTable
339                         IS TABLE OF 	ar_system_parameters.ta_installed_flag%type;
340                 TYPE  brenabledflagTable
341                          IS TABLE OF 	ar_system_parameters.bills_receivable_enabled_flag%type;
342                 TYPE  attributecategoryTable
343                          IS TABLE OF 	ar_system_parameters.attribute_category%type;
344                 TYPE  attribute1Table
345                          IS TABLE OF 	ar_system_parameters.attribute1%type;
346                 TYPE  attribute2Table
347                          IS TABLE OF 	ar_system_parameters.attribute2%type;
348                 TYPE  attribute3Table
349                          IS TABLE OF 	ar_system_parameters.attribute3%type;
350                 TYPE  attribute4Table
351                          IS TABLE OF 	ar_system_parameters.attribute4%type;
352                 TYPE  attribute5Table
353                          IS TABLE OF 	ar_system_parameters.attribute5%type;
354                 TYPE  attribute6Table
355                         IS TABLE OF 	ar_system_parameters.attribute6%type;
356                 TYPE  attribute7Table
357                          IS TABLE OF 	ar_system_parameters.attribute7%type;
358                 TYPE  attribute8Table
359                          IS TABLE OF 	ar_system_parameters.attribute8%type;
360                 TYPE  attribute9Table
361                          IS TABLE OF 	ar_system_parameters.attribute9%type;
362                 TYPE  attribute10Table
363                          IS TABLE OF 	ar_system_parameters.attribute10%type;
364                 TYPE  attribute11Table
365                          IS TABLE OF 	ar_system_parameters.attribute11%type;
366                 TYPE  attribute12Table
367                          IS TABLE OF 	ar_system_parameters.attribute12%type;
368                 TYPE  attribute13Table
369                          IS TABLE OF 	ar_system_parameters.attribute13%type;
370                 TYPE  attribute14Table
371                          IS TABLE OF 	ar_system_parameters.attribute14%type;
372                 TYPE  attribute15Table
373                          IS TABLE OF 	ar_system_parameters.attribute15%type;
374                 TYPE  createdbyTable
375                         IS TABLE OF 	ar_system_parameters.created_by%type;
376                 TYPE  creationdateTable
377                          IS TABLE OF 	ar_system_parameters.creation_date%type;
378                 TYPE  lastupdatedbyTable
379                          IS TABLE OF 	ar_system_parameters.last_updated_by%type;
380                 TYPE  lastupdatedateTable
381                          IS TABLE OF 	ar_system_parameters.last_update_date%type;
382                 TYPE  lastupdateloginTable
383                          IS TABLE OF 	ar_system_parameters.last_update_login%type;
384                 TYPE  taxcodeTable
385                          IS TABLE OF 	ar_system_parameters.tax_code%type;
386                 TYPE  taxcurrencycodeTable
387                          IS TABLE OF 	ar_system_parameters.tax_currency_code%type;
388                 TYPE  taxminimumaccountableunitTable
389                          IS TABLE OF 	ar_system_parameters.tax_minimum_accountable_unit%type;
390                 TYPE  taxprecisionTable
391                          IS TABLE OF 	ar_system_parameters.tax_precision%type;
392                 TYPE  taxroundingruleTable
393                          IS TABLE OF 	ar_system_parameters.tax_rounding_rule%type;
394                 TYPE  taxuseaccountexcrateflagTable
395                           IS TABLE OF 	ar_system_parameters.tax_use_account_exc_rate_flag%type;
396                 TYPE  taxusesystemexcrateflagTable
397                          IS TABLE OF 	ar_system_parameters.tax_use_system_exc_rate_flag%type;
398                 TYPE  taxhiersiteexcrateTable
399                           IS TABLE OF 	ar_system_parameters.tax_hier_site_exc_rate%type;
400                 TYPE  taxhiercustexcrateTable
401                           IS TABLE OF   ar_system_parameters.tax_hier_cust_exc_rate%type;
402                 TYPE  taxhierprodexcrateTable
403                           IS TABLE OF 	ar_system_parameters.tax_hier_prod_exc_rate%type;
404                 TYPE  taxhieraccountexcrateTable
405                            IS TABLE OF 	ar_system_parameters.tax_hier_account_exc_rate%type;
406                 TYPE  taxhiersystemexcrateTable
407                            IS TABLE OF 	ar_system_parameters.tax_hier_system_exc_rate%type;
408                 TYPE  taxdatabaseviewsetTable
409                            IS TABLE OF 	ar_system_parameters.tax_database_view_set%type;
410                 TYPE  globalattribute1Table
411                            IS TABLE OF 	ar_system_parameters.global_attribute1%type;
412                 TYPE  globalattribute2Table
413                             IS TABLE OF 	ar_system_parameters.global_attribute2%type;
414                 TYPE  globalattribute3Table
415                            IS TABLE OF 	ar_system_parameters.global_attribute3%type;
416                 TYPE  globalattribute4Table
417                            IS TABLE OF 	ar_system_parameters.global_attribute4%type;
418                 TYPE  globalattribute5Table
419                            IS TABLE OF 	ar_system_parameters.global_attribute5%type;
420                 TYPE  globalattribute6Table
421                            IS TABLE OF 	ar_system_parameters.global_attribute6%type;
422                 TYPE  globalattribute7Table
423                            IS TABLE OF 	ar_system_parameters.global_attribute7%type;
424                 TYPE  globalattribute8Table
425                            IS TABLE OF 	ar_system_parameters.global_attribute8%type;
426                 TYPE  globalattribute9Table
427                            IS TABLE OF 	ar_system_parameters.global_attribute9%type;
428                 TYPE  globalattribute10Table
429                            IS TABLE OF 	ar_system_parameters.global_attribute10%type;
430                 TYPE  globalattribute11Table
431                            IS TABLE OF 	ar_system_parameters.global_attribute11%type;
432                 TYPE  globalattribute12Table
433                            IS TABLE OF 	ar_system_parameters.global_attribute12%type;
434                 TYPE  globalattribute13Table
435                            IS TABLE OF 	ar_system_parameters.global_attribute13%type;
436                 TYPE  globalattribute14Table
437                            IS TABLE OF 	ar_system_parameters.global_attribute14%type;
438                 TYPE  globalattribute15Table
439                            IS TABLE OF 	ar_system_parameters.global_attribute15%type;
440                 TYPE  globalattribute16Table
441                            IS TABLE OF 	ar_system_parameters.global_attribute16%type;
442                 TYPE  globalattribute17Table
443                            IS TABLE OF 	ar_system_parameters.global_attribute17%type;
444                 TYPE  globalattribute18Table
445                            IS TABLE OF 	ar_system_parameters.global_attribute18%type;
446                 TYPE  globalattribute19Table
447                            IS TABLE OF 	ar_system_parameters.global_attribute19%type;
448                 TYPE  globalattribute20Table
449                            IS TABLE OF 	ar_system_parameters.global_attribute20%type;
450                 TYPE  globalattributecategoryTable
451                            IS TABLE OF 	ar_system_parameters.global_attribute_category%type;
452                 TYPE  rulesetidTable
453                           IS TABLE OF 	ar_system_parameters.rule_set_id%type;
454                 TYPE  codecombinationidroundTable
455                            IS TABLE OF 	ar_system_parameters.code_combination_id_round%type;
456                 TYPE  trxheaderlevelroundingTable
457                            IS TABLE OF 	ar_system_parameters.trx_header_level_rounding%type;
458                 TYPE  trxheaderroundccidTable
459                            IS TABLE OF 	ar_system_parameters.trx_header_round_ccid%type;
460                 TYPE  finchrgreceivablestrxidTable
461                            IS TABLE OF 	ar_system_parameters.finchrg_receivables_trx_id%type;
462                 TYPE  salestaxgeocodeTable
463                            IS TABLE OF 	ar_system_parameters.sales_tax_geocode%type;
464                 TYPE  revtransferclearccidTable
465                            IS TABLE OF 	ar_system_parameters.rev_transfer_clear_ccid%type;
466                 TYPE  salescreditpctlimitTable
467                             IS TABLE OF 	ar_system_parameters.sales_credit_pct_limit%type;
468                 TYPE  maxwrtoffamountTable
469                           IS TABLE OF 	ar_system_parameters.max_wrtoff_amount%type;
470                 TYPE  irecccreceiptmethodidTable
471                            IS TABLE OF 	ar_system_parameters.irec_cc_receipt_method_id%type;
472                 TYPE  showbillingnumberflagTable
473                            IS TABLE OF 	ar_system_parameters.show_billing_number_flag%type;
474                 TYPE  crosscurrencyratetypeTable
475                           IS TABLE OF 	ar_system_parameters.cross_currency_rate_type%type;
476                 TYPE  documentseqgenlevelTable
477                            IS TABLE OF 	ar_system_parameters.document_seq_gen_level%type;
478                 TYPE  calctaxoncreditmemoflagTable
479                           IS TABLE OF 	ar_system_parameters.calc_tax_on_credit_memo_flag%type;
480                 TYPE  irecbareceiptmethodidTable
481                           IS TABLE OF 	ar_system_parameters.IREC_BA_RECEIPT_METHOD_ID%type;
482                 TYPE  paymentthresholdTable
483                           IS TABLE OF ar_system_parameters.payment_threshold%type;
484                 TYPE  standardrefundTable
485                           IS TABLE OF ar_system_parameters.standard_refund%type;
486                 TYPE  creditclassification1Table
487                           IS TABLE OF ar_system_parameters.credit_classification1%type;
488                 TYPE  creditclassification2Table
489                           IS TABLE OF ar_system_parameters.credit_classification2%type;
490                 TYPE  creditclassification3Table
491                           IS TABLE OF ar_system_parameters.credit_classification3%type;
492                 TYPE  unmtchclaimcreationflagTable
493                           IS TABLE OF ar_system_parameters.unmtch_claim_creation_flag%type;
494                 TYPE  matchedclaimcreationflagTable
495                           IS TABLE OF ar_system_parameters.matched_claim_creation_flag%type;
496                 TYPE  matchedclaimexclcmflagTable
497                           IS TABLE OF ar_system_parameters.matched_claim_excl_cm_flag%type;
498                 TYPE  minwrtoffamountTable
499                           IS TABLE OF ar_system_parameters.min_wrtoff_amount%type;
500                 TYPE  minrefundamountTable
501                           IS TABLE OF ar_system_parameters.min_refund_amount%type;
502                 TYPE  tminstalledflagTable
503                           IS TABLE OF 	VARCHAR2(1);
504                 TYPE  tmdefaultsetupflagTable
505                           IS TABLE OF 	VARCHAR2(1);
506                 TYPE  createdetaileddistflagTable
507                           IS TABLE OF ar_system_parameters.create_detailed_dist_flag%type;
508 
509                 TYPE  defaultrctmthdforlcinvTable
510                           IS TABLE OF ar_system_parameters.default_rct_mthd_for_lc_inv%type;
511 --end new changes
512 
513     /* ---------------------------------------------------------------
514        End AR-specific nested tables definitions
515        --------------------------------------------------------------- */
516 
517     /* ---------------------------------------------------------------
518        Define a nested table for storing the operating unit IDs:
519        ---------------------------------------------------------------  */
520 
521        TYPE OrgIDTable
522                    IS TABLE OF hr_organization_information.organization_id%TYPE;
523 
524     /*  ---------------------------------------------------------------
525         Define a record type that encapsulates multiple rows of
526         operating unit attributes:
527         ---------------------------------------------------------------  */
528 
529 
530        TYPE GlobalsTable is record
534                   chart_of_accounts_id_t                  ChartOfAccountsIDTable,
531                  (org_id_t                                OrgIDTable,
532                   set_of_books_id_t                       SetOfBooksIDTable,
533                   set_of_books_name_t                     SetOfBooksNameTable,
535                   currency_code_t                         CurrencyCodeTable,
536             /* -----------------------------------------------------------------
537                 Begin AR-specific fields
538                 Additional fields   e.g.
539                  <<column1_t>>                     <<column1Table>>
540                -----------------------------------------------------------------   */
541 		  accounting_method_t			  accountingmethodTable,
542 		  accrue_interest_t			  accrueinterestTable,
543 		  unearned_discount_t			  unearneddiscountTable,
544 		  partial_discount_flag_t        	  partialdiscountflagTable,
545 		  print_remit_to_t        		  printremittoTable,
546 		  default_cb_due_date_t			  defaultcbduedateTable,
547 		  auto_site_numbering_t 		  autositenumberingTable ,
548 		  cash_basis_set_of_books_id_t 		  cashbasissetofbooksidTable ,
549 		  code_combination_id_gain_t		  codecombinationidgainTable,
550 		  autocash_hierarchy_id_t 		  autocashhierarchyidTable ,
551 		  run_gl_journal_import_flag_t		  rungljournalimportflagTable,
552 		  cer_split_amount_t     		  cersplitamountTable,
553 		  cer_dso_days_t 			  cerdsodaysTable ,
554 		  posting_days_per_cycle_t		  postingdayspercycleTable,
555 		  address_validation_t  		  addressvalidationTable,
556 		  calc_discount_on_lines_flag_t 	  calcdiscountonlinesflagTable ,
557 		  change_printed_invoice_flag_t		  changeprintedinvoiceflagTable,
558 		  code_combination_id_loss_t 		  codecombinationidlossTable,
559 		  create_reciprocal_flag_t		  createreciprocalflagTable,
560 		  default_country_t   			  defaultcountryTable,
561 		  default_territory_t 			  defaultterritoryTable,
562 		  generate_customer_number_t		  generatecustomernumberTable,
563 		  invoice_deletion_flag_t 		  invoicedeletionflagTable ,
564 		  location_structure_id_t		  locationstructureidTable,
565 		  site_required_flag_t			  siterequiredflagTable,
566 		  tax_allow_compound_flag_t 		  taxallowcompoundflagTable,
567 		  tax_header_level_flag_t 		  taxheaderlevelflagTable,
568 		  tax_rounding_allow_override_t 	  taxroundingallowoverrideTable ,
569 		  tax_invoice_print_t 			  taxinvoiceprintTable,
570 		  tax_method_t  			  taxmethodTable,
571 		  tax_use_customer_exempt_flag_t	  taxusecustomerexemptflagTable,
572 		  tax_use_cust_exc_rate_flag_t 		  taxusecustexcrateflagTable,
573 		  tax_use_loc_exc_rate_flag_t 		  taxuselocexcrateflagTable,
574 		  tax_use_product_exempt_flag_t   	  taxuseproductexemptflagTable,
575 		  tax_use_prod_exc_rate_flag_t		  taxuseprodexcrateflagTable,
576 		  tax_use_site_exc_rate_flag_t  	  taxusesiteexcrateflagTable,
577 		  ai_log_file_message_level_t 		  ailogfilemessagelevelTable,
578 		  ai_max_memory_in_bytes_t		  aimaxmemoryinbytesTable,
579 		  ai_acct_flex_key_left_prompt_t 	  aiacctflexkeyleftpromptTable,
580 		  ai_mtl_items_key_left_prompt_t  	  aimtlitemskeyleftpromptTable,
581 		  ai_territory_key_left_prompt_t 	  aiterritorykeyleftpromptTable,
582 		  ai_purge_int_tables_flag_t 		  aipurgeinttablesflagTable,
583 		  ai_activate_sql_trace_flag_t   	  aiactivatesqltraceflagTable,
584 		  default_grouping_rule_id_t  		  defaultgroupingruleidTable,
585 		  salesrep_required_flag_t     		  salesreprequiredflagTable,
586 		  auto_rec_invoices_per_commit_t 	  autorecinvoicespercommitTable ,
587 		  auto_rec_receipts_per_commit_t  	  autorecreceiptspercommitTable,
588 		  pay_unrelated_invoices_flag_t 	  payunrelatedinvoicesflagTable,
589 		  print_home_country_flag_t   		  printhomecountryflagTable,
590 		  location_tax_account_t    		  locationtaxaccountTable,
591 		  from_postal_code_t   			  frompostalcodeTable,
592 		  to_postal_code_t   			  topostalcodeTable,
593 		  tax_registration_number_t   		  taxregistrationnumberTable,
594 		  populate_gl_segments_flag_t 		  populateglsegmentsflagTable,
595 		  unallocated_revenue_ccid_t  		  unallocatedrevenueccidTable,
596 		  period_set_name_t     		  periodsetnameTable ,
597 		  base_precision_t   			  baseprecisionTable,
598 		  base_EXTENDED_PRECISION_t   		  baseEXTENDEDPRECISIONTable,
599 		  base_MIN_ACCOUNTABLE_UNIT_t  		  baseMINACCOUNTABLEUNITTable,
600 		  salescredit_name_t 			  salescreditnameTable,
601 		  yes_meaning_t     			  yesmeaningTable,
602 		  no_meaning_t       			  nomeaningTable,
603                   tax_exempt_flag_meaning_t               taxexemptflagmeaning,
604 		  inclusive_tax_used_t    		  inclusivetaxusedTable,
605 		  tax_enforce_account_flag_t  		  taxenforceaccountflagTable,
606 --new changes begin
607                    ta_installed_flag_t	                  tainstalledflagTable,
608                    br_enabled_flag_t                      brenabledflagTable,
609 
610                    attribute_category_t	       		attributecategoryTable,
611                    attribute1_t                		attribute1Table,
612                    attribute2_t                		attribute2Table,
613                    attribute3_t	               		attribute3Table,
614                    attribute4_t                		attribute4Table,
615                    attribute5_t                		attribute5Table,
616                    attribute6_t                		attribute6Table,
617                    attribute7_t               	 	attribute7Table,
618                    attribute8_t                		attribute8Table,
619                    attribute9_t                		attribute9Table,
620                    attribute10_t               	 	attribute10Table,
621                    attribute11_t                	attribute11Table,
622                    attribute12_t                	attribute12Table,
623                    attribute13_t                	attribute13Table,
624                    attribute14_t                	attribute14Table,
625                    attribute15_t	                attribute15Table,
626 
627                    created_by_t	               		createdbyTable,
628                    creation_date_t                	creationdateTable,
629                    last_updated_by_t                	lastupdatedbyTable,
630                    last_update_date_t	                lastupdatedateTable,
631                    last_update_login_t                	lastupdateloginTable,
632 
633                    tax_code_t                         	taxcodeTable,
634                    tax_currency_code_t                	taxcurrencycodeTable,
635                    tax_minimum_accountable_unit_t	taxminimumaccountableunitTable,
636                    tax_precision_t			taxprecisionTable,
637                    tax_rounding_rule_t			taxroundingruleTable,
638                    tax_use_acc_exc_rate_flag_t	        taxuseaccountexcrateflagTable,
639                    tax_use_system_exc_rate_flag_t	taxusesystemexcrateflagTable,
640                    tax_hier_site_exc_rate_t		taxhiersiteexcrateTable,
641                    tax_hier_cust_exc_rate_t		taxhiercustexcrateTable,
642                    tax_hier_prod_exc_rate_t		taxhierprodexcrateTable,
643                    tax_hier_account_exc_rate_t		taxhieraccountexcrateTable,
644                    tax_hier_system_exc_rate_t		taxhiersystemexcrateTable,
645                    tax_database_view_set_t		taxdatabaseviewsetTable,
646 
647                    global_attribute1_t			globalattribute1Table,
648                    global_attribute2_t			globalattribute2Table,
649                    global_attribute3_t			globalattribute3Table,
650                    global_attribute4_t			globalattribute4Table,
651                    global_attribute5_t			globalattribute5Table,
652                    global_attribute6_t			globalattribute6Table,
653                    global_attribute7_t			globalattribute7Table,
654                    global_attribute8_t			globalattribute8Table,
655                    global_attribute9_t			globalattribute9Table,
656                    global_attribute10_t			globalattribute10Table,
657                    global_attribute11_t			globalattribute11Table,
658                    global_attribute12_t			globalattribute12Table,
659                    global_attribute13_t			globalattribute13Table,
660                    global_attribute14_t			globalattribute14Table,
661                    global_attribute15_t			globalattribute15Table,
662                    global_attribute16_t			globalattribute16Table,
663                    global_attribute17_t			globalattribute17Table,
664                    global_attribute18_t			globalattribute18Table,
665                    global_attribute19_t			globalattribute19Table,
666                    global_attribute20_t			globalattribute20Table,
667                    global_attribute_category_t		globalattributecategoryTable,
668 
669                    rule_set_id_t			rulesetidTable,
670                    code_combination_id_round_t		codecombinationidroundTable,
671                    trx_header_level_rounding_t		trxheaderlevelroundingTable,
672                    trx_header_round_ccid_t		trxheaderroundccidTable,
673                    finchrg_receivables_trx_id_t		finchrgreceivablestrxidTable,
674                    sales_tax_geocode_t			salestaxgeocodeTable,
675                    rev_transfer_clear_ccid_t		revtransferclearccidTable,
676                    sales_credit_pct_limit_t		salescreditpctlimitTable,
677                    max_wrtoff_amount_t			maxwrtoffamountTable,
678                    irec_cc_receipt_method_id_t		irecccreceiptmethodidTable,
679                    show_billing_number_flag_t		showbillingnumberflagTable,
680                    cross_currency_rate_type_t		crosscurrencyratetypeTable,
681                    document_seq_gen_level_t		documentseqgenlevelTable,
682                    calc_tax_on_credit_memo_flag_t	calctaxoncreditmemoflagTable,
683                    irec_ba_receipt_method_id_t          irecbareceiptmethodidTable,
684                    tm_installed_flag_t                  tminstalledflagTable,
685                    tm_default_setup_flag_t              tmdefaultsetupflagTable,
686                    payment_threshold_t                  paymentthresholdTable,
687                    standard_refund_t                    standardrefundTable,
688                    credit_classification1_t             creditclassification1Table,
689                    credit_classification2_t             creditclassification2Table,
690                    credit_classification3_t             creditclassification3Table,
691                    unmtch_claim_creation_flag_t         unmtchclaimcreationflagTable,
692                    matched_claim_creation_flag_t        matchedclaimcreationflagTable,
693                    matched_claim_excl_cm_flag_t         matchedclaimexclcmflagTable,
694                    min_wrtoff_amount_t                  minwrtoffamountTable,
695                    min_refund_amount_t                  minrefundamountTable,
696                    create_detailed_dist_flag_t		createdetaileddistflagTable,
697                    default_rct_mthd_for_lc_inv_t        defaultrctmthdforlcinvTable
698 --new changes end
699            /* -------------------------------------
700               End AR-specific fields
701               ------------------------------------  */       );
702 
703      /* ---------------------------------------------------------------------
704         This procedure retrieves operating unit attributes from the database
705         and stores them into the specified data structure.
706         ----------------------------------------------------------------------     */
707 
708        PROCEDURE retrieve_globals( p_globals OUT NOCOPY Globalstable,
709                                    p_org_id  IN NUMBER DEFAULT NULL);
710 
711        -- Bug 3251839 - tm_installed and tm_default_setup functions provide a
712        -- wrapper to the TM boolean functions that can be called in sql
713 
714        FUNCTION tm_installed (p_org_id IN NUMBER DEFAULT NULL)
715        RETURN VARCHAR2;
716 
717        FUNCTION tm_default_setup (p_org_id IN NUMBER DEFAULT NULL)
718        RETURN VARCHAR2;
719 
720        PROCEDURE set_org_context_in_api(p_org_id         IN OUT NOCOPY NUMBER,
721                                         p_return_status  OUT    NOCOPY VARCHAR2);
722 
723 END ar_mo_cache_utils;