DBA Data[Home] [Help]

APPS.MSD_DEM_COLLECT_HISTORY_DATA dependencies on MSD_DEM_COLLECT_HISTORY_DATA

Line 1: PACKAGE BODY MSD_DEM_COLLECT_HISTORY_DATA AS

1: PACKAGE BODY MSD_DEM_COLLECT_HISTORY_DATA AS
2: /* $Header: msddemchdb.pls 120.16.12020000.8 2013/02/12 10:08:08 kkhatri ship $ */
3:
4:
5: /*** CUSTOM DATA TYPES ***/

Line 87: msd_dem_common_utilities.log_message ('Warning(1): msd_dem_collect_history_data.validate_order_types - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

83: OR p_exclude_order_types IS NOT NULL)
84: THEN
85: retcode := 1;
86: errbuf := 'The parameters Include Order Types and Exclude Order Types are ignored, if Collect All Order Types is Yes.';
87: msd_dem_common_utilities.log_message ('Warning(1): msd_dem_collect_history_data.validate_order_types - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
88: msd_dem_common_utilities.log_message (errbuf);
89: END IF;
90:
91: p_order_type_flag := C_ALL;

Line 107: msd_dem_common_utilities.log_message ('Error(2): msd_dem_collect_history_data.validate_order_types - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

103: AND p_exclude_order_types IS NULL)
104: THEN
105: retcode := -1;
106: errbuf := 'Exactly one of the parameters Include Order Types or Exclude Order Types must be specified, when Collect All Order Types is No.';
107: msd_dem_common_utilities.log_message ('Error(2): msd_dem_collect_history_data.validate_order_types - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
108: msd_dem_common_utilities.log_message (errbuf);
109: RETURN -1;
110: ELSIF ( p_include_order_types IS NOT NULL
111: AND p_exclude_order_types IS NOT NULL)

Line 115: msd_dem_common_utilities.log_message ('Error(3): msd_dem_collect_history_data.validate_order_types - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

111: AND p_exclude_order_types IS NOT NULL)
112: THEN
113: retcode := -1;
114: errbuf := 'Only one of the parameters Include Order Types or Exclude Order Types must be specified, when Collect All Order Types is No.';
115: msd_dem_common_utilities.log_message ('Error(3): msd_dem_collect_history_data.validate_order_types - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
116: msd_dem_common_utilities.log_message (errbuf);
117: RETURN -1;
118: ELSIF (p_include_order_types IS NOT NULL)
119: THEN

Line 154: msd_dem_common_utilities.log_message ('Error(1): msd_dem_collect_history_data.validate_order_types - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

150: IF (l_order_type_table.COUNT = 0)
151: THEN
152: retcode := -1;
153: errbuf := 'No order types found in the source';
154: msd_dem_common_utilities.log_message ('Error(1): msd_dem_collect_history_data.validate_order_types - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
155: msd_dem_common_utilities.log_message (errbuf);
156: RETURN -1;
157: END IF;
158:

Line 263: msd_dem_common_utilities.log_message ('Error(4): msd_dem_collect_history_data.validate_order_types - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

259: IF (l_valid_count = 0)
260: THEN
261: retcode := -1;
262: errbuf := 'No valid order types found in user input';
263: msd_dem_common_utilities.log_message ('Error(4): msd_dem_collect_history_data.validate_order_types - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
264: RETURN -1;
265: END IF;
266:
267: IF (l_invalid_count <> 0)

Line 271: msd_dem_common_utilities.log_message ('Warning(1): msd_dem_collect_history_data.validate_order_types - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

267: IF (l_invalid_count <> 0)
268: THEN
269: retcode := 1;
270: errbuf := 'Invalid order types found in user input';
271: msd_dem_common_utilities.log_message ('Warning(1): msd_dem_collect_history_data.validate_order_types - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
272: END IF;
273:
274:
275: p_order_type_flag := l_order_type_flag;

Line 362: msd_dem_common_utilities.log_debug ('Entering: msd_dem_collect_history_data.delete_internal_sales_orders - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

358: ORDER BY created desc;
359:
360: BEGIN
361:
362: msd_dem_common_utilities.log_debug ('Entering: msd_dem_collect_history_data.delete_internal_sales_orders - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
363:
364: x_dest_table := msd_dem_common_utilities.get_lookup_value('MSD_DEM_DM_STAGING_TABLES', 'SALES_STAGING_TABLE');
365:
366: open c_get_dm_schema;

Line 403: msd_dem_common_utilities.log_debug ('Exiting: msd_dem_collect_history_data.delete_internal_sales_orders - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

399: msd_dem_common_utilities.log_message('Demantra not installed. Not deleting Internal Sales Orders.');
400: msd_dem_common_utilities.log_debug('Demantra not installed. Not deleting Internal Sales Orders.');
401: end if;
402:
403: msd_dem_common_utilities.log_debug ('Exiting: msd_dem_collect_history_data.delete_internal_sales_orders - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
404:
405: retcode := 1;
406: return;
407:

Line 413: msd_dem_collect_history_data.delete_internal_sales_orders - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

409: WHEN OTHERS THEN
410: errbuf := substr(SQLERRM,1,150);
411: retcode := -1 ;
412: msd_dem_common_utilities.log_debug ('Exception:
413: msd_dem_collect_history_data.delete_internal_sales_orders - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
414: msd_dem_common_utilities.log_debug (errbuf);
415: RETURN;
416:
417:

Line 491: msd_dem_common_utilities.log_debug ('Entering: msd_dem_collect_history_data.collect_series_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

487:
488:
489: BEGIN
490:
491: msd_dem_common_utilities.log_debug ('Entering: msd_dem_collect_history_data.collect_series_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
492:
493: OPEN c_get_series_info;
494: FETCH c_get_series_info INTO l_identifier, l_STG_SERIES_COL_NAME, l_MSD_SR_ITEM_PK_COL, l_MSD_SOURCE_DATE_COL,l_GMP_SR_ITEM_PK_COL, l_GMP_SOURCE_DATE_COL, l_custom_view_name, l_gmp_custom_view_name,
495: l_source_view_hint,l_source_view_hint2,l_extra_where;

Line 502: msd_dem_common_utilities.log_message ('Error(1): msd_dem_collect_history_data.collect_series_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

498: IF (l_identifier IS NULL)
499: THEN
500: retcode := -1;
501: errbuf := 'Unable to get the query identifier.';
502: msd_dem_common_utilities.log_message ('Error(1): msd_dem_collect_history_data.collect_series_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
503: msd_dem_common_utilities.log_message (errbuf);
504: RETURN;
505: END IF;
506:

Line 660: msd_dem_common_utilities.log_message ('Error(2): msd_dem_collect_history_data.collect_series_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

656: OR x_large_sql IS NULL)
657: THEN
658: retcode := -1;
659: errbuf := 'Unable to get the query.';
660: msd_dem_common_utilities.log_message ('Error(2): msd_dem_collect_history_data.collect_series_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
661: msd_dem_common_utilities.log_message (errbuf);
662: RETURN;
663: END IF;
664:

Line 679: msd_dem_common_utilities.log_message ('Exception(1): msd_dem_collect_history_data.collect_series_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

675: EXCEPTION
676: WHEN OTHERS THEN
677: retcode := -1 ;
678: errbuf := substr(SQLERRM,1,150);
679: msd_dem_common_utilities.log_message ('Exception(1): msd_dem_collect_history_data.collect_series_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
680: msd_dem_common_utilities.log_message (errbuf);
681: msd_dem_common_utilities.log_debug ('Query End Time - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
682: RETURN;
683: END;

Line 785: msd_dem_common_utilities.log_message ('Error(3): msd_dem_collect_history_data.collect_series_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

781: OR x_large_sql IS NULL)
782: THEN
783: retcode := -1;
784: errbuf := 'Unable to get the query.';
785: msd_dem_common_utilities.log_message ('Error(3): msd_dem_collect_history_data.collect_series_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
786: msd_dem_common_utilities.log_message (errbuf);
787: RETURN;
788: END IF;
789:

Line 804: msd_dem_common_utilities.log_message ('Exception(2): msd_dem_collect_history_data.collect_series_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

800: EXCEPTION
801: WHEN OTHERS THEN
802: retcode := -1 ;
803: errbuf := substr(SQLERRM,1,150);
804: msd_dem_common_utilities.log_message ('Exception(2): msd_dem_collect_history_data.collect_series_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
805: msd_dem_common_utilities.log_message (errbuf);
806: msd_dem_common_utilities.log_debug ('Query End Time - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
807: RETURN;
808: END;

Line 815: msd_dem_common_utilities.log_debug ('Exiting: msd_dem_collect_history_data.collect_series_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

811: msd_dem_common_utilities.log_debug ('End collect process sales history - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
812:
813: END IF;
814:
815: msd_dem_common_utilities.log_debug ('Exiting: msd_dem_collect_history_data.collect_series_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
816:
817: EXCEPTION
818: WHEN OTHERS THEN
819: retcode := -1 ;

Line 821: msd_dem_common_utilities.log_message ('Exception(3): msd_dem_collect_history_data.collect_series_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

817: EXCEPTION
818: WHEN OTHERS THEN
819: retcode := -1 ;
820: errbuf := substr(SQLERRM,1,150);
821: msd_dem_common_utilities.log_message ('Exception(3): msd_dem_collect_history_data.collect_series_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
822: msd_dem_common_utilities.log_message (errbuf);
823: RETURN;
824:
825: END COLLECT_SERIES_DATA;

Line 857: msd_dem_common_utilities.log_debug ('Entering msd_dem_collect_history_data.insert_dummy_rows - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

853: x_new_items_present NUMBER := NULL;
854: x_sql VARCHAR2(32000) := NULL;
855: BEGIN
856:
857: msd_dem_common_utilities.log_debug ('Entering msd_dem_collect_history_data.insert_dummy_rows - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
858:
859: /* Check if there are any yet to be processed NPIs */
860: OPEN c_check_new_items;
861: FETCH c_check_new_items INTO x_new_items_present;

Line 879: msd_dem_common_utilities.log_message ('Warning(1): msd_dem_collect_history_data.insert_dummy_rows');

875: IF (x_retcode = -1)
876: THEN
877: retcode := 1;
878: errbuf := 'Unable to get the query for inserting dummy rows for new items into sales staging table';
879: msd_dem_common_utilities.log_message ('Warning(1): msd_dem_collect_history_data.insert_dummy_rows');
880: msd_dem_common_utilities.log_message (errbuf);
881: RETURN;
882: END IF;
883:

Line 903: msd_dem_common_utilities.log_debug ('Exiting msd_dem_collect_history_data.insert_dummy_rows - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

899: COMMIT;
900:
901: END IF;
902:
903: msd_dem_common_utilities.log_debug ('Exiting msd_dem_collect_history_data.insert_dummy_rows - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
904:
905: EXCEPTION
906: WHEN OTHERS THEN
907: retcode := 1 ;

Line 909: msd_dem_common_utilities.log_message ('Exception: msd_dem_collect_history_data.insert_dummy_rows - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

905: EXCEPTION
906: WHEN OTHERS THEN
907: retcode := 1 ;
908: errbuf := substr(SQLERRM,1,150);
909: msd_dem_common_utilities.log_message ('Exception: msd_dem_collect_history_data.insert_dummy_rows - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
910: msd_dem_common_utilities.log_message (errbuf);
911: RETURN;
912: END INSERT_DUMMY_ROWS;
913:

Line 933: msd_dem_common_utilities.log_debug ('Entering msd_dem_collect_history_data.analyze_table - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

929: x_pos NUMBER := NULL;
930:
931: BEGIN
932:
933: msd_dem_common_utilities.log_debug ('Entering msd_dem_collect_history_data.analyze_table - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
934:
935: x_pos := instr( p_table_name, '.', 1, 1);
936:
937: IF (x_pos = 0)

Line 949: msd_dem_common_utilities.log_debug ('Exiting: msd_dem_collect_history_data.analyze_table - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

945:
946: msd_dem_common_utilities.log_message ('Analyzing Table - ' || x_schema_name || '.' || x_table_name);
947: fnd_stats.gather_table_stats(x_schema_name, x_table_name, 10, 4);
948:
949: msd_dem_common_utilities.log_debug ('Exiting: msd_dem_collect_history_data.analyze_table - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
950:
951:
952: EXCEPTION
953: WHEN OTHERS THEN

Line 956: msd_dem_common_utilities.log_message ('Exception: msd_dem_collect_history_data.analyze_table - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

952: EXCEPTION
953: WHEN OTHERS THEN
954: retcode := 1 ;
955: errbuf := substr(SQLERRM,1,150);
956: msd_dem_common_utilities.log_message ('Exception: msd_dem_collect_history_data.analyze_table - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
957: msd_dem_common_utilities.log_message (errbuf);
958: RETURN;
959: END ANALYZE_TABLE;
960:

Line 1047: msd_dem_common_utilities.log_debug ('Entering: msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1043: ORDER BY created desc;
1044:
1045: BEGIN
1046:
1047: msd_dem_common_utilities.log_debug ('Entering: msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1048:
1049: /* Get the db link to the source instance */
1050: msd_dem_common_utilities.get_dblink (
1051: x_errbuf,

Line 1060: msd_dem_common_utilities.log_message ('Error(1): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1056: IF (x_retcode = '-1')
1057: THEN
1058: retcode := -1;
1059: errbuf := x_errbuf;
1060: msd_dem_common_utilities.log_message ('Error(1): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1061: RETURN;
1062: END IF;
1063:
1064: g_collection_method := p_collection_method;

Line 1082: msd_dem_common_utilities.log_message ('Error(2): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1078: AND p_sh_ri_rd = G_NO)
1079: THEN
1080: retcode := -1;
1081: errbuf := 'No series selected for collection';
1082: msd_dem_common_utilities.log_message ('Error(2): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1083: msd_dem_common_utilities.log_message (errbuf);
1084: RETURN;
1085: END IF;
1086:

Line 1096: msd_dem_common_utilities.log_message ('Warning(1): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1092: OR p_collection_window IS NOT NULL))
1093: THEN
1094: x_retcode := 1;
1095: x_errbuf := 'Date Range filters are ignored in ''Refresh'' collections';
1096: msd_dem_common_utilities.log_message ('Warning(1): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1097: msd_dem_common_utilities.log_message (x_errbuf);
1098: END IF;
1099:
1100:

Line 1109: msd_dem_common_utilities.log_message ('Warning(2): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1105: OR p_to_date IS NOT NULL))
1106: THEN
1107: x_retcode := 1;
1108: x_errbuf := 'The ''Date From'' and ''Date To'' fields are ignored if ''Rolling'' date range type is selected.';
1109: msd_dem_common_utilities.log_message ('Warning(2): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1110: msd_dem_common_utilities.log_message (x_errbuf);
1111: END IF;
1112:
1113:

Line 1121: msd_dem_common_utilities.log_message ('Warning(3): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1117: AND p_collection_window IS NOT NULL)
1118: THEN
1119: x_retcode := 1;
1120: x_errbuf := 'The ''History Collection Window'' field is ignored if ''Absolute'' date range type is selected.';
1121: msd_dem_common_utilities.log_message ('Warning(3): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1122: msd_dem_common_utilities.log_message (x_errbuf);
1123: END IF;
1124:
1125:

Line 1133: msd_dem_common_utilities.log_message ('Error(3): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1129: AND p_collection_window IS NULL)
1130: THEN
1131: retcode := -1;
1132: errbuf := 'The ''History Collection Window'' field cannot be NULL, if ''Rolling'' date range type is selected.';
1133: msd_dem_common_utilities.log_message ('Error(3): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1134: msd_dem_common_utilities.log_message (errbuf);
1135: RETURN;
1136: END IF;
1137:

Line 1147: msd_dem_common_utilities.log_message ('Error(4): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1143: OR p_to_date IS NULL))
1144: THEN
1145: retcode := -1;
1146: errbuf := 'The ''Date From'' and ''Date To'' fields cannot be NULL, if ''Absolute'' date range type is selected.';
1147: msd_dem_common_utilities.log_message ('Error(4): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1148: msd_dem_common_utilities.log_message (errbuf);
1149: RETURN;
1150: END IF;
1151:

Line 1167: msd_dem_common_utilities.log_message ('Error(5): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1163: IF (x_retcode1 = -1)
1164: THEN
1165: retcode := -1;
1166: errbuf := 'No valid order types found';
1167: msd_dem_common_utilities.log_message ('Error(5): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1168: msd_dem_common_utilities.log_message (errbuf);
1169: RETURN;
1170: ELSIF (x_invalid_count > 0)
1171: THEN

Line 1174: msd_dem_common_utilities.log_message ('Warning(4): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1170: ELSIF (x_invalid_count > 0)
1171: THEN
1172: x_retcode := 1;
1173: x_errbuf := 'Invalid order types found';
1174: msd_dem_common_utilities.log_message ('Warning(4): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1175: msd_dem_common_utilities.log_message (x_errbuf);
1176: ELSIF (x_retcode1 = 1)
1177: THEN
1178: x_retcode := 1;

Line 1180: msd_dem_common_utilities.log_message ('Warning(5): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1176: ELSIF (x_retcode1 = 1)
1177: THEN
1178: x_retcode := 1;
1179: x_errbuf := x_errbuf1;
1180: msd_dem_common_utilities.log_message ('Warning(5): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1181: END IF;
1182:
1183: msd_dem_common_utilities.log_debug ('End validation of inputs parameters - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1184:

Line 1219: msd_dem_common_utilities.log_message ('Error(6): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1215: IF (x_from_date > x_to_date)
1216: THEN
1217: retcode := -1;
1218: errbuf := 'From Date should not be greater than To Date.';
1219: msd_dem_common_utilities.log_message ('Error(6): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1220: msd_dem_common_utilities.log_message (errbuf);
1221: RETURN;
1222: END IF;
1223:

Line 1230: msd_dem_common_utilities.log_message ('Error(7): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1226: IF (p_collection_window < 0)
1227: THEN
1228: retcode := -1;
1229: errbuf := 'History Collection Window must be a positive number.';
1230: msd_dem_common_utilities.log_message ('Error(7): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1231: msd_dem_common_utilities.log_message (errbuf);
1232: RETURN;
1233: ELSE
1234: x_to_date := trunc(sysdate);

Line 1257: msd_dem_common_utilities.log_message ('Error(8): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1253: IF (x_retcode1 = '-1')
1254: THEN
1255: retcode := -1;
1256: errbuf := x_errbuf1;
1257: msd_dem_common_utilities.log_message ('Error(8): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1258: msd_dem_common_utilities.log_message ('Unable to get instance info.');
1259: RETURN;
1260: END IF;
1261:

Line 1271: msd_dem_common_utilities.log_message ('Error(9): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1267: IF (x_dest_table is NULL)
1268: THEN
1269: retcode := -1;
1270: errbuf := 'Unable to find the sales staging tables.';
1271: msd_dem_common_utilities.log_message ('Error(9): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1272: msd_dem_common_utilities.log_message (errbuf);
1273: RETURN;
1274: END IF;
1275:

Line 1356: msd_dem_common_utilities.log_message ('Error(10): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1352: IF (x_dm_time_bucket IS NULL)
1353: THEN
1354: retcode := -1;
1355: errbuf := 'Unable to get lowest time bucket';
1356: msd_dem_common_utilities.log_message ('Error(10): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1357: msd_dem_common_utilities.log_message (errbuf);
1358: RETURN;
1359: ELSIF (upper(x_dm_time_bucket) = 'DAY')
1360: THEN

Line 1395: msd_dem_common_utilities.log_message ('Error(11): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1391: IF (x_retcode1 = -1)
1392: THEN
1393: retcode := -1;
1394: errbuf := x_errbuf1;
1395: msd_dem_common_utilities.log_message ('Error(11): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1396: msd_dem_common_utilities.log_message ('Error while collecting Booking History - Booked Items - Booked Date');
1397: RETURN;
1398: END IF;
1399: END IF;

Line 1428: msd_dem_common_utilities.log_message ('Error(12): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1424: IF (x_retcode1 = -1)
1425: THEN
1426: retcode := -1;
1427: errbuf := x_errbuf1;
1428: msd_dem_common_utilities.log_message ('Error(12): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1429: msd_dem_common_utilities.log_message ('Error while collecting Booking History - Booked Items - Requested Date');
1430: RETURN;
1431: END IF;
1432: END IF;

Line 1460: msd_dem_common_utilities.log_message ('Error(13): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1456: IF (x_retcode1 = -1)
1457: THEN
1458: retcode := -1;
1459: errbuf := x_errbuf1;
1460: msd_dem_common_utilities.log_message ('Error(13): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1461: msd_dem_common_utilities.log_message ('Error while collecting Booking History - Requested Items - Booked Date');
1462: RETURN;
1463: END IF;
1464: END IF;

Line 1492: msd_dem_common_utilities.log_message ('Error(14): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1488: IF (x_retcode1 = -1)
1489: THEN
1490: retcode := -1;
1491: errbuf := x_errbuf1;
1492: msd_dem_common_utilities.log_message ('Error(14): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1493: msd_dem_common_utilities.log_message ('Error while collecting Booking History - Requested Items - Requested Date');
1494: RETURN;
1495: END IF;
1496: END IF;

Line 1524: msd_dem_common_utilities.log_message ('Error(15): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1520: IF (x_retcode1 = -1)
1521: THEN
1522: retcode := -1;
1523: errbuf := x_errbuf1;
1524: msd_dem_common_utilities.log_message ('Error(15): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1525: msd_dem_common_utilities.log_message ('Error while collecting Shipment History - Shipped Items - Shipped Date');
1526: RETURN;
1527: END IF;
1528: END IF;

Line 1556: msd_dem_common_utilities.log_message ('Error(16): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1552: IF (x_retcode1 = -1)
1553: THEN
1554: retcode := -1;
1555: errbuf := x_errbuf1;
1556: msd_dem_common_utilities.log_message ('Error(16): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1557: msd_dem_common_utilities.log_message ('Error while collecting Shipment History - Shipped Items - Requested Date');
1558: RETURN;
1559: END IF;
1560: END IF;

Line 1588: msd_dem_common_utilities.log_message ('Error(17): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1584: IF (x_retcode1 = -1)
1585: THEN
1586: retcode := -1;
1587: errbuf := x_errbuf1;
1588: msd_dem_common_utilities.log_message ('Error(17): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1589: msd_dem_common_utilities.log_message ('Error while collecting Shipment History - Requested Items - Shipped Date');
1590: RETURN;
1591: END IF;
1592: END IF;

Line 1622: msd_dem_common_utilities.log_message ('Error(18): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1618: IF (x_retcode1 = -1)
1619: THEN
1620: retcode := -1;
1621: errbuf := x_errbuf1;
1622: msd_dem_common_utilities.log_message ('Error(18): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1623: msd_dem_common_utilities.log_message ('Error while collecting Shipment History - Requested Items - Requested Date');
1624: RETURN;
1625: END IF;
1626: END IF;

Line 1641: msd_dem_common_utilities.log_message ('Warning(6): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1637: IF (x_retcode1 = 1)
1638: THEN
1639: retcode := 1;
1640: errbuf := x_errbuf1;
1641: msd_dem_common_utilities.log_message ('Warning(6): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1642: msd_dem_common_utilities.log_message ('Error while inserting dummy rows into the sales staging table for new items. ');
1643: END IF;
1644: msd_dem_common_utilities.log_debug ('End Insert dummy rows for new items into the staging table - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1645:

Line 1658: msd_dem_common_utilities.log_message ('Error(19): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1654: IF (x_retcode1 = -1)
1655: THEN
1656: retcode := -1;
1657: errbuf := x_errbuf1;
1658: msd_dem_common_utilities.log_message ('Error(19): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1659: msd_dem_common_utilities.log_message ('Error while deleting Internal Sales Orders in the same Line of Business');
1660: RETURN;
1661: END IF;
1662:

Line 1678: msd_dem_common_utilities.log_message ('Error(21): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1674: IF (x_retcode1 = -1)
1675: THEN
1676: retcode := -1;
1677: errbuf := x_errbuf1;
1678: msd_dem_common_utilities.log_message ('Error(21): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1679: msd_dem_common_utilities.log_message ('Error in call to msd_spf_collect_history_data.populate_staging_table ');
1680: RETURN;
1681: END IF;
1682:

Line 1704: msd_dem_common_utilities.log_message ('Error(20): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1700: IF (x_retcode1 = -1)
1701: THEN
1702: retcode := -1;
1703: errbuf := x_errbuf1;
1704: msd_dem_common_utilities.log_message ('Error(20): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1705: msd_dem_common_utilities.log_message ('Error in call to custom hook msd_dem_custom_hooks.history_hook ');
1706: RETURN;
1707: END IF;
1708:

Line 1724: msd_dem_common_utilities.log_message ('Warning(7): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1720: IF (x_retcode1 = 1)
1721: THEN
1722: retcode := 1;
1723: errbuf := x_errbuf1;
1724: msd_dem_common_utilities.log_message ('Warning(7): msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1725: msd_dem_common_utilities.log_message ('Error while analyzing sales staging table. ');
1726: END IF;
1727:
1728: /*

Line 1921: msd_dem_common_utilities.log_debug ('Exiting: msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1917: errbuf := substr(SQLERRM,1,150);
1918: msd_dem_common_utilities.log_message ('Warning: can not purge old shipment/booking history data.' );
1919: msd_dem_common_utilities.log_debug ('Warning: can not purge old shipment/booking history data.' );
1920: msd_dem_common_utilities.log_debug (errbuf);
1921: msd_dem_common_utilities.log_debug ('Exiting: msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1922:
1923: RETURN;
1924: End;
1925:

Line 1928: msd_dem_common_utilities.log_debug ('Exiting: msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1924: End;
1925:
1926: retcode := x_retcode;
1927: errbuf := x_errbuf;
1928: msd_dem_common_utilities.log_debug ('Exiting: msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1929:
1930: EXCEPTION
1931: WHEN OTHERS THEN
1932: retcode := -1 ;

Line 1934: msd_dem_common_utilities.log_message ('Exception: msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1930: EXCEPTION
1931: WHEN OTHERS THEN
1932: retcode := -1 ;
1933: errbuf := substr(SQLERRM,1,150);
1934: msd_dem_common_utilities.log_message ('Exception: msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1935: msd_dem_common_utilities.log_message (errbuf);
1936: RETURN;
1937:
1938: END COLLECT_HISTORY_DATA;

Line 1964: msd_dem_common_utilities.log_debug ('Entering: msd_dem_collect_history_data.run_load - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

1960: ret_process_id varchar2(100);
1961:
1962:
1963: BEGIN
1964: msd_dem_common_utilities.log_debug ('Entering: msd_dem_collect_history_data.run_load - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1965:
1966: DEM_SCHEMA := fnd_profile.value('MSD_DEM_SCHEMA');
1967:
1968: IF (p_auto_run_download = G_YES)

Line 2084: msd_dem_common_utilities.log_debug ('Exiting: msd_dem_collect_history_data.run_load - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

2080: msd_dem_common_utilities.log_message ('Auto Run Download - No ');
2081: msd_dem_common_utilities.log_message ('Exiting without launching the download workflow.');
2082: END IF;
2083:
2084: msd_dem_common_utilities.log_debug ('Exiting: msd_dem_collect_history_data.run_load - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
2085:
2086: EXCEPTION
2087: WHEN OTHERS THEN
2088: errbuf := substr(SQLERRM,1,150);

Line 2095: msd_dem_common_utilities.log_message ('Exception: msd_dem_collect_history_data.run_load - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

2091: -- execute immediate l_stmt;
2092: -- l_stmt := 'alter session set current_schema=APPS';
2093: -- execute immediate l_stmt;
2094:
2095: msd_dem_common_utilities.log_message ('Exception: msd_dem_collect_history_data.run_load - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
2096: msd_dem_common_utilities.log_message (errbuf);
2097: RETURN;
2098:
2099: END RUN_LOAD;

Line 2101: END MSD_DEM_COLLECT_HISTORY_DATA;

2097: RETURN;
2098:
2099: END RUN_LOAD;
2100:
2101: END MSD_DEM_COLLECT_HISTORY_DATA;