The following lines contain the word 'select', 'insert', 'update' or 'delete':
PROCEDURE Insert_Row(X_Rowid IN OUT NOCOPY VARCHAR2,
X_Book_Type_Code VARCHAR2,
X_Asset_Id NUMBER,
X_Date_Placed_In_Service DATE,
X_Date_Effective DATE,
X_Deprn_Start_Date DATE,
X_Deprn_Method_Code VARCHAR2,
X_Life_In_Months NUMBER DEFAULT NULL,
X_Rate_Adjustment_Factor NUMBER,
X_Adjusted_Cost NUMBER,
X_Cost NUMBER,
X_Original_Cost NUMBER,
X_Salvage_Value NUMBER,
X_Prorate_Convention_Code VARCHAR2,
X_Prorate_Date DATE,
X_Cost_Change_Flag VARCHAR2,
X_Adjustment_Required_Status VARCHAR2,
X_Capitalize_Flag VARCHAR2,
X_Retirement_Pending_Flag VARCHAR2,
X_Depreciate_Flag VARCHAR2,
X_Disabled_Flag VARCHAR2 DEFAULT NULL, --hh eg.
X_Last_Update_Date DATE,
X_Last_Updated_By NUMBER,
X_Date_Ineffective DATE DEFAULT NULL,
X_Transaction_Header_Id_In NUMBER,
X_Transaction_Header_Id_Out NUMBER DEFAULT NULL,
X_Itc_Amount_Id NUMBER DEFAULT NULL,
X_Itc_Amount NUMBER DEFAULT NULL,
X_Retirement_Id NUMBER DEFAULT NULL,
X_Tax_Request_Id NUMBER DEFAULT NULL,
X_Itc_Basis NUMBER DEFAULT NULL,
X_Basic_Rate NUMBER DEFAULT NULL,
X_Adjusted_Rate NUMBER DEFAULT NULL,
X_Bonus_Rule VARCHAR2 DEFAULT NULL,
X_Ceiling_Name VARCHAR2 DEFAULT NULL,
X_Recoverable_Cost NUMBER,
X_Last_Update_Login NUMBER DEFAULT NULL,
X_Adjusted_Capacity NUMBER DEFAULT NULL,
X_Fully_Rsvd_Revals_Counter NUMBER DEFAULT NULL,
X_Idled_Flag VARCHAR2 DEFAULT NULL,
X_Period_Counter_Capitalized NUMBER DEFAULT NULL,
X_PC_Fully_Reserved NUMBER DEFAULT NULL,
X_Period_Counter_Fully_Retired NUMBER DEFAULT NULL,
X_Production_Capacity NUMBER DEFAULT NULL,
X_Reval_Amortization_Basis NUMBER DEFAULT NULL,
X_Reval_Ceiling NUMBER DEFAULT NULL,
X_Unit_Of_Measure VARCHAR2 DEFAULT NULL,
X_Unrevalued_Cost NUMBER,
X_Annual_Deprn_Rounding_Flag VARCHAR2 DEFAULT NULL,
X_Percent_Salvage_Value NUMBER DEFAULT NULL,
X_Allowed_Deprn_Limit NUMBER DEFAULT NULL,
X_Allowed_Deprn_Limit_Amount NUMBER DEFAULT NULL,
X_Period_Counter_Life_Complete NUMBER DEFAULT NULL,
X_Adjusted_Recoverable_Cost NUMBER DEFAULT NULL,
/* syoung: next new columns for short tax years */
X_Short_Fiscal_Year_Flag VARCHAR2 DEFAULT NULL,
X_Conversion_Date DATE DEFAULT NULL,
X_Orig_Deprn_Start_Date DATE DEFAULT NULL,
X_Remaining_Life1 NUMBER DEFAULT NULL,
X_Remaining_Life2 NUMBER DEFAULT NULL,
X_Old_Adj_Cost NUMBER DEFAULT NULL,
X_Formula_Factor NUMBER DEFAULT NULL,
/* syoung: up to here */
X_gf_Attribute1 VARCHAR2 DEFAULT NULL,
X_gf_Attribute2 VARCHAR2 DEFAULT NULL,
X_gf_Attribute3 VARCHAR2 DEFAULT NULL,
X_gf_Attribute4 VARCHAR2 DEFAULT NULL,
X_gf_Attribute5 VARCHAR2 DEFAULT NULL,
X_gf_Attribute6 VARCHAR2 DEFAULT NULL,
X_gf_Attribute7 VARCHAR2 DEFAULT NULL,
X_gf_Attribute8 VARCHAR2 DEFAULT NULL,
X_gf_Attribute9 VARCHAR2 DEFAULT NULL,
X_gf_Attribute10 VARCHAR2 DEFAULT NULL,
X_gf_Attribute11 VARCHAR2 DEFAULT NULL,
X_gf_Attribute12 VARCHAR2 DEFAULT NULL,
X_gf_Attribute13 VARCHAR2 DEFAULT NULL,
X_gf_Attribute14 VARCHAR2 DEFAULT NULL,
X_gf_Attribute15 VARCHAR2 DEFAULT NULL,
X_gf_Attribute16 VARCHAR2 DEFAULT NULL,
X_gf_Attribute17 VARCHAR2 DEFAULT NULL,
X_gf_Attribute18 VARCHAR2 DEFAULT NULL,
X_gf_Attribute19 VARCHAR2 DEFAULT NULL,
X_gf_Attribute20 VARCHAR2 DEFAULT NULL,
X_global_attribute_category VARCHAR2 DEFAULT NULL,
X_group_asset_id NUMBER DEFAULT NULL,
-- new group fields
X_salvage_type VARCHAR2 DEFAULT NULL,
X_deprn_limit_type VARCHAR2 DEFAULT NULL,
X_over_depreciate_option VARCHAR2 DEFAULT NULL,
X_super_group_id NUMBER DEFAULT NULL,
X_reduction_rate NUMBER DEFAULT NULL,
X_reduce_addition_flag VARCHAR2 DEFAULT NULL,
X_reduce_adjustment_flag VARCHAR2 DEFAULT NULL,
X_reduce_retirement_flag VARCHAR2 DEFAULT NULL,
X_recognize_gain_loss VARCHAR2 DEFAULT NULL,
X_recapture_reserve_flag VARCHAR2 DEFAULT NULL,
X_limit_proceeds_flag VARCHAR2 DEFAULT NULL,
X_terminal_gain_loss VARCHAR2 DEFAULT NULL,
X_tracking_method VARCHAR2 DEFAULT NULL,
X_allocate_to_fully_rsv_flag VARCHAR2 DEFAULT NULL,
X_allocate_to_fully_ret_flag VARCHAR2 DEFAULT NULL,
X_exclude_fully_rsv_flag VARCHAR2 DEFAULT NULL,
X_excess_allocation_option VARCHAR2 DEFAULT NULL,
X_depreciation_option VARCHAR2 DEFAULT NULL,
X_member_rollup_flag VARCHAR2 DEFAULT NULL,
X_ytd_proceeds NUMBER DEFAULT NULL,
X_ltd_proceeds NUMBER DEFAULT NULL,
X_eofy_reserve NUMBER DEFAULT NULL,
X_cip_cost NUMBER DEFAULT NULL,
X_terminal_gain_loss_amount NUMBER DEFAULT NULL,
X_ltd_cost_of_removal NUMBER DEFAULT NULL,
X_exclude_proceeds_from_basis VARCHAR2 DEFAULT NULL,
X_retirement_deprn_option VARCHAR2 DEFAULT NULL,
X_terminal_gain_loss_flag VARCHAR2 DEFAULT NULL,
X_contract_id NUMBER DEFAULT NULL, -- Bug:6021567
X_extended_deprn_flag VARCHAR2 DEFAULT NULL, -- Japan Tax Phase3
X_extended_depreciation_period NUMBER DEFAULT NULL, -- Japan Tax Phase3
X_mrc_sob_type_code VARCHAR2 DEFAULT 'P',
X_Return_Status OUT NOCOPY BOOLEAN,
X_Calling_Fn VARCHAR2,
p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null) IS
CURSOR C_bk IS SELECT rowid FROM fa_books
WHERE transaction_header_id_in = X_Transaction_Header_Id_In;
CURSOR C_bk_mc IS SELECT rowid FROM fa_books_mrc_v
WHERE transaction_header_id_in = X_Transaction_Header_Id_In;
INSERT INTO fa_books_mrc_v(
book_type_code,
asset_id,
date_placed_in_service,
date_effective,
deprn_start_date,
deprn_method_code,
life_in_months,
rate_adjustment_factor,
adjusted_cost,
cost,
original_cost,
salvage_value,
prorate_convention_code,
prorate_date,
cost_change_flag,
adjustment_required_status,
capitalize_flag,
retirement_pending_flag,
depreciate_flag,
disabled_flag, --HH eg.
last_update_date,
last_updated_by,
date_ineffective,
transaction_header_id_in,
transaction_header_id_out,
itc_amount_id,
itc_amount,
retirement_id,
tax_request_id,
itc_basis,
basic_rate,
adjusted_rate,
bonus_rule,
ceiling_name,
recoverable_cost,
last_update_login,
adjusted_capacity,
fully_rsvd_revals_counter,
idled_flag,
period_counter_capitalized,
period_counter_fully_reserved,
period_counter_fully_retired,
production_capacity,
reval_amortization_basis,
reval_ceiling,
unit_of_measure,
unrevalued_cost,
annual_deprn_rounding_flag,
percent_salvage_value,
allowed_deprn_limit,
allowed_deprn_limit_amount,
period_counter_life_complete,
adjusted_recoverable_cost,
/* syoung: next new columns for short tax years */
short_fiscal_year_flag,
conversion_date,
original_deprn_start_date,
remaining_life1,
remaining_life2,
old_adjusted_cost,
formula_factor,
/* syoung: up to here */
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,
group_asset_id,
salvage_type,
deprn_limit_type,
over_depreciate_option,
super_group_id,
reduction_rate,
reduce_addition_flag,
reduce_adjustment_flag,
reduce_retirement_flag,
recognize_gain_loss,
recapture_reserve_flag,
limit_proceeds_flag,
terminal_gain_loss,
tracking_method,
allocate_to_fully_rsv_flag,
allocate_to_fully_ret_flag,
exclude_fully_rsv_flag,
excess_allocation_option,
depreciation_option,
member_rollup_flag,
ytd_proceeds,
ltd_proceeds,
eofy_reserve,
cip_cost,
terminal_gain_loss_amount,
ltd_cost_of_removal,
exclude_proceeds_from_basis,
retirement_deprn_option,
terminal_gain_loss_flag,
contract_id -- Bug:6021567
) VALUES (
X_Book_Type_Code,
X_Asset_Id,
X_Date_Placed_In_Service,
X_Date_Effective,
X_Deprn_Start_Date,
X_Deprn_Method_Code,
X_Life_In_Months,
X_Rate_Adjustment_Factor,
X_Adjusted_Cost,
X_Cost,
X_Original_Cost,
X_Salvage_Value,
X_Prorate_Convention_Code,
X_Prorate_Date,
X_Cost_Change_Flag,
X_Adjustment_Required_Status,
X_Capitalize_Flag,
X_Retirement_Pending_Flag,
X_Depreciate_Flag,
X_disabled_flag, --HH eg.
X_Last_Update_Date,
X_Last_Updated_By,
X_Date_Ineffective,
X_Transaction_Header_Id_In,
X_Transaction_Header_Id_Out,
X_Itc_Amount_Id,
X_Itc_Amount,
X_Retirement_Id,
X_Tax_Request_Id,
X_Itc_Basis,
X_Basic_Rate,
X_Adjusted_Rate,
X_Bonus_Rule,
X_Ceiling_Name,
X_Recoverable_Cost,
X_Last_Update_Login,
X_Adjusted_Capacity,
X_Fully_Rsvd_Revals_Counter,
X_Idled_Flag,
X_Period_Counter_Capitalized,
X_PC_Fully_Reserved,
X_Period_Counter_Fully_Retired,
X_Production_Capacity,
X_Reval_Amortization_Basis,
X_Reval_Ceiling,
X_Unit_Of_Measure,
X_Unrevalued_Cost,
X_Annual_Deprn_Rounding_Flag,
X_Percent_Salvage_Value,
X_Allowed_Deprn_Limit,
X_Allowed_Deprn_Limit_Amount,
X_Period_Counter_Life_Complete,
X_Adjusted_Recoverable_Cost,
/* syoung: next new column values for short tax years */
X_Short_Fiscal_Year_Flag,
X_Conversion_Date,
X_Orig_Deprn_Start_Date,
X_Remaining_Life1,
X_Remaining_Life2,
X_Old_Adj_Cost,
X_Formula_Factor,
/* syoung: up to here */
X_gf_Attribute1,
X_gf_Attribute2,
X_gf_Attribute3,
X_gf_Attribute4,
X_gf_Attribute5,
X_gf_Attribute6,
X_gf_Attribute7,
X_gf_Attribute8,
X_gf_Attribute9,
X_gf_Attribute10,
X_gf_Attribute11,
X_gf_Attribute12,
X_gf_Attribute13,
X_gf_Attribute14,
X_gf_Attribute15,
X_gf_Attribute16,
X_gf_Attribute17,
X_gf_Attribute18,
X_gf_Attribute19,
X_gf_Attribute20,
X_global_attribute_category,
X_group_asset_id,
X_salvage_type,
X_deprn_limit_type,
X_over_depreciate_option,
X_super_group_id,
X_reduction_rate,
X_reduce_addition_flag,
X_reduce_adjustment_flag,
X_reduce_retirement_flag,
X_recognize_gain_loss,
X_recapture_reserve_flag,
X_limit_proceeds_flag,
X_terminal_gain_loss,
X_tracking_method,
X_allocate_to_fully_rsv_flag,
X_allocate_to_fully_ret_flag,
X_exclude_fully_rsv_flag,
X_excess_allocation_option,
X_depreciation_option,
X_member_rollup_flag,
X_ytd_proceeds,
X_ltd_proceeds,
X_eofy_reserve,
X_cip_cost,
X_terminal_gain_loss_amount,
X_ltd_cost_of_removal,
X_exclude_proceeds_from_basis,
X_retirement_deprn_option,
X_terminal_gain_loss_flag,
X_contract_id -- Bug:6021567
);
INSERT INTO fa_books(
book_type_code,
asset_id,
date_placed_in_service,
date_effective,
deprn_start_date,
deprn_method_code,
life_in_months,
rate_adjustment_factor,
adjusted_cost,
cost,
original_cost,
salvage_value,
prorate_convention_code,
prorate_date,
cost_change_flag,
adjustment_required_status,
capitalize_flag,
retirement_pending_flag,
depreciate_flag,
disabled_flag, --HH eg.
last_update_date,
last_updated_by,
date_ineffective,
transaction_header_id_in,
transaction_header_id_out,
itc_amount_id,
itc_amount,
retirement_id,
tax_request_id,
itc_basis,
basic_rate,
adjusted_rate,
bonus_rule,
ceiling_name,
recoverable_cost,
last_update_login,
adjusted_capacity,
fully_rsvd_revals_counter,
idled_flag,
period_counter_capitalized,
period_counter_fully_reserved,
period_counter_fully_retired,
production_capacity,
reval_amortization_basis,
reval_ceiling,
unit_of_measure,
unrevalued_cost,
annual_deprn_rounding_flag,
percent_salvage_value,
allowed_deprn_limit,
allowed_deprn_limit_amount,
period_counter_life_complete,
adjusted_recoverable_cost,
/* syoung: next new columns for short tax years */
short_fiscal_year_flag,
conversion_date,
original_deprn_start_date,
remaining_life1,
remaining_life2,
old_adjusted_cost,
formula_factor,
/* syoung: up to here */
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,
group_asset_id,
salvage_type,
deprn_limit_type,
over_depreciate_option,
super_group_id,
reduction_rate,
reduce_addition_flag,
reduce_adjustment_flag,
reduce_retirement_flag,
recognize_gain_loss,
recapture_reserve_flag,
limit_proceeds_flag,
terminal_gain_loss,
tracking_method,
allocate_to_fully_rsv_flag,
allocate_to_fully_ret_flag,
exclude_fully_rsv_flag,
excess_allocation_option,
depreciation_option,
member_rollup_flag,
ytd_proceeds,
ltd_proceeds,
eofy_reserve,
cip_cost,
terminal_gain_loss_amount,
ltd_cost_of_removal,
exclude_proceeds_from_basis,
retirement_deprn_option,
terminal_gain_loss_flag,
contract_id, -- Bug:6021567
extended_deprn_flag, -- Japan Tax Phase3
extended_depreciation_period -- Japan Tax Phase3
) VALUES (
X_Book_Type_Code,
X_Asset_Id,
X_Date_Placed_In_Service,
X_Date_Effective,
X_Deprn_Start_Date,
X_Deprn_Method_Code,
X_Life_In_Months,
X_Rate_Adjustment_Factor,
X_Adjusted_Cost,
X_Cost,
X_Original_Cost,
X_Salvage_Value,
X_Prorate_Convention_Code,
X_Prorate_Date,
X_Cost_Change_Flag,
X_Adjustment_Required_Status,
X_Capitalize_Flag,
X_Retirement_Pending_Flag,
X_Depreciate_Flag,
X_disabled_flag, --HH eg.
X_Last_Update_Date,
X_Last_Updated_By,
X_Date_Ineffective,
X_Transaction_Header_Id_In,
X_Transaction_Header_Id_Out,
X_Itc_Amount_Id,
X_Itc_Amount,
X_Retirement_Id,
X_Tax_Request_Id,
X_Itc_Basis,
X_Basic_Rate,
X_Adjusted_Rate,
X_Bonus_Rule,
X_Ceiling_Name,
X_Recoverable_Cost,
X_Last_Update_Login,
X_Adjusted_Capacity,
X_Fully_Rsvd_Revals_Counter,
X_Idled_Flag,
X_Period_Counter_Capitalized,
X_PC_Fully_Reserved,
X_Period_Counter_Fully_Retired,
X_Production_Capacity,
X_Reval_Amortization_Basis,
X_Reval_Ceiling,
X_Unit_Of_Measure,
X_Unrevalued_Cost,
X_Annual_Deprn_Rounding_Flag,
X_Percent_Salvage_Value,
X_Allowed_Deprn_Limit,
X_Allowed_Deprn_Limit_Amount,
X_Period_Counter_Life_Complete,
X_Adjusted_Recoverable_Cost,
/* syoung: next new column values for short tax years */
X_Short_Fiscal_Year_Flag,
X_Conversion_Date,
X_Orig_Deprn_Start_Date,
X_Remaining_Life1,
X_Remaining_Life2,
X_Old_Adj_Cost,
X_Formula_Factor,
/* syoung: up to here */
X_gf_Attribute1,
X_gf_Attribute2,
X_gf_Attribute3,
X_gf_Attribute4,
X_gf_Attribute5,
X_gf_Attribute6,
X_gf_Attribute7,
X_gf_Attribute8,
X_gf_Attribute9,
X_gf_Attribute10,
X_gf_Attribute11,
X_gf_Attribute12,
X_gf_Attribute13,
X_gf_Attribute14,
X_gf_Attribute15,
X_gf_Attribute16,
X_gf_Attribute17,
X_gf_Attribute18,
X_gf_Attribute19,
X_gf_Attribute20,
X_global_attribute_category,
X_group_asset_id,
X_salvage_type,
X_deprn_limit_type,
X_over_depreciate_option,
X_super_group_id,
X_reduction_rate,
X_reduce_addition_flag,
X_reduce_adjustment_flag,
X_reduce_retirement_flag,
X_recognize_gain_loss,
X_recapture_reserve_flag,
X_limit_proceeds_flag,
X_terminal_gain_loss,
X_tracking_method,
X_allocate_to_fully_rsv_flag,
X_allocate_to_fully_ret_flag,
X_exclude_fully_rsv_flag,
X_excess_allocation_option,
X_depreciation_option,
X_member_rollup_flag,
X_ytd_proceeds,
X_ltd_proceeds,
X_eofy_reserve,
X_cip_cost,
X_terminal_gain_loss_amount,
X_ltd_cost_of_removal,
X_exclude_proceeds_from_basis,
X_retirement_deprn_option,
X_terminal_gain_loss_flag,
X_contract_id, -- Bug:6021567
X_extended_deprn_flag, -- Japan Tax Phase3
X_extended_depreciation_period -- Japan Tax Phase3
);
if (X_Calling_Fn = 'fa_unp_dep_pkg.on_insert') then
FA_STANDARD_PKG.RAISE_ERROR(
CALLED_FN => 'fa_books_pkg.insert_row',
CALLING_FN => X_Calling_Fn
,p_log_level_rec => p_log_level_rec);
calling_fn => 'fa_books_pkg.insert_row'
,p_log_level_rec => p_log_level_rec);
END Insert_Row;
SELECT book_type_code,
asset_id,
date_placed_in_service,
date_effective,
deprn_start_date,
deprn_method_code,
life_in_months,
rate_adjustment_factor,
adjusted_cost,
cost,
original_cost,
salvage_value,
prorate_convention_code,
prorate_date,
cost_change_flag,
adjustment_required_status,
capitalize_flag,
retirement_pending_flag,
depreciate_flag,
disabled_flag, --HH eg.
last_update_date,
last_updated_by,
date_ineffective,
transaction_header_id_in,
transaction_header_id_out,
itc_amount_id,
itc_amount,
retirement_id,
tax_request_id,
itc_basis,
basic_rate,
adjusted_rate,
bonus_rule,
ceiling_name,
recoverable_cost,
last_update_login,
adjusted_capacity,
fully_rsvd_revals_counter,
idled_flag,
period_counter_capitalized,
period_counter_fully_reserved,
period_counter_fully_retired,
production_capacity,
reval_amortization_basis,
reval_ceiling,
unit_of_measure,
unrevalued_cost,
annual_deprn_rounding_flag,
percent_salvage_value,
allowed_deprn_limit,
allowed_deprn_limit_amount,
period_counter_life_complete,
adjusted_recoverable_cost,
annual_rounding_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,
eofy_adj_cost,
short_fiscal_year_flag,
conversion_date,
remaining_life1,
remaining_life2,
original_deprn_start_date,
old_adjusted_cost,
formula_factor,
eofy_formula_factor
FROM fa_books
WHERE rowid = X_Rowid
FOR UPDATE of Transaction_Header_Id_In NOWAIT;
FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_DELETED');
PROCEDURE Update_Row(X_Rowid VARCHAR2 DEFAULT NULL,
X_Book_Type_Code VARCHAR2 DEFAULT NULL,
X_Asset_Id NUMBER DEFAULT NULL,
X_Date_Placed_In_Service DATE DEFAULT NULL,
X_Date_Effective DATE DEFAULT NULL,
X_Deprn_Start_Date DATE DEFAULT NULL,
X_Deprn_Method_Code VARCHAR2 DEFAULT NULL,
X_Life_In_Months NUMBER DEFAULT NULL,
X_Rate_Adjustment_Factor NUMBER DEFAULT NULL,
X_Adjusted_Cost NUMBER DEFAULT NULL,
X_Cost NUMBER DEFAULT NULL,
X_Original_Cost NUMBER DEFAULT NULL,
X_Salvage_Value NUMBER DEFAULT NULL,
X_Prorate_Convention_Code VARCHAR2 DEFAULT NULL,
X_Prorate_Date DATE DEFAULT NULL,
X_Cost_Change_Flag VARCHAR2 DEFAULT NULL,
X_Adjustment_Required_Status VARCHAR2 DEFAULT NULL,
X_Capitalize_Flag VARCHAR2 DEFAULT NULL,
X_Retirement_Pending_Flag VARCHAR2 DEFAULT NULL,
X_Depreciate_Flag VARCHAR2 DEFAULT NULL,
X_Disabled_Flag VARCHAR2 DEFAULT NULL, --HH
X_Last_Update_Date DATE DEFAULT NULL,
X_Last_Updated_By NUMBER DEFAULT NULL,
X_Date_Ineffective DATE DEFAULT NULL,
X_Transaction_Header_Id_In NUMBER DEFAULT NULL,
X_Transaction_Header_Id_Out NUMBER DEFAULT NULL,
X_Itc_Amount_Id NUMBER DEFAULT NULL,
X_Itc_Amount NUMBER DEFAULT NULL,
X_Retirement_Id NUMBER DEFAULT NULL,
X_Tax_Request_Id NUMBER DEFAULT NULL,
X_Itc_Basis NUMBER DEFAULT NULL,
X_Basic_Rate NUMBER DEFAULT NULL,
X_Adjusted_Rate NUMBER DEFAULT NULL,
X_Bonus_Rule VARCHAR2 DEFAULT NULL,
X_Ceiling_Name VARCHAR2 DEFAULT NULL,
X_Recoverable_Cost NUMBER DEFAULT NULL,
X_Last_Update_Login NUMBER DEFAULT NULL,
X_Adjusted_Capacity NUMBER DEFAULT NULL,
X_Fully_Rsvd_Revals_Counter NUMBER DEFAULT NULL,
X_Idled_Flag VARCHAR2 DEFAULT NULL,
X_Period_Counter_Capitalized NUMBER DEFAULT NULL,
X_PC_Fully_Reserved NUMBER DEFAULT NULL,
X_Period_Counter_Fully_Retired NUMBER DEFAULT NULL,
X_Production_Capacity NUMBER DEFAULT NULL,
X_Reval_Amortization_Basis NUMBER DEFAULT NULL,
X_Reval_Ceiling NUMBER DEFAULT NULL,
X_Unit_Of_Measure VARCHAR2 DEFAULT NULL,
X_Unrevalued_Cost NUMBER DEFAULT NULL,
X_Annual_Deprn_Rounding_Flag VARCHAR2 DEFAULT NULL,
X_Percent_Salvage_Value NUMBER DEFAULT NULL,
X_Allowed_Deprn_Limit NUMBER DEFAULT NULL,
X_Allowed_Deprn_Limit_Amount NUMBER DEFAULT NULL,
X_Period_Counter_Life_Complete NUMBER DEFAULT NULL,
X_Adjusted_Recoverable_Cost NUMBER DEFAULT NULL,
X_Group_Asset_Id NUMBER DEFAULT NULL,
-- new group columns
X_salvage_type VARCHAR2 DEFAULT NULL,
X_deprn_limit_type VARCHAR2 DEFAULT NULL,
X_over_depreciate_option VARCHAR2 DEFAULT NULL,
X_super_group_id NUMBER DEFAULT NULL,
X_reduction_rate NUMBER DEFAULT NULL,
X_reduce_addition_flag VARCHAR2 DEFAULT NULL,
X_reduce_adjustment_flag VARCHAR2 DEFAULT NULL,
X_reduce_retirement_flag VARCHAR2 DEFAULT NULL,
X_recognize_gain_loss VARCHAR2 DEFAULT NULL,
X_recapture_reserve_flag VARCHAR2 DEFAULT NULL,
X_limit_proceeds_flag VARCHAR2 DEFAULT NULL,
X_terminal_gain_loss VARCHAR2 DEFAULT NULL,
X_tracking_method VARCHAR2 DEFAULT NULL,
X_allocate_to_fully_rsv_flag VARCHAR2 DEFAULT NULL,
X_allocate_to_fully_ret_flag VARCHAR2 DEFAULT NULL,
X_exclude_fully_rsv_flag VARCHAR2 DEFAULT NULL,
X_excess_allocation_option VARCHAR2 DEFAULT NULL,
X_depreciation_option VARCHAR2 DEFAULT NULL,
X_member_rollup_flag VARCHAR2 DEFAULT NULL,
X_ytd_proceeds NUMBER DEFAULT NULL,
X_ltd_proceeds NUMBER DEFAULT NULL,
X_eofy_reserve NUMBER DEFAULT NULL,
X_cip_cost NUMBER DEFAULT NULL,
X_terminal_gain_loss_amount NUMBER DEFAULT NULL,
X_ltd_cost_of_removal NUMBER DEFAULT NULL,
X_exclude_proceeds_from_basis VARCHAR2 DEFAULT NULL,
X_retirement_deprn_option VARCHAR2 DEFAULT NULL,
X_terminal_gain_loss_flag VARCHAR2 DEFAULT NULL,
X_Formula_Factor NUMBER 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 default null) IS
BEGIN
if (X_mrc_sob_type_code = 'R') then
if X_Rowid is not null then
UPDATE fa_books_mrc_v
SET
book_type_code = decode(X_Book_Type_Code,
NULL, book_type_code,
FND_API.G_MISS_CHAR, NULL,
X_Book_Type_Code),
asset_id = decode(X_Asset_Id,
NULL, asset_id,
FND_API.G_MISS_NUM, NULL,
X_Asset_Id),
date_placed_in_service = decode(X_Date_Placed_In_Service,
NULL, date_placed_in_service ,
X_Date_Placed_In_Service),
date_effective = decode(X_Date_Effective,
NULL, date_effective,
X_Date_Effective),
deprn_start_date = decode(X_Deprn_Start_Date,
NULL, deprn_start_date,
X_Deprn_Start_Date),
deprn_method_code = decode(X_Deprn_Method_Code,
NULL, deprn_method_code,
FND_API.G_MISS_CHAR, NULL,
X_Deprn_Method_Code),
life_in_months = decode(X_Life_In_Months,
NULL, life_in_months,
FND_API.G_MISS_NUM, NULL,
X_Life_In_Months),
rate_adjustment_factor = decode(X_Rate_Adjustment_Factor,
NULL, rate_adjustment_factor,
FND_API.G_MISS_NUM, NULL,
X_Rate_Adjustment_Factor),
adjusted_cost = decode(X_Adjusted_Cost,
NULL, adjusted_cost,
FND_API.G_MISS_NUM, NULL,
X_Adjusted_Cost),
cost = decode(X_Cost,
NULL, cost,
FND_API.G_MISS_NUM, NULL,
X_Cost),
original_cost = decode(X_Original_Cost,
NULL, original_cost,
FND_API.G_MISS_NUM, NULL,
X_Original_Cost),
salvage_value = decode(X_Salvage_Value,
NULL, salvage_value,
FND_API.G_MISS_NUM, NULL,
X_Salvage_Value),
prorate_convention_code = decode(X_Prorate_Convention_Code,
NULL, prorate_convention_code,
FND_API.G_MISS_CHAR, NULL,
X_Prorate_Convention_Code),
prorate_date = decode(X_Prorate_Date,
NULL, prorate_date,
X_Prorate_Date),
cost_change_flag = decode(X_Cost_Change_Flag,
NULL, cost_change_flag,
FND_API.G_MISS_CHAR, NULL,
X_Cost_Change_Flag),
adjustment_required_status = decode(X_Adjustment_Required_Status,
NULL, adjustment_required_status,
FND_API.G_MISS_CHAR, NULL,
X_Adjustment_Required_Status),
capitalize_flag = decode(X_Capitalize_Flag,
NULL, capitalize_flag,
FND_API.G_MISS_CHAR, NULL,
X_Capitalize_Flag),
retirement_pending_flag = decode(X_Retirement_Pending_Flag,
NULL, retirement_pending_flag,
FND_API.G_MISS_CHAR, NULL,
X_Retirement_Pending_Flag),
depreciate_flag = decode(X_Depreciate_Flag,
NULL, depreciate_flag,
FND_API.G_MISS_CHAR, NULL,
X_Depreciate_Flag),
--HH group ed.
disabled_flag = decode(X_Disabled_Flag,
NULL, disabled_flag,
FND_API.G_MISS_CHAR, NULL,
X_Disabled_Flag),
last_update_date = decode(X_Last_Update_Date,
NULL, last_update_date,
X_Last_Update_Date),
last_updated_by = decode(X_Last_Updated_By,
NULL, last_updated_by,
FND_API.G_MISS_NUM, NULL,
X_Last_Updated_By),
date_ineffective = decode(X_Date_Ineffective,
NULL, date_ineffective,
X_Date_Ineffective),
transaction_header_id_in = decode(X_Transaction_Header_Id_In,
NULL, transaction_header_id_in,
FND_API.G_MISS_NUM, NULL,
X_Transaction_Header_Id_In),
transaction_header_id_out = decode(X_Transaction_Header_Id_Out,
NULL, transaction_header_id_out,
FND_API.G_MISS_NUM, NULL,
X_Transaction_Header_Id_Out),
itc_amount_id = decode(X_Itc_Amount_Id,
NULL, itc_amount_id,
FND_API.G_MISS_NUM, NULL,
X_Itc_Amount_Id),
itc_amount = decode(X_Itc_Amount,
NULL, itc_amount,
FND_API.G_MISS_NUM, NULL,
X_Itc_Amount),
retirement_id = decode(X_Retirement_Id,
NULL, retirement_id,
FND_API.G_MISS_NUM, NULL,
X_Retirement_Id),
tax_request_id = decode(X_Tax_Request_Id,
NULL, tax_request_id,
FND_API.G_MISS_NUM, NULL,
X_Tax_Request_Id),
itc_basis = decode(X_Itc_Basis,
NULL, itc_basis,
FND_API.G_MISS_NUM, NULL,
X_Itc_Basis),
basic_rate = decode(X_Basic_Rate,
NULL, basic_rate,
FND_API.G_MISS_NUM, NULL,
X_Basic_Rate),
adjusted_rate = decode(X_Adjusted_Rate,
NULL, adjusted_rate,
FND_API.G_MISS_NUM, NULL,
X_Adjusted_Rate),
bonus_rule = decode(X_Bonus_Rule,
NULL, bonus_rule,
FND_API.G_MISS_CHAR, NULL,
X_Bonus_Rule),
ceiling_name = decode(X_Ceiling_Name,
NULL, ceiling_name,
FND_API.G_MISS_CHAR, NULL,
X_Ceiling_Name),
recoverable_cost = decode(X_Recoverable_Cost,
NULL, recoverable_cost,
FND_API.G_MISS_NUM, NULL,
X_Recoverable_Cost),
last_update_login = decode(X_Last_Update_Login,
NULL, last_update_login,
FND_API.G_MISS_NUM, NULL,
X_Last_Update_Login),
adjusted_capacity = decode(X_Adjusted_Capacity,
NULL, adjusted_capacity,
FND_API.G_MISS_NUM, NULL,
X_Adjusted_Capacity),
fully_rsvd_revals_counter = decode(X_Fully_Rsvd_Revals_Counter,
NULL, fully_rsvd_revals_counter,
FND_API.G_MISS_NUM, NULL,
X_Fully_Rsvd_Revals_Counter),
idled_flag = decode(X_Idled_Flag,
NULL, idled_flag,
FND_API.G_MISS_CHAR, NULL,
X_Idled_Flag),
period_counter_capitalized = decode(X_Period_Counter_Capitalized,
NULL, period_counter_capitalized,
FND_API.G_MISS_NUM, NULL,
X_Period_Counter_Capitalized),
period_counter_fully_reserved = decode(X_PC_Fully_Reserved,
NULL, period_counter_fully_reserved,
FND_API.G_MISS_NUM, NULL,
X_PC_Fully_Reserved),
period_counter_fully_retired = decode(X_Period_Counter_Fully_Retired,
NULL, period_counter_fully_retired,
FND_API.G_MISS_NUM, NULL,
X_Period_Counter_Fully_Retired),
production_capacity = decode(X_Production_Capacity,
NULL, production_capacity,
FND_API.G_MISS_NUM, NULL,
X_Production_Capacity),
reval_amortization_basis = decode(X_Reval_Amortization_Basis,
NULL, reval_amortization_basis,
FND_API.G_MISS_NUM, NULL,
X_Reval_Amortization_Basis),
reval_ceiling = decode(X_Reval_Ceiling,
NULL, reval_ceiling,
FND_API.G_MISS_NUM, NULL,
X_Reval_Ceiling),
unit_of_measure = decode(X_Unit_Of_Measure,
NULL, unit_of_measure,
FND_API.G_MISS_CHAR, NULL,
X_Unit_Of_Measure),
unrevalued_cost = decode(X_Unrevalued_Cost,
NULL, unrevalued_cost,
FND_API.G_MISS_NUM, NULL,
X_Unrevalued_Cost),
annual_deprn_rounding_flag = decode(X_Annual_Deprn_Rounding_Flag,
NULL, annual_deprn_rounding_flag,
FND_API.G_MISS_CHAR, NULL,
X_Annual_Deprn_Rounding_Flag),
percent_salvage_value = decode(X_Percent_Salvage_Value,
NULL, percent_salvage_value,
FND_API.G_MISS_NUM, NULL,
X_Percent_Salvage_Value),
allowed_deprn_limit = decode(X_Allowed_Deprn_Limit,
NULL, allowed_deprn_limit,
FND_API.G_MISS_NUM, NULL,
X_Allowed_Deprn_Limit),
allowed_deprn_limit_amount = decode(X_Allowed_Deprn_Limit_Amount,
NULL, allowed_deprn_limit_amount,
FND_API.G_MISS_NUM, NULL,
X_Allowed_Deprn_Limit_Amount),
period_counter_life_complete = decode(X_Period_Counter_Life_Complete,
NULL, period_counter_life_complete,
FND_API.G_MISS_NUM, NULL,
X_Period_Counter_Life_Complete),
adjusted_recoverable_cost = decode(X_Adjusted_Recoverable_Cost,
NULL, adjusted_recoverable_cost,
FND_API.G_MISS_NUM, NULL,
X_Adjusted_Recoverable_Cost),
group_asset_id = decode(X_group_asset_id,
NULL, group_asset_id,
FND_API.G_MISS_NUM, NULL,
X_group_asset_id),
salvage_type = decode(X_salvage_type,
NULL, salvage_type,
FND_API.G_MISS_CHAR, NULL,
X_salvage_type),
deprn_limit_type = decode(X_deprn_limit_type ,
NULL, deprn_limit_type ,
FND_API.G_MISS_CHAR, NULL,
X_deprn_limit_type ),
over_depreciate_option = decode(X_over_depreciate_option,
NULL, over_depreciate_option,
FND_API.G_MISS_CHAR, NULL,
X_over_depreciate_option),
super_group_id = decode(X_super_group_id,
NULL, super_group_id,
FND_API.G_MISS_NUM, NULL,
X_super_group_id),
reduction_rate = decode(X_reduction_rate,
NULL, reduction_rate,
FND_API.G_MISS_NUM, NULL,
X_reduction_rate),
reduce_addition_flag = decode(X_reduce_addition_flag,
NULL, reduce_addition_flag,
FND_API.G_MISS_CHAR, NULL,
X_reduce_addition_flag),
reduce_adjustment_flag = decode(X_reduce_adjustment_flag,
NULL, reduce_adjustment_flag,
FND_API.G_MISS_CHAR, NULL,
X_reduce_adjustment_flag),
reduce_retirement_flag = decode(X_reduce_retirement_flag,
NULL, reduce_retirement_flag,
FND_API.G_MISS_CHAR, NULL,
X_reduce_retirement_flag),
recognize_gain_loss = decode(X_recognize_gain_loss,
NULL, recognize_gain_loss,
FND_API.G_MISS_CHAR, NULL,
X_recognize_gain_loss),
recapture_reserve_flag = decode(X_recapture_reserve_flag,
NULL, recapture_reserve_flag,
FND_API.G_MISS_CHAR, NULL,
X_recapture_reserve_flag),
limit_proceeds_flag = decode(X_limit_proceeds_flag,
NULL, limit_proceeds_flag,
FND_API.G_MISS_CHAR, NULL,
X_limit_proceeds_flag),
terminal_gain_loss = decode(X_terminal_gain_loss,
NULL, terminal_gain_loss,
FND_API.G_MISS_CHAR, NULL,
X_terminal_gain_loss),
tracking_method = decode(X_tracking_method,
NULL, tracking_method,
FND_API.G_MISS_CHAR, NULL,
X_tracking_method),
allocate_to_fully_rsv_flag = decode(X_allocate_to_fully_rsv_flag,
NULL, allocate_to_fully_rsv_flag,
FND_API.G_MISS_CHAR, NULL,
X_allocate_to_fully_rsv_flag),
allocate_to_fully_ret_flag = decode(X_allocate_to_fully_ret_flag,
NULL, allocate_to_fully_ret_flag,
FND_API.G_MISS_CHAR, NULL,
X_allocate_to_fully_ret_flag),
exclude_fully_rsv_flag = decode(X_exclude_fully_rsv_flag,
NULL, exclude_fully_rsv_flag,
FND_API.G_MISS_CHAR, NULL,
X_exclude_fully_rsv_flag),
excess_allocation_option = decode(X_excess_allocation_option,
NULL, excess_allocation_option,
FND_API.G_MISS_CHAR, NULL,
X_excess_allocation_option),
depreciation_option = decode(X_depreciation_option,
NULL, depreciation_option,
FND_API.G_MISS_CHAR, NULL,
X_depreciation_option),
member_rollup_flag = decode(X_member_rollup_flag,
NULL, member_rollup_flag,
FND_API.G_MISS_CHAR, NULL,
X_member_rollup_flag),
ytd_proceeds = decode(X_ytd_proceeds,
NULL, ytd_proceeds,
FND_API.G_MISS_NUM, NULL,
X_ytd_proceeds),
ltd_proceeds = decode(X_ltd_proceeds,
NULL, ltd_proceeds,
FND_API.G_MISS_NUM, NULL,
X_ltd_proceeds),
eofy_reserve = decode(X_eofy_reserve,
NULL, eofy_reserve,
FND_API.G_MISS_NUM, NULL,
X_eofy_reserve),
cip_cost = decode(X_cip_cost,
NULL, cip_cost,
FND_API.G_MISS_NUM, NULL,
X_cip_cost),
terminal_gain_loss_amount = decode(X_terminal_gain_loss_amount,
NULL, terminal_gain_loss_amount,
FND_API.G_MISS_NUM, NULL,
X_terminal_gain_loss_amount),
ltd_cost_of_removal = decode(X_ltd_cost_of_removal,
NULL, ltd_cost_of_removal,
FND_API.G_MISS_NUM, NULL,
X_ltd_cost_of_removal),
exclude_proceeds_from_basis = decode(X_exclude_proceeds_from_basis,
NULL, exclude_proceeds_from_basis,
FND_API.G_MISS_CHAR, NULL,
X_exclude_proceeds_from_basis),
retirement_deprn_option = decode(X_retirement_deprn_option,
NULL, retirement_deprn_option,
FND_API.G_MISS_CHAR, NULL,
X_retirement_deprn_option),
terminal_gain_loss_flag = decode(X_terminal_gain_loss_flag,
NULL, terminal_gain_loss_flag,
FND_API.G_MISS_CHAR, NULL,
X_terminal_gain_loss_flag),
formula_factor = decode(X_Formula_Factor,
NULL, formula_factor,
FND_API.G_MISS_CHAR, NULL,
X_Formula_Factor)
WHERE rowid = X_Rowid;
UPDATE fa_books_mrc_v
SET
book_type_code = decode(X_Book_Type_Code,
NULL, book_type_code,
FND_API.G_MISS_CHAR, NULL,
X_Book_Type_Code),
asset_id = decode(X_Asset_Id,
NULL, asset_id,
FND_API.G_MISS_NUM, NULL,
X_Asset_Id),
date_placed_in_service = decode(X_Date_Placed_In_Service,
NULL, date_placed_in_service ,
X_Date_Placed_In_Service),
date_effective = decode(X_Date_Effective,
NULL, date_effective,
X_Date_Effective),
deprn_start_date = decode(X_Deprn_Start_Date,
NULL, deprn_start_date,
X_Deprn_Start_Date),
deprn_method_code = decode(X_Deprn_Method_Code,
NULL, deprn_method_code,
FND_API.G_MISS_CHAR, NULL,
X_Deprn_Method_Code),
life_in_months = decode(X_Life_In_Months,
NULL, life_in_months,
FND_API.G_MISS_NUM, NULL,
X_Life_In_Months),
rate_adjustment_factor = decode(X_Rate_Adjustment_Factor,
NULL, rate_adjustment_factor,
FND_API.G_MISS_NUM, NULL,
X_Rate_Adjustment_Factor),
adjusted_cost = decode(X_Adjusted_Cost,
NULL, adjusted_cost,
FND_API.G_MISS_NUM, NULL,
X_Adjusted_Cost),
cost = decode(X_Cost,
NULL, cost,
FND_API.G_MISS_NUM, NULL,
X_Cost),
original_cost = decode(X_Original_Cost,
NULL, original_cost,
FND_API.G_MISS_NUM, NULL,
X_Original_Cost),
salvage_value = decode(X_Salvage_Value,
NULL, salvage_value,
FND_API.G_MISS_NUM, NULL,
X_Salvage_Value),
prorate_convention_code = decode(X_Prorate_Convention_Code,
NULL, prorate_convention_code,
FND_API.G_MISS_CHAR, NULL,
X_Prorate_Convention_Code),
prorate_date = decode(X_Prorate_Date,
NULL, prorate_date,
X_Prorate_Date),
cost_change_flag = decode(X_Cost_Change_Flag,
NULL, cost_change_flag,
FND_API.G_MISS_CHAR, NULL,
X_Cost_Change_Flag),
adjustment_required_status = decode(X_Adjustment_Required_Status,
NULL, adjustment_required_status,
FND_API.G_MISS_CHAR, NULL,
X_Adjustment_Required_Status),
capitalize_flag = decode(X_Capitalize_Flag,
NULL, capitalize_flag,
FND_API.G_MISS_CHAR, NULL,
X_Capitalize_Flag),
retirement_pending_flag = decode(X_Retirement_Pending_Flag,
NULL, retirement_pending_flag,
FND_API.G_MISS_CHAR, NULL,
X_Retirement_Pending_Flag),
depreciate_flag = decode(X_Depreciate_Flag,
NULL, depreciate_flag,
FND_API.G_MISS_CHAR, NULL,
X_Depreciate_Flag),
--HH group ed.
disabled_flag = decode(X_Disabled_Flag,
NULL, disabled_flag,
FND_API.G_MISS_CHAR, NULL,
X_Disabled_Flag),
last_update_date = decode(X_Last_Update_Date,
NULL, last_update_date,
X_Last_Update_Date),
last_updated_by = decode(X_Last_Updated_By,
NULL, last_updated_by,
FND_API.G_MISS_NUM, NULL,
X_Last_Updated_By),
date_ineffective = decode(X_Date_Ineffective,
NULL, date_ineffective,
X_Date_Ineffective),
transaction_header_id_in = decode(X_Transaction_Header_Id_In,
NULL, transaction_header_id_in,
FND_API.G_MISS_NUM, NULL,
X_Transaction_Header_Id_In),
transaction_header_id_out = decode(X_Transaction_Header_Id_Out,
NULL, transaction_header_id_out,
FND_API.G_MISS_NUM, NULL,
X_Transaction_Header_Id_Out),
itc_amount_id = decode(X_Itc_Amount_Id,
NULL, itc_amount_id,
FND_API.G_MISS_NUM, NULL,
X_Itc_Amount_Id),
itc_amount = decode(X_Itc_Amount,
NULL, itc_amount,
FND_API.G_MISS_NUM, NULL,
X_Itc_Amount),
retirement_id = decode(X_Retirement_Id,
NULL, retirement_id,
FND_API.G_MISS_NUM, NULL,
X_Retirement_Id),
tax_request_id = decode(X_Tax_Request_Id,
NULL, tax_request_id,
FND_API.G_MISS_NUM, NULL,
X_Tax_Request_Id),
itc_basis = decode(X_Itc_Basis,
NULL, itc_basis,
FND_API.G_MISS_NUM, NULL,
X_Itc_Basis),
basic_rate = decode(X_Basic_Rate,
NULL, basic_rate,
FND_API.G_MISS_NUM, NULL,
X_Basic_Rate),
adjusted_rate = decode(X_Adjusted_Rate,
NULL, adjusted_rate,
FND_API.G_MISS_NUM, NULL,
X_Adjusted_Rate),
bonus_rule = decode(X_Bonus_Rule,
NULL, bonus_rule,
FND_API.G_MISS_CHAR, NULL,
X_Bonus_Rule),
ceiling_name = decode(X_Ceiling_Name,
NULL, ceiling_name,
FND_API.G_MISS_CHAR, NULL,
X_Ceiling_Name),
recoverable_cost = decode(X_Recoverable_Cost,
NULL, recoverable_cost,
FND_API.G_MISS_NUM, NULL,
X_Recoverable_Cost),
last_update_login = decode(X_Last_Update_Login,
NULL, last_update_login,
FND_API.G_MISS_NUM, NULL,
X_Last_Update_Login),
adjusted_capacity = decode(X_Adjusted_Capacity,
NULL, adjusted_capacity,
FND_API.G_MISS_NUM, NULL,
X_Adjusted_Capacity),
fully_rsvd_revals_counter = decode(X_Fully_Rsvd_Revals_Counter,
NULL, fully_rsvd_revals_counter,
FND_API.G_MISS_NUM, NULL,
X_Fully_Rsvd_Revals_Counter),
idled_flag = decode(X_Idled_Flag,
NULL, idled_flag,
FND_API.G_MISS_CHAR, NULL,
X_Idled_Flag),
period_counter_capitalized = decode(X_Period_Counter_Capitalized,
NULL, period_counter_capitalized,
FND_API.G_MISS_NUM, NULL,
X_Period_Counter_Capitalized),
period_counter_fully_reserved = decode(X_PC_Fully_Reserved,
NULL, period_counter_fully_reserved,
FND_API.G_MISS_NUM, NULL,
X_PC_Fully_Reserved),
period_counter_fully_retired = decode(X_Period_Counter_Fully_Retired,
NULL, period_counter_fully_retired,
FND_API.G_MISS_NUM, NULL,
X_Period_Counter_Fully_Retired),
production_capacity = decode(X_Production_Capacity,
NULL, production_capacity,
FND_API.G_MISS_NUM, NULL,
X_Production_Capacity),
reval_amortization_basis = decode(X_Reval_Amortization_Basis,
NULL, reval_amortization_basis,
FND_API.G_MISS_NUM, NULL,
X_Reval_Amortization_Basis),
reval_ceiling = decode(X_Reval_Ceiling,
NULL, reval_ceiling,
FND_API.G_MISS_NUM, NULL,
X_Reval_Ceiling),
unit_of_measure = decode(X_Unit_Of_Measure,
NULL, unit_of_measure,
FND_API.G_MISS_CHAR, NULL,
X_Unit_Of_Measure),
unrevalued_cost = decode(X_Unrevalued_Cost,
NULL, unrevalued_cost,
FND_API.G_MISS_NUM, NULL,
X_Unrevalued_Cost),
annual_deprn_rounding_flag = decode(X_Annual_Deprn_Rounding_Flag,
NULL, annual_deprn_rounding_flag,
FND_API.G_MISS_CHAR, NULL,
X_Annual_Deprn_Rounding_Flag),
percent_salvage_value = decode(X_Percent_Salvage_Value,
NULL, percent_salvage_value,
FND_API.G_MISS_NUM, NULL,
X_Percent_Salvage_Value),
allowed_deprn_limit = decode(X_Allowed_Deprn_Limit,
NULL, allowed_deprn_limit,
FND_API.G_MISS_NUM, NULL,
X_Allowed_Deprn_Limit),
allowed_deprn_limit_amount = decode(X_Allowed_Deprn_Limit_Amount,
NULL, allowed_deprn_limit_amount,
FND_API.G_MISS_NUM, NULL,
X_Allowed_Deprn_Limit_Amount),
period_counter_life_complete = decode(X_Period_Counter_Life_Complete,
NULL, period_counter_life_complete,
FND_API.G_MISS_NUM, NULL,
X_Period_Counter_Life_Complete),
adjusted_recoverable_cost = decode(X_Adjusted_Recoverable_Cost,
NULL, adjusted_recoverable_cost,
FND_API.G_MISS_NUM, NULL,
X_Adjusted_Recoverable_Cost),
group_asset_id = decode(X_group_asset_id,
NULL, group_asset_id,
FND_API.G_MISS_NUM, NULL,
X_group_asset_id),
salvage_type = decode(X_salvage_type,
NULL, salvage_type,
FND_API.G_MISS_CHAR, NULL,
X_salvage_type),
deprn_limit_type = decode(X_deprn_limit_type ,
NULL, deprn_limit_type ,
FND_API.G_MISS_CHAR, NULL,
X_deprn_limit_type ),
over_depreciate_option = decode(X_over_depreciate_option,
NULL, over_depreciate_option,
FND_API.G_MISS_CHAR, NULL,
X_over_depreciate_option),
super_group_id = decode(X_super_group_id,
NULL, super_group_id,
FND_API.G_MISS_NUM, NULL,
X_super_group_id),
reduction_rate = decode(X_reduction_rate,
NULL, reduction_rate,
FND_API.G_MISS_NUM, NULL,
X_reduction_rate),
reduce_addition_flag = decode(X_reduce_addition_flag,
NULL, reduce_addition_flag,
FND_API.G_MISS_CHAR, NULL,
X_reduce_addition_flag),
reduce_adjustment_flag = decode(X_reduce_adjustment_flag,
NULL, reduce_adjustment_flag,
FND_API.G_MISS_CHAR, NULL,
X_reduce_adjustment_flag),
reduce_retirement_flag = decode(X_reduce_retirement_flag,
NULL, reduce_retirement_flag,
FND_API.G_MISS_CHAR, NULL,
X_reduce_retirement_flag),
recognize_gain_loss = decode(X_recognize_gain_loss,
NULL, recognize_gain_loss,
FND_API.G_MISS_CHAR, NULL,
X_recognize_gain_loss),
recapture_reserve_flag = decode(X_recapture_reserve_flag,
NULL, recapture_reserve_flag,
FND_API.G_MISS_CHAR, NULL,
X_recapture_reserve_flag),
limit_proceeds_flag = decode(X_limit_proceeds_flag,
NULL, limit_proceeds_flag,
FND_API.G_MISS_CHAR, NULL,
X_limit_proceeds_flag),
terminal_gain_loss = decode(X_terminal_gain_loss,
NULL, terminal_gain_loss,
FND_API.G_MISS_CHAR, NULL,
X_terminal_gain_loss),
tracking_method = decode(X_tracking_method,
NULL, tracking_method,
FND_API.G_MISS_CHAR, NULL,
X_tracking_method),
allocate_to_fully_rsv_flag = decode(X_allocate_to_fully_rsv_flag,
NULL, allocate_to_fully_rsv_flag,
FND_API.G_MISS_CHAR, NULL,
X_allocate_to_fully_rsv_flag),
allocate_to_fully_ret_flag = decode(X_allocate_to_fully_ret_flag,
NULL, allocate_to_fully_ret_flag,
FND_API.G_MISS_CHAR, NULL,
X_allocate_to_fully_ret_flag),
exclude_fully_rsv_flag = decode(X_exclude_fully_rsv_flag,
NULL, exclude_fully_rsv_flag,
FND_API.G_MISS_CHAR, NULL,
X_exclude_fully_rsv_flag),
excess_allocation_option = decode(X_excess_allocation_option,
NULL, excess_allocation_option,
FND_API.G_MISS_CHAR, NULL,
X_excess_allocation_option),
depreciation_option = decode(X_depreciation_option,
NULL, depreciation_option,
FND_API.G_MISS_CHAR, NULL,
X_depreciation_option),
member_rollup_flag = decode(X_member_rollup_flag,
NULL, member_rollup_flag,
FND_API.G_MISS_CHAR, NULL,
X_member_rollup_flag),
ytd_proceeds = decode(X_ytd_proceeds,
NULL, ytd_proceeds,
FND_API.G_MISS_NUM, NULL,
X_ytd_proceeds),
ltd_proceeds = decode(X_ltd_proceeds,
NULL, ltd_proceeds,
FND_API.G_MISS_NUM, NULL,
X_ltd_proceeds),
eofy_reserve = decode(X_eofy_reserve,
NULL, eofy_reserve,
FND_API.G_MISS_NUM, NULL,
X_eofy_reserve),
cip_cost = decode(X_cip_cost,
NULL, cip_cost,
FND_API.G_MISS_NUM, NULL,
X_cip_cost),
terminal_gain_loss_amount = decode(X_terminal_gain_loss_amount,
NULL, terminal_gain_loss_amount,
FND_API.G_MISS_NUM, NULL,
X_terminal_gain_loss_amount),
ltd_cost_of_removal = decode(X_ltd_cost_of_removal,
NULL, ltd_cost_of_removal,
FND_API.G_MISS_NUM, NULL,
X_ltd_cost_of_removal),
exclude_proceeds_from_basis = decode(X_exclude_proceeds_from_basis,
NULL, exclude_proceeds_from_basis,
FND_API.G_MISS_CHAR, NULL,
X_exclude_proceeds_from_basis),
retirement_deprn_option = decode(X_retirement_deprn_option,
NULL, retirement_deprn_option,
FND_API.G_MISS_CHAR, NULL,
X_retirement_deprn_option),
terminal_gain_loss_flag = decode(X_terminal_gain_loss_flag,
NULL, terminal_gain_loss_flag,
FND_API.G_MISS_CHAR, NULL,
X_terminal_gain_loss_flag),
formula_factor = decode(X_Formula_Factor,
NULL, formula_factor,
FND_API.G_MISS_CHAR, NULL,
X_Formula_Factor)
WHERE asset_id = X_Asset_Id
AND book_type_code = X_Book_Type_Code
AND transaction_header_id_out is null;
UPDATE fa_books
SET
book_type_code = decode(X_Book_Type_Code,
NULL, book_type_code,
FND_API.G_MISS_CHAR, NULL,
X_Book_Type_Code),
asset_id = decode(X_Asset_Id,
NULL, asset_id,
FND_API.G_MISS_NUM, NULL,
X_Asset_Id),
date_placed_in_service = decode(X_Date_Placed_In_Service,
NULL, date_placed_in_service ,
X_Date_Placed_In_Service),
date_effective = decode(X_Date_Effective,
NULL, date_effective,
X_Date_Effective),
deprn_start_date = decode(X_Deprn_Start_Date,
NULL, deprn_start_date,
X_Deprn_Start_Date),
deprn_method_code = decode(X_Deprn_Method_Code,
NULL, deprn_method_code,
FND_API.G_MISS_CHAR, NULL,
X_Deprn_Method_Code),
life_in_months = decode(X_Life_In_Months,
NULL, life_in_months,
FND_API.G_MISS_NUM, NULL,
X_Life_In_Months),
rate_adjustment_factor = decode(X_Rate_Adjustment_Factor,
NULL, rate_adjustment_factor,
FND_API.G_MISS_NUM, NULL,
X_Rate_Adjustment_Factor),
adjusted_cost = decode(X_Adjusted_Cost,
NULL, adjusted_cost,
FND_API.G_MISS_NUM, NULL,
X_Adjusted_Cost),
cost = decode(X_Cost,
NULL, cost,
FND_API.G_MISS_NUM, NULL,
X_Cost),
original_cost = decode(X_Original_Cost,
NULL, original_cost,
FND_API.G_MISS_NUM, NULL,
X_Original_Cost),
salvage_value = decode(X_Salvage_Value,
NULL, salvage_value,
FND_API.G_MISS_NUM, NULL,
X_Salvage_Value),
prorate_convention_code = decode(X_Prorate_Convention_Code,
NULL, prorate_convention_code,
FND_API.G_MISS_CHAR, NULL,
X_Prorate_Convention_Code),
prorate_date = decode(X_Prorate_Date,
NULL, prorate_date,
X_Prorate_Date),
cost_change_flag = decode(X_Cost_Change_Flag,
NULL, cost_change_flag,
FND_API.G_MISS_CHAR, NULL,
X_Cost_Change_Flag),
adjustment_required_status = decode(X_Adjustment_Required_Status,
NULL, adjustment_required_status,
FND_API.G_MISS_CHAR, NULL,
X_Adjustment_Required_Status),
capitalize_flag = decode(X_Capitalize_Flag,
NULL, capitalize_flag,
FND_API.G_MISS_CHAR, NULL,
X_Capitalize_Flag),
retirement_pending_flag = decode(X_Retirement_Pending_Flag,
NULL, retirement_pending_flag,
FND_API.G_MISS_CHAR, NULL,
X_Retirement_Pending_Flag),
depreciate_flag = decode(X_Depreciate_Flag,
NULL, depreciate_flag,
FND_API.G_MISS_CHAR, NULL,
X_Depreciate_Flag),
--HH group ed.
disabled_flag = decode(X_Disabled_Flag,
NULL, disabled_flag,
FND_API.G_MISS_CHAR, NULL,
X_Disabled_Flag),
last_update_date = decode(X_Last_Update_Date,
NULL, last_update_date,
X_Last_Update_Date),
last_updated_by = decode(X_Last_Updated_By,
NULL, last_updated_by,
FND_API.G_MISS_NUM, NULL,
X_Last_Updated_By),
date_ineffective = decode(X_Date_Ineffective,
NULL, date_ineffective,
X_Date_Ineffective),
transaction_header_id_in = decode(X_Transaction_Header_Id_In,
NULL, transaction_header_id_in,
FND_API.G_MISS_NUM, NULL,
X_Transaction_Header_Id_In),
transaction_header_id_out = decode(X_Transaction_Header_Id_Out,
NULL, transaction_header_id_out,
FND_API.G_MISS_NUM, NULL,
X_Transaction_Header_Id_Out),
itc_amount_id = decode(X_Itc_Amount_Id,
NULL, itc_amount_id,
FND_API.G_MISS_NUM, NULL,
X_Itc_Amount_Id),
itc_amount = decode(X_Itc_Amount,
NULL, itc_amount,
FND_API.G_MISS_NUM, NULL,
X_Itc_Amount),
retirement_id = decode(X_Retirement_Id,
NULL, retirement_id,
FND_API.G_MISS_NUM, NULL,
X_Retirement_Id),
tax_request_id = decode(X_Tax_Request_Id,
NULL, tax_request_id,
FND_API.G_MISS_NUM, NULL,
X_Tax_Request_Id),
itc_basis = decode(X_Itc_Basis,
NULL, itc_basis,
FND_API.G_MISS_NUM, NULL,
X_Itc_Basis),
basic_rate = decode(X_Basic_Rate,
NULL, basic_rate,
FND_API.G_MISS_NUM, NULL,
X_Basic_Rate),
adjusted_rate = decode(X_Adjusted_Rate,
NULL, adjusted_rate,
FND_API.G_MISS_NUM, NULL,
X_Adjusted_Rate),
bonus_rule = decode(X_Bonus_Rule,
NULL, bonus_rule,
FND_API.G_MISS_CHAR, NULL,
X_Bonus_Rule),
ceiling_name = decode(X_Ceiling_Name,
NULL, ceiling_name,
FND_API.G_MISS_CHAR, NULL,
X_Ceiling_Name),
recoverable_cost = decode(X_Recoverable_Cost,
NULL, recoverable_cost,
FND_API.G_MISS_NUM, NULL,
X_Recoverable_Cost),
last_update_login = decode(X_Last_Update_Login,
NULL, last_update_login,
FND_API.G_MISS_NUM, NULL,
X_Last_Update_Login),
adjusted_capacity = decode(X_Adjusted_Capacity,
NULL, adjusted_capacity,
FND_API.G_MISS_NUM, NULL,
X_Adjusted_Capacity),
fully_rsvd_revals_counter = decode(X_Fully_Rsvd_Revals_Counter,
NULL, fully_rsvd_revals_counter,
FND_API.G_MISS_NUM, NULL,
X_Fully_Rsvd_Revals_Counter),
idled_flag = decode(X_Idled_Flag,
NULL, idled_flag,
FND_API.G_MISS_CHAR, NULL,
X_Idled_Flag),
period_counter_capitalized = decode(X_Period_Counter_Capitalized,
NULL, period_counter_capitalized,
FND_API.G_MISS_NUM, NULL,
X_Period_Counter_Capitalized),
period_counter_fully_reserved = decode(X_PC_Fully_Reserved,
NULL, period_counter_fully_reserved,
FND_API.G_MISS_NUM, NULL,
X_PC_Fully_Reserved),
period_counter_fully_retired = decode(X_Period_Counter_Fully_Retired,
NULL, period_counter_fully_retired,
FND_API.G_MISS_NUM, NULL,
X_Period_Counter_Fully_Retired),
production_capacity = decode(X_Production_Capacity,
NULL, production_capacity,
FND_API.G_MISS_NUM, NULL,
X_Production_Capacity),
reval_amortization_basis = decode(X_Reval_Amortization_Basis,
NULL, reval_amortization_basis,
FND_API.G_MISS_NUM, NULL,
X_Reval_Amortization_Basis),
reval_ceiling = decode(X_Reval_Ceiling,
NULL, reval_ceiling,
FND_API.G_MISS_NUM, NULL,
X_Reval_Ceiling),
unit_of_measure = decode(X_Unit_Of_Measure,
NULL, unit_of_measure,
FND_API.G_MISS_CHAR, NULL,
X_Unit_Of_Measure),
unrevalued_cost = decode(X_Unrevalued_Cost,
NULL, unrevalued_cost,
FND_API.G_MISS_NUM, NULL,
X_Unrevalued_Cost),
annual_deprn_rounding_flag = decode(X_Annual_Deprn_Rounding_Flag,
NULL, annual_deprn_rounding_flag,
FND_API.G_MISS_CHAR, NULL,
X_Annual_Deprn_Rounding_Flag),
percent_salvage_value = decode(X_Percent_Salvage_Value,
NULL, percent_salvage_value,
FND_API.G_MISS_NUM, NULL,
X_Percent_Salvage_Value),
allowed_deprn_limit = decode(X_Allowed_Deprn_Limit,
NULL, allowed_deprn_limit,
FND_API.G_MISS_NUM, NULL,
X_Allowed_Deprn_Limit),
allowed_deprn_limit_amount = decode(X_Allowed_Deprn_Limit_Amount,
NULL, allowed_deprn_limit_amount,
FND_API.G_MISS_NUM, NULL,
X_Allowed_Deprn_Limit_Amount),
period_counter_life_complete = decode(X_Period_Counter_Life_Complete,
NULL, period_counter_life_complete,
FND_API.G_MISS_NUM, NULL,
X_Period_Counter_Life_Complete),
adjusted_recoverable_cost = decode(X_Adjusted_Recoverable_Cost,
NULL, adjusted_recoverable_cost,
FND_API.G_MISS_NUM, NULL,
X_Adjusted_Recoverable_Cost),
group_asset_id = decode(X_group_asset_id,
NULL, group_asset_id,
FND_API.G_MISS_NUM, NULL,
X_group_asset_id),
salvage_type = decode(X_salvage_type,
NULL, salvage_type,
FND_API.G_MISS_CHAR, NULL,
X_salvage_type),
deprn_limit_type = decode(X_deprn_limit_type ,
NULL, deprn_limit_type ,
FND_API.G_MISS_CHAR, NULL,
X_deprn_limit_type ),
over_depreciate_option = decode(X_over_depreciate_option,
NULL, over_depreciate_option,
FND_API.G_MISS_CHAR, NULL,
X_over_depreciate_option),
super_group_id = decode(X_super_group_id,
NULL, super_group_id,
FND_API.G_MISS_NUM, NULL,
X_super_group_id),
reduction_rate = decode(X_reduction_rate,
NULL, reduction_rate,
FND_API.G_MISS_NUM, NULL,
X_reduction_rate),
reduce_addition_flag = decode(X_reduce_addition_flag,
NULL, reduce_addition_flag,
FND_API.G_MISS_CHAR, NULL,
X_reduce_addition_flag),
reduce_adjustment_flag = decode(X_reduce_adjustment_flag,
NULL, reduce_adjustment_flag,
FND_API.G_MISS_CHAR, NULL,
X_reduce_adjustment_flag),
reduce_retirement_flag = decode(X_reduce_retirement_flag,
NULL, reduce_retirement_flag,
FND_API.G_MISS_CHAR, NULL,
X_reduce_retirement_flag),
recognize_gain_loss = decode(X_recognize_gain_loss,
NULL, recognize_gain_loss,
FND_API.G_MISS_CHAR, NULL,
X_recognize_gain_loss),
recapture_reserve_flag = decode(X_recapture_reserve_flag,
NULL, recapture_reserve_flag,
FND_API.G_MISS_CHAR, NULL,
X_recapture_reserve_flag),
limit_proceeds_flag = decode(X_limit_proceeds_flag,
NULL, limit_proceeds_flag,
FND_API.G_MISS_CHAR, NULL,
X_limit_proceeds_flag),
terminal_gain_loss = decode(X_terminal_gain_loss,
NULL, terminal_gain_loss,
FND_API.G_MISS_CHAR, NULL,
X_terminal_gain_loss),
tracking_method = decode(X_tracking_method,
NULL, tracking_method,
FND_API.G_MISS_CHAR, NULL,
X_tracking_method),
allocate_to_fully_rsv_flag = decode(X_allocate_to_fully_rsv_flag,
NULL, allocate_to_fully_rsv_flag,
FND_API.G_MISS_CHAR, NULL,
X_allocate_to_fully_rsv_flag),
allocate_to_fully_ret_flag = decode(X_allocate_to_fully_ret_flag,
NULL, allocate_to_fully_ret_flag,
FND_API.G_MISS_CHAR, NULL,
X_allocate_to_fully_ret_flag),
exclude_fully_rsv_flag = decode(X_exclude_fully_rsv_flag,
NULL, exclude_fully_rsv_flag,
FND_API.G_MISS_CHAR, NULL,
X_exclude_fully_rsv_flag),
excess_allocation_option = decode(X_excess_allocation_option,
NULL, excess_allocation_option,
FND_API.G_MISS_CHAR, NULL,
X_excess_allocation_option),
depreciation_option = decode(X_depreciation_option,
NULL, depreciation_option,
FND_API.G_MISS_CHAR, NULL,
X_depreciation_option),
member_rollup_flag = decode(X_member_rollup_flag,
NULL, member_rollup_flag,
FND_API.G_MISS_CHAR, NULL,
X_member_rollup_flag),
ytd_proceeds = decode(X_ytd_proceeds,
NULL, ytd_proceeds,
FND_API.G_MISS_NUM, NULL,
X_ytd_proceeds),
ltd_proceeds = decode(X_ltd_proceeds,
NULL, ltd_proceeds,
FND_API.G_MISS_NUM, NULL,
X_ltd_proceeds),
eofy_reserve = decode(X_eofy_reserve,
NULL, eofy_reserve,
FND_API.G_MISS_NUM, NULL,
X_eofy_reserve),
cip_cost = decode(X_cip_cost,
NULL, cip_cost,
FND_API.G_MISS_NUM, NULL,
X_cip_cost),
terminal_gain_loss_amount = decode(X_terminal_gain_loss_amount,
NULL, terminal_gain_loss_amount,
FND_API.G_MISS_NUM, NULL,
X_terminal_gain_loss_amount),
ltd_cost_of_removal = decode(X_ltd_cost_of_removal,
NULL, ltd_cost_of_removal,
FND_API.G_MISS_NUM, NULL,
X_ltd_cost_of_removal),
exclude_proceeds_from_basis = decode(X_exclude_proceeds_from_basis,
NULL, exclude_proceeds_from_basis,
FND_API.G_MISS_CHAR, NULL,
X_exclude_proceeds_from_basis),
retirement_deprn_option = decode(X_retirement_deprn_option,
NULL, retirement_deprn_option,
FND_API.G_MISS_CHAR, NULL,
X_retirement_deprn_option),
terminal_gain_loss_flag = decode(X_terminal_gain_loss_flag,
NULL, terminal_gain_loss_flag,
FND_API.G_MISS_CHAR, NULL,
X_terminal_gain_loss_flag)
WHERE rowid = X_Rowid;
UPDATE fa_books
SET
book_type_code = decode(X_Book_Type_Code,
NULL, book_type_code,
FND_API.G_MISS_CHAR, NULL,
X_Book_Type_Code),
asset_id = decode(X_Asset_Id,
NULL, asset_id,
FND_API.G_MISS_NUM, NULL,
X_Asset_Id),
date_placed_in_service = decode(X_Date_Placed_In_Service,
NULL, date_placed_in_service ,
X_Date_Placed_In_Service),
date_effective = decode(X_Date_Effective,
NULL, date_effective,
X_Date_Effective),
deprn_start_date = decode(X_Deprn_Start_Date,
NULL, deprn_start_date,
X_Deprn_Start_Date),
deprn_method_code = decode(X_Deprn_Method_Code,
NULL, deprn_method_code,
FND_API.G_MISS_CHAR, NULL,
X_Deprn_Method_Code),
life_in_months = decode(X_Life_In_Months,
NULL, life_in_months,
FND_API.G_MISS_NUM, NULL,
X_Life_In_Months),
rate_adjustment_factor = decode(X_Rate_Adjustment_Factor,
NULL, rate_adjustment_factor,
FND_API.G_MISS_NUM, NULL,
X_Rate_Adjustment_Factor),
adjusted_cost = decode(X_Adjusted_Cost,
NULL, adjusted_cost,
FND_API.G_MISS_NUM, NULL,
X_Adjusted_Cost),
cost = decode(X_Cost,
NULL, cost,
FND_API.G_MISS_NUM, NULL,
X_Cost),
original_cost = decode(X_Original_Cost,
NULL, original_cost,
FND_API.G_MISS_NUM, NULL,
X_Original_Cost),
salvage_value = decode(X_Salvage_Value,
NULL, salvage_value,
FND_API.G_MISS_NUM, NULL,
X_Salvage_Value),
prorate_convention_code = decode(X_Prorate_Convention_Code,
NULL, prorate_convention_code,
FND_API.G_MISS_CHAR, NULL,
X_Prorate_Convention_Code),
prorate_date = decode(X_Prorate_Date,
NULL, prorate_date,
X_Prorate_Date),
cost_change_flag = decode(X_Cost_Change_Flag,
NULL, cost_change_flag,
FND_API.G_MISS_CHAR, NULL,
X_Cost_Change_Flag),
adjustment_required_status = decode(X_Adjustment_Required_Status,
NULL, adjustment_required_status,
FND_API.G_MISS_CHAR, NULL,
X_Adjustment_Required_Status),
capitalize_flag = decode(X_Capitalize_Flag,
NULL, capitalize_flag,
FND_API.G_MISS_CHAR, NULL,
X_Capitalize_Flag),
retirement_pending_flag = decode(X_Retirement_Pending_Flag,
NULL, retirement_pending_flag,
FND_API.G_MISS_CHAR, NULL,
X_Retirement_Pending_Flag),
depreciate_flag = decode(X_Depreciate_Flag,
NULL, depreciate_flag,
FND_API.G_MISS_CHAR, NULL,
X_Depreciate_Flag),
--HH group ed.
disabled_flag = decode(X_Disabled_Flag,
NULL, disabled_flag,
FND_API.G_MISS_CHAR, NULL,
X_Disabled_Flag),
last_update_date = decode(X_Last_Update_Date,
NULL, last_update_date,
X_Last_Update_Date),
last_updated_by = decode(X_Last_Updated_By,
NULL, last_updated_by,
FND_API.G_MISS_NUM, NULL,
X_Last_Updated_By),
date_ineffective = decode(X_Date_Ineffective,
NULL, date_ineffective,
X_Date_Ineffective),
transaction_header_id_in = decode(X_Transaction_Header_Id_In,
NULL, transaction_header_id_in,
FND_API.G_MISS_NUM, NULL,
X_Transaction_Header_Id_In),
transaction_header_id_out = decode(X_Transaction_Header_Id_Out,
NULL, transaction_header_id_out,
FND_API.G_MISS_NUM, NULL,
X_Transaction_Header_Id_Out),
itc_amount_id = decode(X_Itc_Amount_Id,
NULL, itc_amount_id,
FND_API.G_MISS_NUM, NULL,
X_Itc_Amount_Id),
itc_amount = decode(X_Itc_Amount,
NULL, itc_amount,
FND_API.G_MISS_NUM, NULL,
X_Itc_Amount),
retirement_id = decode(X_Retirement_Id,
NULL, retirement_id,
FND_API.G_MISS_NUM, NULL,
X_Retirement_Id),
tax_request_id = decode(X_Tax_Request_Id,
NULL, tax_request_id,
FND_API.G_MISS_NUM, NULL,
X_Tax_Request_Id),
itc_basis = decode(X_Itc_Basis,
NULL, itc_basis,
FND_API.G_MISS_NUM, NULL,
X_Itc_Basis),
basic_rate = decode(X_Basic_Rate,
NULL, basic_rate,
FND_API.G_MISS_NUM, NULL,
X_Basic_Rate),
adjusted_rate = decode(X_Adjusted_Rate,
NULL, adjusted_rate,
FND_API.G_MISS_NUM, NULL,
X_Adjusted_Rate),
bonus_rule = decode(X_Bonus_Rule,
NULL, bonus_rule,
FND_API.G_MISS_CHAR, NULL,
X_Bonus_Rule),
ceiling_name = decode(X_Ceiling_Name,
NULL, ceiling_name,
FND_API.G_MISS_CHAR, NULL,
X_Ceiling_Name),
recoverable_cost = decode(X_Recoverable_Cost,
NULL, recoverable_cost,
FND_API.G_MISS_NUM, NULL,
X_Recoverable_Cost),
last_update_login = decode(X_Last_Update_Login,
NULL, last_update_login,
FND_API.G_MISS_NUM, NULL,
X_Last_Update_Login),
adjusted_capacity = decode(X_Adjusted_Capacity,
NULL, adjusted_capacity,
FND_API.G_MISS_NUM, NULL,
X_Adjusted_Capacity),
fully_rsvd_revals_counter = decode(X_Fully_Rsvd_Revals_Counter,
NULL, fully_rsvd_revals_counter,
FND_API.G_MISS_NUM, NULL,
X_Fully_Rsvd_Revals_Counter),
idled_flag = decode(X_Idled_Flag,
NULL, idled_flag,
FND_API.G_MISS_CHAR, NULL,
X_Idled_Flag),
period_counter_capitalized = decode(X_Period_Counter_Capitalized,
NULL, period_counter_capitalized,
FND_API.G_MISS_NUM, NULL,
X_Period_Counter_Capitalized),
period_counter_fully_reserved = decode(X_PC_Fully_Reserved,
NULL, period_counter_fully_reserved,
FND_API.G_MISS_NUM, NULL,
X_PC_Fully_Reserved),
period_counter_fully_retired = decode(X_Period_Counter_Fully_Retired,
NULL, period_counter_fully_retired,
FND_API.G_MISS_NUM, NULL,
X_Period_Counter_Fully_Retired),
production_capacity = decode(X_Production_Capacity,
NULL, production_capacity,
FND_API.G_MISS_NUM, NULL,
X_Production_Capacity),
reval_amortization_basis = decode(X_Reval_Amortization_Basis,
NULL, reval_amortization_basis,
FND_API.G_MISS_NUM, NULL,
X_Reval_Amortization_Basis),
reval_ceiling = decode(X_Reval_Ceiling,
NULL, reval_ceiling,
FND_API.G_MISS_NUM, NULL,
X_Reval_Ceiling),
unit_of_measure = decode(X_Unit_Of_Measure,
NULL, unit_of_measure,
FND_API.G_MISS_CHAR, NULL,
X_Unit_Of_Measure),
unrevalued_cost = decode(X_Unrevalued_Cost,
NULL, unrevalued_cost,
FND_API.G_MISS_NUM, NULL,
X_Unrevalued_Cost),
annual_deprn_rounding_flag = decode(X_Annual_Deprn_Rounding_Flag,
NULL, annual_deprn_rounding_flag,
FND_API.G_MISS_CHAR, NULL,
X_Annual_Deprn_Rounding_Flag),
percent_salvage_value = decode(X_Percent_Salvage_Value,
NULL, percent_salvage_value,
FND_API.G_MISS_NUM, NULL,
X_Percent_Salvage_Value),
allowed_deprn_limit = decode(X_Allowed_Deprn_Limit,
NULL, allowed_deprn_limit,
FND_API.G_MISS_NUM, NULL,
X_Allowed_Deprn_Limit),
allowed_deprn_limit_amount = decode(X_Allowed_Deprn_Limit_Amount,
NULL, allowed_deprn_limit_amount,
FND_API.G_MISS_NUM, NULL,
X_Allowed_Deprn_Limit_Amount),
period_counter_life_complete = decode(X_Period_Counter_Life_Complete,
NULL, period_counter_life_complete,
FND_API.G_MISS_NUM, NULL,
X_Period_Counter_Life_Complete),
adjusted_recoverable_cost = decode(X_Adjusted_Recoverable_Cost,
NULL, adjusted_recoverable_cost,
FND_API.G_MISS_NUM, NULL,
X_Adjusted_Recoverable_Cost),
group_asset_id = decode(X_group_asset_id,
NULL, group_asset_id,
FND_API.G_MISS_NUM, NULL,
X_group_asset_id),
salvage_type = decode(X_salvage_type,
NULL, salvage_type,
FND_API.G_MISS_CHAR, NULL,
X_salvage_type),
deprn_limit_type = decode(X_deprn_limit_type ,
NULL, deprn_limit_type ,
FND_API.G_MISS_CHAR, NULL,
X_deprn_limit_type ),
over_depreciate_option = decode(X_over_depreciate_option,
NULL, over_depreciate_option,
FND_API.G_MISS_CHAR, NULL,
X_over_depreciate_option),
super_group_id = decode(X_super_group_id,
NULL, super_group_id,
FND_API.G_MISS_NUM, NULL,
X_super_group_id),
reduction_rate = decode(X_reduction_rate,
NULL, reduction_rate,
FND_API.G_MISS_NUM, NULL,
X_reduction_rate),
reduce_addition_flag = decode(X_reduce_addition_flag,
NULL, reduce_addition_flag,
FND_API.G_MISS_CHAR, NULL,
X_reduce_addition_flag),
reduce_adjustment_flag = decode(X_reduce_adjustment_flag,
NULL, reduce_adjustment_flag,
FND_API.G_MISS_CHAR, NULL,
X_reduce_adjustment_flag),
reduce_retirement_flag = decode(X_reduce_retirement_flag,
NULL, reduce_retirement_flag,
FND_API.G_MISS_CHAR, NULL,
X_reduce_retirement_flag),
recognize_gain_loss = decode(X_recognize_gain_loss,
NULL, recognize_gain_loss,
FND_API.G_MISS_CHAR, NULL,
X_recognize_gain_loss),
recapture_reserve_flag = decode(X_recapture_reserve_flag,
NULL, recapture_reserve_flag,
FND_API.G_MISS_CHAR, NULL,
X_recapture_reserve_flag),
limit_proceeds_flag = decode(X_limit_proceeds_flag,
NULL, limit_proceeds_flag,
FND_API.G_MISS_CHAR, NULL,
X_limit_proceeds_flag),
terminal_gain_loss = decode(X_terminal_gain_loss,
NULL, terminal_gain_loss,
FND_API.G_MISS_CHAR, NULL,
X_terminal_gain_loss),
tracking_method = decode(X_tracking_method,
NULL, tracking_method,
FND_API.G_MISS_CHAR, NULL,
X_tracking_method),
allocate_to_fully_rsv_flag = decode(X_allocate_to_fully_rsv_flag,
NULL, allocate_to_fully_rsv_flag,
FND_API.G_MISS_CHAR, NULL,
X_allocate_to_fully_rsv_flag),
allocate_to_fully_ret_flag = decode(X_allocate_to_fully_ret_flag,
NULL, allocate_to_fully_ret_flag,
FND_API.G_MISS_CHAR, NULL,
X_allocate_to_fully_ret_flag),
exclude_fully_rsv_flag = decode(X_exclude_fully_rsv_flag,
NULL, exclude_fully_rsv_flag,
FND_API.G_MISS_CHAR, NULL,
X_exclude_fully_rsv_flag),
excess_allocation_option = decode(X_excess_allocation_option,
NULL, excess_allocation_option,
FND_API.G_MISS_CHAR, NULL,
X_excess_allocation_option),
depreciation_option = decode(X_depreciation_option,
NULL, depreciation_option,
FND_API.G_MISS_CHAR, NULL,
X_depreciation_option),
member_rollup_flag = decode(X_member_rollup_flag,
NULL, member_rollup_flag,
FND_API.G_MISS_CHAR, NULL,
X_member_rollup_flag),
ytd_proceeds = decode(X_ytd_proceeds,
NULL, ytd_proceeds,
FND_API.G_MISS_NUM, NULL,
X_ytd_proceeds),
ltd_proceeds = decode(X_ltd_proceeds,
NULL, ltd_proceeds,
FND_API.G_MISS_NUM, NULL,
X_ltd_proceeds),
eofy_reserve = decode(X_eofy_reserve,
NULL, eofy_reserve,
FND_API.G_MISS_NUM, NULL,
X_eofy_reserve),
cip_cost = decode(X_cip_cost,
NULL, cip_cost,
FND_API.G_MISS_NUM, NULL,
X_cip_cost),
terminal_gain_loss_amount = decode(X_terminal_gain_loss_amount,
NULL, terminal_gain_loss_amount,
FND_API.G_MISS_NUM, NULL,
X_terminal_gain_loss_amount),
ltd_cost_of_removal = decode(X_ltd_cost_of_removal,
NULL, ltd_cost_of_removal,
FND_API.G_MISS_NUM, NULL,
X_ltd_cost_of_removal),
exclude_proceeds_from_basis = decode(X_exclude_proceeds_from_basis,
NULL, exclude_proceeds_from_basis,
FND_API.G_MISS_CHAR, NULL,
X_exclude_proceeds_from_basis),
retirement_deprn_option = decode(X_retirement_deprn_option,
NULL, retirement_deprn_option,
FND_API.G_MISS_CHAR, NULL,
X_retirement_deprn_option),
terminal_gain_loss_flag = decode(X_terminal_gain_loss_flag,
NULL, terminal_gain_loss_flag,
FND_API.G_MISS_CHAR, NULL,
X_terminal_gain_loss_flag)
WHERE asset_id = X_Asset_Id
AND book_type_code = X_Book_Type_Code
AND transaction_header_id_out is null;
calling_fn => 'fa_books_pkg.update_row'
,p_log_level_rec => p_log_level_rec);
END Update_Row;
PROCEDURE Delete_Row(X_Rowid VARCHAR2 DEFAULT NULL,
X_Transaction_Header_Id_In NUMBER DEFAULT NULL,
X_Asset_Id NUMBER 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 default null) IS
BEGIN
if (X_mrc_sob_type_code = 'R') then
if X_Rowid is not null then
DELETE FROM fa_books_mrc_v
WHERE rowid = X_Rowid;
DELETE FROM fa_books_mrc_v
WHERE transaction_header_id_in = X_Transaction_Header_Id_In;
DELETE FROM fa_books_mrc_v
WHERE asset_id = X_Asset_Id;
DELETE FROM fa_books
WHERE rowid = X_Rowid;
DELETE FROM fa_books
WHERE transaction_header_id_in = X_Transaction_Header_Id_In;
DELETE FROM fa_books
WHERE asset_id = X_Asset_Id;
CALLED_FN => 'fa_books_pkg.delete_row',
CALLING_FN => X_Calling_Fn
,p_log_level_rec => p_log_level_rec);
END Delete_Row;
UPDATE fa_books_mrc_v
SET period_counter_fully_retired = null,
date_ineffective = null,
transaction_header_id_out = null,
retirement_id = null
WHERE transaction_header_id_out = X_Transaction_Header_Id_Out;
UPDATE fa_books
SET period_counter_fully_retired = null,
date_ineffective = null,
transaction_header_id_out = null,
retirement_id = null
WHERE transaction_header_id_out = X_Transaction_Header_Id_Out;
UPDATE fa_books_mrc_v
SET date_ineffective = X_date_ineffective,
last_update_date = X_date_ineffective,
transaction_header_id_out = X_transaction_header_id_out
WHERE asset_id = X_Asset_Id
AND book_type_code = X_book_type_code
AND transaction_header_id_out is null;
UPDATE fa_books
SET date_ineffective = X_date_ineffective,
last_update_date = X_date_ineffective,
transaction_header_id_out = X_transaction_header_id_out
WHERE asset_id = X_Asset_Id
AND book_type_code = X_book_type_code
AND transaction_header_id_out is null;