DBA Data[Home] [Help]

VIEW: APPS.CST_EAM_ROLLUP_BY_DEPT_V

Source

View Text - Preformatted

SELECT cs.group_id, cs.period_set_name, cs.period_name, cs.period_start_date, b1.meaning as name, cs.inv_id, mi.CONCATENATED_SEGMENTS, cs.org_id, cs.serial_number, cs.Total, cs.Material, cs.Labor, cs.Equipment from (select t1.group_id, t1.maint_cost_category, t1.inventory_item_id as inv_id, t1.organization_id as org_id, t1.serial_number as serial_number, t1.period_set_name, t1.period_name as period_name, t1.period_start_date as period_start_date, (nvl(SUM(t1.actual_mat_cost),0)+nvl(SUM(t1.actual_lab_cost),0)+nvl(SUM(t1.actual_eqp_cost),0)) as Total, nvl(SUM(t1.actual_mat_cost),0) as Material, nvl(SUM(t1.actual_lab_cost),0) as Labor, nvl(SUM(t1.actual_eqp_cost),0) as Equipment from cst_eam_rollup_temp t1 group by t1.group_id, t1.maint_cost_category, t1.inventory_item_id, t1.organization_id, t1.serial_number, t1.period_set_name, t1.period_name, t1.period_start_date) cs, mtl_system_items_b_kfv mi, mfg_lookups b1 where mi.inventory_item_id = cs.inv_id and mi.organization_id = cs.org_id and cs.maint_cost_category = b1.lookup_code and b1.lookup_type ='BOM_EAM_COST_CATEGORY' order by period_start_date asc
View Text - HTML Formatted

SELECT CS.GROUP_ID
, CS.PERIOD_SET_NAME
, CS.PERIOD_NAME
, CS.PERIOD_START_DATE
, B1.MEANING AS NAME
, CS.INV_ID
, MI.CONCATENATED_SEGMENTS
, CS.ORG_ID
, CS.SERIAL_NUMBER
, CS.TOTAL
, CS.MATERIAL
, CS.LABOR
, CS.EQUIPMENT
FROM (SELECT T1.GROUP_ID
, T1.MAINT_COST_CATEGORY
, T1.INVENTORY_ITEM_ID AS INV_ID
, T1.ORGANIZATION_ID AS ORG_ID
, T1.SERIAL_NUMBER AS SERIAL_NUMBER
, T1.PERIOD_SET_NAME
, T1.PERIOD_NAME AS PERIOD_NAME
, T1.PERIOD_START_DATE AS PERIOD_START_DATE
, (NVL(SUM(T1.ACTUAL_MAT_COST)
, 0)+NVL(SUM(T1.ACTUAL_LAB_COST)
, 0)+NVL(SUM(T1.ACTUAL_EQP_COST)
, 0)) AS TOTAL
, NVL(SUM(T1.ACTUAL_MAT_COST)
, 0) AS MATERIAL
, NVL(SUM(T1.ACTUAL_LAB_COST)
, 0) AS LABOR
, NVL(SUM(T1.ACTUAL_EQP_COST)
, 0) AS EQUIPMENT
FROM CST_EAM_ROLLUP_TEMP T1 GROUP BY T1.GROUP_ID
, T1.MAINT_COST_CATEGORY
, T1.INVENTORY_ITEM_ID
, T1.ORGANIZATION_ID
, T1.SERIAL_NUMBER
, T1.PERIOD_SET_NAME
, T1.PERIOD_NAME
, T1.PERIOD_START_DATE) CS
, MTL_SYSTEM_ITEMS_B_KFV MI
, MFG_LOOKUPS B1
WHERE MI.INVENTORY_ITEM_ID = CS.INV_ID
AND MI.ORGANIZATION_ID = CS.ORG_ID
AND CS.MAINT_COST_CATEGORY = B1.LOOKUP_CODE
AND B1.LOOKUP_TYPE ='BOM_EAM_COST_CATEGORY' ORDER BY PERIOD_START_DATE ASC