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.5 2008/04/14 08:24:44 vrepaka noship $ */
3:
4:
5: /*** CUSTOM DATA TYPES ***/

Line 84: 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'));

80: OR p_exclude_order_types IS NOT NULL)
81: THEN
82: retcode := 1;
83: errbuf := 'The parameters Include Order Types and Exclude Order Types are ignored, if Collect All Order Types is Yes.';
84: 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'));
85: msd_dem_common_utilities.log_message (errbuf);
86: END IF;
87:
88: p_order_type_flag := C_ALL;

Line 118: 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'));

114: IF (l_order_type_table.COUNT = 0)
115: THEN
116: retcode := -1;
117: errbuf := 'No order types found in the source';
118: 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'));
119: msd_dem_common_utilities.log_message (errbuf);
120: RETURN -1;
121: END IF;
122:

Line 131: 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'));

127: AND p_exclude_order_types IS NULL)
128: THEN
129: retcode := -1;
130: errbuf := 'Exactly one of the parameters Include Order Types or Exclude Order Types must be specified, when Collect All Order Types is No.';
131: 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'));
132: msd_dem_common_utilities.log_message (errbuf);
133: RETURN -1;
134: ELSIF ( p_include_order_types IS NOT NULL
135: AND p_exclude_order_types IS NOT NULL)

Line 139: 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'));

135: AND p_exclude_order_types IS NOT NULL)
136: THEN
137: retcode := -1;
138: errbuf := 'Only one of the parameters Include Order Types or Exclude Order Types must be specified, when Collect All Order Types is No.';
139: 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'));
140: msd_dem_common_utilities.log_message (errbuf);
141: RETURN -1;
142: ELSIF (p_include_order_types IS NOT NULL)
143: THEN

Line 256: 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'));

252: IF (l_valid_count = 0)
253: THEN
254: retcode := -1;
255: errbuf := 'No valid order types found in user input';
256: 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'));
257: RETURN -1;
258: END IF;
259:
260: IF (l_invalid_count <> 0)

Line 264: 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'));

260: IF (l_invalid_count <> 0)
261: THEN
262: retcode := 1;
263: errbuf := 'Invalid order types found in user input';
264: 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'));
265: END IF;
266:
267: END IF;
268:

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

338: l_gmp_custom_view_name varchar2(100) := NULL;
339:
340: BEGIN
341:
342: msd_dem_common_utilities.log_debug ('Entering: msd_dem_collect_history_data.collect_series_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
343:
344: OPEN c_get_series_info;
345: 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;
346: CLOSE c_get_series_info;

Line 352: 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'));

348: IF (l_identifier IS NULL)
349: THEN
350: retcode := -1;
351: errbuf := 'Unable to get the query identifier.';
352: 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'));
353: msd_dem_common_utilities.log_message (errbuf);
354: RETURN;
355: END IF;
356:

Line 465: 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'));

461: OR x_large_sql IS NULL)
462: THEN
463: retcode := -1;
464: errbuf := 'Unable to get the query.';
465: 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'));
466: msd_dem_common_utilities.log_message (errbuf);
467: RETURN;
468: END IF;
469:

Line 484: 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'));

480: EXCEPTION
481: WHEN OTHERS THEN
482: retcode := -1 ;
483: errbuf := substr(SQLERRM,1,150);
484: 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'));
485: msd_dem_common_utilities.log_message (errbuf);
486: msd_dem_common_utilities.log_debug ('Query End Time - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
487: RETURN;
488: END;

Line 577: 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'));

573: OR x_large_sql IS NULL)
574: THEN
575: retcode := -1;
576: errbuf := 'Unable to get the query.';
577: 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'));
578: msd_dem_common_utilities.log_message (errbuf);
579: RETURN;
580: END IF;
581:

Line 596: 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'));

592: EXCEPTION
593: WHEN OTHERS THEN
594: retcode := -1 ;
595: errbuf := substr(SQLERRM,1,150);
596: 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'));
597: msd_dem_common_utilities.log_message (errbuf);
598: msd_dem_common_utilities.log_debug ('Query End Time - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
599: RETURN;
600: END;

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

603: msd_dem_common_utilities.log_debug ('End collect process sales history - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
604:
605: END IF;
606:
607: msd_dem_common_utilities.log_debug ('Exiting: msd_dem_collect_history_data.collect_series_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
608:
609: EXCEPTION
610: WHEN OTHERS THEN
611: retcode := -1 ;

Line 613: 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'));

609: EXCEPTION
610: WHEN OTHERS THEN
611: retcode := -1 ;
612: errbuf := substr(SQLERRM,1,150);
613: 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'));
614: msd_dem_common_utilities.log_message (errbuf);
615: RETURN;
616:
617: END COLLECT_SERIES_DATA;

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

645: x_new_items_present NUMBER := NULL;
646: x_sql VARCHAR2(32000) := NULL;
647: BEGIN
648:
649: msd_dem_common_utilities.log_debug ('Entering msd_dem_collect_history_data.insert_dummy_rows - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
650:
651: /* Check if there are any yet to be processed NPIs */
652: OPEN c_check_new_items;
653: FETCH c_check_new_items INTO x_new_items_present;

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

667: IF (x_retcode = -1)
668: THEN
669: retcode := 1;
670: errbuf := 'Unable to get the query for inserting dummy rows for new items into sales staging table';
671: msd_dem_common_utilities.log_message ('Warning(1): msd_dem_collect_history_data.insert_dummy_rows');
672: msd_dem_common_utilities.log_message (errbuf);
673: RETURN;
674: END IF;
675:

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

691: COMMIT;
692:
693: END IF;
694:
695: msd_dem_common_utilities.log_debug ('Exiting msd_dem_collect_history_data.insert_dummy_rows - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
696:
697: EXCEPTION
698: WHEN OTHERS THEN
699: retcode := 1 ;

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

697: EXCEPTION
698: WHEN OTHERS THEN
699: retcode := 1 ;
700: errbuf := substr(SQLERRM,1,150);
701: msd_dem_common_utilities.log_message ('Exception: msd_dem_collect_history_data.insert_dummy_rows - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
702: msd_dem_common_utilities.log_message (errbuf);
703: RETURN;
704: END INSERT_DUMMY_ROWS;
705:

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

721: x_pos NUMBER := NULL;
722:
723: BEGIN
724:
725: msd_dem_common_utilities.log_debug ('Entering msd_dem_collect_history_data.analyze_table - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
726:
727: x_pos := instr( p_table_name, '.', 1, 1);
728:
729: IF (x_pos = 0)

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

737:
738: msd_dem_common_utilities.log_message ('Analyzing Table - ' || x_schema_name || '.' || x_table_name);
739: fnd_stats.gather_table_stats(x_schema_name, x_table_name, 10, 4);
740:
741: msd_dem_common_utilities.log_debug ('Exiting: msd_dem_collect_history_data.analyze_table - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
742:
743:
744: EXCEPTION
745: WHEN OTHERS THEN

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

744: EXCEPTION
745: WHEN OTHERS THEN
746: retcode := 1 ;
747: errbuf := substr(SQLERRM,1,150);
748: msd_dem_common_utilities.log_message ('Exception: msd_dem_collect_history_data.analyze_table - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
749: msd_dem_common_utilities.log_message (errbuf);
750: RETURN;
751: END ANALYZE_TABLE;
752:

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

831: ORDER BY created desc;
832:
833: BEGIN
834:
835: msd_dem_common_utilities.log_debug ('Entering: msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
836:
837: /* Get the db link to the source instance */
838: msd_dem_common_utilities.get_dblink (
839: x_errbuf,

Line 848: 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'));

844: IF (x_retcode = '-1')
845: THEN
846: retcode := -1;
847: errbuf := x_errbuf;
848: 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'));
849: RETURN;
850: END IF;
851:
852: g_collection_method := p_collection_method;

Line 870: 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'));

866: AND p_sh_ri_rd = G_NO)
867: THEN
868: retcode := -1;
869: errbuf := 'No series selected for collection';
870: 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'));
871: msd_dem_common_utilities.log_message (errbuf);
872: RETURN;
873: END IF;
874:

Line 884: 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'));

880: OR p_collection_window IS NOT NULL))
881: THEN
882: x_retcode := 1;
883: x_errbuf := 'Date Range filters are ignored in ''Refresh'' collections';
884: 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'));
885: msd_dem_common_utilities.log_message (x_errbuf);
886: END IF;
887:
888:

Line 897: 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'));

893: OR p_to_date IS NOT NULL))
894: THEN
895: x_retcode := 1;
896: x_errbuf := 'The ''Date From'' and ''Date To'' fields are ignored if ''Rolling'' date range type is selected.';
897: 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'));
898: msd_dem_common_utilities.log_message (x_errbuf);
899: END IF;
900:
901:

Line 909: 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'));

905: AND p_collection_window IS NOT NULL)
906: THEN
907: x_retcode := 1;
908: x_errbuf := 'The ''History Collection Window'' field is ignored if ''Absolute'' date range type is selected.';
909: 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'));
910: msd_dem_common_utilities.log_message (x_errbuf);
911: END IF;
912:
913:

Line 921: 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'));

917: AND p_collection_window IS NULL)
918: THEN
919: retcode := -1;
920: errbuf := 'The ''History Collection Window'' field cannot be NULL, if ''Rolling'' date range type is selected.';
921: 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'));
922: msd_dem_common_utilities.log_message (errbuf);
923: RETURN;
924: END IF;
925:

Line 935: 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'));

931: OR p_to_date IS NULL))
932: THEN
933: retcode := -1;
934: errbuf := 'The ''Date From'' and ''Date To'' fields cannot be NULL, if ''Absolute'' date range type is selected.';
935: 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'));
936: msd_dem_common_utilities.log_message (errbuf);
937: RETURN;
938: END IF;
939:

Line 953: 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'));

949: IF (x_retcode1 = -1)
950: THEN
951: retcode := -1;
952: errbuf := 'No valid order types found';
953: 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'));
954: msd_dem_common_utilities.log_message (errbuf);
955: RETURN;
956: ELSIF (x_invalid_count > 0)
957: THEN

Line 960: 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'));

956: ELSIF (x_invalid_count > 0)
957: THEN
958: x_retcode := 1;
959: x_errbuf := 'Invalid order types found';
960: 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'));
961: msd_dem_common_utilities.log_message (x_errbuf);
962: ELSIF (x_retcode1 = 1)
963: THEN
964: x_retcode := 1;

Line 966: 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'));

962: ELSIF (x_retcode1 = 1)
963: THEN
964: x_retcode := 1;
965: x_errbuf := x_errbuf1;
966: 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'));
967: END IF;
968:
969: msd_dem_common_utilities.log_debug ('End validation of inputs parameters - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
970:

Line 1005: 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'));

1001: IF (x_from_date > x_to_date)
1002: THEN
1003: retcode := -1;
1004: errbuf := 'From Date should not be greater than To Date.';
1005: 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'));
1006: msd_dem_common_utilities.log_message (errbuf);
1007: RETURN;
1008: END IF;
1009:

Line 1016: 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'));

1012: IF (p_collection_window < 0)
1013: THEN
1014: retcode := -1;
1015: errbuf := 'History Collection Window must be a positive number.';
1016: 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'));
1017: msd_dem_common_utilities.log_message (errbuf);
1018: RETURN;
1019: ELSE
1020: x_to_date := trunc(sysdate);

Line 1043: 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'));

1039: IF (x_retcode1 = '-1')
1040: THEN
1041: retcode := -1;
1042: errbuf := x_errbuf1;
1043: 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'));
1044: msd_dem_common_utilities.log_message ('Unable to get instance info.');
1045: RETURN;
1046: END IF;
1047:

Line 1057: 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'));

1053: IF (x_dest_table is NULL)
1054: THEN
1055: retcode := -1;
1056: errbuf := 'Unable to find the sales staging tables.';
1057: 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'));
1058: msd_dem_common_utilities.log_message (errbuf);
1059: RETURN;
1060: END IF;
1061:

Line 1112: 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'));

1108: IF (x_dm_time_bucket IS NULL)
1109: THEN
1110: retcode := -1;
1111: errbuf := 'Unable to get lowest time bucket';
1112: 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'));
1113: msd_dem_common_utilities.log_message (errbuf);
1114: RETURN;
1115: ELSIF (upper(x_dm_time_bucket) = 'DAY')
1116: THEN

Line 1151: 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'));

1147: IF (x_retcode1 = -1)
1148: THEN
1149: retcode := -1;
1150: errbuf := x_errbuf1;
1151: 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'));
1152: msd_dem_common_utilities.log_message ('Error while collecting Booking History - Booked Items - Booked Date');
1153: RETURN;
1154: END IF;
1155: END IF;

Line 1184: 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'));

1180: IF (x_retcode1 = -1)
1181: THEN
1182: retcode := -1;
1183: errbuf := x_errbuf1;
1184: 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'));
1185: msd_dem_common_utilities.log_message ('Error while collecting Booking History - Booked Items - Requested Date');
1186: RETURN;
1187: END IF;
1188: END IF;

Line 1216: 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'));

1212: IF (x_retcode1 = -1)
1213: THEN
1214: retcode := -1;
1215: errbuf := x_errbuf1;
1216: 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'));
1217: msd_dem_common_utilities.log_message ('Error while collecting Booking History - Requested Items - Booked Date');
1218: RETURN;
1219: END IF;
1220: END IF;

Line 1248: 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'));

1244: IF (x_retcode1 = -1)
1245: THEN
1246: retcode := -1;
1247: errbuf := x_errbuf1;
1248: 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'));
1249: msd_dem_common_utilities.log_message ('Error while collecting Booking History - Requested Items - Requested Date');
1250: RETURN;
1251: END IF;
1252: END IF;

Line 1280: 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'));

1276: IF (x_retcode1 = -1)
1277: THEN
1278: retcode := -1;
1279: errbuf := x_errbuf1;
1280: 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'));
1281: msd_dem_common_utilities.log_message ('Error while collecting Shipment History - Shipped Items - Shipped Date');
1282: RETURN;
1283: END IF;
1284: END IF;

Line 1312: 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'));

1308: IF (x_retcode1 = -1)
1309: THEN
1310: retcode := -1;
1311: errbuf := x_errbuf1;
1312: 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'));
1313: msd_dem_common_utilities.log_message ('Error while collecting Shipment History - Shipped Items - Requested Date');
1314: RETURN;
1315: END IF;
1316: END IF;

Line 1344: 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'));

1340: IF (x_retcode1 = -1)
1341: THEN
1342: retcode := -1;
1343: errbuf := x_errbuf1;
1344: 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'));
1345: msd_dem_common_utilities.log_message ('Error while collecting Shipment History - Requested Items - Shipped Date');
1346: RETURN;
1347: END IF;
1348: END IF;

Line 1378: 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'));

1374: IF (x_retcode1 = -1)
1375: THEN
1376: retcode := -1;
1377: errbuf := x_errbuf1;
1378: 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'));
1379: msd_dem_common_utilities.log_message ('Error while collecting Shipment History - Requested Items - Requested Date');
1380: RETURN;
1381: END IF;
1382: END IF;

Line 1397: 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'));

1393: IF (x_retcode1 = 1)
1394: THEN
1395: retcode := 1;
1396: errbuf := x_errbuf1;
1397: 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'));
1398: msd_dem_common_utilities.log_message ('Error while inserting dummy rows into the sales staging table for new items. ');
1399: END IF;
1400: 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'));
1401:

Line 1418: 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'));

1414: IF (x_retcode1 = -1)
1415: THEN
1416: retcode := -1;
1417: errbuf := x_errbuf1;
1418: 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'));
1419: msd_dem_common_utilities.log_message ('Error in call to custom hook msd_dem_custom_hooks.history_hook ');
1420: RETURN;
1421: END IF;
1422:

Line 1438: 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'));

1434: IF (x_retcode1 = 1)
1435: THEN
1436: retcode := 1;
1437: errbuf := x_errbuf1;
1438: 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'));
1439: msd_dem_common_utilities.log_message ('Error while analyzing sales staging table. ');
1440: END IF;
1441:
1442: /*

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

1593: errbuf := substr(SQLERRM,1,150);
1594: msd_dem_common_utilities.log_message ('Warning: can not purge old shipment/booking history data.' );
1595: msd_dem_common_utilities.log_debug ('Warning: can not purge old shipment/booking history data.' );
1596: msd_dem_common_utilities.log_debug (errbuf);
1597: msd_dem_common_utilities.log_debug ('Exiting: msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1598:
1599: RETURN;
1600: End;
1601:

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

1600: End;
1601:
1602: retcode := x_retcode;
1603: errbuf := x_errbuf;
1604: msd_dem_common_utilities.log_debug ('Exiting: msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1605:
1606: EXCEPTION
1607: WHEN OTHERS THEN
1608: retcode := -1 ;

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

1606: EXCEPTION
1607: WHEN OTHERS THEN
1608: retcode := -1 ;
1609: errbuf := substr(SQLERRM,1,150);
1610: msd_dem_common_utilities.log_message ('Exception: msd_dem_collect_history_data.collect_history_data - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1611: msd_dem_common_utilities.log_message (errbuf);
1612: RETURN;
1613:
1614: END COLLECT_HISTORY_DATA;

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

1630:
1631:
1632:
1633: BEGIN
1634: msd_dem_common_utilities.log_debug ('Entering: msd_dem_collect_history_data.run_load - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1635:
1636: DEM_SCHEMA := fnd_profile.value('MSD_DEM_SCHEMA');
1637:
1638: IF (p_auto_run_download = G_YES)

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

1721: msd_dem_common_utilities.log_message ('Auto Run Download - No ');
1722: msd_dem_common_utilities.log_message ('Exiting without launching the download workflow.');
1723: END IF;
1724:
1725: msd_dem_common_utilities.log_debug ('Exiting: msd_dem_collect_history_data.run_load - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1726:
1727: EXCEPTION
1728: WHEN OTHERS THEN
1729: errbuf := substr(SQLERRM,1,150);

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

1732: -- execute immediate l_stmt;
1733: -- l_stmt := 'alter session set current_schema=APPS';
1734: -- execute immediate l_stmt;
1735:
1736: msd_dem_common_utilities.log_message ('Exception: msd_dem_collect_history_data.run_load - ' || TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
1737: msd_dem_common_utilities.log_message (errbuf);
1738: RETURN;
1739:
1740: END RUN_LOAD;

Line 1742: END MSD_DEM_COLLECT_HISTORY_DATA;

1738: RETURN;
1739:
1740: END RUN_LOAD;
1741:
1742: END MSD_DEM_COLLECT_HISTORY_DATA;