DBA Data[Home] [Help]

APPS.BSC_AW_CALENDAR dependencies on BSC_AW_UTILITY

Line 28: bsc_aw_utility.parse_parameter_values(p_options,',',bsc_aw_utility.g_options);

24: p_affected_kpi out nocopy dbms_sql.varchar2_table
25: ) is
26: Begin
27: if p_options is not null then
28: bsc_aw_utility.parse_parameter_values(p_options,',',bsc_aw_utility.g_options);
29: bsc_aw_utility.open_file('TEST');
30: bsc_aw_utility.dmp_g_options(bsc_aw_utility.g_options);
31: end if;
32: init_all;

Line 29: bsc_aw_utility.open_file('TEST');

25: ) is
26: Begin
27: if p_options is not null then
28: bsc_aw_utility.parse_parameter_values(p_options,',',bsc_aw_utility.g_options);
29: bsc_aw_utility.open_file('TEST');
30: bsc_aw_utility.dmp_g_options(bsc_aw_utility.g_options);
31: end if;
32: init_all;
33: attach_workspace(p_options);

Line 30: bsc_aw_utility.dmp_g_options(bsc_aw_utility.g_options);

26: Begin
27: if p_options is not null then
28: bsc_aw_utility.parse_parameter_values(p_options,',',bsc_aw_utility.g_options);
29: bsc_aw_utility.open_file('TEST');
30: bsc_aw_utility.dmp_g_options(bsc_aw_utility.g_options);
31: end if;
32: init_all;
33: attach_workspace(p_options);
34: create_calendar(p_calendar,p_affected_kpi);

Line 38: if nvl(bsc_aw_utility.get_parameter_value('NO DETACH WORKSPACE'),'N')='N' then

34: create_calendar(p_calendar,p_affected_kpi);
35: --
36: bsc_aw_management.commit_aw;
37: commit;
38: if nvl(bsc_aw_utility.get_parameter_value('NO DETACH WORKSPACE'),'N')='N' then
39: bsc_aw_management.detach_workspace;
40: end if;
41: Exception when others then
42: bsc_aw_management.detach_workspace;

Line 72: bsc_aw_utility.add_sqlerror(-34340,'ignore',null);

68: l_create_program:=true;
69: elsif l_recreate='create program' then
70: l_create_program:=true;
71: end if;
72: bsc_aw_utility.add_sqlerror(-34340,'ignore',null);
73: bsc_aw_utility.add_sqlerror(-36656,'ignore',null);
74: if l_create_objects then
75: create_calendar_objects(l_calendar);
76: end if;

Line 73: bsc_aw_utility.add_sqlerror(-36656,'ignore',null);

69: elsif l_recreate='create program' then
70: l_create_program:=true;
71: end if;
72: bsc_aw_utility.add_sqlerror(-34340,'ignore',null);
73: bsc_aw_utility.add_sqlerror(-36656,'ignore',null);
74: if l_create_objects then
75: create_calendar_objects(l_calendar);
76: end if;
77: if l_create_objects or l_create_program then

Line 83: bsc_aw_utility.remove_sqlerror(-34340,'ignore');

79: end if;
80: if l_create_objects then
81: create_calendar_metadata(l_calendar);--create in bsc_olap metadata
82: end if;
83: bsc_aw_utility.remove_sqlerror(-34340,'ignore');
84: bsc_aw_utility.remove_sqlerror(-36656,'ignore');
85: Exception when others then
86: log_n('Exception in create_calendar '||sqlerrm);
87: raise;

Line 84: bsc_aw_utility.remove_sqlerror(-36656,'ignore');

80: if l_create_objects then
81: create_calendar_metadata(l_calendar);--create in bsc_olap metadata
82: end if;
83: bsc_aw_utility.remove_sqlerror(-34340,'ignore');
84: bsc_aw_utility.remove_sqlerror(-36656,'ignore');
85: Exception when others then
86: log_n('Exception in create_calendar '||sqlerrm);
87: raise;
88: End;

Line 277: bsc_aw_utility.add_g_commands(g_commands,'dfn '||p_calendar.load_program||' program');

273: Begin
274: --
275: p_calendar.load_program:='load_cal_'||p_calendar.calendar_id;
276: g_commands.delete;
277: bsc_aw_utility.add_g_commands(g_commands,'dfn '||p_calendar.load_program||' program');
278: bsc_aw_utility.add_g_commands(g_commands,'allstat');
279: for i in 1..p_calendar.periodicity.count loop
280: --to populate end_period_relation_name
281: l_name:='prev_'||p_calendar.periodicity(i).db_column_name;

Line 278: bsc_aw_utility.add_g_commands(g_commands,'allstat');

274: --
275: p_calendar.load_program:='load_cal_'||p_calendar.calendar_id;
276: g_commands.delete;
277: bsc_aw_utility.add_g_commands(g_commands,'dfn '||p_calendar.load_program||' program');
278: bsc_aw_utility.add_g_commands(g_commands,'allstat');
279: for i in 1..p_calendar.periodicity.count loop
280: --to populate end_period_relation_name
281: l_name:='prev_'||p_calendar.periodicity(i).db_column_name;
282: bsc_aw_utility.add_g_commands(g_commands,'if exists(\'''||l_name||'\'') eq false');

Line 282: bsc_aw_utility.add_g_commands(g_commands,'if exists(\'''||l_name||'\'') eq false');

278: bsc_aw_utility.add_g_commands(g_commands,'allstat');
279: for i in 1..p_calendar.periodicity.count loop
280: --to populate end_period_relation_name
281: l_name:='prev_'||p_calendar.periodicity(i).db_column_name;
282: bsc_aw_utility.add_g_commands(g_commands,'if exists(\'''||l_name||'\'') eq false');
283: bsc_aw_utility.add_g_commands(g_commands,'then do');
284: bsc_aw_utility.add_g_commands(g_commands,'dfn prev_'||p_calendar.periodicity(i).db_column_name||' TEXT session');
285: bsc_aw_utility.add_g_commands(g_commands,'doend');
286: end loop;

Line 283: bsc_aw_utility.add_g_commands(g_commands,'then do');

279: for i in 1..p_calendar.periodicity.count loop
280: --to populate end_period_relation_name
281: l_name:='prev_'||p_calendar.periodicity(i).db_column_name;
282: bsc_aw_utility.add_g_commands(g_commands,'if exists(\'''||l_name||'\'') eq false');
283: bsc_aw_utility.add_g_commands(g_commands,'then do');
284: bsc_aw_utility.add_g_commands(g_commands,'dfn prev_'||p_calendar.periodicity(i).db_column_name||' TEXT session');
285: bsc_aw_utility.add_g_commands(g_commands,'doend');
286: end loop;
287: --4566074 : these variables must be initialized since sessions are used, else old values get pulled in

Line 284: bsc_aw_utility.add_g_commands(g_commands,'dfn prev_'||p_calendar.periodicity(i).db_column_name||' TEXT session');

280: --to populate end_period_relation_name
281: l_name:='prev_'||p_calendar.periodicity(i).db_column_name;
282: bsc_aw_utility.add_g_commands(g_commands,'if exists(\'''||l_name||'\'') eq false');
283: bsc_aw_utility.add_g_commands(g_commands,'then do');
284: bsc_aw_utility.add_g_commands(g_commands,'dfn prev_'||p_calendar.periodicity(i).db_column_name||' TEXT session');
285: bsc_aw_utility.add_g_commands(g_commands,'doend');
286: end loop;
287: --4566074 : these variables must be initialized since sessions are used, else old values get pulled in
288: for i in 1..p_calendar.periodicity.count loop

Line 285: bsc_aw_utility.add_g_commands(g_commands,'doend');

281: l_name:='prev_'||p_calendar.periodicity(i).db_column_name;
282: bsc_aw_utility.add_g_commands(g_commands,'if exists(\'''||l_name||'\'') eq false');
283: bsc_aw_utility.add_g_commands(g_commands,'then do');
284: bsc_aw_utility.add_g_commands(g_commands,'dfn prev_'||p_calendar.periodicity(i).db_column_name||' TEXT session');
285: bsc_aw_utility.add_g_commands(g_commands,'doend');
286: end loop;
287: --4566074 : these variables must be initialized since sessions are used, else old values get pulled in
288: for i in 1..p_calendar.periodicity.count loop
289: bsc_aw_utility.add_g_commands(g_commands,'prev_'||p_calendar.periodicity(i).db_column_name||'=NA');

Line 289: bsc_aw_utility.add_g_commands(g_commands,'prev_'||p_calendar.periodicity(i).db_column_name||'=NA');

285: bsc_aw_utility.add_g_commands(g_commands,'doend');
286: end loop;
287: --4566074 : these variables must be initialized since sessions are used, else old values get pulled in
288: for i in 1..p_calendar.periodicity.count loop
289: bsc_aw_utility.add_g_commands(g_commands,'prev_'||p_calendar.periodicity(i).db_column_name||'=NA');
290: end loop;
291: --
292: for i in 1..p_calendar.periodicity.count loop
293: if p_calendar.periodicity(i).aw_time_dim_name is not null then

Line 294: bsc_aw_utility.add_g_commands(g_commands,'maintain '||p_calendar.periodicity(i).aw_time_dim_name||' merge arg(1)');

290: end loop;
291: --
292: for i in 1..p_calendar.periodicity.count loop
293: if p_calendar.periodicity(i).aw_time_dim_name is not null then
294: bsc_aw_utility.add_g_commands(g_commands,'maintain '||p_calendar.periodicity(i).aw_time_dim_name||' merge arg(1)');
295: bsc_aw_utility.add_g_commands(g_commands,'maintain '||p_calendar.periodicity(i).aw_time_dim_name||' merge arg(2)');
296: end if;
297: end loop;
298: --

Line 295: bsc_aw_utility.add_g_commands(g_commands,'maintain '||p_calendar.periodicity(i).aw_time_dim_name||' merge arg(2)');

291: --
292: for i in 1..p_calendar.periodicity.count loop
293: if p_calendar.periodicity(i).aw_time_dim_name is not null then
294: bsc_aw_utility.add_g_commands(g_commands,'maintain '||p_calendar.periodicity(i).aw_time_dim_name||' merge arg(1)');
295: bsc_aw_utility.add_g_commands(g_commands,'maintain '||p_calendar.periodicity(i).aw_time_dim_name||' merge arg(2)');
296: end if;
297: end loop;
298: --
299: bsc_aw_utility.add_g_commands(g_commands,'sql declare c1 cursor for select --');

Line 299: bsc_aw_utility.add_g_commands(g_commands,'sql declare c1 cursor for select --');

295: bsc_aw_utility.add_g_commands(g_commands,'maintain '||p_calendar.periodicity(i).aw_time_dim_name||' merge arg(2)');
296: end if;
297: end loop;
298: --
299: bsc_aw_utility.add_g_commands(g_commands,'sql declare c1 cursor for select --');
300: for i in 1..p_calendar.periodicity.count loop
301: bsc_aw_utility.add_g_commands(g_commands,p_calendar.periodicity(i).db_column_name||'||\''.\''||year, --');
302: end loop;
303: for i in 1..p_calendar.periodicity.count loop

Line 301: bsc_aw_utility.add_g_commands(g_commands,p_calendar.periodicity(i).db_column_name||'||\''.\''||year, --');

297: end loop;
298: --
299: bsc_aw_utility.add_g_commands(g_commands,'sql declare c1 cursor for select --');
300: for i in 1..p_calendar.periodicity.count loop
301: bsc_aw_utility.add_g_commands(g_commands,p_calendar.periodicity(i).db_column_name||'||\''.\''||year, --');
302: end loop;
303: for i in 1..p_calendar.periodicity.count loop
304: if p_calendar.periodicity(i).periodicity_type=1 then --this is yearly. then we hardcode 0 this is what iviewer wants to see
305: bsc_aw_utility.add_g_commands(g_commands,'0 '||p_calendar.periodicity(i).db_column_name||', --');

Line 305: bsc_aw_utility.add_g_commands(g_commands,'0 '||p_calendar.periodicity(i).db_column_name||', --');

301: bsc_aw_utility.add_g_commands(g_commands,p_calendar.periodicity(i).db_column_name||'||\''.\''||year, --');
302: end loop;
303: for i in 1..p_calendar.periodicity.count loop
304: if p_calendar.periodicity(i).periodicity_type=1 then --this is yearly. then we hardcode 0 this is what iviewer wants to see
305: bsc_aw_utility.add_g_commands(g_commands,'0 '||p_calendar.periodicity(i).db_column_name||', --');
306: else
307: bsc_aw_utility.add_g_commands(g_commands,p_calendar.periodicity(i).db_column_name||', --');
308: end if;
309: end loop;

Line 307: bsc_aw_utility.add_g_commands(g_commands,p_calendar.periodicity(i).db_column_name||', --');

303: for i in 1..p_calendar.periodicity.count loop
304: if p_calendar.periodicity(i).periodicity_type=1 then --this is yearly. then we hardcode 0 this is what iviewer wants to see
305: bsc_aw_utility.add_g_commands(g_commands,'0 '||p_calendar.periodicity(i).db_column_name||', --');
306: else
307: bsc_aw_utility.add_g_commands(g_commands,p_calendar.periodicity(i).db_column_name||', --');
308: end if;
309: end loop;
310: for i in 1..p_calendar.periodicity.count loop
311: bsc_aw_utility.add_g_commands(g_commands,'year year'||i||', --');

Line 311: bsc_aw_utility.add_g_commands(g_commands,'year year'||i||', --');

307: bsc_aw_utility.add_g_commands(g_commands,p_calendar.periodicity(i).db_column_name||', --');
308: end if;
309: end loop;
310: for i in 1..p_calendar.periodicity.count loop
311: bsc_aw_utility.add_g_commands(g_commands,'year year'||i||', --');
312: end loop;
313: for i in 1..p_calendar.periodicity.count loop
314: bsc_aw_utility.add_g_commands(g_commands,p_calendar.periodicity(i).periodicity_id||' per_'||
315: p_calendar.periodicity(i).periodicity_id||', --');

Line 314: bsc_aw_utility.add_g_commands(g_commands,p_calendar.periodicity(i).periodicity_id||' per_'||

310: for i in 1..p_calendar.periodicity.count loop
311: bsc_aw_utility.add_g_commands(g_commands,'year year'||i||', --');
312: end loop;
313: for i in 1..p_calendar.periodicity.count loop
314: bsc_aw_utility.add_g_commands(g_commands,p_calendar.periodicity(i).periodicity_id||' per_'||
315: p_calendar.periodicity(i).periodicity_id||', --');
316: end loop;
317: /*
318: earlier we were using month||\'' \''||day30||\'' \''||year. got error

Line 324: if bsc_aw_utility.get_db_version>=10 then

320: this is because month is fiscal month, not calendar month. so corrected to calendar month, day and year
321: */
322: for i in 1..p_calendar.periodicity.count loop
323: if p_calendar.periodicity(i).aw_time_dim_name is not null then
324: if bsc_aw_utility.get_db_version>=10 then
325: bsc_aw_utility.add_g_commands(g_commands,'to_date(calendar_month||\'' \''||calendar_day||\'' \''||calendar_year,\''MM DD YYYY\'') aw_day_'||p_calendar.periodicity(i).db_column_name||', --');
326: else
327: bsc_aw_utility.add_g_commands(g_commands,'calendar_month||\'' \''||calendar_day||\'' \''||calendar_year aw_day_'||p_calendar.periodicity(i).db_column_name||', --');
328: end if;

Line 325: bsc_aw_utility.add_g_commands(g_commands,'to_date(calendar_month||\'' \''||calendar_day||\'' \''||calendar_year,\''MM DD YYYY\'') aw_day_'||p_calendar.periodicity(i).db_column_name||', --');

321: */
322: for i in 1..p_calendar.periodicity.count loop
323: if p_calendar.periodicity(i).aw_time_dim_name is not null then
324: if bsc_aw_utility.get_db_version>=10 then
325: bsc_aw_utility.add_g_commands(g_commands,'to_date(calendar_month||\'' \''||calendar_day||\'' \''||calendar_year,\''MM DD YYYY\'') aw_day_'||p_calendar.periodicity(i).db_column_name||', --');
326: else
327: bsc_aw_utility.add_g_commands(g_commands,'calendar_month||\'' \''||calendar_day||\'' \''||calendar_year aw_day_'||p_calendar.periodicity(i).db_column_name||', --');
328: end if;
329: end if;

Line 327: bsc_aw_utility.add_g_commands(g_commands,'calendar_month||\'' \''||calendar_day||\'' \''||calendar_year aw_day_'||p_calendar.periodicity(i).db_column_name||', --');

323: if p_calendar.periodicity(i).aw_time_dim_name is not null then
324: if bsc_aw_utility.get_db_version>=10 then
325: bsc_aw_utility.add_g_commands(g_commands,'to_date(calendar_month||\'' \''||calendar_day||\'' \''||calendar_year,\''MM DD YYYY\'') aw_day_'||p_calendar.periodicity(i).db_column_name||', --');
326: else
327: bsc_aw_utility.add_g_commands(g_commands,'calendar_month||\'' \''||calendar_day||\'' \''||calendar_year aw_day_'||p_calendar.periodicity(i).db_column_name||', --');
328: end if;
329: end if;
330: end loop;
331: bsc_aw_utility.trim_g_commands(g_commands,4,' --');

Line 331: bsc_aw_utility.trim_g_commands(g_commands,4,' --');

327: bsc_aw_utility.add_g_commands(g_commands,'calendar_month||\'' \''||calendar_day||\'' \''||calendar_year aw_day_'||p_calendar.periodicity(i).db_column_name||', --');
328: end if;
329: end if;
330: end loop;
331: bsc_aw_utility.trim_g_commands(g_commands,4,' --');
332: bsc_aw_utility.add_g_commands(g_commands,'from bsc_db_calendar where calendar_id='||p_calendar.calendar_id||' order by calendar_year,calendar_month,calendar_day');
333: bsc_aw_utility.add_g_commands(g_commands,'sql open c1');
334: bsc_aw_utility.add_g_commands(g_commands,'sql fetch c1 loop into --');
335: for i in 1..p_calendar.periodicity.count loop

Line 332: bsc_aw_utility.add_g_commands(g_commands,'from bsc_db_calendar where calendar_id='||p_calendar.calendar_id||' order by calendar_year,calendar_month,calendar_day');

328: end if;
329: end if;
330: end loop;
331: bsc_aw_utility.trim_g_commands(g_commands,4,' --');
332: bsc_aw_utility.add_g_commands(g_commands,'from bsc_db_calendar where calendar_id='||p_calendar.calendar_id||' order by calendar_year,calendar_month,calendar_day');
333: bsc_aw_utility.add_g_commands(g_commands,'sql open c1');
334: bsc_aw_utility.add_g_commands(g_commands,'sql fetch c1 loop into --');
335: for i in 1..p_calendar.periodicity.count loop
336: bsc_aw_utility.add_g_commands(g_commands,':append '||p_calendar.periodicity(i).dim_name||' --');

Line 333: bsc_aw_utility.add_g_commands(g_commands,'sql open c1');

329: end if;
330: end loop;
331: bsc_aw_utility.trim_g_commands(g_commands,4,' --');
332: bsc_aw_utility.add_g_commands(g_commands,'from bsc_db_calendar where calendar_id='||p_calendar.calendar_id||' order by calendar_year,calendar_month,calendar_day');
333: bsc_aw_utility.add_g_commands(g_commands,'sql open c1');
334: bsc_aw_utility.add_g_commands(g_commands,'sql fetch c1 loop into --');
335: for i in 1..p_calendar.periodicity.count loop
336: bsc_aw_utility.add_g_commands(g_commands,':append '||p_calendar.periodicity(i).dim_name||' --');
337: end loop;

Line 334: bsc_aw_utility.add_g_commands(g_commands,'sql fetch c1 loop into --');

330: end loop;
331: bsc_aw_utility.trim_g_commands(g_commands,4,' --');
332: bsc_aw_utility.add_g_commands(g_commands,'from bsc_db_calendar where calendar_id='||p_calendar.calendar_id||' order by calendar_year,calendar_month,calendar_day');
333: bsc_aw_utility.add_g_commands(g_commands,'sql open c1');
334: bsc_aw_utility.add_g_commands(g_commands,'sql fetch c1 loop into --');
335: for i in 1..p_calendar.periodicity.count loop
336: bsc_aw_utility.add_g_commands(g_commands,':append '||p_calendar.periodicity(i).dim_name||' --');
337: end loop;
338: for i in 1..p_calendar.periodicity.count loop

Line 336: bsc_aw_utility.add_g_commands(g_commands,':append '||p_calendar.periodicity(i).dim_name||' --');

332: bsc_aw_utility.add_g_commands(g_commands,'from bsc_db_calendar where calendar_id='||p_calendar.calendar_id||' order by calendar_year,calendar_month,calendar_day');
333: bsc_aw_utility.add_g_commands(g_commands,'sql open c1');
334: bsc_aw_utility.add_g_commands(g_commands,'sql fetch c1 loop into --');
335: for i in 1..p_calendar.periodicity.count loop
336: bsc_aw_utility.add_g_commands(g_commands,':append '||p_calendar.periodicity(i).dim_name||' --');
337: end loop;
338: for i in 1..p_calendar.periodicity.count loop
339: bsc_aw_utility.add_g_commands(g_commands,':period_cal_'||p_calendar.calendar_id||'('||p_calendar.dim_name||' '||
340: p_calendar.periodicity(i).dim_name||') --');

Line 339: bsc_aw_utility.add_g_commands(g_commands,':period_cal_'||p_calendar.calendar_id||'('||p_calendar.dim_name||' '||

335: for i in 1..p_calendar.periodicity.count loop
336: bsc_aw_utility.add_g_commands(g_commands,':append '||p_calendar.periodicity(i).dim_name||' --');
337: end loop;
338: for i in 1..p_calendar.periodicity.count loop
339: bsc_aw_utility.add_g_commands(g_commands,':period_cal_'||p_calendar.calendar_id||'('||p_calendar.dim_name||' '||
340: p_calendar.periodicity(i).dim_name||') --');
341: end loop;
342: for i in 1..p_calendar.periodicity.count loop
343: bsc_aw_utility.add_g_commands(g_commands,':year_cal_'||p_calendar.calendar_id||'('||p_calendar.dim_name||' '||

Line 343: bsc_aw_utility.add_g_commands(g_commands,':year_cal_'||p_calendar.calendar_id||'('||p_calendar.dim_name||' '||

339: bsc_aw_utility.add_g_commands(g_commands,':period_cal_'||p_calendar.calendar_id||'('||p_calendar.dim_name||' '||
340: p_calendar.periodicity(i).dim_name||') --');
341: end loop;
342: for i in 1..p_calendar.periodicity.count loop
343: bsc_aw_utility.add_g_commands(g_commands,':year_cal_'||p_calendar.calendar_id||'('||p_calendar.dim_name||' '||
344: p_calendar.periodicity(i).dim_name||') --');
345: end loop;
346: for i in 1..p_calendar.periodicity.count loop
347: bsc_aw_utility.add_g_commands(g_commands,':periodicity_cal_'||p_calendar.calendar_id||'('||p_calendar.dim_name||' '||

Line 347: bsc_aw_utility.add_g_commands(g_commands,':periodicity_cal_'||p_calendar.calendar_id||'('||p_calendar.dim_name||' '||

343: bsc_aw_utility.add_g_commands(g_commands,':year_cal_'||p_calendar.calendar_id||'('||p_calendar.dim_name||' '||
344: p_calendar.periodicity(i).dim_name||') --');
345: end loop;
346: for i in 1..p_calendar.periodicity.count loop
347: bsc_aw_utility.add_g_commands(g_commands,':periodicity_cal_'||p_calendar.calendar_id||'('||p_calendar.dim_name||' '||
348: p_calendar.periodicity(i).dim_name||') --');
349: end loop;
350: for i in 1..p_calendar.periodicity.count loop
351: if p_calendar.periodicity(i).aw_time_dim_name is not null then

Line 352: bsc_aw_utility.add_g_commands(g_commands,':'||p_calendar.periodicity(i).aw_bsc_aw_rel_name||' --');

348: p_calendar.periodicity(i).dim_name||') --');
349: end loop;
350: for i in 1..p_calendar.periodicity.count loop
351: if p_calendar.periodicity(i).aw_time_dim_name is not null then
352: bsc_aw_utility.add_g_commands(g_commands,':'||p_calendar.periodicity(i).aw_bsc_aw_rel_name||' --');
353: end if;
354: end loop;
355: bsc_aw_utility.add_g_commands(g_commands,'then --');
356: --

Line 355: bsc_aw_utility.add_g_commands(g_commands,'then --');

351: if p_calendar.periodicity(i).aw_time_dim_name is not null then
352: bsc_aw_utility.add_g_commands(g_commands,':'||p_calendar.periodicity(i).aw_bsc_aw_rel_name||' --');
353: end if;
354: end loop;
355: bsc_aw_utility.add_g_commands(g_commands,'then --');
356: --
357: --add the code for populating end_period_relation_name
358: for i in 1..p_calendar.periodicity.count loop
359: bsc_aw_utility.add_g_commands(g_commands,'if prev_'||p_calendar.periodicity(i).db_column_name||' EQ NA --');

Line 359: bsc_aw_utility.add_g_commands(g_commands,'if prev_'||p_calendar.periodicity(i).db_column_name||' EQ NA --');

355: bsc_aw_utility.add_g_commands(g_commands,'then --');
356: --
357: --add the code for populating end_period_relation_name
358: for i in 1..p_calendar.periodicity.count loop
359: bsc_aw_utility.add_g_commands(g_commands,'if prev_'||p_calendar.periodicity(i).db_column_name||' EQ NA --');
360: bsc_aw_utility.add_g_commands(g_commands,'then do --');
361: bsc_aw_utility.add_g_commands(g_commands,'prev_'||p_calendar.periodicity(i).db_column_name||' = '||p_calendar.periodicity(i).dim_name||' --');
362: bsc_aw_utility.add_g_commands(g_commands,'doend --');
363: --if this is not the lowest level , ie. day level then...

Line 360: bsc_aw_utility.add_g_commands(g_commands,'then do --');

356: --
357: --add the code for populating end_period_relation_name
358: for i in 1..p_calendar.periodicity.count loop
359: bsc_aw_utility.add_g_commands(g_commands,'if prev_'||p_calendar.periodicity(i).db_column_name||' EQ NA --');
360: bsc_aw_utility.add_g_commands(g_commands,'then do --');
361: bsc_aw_utility.add_g_commands(g_commands,'prev_'||p_calendar.periodicity(i).db_column_name||' = '||p_calendar.periodicity(i).dim_name||' --');
362: bsc_aw_utility.add_g_commands(g_commands,'doend --');
363: --if this is not the lowest level , ie. day level then...
364: --for day, source is null

Line 361: bsc_aw_utility.add_g_commands(g_commands,'prev_'||p_calendar.periodicity(i).db_column_name||' = '||p_calendar.periodicity(i).dim_name||' --');

357: --add the code for populating end_period_relation_name
358: for i in 1..p_calendar.periodicity.count loop
359: bsc_aw_utility.add_g_commands(g_commands,'if prev_'||p_calendar.periodicity(i).db_column_name||' EQ NA --');
360: bsc_aw_utility.add_g_commands(g_commands,'then do --');
361: bsc_aw_utility.add_g_commands(g_commands,'prev_'||p_calendar.periodicity(i).db_column_name||' = '||p_calendar.periodicity(i).dim_name||' --');
362: bsc_aw_utility.add_g_commands(g_commands,'doend --');
363: --if this is not the lowest level , ie. day level then...
364: --for day, source is null
365: if p_calendar.periodicity(i).source is not null then

Line 362: bsc_aw_utility.add_g_commands(g_commands,'doend --');

358: for i in 1..p_calendar.periodicity.count loop
359: bsc_aw_utility.add_g_commands(g_commands,'if prev_'||p_calendar.periodicity(i).db_column_name||' EQ NA --');
360: bsc_aw_utility.add_g_commands(g_commands,'then do --');
361: bsc_aw_utility.add_g_commands(g_commands,'prev_'||p_calendar.periodicity(i).db_column_name||' = '||p_calendar.periodicity(i).dim_name||' --');
362: bsc_aw_utility.add_g_commands(g_commands,'doend --');
363: --if this is not the lowest level , ie. day level then...
364: --for day, source is null
365: if p_calendar.periodicity(i).source is not null then
366: --get all the lower periodicities

Line 370: bsc_aw_utility.add_g_commands(g_commands,'else do --');

366: --get all the lower periodicities
367: l_lower_periodicities.delete;
368: get_all_lower_periodicities(p_calendar.periodicity(i),p_calendar,l_lower_periodicities);
369: if l_lower_periodicities.count>0 then
370: bsc_aw_utility.add_g_commands(g_commands,'else do --');
371: bsc_aw_utility.add_g_commands(g_commands,'if prev_'||p_calendar.periodicity(i).db_column_name||' NE '||p_calendar.periodicity(i).dim_name||' --');
372: bsc_aw_utility.add_g_commands(g_commands,'then do --');
373: for j in 1..l_lower_periodicities.count loop
374: bsc_aw_utility.add_g_commands(g_commands,p_calendar.end_period_relation_name||'('||p_calendar.periodicity(i).dim_name||' '||

Line 371: bsc_aw_utility.add_g_commands(g_commands,'if prev_'||p_calendar.periodicity(i).db_column_name||' NE '||p_calendar.periodicity(i).dim_name||' --');

367: l_lower_periodicities.delete;
368: get_all_lower_periodicities(p_calendar.periodicity(i),p_calendar,l_lower_periodicities);
369: if l_lower_periodicities.count>0 then
370: bsc_aw_utility.add_g_commands(g_commands,'else do --');
371: bsc_aw_utility.add_g_commands(g_commands,'if prev_'||p_calendar.periodicity(i).db_column_name||' NE '||p_calendar.periodicity(i).dim_name||' --');
372: bsc_aw_utility.add_g_commands(g_commands,'then do --');
373: for j in 1..l_lower_periodicities.count loop
374: bsc_aw_utility.add_g_commands(g_commands,p_calendar.end_period_relation_name||'('||p_calendar.periodicity(i).dim_name||' '||
375: 'prev_'||p_calendar.periodicity(i).db_column_name||' '||p_calendar.end_period_levels_name||' \'''||l_lower_periodicities(j).dim_name||'\'')='||

Line 372: bsc_aw_utility.add_g_commands(g_commands,'then do --');

368: get_all_lower_periodicities(p_calendar.periodicity(i),p_calendar,l_lower_periodicities);
369: if l_lower_periodicities.count>0 then
370: bsc_aw_utility.add_g_commands(g_commands,'else do --');
371: bsc_aw_utility.add_g_commands(g_commands,'if prev_'||p_calendar.periodicity(i).db_column_name||' NE '||p_calendar.periodicity(i).dim_name||' --');
372: bsc_aw_utility.add_g_commands(g_commands,'then do --');
373: for j in 1..l_lower_periodicities.count loop
374: bsc_aw_utility.add_g_commands(g_commands,p_calendar.end_period_relation_name||'('||p_calendar.periodicity(i).dim_name||' '||
375: 'prev_'||p_calendar.periodicity(i).db_column_name||' '||p_calendar.end_period_levels_name||' \'''||l_lower_periodicities(j).dim_name||'\'')='||
376: p_calendar.dim_name||'('||l_lower_periodicities(j).dim_name||' prev_'||l_lower_periodicities(j).db_column_name||') --');

Line 374: bsc_aw_utility.add_g_commands(g_commands,p_calendar.end_period_relation_name||'('||p_calendar.periodicity(i).dim_name||' '||

370: bsc_aw_utility.add_g_commands(g_commands,'else do --');
371: bsc_aw_utility.add_g_commands(g_commands,'if prev_'||p_calendar.periodicity(i).db_column_name||' NE '||p_calendar.periodicity(i).dim_name||' --');
372: bsc_aw_utility.add_g_commands(g_commands,'then do --');
373: for j in 1..l_lower_periodicities.count loop
374: bsc_aw_utility.add_g_commands(g_commands,p_calendar.end_period_relation_name||'('||p_calendar.periodicity(i).dim_name||' '||
375: 'prev_'||p_calendar.periodicity(i).db_column_name||' '||p_calendar.end_period_levels_name||' \'''||l_lower_periodicities(j).dim_name||'\'')='||
376: p_calendar.dim_name||'('||l_lower_periodicities(j).dim_name||' prev_'||l_lower_periodicities(j).db_column_name||') --');
377: end loop;
378: bsc_aw_utility.add_g_commands(g_commands,'doend --');

Line 378: bsc_aw_utility.add_g_commands(g_commands,'doend --');

374: bsc_aw_utility.add_g_commands(g_commands,p_calendar.end_period_relation_name||'('||p_calendar.periodicity(i).dim_name||' '||
375: 'prev_'||p_calendar.periodicity(i).db_column_name||' '||p_calendar.end_period_levels_name||' \'''||l_lower_periodicities(j).dim_name||'\'')='||
376: p_calendar.dim_name||'('||l_lower_periodicities(j).dim_name||' prev_'||l_lower_periodicities(j).db_column_name||') --');
377: end loop;
378: bsc_aw_utility.add_g_commands(g_commands,'doend --');
379: bsc_aw_utility.add_g_commands(g_commands,'doend --');
380: end if;
381: end if;
382: end loop;

Line 379: bsc_aw_utility.add_g_commands(g_commands,'doend --');

375: 'prev_'||p_calendar.periodicity(i).db_column_name||' '||p_calendar.end_period_levels_name||' \'''||l_lower_periodicities(j).dim_name||'\'')='||
376: p_calendar.dim_name||'('||l_lower_periodicities(j).dim_name||' prev_'||l_lower_periodicities(j).db_column_name||') --');
377: end loop;
378: bsc_aw_utility.add_g_commands(g_commands,'doend --');
379: bsc_aw_utility.add_g_commands(g_commands,'doend --');
380: end if;
381: end if;
382: end loop;
383: for i in 1..p_calendar.periodicity.count loop

Line 384: bsc_aw_utility.add_g_commands(g_commands,'if prev_'||p_calendar.periodicity(i).db_column_name||' NE '||p_calendar.periodicity(i).dim_name||' --');

380: end if;
381: end if;
382: end loop;
383: for i in 1..p_calendar.periodicity.count loop
384: bsc_aw_utility.add_g_commands(g_commands,'if prev_'||p_calendar.periodicity(i).db_column_name||' NE '||p_calendar.periodicity(i).dim_name||' --');
385: bsc_aw_utility.add_g_commands(g_commands,'then do --');
386: bsc_aw_utility.add_g_commands(g_commands,'prev_'||p_calendar.periodicity(i).db_column_name||' = '||p_calendar.periodicity(i).dim_name||' --');
387: bsc_aw_utility.add_g_commands(g_commands,'doend --');
388: end loop;

Line 385: bsc_aw_utility.add_g_commands(g_commands,'then do --');

381: end if;
382: end loop;
383: for i in 1..p_calendar.periodicity.count loop
384: bsc_aw_utility.add_g_commands(g_commands,'if prev_'||p_calendar.periodicity(i).db_column_name||' NE '||p_calendar.periodicity(i).dim_name||' --');
385: bsc_aw_utility.add_g_commands(g_commands,'then do --');
386: bsc_aw_utility.add_g_commands(g_commands,'prev_'||p_calendar.periodicity(i).db_column_name||' = '||p_calendar.periodicity(i).dim_name||' --');
387: bsc_aw_utility.add_g_commands(g_commands,'doend --');
388: end loop;
389: ----------

Line 386: bsc_aw_utility.add_g_commands(g_commands,'prev_'||p_calendar.periodicity(i).db_column_name||' = '||p_calendar.periodicity(i).dim_name||' --');

382: end loop;
383: for i in 1..p_calendar.periodicity.count loop
384: bsc_aw_utility.add_g_commands(g_commands,'if prev_'||p_calendar.periodicity(i).db_column_name||' NE '||p_calendar.periodicity(i).dim_name||' --');
385: bsc_aw_utility.add_g_commands(g_commands,'then do --');
386: bsc_aw_utility.add_g_commands(g_commands,'prev_'||p_calendar.periodicity(i).db_column_name||' = '||p_calendar.periodicity(i).dim_name||' --');
387: bsc_aw_utility.add_g_commands(g_commands,'doend --');
388: end loop;
389: ----------
390: --code to populate denorm relation

Line 387: bsc_aw_utility.add_g_commands(g_commands,'doend --');

383: for i in 1..p_calendar.periodicity.count loop
384: bsc_aw_utility.add_g_commands(g_commands,'if prev_'||p_calendar.periodicity(i).db_column_name||' NE '||p_calendar.periodicity(i).dim_name||' --');
385: bsc_aw_utility.add_g_commands(g_commands,'then do --');
386: bsc_aw_utility.add_g_commands(g_commands,'prev_'||p_calendar.periodicity(i).db_column_name||' = '||p_calendar.periodicity(i).dim_name||' --');
387: bsc_aw_utility.add_g_commands(g_commands,'doend --');
388: end loop;
389: ----------
390: --code to populate denorm relation
391: for i in 1..p_calendar.periodicity.count loop

Line 396: bsc_aw_utility.add_g_commands(g_commands,p_calendar.denorm_relation_name||'('||p_calendar.dim_name||' '||p_calendar.periodicity(i).dim_name||

392: l_upper_periodicities.delete;
393: get_all_upper_periodicities(p_calendar.periodicity(i),p_calendar,l_upper_periodicities);
394: if l_upper_periodicities.count>0 then
395: for j in 1..l_upper_periodicities.count loop
396: bsc_aw_utility.add_g_commands(g_commands,p_calendar.denorm_relation_name||'('||p_calendar.dim_name||' '||p_calendar.periodicity(i).dim_name||
397: ' '||p_calendar.end_period_levels_name||' \'''||l_upper_periodicities(j).dim_name||'\'')='||p_calendar.dim_name||'('||
398: p_calendar.dim_name||' '||l_upper_periodicities(j).dim_name||') --');
399: end loop;
400: end if;

Line 407: bsc_aw_utility.add_g_commands(g_commands,p_calendar.relation_name||'('||p_calendar.dim_name||' '||l_name||' '||

403: --code to populate the other relations
404: for i in 1..p_calendar.parent_child.count loop
405: if p_calendar.parent_child(i).parent is not null and p_calendar.parent_child(i).child is not null then
406: l_name:=p_calendar.parent_child(i).child_dim_name;
407: bsc_aw_utility.add_g_commands(g_commands,p_calendar.relation_name||'('||p_calendar.dim_name||' '||l_name||' '||
408: p_calendar.levels_name||' \'''||p_calendar.parent_child(i).parent_dim_name||'.'||p_calendar.parent_child(i).child_dim_name
409: ||'\'')='||
410: p_calendar.dim_name||'('||p_calendar.dim_name||' '||p_calendar.parent_child(i).parent_dim_name||') --');
411: end if;

Line 415: bsc_aw_utility.add_g_commands(g_commands,p_calendar.periodicity(i).aw_aw_bsc_rel_name||'('||p_calendar.periodicity(i).aw_time_dim_name||' '||

411: end if;
412: end loop;
413: for i in 1..p_calendar.periodicity.count loop
414: if p_calendar.periodicity(i).aw_time_dim_name is not null then
415: bsc_aw_utility.add_g_commands(g_commands,p_calendar.periodicity(i).aw_aw_bsc_rel_name||'('||p_calendar.periodicity(i).aw_time_dim_name||' '||
416: p_calendar.periodicity(i).aw_bsc_aw_rel_name||')='||p_calendar.dim_name||'('||p_calendar.periodicity(i).dim_name||' '||
417: p_calendar.periodicity(i).dim_name||') --');
418: end if;
419: end loop;

Line 420: bsc_aw_utility.trim_g_commands(g_commands,3,null);

416: p_calendar.periodicity(i).aw_bsc_aw_rel_name||')='||p_calendar.dim_name||'('||p_calendar.periodicity(i).dim_name||' '||
417: p_calendar.periodicity(i).dim_name||') --');
418: end if;
419: end loop;
420: bsc_aw_utility.trim_g_commands(g_commands,3,null);
421: bsc_aw_utility.add_g_commands(g_commands,'sql close c1');
422: bsc_aw_utility.add_g_commands(g_commands,'sql cleanup');
423: --part II----------------------
424: /*

Line 421: bsc_aw_utility.add_g_commands(g_commands,'sql close c1');

417: p_calendar.periodicity(i).dim_name||') --');
418: end if;
419: end loop;
420: bsc_aw_utility.trim_g_commands(g_commands,3,null);
421: bsc_aw_utility.add_g_commands(g_commands,'sql close c1');
422: bsc_aw_utility.add_g_commands(g_commands,'sql cleanup');
423: --part II----------------------
424: /*
425: we have an issue where if 2004 is the last year, then data in calendar will not go to 2005. this means for the last periods in 2004,

Line 422: bsc_aw_utility.add_g_commands(g_commands,'sql cleanup');

418: end if;
419: end loop;
420: bsc_aw_utility.trim_g_commands(g_commands,3,null);
421: bsc_aw_utility.add_g_commands(g_commands,'sql close c1');
422: bsc_aw_utility.add_g_commands(g_commands,'sql cleanup');
423: --part II----------------------
424: /*
425: we have an issue where if 2004 is the last year, then data in calendar will not go to 2005. this means for the last periods in 2004,
426: like year 2004, qtr 4 2004, semester 2 2004, we will not have if prev_YEAR NE year_1_cal_1 - so we are not populating end period rel

Line 430: bsc_aw_utility.add_g_commands(g_commands,'sql declare c1 cursor for select --');

426: like year 2004, qtr 4 2004, semester 2 2004, we will not have if prev_YEAR NE year_1_cal_1 - so we are not populating end period rel
427: for relation. we have to add this last data to the relation. pick the last row in the calendar, then assign it as the end period rel
428: for year 2004, day 366.2004 is the end period rel etc
429: */
430: bsc_aw_utility.add_g_commands(g_commands,'sql declare c1 cursor for select --');
431: for i in 1..p_calendar.periodicity.count loop
432: bsc_aw_utility.add_g_commands(g_commands,p_calendar.periodicity(i).db_column_name||'||\''.\''||year, --');
433: end loop;
434: bsc_aw_utility.trim_g_commands(g_commands,4,' --');

Line 432: bsc_aw_utility.add_g_commands(g_commands,p_calendar.periodicity(i).db_column_name||'||\''.\''||year, --');

428: for year 2004, day 366.2004 is the end period rel etc
429: */
430: bsc_aw_utility.add_g_commands(g_commands,'sql declare c1 cursor for select --');
431: for i in 1..p_calendar.periodicity.count loop
432: bsc_aw_utility.add_g_commands(g_commands,p_calendar.periodicity(i).db_column_name||'||\''.\''||year, --');
433: end loop;
434: bsc_aw_utility.trim_g_commands(g_commands,4,' --');
435: bsc_aw_utility.add_g_commands(g_commands,'from (select * from bsc_db_calendar where calendar_id='||p_calendar.calendar_id||
436: ' order by calendar_year desc,calendar_month desc,calendar_day desc) where rownum=1');

Line 434: bsc_aw_utility.trim_g_commands(g_commands,4,' --');

430: bsc_aw_utility.add_g_commands(g_commands,'sql declare c1 cursor for select --');
431: for i in 1..p_calendar.periodicity.count loop
432: bsc_aw_utility.add_g_commands(g_commands,p_calendar.periodicity(i).db_column_name||'||\''.\''||year, --');
433: end loop;
434: bsc_aw_utility.trim_g_commands(g_commands,4,' --');
435: bsc_aw_utility.add_g_commands(g_commands,'from (select * from bsc_db_calendar where calendar_id='||p_calendar.calendar_id||
436: ' order by calendar_year desc,calendar_month desc,calendar_day desc) where rownum=1');
437: bsc_aw_utility.add_g_commands(g_commands,'sql open c1');
438: bsc_aw_utility.add_g_commands(g_commands,'sql fetch c1 loop into --');

Line 435: bsc_aw_utility.add_g_commands(g_commands,'from (select * from bsc_db_calendar where calendar_id='||p_calendar.calendar_id||

431: for i in 1..p_calendar.periodicity.count loop
432: bsc_aw_utility.add_g_commands(g_commands,p_calendar.periodicity(i).db_column_name||'||\''.\''||year, --');
433: end loop;
434: bsc_aw_utility.trim_g_commands(g_commands,4,' --');
435: bsc_aw_utility.add_g_commands(g_commands,'from (select * from bsc_db_calendar where calendar_id='||p_calendar.calendar_id||
436: ' order by calendar_year desc,calendar_month desc,calendar_day desc) where rownum=1');
437: bsc_aw_utility.add_g_commands(g_commands,'sql open c1');
438: bsc_aw_utility.add_g_commands(g_commands,'sql fetch c1 loop into --');
439: for i in 1..p_calendar.periodicity.count loop

Line 437: bsc_aw_utility.add_g_commands(g_commands,'sql open c1');

433: end loop;
434: bsc_aw_utility.trim_g_commands(g_commands,4,' --');
435: bsc_aw_utility.add_g_commands(g_commands,'from (select * from bsc_db_calendar where calendar_id='||p_calendar.calendar_id||
436: ' order by calendar_year desc,calendar_month desc,calendar_day desc) where rownum=1');
437: bsc_aw_utility.add_g_commands(g_commands,'sql open c1');
438: bsc_aw_utility.add_g_commands(g_commands,'sql fetch c1 loop into --');
439: for i in 1..p_calendar.periodicity.count loop
440: bsc_aw_utility.add_g_commands(g_commands,':match '||p_calendar.periodicity(i).dim_name||' --');
441: end loop;

Line 438: bsc_aw_utility.add_g_commands(g_commands,'sql fetch c1 loop into --');

434: bsc_aw_utility.trim_g_commands(g_commands,4,' --');
435: bsc_aw_utility.add_g_commands(g_commands,'from (select * from bsc_db_calendar where calendar_id='||p_calendar.calendar_id||
436: ' order by calendar_year desc,calendar_month desc,calendar_day desc) where rownum=1');
437: bsc_aw_utility.add_g_commands(g_commands,'sql open c1');
438: bsc_aw_utility.add_g_commands(g_commands,'sql fetch c1 loop into --');
439: for i in 1..p_calendar.periodicity.count loop
440: bsc_aw_utility.add_g_commands(g_commands,':match '||p_calendar.periodicity(i).dim_name||' --');
441: end loop;
442: --add the code for populating end_period_relation_name

Line 440: bsc_aw_utility.add_g_commands(g_commands,':match '||p_calendar.periodicity(i).dim_name||' --');

436: ' order by calendar_year desc,calendar_month desc,calendar_day desc) where rownum=1');
437: bsc_aw_utility.add_g_commands(g_commands,'sql open c1');
438: bsc_aw_utility.add_g_commands(g_commands,'sql fetch c1 loop into --');
439: for i in 1..p_calendar.periodicity.count loop
440: bsc_aw_utility.add_g_commands(g_commands,':match '||p_calendar.periodicity(i).dim_name||' --');
441: end loop;
442: --add the code for populating end_period_relation_name
443: for i in 1..p_calendar.periodicity.count loop
444: if p_calendar.periodicity(i).source is not null then

Line 450: bsc_aw_utility.add_g_commands(g_commands,p_calendar.end_period_relation_name||'('||p_calendar.periodicity(i).dim_name||' '||

446: l_lower_periodicities.delete;
447: get_all_lower_periodicities(p_calendar.periodicity(i),p_calendar,l_lower_periodicities);
448: if l_lower_periodicities.count>0 then
449: for j in 1..l_lower_periodicities.count loop
450: bsc_aw_utility.add_g_commands(g_commands,p_calendar.end_period_relation_name||'('||p_calendar.periodicity(i).dim_name||' '||
451: p_calendar.periodicity(i).dim_name||' '||p_calendar.end_period_levels_name||' \'''||l_lower_periodicities(j).dim_name||'\'')='||
452: p_calendar.dim_name||'('||l_lower_periodicities(j).dim_name||' '||l_lower_periodicities(j).dim_name||') --');
453: end loop;
454: end if;

Line 457: bsc_aw_utility.trim_g_commands(g_commands,3,null);

453: end loop;
454: end if;
455: end if;
456: end loop;
457: bsc_aw_utility.trim_g_commands(g_commands,3,null);
458: --
459: bsc_aw_utility.exec_program_commands(p_calendar.load_program,g_commands);
460: Exception when others then
461: log_n('Exception in create_calendar_program '||sqlerrm);

Line 459: bsc_aw_utility.exec_program_commands(p_calendar.load_program,g_commands);

455: end if;
456: end loop;
457: bsc_aw_utility.trim_g_commands(g_commands,3,null);
458: --
459: bsc_aw_utility.exec_program_commands(p_calendar.load_program,g_commands);
460: Exception when others then
461: log_n('Exception in create_calendar_program '||sqlerrm);
462: raise;
463: End;

Line 548: p_calendar.calendar_id:=bsc_aw_utility.get_parameter_value(l_oo(i).property1,'calendar',',');

544: --
545: p_calendar.dim_name:=p_calendar_name;
546: for i in 1..l_oo.count loop
547: if l_oo(i).object=p_calendar_name and l_oo(i).object_type='dimension' then
548: p_calendar.calendar_id:=bsc_aw_utility.get_parameter_value(l_oo(i).property1,'calendar',',');
549: p_calendar.property:=l_oo(i).property1;
550: elsif l_oo(i).object_type='relation' then
551: p_calendar.relation_name:=l_oo(i).object;
552: elsif l_oo(i).object_type='denorm relation' then

Line 563: p_calendar.periodicity(p_calendar.periodicity.count).periodicity_id:=bsc_aw_utility.get_parameter_value(l_oo(i).property1,'periodicity',',');

559: p_calendar.end_period_levels_name:=l_oo(i).object;
560: --
561: elsif l_oo(i).object_type='dimension level' then
562: p_calendar.periodicity(p_calendar.periodicity.count+1).dim_name:=l_oo(i).object;
563: p_calendar.periodicity(p_calendar.periodicity.count).periodicity_id:=bsc_aw_utility.get_parameter_value(l_oo(i).property1,'periodicity',',');
564: p_calendar.periodicity(p_calendar.periodicity.count).db_column_name:=bsc_aw_utility.get_parameter_value(l_oo(i).property1,'db_column_name',',');
565: end if;
566: end loop;
567: --parent child relation

Line 564: p_calendar.periodicity(p_calendar.periodicity.count).db_column_name:=bsc_aw_utility.get_parameter_value(l_oo(i).property1,'db_column_name',',');

560: --
561: elsif l_oo(i).object_type='dimension level' then
562: p_calendar.periodicity(p_calendar.periodicity.count+1).dim_name:=l_oo(i).object;
563: p_calendar.periodicity(p_calendar.periodicity.count).periodicity_id:=bsc_aw_utility.get_parameter_value(l_oo(i).property1,'periodicity',',');
564: p_calendar.periodicity(p_calendar.periodicity.count).db_column_name:=bsc_aw_utility.get_parameter_value(l_oo(i).property1,'db_column_name',',');
565: end if;
566: end loop;
567: --parent child relation
568: for i in 1..l_oor.count loop

Line 571: p_calendar.parent_child(p_calendar.parent_child.count).parent:=to_number(bsc_aw_utility.get_parameter_value(l_oor(i).property1,'parent periodicity',','));

567: --parent child relation
568: for i in 1..l_oor.count loop
569: if l_oor(i).relation_type='parent level' then
570: p_calendar.parent_child(p_calendar.parent_child.count+1).parent_dim_name:=l_oor(i).relation_object;
571: p_calendar.parent_child(p_calendar.parent_child.count).parent:=to_number(bsc_aw_utility.get_parameter_value(l_oor(i).property1,'parent periodicity',','));
572: p_calendar.parent_child(p_calendar.parent_child.count).child_dim_name:=l_oor(i).object;
573: p_calendar.parent_child(p_calendar.parent_child.count).child:=to_number(bsc_aw_utility.get_parameter_value(l_oor(i).property1,'child periodicity',','));
574: end if;
575: end loop;

Line 573: p_calendar.parent_child(p_calendar.parent_child.count).child:=to_number(bsc_aw_utility.get_parameter_value(l_oor(i).property1,'child periodicity',','));

569: if l_oor(i).relation_type='parent level' then
570: p_calendar.parent_child(p_calendar.parent_child.count+1).parent_dim_name:=l_oor(i).relation_object;
571: p_calendar.parent_child(p_calendar.parent_child.count).parent:=to_number(bsc_aw_utility.get_parameter_value(l_oor(i).property1,'parent periodicity',','));
572: p_calendar.parent_child(p_calendar.parent_child.count).child_dim_name:=l_oor(i).object;
573: p_calendar.parent_child(p_calendar.parent_child.count).child:=to_number(bsc_aw_utility.get_parameter_value(l_oor(i).property1,'child periodicity',','));
574: end if;
575: end loop;
576: Exception when others then
577: log_n('Exception in get_calendar '||sqlerrm);

Line 658: l_relation bsc_aw_utility.parent_child_tb;

654: first parse the source periodicities out.
655: then normalize them
656: */
657: procedure normalize_per_relation(p_calendar in out nocopy calendar_r) is
658: l_relation bsc_aw_utility.parent_child_tb;
659: l_source bsc_aw_utility.value_tb;
660: l_count number;
661: Begin
662: l_count:=0;

Line 659: l_source bsc_aw_utility.value_tb;

655: then normalize them
656: */
657: procedure normalize_per_relation(p_calendar in out nocopy calendar_r) is
658: l_relation bsc_aw_utility.parent_child_tb;
659: l_source bsc_aw_utility.value_tb;
660: l_count number;
661: Begin
662: l_count:=0;
663: for i in 1..p_calendar.periodicity.count loop

Line 665: --we are just reusing bsc_aw_utility.parse_parameter_values

661: Begin
662: l_count:=0;
663: for i in 1..p_calendar.periodicity.count loop
664: if p_calendar.periodicity(i).source is not null then
665: --we are just reusing bsc_aw_utility.parse_parameter_values
666: l_source.delete;
667: bsc_aw_utility.parse_parameter_values(p_calendar.periodicity(i).source,',',l_source);
668: for j in 1..l_source.count loop
669: l_count:=l_count+1;

Line 667: bsc_aw_utility.parse_parameter_values(p_calendar.periodicity(i).source,',',l_source);

663: for i in 1..p_calendar.periodicity.count loop
664: if p_calendar.periodicity(i).source is not null then
665: --we are just reusing bsc_aw_utility.parse_parameter_values
666: l_source.delete;
667: bsc_aw_utility.parse_parameter_values(p_calendar.periodicity(i).source,',',l_source);
668: for j in 1..l_source.count loop
669: l_count:=l_count+1;
670: l_relation(l_count).parent:=p_calendar.periodicity(i).periodicity_id;
671: l_relation(l_count).child:=l_source(j).parameter;

Line 678: bsc_aw_utility.normalize_denorm_relation(l_relation);

674: l_count:=l_count+1;
675: l_relation(l_count).parent:=p_calendar.periodicity(i).periodicity_id;
676: end if;
677: end loop;
678: bsc_aw_utility.normalize_denorm_relation(l_relation);
679: --l_relation is now normalized
680: for i in 1..l_relation.count loop
681: p_calendar.parent_child(i).parent:=to_number(l_relation(i).parent);
682: p_calendar.parent_child(i).parent_dim_name:=get_periodicity_dim_name(p_calendar.periodicity,

Line 776: bsc_aw_utility.g_options.delete;

772: End;
773:
774: procedure load_calendar(p_calendar number,p_options varchar2) is
775: Begin
776: bsc_aw_utility.g_options.delete;
777: bsc_aw_utility.parse_parameter_values(p_options,',',bsc_aw_utility.g_options);
778: bsc_aw_utility.open_file('TEST');
779: bsc_aw_utility.dmp_g_options(bsc_aw_utility.g_options);
780: init_all;

Line 777: bsc_aw_utility.parse_parameter_values(p_options,',',bsc_aw_utility.g_options);

773:
774: procedure load_calendar(p_calendar number,p_options varchar2) is
775: Begin
776: bsc_aw_utility.g_options.delete;
777: bsc_aw_utility.parse_parameter_values(p_options,',',bsc_aw_utility.g_options);
778: bsc_aw_utility.open_file('TEST');
779: bsc_aw_utility.dmp_g_options(bsc_aw_utility.g_options);
780: init_all;
781: lock_calendar_objects(p_calendar);

Line 778: bsc_aw_utility.open_file('TEST');

774: procedure load_calendar(p_calendar number,p_options varchar2) is
775: Begin
776: bsc_aw_utility.g_options.delete;
777: bsc_aw_utility.parse_parameter_values(p_options,',',bsc_aw_utility.g_options);
778: bsc_aw_utility.open_file('TEST');
779: bsc_aw_utility.dmp_g_options(bsc_aw_utility.g_options);
780: init_all;
781: lock_calendar_objects(p_calendar);
782: load_calendar(p_calendar);

Line 779: bsc_aw_utility.dmp_g_options(bsc_aw_utility.g_options);

775: Begin
776: bsc_aw_utility.g_options.delete;
777: bsc_aw_utility.parse_parameter_values(p_options,',',bsc_aw_utility.g_options);
778: bsc_aw_utility.open_file('TEST');
779: bsc_aw_utility.dmp_g_options(bsc_aw_utility.g_options);
780: init_all;
781: lock_calendar_objects(p_calendar);
782: load_calendar(p_calendar);
783: --

Line 823: log_n(l_stmt||bsc_aw_utility.get_time);

819: end if;
820: end loop;
821: l_stmt:='call '||l_pgm||'(''01 01 '||l_min||''',''01 01 '||l_max||''')';
822: if g_debug then
823: log_n(l_stmt||bsc_aw_utility.get_time);
824: end if;
825: bsc_aw_dbms_aw.execute(l_stmt);
826: if g_debug then
827: log('Finished '||bsc_aw_utility.get_time);

Line 827: log('Finished '||bsc_aw_utility.get_time);

823: log_n(l_stmt||bsc_aw_utility.get_time);
824: end if;
825: bsc_aw_dbms_aw.execute(l_stmt);
826: if g_debug then
827: log('Finished '||bsc_aw_utility.get_time);
828: end if;
829: --update bsc_olap_object saying operation_flag='loaded'
830: bsc_aw_md_api.update_olap_object(l_dim,'dimension',l_dim,'dimension',null,null,'operation_flag','loaded');
831: Exception when others then

Line 886: if bsc_aw_utility.get_parameter_value('RECREATE CALENDAR')='Y' then

882: --
883: Begin
884: if bsc_aw_md_api.is_dim_present(p_calendar.dim_name) then
885: --check to see if the calendar matches the calendar in the olap metadata
886: if bsc_aw_utility.get_parameter_value('RECREATE CALENDAR')='Y' then
887: if g_debug then
888: log('RECREATE CALENDAR specified. Drop and recreate');
889: end if;
890: p_recreate:='create all';

Line 892: elsif bsc_aw_utility.get_parameter_value('REIMPLEMENT CALENDAR')='Y' then

888: log('RECREATE CALENDAR specified. Drop and recreate');
889: end if;
890: p_recreate:='create all';
891: drop_calendar_objects(p_calendar.dim_name,null,p_affected_kpi);
892: elsif bsc_aw_utility.get_parameter_value('REIMPLEMENT CALENDAR')='Y' then
893: if g_debug then
894: log('REIMPLEMENT CALENDAR specified. Merge create all');
895: end if;
896: p_recreate:='create all';

Line 897: elsif bsc_aw_utility.get_parameter_value('RECREATE PROGRAM')='Y' then

893: if g_debug then
894: log('REIMPLEMENT CALENDAR specified. Merge create all');
895: end if;
896: p_recreate:='create all';
897: elsif bsc_aw_utility.get_parameter_value('RECREATE PROGRAM')='Y' then
898: if g_debug then
899: log('RECREATE PROGRAM specified');
900: end if;
901: p_recreate:='create program';

Line 943: l_olap_periodicities(l_olap_periodicities.count+1):=bsc_aw_utility.get_parameter_value(l_oo(i).property1,'periodicity',',');

939: l_periodicities(l_periodicities.count+1):=p_calendar.periodicity(i).periodicity_id;
940: end loop;
941: for i in 1..l_oo.count loop
942: if l_oo(i).object_type='dimension level' then
943: l_olap_periodicities(l_olap_periodicities.count+1):=bsc_aw_utility.get_parameter_value(l_oo(i).property1,'periodicity',',');
944: l_olap_periodicity_dim(l_olap_periodicity_dim.count+1):=l_oo(i).object;
945: elsif l_oo(i).object_type='level name dim' then
946: l_level_name_dim:=l_oo(i).object;
947: end if;

Line 951: if bsc_aw_utility.in_array(l_periodicities,l_olap_periodicities(i))=false then

947: end if;
948: end loop;
949: --level name dim
950: for i in 1..l_olap_periodicities.count loop
951: if bsc_aw_utility.in_array(l_periodicities,l_olap_periodicities(i))=false then
952: p_recreate:='create all';
953: for j in 1..l_oor.count loop
954: if l_oor(j).relation_type='parent level' then
955: if l_oor(j).object=l_olap_periodicity_dim(i) or l_oor(j).relation_object=l_olap_periodicity_dim(i) then

Line 965: if bsc_aw_utility.in_array(l_olap_periodicities,l_periodicities(i))=false then

961: end loop;
962: --see if there are new periodicities we need to add
963: if p_recreate is null then
964: for i in 1..l_periodicities.count loop
965: if bsc_aw_utility.in_array(l_olap_periodicities,l_periodicities(i))=false then
966: p_recreate:='create all';
967: exit;
968: end if;
969: end loop;

Line 998: l_pc_1 bsc_aw_utility.parent_child_tb;

994: End;
995:
996: function compare_pc_relations(p_pc_1 parent_child_tb,p_pc_2 parent_child_tb) return number is
997: --
998: l_pc_1 bsc_aw_utility.parent_child_tb;
999: l_pc_2 bsc_aw_utility.parent_child_tb;
1000: Begin
1001: for i in 1..p_pc_1.count loop
1002: l_pc_1(i).parent:=p_pc_1(i).parent_dim_name;

Line 999: l_pc_2 bsc_aw_utility.parent_child_tb;

995:
996: function compare_pc_relations(p_pc_1 parent_child_tb,p_pc_2 parent_child_tb) return number is
997: --
998: l_pc_1 bsc_aw_utility.parent_child_tb;
999: l_pc_2 bsc_aw_utility.parent_child_tb;
1000: Begin
1001: for i in 1..p_pc_1.count loop
1002: l_pc_1(i).parent:=p_pc_1(i).parent_dim_name;
1003: l_pc_1(i).child:=p_pc_1(i).child_dim_name;

Line 1009: return bsc_aw_utility.compare_pc_relations(l_pc_1,l_pc_2);

1005: for i in 1..p_pc_2.count loop
1006: l_pc_2(i).parent:=p_pc_2(i).parent_dim_name;
1007: l_pc_2(i).child:=p_pc_2(i).child_dim_name;
1008: end loop;
1009: return bsc_aw_utility.compare_pc_relations(l_pc_1,l_pc_2);
1010: Exception when others then
1011: log_n('Exception in compare_pc_relations '||sqlerrm);
1012: raise;
1013: End;

Line 1036: bsc_aw_utility.delete_aw_object(l_bsc_olap_object(i).olap_object);

1032: end loop;
1033: if l_bsc_olap_object.count>0 then
1034: for i in 1..l_bsc_olap_object.count loop
1035: if l_flag(i)='N' and (l_bsc_olap_object(i).olap_object_type ='relation' or l_bsc_olap_object(i).olap_object_type ='variable') then
1036: bsc_aw_utility.delete_aw_object(l_bsc_olap_object(i).olap_object);
1037: l_flag(i):='Y';
1038: end if;
1039: end loop;
1040: for i in 1..l_bsc_olap_object.count loop

Line 1042: bsc_aw_utility.delete_aw_object(l_bsc_olap_object(i).olap_object);

1038: end if;
1039: end loop;
1040: for i in 1..l_bsc_olap_object.count loop
1041: if l_flag(i)='N' and l_bsc_olap_object(i).olap_object_type='concat dimension' then
1042: bsc_aw_utility.delete_aw_object(l_bsc_olap_object(i).olap_object);
1043: l_flag(i):='Y';
1044: end if;
1045: end loop;
1046: for i in 1..l_bsc_olap_object.count loop

Line 1048: bsc_aw_utility.delete_aw_object(l_bsc_olap_object(i).olap_object);

1044: end if;
1045: end loop;
1046: for i in 1..l_bsc_olap_object.count loop
1047: if l_flag(i)='N' and l_bsc_olap_object(i).olap_object_type='dimension' then
1048: bsc_aw_utility.delete_aw_object(l_bsc_olap_object(i).olap_object);
1049: l_flag(i):='Y';
1050: end if;
1051: end loop;
1052: --all other objects

Line 1055: bsc_aw_utility.delete_aw_object(l_bsc_olap_object(i).olap_object);

1051: end loop;
1052: --all other objects
1053: for i in 1..l_bsc_olap_object.count loop
1054: if l_flag(i)='N' then
1055: bsc_aw_utility.delete_aw_object(l_bsc_olap_object(i).olap_object);
1056: l_flag(i):='Y';
1057: end if;
1058: end loop;
1059: end if;

Line 1113: if bsc_aw_utility.in_array(p_periodicity_dim,l_missing_levels(j))=false then

1109: l_found:=false;
1110: get_missing_level_down(p_periodicity_dim(i),p_periodicity_dim,l_parent_child_calendar,l_missing_levels,l_missing_levels,l_found); --false is starting seed value
1111: if l_found and l_missing_levels.count>0 then
1112: for j in 1..l_missing_levels.count loop
1113: if bsc_aw_utility.in_array(p_periodicity_dim,l_missing_levels(j))=false then
1114: p_periodicity_dim(p_periodicity_dim.count+1):=l_missing_levels(j);
1115: p_lowest_level(p_periodicity_dim.count):='N';
1116: end if;
1117: end loop;

Line 1133: if bsc_aw_utility.in_array(p_periodicity_dim,l_missing_levels(j))=false then

1129: l_found:=false;
1130: get_missing_level_up(p_periodicity_dim(i),p_periodicity_dim,l_parent_child_calendar,l_missing_levels,l_missing_levels,l_found); --false is starting seed value
1131: if l_found and l_missing_levels.count>0 then
1132: for j in 1..l_missing_levels.count loop
1133: if bsc_aw_utility.in_array(p_periodicity_dim,l_missing_levels(j))=false then
1134: p_periodicity_dim(p_periodicity_dim.count+1):=l_missing_levels(j);
1135: p_lowest_level(p_periodicity_dim.count):='N';
1136: end if;
1137: end loop;

Line 1152: if p_parent_child(i).parent_dim_name=p_parent and bsc_aw_utility.in_array(p_periodicity_dim,p_parent_child(i).child_dim_name) then

1148: p_periodicity_dim dbms_sql.varchar2_table,
1149: p_parent_child parent_child_tb) return boolean is
1150: Begin
1151: for i in 1..p_parent_child.count loop
1152: if p_parent_child(i).parent_dim_name=p_parent and bsc_aw_utility.in_array(p_periodicity_dim,p_parent_child(i).child_dim_name) then
1153: return true;
1154: end if;
1155: end loop;
1156: return false;

Line 1168: if p_parent_child(i).child_dim_name=p_child and bsc_aw_utility.in_array(p_periodicity_dim,p_parent_child(i).parent_dim_name) then

1164: p_periodicity_dim dbms_sql.varchar2_table,
1165: p_parent_child parent_child_tb) return boolean is
1166: Begin
1167: for i in 1..p_parent_child.count loop
1168: if p_parent_child(i).child_dim_name=p_child and bsc_aw_utility.in_array(p_periodicity_dim,p_parent_child(i).parent_dim_name) then
1169: return true;
1170: end if;
1171: end loop;
1172: return false;

Line 1318: if bsc_aw_utility.in_array(p_lock_objects,l_objects(i))=false then

1314: end loop;
1315: --there are no limit cubes here like dim.?
1316: --
1317: for i in 1..l_objects.count loop
1318: if bsc_aw_utility.in_array(p_lock_objects,l_objects(i))=false then
1319: p_lock_objects(p_lock_objects.count+1):=l_objects(i);
1320: end if;
1321: end loop;
1322: Exception when others then

Line 1347: l_action bsc_aw_utility.boolean_table;

1343: if action('3') then
1344: ...
1345: end if;*/
1346: procedure upgrade(p_new_version number,p_old_version number) is
1347: l_action bsc_aw_utility.boolean_table;
1348: Begin
1349: if g_debug then
1350: log('Calendar upgrade New='||p_new_version||', Old='||p_old_version||bsc_aw_utility.get_time);
1351: end if;

Line 1350: log('Calendar upgrade New='||p_new_version||', Old='||p_old_version||bsc_aw_utility.get_time);

1346: procedure upgrade(p_new_version number,p_old_version number) is
1347: l_action bsc_aw_utility.boolean_table;
1348: Begin
1349: if g_debug then
1350: log('Calendar upgrade New='||p_new_version||', Old='||p_old_version||bsc_aw_utility.get_time);
1351: end if;
1352: init_all;
1353: if p_new_version>p_old_version then
1354: /*init all actions */

Line 1365: log('End upgrade calendar '||bsc_aw_utility.get_time);

1361: end if;
1362: end if;
1363: end if;
1364: if g_debug then
1365: log('End upgrade calendar '||bsc_aw_utility.get_time);
1366: end if;
1367: Exception when others then
1368: log_n('Exception in upgrade '||sqlerrm);
1369: raise;

Line 1384: l_cal_id:=to_number(bsc_aw_utility.get_parameter_value(l_oo(i).property1,'calendar',','));

1380: if instr(l_oo(i).property1,'dimension type=time')>0 then
1381: /*5017796. see if this calendar is still a valid implemented calendar in BSC */
1382: l_cal_id:=null;
1383: l_year:=null;
1384: l_cal_id:=to_number(bsc_aw_utility.get_parameter_value(l_oo(i).property1,'calendar',','));
1385: get_calendar_current_year(l_cal_id,l_year);
1386: if l_year is not null then
1387: bsc_aw_utility.merge_value(l_calendar,l_cal_id);
1388: end if;

Line 1387: bsc_aw_utility.merge_value(l_calendar,l_cal_id);

1383: l_year:=null;
1384: l_cal_id:=to_number(bsc_aw_utility.get_parameter_value(l_oo(i).property1,'calendar',','));
1385: get_calendar_current_year(l_cal_id,l_year);
1386: if l_year is not null then
1387: bsc_aw_utility.merge_value(l_calendar,l_cal_id);
1388: end if;
1389: end if;
1390: end loop;
1391: bsc_aw_utility.add_option('REIMPLEMENT CALENDAR',null,',');

Line 1391: bsc_aw_utility.add_option('REIMPLEMENT CALENDAR',null,',');

1387: bsc_aw_utility.merge_value(l_calendar,l_cal_id);
1388: end if;
1389: end if;
1390: end loop;
1391: bsc_aw_utility.add_option('REIMPLEMENT CALENDAR',null,',');
1392: for i in 1..l_calendar.count loop
1393: reimplement_calendar(l_calendar(i));
1394: end loop;
1395: Exception when others then

Line 1405: log('Reimplement calendar '||p_calendar_id||bsc_aw_utility.get_time);

1401: l_affected_kpi dbms_sql.varchar2_table;
1402: l_dim varchar2(100);
1403: Begin
1404: if g_debug then
1405: log('Reimplement calendar '||p_calendar_id||bsc_aw_utility.get_time);
1406: end if;
1407: create_calendar(p_calendar_id,l_affected_kpi);
1408: l_dim:=get_calendar_name(p_calendar_id);
1409: bsc_aw_md_api.update_olap_object(l_dim,'dimension',l_dim,'dimension',null,null,'operation_flag','empty');

Line 1421: bsc_aw_utility.get_db_lock('bsc_aw_table_create_lock');

1417: Begin
1418: if g_init is null or g_init=false then
1419: g_init:=true;
1420: /*5258418 we need to see if the temp tables and perm tables are created. serialize entry here */
1421: bsc_aw_utility.get_db_lock('bsc_aw_table_create_lock');
1422: bsc_aw_utility.create_temp_tables;
1423: bsc_aw_utility.create_perm_tables;
1424: bsc_aw_utility.release_db_lock('bsc_aw_table_create_lock');
1425: /* */

Line 1422: bsc_aw_utility.create_temp_tables;

1418: if g_init is null or g_init=false then
1419: g_init:=true;
1420: /*5258418 we need to see if the temp tables and perm tables are created. serialize entry here */
1421: bsc_aw_utility.get_db_lock('bsc_aw_table_create_lock');
1422: bsc_aw_utility.create_temp_tables;
1423: bsc_aw_utility.create_perm_tables;
1424: bsc_aw_utility.release_db_lock('bsc_aw_table_create_lock');
1425: /* */
1426: if bsc_aw_utility.get_parameter_value(bsc_aw_utility.g_options,'DEBUG LOG')='Y'

Line 1423: bsc_aw_utility.create_perm_tables;

1419: g_init:=true;
1420: /*5258418 we need to see if the temp tables and perm tables are created. serialize entry here */
1421: bsc_aw_utility.get_db_lock('bsc_aw_table_create_lock');
1422: bsc_aw_utility.create_temp_tables;
1423: bsc_aw_utility.create_perm_tables;
1424: bsc_aw_utility.release_db_lock('bsc_aw_table_create_lock');
1425: /* */
1426: if bsc_aw_utility.get_parameter_value(bsc_aw_utility.g_options,'DEBUG LOG')='Y'
1427: or bsc_aw_utility.g_log_level>=FND_LOG.G_CURRENT_RUNTIME_LEVEL then

Line 1424: bsc_aw_utility.release_db_lock('bsc_aw_table_create_lock');

1420: /*5258418 we need to see if the temp tables and perm tables are created. serialize entry here */
1421: bsc_aw_utility.get_db_lock('bsc_aw_table_create_lock');
1422: bsc_aw_utility.create_temp_tables;
1423: bsc_aw_utility.create_perm_tables;
1424: bsc_aw_utility.release_db_lock('bsc_aw_table_create_lock');
1425: /* */
1426: if bsc_aw_utility.get_parameter_value(bsc_aw_utility.g_options,'DEBUG LOG')='Y'
1427: or bsc_aw_utility.g_log_level>=FND_LOG.G_CURRENT_RUNTIME_LEVEL then
1428: g_debug:=true;

Line 1426: if bsc_aw_utility.get_parameter_value(bsc_aw_utility.g_options,'DEBUG LOG')='Y'

1422: bsc_aw_utility.create_temp_tables;
1423: bsc_aw_utility.create_perm_tables;
1424: bsc_aw_utility.release_db_lock('bsc_aw_table_create_lock');
1425: /* */
1426: if bsc_aw_utility.get_parameter_value(bsc_aw_utility.g_options,'DEBUG LOG')='Y'
1427: or bsc_aw_utility.g_log_level>=FND_LOG.G_CURRENT_RUNTIME_LEVEL then
1428: g_debug:=true;
1429: else
1430: g_debug:=false;

Line 1427: or bsc_aw_utility.g_log_level>=FND_LOG.G_CURRENT_RUNTIME_LEVEL then

1423: bsc_aw_utility.create_perm_tables;
1424: bsc_aw_utility.release_db_lock('bsc_aw_table_create_lock');
1425: /* */
1426: if bsc_aw_utility.get_parameter_value(bsc_aw_utility.g_options,'DEBUG LOG')='Y'
1427: or bsc_aw_utility.g_log_level>=FND_LOG.G_CURRENT_RUNTIME_LEVEL then
1428: g_debug:=true;
1429: else
1430: g_debug:=false;
1431: end if;

Line 1432: bsc_aw_utility.init_all(g_debug);

1428: g_debug:=true;
1429: else
1430: g_debug:=false;
1431: end if;
1432: bsc_aw_utility.init_all(g_debug);
1433: bsc_aw_dbms_aw.init_all;
1434: bsc_aw_md_api.init_all;
1435: bsc_aw_md_wrapper.init_all;
1436: bsc_aw_bsc_metadata.init_all;

Line 1447: bsc_aw_utility.log(p_message);

1443: End;
1444:
1445: procedure log(p_message varchar2) is
1446: Begin
1447: bsc_aw_utility.log(p_message);
1448: Exception when others then
1449: null;
1450: End;
1451: