1: PACKAGE BODY FA_CACHE_PKG as
2: /* $Header: FACACHEB.pls 120.34.12020000.3 2013/03/08 05:06:50 rmandali ship $ */
3:
4: -----------------------------------------------------------------------------
5:
355: end if;
356: end if;
357:
358: -- now load the fazcbcs cache proactively
359: if NOT fa_cache_pkg.fazcbcs(X_book => x_book,
360: X_set_of_books_id => fazcbc_record.set_of_books_id,
361: p_log_level_rec => p_log_level_rec) then
362: raise fazcbc_err;
363: end if;
369: fa_srvr_msg.add_message(calling_fn => NULL,
370: name => 'FA_CACHE_BOOK_CONTROLS',
371: token1 => 'BOOK',
372: value1 => X_book, p_log_level_rec => p_log_level_rec);
373: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcbc', p_log_level_rec => p_log_level_rec);
374: return (false);
375: when fazcbc_err then
376: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcbc', p_log_level_rec => p_log_level_rec);
377: return (false);
372: value1 => X_book, p_log_level_rec => p_log_level_rec);
373: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcbc', p_log_level_rec => p_log_level_rec);
374: return (false);
375: when fazcbc_err then
376: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcbc', p_log_level_rec => p_log_level_rec);
377: return (false);
378: when others then
379: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcbc', p_log_level_rec => p_log_level_rec);
380: return (FALSE);
375: when fazcbc_err then
376: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcbc', p_log_level_rec => p_log_level_rec);
377: return (false);
378: when others then
379: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcbc', p_log_level_rec => p_log_level_rec);
380: return (FALSE);
381:
382: end FAZCBC;
383:
399: if not fazcsob
400: (X_set_of_books_id => X_set_of_books_id,
401: X_mrc_sob_type_code => h_reporting_flag) then
402: fa_srvr_msg.add_sql_error
403: (calling_fn => 'fa_cache_pkg.fazcbcs', p_log_level_rec => p_log_level_rec);
404: return(FALSE);
405: end if;
406: else
407: h_reporting_flag := 'P';
434: if (nvl(fazcbc_record.book_type_code, X_book || 'NULL') <> X_book)
435: then
436: if not (fazcbc (X_book, p_log_level_rec)) then
437: fa_srvr_msg.add_sql_error
438: (calling_fn => 'fa_cache_pkg.fazcbcs', p_log_level_rec => p_log_level_rec);
439: return(FALSE);
440: end if;
441: end if;
442:
493: token1 => 'BOOK',
494: value1 => X_book,
495: token2 => 'SET_OF_BOOKS_ID',
496: value2 => X_set_of_books_id, p_log_level_rec => p_log_level_rec);
497: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcbcs', p_log_level_rec => p_log_level_rec);
498: return (FALSE);
499: when others then
500: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcbcs', p_log_level_rec => p_log_level_rec);
501: return (FALSE);
496: value2 => X_set_of_books_id, p_log_level_rec => p_log_level_rec);
497: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcbcs', p_log_level_rec => p_log_level_rec);
498: return (FALSE);
499: when others then
500: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcbcs', p_log_level_rec => p_log_level_rec);
501: return (FALSE);
502:
503: end FAZCBCS;
504:
561: return TRUE;
562:
563: exception
564: when others then
565: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcbc_clr', p_log_level_rec => p_log_level_rec);
566: return (FALSE);
567:
568: END fazcbc_clr;
569:
617: fa_srvr_msg.add_message(calling_fn => NULL,
618: name => 'FA_CACHE_CALENDAR_TYPES',
619: token1 => 'CALENDAR',
620: value1 => X_calendar, p_log_level_rec => p_log_level_rec);
621: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcct', p_log_level_rec => p_log_level_rec);
622: return (FALSE);
623:
624: when others then
625: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcct', p_log_level_rec => p_log_level_rec);
621: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcct', p_log_level_rec => p_log_level_rec);
622: return (FALSE);
623:
624: when others then
625: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcct', p_log_level_rec => p_log_level_rec);
626: return (FALSE);
627:
628: end FAZCCT;
629:
683: end loop;
684:
685: -- Get number of periods per year
686: if not fazcct (X_calendar) then
687: fa_srvr_msg.add_message(calling_fn => 'fa_cache_pkg.fazcff', p_log_level_rec => p_log_level_rec);
688: return (FALSE);
689: end if;
690:
691: h_pers_per_yr := fazcct_record.number_per_fiscal_year;
773: token2 => 'BOOK',
774: value2 => X_book,
775: token3 => 'FY',
776: value3 => X_fy, p_log_level_rec => p_log_level_rec);
777: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcff', p_log_level_rec => p_log_level_rec);
778: return (FALSE);
779: when others then
780: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcff', p_log_level_rec => p_log_level_rec);
781: return (FALSE);
776: value3 => X_fy, p_log_level_rec => p_log_level_rec);
777: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcff', p_log_level_rec => p_log_level_rec);
778: return (FALSE);
779: when others then
780: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcff', p_log_level_rec => p_log_level_rec);
781: return (FALSE);
782:
783: end FAZCFF;
784:
863: when no_data_found then
864: X_ceiling := 1000000000000.00;
865: return (TRUE);
866: when others then
867: fa_srvr_msg.add_sql_error (calling_fn => 'fa_cache_pkg.fazccl', p_log_level_rec => p_log_level_rec);
868: return (FALSE);
869:
870: end FAZCCL;
871:
942: X_alternate_deprn_factor := 0;
943:
944: return (TRUE);
945: when others then
946: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcbr', p_log_level_rec => p_log_level_rec);
947: return (FALSE);
948:
949: end FAZCBR;
950:
1031: token2 => 'FY_NAME',
1032: value2 => X_target_fy_name,
1033: token3 => 'DATE',
1034: value3 => X_target_date, p_log_level_rec => p_log_level_rec);
1035: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazccp', p_log_level_rec => p_log_level_rec);
1036: return (FALSE);
1037: when others then
1038: fa_srvr_msg.add_sql_error ( calling_fn => 'fa_cache_pkg.fazccp', p_log_level_rec => p_log_level_rec);
1039: return (FALSE);
1034: value3 => X_target_date, p_log_level_rec => p_log_level_rec);
1035: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazccp', p_log_level_rec => p_log_level_rec);
1036: return (FALSE);
1037: when others then
1038: fa_srvr_msg.add_sql_error ( calling_fn => 'fa_cache_pkg.fazccp', p_log_level_rec => p_log_level_rec);
1039: return (FALSE);
1040:
1041: end FAZCCP;
1042:
1095: token1 => 'CATEGORY_ID',
1096: value1 => X_cat_id,
1097: token2 => 'BOOK',
1098: value2 => X_book, p_log_level_rec => p_log_level_rec);
1099: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazccb', p_log_level_rec => p_log_level_rec);
1100: return (FALSE);
1101: when others then
1102: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazccb', p_log_level_rec => p_log_level_rec);
1103: return (FALSE);
1098: value2 => X_book, p_log_level_rec => p_log_level_rec);
1099: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazccb', p_log_level_rec => p_log_level_rec);
1100: return (FALSE);
1101: when others then
1102: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazccb', p_log_level_rec => p_log_level_rec);
1103: return (FALSE);
1104:
1105: end fazccb;
1106:
1415: token1 => 'RULE_ID',
1416: value1 => fazccmt_record.deprn_basis_rule_id, p_log_level_rec => p_log_level_rec);
1417: end if;
1418:
1419: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazccmt', p_log_level_rec => p_log_level_rec);
1420: return (FALSE);
1421:
1422: when others then
1423: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazccmt', p_log_level_rec => p_log_level_rec);
1419: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazccmt', p_log_level_rec => p_log_level_rec);
1420: return (FALSE);
1421:
1422: when others then
1423: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazccmt', p_log_level_rec => p_log_level_rec);
1424: return (False);
1425:
1426: end FAZCCMT;
1427:
1481: fa_srvr_msg.add_message(calling_fn => NULL,
1482: name => 'FA_CACHE_SETS_OF_BOOKS',
1483: token1 => 'SET_OF_BOOKS_ID',
1484: value1 => X_set_of_books_id, p_log_level_rec => p_log_level_rec);
1485: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcsob', p_log_level_rec => p_log_level_rec);
1486: return (FALSE);
1487: when others then
1488: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcsob', p_log_level_rec => p_log_level_rec);
1489: return(FALSE);
1484: value1 => X_set_of_books_id, p_log_level_rec => p_log_level_rec);
1485: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcsob', p_log_level_rec => p_log_level_rec);
1486: return (FALSE);
1487: when others then
1488: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcsob', p_log_level_rec => p_log_level_rec);
1489: return(FALSE);
1490:
1491: end fazcsob;
1492:
1580: token2 => 'CATEGORY_ID',
1581: value2 => X_cat_id,
1582: token3 => 'DATE',
1583: value3 => to_date(X_jdpis, 'J'));
1584: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazccbd', p_log_level_rec => p_log_level_rec);
1585: return (FALSE);
1586:
1587: when others then
1588: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazccbd', p_log_level_rec => p_log_level_rec);
1584: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazccbd', p_log_level_rec => p_log_level_rec);
1585: return (FALSE);
1586:
1587: when others then
1588: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazccbd', p_log_level_rec => p_log_level_rec);
1589: return (FALSE);
1590:
1591: end fazccbd;
1592:
1664: fa_srvr_msg.add_message(calling_fn => NULL,
1665: name => 'FA_CACHE_CATEGORIES',
1666: token1 => 'CATEGORY',
1667: value1 => X_cat_id, p_log_level_rec => p_log_level_rec);
1668: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcat', p_log_level_rec => p_log_level_rec);
1669: return (FALSE);
1670:
1671: when others then
1672: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcat', p_log_level_rec => p_log_level_rec);
1668: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcat', p_log_level_rec => p_log_level_rec);
1669: return (FALSE);
1670:
1671: when others then
1672: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcat', p_log_level_rec => p_log_level_rec);
1673: return (FALSE);
1674:
1675: end fazcat;
1676:
1695: exception
1696: when NO_DATA_FOUND then
1697: fa_srvr_msg.add_message(calling_fn => NULL,
1698: name => 'FA_SYSTEM_CONTROLS', p_log_level_rec => p_log_level_rec);
1699: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazsys', p_log_level_rec => p_log_level_rec);
1700: return (FALSE);
1701:
1702: when others then
1703: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazsys', p_log_level_rec => p_log_level_rec);
1699: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazsys', p_log_level_rec => p_log_level_rec);
1700: return (FALSE);
1701:
1702: when others then
1703: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazsys', p_log_level_rec => p_log_level_rec);
1704: return (FALSE);
1705:
1706: end FAZSYS;
1707:
1833: fa_srvr_msg.add_message(calling_fn => NULL,
1834: name => 'FA_CACHE_BOOK_CONTROLS',
1835: token1 => 'BOOK',
1836: value1 => X_corp_book, p_log_level_rec => p_log_level_rec);
1837: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazctbk', p_log_level_rec => p_log_level_rec);
1838: return (FALSE);
1839:
1840: when others then
1841: fa_srvr_msg.add_sql_error (calling_fn => 'fa_cache_pkg.fazctbk', p_log_level_rec => p_log_level_rec);
1837: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazctbk', p_log_level_rec => p_log_level_rec);
1838: return (FALSE);
1839:
1840: when others then
1841: fa_srvr_msg.add_sql_error (calling_fn => 'fa_cache_pkg.fazctbk', p_log_level_rec => p_log_level_rec);
1842: return (FALSE);
1843:
1844: end fazctbk;
1845:
1945: return (TRUE);
1946:
1947: exception
1948: when others then
1949: fa_srvr_msg.add_sql_error (calling_fn => 'fa_cache_pkg.fazcrsob', p_log_level_rec => p_log_level_rec);
1950: return (FALSE);
1951:
1952: end fazcrsob;
1953:
2029: token1 => 'CONVENTION',
2030: value1 => X_prorate_convention_code,
2031: token2 => 'FISCAL_YEAR_NAME',
2032: value2 => X_fiscal_year_name, p_log_level_rec => p_log_level_rec);
2033: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazccvt', p_log_level_rec => p_log_level_rec);
2034: return (FALSE);
2035: when others then
2036: fa_srvr_msg.add_sql_error (
2037: calling_fn => 'fa_cache_pkg.fazccvt', p_log_level_rec => p_log_level_rec);
2033: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazccvt', p_log_level_rec => p_log_level_rec);
2034: return (FALSE);
2035: when others then
2036: fa_srvr_msg.add_sql_error (
2037: calling_fn => 'fa_cache_pkg.fazccvt', p_log_level_rec => p_log_level_rec);
2038: return (FALSE);
2039: end fazccvt;
2040:
2041: -----------------------------------------------------------------------------
2117: token1 => 'FY_NAME',
2118: value1 => X_fiscal_year_name,
2119: token2 => 'FY',
2120: value2 => X_fiscal_year, p_log_level_rec => p_log_level_rec);
2121: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcfy', p_log_level_rec => p_log_level_rec);
2122: return (FALSE);
2123:
2124: when others then
2125: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcfy', p_log_level_rec => p_log_level_rec);
2121: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcfy', p_log_level_rec => p_log_level_rec);
2122: return (FALSE);
2123:
2124: when others then
2125: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcfy', p_log_level_rec => p_log_level_rec);
2126: return (FALSE);
2127: end fazcfy;
2128:
2129: -----------------------------------------------------------------------------
2267: token2 => 'PERIOD_COUNTER',
2268: value2 => X_period_counter,
2269: token3 => 'DATE',
2270: value3 => X_effective_date, p_log_level_rec => p_log_level_rec);
2271: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcdp', p_log_level_rec => p_log_level_rec);
2272: return (FALSE);
2273:
2274: when others then
2275: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcdp', p_log_level_rec => p_log_level_rec);
2271: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcdp', p_log_level_rec => p_log_level_rec);
2272: return (FALSE);
2273:
2274: when others then
2275: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcdp', p_log_level_rec => p_log_level_rec);
2276: return (FALSE);
2277: end fazcdp;
2278:
2279: -----------------------------------------------------------------------------
2310: return TRUE;
2311:
2312: exception
2313: when others then
2314: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcdp_clr', p_log_level_rec => p_log_level_rec);
2315: return (FALSE);
2316:
2317: END fazcdp_clr;
2318:
2443: return true;
2444:
2445: EXCEPTION
2446: WHEN fazprof_err then
2447: fa_srvr_msg.add_message(calling_fn => 'fa_cache_pkg.fazprof');
2448: return (FALSE);
2449:
2450: WHEN others then
2451: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazprof');
2447: fa_srvr_msg.add_message(calling_fn => 'fa_cache_pkg.fazprof');
2448: return (FALSE);
2449:
2450: WHEN others then
2451: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazprof');
2452: return (FALSE);
2453:
2454: END fazprof;
2455:
2591: token1 => 'BOOK',
2592: value1 => X_book_type_code,
2593: token2 => 'PERIOD_COUNTER',
2594: value2 => X_period_counter, p_log_level_rec => p_log_level_rec);
2595: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcsgr', p_log_level_rec => p_log_level_rec);
2596: return (FALSE);
2597:
2598: when others then
2599: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcsgr', p_log_level_rec => p_log_level_rec);
2595: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcsgr', p_log_level_rec => p_log_level_rec);
2596: return (FALSE);
2597:
2598: when others then
2599: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazcsgr', p_log_level_rec => p_log_level_rec);
2600: return (FALSE);
2601: end fazcsgr;
2602:
2603: -----------------------------------------------------------------------------
2631: return (TRUE);
2632:
2633: Exception
2634: when fazarel_err then
2635: fa_srvr_msg.add_message(calling_fn => 'fa_cache_pkg.fazarel');
2636: return (FALSE);
2637:
2638: when others then
2639: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazarel');
2635: fa_srvr_msg.add_message(calling_fn => 'fa_cache_pkg.fazarel');
2636: return (FALSE);
2637:
2638: when others then
2639: fa_srvr_msg.add_sql_error(calling_fn => 'fa_cache_pkg.fazarel');
2640: return (FALSE);
2641:
2642: end FAZAREL;
2643:
2640: return (FALSE);
2641:
2642: end FAZAREL;
2643:
2644: END FA_CACHE_PKG;