337: and book_type_code = v_book_type_code
338: and date_ineffective is null;
339:
340: select count(*) into h_dist_count2
341: from fa_hierarchy_distributions
342: where dist_set_id = x_dist_set_id;
343:
344: if h_dist_count <> 0 then
345:
344: if h_dist_count <> 0 then
345:
346: select count(*)
347: into h_dist_count3
348: from fa_distribution_history fdh ,fa_hierarchy_distributions ihd,fa_additions fa
349: where fa.asset_id = x_Asset_id
350: and fdh.asset_id = x_Asset_id
351: and fdh.date_ineffective is null
352: and fdh.book_type_code = v_book_type_code