DBA Data[Home] [Help]

APPS.MSD_DEM_CTO dependencies on MSD_DEM_CTO_BOM

Line 890: /* Truncate the table MSD_DEM_CTO_BOM */

886: END IF;
887:
888: /* CTO Performance Fix - Store the Model Bom Components Information in a table */
889:
890: /* Truncate the table MSD_DEM_CTO_BOM */
891: msd_dem_common_utilities.log_debug ('Truncate table MSD_DEM_CTO_BOM...' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
892: msd_dem_query_utilities.truncate_table (errbuf, retcode, 'MSD_DEM_CTO_BOM', 2);
893: IF (retcode = -1)
894: THEN

Line 891: msd_dem_common_utilities.log_debug ('Truncate table MSD_DEM_CTO_BOM...' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

887:
888: /* CTO Performance Fix - Store the Model Bom Components Information in a table */
889:
890: /* Truncate the table MSD_DEM_CTO_BOM */
891: msd_dem_common_utilities.log_debug ('Truncate table MSD_DEM_CTO_BOM...' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
892: msd_dem_query_utilities.truncate_table (errbuf, retcode, 'MSD_DEM_CTO_BOM', 2);
893: IF (retcode = -1)
894: THEN
895:

Line 892: msd_dem_query_utilities.truncate_table (errbuf, retcode, 'MSD_DEM_CTO_BOM', 2);

888: /* CTO Performance Fix - Store the Model Bom Components Information in a table */
889:
890: /* Truncate the table MSD_DEM_CTO_BOM */
891: msd_dem_common_utilities.log_debug ('Truncate table MSD_DEM_CTO_BOM...' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
892: msd_dem_query_utilities.truncate_table (errbuf, retcode, 'MSD_DEM_CTO_BOM', 2);
893: IF (retcode = -1)
894: THEN
895:
896: retcode := -1;

Line 899: msd_dem_common_utilities.log_message ('Error in call to msd_dem_query_utilities.truncate_table for truncating MSD_DEM_CTO_BOM');

895:
896: retcode := -1;
897: errbuf := substr(SQLERRM,1,150);
898: msd_dem_common_utilities.log_message ('Error(3): msd_dem_cto.collect_model_bom_components - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
899: msd_dem_common_utilities.log_message ('Error in call to msd_dem_query_utilities.truncate_table for truncating MSD_DEM_CTO_BOM');
900: RETURN;
901:
902: END IF;
903:

Line 913: msd_dem_common_utilities.log_debug ('Populating table MSD_DEM_CTO_BOM');

909: END IF;
910:
911:
912: /* Populate the final bom table */
913: msd_dem_common_utilities.log_debug ('Populating table MSD_DEM_CTO_BOM');
914: msd_dem_common_utilities.log_debug ('Query Start Time - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
915: x_num_rows := 0;
916:
917: -- Bug#13716090 added new columns top_ato_model_id, ato_forecast_control

Line 918: INSERT /*+ APPEND NOLOGGING */ INTO MSD_DEM_CTO_BOM

914: msd_dem_common_utilities.log_debug ('Query Start Time - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
915: x_num_rows := 0;
916:
917: -- Bug#13716090 added new columns top_ato_model_id, ato_forecast_control
918: INSERT /*+ APPEND NOLOGGING */ INTO MSD_DEM_CTO_BOM
919: (CTO_CODE, CTO_CHILD_CODE, CTO_PARENT_CODE, BASE_MODEL_CODE, PARENT_ITEM_CODE, OPTION_CODE, ORG_CODE,
920: EFFECTIVITY_DATE, DISABLE_DATE, PLNG_PCT_EXISTING, CTO_TYPE,
921: BASE_MODEL_ID, TOP_ATO_MODEL_ID, PARENT_ITEM_ID, OPTION_ID,
922: BASE_MODEL_SR_ID, PARENT_ITEM_SR_ID, OPTION_SR_ID,

Line 942: x_sql := 'MERGE into MSD_DEM_CTO_BOM a ' ||

938: msd_dem_common_utilities.log_debug('Query End Time - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
939:
940: -- Bug#12315455
941: -- Retain population from date for members already in demantra
942: x_sql := 'MERGE into MSD_DEM_CTO_BOM a ' ||
943: ' using ( ' ||
944: ' select mdcb.cto_code, tecd.from_date ' ||
945: ' from MSD_DEM_CTO_BOM mdcb, '||x_dem_schema|| '.t_ep_cto tec, ' ||x_dem_schema|| '.t_ep_cto_dates tecd ' ||
946: ' where tec.t_ep_cto_code = mdcb.cto_code ' ||

Line 945: ' from MSD_DEM_CTO_BOM mdcb, '||x_dem_schema|| '.t_ep_cto tec, ' ||x_dem_schema|| '.t_ep_cto_dates tecd ' ||

941: -- Retain population from date for members already in demantra
942: x_sql := 'MERGE into MSD_DEM_CTO_BOM a ' ||
943: ' using ( ' ||
944: ' select mdcb.cto_code, tecd.from_date ' ||
945: ' from MSD_DEM_CTO_BOM mdcb, '||x_dem_schema|| '.t_ep_cto tec, ' ||x_dem_schema|| '.t_ep_cto_dates tecd ' ||
946: ' where tec.t_ep_cto_code = mdcb.cto_code ' ||
947: ' and tecd.t_ep_cto_id = tec.t_ep_cto_id ' ||
948: ' and tecd.from_date < mdcb.cto_start_date ) b '||
949: ' on ( ' ||

Line 954: msd_dem_common_utilities.log_debug ('Updating MSD_DEM_CTO_BOM to retain effective from date for members in demantra');

950: ' a.cto_code = b.cto_code ) ' ||
951: ' when matched then ' ||
952: ' update set ' ||
953: ' a.cto_start_date = b.from_date';
954: msd_dem_common_utilities.log_debug ('Updating MSD_DEM_CTO_BOM to retain effective from date for members in demantra');
955: msd_dem_common_utilities.log_debug (x_sql);
956: msd_dem_common_utilities.log_debug ('Query Start Time - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
957: x_num_rows := 0;
958: execute immediate x_sql;

Line 964: /* Analyze the table MSD_DEM_CTO_BOM */

960: msd_dem_common_utilities.log_debug ('Number of rows merged - ' || to_char(x_num_rows));
961: COMMIT;
962: msd_dem_common_utilities.log_debug('Query End Time - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
963:
964: /* Analyze the table MSD_DEM_CTO_BOM */
965: msd_dem_common_utilities.log_debug ('Analyzing table MSD_DEM_CTO_BOM');
966: msd_dem_collect_history_data.analyze_table (errbuf, retcode, 'MSD_DEM_CTO_BOM');
967:
968: msd_dem_common_utilities.log_debug ('Exiting: msd_dem_cto.collect_model_bom_components - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

Line 965: msd_dem_common_utilities.log_debug ('Analyzing table MSD_DEM_CTO_BOM');

961: COMMIT;
962: msd_dem_common_utilities.log_debug('Query End Time - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
963:
964: /* Analyze the table MSD_DEM_CTO_BOM */
965: msd_dem_common_utilities.log_debug ('Analyzing table MSD_DEM_CTO_BOM');
966: msd_dem_collect_history_data.analyze_table (errbuf, retcode, 'MSD_DEM_CTO_BOM');
967:
968: msd_dem_common_utilities.log_debug ('Exiting: msd_dem_cto.collect_model_bom_components - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
969:

Line 966: msd_dem_collect_history_data.analyze_table (errbuf, retcode, 'MSD_DEM_CTO_BOM');

962: msd_dem_common_utilities.log_debug('Query End Time - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
963:
964: /* Analyze the table MSD_DEM_CTO_BOM */
965: msd_dem_common_utilities.log_debug ('Analyzing table MSD_DEM_CTO_BOM');
966: msd_dem_collect_history_data.analyze_table (errbuf, retcode, 'MSD_DEM_CTO_BOM');
967:
968: msd_dem_common_utilities.log_debug ('Exiting: msd_dem_cto.collect_model_bom_components - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
969:
970: retcode := 0;