528: p_book_type_code IN VARCHAR2) IS
529: /* ************************************************************************
530: This procedure gets the DEPRN_RESERVE balances for all reserve CCIDS.
531: For all the reserve ccid's of assets that depreciated in the fiscal
532: year converted, the ccid is obtained from gl_je_lines. For assets
533: with their last DEPRN row in a prior year, we look at gl_je_lines
534: first and if not found the reserve CCID will be flexbuilt. The
535: reserve balances are stored in a global array.
536: ************************************************************************ */
529: /* ************************************************************************
530: This procedure gets the DEPRN_RESERVE balances for all reserve CCIDS.
531: For all the reserve ccid's of assets that depreciated in the fiscal
532: year converted, the ccid is obtained from gl_je_lines. For assets
533: with their last DEPRN row in a prior year, we look at gl_je_lines
534: first and if not found the reserve CCID will be flexbuilt. The
535: reserve balances are stored in a global array.
536: ************************************************************************ */
537:
573: CURSOR get_ccid IS
574: select
575: gjl.code_combination_id
576: from
577: gl_je_lines gjl
578: where
579: gjl.je_header_id = l_header_id AND
580: gjl.je_line_num = l_line_num;
581:
633: -- dbms_output.put_line('Fetched ccid: ' || l_ccid);
634:
635: IF (get_ccid%NOTFOUND) THEN
636:
637: -- dbms_output.put_line('Could not find ccid in gl_je_lines');
638: -- dbms_output.put_line('Calling FAFBGCC');
639:
640: -- could not find the ccid in gl_je_lines
641: -- need to flexbuild the reserve account
636:
637: -- dbms_output.put_line('Could not find ccid in gl_je_lines');
638: -- dbms_output.put_line('Calling FAFBGCC');
639:
640: -- could not find the ccid in gl_je_lines
641: -- need to flexbuild the reserve account
642: -- need one distribution_id to build the account
643: -- even if there are several assets with different
644: -- distribution_id's, the fact that they have the same
800: p_book_type_code IN VARCHAR2) IS
801: /* ************************************************************************
802: This procedure gets the DEPRN_AMOUNT balances for all expense CCIDS.
803: For all the expense ccid's of assets that depreciated in the fiscal
804: year converted, the ccid is obtained from gl_je_lines. Depreciation
805: Expense only needs to be calculated for the periods in the fiscal year
806: converted since prior years expense will go into retained earnings
807: ************************************************************************ */
808:
827: CURSOR get_ccid IS
828: SELECT
829: gjl.code_combination_id
830: FROM
831: gl_je_lines gjl
832: WHERE
833: gjl.je_header_id = l_header_id AND
834: gjl.je_line_num = l_line_num;
835:
1074: p_book_type_code IN VARCHAR2) IS
1075: /* ************************************************************************
1076: This procedure gets the REVAL AMORTIZATION balances.
1077: For all the reval_amort ccid's of assets that depreciated in the fiscal
1078: year converted, the ccid is obtained from gl_je_lines. Reval Amortization
1079: only needs to be calculated for the periods in the fiscal year.
1080: ************************************************************************ */
1081:
1082: l_pc NUMBER;
1099: CURSOR get_ccid IS
1100: SELECT
1101: gs.code_combination_id
1102: FROM
1103: gl_je_lines gs,
1104: gl_je_headers gh,
1105: gl_je_batches gb,
1106: fa_deprn_periods dp
1107: WHERE