DBA Data[Home] [Help]

APPS.FII_TIME_HOOK dependencies on EDW_LOG

Line 22: edw_log.put_line('Entering Time Pre Dimension Hook Procedure');

18: errbuf VARCHAR2(2000);
19: l_join VARCHAR2(2000);
20:
21: begin
22: edw_log.put_line('Entering Time Pre Dimension Hook Procedure');
23: edw_log.put_line(' ');
24:
25: -- --------------------------------------------------------------
26: -- Update calendar day

Line 23: edw_log.put_line(' ');

19: l_join VARCHAR2(2000);
20:
21: begin
22: edw_log.put_line('Entering Time Pre Dimension Hook Procedure');
23: edw_log.put_line(' ');
24:
25: -- --------------------------------------------------------------
26: -- Update calendar day
27: -- --------------------------------------------------------------

Line 33: edw_log.put_line('No data is pushed from oracle application, exit without updating any staging table.');

29: select count(*) into l_count
30: from edw_time_cal_day_lstg where ep_cal_period_fk = 'oracle_source' and collection_status='READY';
31:
32: if l_count = 0 then
33: edw_log.put_line('No data is pushed from oracle application, exit without updating any staging table.');
34: return true;
35: else
36: edw_log.put_line(to_char(l_count)||' records are ready to update.');
37: edw_log.put_line(' ');

Line 36: edw_log.put_line(to_char(l_count)||' records are ready to update.');

32: if l_count = 0 then
33: edw_log.put_line('No data is pushed from oracle application, exit without updating any staging table.');
34: return true;
35: else
36: edw_log.put_line(to_char(l_count)||' records are ready to update.');
37: edw_log.put_line(' ');
38: end if;
39:
40: /* Identify the master instance */

Line 37: edw_log.put_line(' ');

33: edw_log.put_line('No data is pushed from oracle application, exit without updating any staging table.');
34: return true;
35: else
36: edw_log.put_line(to_char(l_count)||' records are ready to update.');
37: edw_log.put_line(' ');
38: end if;
39:
40: /* Identify the master instance */
41: select instance_code

Line 44: edw_log.put_line('Master instance is '||l_master_instance||'.');

40: /* Identify the master instance */
41: select instance_code
42: into l_master_instance
43: from edw_system_parameters;
44: edw_log.put_line('Master instance is '||l_master_instance||'.');
45:
46: /* Identify the instance of the source data */
47: select count(distinct instance) into instance_count
48: from edw_time_cal_day_lstg

Line 62: edw_log.put_line('Data is collected from the master instance, Enterprise Calendar in the staging table will be used to update the Calendar Day foreign keys.');

58: l_join:=' and ep.collection_status=''READY'' and ep.instance= '''||l_master_instance||'''';
59: select min(start_date), max(end_date)
60: into l_ep_min, l_ep_max
61: from edw_time_ep_cal_period_lstg;
62: edw_log.put_line('Data is collected from the master instance, Enterprise Calendar in the staging table will be used to update the Calendar Day foreign keys.');
63: edw_log.put_line(' ');
64: else
65: l_table:='edw_time_ep_cal_period_ltc';
66: l_join:=null;

Line 63: edw_log.put_line(' ');

59: select min(start_date), max(end_date)
60: into l_ep_min, l_ep_max
61: from edw_time_ep_cal_period_lstg;
62: edw_log.put_line('Data is collected from the master instance, Enterprise Calendar in the staging table will be used to update the Calendar Day foreign keys.');
63: edw_log.put_line(' ');
64: else
65: l_table:='edw_time_ep_cal_period_ltc';
66: l_join:=null;
67: select min(start_date), max(end_date)

Line 70: edw_log.put_line('Data is not collected from the master instance, Enterprise Calendar in the level table will be used to update the Calendar Day foreign keys.');

66: l_join:=null;
67: select min(start_date), max(end_date)
68: into l_ep_min, l_ep_max
69: from edw_time_ep_cal_period_ltc;
70: edw_log.put_line('Data is not collected from the master instance, Enterprise Calendar in the level table will be used to update the Calendar Day foreign keys.');
71: edw_log.put_line(' ');
72: end if;
73:
74: /* Populate NA_EDW if period is not defined in gl_periods for the given date */

Line 71: edw_log.put_line(' ');

67: select min(start_date), max(end_date)
68: into l_ep_min, l_ep_max
69: from edw_time_ep_cal_period_ltc;
70: edw_log.put_line('Data is not collected from the master instance, Enterprise Calendar in the level table will be used to update the Calendar Day foreign keys.');
71: edw_log.put_line(' ');
72: end if;
73:
74: /* Populate NA_EDW if period is not defined in gl_periods for the given date */
75: l_statement:='update EDW_TIME_CAL_DAY_LSTG a set ep_cal_period_fk=nvl(

Line 83: edw_log.put_line(l_statement);

79: where a.calendar_date between ep1.start_date and ep1.end_date)
80: and rownum=1'||l_join||'),''NA_EDW'')
81: where a.ep_cal_period_fk=''oracle_source'' and a.collection_status=''READY''';
82:
83: edw_log.put_line(l_statement);
84: edw_log.put_line(' ');
85:
86: EXECUTE IMMEDIATE l_statement;
87:

Line 84: edw_log.put_line(' ');

80: and rownum=1'||l_join||'),''NA_EDW'')
81: where a.ep_cal_period_fk=''oracle_source'' and a.collection_status=''READY''';
82:
83: edw_log.put_line(l_statement);
84: edw_log.put_line(' ');
85:
86: EXECUTE IMMEDIATE l_statement;
87:
88: edw_log.put_line('Finished updating Calendar Day level with correct Enterprise Period.');

Line 88: edw_log.put_line('Finished updating Calendar Day level with correct Enterprise Period.');

84: edw_log.put_line(' ');
85:
86: EXECUTE IMMEDIATE l_statement;
87:
88: edw_log.put_line('Finished updating Calendar Day level with correct Enterprise Period.');
89: edw_log.put_line(' ');
90:
91: select count(*), min(calendar_date), max(calendar_date)
92: into na_count, l_min, l_max

Line 89: edw_log.put_line(' ');

85:
86: EXECUTE IMMEDIATE l_statement;
87:
88: edw_log.put_line('Finished updating Calendar Day level with correct Enterprise Period.');
89: edw_log.put_line(' ');
90:
91: select count(*), min(calendar_date), max(calendar_date)
92: into na_count, l_min, l_max
93: from edw_time_cal_day_lstg where ep_cal_period_fk = 'NA_EDW' and collection_status='READY';

Line 96: edw_log.put_line('WARNING:The foreign key up the Enterprise Calendar Hierarchy is not updated for '||to_char(na_count)||' records!');

92: into na_count, l_min, l_max
93: from edw_time_cal_day_lstg where ep_cal_period_fk = 'NA_EDW' and collection_status='READY';
94:
95: if na_count > 0 then
96: edw_log.put_line('WARNING:The foreign key up the Enterprise Calendar Hierarchy is not updated for '||to_char(na_count)||' records!');
97: edw_log.put_line('The records being collected are from '||to_char(l_min, 'dd-Mon-yyyy')||
98: ' to '||to_char(l_max, 'dd-Mon-yyyy'));
99: edw_log.put_line('while the enterprise calendar defined in GL is from '||to_char(l_ep_min, 'dd-Mon-yyyy')||
100: ' to '||to_char(l_ep_max, 'dd-Mon-yyyy'));

Line 97: edw_log.put_line('The records being collected are from '||to_char(l_min, 'dd-Mon-yyyy')||

93: from edw_time_cal_day_lstg where ep_cal_period_fk = 'NA_EDW' and collection_status='READY';
94:
95: if na_count > 0 then
96: edw_log.put_line('WARNING:The foreign key up the Enterprise Calendar Hierarchy is not updated for '||to_char(na_count)||' records!');
97: edw_log.put_line('The records being collected are from '||to_char(l_min, 'dd-Mon-yyyy')||
98: ' to '||to_char(l_max, 'dd-Mon-yyyy'));
99: edw_log.put_line('while the enterprise calendar defined in GL is from '||to_char(l_ep_min, 'dd-Mon-yyyy')||
100: ' to '||to_char(l_ep_max, 'dd-Mon-yyyy'));
101: edw_log.put_line('Please ensure enterprise calendar periods spans the entire time range in the warehouse.');

Line 99: edw_log.put_line('while the enterprise calendar defined in GL is from '||to_char(l_ep_min, 'dd-Mon-yyyy')||

95: if na_count > 0 then
96: edw_log.put_line('WARNING:The foreign key up the Enterprise Calendar Hierarchy is not updated for '||to_char(na_count)||' records!');
97: edw_log.put_line('The records being collected are from '||to_char(l_min, 'dd-Mon-yyyy')||
98: ' to '||to_char(l_max, 'dd-Mon-yyyy'));
99: edw_log.put_line('while the enterprise calendar defined in GL is from '||to_char(l_ep_min, 'dd-Mon-yyyy')||
100: ' to '||to_char(l_ep_max, 'dd-Mon-yyyy'));
101: edw_log.put_line('Please ensure enterprise calendar periods spans the entire time range in the warehouse.');
102: end if;
103:

Line 101: edw_log.put_line('Please ensure enterprise calendar periods spans the entire time range in the warehouse.');

97: edw_log.put_line('The records being collected are from '||to_char(l_min, 'dd-Mon-yyyy')||
98: ' to '||to_char(l_max, 'dd-Mon-yyyy'));
99: edw_log.put_line('while the enterprise calendar defined in GL is from '||to_char(l_ep_min, 'dd-Mon-yyyy')||
100: ' to '||to_char(l_ep_max, 'dd-Mon-yyyy'));
101: edw_log.put_line('Please ensure enterprise calendar periods spans the entire time range in the warehouse.');
102: end if;
103:
104: commit;
105: edw_log.put_line(to_char(l_count-na_count)||' records has been updated with the correct enterprise calendar!');

Line 105: edw_log.put_line(to_char(l_count-na_count)||' records has been updated with the correct enterprise calendar!');

101: edw_log.put_line('Please ensure enterprise calendar periods spans the entire time range in the warehouse.');
102: end if;
103:
104: commit;
105: edw_log.put_line(to_char(l_count-na_count)||' records has been updated with the correct enterprise calendar!');
106: return true;
107:
108: Exception
109: when no_data_found then

Line 118: edw_log.put_line(retcode||' : '||errbuf);

114: when others then
115: rollback;
116: retcode := sqlcode;
117: errbuf := sqlerrm;
118: edw_log.put_line(retcode||' : '||errbuf);
119: return false;
120:
121: end Pre_Dim_Collect;
122: