DBA Data[Home] [Help]

VIEW: APPS.PA_FIN_PLAN_CREATE_PLAN_BV_V

Source

View Text - Preformatted

SELECT po.project_id, bv.version_name, bv.description, bv.change_reason_code, pt.fin_plan_type_code, pt.name as plan_type_name, po.fin_plan_preference_code, DECODE(po.fin_plan_preference_code, 'COST_ONLY', po.cost_fin_plan_level_code, 'REVENUE_ONLY', po.revenue_fin_plan_level_code, 'COST_AND_REV_SEP', DECODE(bv.version_type, 'COST', po.cost_fin_plan_level_code, 'REVENUE', po.revenue_fin_plan_level_code, po.all_fin_plan_level_code), 'COST_AND_REV_SAME', po.all_fin_plan_level_code, po.cost_fin_plan_level_code) as plan_level_code, DECODE(po.fin_plan_preference_code, 'COST_ONLY', po.cost_time_phased_code, 'REVENUE_ONLY', po.revenue_time_phased_code, 'COST_AND_REV_SEP', DECODE(bv.version_type, 'COST', po.cost_time_phased_code, 'REVENUE', po.revenue_time_phased_code, po.all_time_phased_code), 'COST_AND_REV_SAME', po.all_time_phased_code, po.cost_time_phased_code) as time_phased_code, DECODE(po.fin_plan_preference_code, 'COST_ONLY', po.cost_resource_list_id, 'REVENUE_ONLY', po.revenue_resource_list_id, 'COST_AND_REV_SEP', DECODE(bv.version_type, 'COST', po.cost_resource_list_id, 'REVENUE', po.revenue_resource_list_id, po.all_resource_list_id), 'COST_AND_REV_SAME', po.all_resource_list_id, po.cost_resource_list_id) as resource_list_id, bv.budget_version_id, bv.record_version_number, bv.budget_status_code, pa_fin_plan_utils.Get_Period_Profile_Start_Date(bv.period_profile_id) as start_period_name, pa_fin_plan_utils.Get_Period_Profile_End_Date(bv.period_profile_id) as end_period_name, bv.attribute_category, bv.attribute1, bv.attribute2, bv.attribute3, bv.attribute4, bv.attribute5, bv.attribute6, bv.attribute7, bv.attribute8, bv.attribute9, bv.attribute10, bv.attribute11, bv.attribute12, bv.attribute13, bv.attribute14, bv.attribute15 from pa_proj_fp_options po, pa_fin_plan_types_vl pt, pa_budget_versions bv WHERE bv.project_id = pa_fin_plan_create_ver_global.get_project_id and bv.budget_version_id = pa_fin_plan_create_ver_global.get_budget_version_id and bv.budget_version_id = po.fin_plan_version_id and bv.ci_id is null and po.fin_plan_option_level_code = 'PLAN_VERSION' and po.fin_plan_type_id = pt.fin_plan_type_id and pt.fin_plan_type_id = pa_fin_plan_create_ver_global.get_fin_plan_type_id
View Text - HTML Formatted

SELECT PO.PROJECT_ID
, BV.VERSION_NAME
, BV.DESCRIPTION
, BV.CHANGE_REASON_CODE
, PT.FIN_PLAN_TYPE_CODE
, PT.NAME AS PLAN_TYPE_NAME
, PO.FIN_PLAN_PREFERENCE_CODE
, DECODE(PO.FIN_PLAN_PREFERENCE_CODE
, 'COST_ONLY'
, PO.COST_FIN_PLAN_LEVEL_CODE
, 'REVENUE_ONLY'
, PO.REVENUE_FIN_PLAN_LEVEL_CODE
, 'COST_AND_REV_SEP'
, DECODE(BV.VERSION_TYPE
, 'COST'
, PO.COST_FIN_PLAN_LEVEL_CODE
, 'REVENUE'
, PO.REVENUE_FIN_PLAN_LEVEL_CODE
, PO.ALL_FIN_PLAN_LEVEL_CODE)
, 'COST_AND_REV_SAME'
, PO.ALL_FIN_PLAN_LEVEL_CODE
, PO.COST_FIN_PLAN_LEVEL_CODE) AS PLAN_LEVEL_CODE
, DECODE(PO.FIN_PLAN_PREFERENCE_CODE
, 'COST_ONLY'
, PO.COST_TIME_PHASED_CODE
, 'REVENUE_ONLY'
, PO.REVENUE_TIME_PHASED_CODE
, 'COST_AND_REV_SEP'
, DECODE(BV.VERSION_TYPE
, 'COST'
, PO.COST_TIME_PHASED_CODE
, 'REVENUE'
, PO.REVENUE_TIME_PHASED_CODE
, PO.ALL_TIME_PHASED_CODE)
, 'COST_AND_REV_SAME'
, PO.ALL_TIME_PHASED_CODE
, PO.COST_TIME_PHASED_CODE) AS TIME_PHASED_CODE
, DECODE(PO.FIN_PLAN_PREFERENCE_CODE
, 'COST_ONLY'
, PO.COST_RESOURCE_LIST_ID
, 'REVENUE_ONLY'
, PO.REVENUE_RESOURCE_LIST_ID
, 'COST_AND_REV_SEP'
, DECODE(BV.VERSION_TYPE
, 'COST'
, PO.COST_RESOURCE_LIST_ID
, 'REVENUE'
, PO.REVENUE_RESOURCE_LIST_ID
, PO.ALL_RESOURCE_LIST_ID)
, 'COST_AND_REV_SAME'
, PO.ALL_RESOURCE_LIST_ID
, PO.COST_RESOURCE_LIST_ID) AS RESOURCE_LIST_ID
, BV.BUDGET_VERSION_ID
, BV.RECORD_VERSION_NUMBER
, BV.BUDGET_STATUS_CODE
, PA_FIN_PLAN_UTILS.GET_PERIOD_PROFILE_START_DATE(BV.PERIOD_PROFILE_ID) AS START_PERIOD_NAME
, PA_FIN_PLAN_UTILS.GET_PERIOD_PROFILE_END_DATE(BV.PERIOD_PROFILE_ID) AS END_PERIOD_NAME
, BV.ATTRIBUTE_CATEGORY
, BV.ATTRIBUTE1
, BV.ATTRIBUTE2
, BV.ATTRIBUTE3
, BV.ATTRIBUTE4
, BV.ATTRIBUTE5
, BV.ATTRIBUTE6
, BV.ATTRIBUTE7
, BV.ATTRIBUTE8
, BV.ATTRIBUTE9
, BV.ATTRIBUTE10
, BV.ATTRIBUTE11
, BV.ATTRIBUTE12
, BV.ATTRIBUTE13
, BV.ATTRIBUTE14
, BV.ATTRIBUTE15
FROM PA_PROJ_FP_OPTIONS PO
, PA_FIN_PLAN_TYPES_VL PT
, PA_BUDGET_VERSIONS BV
WHERE BV.PROJECT_ID = PA_FIN_PLAN_CREATE_VER_GLOBAL.GET_PROJECT_ID
AND BV.BUDGET_VERSION_ID = PA_FIN_PLAN_CREATE_VER_GLOBAL.GET_BUDGET_VERSION_ID
AND BV.BUDGET_VERSION_ID = PO.FIN_PLAN_VERSION_ID
AND BV.CI_ID IS NULL
AND PO.FIN_PLAN_OPTION_LEVEL_CODE = 'PLAN_VERSION'
AND PO.FIN_PLAN_TYPE_ID = PT.FIN_PLAN_TYPE_ID
AND PT.FIN_PLAN_TYPE_ID = PA_FIN_PLAN_CREATE_VER_GLOBAL.GET_FIN_PLAN_TYPE_ID