DBA Data[Home] [Help]

APPS.FA_BOOK_CONTROLS_PKG SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 5

  PROCEDURE Insert_Row(X_Rowid            IN OUT NOCOPY VARCHAR2,
                       X_Book_Type_Code   IN OUT NOCOPY VARCHAR2,
                       X_Book_Type_Name                 VARCHAR2,
                       X_Set_Of_Books_Id                NUMBER,
                       X_Initial_Date                   DATE,
                       X_Last_Deprn_Run_Date            DATE,
                       X_Amortize_Flag                  VARCHAR2,
                       X_Fully_Reserved_Flag            VARCHAR2,
                       X_Deprn_Calendar                 VARCHAR2,
                       X_Book_Class                     VARCHAR2,
                       X_GL_Posting_Allowed_Flag        VARCHAR2,
                       X_Current_Fiscal_Year            NUMBER,
                       X_Allow_Mass_Changes             VARCHAR2,
                       X_Allow_Deprn_Adjustments        VARCHAR2,
                       X_Accounting_Flex_Structure      NUMBER,
                       X_Last_Update_Date               DATE,
                       X_Last_Updated_By                NUMBER,
                       X_Prorate_Calendar               VARCHAR2,
                       X_Date_Ineffective               DATE     DEFAULT NULL,
                       X_JE_Retirement_Category         VARCHAR2 DEFAULT NULL,
                       X_JE_Depreciation_Category       VARCHAR2 DEFAULT NULL,
                       X_JE_Reclass_Category            VARCHAR2 DEFAULT NULL,
                       X_GL_JE_Source                   VARCHAR2 DEFAULT NULL,
                       X_JE_Addition_Category           VARCHAR2 DEFAULT NULL,
                       X_JE_Adjustment_Category         VARCHAR2 DEFAULT NULL,
                       X_Distribution_Source_Book       VARCHAR2 DEFAULT NULL,
                       X_JE_Transfer_Category           VARCHAR2 DEFAULT NULL,
                       X_Copy_Retirements_Flag          VARCHAR2,
                       X_Copy_Adjustments_Flag          VARCHAR2,
                       X_Deprn_Request_ID               NUMBER   DEFAULT NULL,
                       X_Allow_Cost_Ceiling             VARCHAR2,
                       X_Allow_Deprn_Exp_Ceiling        VARCHAR2,
                       X_Calculate_NBV                  VARCHAR2,
                       X_Run_Year_End_Program           VARCHAR2,
                       X_JE_Deferred_Deprn_Category     VARCHAR2 DEFAULT NULL,
                       X_ITC_Allowed_Flag               VARCHAR2,
                       X_Created_By                     NUMBER   DEFAULT NULL,
                       X_Creation_Date                  DATE     DEFAULT NULL,
                       X_Last_Update_Login              NUMBER   DEFAULT NULL,
                       X_Allow_Mass_Copy                VARCHAR2,
                       X_Allow_Purge_Flag               VARCHAR2 DEFAULT NULL,
                       X_Allow_Reval_Flag               VARCHAR2,
                       X_Amortize_Reval_Reserve_Flag    VARCHAR2 DEFAULT NULL,
                       X_AP_Intercompany_Acct           VARCHAR2,
                       X_AR_Intercompany_Acct           VARCHAR2,
                       X_Attribute1                     VARCHAR2 DEFAULT NULL,
                       X_Attribute2                     VARCHAR2 DEFAULT NULL,
                       X_Attribute3                     VARCHAR2 DEFAULT NULL,
                       X_Attribute4                     VARCHAR2 DEFAULT NULL,
                       X_Attribute5                     VARCHAR2 DEFAULT NULL,
                       X_Attribute6                     VARCHAR2 DEFAULT NULL,
                       X_Attribute7                     VARCHAR2 DEFAULT NULL,
                       X_Attribute8                     VARCHAR2 DEFAULT NULL,
                       X_Attribute9                     VARCHAR2 DEFAULT NULL,
                       X_Attribute10                    VARCHAR2 DEFAULT NULL,
                       X_Attribute11                    VARCHAR2 DEFAULT NULL,
                       X_Attribute12                    VARCHAR2 DEFAULT NULL,
                       X_Attribute13                    VARCHAR2 DEFAULT NULL,
                       X_Attribute14                    VARCHAR2 DEFAULT NULL,
                       X_Attribute15                    VARCHAR2 DEFAULT NULL,
                       X_Attribute_Category_Code        VARCHAR2 DEFAULT NULL,
                       X_Capital_Gain_Threshold         NUMBER   DEFAULT NULL,
                       X_Copy_Salvage_Value_Flag        VARCHAR2,
                       X_Cost_Of_Removal_ClearingAcct   VARCHAR2,
                       X_Cost_Of_Removal_Gain_Acct      VARCHAR2,
                       X_Cost_Of_Removal_Loss_Acct      VARCHAR2,
                       X_Default_Life_Ext_Ceiling       NUMBER   DEFAULT NULL,
                       X_Default_Life_Ext_Factor        NUMBER   DEFAULT NULL,
                       X_Default_Max_Fully_Rsvd_Reval   NUMBER   DEFAULT NULL,
                       X_Default_Rev_Fully_Rsvd_Flag    VARCHAR2 DEFAULT NULL,
                       X_Deferred_Deprn_Expense_Acct    VARCHAR2,
                       X_Deferred_Deprn_Reserve_Acct    VARCHAR2,
                       X_Deprn_Allocation_Code          VARCHAR2,
                       X_Deprn_Status                   VARCHAR2 DEFAULT NULL,
                       X_Fiscal_Year_Name               VARCHAR2 DEFAULT NULL,
                       X_Initial_Period_Counter         VARCHAR2,
                       X_JE_CIP_Adjustment_Category     VARCHAR2 DEFAULT NULL,
                       X_JE_CIP_Addition_Category       VARCHAR2 DEFAULT NULL,
                       X_JE_CIP_Reclass_Category        VARCHAR2 DEFAULT NULL,
                       X_JE_CIP_Retirement_Category     VARCHAR2 DEFAULT NULL,
                       X_JE_CIP_Reval_Category          VARCHAR2 DEFAULT NULL,
                       X_JE_CIP_Transfer_Category       VARCHAR2 DEFAULT NULL,
                       X_JE_Reval_Category              VARCHAR2 DEFAULT NULL,
                       X_Last_Mass_Copy_Period_Ctr      NUMBER   DEFAULT NULL,
                       X_Last_Period_Counter            NUMBER,
                       X_Last_Purge_Period_Counter      NUMBER   DEFAULT NULL,
                       X_Mass_Copy_Source_Book          VARCHAR2 DEFAULT NULL,
                       X_Mass_Request_ID                NUMBER   DEFAULT NULL,
                       X_NBV_Amount_Threshold           NUMBER   DEFAULT NULL,
                       X_NBV_Fraction_Threshold         NUMBER   DEFAULT NULL,
                       X_NBV_Retired_Gain_Acct          VARCHAR2,
                       X_NBV_Retired_Loss_Acct          VARCHAR2,
                       X_Proceeds_Of_Sale_Clear_Acct    VARCHAR2,
                       X_Proceeds_Of_Sale_Gain_Acct     VARCHAR2,
                       X_Proceeds_Of_Sale_Loss_Acct     VARCHAR2,
                       X_Revalue_On_Retirement_Flag     VARCHAR2 DEFAULT NULL,
                       X_Reval_Deprn_Reserve_Flag       VARCHAR2 DEFAULT NULL,
                       X_Reval_Rsv_Retired_Gain_Acct    VARCHAR2,
                       X_Reval_Rsv_Retired_Loss_Acct    VARCHAR2,
                       X_Deprn_Adjustment_Acct          VARCHAR2,
                       X_Immediate_Copy_Flag            VARCHAR2 DEFAULT NULL,
                       X_JE_Deprn_Adjustment_Category   VARCHAR2 DEFAULT NULL,
                       X_Depr_First_Year_Ret_Flag       VARCHAR2,
                       X_Flexbuilder_Defaults_CCID      NUMBER,
                       X_Retire_Reval_Reserve_Flag      VARCHAR2 DEFAULT NULL,
                       X_Use_Current_NBV_For_Deprn      VARCHAR2,
                       X_Copy_Additions_Flag            VARCHAR2,
                       X_Percent_Salvage_Value_Flag     VARCHAR2 DEFAULT NULL,
                       X_Reval_Posting_Flag             VARCHAR2 DEFAULT NULL,
                       X_Global_Attribute1              VARCHAR2 DEFAULT NULL,
                       X_Global_Attribute2              VARCHAR2 DEFAULT NULL,
                       X_Global_Attribute3              VARCHAR2 DEFAULT NULL,
                       X_Global_Attribute4              VARCHAR2 DEFAULT NULL,
                       X_Global_Attribute5              VARCHAR2 DEFAULT NULL,
                       X_Global_Attribute6              VARCHAR2 DEFAULT NULL,
                       X_Global_Attribute7              VARCHAR2 DEFAULT NULL,
                       X_Global_Attribute8              VARCHAR2 DEFAULT NULL,
                       X_Global_Attribute9              VARCHAR2 DEFAULT NULL,
                       X_Global_Attribute10             VARCHAR2 DEFAULT NULL,
                       X_Global_Attribute11             VARCHAR2 DEFAULT NULL,
                       X_Global_Attribute12             VARCHAR2 DEFAULT NULL,
                       X_Global_Attribute13             VARCHAR2 DEFAULT NULL,
                       X_Global_Attribute14             VARCHAR2 DEFAULT NULL,
                       X_Global_Attribute15             VARCHAR2 DEFAULT NULL,
                       X_Global_Attribute16             VARCHAR2 DEFAULT NULL,
                       X_Global_Attribute17             VARCHAR2 DEFAULT NULL,
                       X_Global_Attribute18             VARCHAR2 DEFAULT NULL,
                       X_Global_Attribute19             VARCHAR2 DEFAULT NULL,
                       X_Global_Attribute20             VARCHAR2 DEFAULT NULL,
                       X_Global_Attribute_Category      VARCHAR2 DEFAULT NULL,
                       X_MC_Source_Flag                 VARCHAR2 DEFAULT NULL,
                       X_Reval_YTD_Deprn_Flag           VARCHAR2 DEFAULT NULL,
                       X_Allow_CIP_Assets_Flag          VARCHAR2 DEFAULT NULL,
                       X_Org_ID                         NUMBER   DEFAULT NULL,
                       X_Allow_Group_Deprn_Flag         VARCHAR2 DEFAULT NULL,
                       X_Allow_CIP_Dep_Group_Flag       VARCHAR2 DEFAULT NULL,
                       X_Allow_Interco_Group_Flag       VARCHAR2 DEFAULT NULL,
                       X_Copy_Group_Assignment_Flag     VARCHAR2 DEFAULT NULL,
                       X_Copy_Group_Additon_Flag        VARCHAR2 DEFAULT NULL,
                       X_Allow_CIP_Member_Flag          VARCHAR2 DEFAULT NULL,
                       X_Allow_Member_Tracking_Flag     VARCHAR2 DEFAULT NULL,
                       X_Intercompany_Posting_Flag      VARCHAR2 DEFAULT NULL,
                       X_Backdated_Transfers_Flag       VARCHAR2 DEFAULT NULL,
                       X_allow_cost_sign_change_flag    VARCHAR2 DEFAULT NULL,
                       X_Sorp_Enabled_Flag              VARCHAR2 DEFAULT NULL, -- Bug 6666666 : Added for SORP Compliance Project
                       X_copy_amort_adaj_exp_flag       VARCHAR2 DEFAULT NULL,
                       X_copy_group_change_flag         VARCHAR2 DEFAULT NULL,
                       X_prevent_prior_prd_txns_flag    VARCHAR2 DEFAULT NULL,
                       X_allow_unallocated_lines_flag   VARCHAR2 DEFAULT NULL,
                       X_MRC_SOB_Type_Code              VARCHAR2 DEFAULT 'P',
                       X_DEFAULT_PERIOD_END_REVAL_FLG   VARCHAR2 DEFAULT NULL,
                       X_IMPORT_ALLOC_INV_LINES_NEW     VARCHAR2 DEFAULT NULL,
                       X_Return_Status       OUT NOCOPY BOOLEAN,
                       X_Calling_Fn                     VARCHAR2
  , p_log_level_rec        IN     FA_API_TYPES.log_level_rec_type) AS

    CURSOR C_bc IS SELECT rowid FROM fa_book_controls
                 WHERE book_type_code = X_Book_Type_Code;
Line: 164

    CURSOR C_bc_mc IS SELECT rowid FROM fa_mc_book_controls
                 WHERE book_type_code = X_Book_Type_Code
                 AND set_of_books_id = X_Set_Of_books_Id;
Line: 173

     insert into fa_book_controls (
            book_type_code,
            book_type_name,
            set_of_books_id,
            initial_date,
            last_deprn_run_date,
            amortize_flag,
            fully_reserved_flag,
            deprn_calendar,
            book_class,
            gl_posting_allowed_flag,
            current_fiscal_year,
            allow_mass_changes,
            allow_deprn_adjustments,
            accounting_flex_structure,
            last_update_date,
            last_updated_by,
            prorate_calendar,
            date_ineffective,
            je_retirement_category,
            je_depreciation_category,
            je_reclass_category,
            gl_je_source,
            je_addition_category,
            je_adjustment_category,
            distribution_source_book,
            je_transfer_category,
            copy_retirements_flag,
            copy_adjustments_flag,
            deprn_request_id,
            allow_cost_ceiling,
            allow_deprn_exp_ceiling,
            calculate_nbv,
            run_year_end_program,
            je_deferred_deprn_category,
            itc_allowed_flag,
            created_by,
            creation_date,
            last_update_login,
            allow_mass_copy,
            allow_purge_flag,
            allow_reval_flag,
            amortize_reval_reserve_flag,
            ap_intercompany_acct,
            ar_intercompany_acct,
            attribute1,
            attribute2,
            attribute3,
            attribute4,
            attribute5,
            attribute6,
            attribute7,
            attribute8,
            attribute9,
            attribute10,
            attribute11,
            attribute12,
            attribute13,
            attribute14,
            attribute15,
            attribute_category_code,
            capital_gain_threshold,
            copy_salvage_value_flag,
            cost_of_removal_clearing_acct,
            cost_of_removal_gain_acct,
            cost_of_removal_loss_acct,
            default_life_extension_ceiling,
            default_life_extension_factor,
            default_max_fully_rsvd_revals,
            default_reval_fully_rsvd_flag,
            deferred_deprn_expense_acct,
            deferred_deprn_reserve_acct,
            deprn_allocation_code,
            deprn_status,
            fiscal_year_name,
            initial_period_counter,
            je_cip_adjustment_category,
            je_cip_addition_category,
            je_cip_reclass_category,
            je_cip_retirement_category,
            je_cip_reval_category,
            je_cip_transfer_category,
            je_reval_category,
            last_mass_copy_period_counter,
            last_period_counter,
            last_purge_period_counter,
            mass_copy_source_book,
            mass_request_id,
            nbv_amount_threshold,
            nbv_fraction_threshold,
            nbv_retired_gain_acct,
            nbv_retired_loss_acct,
            proceeds_of_sale_clearing_acct,
            proceeds_of_sale_gain_acct,
            proceeds_of_sale_loss_acct,
            revalue_on_retirement_flag,
            reval_deprn_reserve_flag,
            reval_rsv_retired_gain_acct,
            reval_rsv_retired_loss_acct,
            deprn_adjustment_acct,
            immediate_copy_flag,
            je_deprn_adjustment_category,
            depr_first_year_ret_flag,
            flexbuilder_defaults_ccid,
            retire_reval_reserve_flag,
            use_current_nbv_for_deprn,
            copy_additions_flag,
            use_percent_salvage_value_flag,
            reval_posting_flag,
            global_attribute1,
            global_attribute2,
            global_attribute3,
            global_attribute4,
            global_attribute5,
            global_attribute6,
            global_attribute7,
            global_attribute8,
            global_attribute9,
            global_attribute10,
            global_attribute11,
            global_attribute12,
            global_attribute13,
            global_attribute14,
            global_attribute15,
            global_attribute16,
            global_attribute17,
            global_attribute18,
            global_attribute19,
            global_attribute20,
            global_attribute_category,
            mc_source_flag,
            reval_ytd_deprn_flag,
            allow_cip_assets_flag,
            org_id,
            allow_group_deprn_flag,
            allow_cip_dep_group_flag,
            allow_interco_group_flag,
            copy_group_assignment_flag,
            copy_group_addition_flag,
            allow_cip_member_flag,
            allow_member_tracking_flag,
            intercompany_posting_flag,
            allow_backdated_transfers_flag,
            allow_cost_sign_change_flag,
            sorp_enabled_flag,  -- Bug 6666666 : Added for SORP Compliance Project
            copy_amort_adaj_exp_flag,
            copy_group_change_flag,
            prevent_prior_period_txns_flag,
            allow_unallocated_lines_flag,
            DEFAULT_PERIOD_END_REVAL_FLAG,
            IMPORT_ALLOC_INV_LINES_AS_NEW
     ) values (
            X_Book_Type_Code,
            X_Book_Type_Name,
            X_Set_Of_Books_Id,
            X_Initial_Date,
            X_Last_Deprn_Run_Date,
            X_Amortize_Flag,
            X_Fully_Reserved_Flag,
            X_Deprn_Calendar,
            X_Book_Class,
            X_GL_Posting_Allowed_Flag,
            X_Current_Fiscal_Year,
            X_Allow_Mass_Changes,
            X_Allow_Deprn_Adjustments,
            X_Accounting_Flex_Structure,
            X_Last_Update_Date,
            X_Last_Updated_By,
            X_Prorate_Calendar,
            X_Date_Ineffective,
            X_JE_Retirement_Category,
            X_JE_Depreciation_Category,
            X_JE_Reclass_Category,
            X_GL_JE_Source,
            X_JE_Addition_Category,
            X_JE_Adjustment_Category,
            X_Distribution_Source_Book,
            X_JE_Transfer_Category,
            X_Copy_Retirements_Flag,
            X_Copy_Adjustments_Flag,
            X_Deprn_Request_ID,
            X_Allow_Cost_Ceiling,
            X_Allow_Deprn_Exp_Ceiling,
            X_Calculate_NBV,
            X_Run_Year_End_Program,
            X_JE_Deferred_Deprn_Category,
            X_ITC_Allowed_Flag,
            X_Created_By,
            X_Creation_Date,
            X_Last_Update_Login,
            X_Allow_Mass_Copy,
            X_Allow_Purge_Flag,
            X_Allow_Reval_Flag,
            X_Amortize_Reval_Reserve_Flag,
            X_AP_Intercompany_Acct,
            X_AR_Intercompany_Acct,
            X_Attribute1,
            X_Attribute2,
            X_Attribute3,
            X_Attribute4,
            X_Attribute5,
            X_Attribute6,
            X_Attribute7,
            X_Attribute8,
            X_Attribute9,
            X_Attribute10,
            X_Attribute11,
            X_Attribute12,
            X_Attribute13,
            X_Attribute14,
            X_Attribute15,
            X_Attribute_Category_Code,
            X_Capital_Gain_Threshold,
            X_Copy_Salvage_Value_Flag,
            X_Cost_Of_Removal_ClearingAcct,
            X_Cost_Of_Removal_Gain_Acct,
            X_Cost_Of_Removal_Loss_Acct,
            X_Default_Life_Ext_Ceiling,
            X_Default_Life_Ext_Factor,
            X_Default_Max_Fully_Rsvd_Reval,
            X_Default_Rev_Fully_Rsvd_Flag,
            X_Deferred_Deprn_Expense_Acct,
            X_Deferred_Deprn_Reserve_Acct,
            X_Deprn_Allocation_Code,
            X_Deprn_Status,
            X_Fiscal_Year_Name,
            X_Initial_Period_Counter,
            X_JE_CIP_Adjustment_Category,
            X_JE_CIP_Addition_Category,
            X_JE_CIP_Reclass_Category,
            X_JE_CIP_Retirement_Category,
            X_JE_CIP_Reval_Category,
            X_JE_CIP_Transfer_Category,
            X_JE_Reval_Category,
            X_Last_Mass_Copy_Period_Ctr,
            X_Last_Period_Counter,
            X_Last_Purge_Period_Counter,
            X_Mass_Copy_Source_Book,
            X_Mass_Request_ID,
            X_NBV_Amount_Threshold,
            X_NBV_Fraction_Threshold,
            X_NBV_Retired_Gain_Acct,
            X_NBV_Retired_Loss_Acct,
            X_Proceeds_Of_Sale_Clear_Acct,
            X_Proceeds_Of_Sale_Gain_Acct,
            X_Proceeds_Of_Sale_Loss_Acct,
            X_Revalue_On_Retirement_Flag,
            X_Reval_Deprn_Reserve_Flag,
            X_Reval_Rsv_Retired_Gain_Acct,
            X_Reval_Rsv_Retired_Loss_Acct,
            X_Deprn_Adjustment_Acct,
            X_Immediate_Copy_Flag,
            X_JE_Deprn_Adjustment_Category,
            X_Depr_First_Year_Ret_Flag,
            X_Flexbuilder_Defaults_CCID,
            X_Retire_Reval_Reserve_Flag,
            X_Use_Current_NBV_For_Deprn,
            X_Copy_Additions_Flag,
            X_Percent_Salvage_Value_Flag,
            X_Reval_Posting_Flag,
            X_Global_Attribute1,
            X_Global_Attribute2,
            X_Global_Attribute3,
            X_Global_Attribute4,
            X_Global_Attribute5,
            X_Global_Attribute6,
            X_Global_Attribute7,
            X_Global_Attribute8,
            X_Global_Attribute9,
            X_Global_Attribute10,
            X_Global_Attribute11,
            X_Global_Attribute12,
            X_Global_Attribute13,
            X_Global_Attribute14,
            X_Global_Attribute15,
            X_Global_Attribute16,
            X_Global_Attribute17,
            X_Global_Attribute18,
            X_Global_Attribute19,
            X_Global_Attribute20,
            X_Global_Attribute_Category,
            X_MC_Source_Flag,
            X_Reval_YTD_Deprn_Flag,
            X_Allow_CIP_Assets_Flag,
            X_Org_ID,
            X_Allow_Group_Deprn_Flag,
            X_Allow_CIP_Dep_Group_Flag,
            X_Allow_Interco_Group_Flag,
            X_Copy_Group_Assignment_Flag,
            X_Copy_Group_Additon_Flag,
            X_Allow_CIP_Member_Flag,
            X_Allow_Member_Tracking_Flag,
            X_Intercompany_Posting_Flag,
            X_Backdated_Transfers_Flag,
            X_allow_cost_sign_change_flag,
            X_Sorp_Enabled_Flag,  -- Bug 6666666 : Added for SORP Compliance Project,
            X_copy_amort_adaj_exp_flag,
            X_copy_group_change_flag,
            X_prevent_prior_prd_txns_flag,
            X_allow_unallocated_lines_flag,
            X_DEFAULT_PERIOD_END_REVAL_FLG,
            X_IMPORT_ALLOC_INV_LINES_NEW
     );
Line: 485

     insert into fa_book_controls_history (
            book_type_code,
            date_active,
            date_inactive,
            book_type_name,
            set_of_books_id,
            --initial_date,
            --last_deprn_run_date,
            amortize_flag,
            --fully_reserved_flag,
            --deprn_calendar,
            --book_class,
            gl_posting_allowed_flag,
            --current_fiscal_year,
            allow_mass_changes,
            allow_deprn_adjustments,
            --accounting_flex_structure,
            last_update_date,
            last_updated_by,
            --prorate_calendar,
            date_ineffective,
            je_retirement_category,
            je_depreciation_category,
            je_reclass_category,
            gl_je_source,
            je_addition_category,
            je_adjustment_category,
            --distribution_source_book,
            je_transfer_category,
            copy_retirements_flag,
            copy_adjustments_flag,
            --deprn_request_id,
            allow_cost_ceiling,
            allow_deprn_exp_ceiling,
            --calculate_nbv,
            --run_year_end_program,
            je_deferred_deprn_category,
            itc_allowed_flag,
            created_by,
            creation_date,
            last_update_login,
            allow_mass_copy,
            allow_purge_flag,
            allow_reval_flag,
            amortize_reval_reserve_flag,
            ap_intercompany_acct,
            ar_intercompany_acct,
            attribute1,
            attribute2,
            attribute3,
            attribute4,
            attribute5,
            attribute6,
            attribute7,
            attribute8,
            attribute9,
            attribute10,
            attribute11,
            attribute12,
            attribute13,
            attribute14,
            attribute15,
            attribute_category_code,
            capital_gain_threshold,
            copy_salvage_value_flag,
            cost_of_removal_clearing_acct,
            cost_of_removal_gain_acct,
            cost_of_removal_loss_acct,
            default_life_extension_ceiling,
            default_life_extension_factor,
            default_max_fully_rsvd_revals,
            default_reval_fully_rsvd_flag,
            deferred_deprn_expense_acct,
            deferred_deprn_reserve_acct,
            deprn_allocation_code,
            --deprn_status,
            --fiscal_year_name,
            --initial_period_counter,
            je_cip_adjustment_category,
            je_cip_addition_category,
            je_cip_reclass_category,
            je_cip_retirement_category,
            je_cip_reval_category,
            je_cip_transfer_category,
            je_reval_category,
            --last_mass_copy_period_counter,
            --last_period_counter,
            --last_purge_period_counter,
            --mass_copy_source_book,
            --mass_request_id,
            nbv_amount_threshold,
            nbv_fraction_threshold,
            nbv_retired_gain_acct,
            nbv_retired_loss_acct,
            proceeds_of_sale_clearing_acct,
            proceeds_of_sale_gain_acct,
            proceeds_of_sale_loss_acct,
            revalue_on_retirement_flag,
            reval_deprn_reserve_flag,
            reval_rsv_retired_gain_acct,
            reval_rsv_retired_loss_acct,
            deprn_adjustment_acct,
            immediate_copy_flag,
            je_deprn_adjustment_category,
            depr_first_year_ret_flag,
            flexbuilder_defaults_ccid,
            retire_reval_reserve_flag,
            --use_current_nbv_for_deprn,
            copy_additions_flag,
            use_percent_salvage_value_flag,
            reval_posting_flag,
            global_attribute1,
            global_attribute2,
            global_attribute3,
            global_attribute4,
            global_attribute5,
            global_attribute6,
            global_attribute7,
            global_attribute8,
            global_attribute9,
            global_attribute10,
            global_attribute11,
            global_attribute12,
            global_attribute13,
            global_attribute14,
            global_attribute15,
            global_attribute16,
            global_attribute17,
            global_attribute18,
            global_attribute19,
            global_attribute20,
            global_attribute_category,
            mc_source_flag,
            reval_ytd_deprn_flag,
            allow_cip_assets_flag,
            org_id,
            allow_group_deprn_flag,
            allow_cip_dep_group_flag,
            allow_interco_group_flag,
            copy_group_assignment_flag,
            copy_group_addition_flag,
            allow_cip_member_flag,
            allow_member_tracking_flag,
            intercompany_posting_flag,
            allow_backdated_transfers_flag,
            allow_cost_sign_change_flag,
            sorp_enabled_flag,  -- Bug 6666666 : Added for SORP Compliance Project
            copy_amort_adaj_exp_flag,
            copy_group_change_flag,
            prevent_prior_period_txns_flag,
            allow_unallocated_lines_flag,
            DEFAULT_PERIOD_END_REVAL_FLAG,
            IMPORT_ALLOC_INV_LINES_AS_NEW
     ) values (
            X_Book_Type_Code,
            sysdate,                -- date_active
            null,                   -- date_inactive
            X_Book_Type_Name,
            X_Set_Of_Books_Id,
            --X_Initial_Date,
            --X_Last_Deprn_Run_Date,
            X_Amortize_Flag,
            --X_Fully_Reserved_Flag,
            --X_Deprn_Calendar,
            --X_Book_Class,
            X_GL_Posting_Allowed_Flag,
            --X_Current_Fiscal_Year,
            X_Allow_Mass_Changes,
            X_Allow_Deprn_Adjustments,
            --X_Accounting_Flex_Structure,
            X_Last_Update_Date,
            X_Last_Updated_By,
            --X_Prorate_Calendar,
            X_Date_Ineffective,
            X_JE_Retirement_Category,
            X_JE_Depreciation_Category,
            X_JE_Reclass_Category,
            X_GL_JE_Source,
            X_JE_Addition_Category,
            X_JE_Adjustment_Category,
            --X_Distribution_Source_Book,
            X_JE_Transfer_Category,
            X_Copy_Retirements_Flag,
            X_Copy_Adjustments_Flag,
            --X_Deprn_Request_ID,
            X_Allow_Cost_Ceiling,
            X_Allow_Deprn_Exp_Ceiling,
            --X_Calculate_NBV,
            --X_Run_Year_End_Program,
            X_JE_Deferred_Deprn_Category,
            X_ITC_Allowed_Flag,
            X_Created_By,
            X_Creation_Date,
            X_Last_Update_Login,
            X_Allow_Mass_Copy,
            X_Allow_Purge_Flag,
            X_Allow_Reval_Flag,
            X_Amortize_Reval_Reserve_Flag,
            X_AP_Intercompany_Acct,
            X_AR_Intercompany_Acct,
            X_Attribute1,
            X_Attribute2,
            X_Attribute3,
            X_Attribute4,
            X_Attribute5,
            X_Attribute6,
            X_Attribute7,
            X_Attribute8,
            X_Attribute9,
            X_Attribute10,
            X_Attribute11,
            X_Attribute12,
            X_Attribute13,
            X_Attribute14,
            X_Attribute15,
            X_Attribute_Category_Code,
            X_Capital_Gain_Threshold,
            X_Copy_Salvage_Value_Flag,
            X_Cost_Of_Removal_ClearingAcct,
            X_Cost_Of_Removal_Gain_Acct,
            X_Cost_Of_Removal_Loss_Acct,
            X_Default_Life_Ext_Ceiling,
            X_Default_Life_Ext_Factor,
            X_Default_Max_Fully_Rsvd_Reval,
            X_Default_Rev_Fully_Rsvd_Flag,
            X_Deferred_Deprn_Expense_Acct,
            X_Deferred_Deprn_Reserve_Acct,
            X_Deprn_Allocation_Code,
            --X_Deprn_Status,
            --X_Fiscal_Year_Name,
            --X_Initial_Period_Counter,
            X_JE_CIP_Adjustment_Category,
            X_JE_CIP_Addition_Category,
            X_JE_CIP_Reclass_Category,
            X_JE_CIP_Retirement_Category,
            X_JE_CIP_Reval_Category,
            X_JE_CIP_Transfer_Category,
            X_JE_Reval_Category,
            --X_Last_Mass_Copy_Period_Ctr,
            --X_Last_Period_Counter,
            --X_Last_Purge_Period_Counter,
            --X_Mass_Copy_Source_Book,
            --X_Mass_Request_ID,
            X_NBV_Amount_Threshold,
            X_NBV_Fraction_Threshold,
            X_NBV_Retired_Gain_Acct,
            X_NBV_Retired_Loss_Acct,
            X_Proceeds_Of_Sale_Clear_Acct,
            X_Proceeds_Of_Sale_Gain_Acct,
            X_Proceeds_Of_Sale_Loss_Acct,
            X_Revalue_On_Retirement_Flag,
            X_Reval_Deprn_Reserve_Flag,
            X_Reval_Rsv_Retired_Gain_Acct,
            X_Reval_Rsv_Retired_Loss_Acct,
            X_Deprn_Adjustment_Acct,
            X_Immediate_Copy_Flag,
            X_JE_Deprn_Adjustment_Category,
            X_Depr_First_Year_Ret_Flag,
            X_Flexbuilder_Defaults_CCID,
            X_Retire_Reval_Reserve_Flag,
            --X_Use_Current_NBV_For_Deprn,
            X_Copy_Additions_Flag,
            X_Percent_Salvage_Value_Flag,
            X_Reval_Posting_Flag,
            X_Global_Attribute1,
            X_Global_Attribute2,
            X_Global_Attribute3,
            X_Global_Attribute4,
            X_Global_Attribute5,
            X_Global_Attribute6,
            X_Global_Attribute7,
            X_Global_Attribute8,
            X_Global_Attribute9,
            X_Global_Attribute10,
            X_Global_Attribute11,
            X_Global_Attribute12,
            X_Global_Attribute13,
            X_Global_Attribute14,
            X_Global_Attribute15,
            X_Global_Attribute16,
            X_Global_Attribute17,
            X_Global_Attribute18,
            X_Global_Attribute19,
            X_Global_Attribute20,
            X_Global_Attribute_Category,
            X_MC_Source_Flag,
            X_Reval_YTD_Deprn_Flag,
            X_Allow_CIP_Assets_Flag,
            X_Org_ID,
            X_Allow_Group_Deprn_Flag,
            X_Allow_CIP_Dep_Group_Flag,
            X_Allow_Interco_Group_Flag,
            X_Copy_Group_Assignment_Flag,
            X_Copy_Group_Additon_Flag,
            X_Allow_CIP_Member_Flag,
            X_Allow_Member_Tracking_Flag,
            X_Intercompany_Posting_Flag,
            X_Backdated_Transfers_Flag,
            X_allow_cost_sign_change_flag,
            X_Sorp_Enabled_Flag,  -- Bug 6666666 : Added for SORP Compliance Project
            X_copy_amort_adaj_exp_flag,
            X_copy_group_change_flag,
            X_prevent_prior_prd_txns_flag,
            X_allow_unallocated_lines_flag,
            X_DEFAULT_PERIOD_END_REVAL_FLG,
            X_IMPORT_ALLOC_INV_LINES_NEW
     );
Line: 800

             calling_fn => 'fa_book_controls_pkg.insert_row', p_log_level_rec => p_log_level_rec);
Line: 803

  END Insert_Row;
Line: 813

  PROCEDURE Update_Row(X_Rowid                          VARCHAR2,
                       X_Book_Type_Code                 VARCHAR2,
                       X_Book_Type_Name                 VARCHAR2,
                       X_Set_Of_Books_Id                NUMBER,
                       X_Initial_Date                   DATE,
                       X_Last_Deprn_Run_Date            DATE,
                       X_Amortize_Flag                  VARCHAR2,
                       X_Fully_Reserved_Flag            VARCHAR2,
                       X_Deprn_Calendar                 VARCHAR2,
                       X_Book_Class                     VARCHAR2,
                       X_GL_Posting_Allowed_Flag        VARCHAR2,
                       X_Current_Fiscal_Year            NUMBER,
                       X_Allow_Mass_Changes             VARCHAR2,
                       X_Allow_Deprn_Adjustments        VARCHAR2,
                       X_Accounting_Flex_Structure      NUMBER,
                       X_Last_Update_Date               DATE,
                       X_Last_Updated_By                NUMBER,
                       X_Prorate_Calendar               VARCHAR2,
                       X_Date_Ineffective               DATE,
                       X_JE_Retirement_Category         VARCHAR2,
                       X_JE_Depreciation_Category       VARCHAR2,
                       X_JE_Reclass_Category            VARCHAR2,
                       X_GL_JE_Source                   VARCHAR2,
                       X_JE_Addition_Category           VARCHAR2,
                       X_JE_Adjustment_Category         VARCHAR2,
                       X_Distribution_Source_Book       VARCHAR2,
                       X_JE_Transfer_Category           VARCHAR2,
                       X_Copy_Retirements_Flag          VARCHAR2,
                       X_Copy_Adjustments_Flag          VARCHAR2,
                       X_Deprn_Request_ID               NUMBER,
                       X_Allow_Cost_Ceiling             VARCHAR2,
                       X_Allow_Deprn_Exp_Ceiling        VARCHAR2,
                       X_Calculate_NBV                  VARCHAR2,
                       X_Run_Year_End_Program           VARCHAR2,
                       X_JE_Deferred_Deprn_Category     VARCHAR2,
                       X_ITC_Allowed_Flag               VARCHAR2,
                       X_Created_By                     NUMBER,
                       X_Creation_Date                  DATE,
                       X_Last_Update_Login              NUMBER,
                       X_Allow_Mass_Copy                VARCHAR2,
                       X_Allow_Purge_Flag               VARCHAR2,
                       X_Allow_Reval_Flag               VARCHAR2,
                       X_Amortize_Reval_Reserve_Flag    VARCHAR2,
                       X_AP_Intercompany_Acct           VARCHAR2,
                       X_AR_Intercompany_Acct           VARCHAR2,
                       X_Attribute1                     VARCHAR2,
                       X_Attribute2                     VARCHAR2,
                       X_Attribute3                     VARCHAR2,
                       X_Attribute4                     VARCHAR2,
                       X_Attribute5                     VARCHAR2,
                       X_Attribute6                     VARCHAR2,
                       X_Attribute7                     VARCHAR2,
                       X_Attribute8                     VARCHAR2,
                       X_Attribute9                     VARCHAR2,
                       X_Attribute10                    VARCHAR2,
                       X_Attribute11                    VARCHAR2,
                       X_Attribute12                    VARCHAR2,
                       X_Attribute13                    VARCHAR2,
                       X_Attribute14                    VARCHAR2,
                       X_Attribute15                    VARCHAR2,
                       X_Attribute_Category_Code        VARCHAR2,
                       X_Capital_Gain_Threshold         NUMBER,
                       X_Copy_Salvage_Value_Flag        VARCHAR2,
                       X_Cost_Of_Removal_ClearingAcct   VARCHAR2,
                       X_Cost_Of_Removal_Gain_Acct      VARCHAR2,
                       X_Cost_Of_Removal_Loss_Acct      VARCHAR2,
                       X_Default_Life_Ext_Ceiling       NUMBER,
                       X_Default_Life_Ext_Factor        NUMBER,
                       X_Default_Max_Fully_Rsvd_Reval   NUMBER,
                       X_Default_Rev_Fully_Rsvd_Flag    VARCHAR2,
                       X_Deferred_Deprn_Expense_Acct    VARCHAR2,
                       X_Deferred_Deprn_Reserve_Acct    VARCHAR2,
                       X_Deprn_Allocation_Code          VARCHAR2,
                       X_Deprn_Status                   VARCHAR2,
                       X_Fiscal_Year_Name               VARCHAR2,
                       X_Initial_Period_Counter         VARCHAR2,
                       X_JE_CIP_Adjustment_Category     VARCHAR2,
                       X_JE_CIP_Addition_Category       VARCHAR2,
                       X_JE_CIP_Reclass_Category        VARCHAR2,
                       X_JE_CIP_Retirement_Category     VARCHAR2,
                       X_JE_CIP_Reval_Category          VARCHAR2,
                       X_JE_CIP_Transfer_Category       VARCHAR2,
                       X_JE_Reval_Category              VARCHAR2,
                       X_Last_Mass_Copy_Period_Ctr      NUMBER,
                       X_Last_Period_Counter            NUMBER,
                       X_Last_Purge_Period_Counter      NUMBER,
                       X_Mass_Copy_Source_Book          VARCHAR2,
                       X_Mass_Request_ID                NUMBER,
                       X_NBV_Amount_Threshold           NUMBER,
                       X_NBV_Fraction_Threshold         NUMBER,
                       X_NBV_Retired_Gain_Acct          VARCHAR2,
                       X_NBV_Retired_Loss_Acct          VARCHAR2,
                       X_Proceeds_Of_Sale_Clear_Acct    VARCHAR2,
                       X_Proceeds_Of_Sale_Gain_Acct     VARCHAR2,
                       X_Proceeds_Of_Sale_Loss_Acct     VARCHAR2,
                       X_Revalue_On_Retirement_Flag     VARCHAR2,
                       X_Reval_Deprn_Reserve_Flag       VARCHAR2,
                       X_Reval_Rsv_Retired_Gain_Acct    VARCHAR2,
                       X_Reval_Rsv_Retired_Loss_Acct    VARCHAR2,
                       X_Deprn_Adjustment_Acct          VARCHAR2,
                       X_Immediate_Copy_Flag            VARCHAR2,
                       X_JE_Deprn_Adjustment_Category   VARCHAR2,
                       X_Depr_First_Year_Ret_Flag       VARCHAR2,
                       X_Flexbuilder_Defaults_CCID      NUMBER,
                       X_Retire_Reval_Reserve_Flag      VARCHAR2,
                       X_Use_Current_NBV_For_Deprn      VARCHAR2,
                       X_Copy_Additions_Flag            VARCHAR2,
                       X_Percent_Salvage_Value_Flag     VARCHAR2,
                       X_Reval_Posting_Flag             VARCHAR2,
                       X_Global_Attribute1              VARCHAR2,
                       X_Global_Attribute2              VARCHAR2,
                       X_Global_Attribute3              VARCHAR2,
                       X_Global_Attribute4              VARCHAR2,
                       X_Global_Attribute5              VARCHAR2,
                       X_Global_Attribute6              VARCHAR2,
                       X_Global_Attribute7              VARCHAR2,
                       X_Global_Attribute8              VARCHAR2,
                       X_Global_Attribute9              VARCHAR2,
                       X_Global_Attribute10             VARCHAR2,
                       X_Global_Attribute11             VARCHAR2,
                       X_Global_Attribute12             VARCHAR2,
                       X_Global_Attribute13             VARCHAR2,
                       X_Global_Attribute14             VARCHAR2,
                       X_Global_Attribute15             VARCHAR2,
                       X_Global_Attribute16             VARCHAR2,
                       X_Global_Attribute17             VARCHAR2,
                       X_Global_Attribute18             VARCHAR2,
                       X_Global_Attribute19             VARCHAR2,
                       X_Global_Attribute20             VARCHAR2,
                       X_Global_Attribute_Category      VARCHAR2,
                       X_MC_Source_Flag                 VARCHAR2,
                       X_Reval_YTD_Deprn_Flag           VARCHAR2,
                       X_Allow_CIP_Assets_Flag          VARCHAR2,
                       X_Org_ID                         NUMBER,
                       X_Allow_Group_Deprn_Flag         VARCHAR2,
                       X_Allow_CIP_Dep_Group_Flag       VARCHAR2,
                       X_Allow_Interco_Group_Flag       VARCHAR2,
                       X_Copy_Group_Assignment_Flag     VARCHAR2,
                       X_Copy_Group_Additon_Flag        VARCHAR2,
                       X_Allow_CIP_Member_Flag          VARCHAR2,
                       X_Allow_Member_Tracking_Flag     VARCHAR2,
                       X_Intercompany_Posting_Flag      VARCHAR2,
                       X_Backdated_Transfers_Flag       VARCHAR2,
                       X_allow_cost_sign_change_flag    VARCHAR2,
                       X_Sorp_Enabled_Flag              VARCHAR2, -- Bug 6666666 : Added for SORP Compliance Project
                       X_copy_amort_adaj_exp_flag       VARCHAR2,
                       X_copy_group_change_flag         VARCHAR2,
                       X_prevent_prior_prd_txns_flag    VARCHAR2,
                       X_allow_unallocated_lines_flag   VARCHAR2,
                       X_MRC_SOB_Type_Code              VARCHAR2 DEFAULT 'P',
                       X_DEFAULT_PERIOD_END_REVAL_FLG   VARCHAR2 DEFAULT NULL,
                       X_IMPORT_ALLOC_INV_LINES_NEW     VARCHAR2,
                       X_Return_Status       OUT NOCOPY BOOLEAN,
                       X_Calling_Fn                     VARCHAR2
  , p_log_level_rec        IN     FA_API_TYPES.log_level_rec_type) AS

     l_sysdate    date;
Line: 975

        UPDATE fa_book_controls
        SET
        book_type_name                 = X_Book_Type_Name,
        set_of_books_id                = X_Set_Of_Books_Id,
        initial_date                   = X_Initial_Date,
        last_deprn_run_date            = X_Last_Deprn_Run_Date,
        amortize_flag                  = X_Amortize_Flag,
        fully_reserved_flag            = X_Fully_Reserved_Flag,
        deprn_calendar                 = X_Deprn_Calendar,
        book_class                     = X_Book_Class,
        gl_posting_allowed_flag        = X_GL_Posting_Allowed_Flag,
        current_fiscal_year            = X_Current_Fiscal_Year,
        allow_mass_changes             = X_Allow_Mass_Changes,
        allow_deprn_adjustments        = X_Allow_Deprn_Adjustments,
        accounting_flex_structure      = X_Accounting_Flex_Structure,
        last_update_date               = X_Last_Update_Date,
        last_updated_by                = X_Last_Updated_By,
        prorate_calendar               = X_Prorate_Calendar,
        date_ineffective               = X_Date_Ineffective,
        je_retirement_category         = X_JE_Retirement_Category,
        je_depreciation_category       = X_JE_Depreciation_Category,
        je_reclass_category            = X_JE_Reclass_Category,
        gl_je_source                   = X_GL_JE_Source,
        je_addition_category           = X_JE_Addition_Category,
        je_adjustment_category         = X_JE_Adjustment_Category,
        distribution_source_book       = X_Distribution_Source_Book,
        je_transfer_category           = X_JE_Transfer_Category,
        copy_retirements_flag          = X_Copy_Retirements_Flag,
        copy_adjustments_flag          = X_Copy_Adjustments_Flag,
        deprn_request_id               = X_Deprn_Request_ID,
        allow_cost_ceiling             = X_Allow_Cost_Ceiling,
        allow_deprn_exp_ceiling        = X_Allow_Deprn_Exp_Ceiling,
        calculate_nbv                  = X_Calculate_NBV,
        run_year_end_program           = X_Run_Year_End_Program,
        je_deferred_deprn_category     = X_JE_Deferred_Deprn_Category,
        itc_allowed_flag               = X_ITC_Allowed_Flag,
        created_by                     = X_Created_By,
        creation_date                  = X_Creation_Date,
        last_update_login              = X_Last_Update_Login,
        allow_mass_copy                = X_Allow_Mass_Copy,
        allow_purge_flag               = X_Allow_Purge_Flag,
        allow_reval_flag               = X_Allow_Reval_Flag,
        amortize_reval_reserve_flag    = X_Amortize_Reval_Reserve_Flag,
        ap_intercompany_acct           = X_AP_Intercompany_Acct,
        ar_intercompany_acct           = X_AR_Intercompany_Acct,
        attribute1                     = X_Attribute1,
        attribute2                     = X_Attribute2,
        attribute3                     = X_Attribute3,
        attribute4                     = X_Attribute4,
        attribute5                     = X_Attribute5,
        attribute6                     = X_Attribute6,
        attribute7                     = X_Attribute7,
        attribute8                     = X_Attribute8,
        attribute9                     = X_Attribute9,
        attribute10                    = X_Attribute10,
        attribute11                    = X_Attribute11,
        attribute12                    = X_Attribute12,
        attribute13                    = X_Attribute13,
        attribute14                    = X_Attribute14,
        attribute15                    = X_Attribute15,
        attribute_category_code        = X_Attribute_Category_Code,
        capital_gain_threshold         = X_Capital_Gain_Threshold,
        copy_salvage_value_flag        = X_Copy_Salvage_Value_Flag,
        cost_of_removal_clearing_acct  = X_Cost_Of_Removal_ClearingAcct,
        cost_of_removal_gain_acct      = X_Cost_Of_Removal_Gain_Acct,
        cost_of_removal_loss_acct      = X_Cost_Of_Removal_Loss_Acct,
        default_life_extension_ceiling = X_Default_Life_Ext_Ceiling,
        default_life_extension_factor  = X_Default_Life_Ext_Factor,
        default_max_fully_rsvd_revals  = X_Default_Max_Fully_Rsvd_Reval,
        default_reval_fully_rsvd_flag  = X_Default_Rev_Fully_Rsvd_Flag,
        deferred_deprn_expense_acct    = X_Deferred_Deprn_Expense_Acct,
        deferred_deprn_reserve_acct    = X_Deferred_Deprn_Reserve_Acct,
        deprn_allocation_code          = X_Deprn_Allocation_Code,
        deprn_status                   = X_Deprn_Status,
        fiscal_year_name               = X_Fiscal_Year_Name,
        initial_period_counter         = X_Initial_Period_Counter,
        je_cip_adjustment_category     = X_JE_CIP_Adjustment_Category,
        je_cip_addition_category       = X_JE_CIP_Addition_Category,
        je_cip_reclass_category        = X_JE_CIP_Reclass_Category,
        je_cip_retirement_category     = X_JE_CIP_Retirement_Category,
        je_cip_reval_category          = X_JE_CIP_Reval_Category,
        je_cip_transfer_category       = X_JE_CIP_Transfer_Category,
        je_reval_category              = X_JE_Reval_Category,
        last_mass_copy_period_counter  = X_Last_Mass_Copy_Period_Ctr,
        last_period_counter            = X_Last_Period_Counter,
        last_purge_period_counter      = X_Last_Purge_Period_Counter,
        mass_copy_source_book          = X_Mass_Copy_Source_Book,
        mass_request_id                = X_Mass_Request_ID,
        nbv_amount_threshold           = X_NBV_Amount_Threshold,
        nbv_fraction_threshold         = X_NBV_Fraction_Threshold,
        nbv_retired_gain_acct          = X_NBV_Retired_Gain_Acct,
        nbv_retired_loss_acct          = X_NBV_Retired_Loss_Acct,
        proceeds_of_sale_clearing_acct = X_Proceeds_Of_Sale_Clear_Acct,
        proceeds_of_sale_gain_acct     = X_Proceeds_Of_Sale_Gain_Acct,
        proceeds_of_sale_loss_acct     = X_Proceeds_Of_Sale_Loss_Acct,
        revalue_on_retirement_flag     = X_Revalue_On_Retirement_Flag,
        reval_deprn_reserve_flag       = X_Reval_Deprn_Reserve_Flag,
        reval_rsv_retired_gain_acct    = X_Reval_Rsv_Retired_Gain_Acct,
        reval_rsv_retired_loss_acct    = X_Reval_Rsv_Retired_Loss_Acct,
        deprn_adjustment_acct          = X_Deprn_Adjustment_Acct,
        immediate_copy_flag            = X_Immediate_Copy_Flag,
        je_deprn_adjustment_category   = X_JE_Deprn_Adjustment_Category,
        depr_first_year_ret_flag       = X_Depr_First_Year_Ret_Flag,
        flexbuilder_defaults_ccid      = X_Flexbuilder_Defaults_CCID,
        retire_reval_reserve_flag      = X_Retire_Reval_Reserve_Flag,
        use_current_nbv_for_deprn      = X_Use_Current_NBV_For_Deprn,
        copy_additions_flag            = X_Copy_Additions_Flag,
        use_percent_salvage_value_flag = X_Percent_Salvage_Value_Flag,
        reval_posting_flag             = X_Reval_Posting_Flag,
        global_attribute1              = X_Global_Attribute1,
        global_attribute2              = X_Global_Attribute2,
        global_attribute3              = X_Global_Attribute3,
        global_attribute4              = X_Global_Attribute4,
        global_attribute5              = X_Global_Attribute5,
        global_attribute6              = X_Global_Attribute6,
        global_attribute7              = X_Global_Attribute7,
        global_attribute8              = X_Global_Attribute8,
        global_attribute9              = X_Global_Attribute9,
        global_attribute10             = X_Global_Attribute10,
        global_attribute11             = X_Global_Attribute11,
        global_attribute12             = X_Global_Attribute12,
        global_attribute13             = X_Global_Attribute13,
        global_attribute14             = X_Global_Attribute14,
        global_attribute15             = X_Global_Attribute15,
        global_attribute16             = X_Global_Attribute16,
        global_attribute17             = X_Global_Attribute17,
        global_attribute18             = X_Global_Attribute18,
        global_attribute19             = X_Global_Attribute19,
        global_attribute20             = X_Global_Attribute20,
        global_attribute_category      = X_Global_Attribute_Category,
        mc_source_flag                 = X_MC_Source_Flag,
        reval_ytd_deprn_flag           = X_Reval_YTD_Deprn_Flag,
        allow_cip_assets_flag          = X_Allow_CIP_Assets_Flag,
        org_id                         = X_Org_ID,
        allow_group_deprn_flag         = X_Allow_Group_Deprn_Flag,
        allow_cip_dep_group_flag       = X_Allow_CIP_Dep_Group_Flag,
        allow_interco_group_flag       = X_Allow_Interco_Group_Flag,
        copy_group_assignment_flag     = X_Copy_Group_Assignment_Flag,
        copy_group_addition_flag       = X_Copy_Group_Additon_Flag,
        allow_cip_member_flag          = X_Allow_CIP_Member_Flag,
        allow_member_tracking_flag     = X_Allow_Member_Tracking_Flag,
        intercompany_posting_flag      = X_Intercompany_Posting_Flag,
        allow_backdated_transfers_flag = X_Backdated_Transfers_Flag,
        allow_cost_sign_change_flag    = X_allow_cost_sign_change_flag,
        sorp_enabled_flag              = X_Sorp_Enabled_Flag, -- Bug 6666666 : Added for SORP Compliance Project
        copy_amort_adaj_exp_flag       = X_copy_amort_adaj_exp_flag,
        copy_group_change_flag         = X_copy_group_change_flag,
        prevent_prior_period_txns_flag = X_prevent_prior_prd_txns_flag,
        allow_unallocated_lines_flag   = X_allow_unallocated_lines_flag,
        DEFAULT_PERIOD_END_REVAL_FLAG  = X_DEFAULT_PERIOD_END_REVAL_FLG,
        IMPORT_ALLOC_INV_LINES_AS_NEW  = X_IMPORT_ALLOC_INV_LINES_NEW
        WHERE book_type_code = X_Book_Type_Code;
Line: 1132

        select sysdate into l_sysdate from dual;
Line: 1134

        UPDATE fa_book_controls_history
        SET    date_inactive = l_sysdate
        WHERE  book_type_code = X_Book_Type_Code
        AND    date_inactive is null;
Line: 1139

        insert into fa_book_controls_history (
            book_type_code,
            date_active,
            date_inactive,
            book_type_name,
            set_of_books_id,
            --initial_date,
            --last_deprn_run_date,
            amortize_flag,
            --fully_reserved_flag,
            --deprn_calendar,
            --book_class,
            gl_posting_allowed_flag,
            --current_fiscal_year,
            allow_mass_changes,
            allow_deprn_adjustments,
            --accounting_flex_structure,
            last_update_date,
            last_updated_by,
            --prorate_calendar,
            date_ineffective,
            je_retirement_category,
            je_depreciation_category,
            je_reclass_category,
            gl_je_source,
            je_addition_category,
            je_adjustment_category,
            --distribution_source_book,
            je_transfer_category,
            copy_retirements_flag,
            copy_adjustments_flag,
            --deprn_request_id,
            allow_cost_ceiling,
            allow_deprn_exp_ceiling,
            --calculate_nbv,
            --run_year_end_program,
            je_deferred_deprn_category,
            itc_allowed_flag,
            created_by,
            creation_date,
            last_update_login,
            allow_mass_copy,
            allow_purge_flag,
            allow_reval_flag,
            amortize_reval_reserve_flag,
            ap_intercompany_acct,
            ar_intercompany_acct,
            attribute1,
            attribute2,
            attribute3,
            attribute4,
            attribute5,
            attribute6,
            attribute7,
            attribute8,
            attribute9,
            attribute10,
            attribute11,
            attribute12,
            attribute13,
            attribute14,
            attribute15,
            attribute_category_code,
            capital_gain_threshold,
            copy_salvage_value_flag,
            cost_of_removal_clearing_acct,
            cost_of_removal_gain_acct,
            cost_of_removal_loss_acct,
            default_life_extension_ceiling,
            default_life_extension_factor,
            default_max_fully_rsvd_revals,
            default_reval_fully_rsvd_flag,
            deferred_deprn_expense_acct,
            deferred_deprn_reserve_acct,
            deprn_allocation_code,
            --deprn_status,
            --fiscal_year_name,
            --initial_period_counter,
            je_cip_adjustment_category,
            je_cip_addition_category,
            je_cip_reclass_category,
            je_cip_retirement_category,
            je_cip_reval_category,
            je_cip_transfer_category,
            je_reval_category,
            --last_mass_copy_period_counter,
            --last_period_counter,
            --last_purge_period_counter,
            --mass_copy_source_book,
            --mass_request_id,
            nbv_amount_threshold,
            nbv_fraction_threshold,
            nbv_retired_gain_acct,
            nbv_retired_loss_acct,
            proceeds_of_sale_clearing_acct,
            proceeds_of_sale_gain_acct,
            proceeds_of_sale_loss_acct,
            revalue_on_retirement_flag,
            reval_deprn_reserve_flag,
            reval_rsv_retired_gain_acct,
            reval_rsv_retired_loss_acct,
            deprn_adjustment_acct,
            immediate_copy_flag,
            je_deprn_adjustment_category,
            depr_first_year_ret_flag,
            flexbuilder_defaults_ccid,
            retire_reval_reserve_flag,
            --use_current_nbv_for_deprn,
            copy_additions_flag,
            use_percent_salvage_value_flag,
            reval_posting_flag,
            global_attribute1,
            global_attribute2,
            global_attribute3,
            global_attribute4,
            global_attribute5,
            global_attribute6,
            global_attribute7,
            global_attribute8,
            global_attribute9,
            global_attribute10,
            global_attribute11,
            global_attribute12,
            global_attribute13,
            global_attribute14,
            global_attribute15,
            global_attribute16,
            global_attribute17,
            global_attribute18,
            global_attribute19,
            global_attribute20,
            global_attribute_category,
            mc_source_flag,
            reval_ytd_deprn_flag,
            allow_cip_assets_flag,
            org_id,
            allow_group_deprn_flag,
            allow_cip_dep_group_flag,
            allow_interco_group_flag,
            copy_group_assignment_flag,
            copy_group_addition_flag,
            allow_cip_member_flag,
            allow_member_tracking_flag,
            intercompany_posting_flag,
            allow_backdated_transfers_flag,
            allow_cost_sign_change_flag,
            sorp_enabled_flag,  -- Bug 6666666 : Added for SORP Compliance Project
            copy_amort_adaj_exp_flag,
            copy_group_change_flag,
            prevent_prior_period_txns_flag,
            allow_unallocated_lines_flag,
            DEFAULT_PERIOD_END_REVAL_FLAG,
            IMPORT_ALLOC_INV_LINES_AS_NEW
        ) values (
            X_Book_Type_Code,
            l_sysdate,              -- date_active
            null,                   -- date_inactive
            X_Book_Type_Name,
            X_Set_Of_Books_Id,
            --X_Initial_Date,
            --X_Last_Deprn_Run_Date,
            X_Amortize_Flag,
            --X_Fully_Reserved_Flag,
            --X_Deprn_Calendar,
            --X_Book_Class,
            X_GL_Posting_Allowed_Flag,
            --X_Current_Fiscal_Year,
            X_Allow_Mass_Changes,
            X_Allow_Deprn_Adjustments,
            --X_Accounting_Flex_Structure,
            X_Last_Update_Date,
            X_Last_Updated_By,
            --X_Prorate_Calendar,
            X_Date_Ineffective,
            X_JE_Retirement_Category,
            X_JE_Depreciation_Category,
            X_JE_Reclass_Category,
            X_GL_JE_Source,
            X_JE_Addition_Category,
            X_JE_Adjustment_Category,
            --X_Distribution_Source_Book,
            X_JE_Transfer_Category,
            X_Copy_Retirements_Flag,
            X_Copy_Adjustments_Flag,
            --X_Deprn_Request_ID,
            X_Allow_Cost_Ceiling,
            X_Allow_Deprn_Exp_Ceiling,
            --X_Calculate_NBV,
            --X_Run_Year_End_Program,
            X_JE_Deferred_Deprn_Category,
            X_ITC_Allowed_Flag,
            X_Created_By,
            X_Creation_Date,
            X_Last_Update_Login,
            X_Allow_Mass_Copy,
            X_Allow_Purge_Flag,
            X_Allow_Reval_Flag,
            X_Amortize_Reval_Reserve_Flag,
            X_AP_Intercompany_Acct,
            X_AR_Intercompany_Acct,
            X_Attribute1,
            X_Attribute2,
            X_Attribute3,
            X_Attribute4,
            X_Attribute5,
            X_Attribute6,
            X_Attribute7,
            X_Attribute8,
            X_Attribute9,
            X_Attribute10,
            X_Attribute11,
            X_Attribute12,
            X_Attribute13,
            X_Attribute14,
            X_Attribute15,
            X_Attribute_Category_Code,
            X_Capital_Gain_Threshold,
            X_Copy_Salvage_Value_Flag,
            X_Cost_Of_Removal_ClearingAcct,
            X_Cost_Of_Removal_Gain_Acct,
            X_Cost_Of_Removal_Loss_Acct,
            X_Default_Life_Ext_Ceiling,
            X_Default_Life_Ext_Factor,
            X_Default_Max_Fully_Rsvd_Reval,
            X_Default_Rev_Fully_Rsvd_Flag,
            X_Deferred_Deprn_Expense_Acct,
            X_Deferred_Deprn_Reserve_Acct,
            X_Deprn_Allocation_Code,
            --X_Deprn_Status,
            --X_Fiscal_Year_Name,
            --X_Initial_Period_Counter,
            X_JE_CIP_Adjustment_Category,
            X_JE_CIP_Addition_Category,
            X_JE_CIP_Reclass_Category,
            X_JE_CIP_Retirement_Category,
            X_JE_CIP_Reval_Category,
            X_JE_CIP_Transfer_Category,
            X_JE_Reval_Category,
            --X_Last_Mass_Copy_Period_Ctr,
            --X_Last_Period_Counter,
            --X_Last_Purge_Period_Counter,
            --X_Mass_Copy_Source_Book,
            --X_Mass_Request_ID,
            X_NBV_Amount_Threshold,
            X_NBV_Fraction_Threshold,
            X_NBV_Retired_Gain_Acct,
            X_NBV_Retired_Loss_Acct,
            X_Proceeds_Of_Sale_Clear_Acct,
            X_Proceeds_Of_Sale_Gain_Acct,
            X_Proceeds_Of_Sale_Loss_Acct,
            X_Revalue_On_Retirement_Flag,
            X_Reval_Deprn_Reserve_Flag,
            X_Reval_Rsv_Retired_Gain_Acct,
            X_Reval_Rsv_Retired_Loss_Acct,
            X_Deprn_Adjustment_Acct,
            X_Immediate_Copy_Flag,
            X_JE_Deprn_Adjustment_Category,
            X_Depr_First_Year_Ret_Flag,
            X_Flexbuilder_Defaults_CCID,
            X_Retire_Reval_Reserve_Flag,
            --X_Use_Current_NBV_For_Deprn,
            X_Copy_Additions_Flag,
            X_Percent_Salvage_Value_Flag,
            X_Reval_Posting_Flag,
            X_Global_Attribute1,
            X_Global_Attribute2,
            X_Global_Attribute3,
            X_Global_Attribute4,
            X_Global_Attribute5,
            X_Global_Attribute6,
            X_Global_Attribute7,
            X_Global_Attribute8,
            X_Global_Attribute9,
            X_Global_Attribute10,
            X_Global_Attribute11,
            X_Global_Attribute12,
            X_Global_Attribute13,
            X_Global_Attribute14,
            X_Global_Attribute15,
            X_Global_Attribute16,
            X_Global_Attribute17,
            X_Global_Attribute18,
            X_Global_Attribute19,
            X_Global_Attribute20,
            X_Global_Attribute_Category,
            X_MC_Source_Flag,
            X_Reval_YTD_Deprn_Flag,
            X_Allow_CIP_Assets_Flag,
            X_Org_ID,
            X_Allow_Group_Deprn_Flag,
            X_Allow_CIP_Dep_Group_Flag,
            X_Allow_Interco_Group_Flag,
            X_Copy_Group_Assignment_Flag,
            X_Copy_Group_Additon_Flag,
            X_Allow_CIP_Member_Flag,
            X_Allow_Member_Tracking_Flag,
            X_Intercompany_Posting_Flag,
            X_Backdated_Transfers_Flag,
            X_allow_cost_sign_change_flag,
            X_Sorp_Enabled_Flag,  -- Bug 6666666 : Added for SORP Compliance Project
            X_copy_amort_adaj_exp_flag,
            X_copy_group_change_flag,
            X_prevent_prior_prd_txns_flag,
            X_allow_unallocated_lines_flag,
            X_DEFAULT_PERIOD_END_REVAL_FLG,
            X_IMPORT_ALLOC_INV_LINES_NEW
        );
Line: 1453

                calling_fn => 'FA_BOOK_CONTROLS_PKG.Update_Row', p_log_level_rec => p_log_level_rec);
Line: 1459

  END Update_Row;
Line: 1461

  PROCEDURE Delete_Row(X_Rowid                          VARCHAR2 DEFAULT NULL,
                       X_Book_Type_Code                 VARCHAR2 DEFAULT NULL,
                       X_MRC_SOB_Type_Code              VARCHAR2 DEFAULT 'P',
                       X_Calling_Fn                     VARCHAR2
  , p_log_level_rec        IN     FA_API_TYPES.log_level_rec_type) AS

     l_book_type_code   varchar2(30);
Line: 1478

             select book_type_code
             into   l_book_type_code
             from   fa_mc_book_controls
             where  rowid = X_Rowid;
Line: 1483

             select book_type_code
             into   l_book_type_code
             from   fa_book_controls
             where  rowid = X_Rowid;
Line: 1497

          select 1
          into   l_exists
          from   fa_mc_books
          where  book_type_code = l_book_type_code;
Line: 1508

          select 1
          into   l_exists
          from   fa_mc_books
          where  book_type_code = l_book_type_code;
Line: 1523

       DELETE FROM fa_mc_deprn_periods
       WHERE  book_type_code = l_book_type_code;
Line: 1526

       DELETE FROM fa_mc_book_controls
       WHERE  book_type_code = l_book_type_code;
Line: 1530

       DELETE FROM fa_deprn_periods
       WHERE  book_type_code = l_book_type_code;
Line: 1533

       DELETE FROM fa_book_controls
       WHERE  book_type_code = l_book_type_code;
Line: 1536

       DELETE FROM fa_book_controls_history
       WHERE  book_type_code = l_book_type_code;
Line: 1544

          calling_fn => 'fa_book_controls_pkg.delete_row',
          name       => 'FA_SHARED_CANT_DEL_USED', p_log_level_rec => p_log_level_rec);
Line: 1547

          CALLED_FN => 'fa_book_controls_pkg.delete_row',
          CALLING_FN => X_Calling_Fn, p_log_level_rec => p_log_level_rec);
Line: 1551

          CALLED_FN => 'fa_book_controls_pkg.delete_row',
          CALLING_FN => X_Calling_Fn, p_log_level_rec => p_log_level_rec);
Line: 1555

          CALLED_FN => 'fa_book_controls_pkg.delete_row',
          CALLING_FN => X_Calling_Fn, p_log_level_rec => p_log_level_rec);
Line: 1557

  END Delete_Row;