1 PACKAGE FA_CACHE_PKG as
2 /* $Header: FACACHES.pls 120.9.12010000.3 2008/10/15 14:17:57 gigupta ship $ */
3
4 -- deprn method global variables
5 -- added for new alternative flat depreciation adjustment.
6
7 g_max_array_size number := 200;
8
9 -- PRIVATE TYPES
10 --
11
12 TYPE fazcff_type is RECORD (
13 book_type_code varchar2(15),
14 calendar_type varchar2(15),
15 fiscal_year number,
16 frac number,
17 start_jdate number,
18 end_jdate number);
19
20 TYPE fazccp_type is RECORD (
21 t_calendar varchar2(30),
22 t_fy_name varchar2(30),
23 t_jdate number,
24 period_num number,
25 fiscal_year number,
26 start_jdate number);
27
28 TYPE fazccl_type is RECORD (
29 t_ceiling_name varchar2(30),
30 t_jdate number,
31 t_year number,
32 ceiling number);
33
34 TYPE fazcbr_type is RECORD (
35 t_bonus_rule varchar2(30),
36 t_year number,
37 bonus_rate number,
38 deprn_factor number,
39 alternate_deprn_factor number);
40
41 -- BUG# 1910033 - added for mrc
42 TYPE fazcsob_type is record(
43 set_of_books_id number,
44 mrc_sob_type_code varchar2(1));
45
46
47 TYPE fazctbk_pvt_rec_type IS RECORD
48 (corp_book varchar2(15),
49 tax_book varchar2(15),
50 allow_cip_assets_flag varchar2(3),
51 immediate_copy_flag varchar2(3),
52 copy_group_addition_flag varchar2(3)
53 );
54
55 TYPE fazcrsob_pvt_rec_type IS RECORD
56 (book_type_code varchar2(15),
57 set_of_books_id number
58 );
59
60 TYPE fazcdp_rec_type IS RECORD
61 (book_type_code varchar2(15),
62 period_name varchar2(15),
63 period_counter number,
64 fiscal_year number,
65 period_num number,
66 period_open_date date,
67 period_close_date date,
68 calendar_period_open_date date,
69 calendar_period_close_date date,
70 deprn_run varchar2(1)
71 );
72
73 TYPE fazcsgr_rec_type IS RECORD
74 (super_group_id number,
75 book_type_code varchar2(15),
76 start_period_counter number(15),
77 end_period_counter number(15),
78 deprn_method_code varchar2(15),
79 basic_rate number,
80 adjusted_rate number,
81 percent_salvage_value number
82 );
83
84 TYPE fazcdbr_rec_type is RECORD (
85 deprn_basis_rule_id FA_DEPRN_BASIS_RULES.DEPRN_BASIS_RULE_ID%TYPE,
86 rule_name FA_DEPRN_BASIS_RULES.RULE_NAME%TYPE,
87 user_rule_name FA_DEPRN_BASIS_RULES.USER_RULE_NAME%TYPE,
88 last_update_date FA_DEPRN_BASIS_RULES.LAST_UPDATE_DATE%TYPE,
89 last_updated_by FA_DEPRN_BASIS_RULES.LAST_UPDATED_BY%TYPE,
90 created_by FA_DEPRN_BASIS_RULES.CREATED_BY%TYPE,
91 creation_date FA_DEPRN_BASIS_RULES.CREATION_DATE%TYPE,
92 last_update_login FA_DEPRN_BASIS_RULES.LAST_UPDATE_LOGIN%TYPE,
93 rate_source FA_DEPRN_BASIS_RULES.RATE_SOURCE%TYPE,
94 deprn_basis FA_DEPRN_BASIS_RULES.DEPRN_BASIS%TYPE,
95 enabled_flag FA_DEPRN_BASIS_RULES.ENABLED_FLAG%TYPE,
96 program_name FA_DEPRN_BASIS_RULES.PROGRAM_NAME%TYPE,
97 description FA_DEPRN_BASIS_RULES.DESCRIPTION%TYPE,
98 polish_rule NUMBER
99 );
100
101 -- BUG# 1913745 - implementing arrays to recuce db hits
102
103 TYPE fazcbc_type_tab is table of FA_BOOK_CONTROLS%RowType
104 index by binary_integer;
105 TYPE fazcct_type_tab is table of FA_CALENDAR_TYPES%RowType
106 index by binary_integer;
107 TYPE fazcff_type_tab is table of fazcff_type
108 index by binary_integer;
109 TYPE fazccp_type_tab is table of fazccp_type
110 index by binary_integer;
111 TYPE fazccb_type_tab is table of FA_CATEGORY_BOOKS%RowType
112 index by binary_integer;
113 TYPE fazccmt_type_tab is table of FA_METHODS%Rowtype
114 index by binary_integer;
115 TYPE fazccl_type_tab is table of fazccl_type
116 index by binary_integer;
117 TYPE fazcbr_type_tab is table of fazcbr_type
118 index by binary_integer;
119 TYPE fazcsob_type_tab is table of fazcsob_type
120 index by binary_integer;
121 TYPE fazccbd_type_tab is table of FA_CATEGORY_BOOK_DEFAULTS%rowtype
122 index by binary_integer;
123 TYPE fazcat_type_tab is table of FA_CATEGORIES%rowtype
124 index by binary_integer;
125 TYPE fazctbk_tbl_type IS TABLE OF VARCHAR2(15)
126 INDEX BY BINARY_INTEGER;
127 TYPE fazctbk_pvt_tbl_type IS TABLE OF fazctbk_pvt_rec_type
128 INDEX BY BINARY_INTEGER;
129 TYPE fazcrsob_sob_tbl_type IS TABLE OF NUMBER
130 INDEX BY BINARY_INTEGER;
131 TYPE fazcrsob_book_tbl_type IS TABLE OF VARCHAR2(15)
132 INDEX BY BINARY_INTEGER;
133 TYPE fazcrsob_pvt_tbl_type IS TABLE OF fazcrsob_pvt_rec_type
134 INDEX BY BINARY_INTEGER;
135 TYPE fazccvt_type_tab is table of FA_CONVENTION_TYPES%rowtype
136 index by binary_integer;
137 TYPE fazcfy_type_tab is table of FA_FISCAL_YEAR%rowtype
138 index by binary_integer;
139 TYPE fazcdp_type_tab is table of fazcdp_rec_type
140 index by binary_integer;
141 TYPE fazcdbr_type_tab is table of fazcdbr_rec_type
142 index by binary_integer;
143 TYPE fazcfor_type_tab is table of FA_FORMULAS%rowtype
144 index by binary_integer;
145 TYPE fazcdrd_type_tab is table of FA_DEPRN_RULE_DETAILS%rowtype
146 index by binary_integer;
147 TYPE fazcsgr_type_tab is table of fazcsgr_rec_type
148 index by binary_integer;
149
150 -- fazcbc variables
151 fazcbc_record FA_BOOK_CONTROLS%RowType;
152 fazcbc_table fazcbc_type_tab;
153 fazcbc_index number; -- used to store the index of last
154 -- book's position in array. will
155 -- be used to delete a member when
156 -- transaction approval finds it stale
157
158 -- fazcbcs variables
159 fazcbcs_record FA_BOOK_CONTROLS%RowType;
160 fazcbcs_table fazcbc_type_tab;
161 fazcbcs_index number; -- used to store the index of last
162 -- book's position in array. will
163 -- be used to delete a member when
164 -- transaction approval finds it stale
165
166
167
168 -- fazcct variables
169 fazcct_record FA_CALENDAR_TYPES%RowType;
170 fazcct_table fazcct_type_tab;
171
172 -- faxcff variables
173 fazcff_record fazcff_type;
174 fazcff_table fazcff_type_tab;
175
176 -- fazccl variables
177 fazccl_record fazccl_type;
178 fazccl_table fazccl_type_tab;
179
180 -- fazcbr variables
181 fazcbr_record fazcbr_type;
182 fazcbr_table fazcbr_type_tab;
183
184 -- fazccp variables
185 fazccp_record fazccp_type;
186 fazccp_table fazccp_type_tab;
187
188 -- fazccb variables
189 fazccb_record FA_CATEGORY_BOOKS%RowType;
190 fazccb_table fazccb_type_tab;
191
192 -- fazccmt variables
193 fazccmt_record FA_METHODS%RowType;
194 fazccmt_table fazccmt_type_tab;
195
196 -- fazcsob variables (added for mrc)
197 fazcsob_record fazcsob_type;
198 fazcsob_table fazcsob_type_tab;
199
200 -- fazccbd variables
201 fazccbd_record FA_CATEGORY_BOOK_DEFAULTS%RowType;
202 fazccbd_table fazccbd_type_tab;
203
204 -- fazcat variables
205 fazcat_record FA_CATEGORIES%RowType;
206 fazcat_table fazcat_type_tab;
207
208 -- fazsys variables
209 fazsys_record FA_SYSTEM_CONTROLS%RowType;
210
211 -- fazctbk variables
212 fazctbk_last_book_used VARCHAR2(15);
213 fazctbk_last_type_used VARCHAR2(15);
214 fazctbk_main_tbl fazctbk_pvt_tbl_type;
215 fazctbk_corp_tbl fazctbk_tbl_type;
216 fazctbk_tax_tbl fazctbk_tbl_type;
217
218 -- fazcrsob variables
219 fazcrsob_last_book_used VARCHAR2(15);
220 fazcrsob_main_tbl fazcrsob_pvt_tbl_type;
221 fazcrsob_book_tbl fazcrsob_book_tbl_type;
222 fazcrsob_sob_tbl fazcrsob_sob_tbl_type;
223
224 -- fazccvt variables
225 fazccvt_record FA_CONVENTION_TYPES%RowType;
226 fazccvt_table fazccvt_type_tab;
227
228 -- fazcfy variables
229 fazcfy_record FA_FISCAL_YEAR%RowType;
230 fazcfy_table fazcfy_type_tab;
231
232 -- fazcdp variables
233 fazcdp_record fazcdp_rec_type;
234 fazcdp_table fazcdp_type_tab;
235 fazcdp_index number; -- used to store the index of last
236 -- period's position in array. will
237 -- be used to delete a member when
238 -- transaction approval finds it stale
239
240 -- fazcdbr variables
241 fazcdbr_record fazcdbr_rec_type;
242 fazcdbr_table fazcdbr_type_tab;
243 fazcdbr_index number;
244
245 -- fazcfor variables
246 fazcfor_record fa_formulas%RowType;
247 fazcfor_table fazcfor_type_tab;
248 fazcfor_index number;
249
250
251 -- fazcdrd variables
252 fazcdrd_record fa_deprn_rule_details%RowType;
253 fazcdrd_table fazcdrd_type_tab;
254 fazcdrd_index number;
255
256 -- fazcdp variables
257 fazcsgr_record fazcsgr_rec_type;
258 fazcsgr_table fazcsgr_type_tab;
259
260
261 -- profile variables
262 -- we will be caching these profile values as it's simply
263 -- to expensive to continously call the fnd_profile code - bmr
264
265 fa_profile_init boolean := FALSE;
266 fa_crl_enabled boolean ;
267 fa_print_debug boolean ;
268 fa_debug_file varchar2(240) ;
269 fa_use_threshold boolean ;
270 fa_gen_expense_account boolean ;
271 fa_pregen_asset_account boolean ;
272 fa_pregen_book_account boolean ;
273 fa_pregen_cat_account boolean ;
274 fa_mcp_all_cost_adj boolean ;
275 fa_annual_round varchar2(240) ;
276 fa_deprn_override_enabled boolean ;
277 fa_enabled_deprn_basis_formula boolean ;
278
279 fa_batch_size number ;
280 fa_custom_gen_ccid boolean ;
281
282 -- not frequently used in pl/sql
283 -- fa_time_diagnostic varchar2(3) ;
284 -- fa_cache_usage number ;
285 -- fa_num_par_requests number ;
286 -- fa_num_massadd_par_requests number ;
287 -- fa_num_genaccts_par_requests number ;
288 -- fa_security_profile_id varchar2(240) ;
289
290 -- fa_archive_table_size number ;
291 -- fa_ins_swiss_builing varchar2(3) ;
292 -- fa_deprn_single varchar2(3) ;
293 -- fa_default_dpis_to_inv_date varchar2(3) ;
294 -- fa_include_nonrec_tax_massadds varchar2(3) ;
295 -- FADI_ASSET_CREATION_PRIVS varchar2() ;
296 -- FADI_ASSET_PI_PRIVS varchar2() ;
297
298 -- fa_large_rollback varchar2(240) ;
299
300 /*
301 --------------------------------------------------------------------------
302 *
303 * Name
304 * fazcbc
305 *
306 * Description
307 * Cache FA_BOOK_CONTROLS information
308 *
309 * Parameters
310 * X_book - book type code to get information about
311 *
312 * Modifies
313 * fazcbc_record - stores book information in this
314 * structure.
315 * fazcct_last_used - stores book type code most
316 * recently retrieved.
317 *
318 * Returns
319 * True on successful retrieval. Otherwise False.
320 *
321 * Notes
322 *
323 * History
324 *
325 *--------------------------------------------------------------------------
326 */
327 FUNCTION fazcbc
328 (
329 X_book in varchar2,
330 p_log_level_rec in fa_api_types.log_level_rec_type default null
331 )
332 return boolean;
333
334
335 /*
336 --------------------------------------------------------------------------
337 *
338 * Name
339 * fazcbcs
340 *
341 * Description
342 * Cache FA_BOOK_CONTROLS by SOB information
343 *
344 * Parameters
345 * X_book - book type code to get information about
346 *
347 * Modifies
348 * fazcbcs_record - stores book information in this
349 * structure.
350 * fazcbcs_table - stores book information in this
351 * array
352 *
353 * Returns
354 * True on successful retrieval. Otherwise False.
355 *
356 * Notes
357 *
358 * This can be used for transaction bases processing in MRC
359 * namely for retrieving values that may differ between the
363 * this to retrieve the reporting book info.
360 * primary and reporting books.
361 *
362 * Both the gl sob profile and currency_context must be set for
364 *
365 * History
366 * 08-08-2001 bridgway created
367 *
368 *--------------------------------------------------------------------------
369 */
370 FUNCTION fazcbcs
371 (
372 X_book in varchar2,
373 p_log_level_rec in fa_api_types.log_level_rec_type default null
374 )
375 return boolean;
376
377
378 /*
379 --------------------------------------------------------------------------
380 *
381 * Name
382 * fazcbc_clr
383 *
384 * Description
385 * Cache FA_BOOK_CONTROLS clear row function
386 *
387 * Parameters
388 * X_book - book type code to get information about
389 * not currently used (always deletes lat used row)
390 * Modifies
391 * fazcbc_record_array - remove book info in array
392 * fazcct_record - remove book info in record
393 *
394 * Returns
395 * True on successful removal. Otherwise False.
396 *
397 * Notes
398 *
399 * History 08/06/01 bridgway created
400 *
401 *--------------------------------------------------------------------------
402 */
403 FUNCTION fazcbc_clr
404 (
405 X_book in varchar2,
406 p_log_level_rec in fa_api_types.log_level_rec_type default null
407
408 )
409 return boolean;
410
411
412 /*
413 --------------------------------------------------------------------------
414 *
415 * Name
416 * fazcct
417 *
418 * Description
419 * Cache FA_CALENDAR_TYPES information
420 *
421 * Parameters
422 * X_calendar - calendar type to get information about
423 *
424 * Modifies
425 * fazcct_record - stores calendar information in this
426 * structure.
427 * fazcct_last_used - stores calendar type most
428 * recently retrieved.
429 *
430 * Returns
431 * True on successful retrieval. Otherwise False.
432 *
433 * Notes
434 *
435 * History
436 *
437 *--------------------------------------------------------------------------
438 */
439 FUNCTION fazcct
440 (
441 X_calendar in varchar2,
442 p_log_level_rec in fa_api_types.log_level_rec_type default null
443 )
444 return boolean;
445
446
447 /*
448 --------------------------------------------------------------------------
449 *
450 * Name
451 * fazcff
452 *
453 * Description
454 * Cache fractions of Fiscal Year for Calendar Periods
455 *
456 * Parameters
457 * X_calendar - calendar type
458 * X_book - book_type_code
459 * X_fy - fiscal_year
460 * X_period_fracs - table to put fractions (OUT)
461 *
462 * Modifies
463 * X_period_fracs
464 *
465 * Returns
466 * True on successful retrieval. Otherwise False.
467 *
468 * Notes
469 *
470 * History
471 *
472 *--------------------------------------------------------------------------
473 */
474 FUNCTION fazcff
475 (
476 X_calendar varchar2,
477 X_book varchar2,
478 X_fy integer,
479 X_period_fracs out NOCOPY fa_std_types.table_fa_cp_struct,
480 p_log_level_rec in fa_api_types.log_level_rec_type default null
481 )
482 return boolean;
483
484
485 /*
486 --------------------------------------------------------------------------
487 *
488 * Name
489 * fazccl
490 *
491 * Description
492 * Cache FA_CEILINGS information
493 *
494 * Parameters
495 * X_target_ceiling_name - ceiling name
496 * X_target_year - year_of_life
497 * X_target_jdate - start_date
498 * X_ceiling - ceiling (OUT)
499 *
500 * Modifies
501 * X_ceiling
502 *
503 * Returns
504 * True on successful retrieval. Otherwise False.
505 *
506 * Notes
507 *
508 * History
509 *
510 *--------------------------------------------------------------------------
511 */
512 FUNCTION fazccl
513 (
514 X_target_ceiling_name varchar2,
515 X_target_jdate integer,
516 X_target_year integer,
517 X_ceiling out NOCOPY number,
518 p_log_level_rec in fa_api_types.log_level_rec_type default null
519 )
520 return boolean;
521
522
523 /*
524 --------------------------------------------------------------------------
525 *
526 * Name
527 * fazcbr
528 *
529 * Description
530 * Cache Bonus Rate
534 * X_target_year - year
531 *
532 * Parameters
533 * X_target_bonus_rule - rule
535 * X_bonus_rate - bonus_rate (OUT)
536 * X_deprn_factor - deprn_factor (OUT)
537 * X_alternate_deprn_factor - alternate_deprn_factor (OUT)
538 *
539 * Modifies
540 * X_bonus_rate
541 * X_deprn_factor
542 * X_alternate_deprn_factor
543 *
544 * Returns
545 * True on successful retrieval. Otherwise False.
546 *
547 * Notes
548 *
549 * History
550 *
551 *--------------------------------------------------------------------------
552 */
553 FUNCTION fazcbr
554 (
555 X_target_bonus_rule varchar2,
556 X_target_year number,
557 X_bonus_rate out NOCOPY number,
558 X_deprn_factor out NOCOPY number,
559 X_alternate_deprn_factor out NOCOPY number,
560 p_log_level_rec in fa_api_types.log_level_rec_type default null
561 )
562 return boolean;
563
564
565 /*
566 --------------------------------------------------------------------------
567 *
568 * Name
569 * fazccp
570 *
571 * Description
572 * Cache FA_CALENDAR_PERIODS and FA_FISCAL_YEAR information
573 *
574 * Parameters
575 * X_target_calendar - target calendar type
576 * X_target_fy_name - target fiscal year name
577 * X_target_jdate - target start date
578 * X_period_num (OUT) - period number
579 * X_fiscal_year (OUT) - fiscal year
580 * X_start_jdate (OUT) - start date
581 *
582 * Modifies
583 * X_period_num
584 * X_fiscal_year
585 * X_start_jdate
586 * fazccp_record - structure to store cached information
587 *
588 * Returns
589 * True on successful retrieval. Otherwise False.
590 *
591 * Notes
592 *
593 * History
594 *
595 *--------------------------------------------------------------------------
596 */
597 FUNCTION fazccp
598 (
599 X_target_calendar varchar2,
600 X_target_fy_name varchar2,
601 X_target_jdate number,
602 X_period_num in out NOCOPY number,
603 X_fiscal_year in out NOCOPY number,
604 X_start_jdate in out NOCOPY number,
605 p_log_level_rec in fa_api_types.log_level_rec_type default null
606 )
607 return boolean;
608
609
610 /*
611
612 --------------------------------------------------------------------------
613 *
614 * Name
615 * fazccmt
616 *
617 * Description
618 * Cache Methods
619 *
620 * Parameters
621 * X_method - method code
622 * X_life - life in months
623 * X_method_id - method id
624 * X_depr_last_year_flag - depreciate in last year flag
625 * X_rate_source_rule - rate source
626 * X_deprn_basis_rule - depreciation basis
627 * X_excl_salvage_val_flag - boolean
628 *
629 * Modifies
630 * X_method_id
631 * X_depr_last_year_flag
632 * X_rate_source_rule
633 * X_deprn_basis_rule
634 * X_excl_salvage_val_flag
635 *
636 * Returns
637 * True on successful retrieval. Otherwise False.
638 *
639 * Notes
640 *
641 * History
642 *
643 *--------------------------------------------------------------------------
644 */
645 FUNCTION fazccmt
646 (
647 X_method varchar2,
648 X_life integer,
649 p_log_level_rec in fa_api_types.log_level_rec_type default null
650 )
651 return boolean;
652
653
654 /*
655 --------------------------------------------------------------------------
656 *
657 * Name
658 * fazccb
659 *
660 * Description
661 * Cache FA_CATEGORY_BOOKS information
662 *
663 * Parameters
664 * X_book - book type code to get information about
665 * X_cat_id-category id to get the information about
666 * Modifies
667 * fazccb_record - stores category book information being
668 * retrieved.
669 * fazccb_last_book - stores book most recently retrieved
670 * fazccb_last_cat - stores category id most recently retrieved
671 * Returns
672 * True on successful retrieval. Otherwise False.
673 *
674 * Notes
675 *
676 * History
677 *
678 *--------------------------------------------------------------------------
679 */
680 FUNCTION fazccb
681 (
682 X_book in varchar2,
683 X_cat_id in number,
684 p_log_level_rec in fa_api_types.log_level_rec_type default null
685 )
686 return boolean;
687
688 /*
689 --------------------------------------------------------------------------
690 *
694 * Description
691 * Name
692 * fazcsob
693 *
695 * Cache GL_SETS_OF_BOOKS information
696 *
697 * Parameters
698 * X_set_of_books_id - book type code to get information about
699 * X_mrc_sob_type_code (OUT) - the value for the mrctype flag
700 * Modifies
701 * fazcsob_record - stores book information being retrieved
702 * fazcsob_last_sob - stores sob id most recently retrieved
703 * fazcsob_table - stores a list of of all sob's and the
704 * sob_type retrieved in the current session
705 *
706 * Returns
707 * True on successful retrieval. Otherwise False.
708 *
709 * Notes Currently, this is coded only toi return the value for the
710 * column in question. The Pro*C version could return any
711 * desired column and this could eaisly be modified to do
712 * the same
713 *
714 * History 07/30/2001 bridgway created
715 *
716 *--------------------------------------------------------------------------
717 */
718
719 FUNCTION fazcsob
720 (
721 X_set_of_books_id in number,
722 X_mrc_sob_type_code out NOCOPY varchar,
723 p_log_level_rec in fa_api_types.log_level_rec_type default null
724 )
725 return boolean;
726
727
728
729 /*
730 --------------------------------------------------------------------------
731 *
732 * Name
733 * fazccbd
734 *
735 * Description
736 * Cache FA_CATEGORY_BOOK_DEFAULTS information
737 *
738 * Parameters
739 * X_book - book type code to get information about
740 * X_cat_id - category id to get the information about
741 * X_dpis - julian dpis to get the information about
742 * Modifies
743 * fazccbd_record - stores category book information being retrieved
744 * fazccbd_table - stores a list of all category book records
745 * retrieved in the current session
746 *
747 * Returns
748 * True on successful retrieval. Otherwise False.
749 *
750 * Notes
751 *
752 * History 08/30/2001 bridgway created
753 *
754 *--------------------------------------------------------------------------
755 */
756 FUNCTION fazccbd
757 (
758 X_book in varchar2,
759 X_cat_id in number,
760 X_jdpis in number,
761 p_log_level_rec in fa_api_types.log_level_rec_type default null
762 )
763 return boolean;
764
765
766
767 /*
768 --------------------------------------------------------------------------
769 *
770 * Name
771 * fazcat
772 *
773 * Description
774 * Cache FA_CATEGORIES information
775 *
776 * Parameters
777 * X_cat_id - category id to get the information about
778 *
779 * Modifies
780 * fazcat_record - stores category being retrieved
781 * fazcat_table - stores a list of categories previously
782 * retrieved in the current session
783 *
784 * Returns
785 * True on successful retrieval. Otherwise False.
786 *
787 * Notes
788 *
789 * History 10/06/2001 bridgway created
790 *
791 *--------------------------------------------------------------------------
792 */
793 FUNCTION fazcat
794 (
795 X_cat_id in number,
796 p_log_level_rec in fa_api_types.log_level_rec_type default null
797 )
798 return boolean;
799
800
801
802 /*
803 --------------------------------------------------------------------------
804 *
805 * Name
806 * fazsys
807 *
808 * Description
809 * Cache FA_SYSTEM_CONTROLS information
810 *
811 * Parameters
812 * NONE
813 *
814 * Modifies
815 * fazsys_record - stores system control information
816 *
817 * Returns
818 * True on successful retrieval. Otherwise False.
819 *
820 * Notes
821 *
822 * History 10/06/2001 bridgway created
823 *
824 *--------------------------------------------------------------------------
825 */
826 FUNCTION fazsys return boolean;
827
828
829 /*
830 *--------------------------------------------------------------------------
831 *
832 * Name
833 * fazctbk
834 *
835 * Description
836 * Cache FA_TAX_BOOKS information
837 *
838 * Used by the new APIs to retrieve the associated tax books
839 * for which we want to do cip-in-tax or autocopy on for a
840 * given transaction
841 *
842 * Parameters
843 * x_corp_book (in) - corporate book for which you wish to
844 * retrieve a list of tax books
845 * x_asset_type (in) - asset type for which to get associated
846 * tax books (CIP or CAPITALIZED)
847 * x_tax_book_tbl (out) - table of tax books for the book / type
848 *
849 * Modifies
853 * fazctbk_main_tbl private table storing all books and
850 * fazctbk_last_book_used last book for which cache was called
851 * fazctbk_last_type_used last asset_type for which the cache
852 * was called
854 * reporting sob_ids for which cache
855 * has been called
856 * fazctbk_corp_tbl private table storing list of all
857 * corporate books for which cache
858 * has been called
859 * fazctbk_tax_tbl private table storing the last
860 * list of tax book for the book in
861 * fazctbk_last_book_used
862 *
863 * Returns
864 * True on successful retrieval. Otherwise False.
865 *
866 * Notes
867 *
868 * History 11/02/2001 bridgway/yyoon created
869 *
870 *--------------------------------------------------------------------------
871 */
872
873 Function fazctbk
874 (
875 x_corp_book in varchar2,
876 x_asset_type in varchar2,
877 x_tax_book_tbl out NOCOPY fazctbk_tbl_type,
878 p_log_level_rec in fa_api_types.log_level_rec_type default null
879 )
880 return boolean;
881
882
883 /*
884 *--------------------------------------------------------------------------
885 *
886 * Name
887 * fazcrsob
888 *
889 * Description
890 * Cache REPORTING Set Of Books information
891 *
892 * Used by APIs to retrieve a list of all enabled and
893 * converted reporting options (by sob_id)
894 *
895 *
896 * Parameters
897 * x_book_type_code (IN) - book for which you wish to retrieve
898 * a listing of reporting options
899 * x_sob_tbl(OUT) - table of all enabled and converted
900 * sob_ids for this book
901 *
902 * Modifies
903 * x_sob_tbl (OUT param)
904 * fazcrsob_last_book_used last for which cache was called
905 * fazcrsob_main_tbl private table storing all books and
906 * reporting sob_ids for which cache
907 * has been called
908 * fazcrsob_book_tbl private table storing list of all books
909 * for which cache has been called
910 * fazcrsob_sob_tbl private table storing the last
911 * list of sob_ids for the last_book_used
912 *
913 * Returns
914 * True on successful retrieval. Otherwise False.
915 *
916 * Notes
917 *
918 * History 11/02/2001 bridgway/yyoon created
919 *
920 *--------------------------------------------------------------------------
921 */
922
923 Function fazcrsob
924 (
925 x_book_type_code in varchar2,
926 x_sob_tbl out NOCOPY fazcrsob_sob_tbl_type,
927 p_log_level_rec in fa_api_types.log_level_rec_type default null
928 )
929 return boolean;
930
931 /*
932 *--------------------------------------------------------------------------
933 *
934 * Name
935 * fazccvt
936 *
937 * Description
938 * Cache ConVention Types information
939 *
940 * Used by APIs to validate and retrieve a convention's info
941 *
942 *
943 * Parameters
944 * x_prorate_convention_code (IN) - convention which you wish
945 * to retrieve info
946 * x_fiscal_year_name (IN) - fy name for which you wish
947 * to retrieve info
948 *
949 * Modifies
950 * fazccvt_record - stores convention information being retrieved
951 * fazccvt_table - stores a table of all convention retrieved so far
952 *
953 * Returns
954 * True on successful retrieval. Otherwise False.
955 *
956 * Notes
957 *
958 * History 01/13/2002 bridgway created
959 *
960 *--------------------------------------------------------------------------
961 */
962
963 Function fazccvt
964 (
965 x_prorate_convention_code in varchar2,
966 x_fiscal_year_name in varchar2,
967 p_log_level_rec in fa_api_types.log_level_rec_type default null
968 )
969 return boolean;
970
971
972 /*
973 *--------------------------------------------------------------------------
974 *
975 * Name
976 * fazcfy
977 *
978 * Description
979 * Cache Fiscal Years information
980 *
981 * Used by APIs to validate and retrieve a fiscal years info
982 *
983 *
984 * Parameters
985 * x_fiscal_year_name (IN) - fy name for which you wish
986 * to retrieve info
987 * x_fiscal_year (IN) - fy for which you wish
988 * to retrieve info
989 *
990 * Modifies
991 * fazcfy_record - stores fy information being retrieved
992 * fazcfy_table - stores a table of all fy retrieved so far
996 *
993 *
994 * Returns
995 * True on successful retrieval. Otherwise False.
997 * Notes
998 *
999 * History 01/13/2002 bridgway created
1000 *
1001 *--------------------------------------------------------------------------
1002 */
1003
1004 Function fazcfy
1005 (
1006 x_fiscal_year_name in varchar2,
1007 x_fiscal_year in number,
1008 p_log_level_rec in fa_api_types.log_level_rec_type default null
1009 )
1010 return boolean;
1011
1012 /*
1013 *--------------------------------------------------------------------------
1014 *
1015 * Name
1016 * fazcdp
1017 *
1018 * Description
1019 * Cache Deprn Period information
1020 *
1021 * Used by APIs to validate and retrieve deprn period info
1022 *
1023 *
1024 * Parameters
1025 * x_book_type_code (IN) - book for which you wish
1026 * to retrieve info
1027 * x_period_counter (IN) - period counter which you wish
1028 * to retrieve info
1029 * x_effective_date (IN) - date_effective for which you wish
1030 * to retrieve info
1031 *
1032 * Modifies
1033 * fazcdp_record - stores period information being retrieved
1034 * fazcdp_table - stores a table of all period retrieved so far
1035 * fazcdp_index - stores index in table of the info retireved
1036 *
1037 * Returns
1038 * True on successful retrieval. Otherwise False.
1039 *
1040 * Notes
1041 *
1042 * History 01/13/2002 bridgway created
1043 *
1044 *--------------------------------------------------------------------------
1045 */
1046
1047 Function fazcdp
1048 (
1049 x_book_type_code in varchar2,
1050 x_period_counter in number default null,
1051 x_effective_date in date default null,
1052 p_log_level_rec in fa_api_types.log_level_rec_type default null
1053 )
1054 return boolean;
1055
1056
1057 /*
1058 *--------------------------------------------------------------------------
1059 *
1060 * Name
1061 * fazcdp_clr
1062 *
1063 * Description
1064 * Cache Deprn Period information Clear Row
1065 *
1066 * Used by APIs to remove a stale row from cache
1067 *
1068 *
1069 * Parameters
1070 * x_book_type_code (IN) - not currently used
1071 * always deletes last accessed row
1072 *
1073 * Modifies
1074 * fazcdp_record - stores period information being retrieved
1075 * fazcdp_table - stores a table of all period retrieved so far
1076 *
1077 * Returns
1078 * True on successful retrieval. Otherwise False.
1079 *
1080 * Notes
1081 *
1082 * History 01/13/2002 bridgway created
1083 *
1084 *--------------------------------------------------------------------------
1085 */
1086
1087 Function fazcdp_clr
1088 (
1089 x_book in varchar2,
1090 p_log_level_rec in fa_api_types.log_level_rec_type default null
1091 )
1092 return boolean;
1093
1094 Function fazprof return boolean;
1095
1096 /*
1097 *--------------------------------------------------------------------------
1098 *
1099 * Name
1100 * fazcsgr
1101 *
1102 * Description
1103 * Cache Super Group Rule information
1104 *
1105 * Used by APIs to validate and retrieve super group rule info
1106 *
1107 *
1108 * Parameters
1109 * x_book_type_code (IN) - book for which you wish
1110 * to retrieve info
1111 * x_period_counter (IN) - period counter which you wish
1112 * to retrieve info
1113 *
1114 * Modifies
1115 * fazcsgr_record - stores super group rule information being retrieved
1116 * fazcsgr_table - stores a table of all super group rules retrieved so far
1117 *
1118 * Returns
1119 * True on successful retrieval. Otherwise False.
1120 *
1121 * Notes
1122 *
1123 *
1124 *--------------------------------------------------------------------------
1125 */
1126
1127 Function fazcsgr
1128 (
1129 x_super_group_id in number,
1130 x_book_type_code in varchar2,
1131 x_period_counter in number default null,
1132 p_log_level_rec in fa_api_types.log_level_rec_type default null
1133 )
1134 return boolean;
1135
1136 /*Bug# 6933726 - Added following function */
1137 /*
1138 --------------------------------------------------------------------------
1139 *
1140 * Name
1141 * fazcbcsob
1142 *
1143 * Description
1144 * Cache FA_BOOK_CONTROLS for primary and secondary leadger by SOB information
1145 *
1146 * Parameters
1147 * X_book - book type code to get information about
1148 * X_sob_id - SOB to set profile GL_SET_OF_BKS_ID
1149 *
1150 * Modifies
1151 * set profile GL_SET_OF_BKS_ID with X_sob_id and
1152 * calls fazcbc to cache FA_BOOK_CONTROLS which calls
1153 * fazcbcs to cache FA_BOOK_CONTROLS by SOB information.
1154 *
1155 * Returns
1156 * True on successful retrieval. Otherwise False.
1157 *
1158 * Notes
1159 *
1160 * This is used by deprn program to intialize the plsql cache.
1161 *
1162 * History
1163 * 13-10-2008 gigupta created
1164 *
1165 *--------------------------------------------------------------------------
1166 */
1167 FUNCTION fazcbcsob
1168 (
1169 X_book in varchar2,
1170 X_sob_id in number,
1171 p_log_level_rec in fa_api_types.log_level_rec_type default null
1172 )
1173 return boolean;
1174
1175
1176 END FA_CACHE_PKG;