37: FOR UPDATE OF used_flag NOWAIT;
38:
39: BEGIN <
40:
41: -- Get fa_book_controls.distribution_source_book since
42: -- production is only stored in the corporate book.
43:
44: -- fazcbc cache should have already been called don't call again -bmr
45:
466: h_dpis,
467: h_deprn_start_date
468: FROM fa_books bk,
469: fa_fiscal_year fy,
470: fa_book_controls bc,
471: fa_book_controls bc2
472: WHERE bc.book_type_code = X_Book_Type_Code
473: AND fy.fiscal_year_name = bc.fiscal_year_name
474: AND fy.fiscal_year = X_Fiscal_Year
467: h_deprn_start_date
468: FROM fa_books bk,
469: fa_fiscal_year fy,
470: fa_book_controls bc,
471: fa_book_controls bc2
472: WHERE bc.book_type_code = X_Book_Type_Code
473: AND fy.fiscal_year_name = bc.fiscal_year_name
474: AND fy.fiscal_year = X_Fiscal_Year
475: AND bc2.book_type_code = X_Book_Type_Code
484: X_Conversion_Date IS NOT NULL) THEN
485: SELECT COUNT(*)
486: INTO h_conversion_year
487: FROM fa_fiscal_year fy,
488: fa_book_controls bc
489: WHERE bc.book_type_code = X_Book_Type_Code
490: AND bc.fiscal_year_name = fy.fiscal_year_name
491: AND X_Conversion_Date BETWEEN fy.start_date AND
492: fy.end_date;
1115: which retirement prorate date
1116: falls into
1117:
1118: nbv_frac_thresh nbv_frac_thresh nbv_fraction_threshhold in
1119: fa_book_controls
1120:
1121: nbv_amt_thresh nbv_amt_thresh nbv_amount_threshhold in
1122: fa_book_controls
1123:
1118: nbv_frac_thresh nbv_frac_thresh nbv_fraction_threshhold in
1119: fa_book_controls
1120:
1121: nbv_amt_thresh nbv_amt_thresh nbv_amount_threshhold in
1122: fa_book_controls
1123:
1124: projecting_flag deprn_projecting_flag
1125:
1126:
1124: projecting_flag deprn_projecting_flag
1125:
1126:
1127: amo_reval_rsv_flag amo_reval_rsv_flag amortize_reval_reserve_flag in
1128: fa_book_controls
1129:
1130: raf rate_adj_factor rate_adjustment_factor in fa_books
1131:
1132: cur_fy cur_fy current fiscal year
1362: cursor c_prd_flag is
1363: select 'Y'
1364: from fa_calendar_periods fcp1,
1365: fa_calendar_periods fcp2,
1366: fa_book_controls fbc
1367: where to_date (dpr_in.prorate_jdate,'J') BETWEEN fcp1.start_date AND fcp1.end_date
1368: and fbc.book_type_code = dpr_in.book
1369: and fcp1.calendar_type = fbc.deprn_calendar
1370: and to_date (decode( dpr_in.jdate_retired,0,null,dpr_in.jdate_retired),'J') BETWEEN fcp2.start_date AND fcp2.end_date
1537:
1538: deprn_projecting_flag := (fmode = fa_std_types.FA_DPR_PROJECT);
1539:
1540: --
1541: -- Get the following information from the FA_BOOK_CONTROLS cache
1542: -- 1. Rate Calendar
1543: -- 2. NBV Fraction Threshold
1544: -- 3. NBV Amount Threshold
1545: -- 4. Amortize Reval Reserve Flag
2336: SELECT fy.fiscal_year,cl.period_num
2337: INTO dpis_fy,dpis_perd_num
2338: FROM FA_BOOKS bk,
2339: FA_CALENDAR_PERIODS CL,
2340: FA_BOOK_CONTROLS BC,
2341: FA_FISCAL_YEAR fy
2342: WHERE bk.asset_id = dpr.asset_id
2343: AND bk.book_type_code = dpr.book
2344: AND bk.date_ineffective is null