DBA Data[Home] [Help]

APPS.MTH_PROCESS_OUTPUT_PKG dependencies on MTH_EQUIP_OUTPUT_SUMMARY

Line 77: WHERE mrl.fact_table = 'MTH_EQUIP_OUTPUT_SUMMARY'

73: SELECT Count(1)
74: INTO v_output_count
75: FROM mth_equip_output meo,
76: mth_run_log mrl
77: WHERE mrl.fact_table = 'MTH_EQUIP_OUTPUT_SUMMARY'
78: AND meo.last_update_date > mrl.from_date;
79:
80: IF v_output_count > 0 THEN
81: v_msg:=fnd_message.get_string('MTH','MTH_OUTPUT_NOT_IN_SUMMARY');

Line 2411: mth_util_pkg.mth_run_log_pre_load('MTH_EQUIP_OUTPUT_SUMMARY',v_ua_val,'INITIAL',NULL,0,v_log_date);

2407: v_log_date := sysdate;
2408: v_ua_val := MTH_UTIL_PKG.MTH_UA_GET_VAL;
2409:
2410: -- Call mth_run_log_pre_load
2411: mth_util_pkg.mth_run_log_pre_load('MTH_EQUIP_OUTPUT_SUMMARY',v_ua_val,'INITIAL',NULL,0,v_log_date);
2412:
2413: -- Call delete output summary to delete all data from MTH_EQUIP_OUTPUT_SUMMARY table as well update status summary table
2414: UPDATE MTH_EQUIP_STATUS_SUMMARY
2415: SET wo_item_count = null,

Line 2413: -- Call delete output summary to delete all data from MTH_EQUIP_OUTPUT_SUMMARY table as well update status summary table

2409:
2410: -- Call mth_run_log_pre_load
2411: mth_util_pkg.mth_run_log_pre_load('MTH_EQUIP_OUTPUT_SUMMARY',v_ua_val,'INITIAL',NULL,0,v_log_date);
2412:
2413: -- Call delete output summary to delete all data from MTH_EQUIP_OUTPUT_SUMMARY table as well update status summary table
2414: UPDATE MTH_EQUIP_STATUS_SUMMARY
2415: SET wo_item_count = null,
2416: required_hours = null;
2417: mth_util_pkg.log_msg('Number of rows updated in status summary - ' || SQL%ROWCOUNT, mth_util_pkg.G_DBG_ROW_CNT);

Line 2419: DELETE FROM MTH_EQUIP_OUTPUT_SUMMARY;

2415: SET wo_item_count = null,
2416: required_hours = null;
2417: mth_util_pkg.log_msg('Number of rows updated in status summary - ' || SQL%ROWCOUNT, mth_util_pkg.G_DBG_ROW_CNT);
2418:
2419: DELETE FROM MTH_EQUIP_OUTPUT_SUMMARY;
2420: mth_util_pkg.log_msg('Number of rows deleted from output summary - ' || SQL%ROWCOUNT, mth_util_pkg.G_DBG_ROW_CNT);
2421:
2422: -- Get to and from date from run log
2423: mth_util_pkg.GET_RUN_LOG_DATES('MTH_EQUIP_OUTPUT_SUMMARY',NULL,NULL,NULL,v_run_log_from_date,v_run_log_to_date);

Line 2423: mth_util_pkg.GET_RUN_LOG_DATES('MTH_EQUIP_OUTPUT_SUMMARY',NULL,NULL,NULL,v_run_log_from_date,v_run_log_to_date);

2419: DELETE FROM MTH_EQUIP_OUTPUT_SUMMARY;
2420: mth_util_pkg.log_msg('Number of rows deleted from output summary - ' || SQL%ROWCOUNT, mth_util_pkg.G_DBG_ROW_CNT);
2421:
2422: -- Get to and from date from run log
2423: mth_util_pkg.GET_RUN_LOG_DATES('MTH_EQUIP_OUTPUT_SUMMARY',NULL,NULL,NULL,v_run_log_from_date,v_run_log_to_date);
2424:
2425: -- Process data from output to be inserted to output summary
2426: INSERT
2427: INTO

Line 2428: MTH_EQUIP_OUTPUT_SUMMARY( EQUIPMENT_FK_KEY,

2424:
2425: -- Process data from output to be inserted to output summary
2426: INSERT
2427: INTO
2428: MTH_EQUIP_OUTPUT_SUMMARY( EQUIPMENT_FK_KEY,
2429: ITEM_FK_KEY,
2430: WORKORDER_FK_KEY,
2431: SHIFT_WORKDAY_FK_KEY,
2432: HOUR_FK_KEY,

Line 2506: mth_util_pkg.log_msg('Rows inserted in MTH_EQUIP_OUTPUT_SUMMARY : '||SQL%ROWCOUNT,mth_util_pkg.G_DBG_ROW_CNT);

2502: meo.segment_fk_key,
2503: meo.hour_fk_key );
2504:
2505: -- Call the logging API to log the number of rows inserted
2506: mth_util_pkg.log_msg('Rows inserted in MTH_EQUIP_OUTPUT_SUMMARY : '||SQL%ROWCOUNT,mth_util_pkg.G_DBG_ROW_CNT);
2507:
2508: UPDATE
2509: MTH_EQUIP_STATUS_SUMMARY mes
2510: SET (mes.WO_ITEM_COUNT,mes.REQUIRED_HOURS,

Line 2532: FROM MTH_EQUIP_OUTPUT_SUMMARY meos

2528: v_log_date last_update_date,
2529: v_ua_val last_update_system_id,
2530: v_ua_val last_update_login,
2531: v_ua_val last_updated_by
2532: FROM MTH_EQUIP_OUTPUT_SUMMARY meos
2533: WHERE meos.standard_rate_1 is NOT NULL
2534: AND meos.standard_rate_1 <> 0
2535: GROUP BY meos.equipment_fk_key,
2536: meos.shift_workday_fk_key,

Line 2558: FROM MTH_EQUIP_OUTPUT_SUMMARY meos

2554: v_log_date last_update_date,
2555: v_ua_val last_update_system_id,
2556: v_ua_val last_update_login,
2557: v_ua_val last_updated_by
2558: FROM MTH_EQUIP_OUTPUT_SUMMARY meos
2559: WHERE meos.standard_rate_1 is NOT NULL
2560: AND meos.standard_rate_1 <> 0
2561: GROUP BY meos.equipment_fk_key,
2562: meos.shift_workday_fk_key,

Line 2572: mth_util_pkg.mth_run_log_post_load('MTH_EQUIP_OUTPUT_SUMMARY',v_ua_val);

2568: -- Call the logging API to log the number of rows updated
2569: mth_util_pkg.log_msg('Rows updated in MTH_EQUIP_STATUS_SUMMARY : '||SQL%ROWCOUNT,mth_util_pkg.G_DBG_ROW_CNT);
2570:
2571: -- Call mth_run_log_post_load
2572: mth_util_pkg.mth_run_log_post_load('MTH_EQUIP_OUTPUT_SUMMARY',v_ua_val);
2573:
2574: mth_util_pkg.log_msg('PROCESS_OUTPUT_SMMRY_INIT end', mth_util_pkg.G_DBG_PROC_FUN_END);
2575: EXCEPTION
2576: WHEN OTHERS THEN

Line 2608: mth_util_pkg.mth_run_log_pre_load('MTH_EQUIP_OUTPUT_SUMMARY',v_ua_val,'INCR',NULL,0,v_log_date);

2604: v_log_date := sysdate;
2605: v_ua_val := MTH_UTIL_PKG.MTH_UA_GET_VAL;
2606:
2607: -- Call mth_run_log_pre_load
2608: mth_util_pkg.mth_run_log_pre_load('MTH_EQUIP_OUTPUT_SUMMARY',v_ua_val,'INCR',NULL,0,v_log_date);
2609:
2610: -- Get to and from date from run log
2611: mth_util_pkg.GET_RUN_LOG_DATES('MTH_EQUIP_OUTPUT_SUMMARY',NULL,NULL,NULL,v_run_log_from_date,v_run_log_to_date);
2612:

Line 2611: mth_util_pkg.GET_RUN_LOG_DATES('MTH_EQUIP_OUTPUT_SUMMARY',NULL,NULL,NULL,v_run_log_from_date,v_run_log_to_date);

2607: -- Call mth_run_log_pre_load
2608: mth_util_pkg.mth_run_log_pre_load('MTH_EQUIP_OUTPUT_SUMMARY',v_ua_val,'INCR',NULL,0,v_log_date);
2609:
2610: -- Get to and from date from run log
2611: mth_util_pkg.GET_RUN_LOG_DATES('MTH_EQUIP_OUTPUT_SUMMARY',NULL,NULL,NULL,v_run_log_from_date,v_run_log_to_date);
2612:
2613: UPDATE
2614: MTH_EQUIP_STATUS_SUMMARY mes
2615: SET (mes.WO_ITEM_COUNT,mes.REQUIRED_HOURS,

Line 2644: FROM mth_equip_output_summary eos,

2640: end) ) required_time,
2641: Sum((CASE WHEN eos.equipment_fk_key IS NULL THEN 1 ELSE 0 END)) wo_item_count,
2642: null,
2643: null
2644: FROM mth_equip_output_summary eos,
2645: mth_equip_standard_rates_f srf,
2646: (SELECT meo.equipment_fk_key,
2647: meo.item_fk_key,
2648: Nvl(meo.workorder_fk_key,v_ua_val) workorder_fk_key,

Line 2712: FROM mth_equip_output_summary eos,

2708: end) ) required_time,
2709: Sum((case when eos.equipment_fk_key is null then 1 else 0 end)) wo_item_count,
2710: null,
2711: null
2712: FROM mth_equip_output_summary eos,
2713: mth_equip_standard_rates_f srf,
2714: (SELECT meo.equipment_fk_key,
2715: meo.item_fk_key,
2716: Nvl(meo.workorder_fk_key,v_ua_val) workorder_fk_key,

Line 2763: MTH_EQUIP_OUTPUT_SUMMARY

2759:
2760: -- Process data from output to be updated/inserted to output summary
2761: MERGE
2762: INTO
2763: MTH_EQUIP_OUTPUT_SUMMARY
2764: USING
2765: ( SELECT meo.equipment_fk_key sq_equipment_fk_key,
2766: meo.item_fk_key sq_item_fk_key,
2767: Nvl(meo.workorder_fk_key,v_ua_val) sq_workorder_fk_key,

Line 2816: mth_equip_output_summary.equipment_fk_key = subquery.sq_equipment_fk_key

2812: meo.segment_fk_key,
2813: meo.hour_fk_key ) subquery
2814: ON
2815: (
2816: mth_equip_output_summary.equipment_fk_key = subquery.sq_equipment_fk_key
2817: AND mth_equip_output_summary.item_fk_key = subquery.sq_item_fk_key
2818: AND mth_equip_output_summary.workorder_fk_key = subquery.sq_workorder_fk_key
2819: AND mth_equip_output_summary.shift_workday_fk_key = subquery.sq_shift_workday_fk_key
2820: AND mth_equip_output_summary.hour_fk_key = subquery.sq_hour_fk_key

Line 2817: AND mth_equip_output_summary.item_fk_key = subquery.sq_item_fk_key

2813: meo.hour_fk_key ) subquery
2814: ON
2815: (
2816: mth_equip_output_summary.equipment_fk_key = subquery.sq_equipment_fk_key
2817: AND mth_equip_output_summary.item_fk_key = subquery.sq_item_fk_key
2818: AND mth_equip_output_summary.workorder_fk_key = subquery.sq_workorder_fk_key
2819: AND mth_equip_output_summary.shift_workday_fk_key = subquery.sq_shift_workday_fk_key
2820: AND mth_equip_output_summary.hour_fk_key = subquery.sq_hour_fk_key
2821: AND mth_equip_output_summary.recipe_num = subquery.sq_recipe_num

Line 2818: AND mth_equip_output_summary.workorder_fk_key = subquery.sq_workorder_fk_key

2814: ON
2815: (
2816: mth_equip_output_summary.equipment_fk_key = subquery.sq_equipment_fk_key
2817: AND mth_equip_output_summary.item_fk_key = subquery.sq_item_fk_key
2818: AND mth_equip_output_summary.workorder_fk_key = subquery.sq_workorder_fk_key
2819: AND mth_equip_output_summary.shift_workday_fk_key = subquery.sq_shift_workday_fk_key
2820: AND mth_equip_output_summary.hour_fk_key = subquery.sq_hour_fk_key
2821: AND mth_equip_output_summary.recipe_num = subquery.sq_recipe_num
2822: AND mth_equip_output_summary.recipe_version = subquery.sq_recipe_version

Line 2819: AND mth_equip_output_summary.shift_workday_fk_key = subquery.sq_shift_workday_fk_key

2815: (
2816: mth_equip_output_summary.equipment_fk_key = subquery.sq_equipment_fk_key
2817: AND mth_equip_output_summary.item_fk_key = subquery.sq_item_fk_key
2818: AND mth_equip_output_summary.workorder_fk_key = subquery.sq_workorder_fk_key
2819: AND mth_equip_output_summary.shift_workday_fk_key = subquery.sq_shift_workday_fk_key
2820: AND mth_equip_output_summary.hour_fk_key = subquery.sq_hour_fk_key
2821: AND mth_equip_output_summary.recipe_num = subquery.sq_recipe_num
2822: AND mth_equip_output_summary.recipe_version = subquery.sq_recipe_version
2823: AND mth_equip_output_summary.segment_fk_key = subquery.segment

Line 2820: AND mth_equip_output_summary.hour_fk_key = subquery.sq_hour_fk_key

2816: mth_equip_output_summary.equipment_fk_key = subquery.sq_equipment_fk_key
2817: AND mth_equip_output_summary.item_fk_key = subquery.sq_item_fk_key
2818: AND mth_equip_output_summary.workorder_fk_key = subquery.sq_workorder_fk_key
2819: AND mth_equip_output_summary.shift_workday_fk_key = subquery.sq_shift_workday_fk_key
2820: AND mth_equip_output_summary.hour_fk_key = subquery.sq_hour_fk_key
2821: AND mth_equip_output_summary.recipe_num = subquery.sq_recipe_num
2822: AND mth_equip_output_summary.recipe_version = subquery.sq_recipe_version
2823: AND mth_equip_output_summary.segment_fk_key = subquery.segment
2824: )

Line 2821: AND mth_equip_output_summary.recipe_num = subquery.sq_recipe_num

2817: AND mth_equip_output_summary.item_fk_key = subquery.sq_item_fk_key
2818: AND mth_equip_output_summary.workorder_fk_key = subquery.sq_workorder_fk_key
2819: AND mth_equip_output_summary.shift_workday_fk_key = subquery.sq_shift_workday_fk_key
2820: AND mth_equip_output_summary.hour_fk_key = subquery.sq_hour_fk_key
2821: AND mth_equip_output_summary.recipe_num = subquery.sq_recipe_num
2822: AND mth_equip_output_summary.recipe_version = subquery.sq_recipe_version
2823: AND mth_equip_output_summary.segment_fk_key = subquery.segment
2824: )
2825: WHEN MATCHED THEN

Line 2822: AND mth_equip_output_summary.recipe_version = subquery.sq_recipe_version

2818: AND mth_equip_output_summary.workorder_fk_key = subquery.sq_workorder_fk_key
2819: AND mth_equip_output_summary.shift_workday_fk_key = subquery.sq_shift_workday_fk_key
2820: AND mth_equip_output_summary.hour_fk_key = subquery.sq_hour_fk_key
2821: AND mth_equip_output_summary.recipe_num = subquery.sq_recipe_num
2822: AND mth_equip_output_summary.recipe_version = subquery.sq_recipe_version
2823: AND mth_equip_output_summary.segment_fk_key = subquery.segment
2824: )
2825: WHEN MATCHED THEN
2826: UPDATE

Line 2823: AND mth_equip_output_summary.segment_fk_key = subquery.segment

2819: AND mth_equip_output_summary.shift_workday_fk_key = subquery.sq_shift_workday_fk_key
2820: AND mth_equip_output_summary.hour_fk_key = subquery.sq_hour_fk_key
2821: AND mth_equip_output_summary.recipe_num = subquery.sq_recipe_num
2822: AND mth_equip_output_summary.recipe_version = subquery.sq_recipe_version
2823: AND mth_equip_output_summary.segment_fk_key = subquery.segment
2824: )
2825: WHEN MATCHED THEN
2826: UPDATE
2827: SET

Line 2846: (mth_equip_output_summary.equipment_fk_key,

2842: resource_cost = subquery.sq_resource_cost
2843:
2844: WHEN NOT MATCHED THEN
2845: INSERT
2846: (mth_equip_output_summary.equipment_fk_key,
2847: mth_equip_output_summary.item_fk_key,
2848: mth_equip_output_summary.workorder_fk_key,
2849: mth_equip_output_summary.shift_workday_fk_key,
2850: mth_equip_output_summary.hour_fk_key,

Line 2847: mth_equip_output_summary.item_fk_key,

2843:
2844: WHEN NOT MATCHED THEN
2845: INSERT
2846: (mth_equip_output_summary.equipment_fk_key,
2847: mth_equip_output_summary.item_fk_key,
2848: mth_equip_output_summary.workorder_fk_key,
2849: mth_equip_output_summary.shift_workday_fk_key,
2850: mth_equip_output_summary.hour_fk_key,
2851: mth_equip_output_summary.qty_completed,

Line 2848: mth_equip_output_summary.workorder_fk_key,

2844: WHEN NOT MATCHED THEN
2845: INSERT
2846: (mth_equip_output_summary.equipment_fk_key,
2847: mth_equip_output_summary.item_fk_key,
2848: mth_equip_output_summary.workorder_fk_key,
2849: mth_equip_output_summary.shift_workday_fk_key,
2850: mth_equip_output_summary.hour_fk_key,
2851: mth_equip_output_summary.qty_completed,
2852: mth_equip_output_summary.qty_scrap,

Line 2849: mth_equip_output_summary.shift_workday_fk_key,

2845: INSERT
2846: (mth_equip_output_summary.equipment_fk_key,
2847: mth_equip_output_summary.item_fk_key,
2848: mth_equip_output_summary.workorder_fk_key,
2849: mth_equip_output_summary.shift_workday_fk_key,
2850: mth_equip_output_summary.hour_fk_key,
2851: mth_equip_output_summary.qty_completed,
2852: mth_equip_output_summary.qty_scrap,
2853: mth_equip_output_summary.qty_rejected,

Line 2850: mth_equip_output_summary.hour_fk_key,

2846: (mth_equip_output_summary.equipment_fk_key,
2847: mth_equip_output_summary.item_fk_key,
2848: mth_equip_output_summary.workorder_fk_key,
2849: mth_equip_output_summary.shift_workday_fk_key,
2850: mth_equip_output_summary.hour_fk_key,
2851: mth_equip_output_summary.qty_completed,
2852: mth_equip_output_summary.qty_scrap,
2853: mth_equip_output_summary.qty_rejected,
2854: mth_equip_output_summary.qty_rework,

Line 2851: mth_equip_output_summary.qty_completed,

2847: mth_equip_output_summary.item_fk_key,
2848: mth_equip_output_summary.workorder_fk_key,
2849: mth_equip_output_summary.shift_workday_fk_key,
2850: mth_equip_output_summary.hour_fk_key,
2851: mth_equip_output_summary.qty_completed,
2852: mth_equip_output_summary.qty_scrap,
2853: mth_equip_output_summary.qty_rejected,
2854: mth_equip_output_summary.qty_rework,
2855: mth_equip_output_summary.qty_good,

Line 2852: mth_equip_output_summary.qty_scrap,

2848: mth_equip_output_summary.workorder_fk_key,
2849: mth_equip_output_summary.shift_workday_fk_key,
2850: mth_equip_output_summary.hour_fk_key,
2851: mth_equip_output_summary.qty_completed,
2852: mth_equip_output_summary.qty_scrap,
2853: mth_equip_output_summary.qty_rejected,
2854: mth_equip_output_summary.qty_rework,
2855: mth_equip_output_summary.qty_good,
2856: mth_equip_output_summary.qty_output,

Line 2853: mth_equip_output_summary.qty_rejected,

2849: mth_equip_output_summary.shift_workday_fk_key,
2850: mth_equip_output_summary.hour_fk_key,
2851: mth_equip_output_summary.qty_completed,
2852: mth_equip_output_summary.qty_scrap,
2853: mth_equip_output_summary.qty_rejected,
2854: mth_equip_output_summary.qty_rework,
2855: mth_equip_output_summary.qty_good,
2856: mth_equip_output_summary.qty_output,
2857: mth_equip_output_summary.system_fk_key,

Line 2854: mth_equip_output_summary.qty_rework,

2850: mth_equip_output_summary.hour_fk_key,
2851: mth_equip_output_summary.qty_completed,
2852: mth_equip_output_summary.qty_scrap,
2853: mth_equip_output_summary.qty_rejected,
2854: mth_equip_output_summary.qty_rework,
2855: mth_equip_output_summary.qty_good,
2856: mth_equip_output_summary.qty_output,
2857: mth_equip_output_summary.system_fk_key,
2858: mth_equip_output_summary.creation_date,

Line 2855: mth_equip_output_summary.qty_good,

2851: mth_equip_output_summary.qty_completed,
2852: mth_equip_output_summary.qty_scrap,
2853: mth_equip_output_summary.qty_rejected,
2854: mth_equip_output_summary.qty_rework,
2855: mth_equip_output_summary.qty_good,
2856: mth_equip_output_summary.qty_output,
2857: mth_equip_output_summary.system_fk_key,
2858: mth_equip_output_summary.creation_date,
2859: mth_equip_output_summary.last_update_date,

Line 2856: mth_equip_output_summary.qty_output,

2852: mth_equip_output_summary.qty_scrap,
2853: mth_equip_output_summary.qty_rejected,
2854: mth_equip_output_summary.qty_rework,
2855: mth_equip_output_summary.qty_good,
2856: mth_equip_output_summary.qty_output,
2857: mth_equip_output_summary.system_fk_key,
2858: mth_equip_output_summary.creation_date,
2859: mth_equip_output_summary.last_update_date,
2860: mth_equip_output_summary.creation_system_id,

Line 2857: mth_equip_output_summary.system_fk_key,

2853: mth_equip_output_summary.qty_rejected,
2854: mth_equip_output_summary.qty_rework,
2855: mth_equip_output_summary.qty_good,
2856: mth_equip_output_summary.qty_output,
2857: mth_equip_output_summary.system_fk_key,
2858: mth_equip_output_summary.creation_date,
2859: mth_equip_output_summary.last_update_date,
2860: mth_equip_output_summary.creation_system_id,
2861: mth_equip_output_summary.last_update_system_id,

Line 2858: mth_equip_output_summary.creation_date,

2854: mth_equip_output_summary.qty_rework,
2855: mth_equip_output_summary.qty_good,
2856: mth_equip_output_summary.qty_output,
2857: mth_equip_output_summary.system_fk_key,
2858: mth_equip_output_summary.creation_date,
2859: mth_equip_output_summary.last_update_date,
2860: mth_equip_output_summary.creation_system_id,
2861: mth_equip_output_summary.last_update_system_id,
2862: mth_equip_output_summary.last_update_login,

Line 2859: mth_equip_output_summary.last_update_date,

2855: mth_equip_output_summary.qty_good,
2856: mth_equip_output_summary.qty_output,
2857: mth_equip_output_summary.system_fk_key,
2858: mth_equip_output_summary.creation_date,
2859: mth_equip_output_summary.last_update_date,
2860: mth_equip_output_summary.creation_system_id,
2861: mth_equip_output_summary.last_update_system_id,
2862: mth_equip_output_summary.last_update_login,
2863: mth_equip_output_summary.last_updated_by,

Line 2860: mth_equip_output_summary.creation_system_id,

2856: mth_equip_output_summary.qty_output,
2857: mth_equip_output_summary.system_fk_key,
2858: mth_equip_output_summary.creation_date,
2859: mth_equip_output_summary.last_update_date,
2860: mth_equip_output_summary.creation_system_id,
2861: mth_equip_output_summary.last_update_system_id,
2862: mth_equip_output_summary.last_update_login,
2863: mth_equip_output_summary.last_updated_by,
2864: mth_equip_output_summary.recipe_num,

Line 2861: mth_equip_output_summary.last_update_system_id,

2857: mth_equip_output_summary.system_fk_key,
2858: mth_equip_output_summary.creation_date,
2859: mth_equip_output_summary.last_update_date,
2860: mth_equip_output_summary.creation_system_id,
2861: mth_equip_output_summary.last_update_system_id,
2862: mth_equip_output_summary.last_update_login,
2863: mth_equip_output_summary.last_updated_by,
2864: mth_equip_output_summary.recipe_num,
2865: mth_equip_output_summary.recipe_version,

Line 2862: mth_equip_output_summary.last_update_login,

2858: mth_equip_output_summary.creation_date,
2859: mth_equip_output_summary.last_update_date,
2860: mth_equip_output_summary.creation_system_id,
2861: mth_equip_output_summary.last_update_system_id,
2862: mth_equip_output_summary.last_update_login,
2863: mth_equip_output_summary.last_updated_by,
2864: mth_equip_output_summary.recipe_num,
2865: mth_equip_output_summary.recipe_version,
2866: mth_equip_output_summary.segment_fk_key,

Line 2863: mth_equip_output_summary.last_updated_by,

2859: mth_equip_output_summary.last_update_date,
2860: mth_equip_output_summary.creation_system_id,
2861: mth_equip_output_summary.last_update_system_id,
2862: mth_equip_output_summary.last_update_login,
2863: mth_equip_output_summary.last_updated_by,
2864: mth_equip_output_summary.recipe_num,
2865: mth_equip_output_summary.recipe_version,
2866: mth_equip_output_summary.segment_fk_key,
2867: mth_equip_output_summary.standard_rate_1,

Line 2864: mth_equip_output_summary.recipe_num,

2860: mth_equip_output_summary.creation_system_id,
2861: mth_equip_output_summary.last_update_system_id,
2862: mth_equip_output_summary.last_update_login,
2863: mth_equip_output_summary.last_updated_by,
2864: mth_equip_output_summary.recipe_num,
2865: mth_equip_output_summary.recipe_version,
2866: mth_equip_output_summary.segment_fk_key,
2867: mth_equip_output_summary.standard_rate_1,
2868: mth_equip_output_summary.item_cost,

Line 2865: mth_equip_output_summary.recipe_version,

2861: mth_equip_output_summary.last_update_system_id,
2862: mth_equip_output_summary.last_update_login,
2863: mth_equip_output_summary.last_updated_by,
2864: mth_equip_output_summary.recipe_num,
2865: mth_equip_output_summary.recipe_version,
2866: mth_equip_output_summary.segment_fk_key,
2867: mth_equip_output_summary.standard_rate_1,
2868: mth_equip_output_summary.item_cost,
2869: mth_equip_output_summary.resource_fk_key,

Line 2866: mth_equip_output_summary.segment_fk_key,

2862: mth_equip_output_summary.last_update_login,
2863: mth_equip_output_summary.last_updated_by,
2864: mth_equip_output_summary.recipe_num,
2865: mth_equip_output_summary.recipe_version,
2866: mth_equip_output_summary.segment_fk_key,
2867: mth_equip_output_summary.standard_rate_1,
2868: mth_equip_output_summary.item_cost,
2869: mth_equip_output_summary.resource_fk_key,
2870: mth_equip_output_summary.resource_cost)

Line 2867: mth_equip_output_summary.standard_rate_1,

2863: mth_equip_output_summary.last_updated_by,
2864: mth_equip_output_summary.recipe_num,
2865: mth_equip_output_summary.recipe_version,
2866: mth_equip_output_summary.segment_fk_key,
2867: mth_equip_output_summary.standard_rate_1,
2868: mth_equip_output_summary.item_cost,
2869: mth_equip_output_summary.resource_fk_key,
2870: mth_equip_output_summary.resource_cost)
2871: VALUES

Line 2868: mth_equip_output_summary.item_cost,

2864: mth_equip_output_summary.recipe_num,
2865: mth_equip_output_summary.recipe_version,
2866: mth_equip_output_summary.segment_fk_key,
2867: mth_equip_output_summary.standard_rate_1,
2868: mth_equip_output_summary.item_cost,
2869: mth_equip_output_summary.resource_fk_key,
2870: mth_equip_output_summary.resource_cost)
2871: VALUES
2872: (subquery.sq_equipment_fk_key,

Line 2869: mth_equip_output_summary.resource_fk_key,

2865: mth_equip_output_summary.recipe_version,
2866: mth_equip_output_summary.segment_fk_key,
2867: mth_equip_output_summary.standard_rate_1,
2868: mth_equip_output_summary.item_cost,
2869: mth_equip_output_summary.resource_fk_key,
2870: mth_equip_output_summary.resource_cost)
2871: VALUES
2872: (subquery.sq_equipment_fk_key,
2873: subquery.sq_item_fk_key,

Line 2870: mth_equip_output_summary.resource_cost)

2866: mth_equip_output_summary.segment_fk_key,
2867: mth_equip_output_summary.standard_rate_1,
2868: mth_equip_output_summary.item_cost,
2869: mth_equip_output_summary.resource_fk_key,
2870: mth_equip_output_summary.resource_cost)
2871: VALUES
2872: (subquery.sq_equipment_fk_key,
2873: subquery.sq_item_fk_key,
2874: subquery.sq_workorder_fk_key,

Line 2899: mth_util_pkg.log_msg('Rows merged in MTH_EQUIP_OUTPUT_SUMMARY : '||SQL%ROWCOUNT,mth_util_pkg.G_DBG_ROW_CNT);

2895: subquery.sq_level9_level_key,
2896: subquery.sq_resource_cost);
2897:
2898: -- Call the logging API to log the number of rows merged
2899: mth_util_pkg.log_msg('Rows merged in MTH_EQUIP_OUTPUT_SUMMARY : '||SQL%ROWCOUNT,mth_util_pkg.G_DBG_ROW_CNT);
2900:
2901:
2902: -- Call mth_run_log_pre_load
2903: mth_util_pkg.mth_run_log_post_load('MTH_EQUIP_OUTPUT_SUMMARY',v_ua_val);

Line 2903: mth_util_pkg.mth_run_log_post_load('MTH_EQUIP_OUTPUT_SUMMARY',v_ua_val);

2899: mth_util_pkg.log_msg('Rows merged in MTH_EQUIP_OUTPUT_SUMMARY : '||SQL%ROWCOUNT,mth_util_pkg.G_DBG_ROW_CNT);
2900:
2901:
2902: -- Call mth_run_log_pre_load
2903: mth_util_pkg.mth_run_log_post_load('MTH_EQUIP_OUTPUT_SUMMARY',v_ua_val);
2904: mth_util_pkg.log_msg('PROCESS_OUTPUT_SMMRY_INCR end', mth_util_pkg.G_DBG_PROC_FUN_END);
2905:
2906: EXCEPTION
2907: WHEN OTHERS THEN

Line 3014: mth_util_pkg.mth_run_log_pre_load('MTH_EQUIP_OUTPUT_SUMMARY',v_ua_val,'INITIAL',NULL,0,v_log_date);

3010: v_log_date := sysdate;
3011: v_ua_val := MTH_UTIL_PKG.MTH_UA_GET_VAL;
3012:
3013: -- Call mth_run_log_pre_load
3014: mth_util_pkg.mth_run_log_pre_load('MTH_EQUIP_OUTPUT_SUMMARY',v_ua_val,'INITIAL',NULL,0,v_log_date);
3015:
3016: -- Call delete output summary to delete all data from MTH_EQUIP_OUTPUT_SUMMARY table as well update status summary table
3017: -- for particular hour fk keys that contains the recalculation from and to dates
3018: IF (p_recalc_plant_key IS NULL ) THEN

Line 3016: -- Call delete output summary to delete all data from MTH_EQUIP_OUTPUT_SUMMARY table as well update status summary table

3012:
3013: -- Call mth_run_log_pre_load
3014: mth_util_pkg.mth_run_log_pre_load('MTH_EQUIP_OUTPUT_SUMMARY',v_ua_val,'INITIAL',NULL,0,v_log_date);
3015:
3016: -- Call delete output summary to delete all data from MTH_EQUIP_OUTPUT_SUMMARY table as well update status summary table
3017: -- for particular hour fk keys that contains the recalculation from and to dates
3018: IF (p_recalc_plant_key IS NULL ) THEN
3019: UPDATE MTH_EQUIP_STATUS_SUMMARY
3020: SET wo_item_count = null,

Line 3045: FROM MTH_EQUIP_OUTPUT_SUMMARY

3041: -- Call the logging API to log the number of rows inserted
3042: mth_util_pkg.log_msg('Rows deleted from MTH_EQUIP_STATUS_SUMMARY : '||SQL%ROWCOUNT,mth_util_pkg.G_DBG_ROW_CNT);
3043: IF (p_recalc_plant_key IS NULL ) THEN
3044: DELETE
3045: FROM MTH_EQUIP_OUTPUT_SUMMARY
3046: WHERE hour_fk_key IN (SELECT hour_pk_key
3047: FROM mth_hour_d
3048: WHERE from_time >= p_n_recalc_from_date
3049: AND to_time <= p_n_recalc_to_date)

Line 3053: FROM MTH_EQUIP_OUTPUT_SUMMARY

3049: AND to_time <= p_n_recalc_to_date)
3050: AND equipment_fk_key = nvl(p_recalc_equip_key,equipment_fk_key);
3051: ELSE
3052: DELETE
3053: FROM MTH_EQUIP_OUTPUT_SUMMARY
3054: WHERE hour_fk_key IN (SELECT hour_pk_key
3055: FROM mth_hour_d
3056: WHERE from_time >= p_n_recalc_from_date
3057: AND to_time <= p_n_recalc_to_date)

Line 3065: mth_util_pkg.log_msg('Rows deleted from MTH_EQUIP_OUTPUT_SUMMARY : '||SQL%ROWCOUNT,mth_util_pkg.G_DBG_ROW_CNT);

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
3065: mth_util_pkg.log_msg('Rows deleted from MTH_EQUIP_OUTPUT_SUMMARY : '||SQL%ROWCOUNT,mth_util_pkg.G_DBG_ROW_CNT);
3066:
3067: -- Process data from output to be inserted to output summary
3068: INSERT
3069: INTO

Line 3070: MTH_EQUIP_OUTPUT_SUMMARY( EQUIPMENT_FK_KEY,

3066:
3067: -- Process data from output to be inserted to output summary
3068: INSERT
3069: INTO
3070: MTH_EQUIP_OUTPUT_SUMMARY( EQUIPMENT_FK_KEY,
3071: ITEM_FK_KEY,
3072: WORKORDER_FK_KEY,
3073: SHIFT_WORKDAY_FK_KEY,
3074: HOUR_FK_KEY,

Line 3155: mth_util_pkg.log_msg('Rows inserted in MTH_EQUIP_OUTPUT_SUMMARY : '||SQL%ROWCOUNT,mth_util_pkg.G_DBG_ROW_CNT);

3151: meo.segment_fk_key,
3152: meo.hour_fk_key );
3153:
3154: -- Call the logging API to log the number of rows inserted
3155: mth_util_pkg.log_msg('Rows inserted in MTH_EQUIP_OUTPUT_SUMMARY : '||SQL%ROWCOUNT,mth_util_pkg.G_DBG_ROW_CNT);
3156:
3157: UPDATE
3158: MTH_EQUIP_STATUS_SUMMARY mes
3159: SET (mes.WO_ITEM_COUNT,mes.REQUIRED_HOURS,

Line 3181: FROM MTH_EQUIP_OUTPUT_SUMMARY meos

3177: v_log_date last_update_date,
3178: v_ua_val last_update_system_id,
3179: v_ua_val last_update_login,
3180: v_ua_val last_updated_by
3181: FROM MTH_EQUIP_OUTPUT_SUMMARY meos
3182: WHERE meos.standard_rate_1 is NOT NULL
3183: AND meos.standard_rate_1 <> 0
3184: AND meos.hour_fk_key IN (SELECT hour_pk_key
3185: FROM mth_hour_d

Line 3215: FROM MTH_EQUIP_OUTPUT_SUMMARY meos

3211: v_log_date last_update_date,
3212: v_ua_val last_update_system_id,
3213: v_ua_val last_update_login,
3214: v_ua_val last_updated_by
3215: FROM MTH_EQUIP_OUTPUT_SUMMARY meos
3216: WHERE meos.standard_rate_1 is NOT NULL
3217: AND meos.standard_rate_1 <> 0
3218: AND meos.hour_fk_key IN (SELECT hour_pk_key
3219: FROM mth_hour_d

Line 3236: mth_util_pkg.mth_run_log_post_load('MTH_EQUIP_OUTPUT_SUMMARY',v_ua_val);

3232:
3233: -- Call the logging API to log the number of rows updated
3234: mth_util_pkg.log_msg('Rows updated in MTH_EQUIP_STATUS_SUMMARY : '||SQL%ROWCOUNT,mth_util_pkg.G_DBG_ROW_CNT);
3235: -- Call mth_run_log_pre_load
3236: mth_util_pkg.mth_run_log_post_load('MTH_EQUIP_OUTPUT_SUMMARY',v_ua_val);
3237: mth_util_pkg.log_msg('PROCESS_OUTPUT_SMMRY_RECAL end', mth_util_pkg.G_DBG_PROC_FUN_END);
3238:
3239: EXCEPTION
3240: WHEN NULL_DATES THEN