DBA Data[Home] [Help]

PACKAGE: APPS.AR_MO_CACHE_UTILS

Source


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