685: x_return_status OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
686: x_msg_count OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
687: x_msg_data OUT NOCOPY VARCHAR2) --File.Sql.39 bug 4440895
688: is
689: l_amount_set_id pa_fin_plan_amount_sets.fin_plan_amount_set_id%TYPE;
690: l_budget_version_type VARCHAR2(30); -- used for determining how to rank the amount types
691: l_raw_cost_flag pa_fin_plan_amount_sets.raw_cost_flag%TYPE;
692: l_burdened_cost_flag pa_fin_plan_amount_sets.burdened_cost_flag%TYPE;
693: l_cost_qty_flag pa_fin_plan_amount_sets.cost_qty_flag%TYPE;
687: x_msg_data OUT NOCOPY VARCHAR2) --File.Sql.39 bug 4440895
688: is
689: l_amount_set_id pa_fin_plan_amount_sets.fin_plan_amount_set_id%TYPE;
690: l_budget_version_type VARCHAR2(30); -- used for determining how to rank the amount types
691: l_raw_cost_flag pa_fin_plan_amount_sets.raw_cost_flag%TYPE;
692: l_burdened_cost_flag pa_fin_plan_amount_sets.burdened_cost_flag%TYPE;
693: l_cost_qty_flag pa_fin_plan_amount_sets.cost_qty_flag%TYPE;
694: l_revenue_flag pa_fin_plan_amount_sets.revenue_flag%TYPE;
695: l_revenue_qty_flag pa_fin_plan_amount_sets.revenue_qty_flag%TYPE;
688: is
689: l_amount_set_id pa_fin_plan_amount_sets.fin_plan_amount_set_id%TYPE;
690: l_budget_version_type VARCHAR2(30); -- used for determining how to rank the amount types
691: l_raw_cost_flag pa_fin_plan_amount_sets.raw_cost_flag%TYPE;
692: l_burdened_cost_flag pa_fin_plan_amount_sets.burdened_cost_flag%TYPE;
693: l_cost_qty_flag pa_fin_plan_amount_sets.cost_qty_flag%TYPE;
694: l_revenue_flag pa_fin_plan_amount_sets.revenue_flag%TYPE;
695: l_revenue_qty_flag pa_fin_plan_amount_sets.revenue_qty_flag%TYPE;
696:
689: l_amount_set_id pa_fin_plan_amount_sets.fin_plan_amount_set_id%TYPE;
690: l_budget_version_type VARCHAR2(30); -- used for determining how to rank the amount types
691: l_raw_cost_flag pa_fin_plan_amount_sets.raw_cost_flag%TYPE;
692: l_burdened_cost_flag pa_fin_plan_amount_sets.burdened_cost_flag%TYPE;
693: l_cost_qty_flag pa_fin_plan_amount_sets.cost_qty_flag%TYPE;
694: l_revenue_flag pa_fin_plan_amount_sets.revenue_flag%TYPE;
695: l_revenue_qty_flag pa_fin_plan_amount_sets.revenue_qty_flag%TYPE;
696:
697: l_default_amount_type_code pa_proj_periods_denorm.amount_type_code%TYPE;
690: l_budget_version_type VARCHAR2(30); -- used for determining how to rank the amount types
691: l_raw_cost_flag pa_fin_plan_amount_sets.raw_cost_flag%TYPE;
692: l_burdened_cost_flag pa_fin_plan_amount_sets.burdened_cost_flag%TYPE;
693: l_cost_qty_flag pa_fin_plan_amount_sets.cost_qty_flag%TYPE;
694: l_revenue_flag pa_fin_plan_amount_sets.revenue_flag%TYPE;
695: l_revenue_qty_flag pa_fin_plan_amount_sets.revenue_qty_flag%TYPE;
696:
697: l_default_amount_type_code pa_proj_periods_denorm.amount_type_code%TYPE;
698: l_default_amount_subtype_code pa_proj_periods_denorm.amount_subtype_code%TYPE;
691: l_raw_cost_flag pa_fin_plan_amount_sets.raw_cost_flag%TYPE;
692: l_burdened_cost_flag pa_fin_plan_amount_sets.burdened_cost_flag%TYPE;
693: l_cost_qty_flag pa_fin_plan_amount_sets.cost_qty_flag%TYPE;
694: l_revenue_flag pa_fin_plan_amount_sets.revenue_flag%TYPE;
695: l_revenue_qty_flag pa_fin_plan_amount_sets.revenue_qty_flag%TYPE;
696:
697: l_default_amount_type_code pa_proj_periods_denorm.amount_type_code%TYPE;
698: l_default_amount_subtype_code pa_proj_periods_denorm.amount_subtype_code%TYPE;
699: l_msg_count NUMBER := 0;
740: l_burdened_cost_flag,
741: l_cost_qty_flag,
742: l_revenue_flag,
743: l_revenue_qty_flag
744: from pa_fin_plan_amount_sets
745: where fin_plan_amount_set_id = l_amount_set_id;
746: -- determine the top_ranking amount type, based on the budget version type
747: if l_budget_version_type = 'COST' then
748: if l_raw_cost_flag = 'Y' then