DBA Data[Home] [Help]

APPS.MTH_PROCESS_OUTPUT_PKG dependencies on MTH_EQUIPMENTS_D

Line 760: FROM mth_equipments_d med,

756: -- Validation for Invalid Equipment
757: UPDATE mth_equip_output_stg stg
758: SET stg.err_code = stg.err_code || 'EQP '
759: WHERE NOT EXISTS ( SELECT * FROM ( SELECT med.equipment_pk_key, med.equipment_pk
760: FROM mth_equipments_d med,
761: mth_equip_output_stg stg
762: WHERE med.equipment_pk = stg.equipment_fk) eqp
763: WHERE eqp.equipment_pk = stg.equipment_fk
764: AND stg.processing_flag = v_processing_flag );

Line 771: FROM mth_equipments_d med,

767: -- Validation for Inactive Equipment
768: UPDATE mth_equip_output_stg stg
769: SET stg.err_code = stg.err_code || 'IEQ '
770: WHERE EXISTS ( SELECT * FROM ( SELECT med.equipment_pk_key, med.equipment_pk
771: FROM mth_equipments_d med,
772: mth_equip_output_stg stg
773: WHERE med.equipment_pk = stg.equipment_fk
774: AND Nvl(med.status,'NULL') <> 'ACTIVE') eqp
775: WHERE eqp.equipment_pk = stg.equipment_fk

Line 916: mth_equipments_d med

912: WHERE NOT EXISTS ( SELECT * FROM ( SELECT mds.shift_workday_pk,med.equipment_pk,mes.from_date,mes.to_date
913: FROM mth_workday_shifts_d mds,
914: mth_equip_output_stg stg,
915: mth_equipment_shifts_d mes,
916: mth_equipments_d med
917: WHERE stg.shift_workday_fk = mds.shift_workday_pk
918: AND stg.equipment_fk = med.equipment_pk
919: AND mds.shift_workday_pk_key = mes.shift_workday_fk_key
920: AND med.equipment_pk_key = mes.equipment_fk_key

Line 937: mth_equipments_d med,

933: SET stg.err_code = stg.err_code || 'DOP '
934: WHERE EXISTS (SELECT * FROM (SELECT meo.reading_time,med.equipment_pk,wds.shift_workday_pk
935: FROM mth_equip_output meo,
936: mth_equip_output_stg stg,
937: mth_equipments_d med,
938: mth_workday_shifts_d wds
939: WHERE med.equipment_pk_key = meo.equipment_fk_key
940: AND wds.shift_workday_pk_key = meo.shift_workday_fk_key
941: AND med.equipment_pk = stg.equipment_fk

Line 1103: mth_equipments_d med,

1099: null,
1100: null,
1101: mhd.hour_pk_key
1102: FROM mth_equip_output_stg stg,
1103: mth_equipments_d med,
1104: mth_workday_shifts_d wds,
1105: mth_items_d mid,
1106: mth_production_segments_f msf,
1107: mth_production_schedules_f mps,

Line 1162: mth_equipments_d med

1158: NULL,
1159: NULL,
1160: stg.reading_time
1161: FROM mth_equip_output_stg stg,
1162: mth_equipments_d med
1163: WHERE med.equipment_pk = stg.equipment_fk
1164: AND med.status = 'ACTIVE'
1165: AND stg.processing_flag = v_processing_flag
1166: AND stg.ERR_CODE IS NULL

Line 1320: FROM mth_equipments_d med,

1316: -- Validation for Invalid Equipment
1317: UPDATE mth_equip_output_stg stg
1318: SET stg.err_code = stg.err_code || 'EQP '
1319: WHERE NOT EXISTS ( SELECT * FROM ( SELECT med.equipment_pk_key, med.equipment_pk
1320: FROM mth_equipments_d med,
1321: mth_equip_output_stg stg
1322: WHERE med.equipment_pk = stg.equipment_fk) eqp
1323: WHERE eqp.equipment_pk = stg.equipment_fk
1324: AND stg.processing_flag = v_processing_flag );

Line 1331: FROM mth_equipments_d med,

1327: -- Validation for Inactive Equipment
1328: UPDATE mth_equip_output_stg stg
1329: SET stg.err_code = stg.err_code || 'IEQ '
1330: WHERE EXISTS ( SELECT * FROM ( SELECT med.equipment_pk_key, med.equipment_pk
1331: FROM mth_equipments_d med,
1332: mth_equip_output_stg stg
1333: WHERE med.equipment_pk = stg.equipment_fk
1334: AND Nvl(med.status,'NULL') <> 'ACTIVE') eqp
1335: WHERE eqp.equipment_pk = stg.equipment_fk

Line 1476: mth_equipments_d med

1472: WHERE NOT EXISTS ( SELECT * FROM ( SELECT mds.shift_workday_pk,med.equipment_pk,mes.from_date,mes.to_date
1473: FROM mth_workday_shifts_d mds,
1474: mth_equip_output_stg stg,
1475: mth_equipment_shifts_d mes,
1476: mth_equipments_d med
1477: WHERE stg.shift_workday_fk = mds.shift_workday_pk
1478: AND stg.equipment_fk = med.equipment_pk
1479: AND mds.shift_workday_pk_key = mes.shift_workday_fk_key
1480: AND med.equipment_pk_key = mes.equipment_fk_key

Line 1497: mth_equipments_d med,

1493: SET stg.err_code = stg.err_code || 'DOP '
1494: WHERE EXISTS (SELECT * FROM (SELECT meo.reading_time,med.equipment_pk,wds.shift_workday_pk
1495: FROM mth_equip_output meo,
1496: mth_equip_output_stg stg,
1497: mth_equipments_d med,
1498: mth_workday_shifts_d wds
1499: WHERE med.equipment_pk_key = meo.equipment_fk_key
1500: AND wds.shift_workday_pk_key = meo.shift_workday_fk_key
1501: AND med.equipment_pk = stg.equipment_fk

Line 1666: mth_equipments_d med,

1662: null,
1663: null,
1664: mhd.hour_pk_key
1665: FROM mth_equip_output_stg stg,
1666: mth_equipments_d med,
1667: mth_workday_shifts_d wds,
1668: mth_items_d mid,
1669: mth_production_segments_f msf,
1670: mth_production_schedules_f mps,

Line 1725: mth_equipments_d med

1721: NULL,
1722: NULL,
1723: stg.reading_time
1724: FROM mth_equip_output_stg stg,
1725: mth_equipments_d med
1726: WHERE med.equipment_pk = stg.equipment_fk
1727: AND med.status = 'ACTIVE'
1728: AND stg.processing_flag = v_processing_flag
1729: AND stg.ERR_CODE IS NULL

Line 1828: FROM mth_equipments_d med,

1824: IF (p_equipment_pk_key is not null)
1825: THEN
1826: SELECT Count(*)
1827: INTO l_count
1828: FROM mth_equipments_d med,
1829: MTH_equip_output_stg stg
1830: WHERE med.equipment_pk = stg.equipment_fk
1831: AND med.equipment_pk_key = p_equipment_pk_key
1832: AND med.plant_fk_key = Nvl(p_plant_pk_key,med.plant_fk_key);

Line 1847: FROM mth_equipments_d

1843: SELECT Min(reading_time)
1844: INTO p_min_reading_time_csv
1845: FROM MTH_equip_output_stg stg
1846: WHERE stg.equipment_fk = Nvl((SELECT equipment_pk
1847: FROM mth_equipments_d
1848: WHERE equipment_pk_key = p_equipment_pk_key),stg.equipment_fk);
1849:
1850: SELECT Max(reading_time)
1851: INTO p_max_reading_time_csv

Line 1854: FROM mth_equipments_d

1850: SELECT Max(reading_time)
1851: INTO p_max_reading_time_csv
1852: FROM MTH_equip_output_stg stg
1853: WHERE stg.equipment_fk = Nvl((SELECT equipment_pk
1854: FROM mth_equipments_d
1855: WHERE equipment_pk_key = p_equipment_pk_key),stg.equipment_fk);
1856:
1857:
1858: IF(p_min_reading_time_csv < p_recal_from_date OR p_max_reading_time_csv > p_recal_to_date)

Line 1872: FROM mth_equipments_d

1868: FROM mth_equip_output
1869: WHERE reading_time >= p_recal_from_date
1870: AND reading_time <= Nvl(p_recal_to_date,SYSDATE)
1871: AND equipment_fk_key IN ( SELECT equipment_pk_key
1872: FROM mth_equipments_d
1873: WHERE plant_fk_key = p_plant_pk_key);
1874: ELSE
1875: DELETE
1876: FROM mth_equip_output

Line 1890: FROM mth_equipments_d

1886: WHERE reading_time >= p_recal_from_date
1887: AND reading_time <= Nvl(p_recal_to_date,SYSDATE)
1888: AND REASON_TYPE=2
1889: AND equipment_fk_key IN ( SELECT equipment_pk_key
1890: FROM mth_equipments_d
1891: WHERE plant_fk_key = p_plant_pk_key);
1892: ELSE
1893: DELETE
1894: FROM mth_tag_reason_readings

Line 1939: FROM mth_equipments_d med,

1935: -- Validation for Invalid Equipment
1936: UPDATE mth_equip_output_stg stg
1937: SET stg.err_code = stg.err_code || 'EQP '
1938: WHERE NOT EXISTS ( SELECT * FROM ( SELECT med.equipment_pk_key, med.equipment_pk
1939: FROM mth_equipments_d med,
1940: mth_equip_output_stg stg
1941: WHERE med.equipment_pk = stg.equipment_fk) eqp
1942: WHERE eqp.equipment_pk = stg.equipment_fk);
1943: mth_util_pkg.log_msg('Number of rows with EQP in MTH_EQUIP_OUTPUT_STG - ' || SQL%ROWCOUNT, mth_util_pkg.G_DBG_ROW_CNT);

Line 1949: FROM mth_equipments_d med,

1945: -- Validation for Inactive Equipment
1946: UPDATE mth_equip_output_stg stg
1947: SET stg.err_code = stg.err_code || 'IEQ '
1948: WHERE EXISTS ( SELECT * FROM ( SELECT med.equipment_pk_key, med.equipment_pk
1949: FROM mth_equipments_d med,
1950: mth_equip_output_stg stg
1951: WHERE med.equipment_pk = stg.equipment_fk
1952: AND Nvl(med.status,'NULL') <> 'ACTIVE') eqp
1953: WHERE eqp.equipment_pk = stg.equipment_fk );

Line 2083: mth_equipments_d med

2079: WHERE NOT EXISTS ( SELECT * FROM ( SELECT mds.shift_workday_pk,med.equipment_pk,mes.from_date,mes.to_date
2080: FROM mth_workday_shifts_d mds,
2081: mth_equip_output_stg stg,
2082: mth_equipment_shifts_d mes,
2083: mth_equipments_d med
2084: WHERE stg.shift_workday_fk = mds.shift_workday_pk
2085: AND stg.equipment_fk = med.equipment_pk
2086: AND mds.shift_workday_pk_key = mes.shift_workday_fk_key
2087: AND med.equipment_pk_key = mes.equipment_fk_key

Line 2103: mth_equipments_d med,

2099: SET stg.err_code = stg.err_code || 'DOP '
2100: WHERE EXISTS (SELECT * FROM (SELECT meo.reading_time,med.equipment_pk,wds.shift_workday_pk
2101: FROM mth_equip_output meo,
2102: mth_equip_output_stg stg,
2103: mth_equipments_d med,
2104: mth_workday_shifts_d wds
2105: WHERE med.equipment_pk_key = meo.equipment_fk_key
2106: AND wds.shift_workday_pk_key = meo.shift_workday_fk_key
2107: AND med.equipment_pk = stg.equipment_fk

Line 2225: mth_equipments_d med,

2221: null,
2222: null,
2223: mhd.hour_pk_key
2224: FROM mth_equip_output_stg stg,
2225: mth_equipments_d med,
2226: mth_workday_shifts_d wds,
2227: mth_items_d mid,
2228: mth_production_segments_f msf,
2229: mth_production_schedules_f mps,

Line 2284: mth_equipments_d med

2280: NULL,
2281: NULL,
2282: stg.reading_time
2283: FROM mth_equip_output_stg stg,
2284: mth_equipments_d med
2285: WHERE med.equipment_pk = stg.equipment_fk
2286: AND med.status = 'ACTIVE'
2287: AND stg.ERR_CODE IS NULL
2288: AND stg.qty_scrap IS NOT NULL);

Line 3037: FROM mth_equipments_d

3033: WHERE from_time >= p_n_recalc_from_date
3034: AND to_time <= p_n_recalc_to_date)
3035: AND equipment_fk_key = nvl(p_recalc_equip_key,equipment_fk_key)
3036: AND equipment_fk_key IN (SELECT equipment_pk_key
3037: FROM mth_equipments_d
3038: WHERE plant_fk_key = Nvl(p_recalc_plant_key,plant_fk_key));
3039: END IF;
3040:
3041: -- Call the logging API to log the number of rows inserted

Line 3060: FROM mth_equipments_d

3056: WHERE from_time >= p_n_recalc_from_date
3057: AND to_time <= p_n_recalc_to_date)
3058: AND equipment_fk_key = nvl(p_recalc_equip_key,equipment_fk_key)
3059: AND equipment_fk_key IN (SELECT equipment_pk_key
3060: FROM mth_equipments_d
3061: WHERE plant_fk_key = Nvl(p_recalc_plant_key,plant_fk_key));
3062: END IF;
3063:
3064: -- Call the logging API to log the number of rows inserted

Line 3143: FROM mth_equipments_d

3139: WHERE from_time >= p_n_recalc_from_date
3140: AND to_time <= p_n_recalc_to_date)
3141: AND meo.equipment_fk_key = nvl(p_recalc_equip_key,meo.equipment_fk_key)
3142: AND meo.equipment_fk_key IN (SELECT equipment_pk_key
3143: FROM mth_equipments_d
3144: WHERE plant_fk_key = Nvl(p_recalc_plant_key,plant_fk_key))
3145: GROUP BY meo.equipment_fk_key,
3146: meo.item_fk_key,
3147: meo.workorder_fk_key ,

Line 3190: FROM mth_equipments_d

3186: WHERE from_time >= p_n_recalc_from_date
3187: AND to_time <= p_n_recalc_to_date)
3188: AND meos.equipment_fk_key = nvl(p_recalc_equip_key,meos.equipment_fk_key)
3189: AND meos.equipment_fk_key IN (SELECT equipment_pk_key
3190: FROM mth_equipments_d
3191: WHERE plant_fk_key = Nvl(p_recalc_plant_key,plant_fk_key))
3192: GROUP BY meos.equipment_fk_key,
3193: meos.shift_workday_fk_key,
3194: meos.hour_fk_key) statrec

Line 3224: FROM mth_equipments_d

3220: WHERE from_time >= p_n_recalc_from_date
3221: AND to_time <= p_n_recalc_to_date)
3222: AND meos.equipment_fk_key = nvl(p_recalc_equip_key,meos.equipment_fk_key)
3223: AND meos.equipment_fk_key IN (SELECT equipment_pk_key
3224: FROM mth_equipments_d
3225: WHERE plant_fk_key = Nvl(p_recalc_plant_key,plant_fk_key))
3226: GROUP BY meos.equipment_fk_key,
3227: meos.shift_workday_fk_key,
3228: meos.hour_fk_key) meos