FUNCTION get_ltd_deprn(p_asset_id IN NUMBER,
p_book_type_code IN VARCHAR2,
p_rate_source_rule IN VARCHAR2 DEFAULT NULL,
p_dist_id IN NUMBER DEFAULT 0,
p_period_ctr IN NUMBER DEFAULT 0,
p_mrc_sob_type_code IN VARCHAR2 DEFAULT 'N',
p_set_of_books_id IN NUMBER) RETURN NUMBER IS
dummy_num NUMBER;
dummy_bool BOOLEAN;
dummy_char VARCHAR2(2000);
l_log_level_rec fa_api_types.log_level_rec_type;
l_ltd_production NUMBER;
l_ytd_production NUMBER;
l_ltd_deprn NUMBER;
l_ytd_deprn NUMBER;
BEGIN
fa_query_balances_pkg.query_balances(x_asset_id => p_asset_id,
x_book => p_book_type_code,
x_period_ctr => nvl(p_period_ctr,
0),
x_dist_id => nvl(p_dist_id,
0),
x_run_mode => 'STANDARD',
x_cost => dummy_num,
x_deprn_rsv => l_ltd_deprn,
x_reval_rsv => dummy_num,
x_ytd_deprn => l_ytd_deprn,
x_ytd_reval_exp => dummy_num,
x_reval_deprn_exp => dummy_num,
x_deprn_exp => dummy_num,
x_reval_amo => dummy_num,
x_prod => dummy_num,
x_ytd_prod => dummy_num,
x_ltd_prod => dummy_num,
x_adj_cost => dummy_num,
x_reval_amo_basis => dummy_num,
x_bonus_rate => dummy_num,
x_deprn_source_code => dummy_char,
x_adjusted_flag => dummy_bool,
x_transaction_header_id => -1,
x_bonus_deprn_rsv => dummy_num,
x_bonus_ytd_deprn => dummy_num,
x_bonus_deprn_amount => dummy_num,
x_impairment_rsv => dummy_num,
x_ytd_impairment => dummy_num,
x_impairment_amount => dummy_num,
x_capital_adjustment => dummy_num,
x_general_fund => dummy_num,
x_mrc_sob_type_code => p_mrc_sob_type_code,
x_set_of_books_id => p_set_of_books_id,
p_log_level_rec => l_log_level_rec);
RETURN l_ltd_deprn;
EXCEPTION
WHEN OTHERS THEN
RETURN NULL;
END get_ltd_deprn;