519: p_book_type_code IN VARCHAR2) IS
520: /* ************************************************************************
521: This procedure gets the DEPRN_RESERVE balances for all reserve CCIDS.
522: For all the reserve ccid's of assets that depreciated in the fiscal
523: year converted, the ccid is obtained from gl_je_lines. For assets
524: with their last DEPRN row in a prior year, we look at gl_je_lines
525: first and if not found the reserve CCID will be flexbuilt. The
526: reserve balances are stored in a global array.
527: ************************************************************************ */
520: /* ************************************************************************
521: This procedure gets the DEPRN_RESERVE balances for all reserve CCIDS.
522: For all the reserve ccid's of assets that depreciated in the fiscal
523: year converted, the ccid is obtained from gl_je_lines. For assets
524: with their last DEPRN row in a prior year, we look at gl_je_lines
525: first and if not found the reserve CCID will be flexbuilt. The
526: reserve balances are stored in a global array.
527: ************************************************************************ */
528:
564: CURSOR get_ccid IS
565: select
566: gjl.code_combination_id
567: from
568: gl_je_lines gjl
569: where
570: gjl.je_header_id = l_header_id AND
571: gjl.je_line_num = l_line_num;
572:
624: -- dbms_output.put_line('Fetched ccid: ' || l_ccid);
625:
626: IF (get_ccid%NOTFOUND) THEN
627:
628: -- dbms_output.put_line('Could not find ccid in gl_je_lines');
629: -- dbms_output.put_line('Calling FAFBGCC');
630:
631: -- could not find the ccid in gl_je_lines
632: -- need to flexbuild the reserve account
627:
628: -- dbms_output.put_line('Could not find ccid in gl_je_lines');
629: -- dbms_output.put_line('Calling FAFBGCC');
630:
631: -- could not find the ccid in gl_je_lines
632: -- need to flexbuild the reserve account
633: -- need one distribution_id to build the account
634: -- even if there are several assets with different
635: -- distribution_id's, the fact that they have the same
791: p_book_type_code IN VARCHAR2) IS
792: /* ************************************************************************
793: This procedure gets the DEPRN_AMOUNT balances for all expense CCIDS.
794: For all the expense ccid's of assets that depreciated in the fiscal
795: year converted, the ccid is obtained from gl_je_lines. Depreciation
796: Expense only needs to be calculated for the periods in the fiscal year
797: converted since prior years expense will go into retained earnings
798: ************************************************************************ */
799:
818: CURSOR get_ccid IS
819: SELECT
820: gjl.code_combination_id
821: FROM
822: gl_je_lines gjl
823: WHERE
824: gjl.je_header_id = l_header_id AND
825: gjl.je_line_num = l_line_num;
826:
1065: p_book_type_code IN VARCHAR2) IS
1066: /* ************************************************************************
1067: This procedure gets the REVAL AMORTIZATION balances.
1068: For all the reval_amort ccid's of assets that depreciated in the fiscal
1069: year converted, the ccid is obtained from gl_je_lines. Reval Amortization
1070: only needs to be calculated for the periods in the fiscal year.
1071: ************************************************************************ */
1072:
1073: l_pc NUMBER;
1090: CURSOR get_ccid IS
1091: SELECT
1092: gs.code_combination_id
1093: FROM
1094: gl_je_lines gs,
1095: gl_je_headers gh,
1096: gl_je_batches gb,
1097: fa_deprn_periods dp
1098: WHERE