DBA Data[Home] [Help]

APPS.MSD_DEM_UPLOAD_FORECAST dependencies on MSC_DMD_SCN_METRICS

Line 1634: DELETE FROM MSC_DMD_SCN_METRICS

1630: IF (p_for_spf = 1)
1631: THEN
1632:
1633: /* Delete all data in the metrics table for the export data profile */
1634: DELETE FROM MSC_DMD_SCN_METRICS
1635: WHERE plan_id = -1
1636: AND scenario_id = x_scenario_id;
1637:
1638: COMMIT;

Line 1641: INSERT INTO MSC_DMD_SCN_METRICS NOLOGGING (

1637:
1638: COMMIT;
1639:
1640: /* Aggregate metrics data from denorm and insert into metrics table */
1641: INSERT INTO MSC_DMD_SCN_METRICS NOLOGGING (
1642: PLAN_ID, SCENARIO_ID, INVENTORY_ITEM_ID, ORGANIZATION_ID, SR_INSTANCE_ID,
1643: MAPE_IN_SAMPLE, MAPE_OUT_SAMPLE, FORECAST_VOLATILITY, AVG_DEMAND,
1644: CREATED_BY, CREATION_DATE, LAST_UPDATE_DATE, LAST_UPDATED_BY, LAST_UPDATE_LOGIN )
1645: SELECT

Line 1660: x_msc_schema_name || '.MSC_DMD_SCN_METRICS');

1656: x_boolean := fnd_installation.get_app_info ('MSC', x_dummy1, x_dummy2, x_msc_schema_name);
1657: msd_dem_collect_history_data.analyze_table (
1658: x_errbuf,
1659: x_retcode,
1660: x_msc_schema_name || '.MSC_DMD_SCN_METRICS');
1661:
1662: END IF;
1663:
1664: x_small_sql := ' BEGIN ' || x_schema || '.dl_log_status(''' || VS_MSG_UPLOAD_FCST || ''' , ''' ||

Line 3346: * This procedure will load data into MSC_DMD_SCN_METRICS from

3342:
3343: END UPLOAD_CTO_FCST_WITH_APP_ID;
3344:
3345: /*
3346: * This procedure will load data into MSC_DMD_SCN_METRICS from
3347: * demantra's data profile - SPF Upload Metrics's view.
3348: * Arguments -
3349: * 1. SPF Upload Metrics data profile appl id
3350: * 2. SPF Upload Final Forecast data profile appl id

Line 3354: * the scenario id for loading data/metrics into MSC_DMD_SCN_METRICS

3350: * 2. SPF Upload Final Forecast data profile appl id
3351: * Fetches SPF Upload Metrics and SPF Upload Final Forecast
3352: * export data profile info.
3353: * Uses the 'SPF Upload Final Forecast' export profile id as
3354: * the scenario id for loading data/metrics into MSC_DMD_SCN_METRICS
3355: * Data is deleted first in the table against the scenario_id
3356: * then re-loaded with the new data.
3357: * Info about the loading of the data is logged in integ_status table.
3358: */

Line 3542: x_insert_clause := ' INSERT /*+ APPEND */ INTO MSC_DMD_SCN_METRICS nologging ( ' ||

3538: ' AND msi.item_name = exp.LEVEL1 ' ||
3539: ' GROUP BY msi.inventory_item_id, msi.organization_id, msi.sr_instance_id ) METRICS_TB )' ;
3540:
3541:
3542: x_insert_clause := ' INSERT /*+ APPEND */ INTO MSC_DMD_SCN_METRICS nologging ( ' ||
3543: ' PLAN_ID, ' ||
3544: ' SCENARIO_ID, ' ||
3545: ' INVENTORY_ITEM_ID, ' ||
3546: ' ORGANIZATION_ID, ' ||

Line 3561: DELETE FROM MSC_DMD_SCN_METRICS

3557:
3558: x_large_sql := x_insert_clause || x_select_clause || x_from_clause || x_where_clause;
3559:
3560: /* Delete all data in the denorm for the export data profile */
3561: DELETE FROM MSC_DMD_SCN_METRICS
3562: WHERE plan_id = -1
3563: AND scenario_id = x_scenario_id;
3564:
3565: COMMIT;

Line 3567: /* Insert metrics into MSC_DMD_SCN_METRICS table */

3563: AND scenario_id = x_scenario_id;
3564:
3565: COMMIT;
3566:
3567: /* Insert metrics into MSC_DMD_SCN_METRICS table */
3568: EXECUTE IMMEDIATE x_large_sql;
3569: x_num_rows := SQL%ROWCOUNT;
3570:
3571:

Line 3601: var_msc_schema_name || '.MSC_DMD_SCN_METRICS');

3597: var_boolean := fnd_installation.get_app_info ('MSC', var_dummy1, var_dummy2, var_msc_schema_name);
3598: msd_dem_collect_history_data.analyze_table (
3599: x_errbuf,
3600: x_retcode,
3601: var_msc_schema_name || '.MSC_DMD_SCN_METRICS');
3602:
3603: /* Alter session to demantra schema */
3604: x_small_sql := 'alter session set current_schema = ' || x_schema;
3605: EXECUTE IMMEDIATE x_small_sql;

Line 3625: * msc_dmd_scn_metrics (mape_in_sample,mape_out_sample,forecast_volatility,

3621: /*
3622: * This procedure will identify the item/org tuples that have changed
3623: * after the last upload (full or incremental) was done,
3624: * then updates msd_dp_scn_entries_denorm (quantity column) and
3625: * msc_dmd_scn_metrics (mape_in_sample,mape_out_sample,forecast_volatility,
3626: * avg_demand columns) tables with new values in the 5 series
3627: * (SPF Final Forecast, SPF Forecast MAPE (In Sample), SPF Forecast MAPE (Out of Sample),
3628: * SPF Forecast Volatility, SPF Average Demand)
3629: * Arguments -

Line 4006: /* BULK update 4 series(metrics) columns of msc_dmd_scn_metrics table */

4002: EXECUTE IMMEDIATE x_sql BULK COLLECT INTO metrics_table;
4003:
4004: -- bug#11774264 -- 10g does not allow referencing fields of associative arrays within FORALL
4005: -- so using normal FOR loop instead (this will definitely have impact on performance)
4006: /* BULK update 4 series(metrics) columns of msc_dmd_scn_metrics table */
4007: /*FORALL i IN metrics_table.first..metrics_table.last
4008: UPDATE msc_dmd_scn_metrics
4009: SET
4010: mape_in_sample = metrics_table(i).metrics_mape,

Line 4008: UPDATE msc_dmd_scn_metrics

4004: -- bug#11774264 -- 10g does not allow referencing fields of associative arrays within FORALL
4005: -- so using normal FOR loop instead (this will definitely have impact on performance)
4006: /* BULK update 4 series(metrics) columns of msc_dmd_scn_metrics table */
4007: /*FORALL i IN metrics_table.first..metrics_table.last
4008: UPDATE msc_dmd_scn_metrics
4009: SET
4010: mape_in_sample = metrics_table(i).metrics_mape,
4011: mape_out_sample = metrics_table(i).acry_mape_spf_outsamp ,
4012: forecast_volatility = metrics_table(i).spf_fore_vol ,

Line 4026: UPDATE msc_dmd_scn_metrics

4022: AND scenario_id = x_ffcast_profile_id + C_SCENARIO_ID_OFFSET ;*/
4023:
4024: FOR i IN metrics_table.first..metrics_table.last
4025: loop
4026: UPDATE msc_dmd_scn_metrics
4027: SET
4028: mape_in_sample = metrics_table(i).metrics_mape,
4029: mape_out_sample = metrics_table(i).acry_mape_spf_outsamp ,
4030: forecast_volatility = metrics_table(i).spf_fore_vol ,

Line 4108: /* Analyze table MSC_DMD_SCN_METRICS */

4104: EXECUTE IMMEDIATE x_small_sql;
4105:
4106: COMMIT;
4107:
4108: /* Analyze table MSC_DMD_SCN_METRICS */
4109: var_boolean := fnd_installation.get_app_info ('MSC', var_dummy1, var_dummy2, var_msc_schema_name);
4110: msd_dem_collect_history_data.analyze_table (
4111: x_errbuf,
4112: x_retcode,

Line 4113: var_msc_schema_name || '.MSC_DMD_SCN_METRICS');

4109: var_boolean := fnd_installation.get_app_info ('MSC', var_dummy1, var_dummy2, var_msc_schema_name);
4110: msd_dem_collect_history_data.analyze_table (
4111: x_errbuf,
4112: x_retcode,
4113: var_msc_schema_name || '.MSC_DMD_SCN_METRICS');
4114:
4115: /* Analyze table MSD_DP_SCN_ENTRIES_DENORM */
4116: var_boolean := fnd_installation.get_app_info ('MSD', var_dummy1, var_dummy2, var_msd_schema_name);
4117: msd_dem_collect_history_data.analyze_table (

Line 5249: * SPF metrics into MSC_DMD_SCN_METRICS.

5245:
5246:
5247: /*
5248: * This procedure will load SPF forecast data into MSD_DP_SCN_ENTRIES_DENORM and
5249: * SPF metrics into MSC_DMD_SCN_METRICS.
5250: * Arguments -
5251: * 1. SPF Upload Forecast and Metrics data profile appl id
5252: * Process -
5253: * a. First forecast and metrics data is loaded to MSD_DP_SCN_ENTRIES_DENORM

Line 5255: * MSC_DMD_SCN_METRICS

5251: * 1. SPF Upload Forecast and Metrics data profile appl id
5252: * Process -
5253: * a. First forecast and metrics data is loaded to MSD_DP_SCN_ENTRIES_DENORM
5254: * b. Then aggregated (time independent) metrics data is copied over to
5255: * MSC_DMD_SCN_METRICS
5256: *
5257: * Note - This way the Demantra export view is queries only once and hence
5258: * improves the total run time.
5259: *