DBA Data[Home] [Help]

APPS.BSC_BSC_ADAPTER dependencies on BSC_IM_UTILS

Line 92: p_measures BSC_IM_UTILS.varchar_tabletype,

88: end;
89:
90: function get_measures_by_table(
91: p_table_name varchar2,
92: p_measures BSC_IM_UTILS.varchar_tabletype,
93: p_number_measures number
94: ) return varchar2 is
95: cursor c1 is select column_name from bsc_db_tables_cols where table_name = p_table_name;
96: l_column_name VARCHAR2(100);

Line 154: p_options BSC_IM_UTILS.varchar_tabletype,

150:
151:
152: function load_metadata_for_indicators(
153: p_indicator varchar2,
154: p_options BSC_IM_UTILS.varchar_tabletype,
155: p_number_options number
156: )return boolean is
157: l_indicators BSC_IM_UTILS.number_tabletype;
158: l_number_indicators number;

Line 157: l_indicators BSC_IM_UTILS.number_tabletype;

153: p_indicator varchar2,
154: p_options BSC_IM_UTILS.varchar_tabletype,
155: p_number_options number
156: )return boolean is
157: l_indicators BSC_IM_UTILS.number_tabletype;
158: l_number_indicators number;
159: l_final_dimensions BSC_IM_UTILS.varchar_tabletype;
160: l_number_final_dimensions number;
161: Begin

Line 159: l_final_dimensions BSC_IM_UTILS.varchar_tabletype;

155: p_number_options number
156: )return boolean is
157: l_indicators BSC_IM_UTILS.number_tabletype;
158: l_number_indicators number;
159: l_final_dimensions BSC_IM_UTILS.varchar_tabletype;
160: l_number_final_dimensions number;
161: Begin
162: g_options:=p_options;
163: g_number_options:=p_number_options;

Line 175: BSC_IM_UTILS.g_status_message:=sqlerrm;

171: return false;
172: end if;
173: return true;
174: Exception when others then
175: BSC_IM_UTILS.g_status_message:=sqlerrm;
176: g_status_message:=sqlerrm;
177: write_to_log_file_n('Exception in load_metadata_for_indicators '||sqlerrm);
178: return false;
179: End;

Line 182: p_indicators BSC_IM_UTILS.number_tabletype,

178: return false;
179: End;
180:
181: function read_metadata(
182: p_indicators BSC_IM_UTILS.number_tabletype,
183: p_number_indicators number,
184: p_final_dimensions out nocopy BSC_IM_UTILS.varchar_tabletype,
185: p_number_final_dimensions out nocopy number
186: ) return boolean is

Line 184: p_final_dimensions out nocopy BSC_IM_UTILS.varchar_tabletype,

180:
181: function read_metadata(
182: p_indicators BSC_IM_UTILS.number_tabletype,
183: p_number_indicators number,
184: p_final_dimensions out nocopy BSC_IM_UTILS.varchar_tabletype,
185: p_number_final_dimensions out nocopy number
186: ) return boolean is
187: l_indicator_ids BSC_IM_UTILS.number_tabletype;
188: l_indicators BSC_IM_UTILS.varchar_tabletype;

Line 187: l_indicator_ids BSC_IM_UTILS.number_tabletype;

183: p_number_indicators number,
184: p_final_dimensions out nocopy BSC_IM_UTILS.varchar_tabletype,
185: p_number_final_dimensions out nocopy number
186: ) return boolean is
187: l_indicator_ids BSC_IM_UTILS.number_tabletype;
188: l_indicators BSC_IM_UTILS.varchar_tabletype;
189: Begin
190: for i in 1..p_number_indicators loop
191: l_indicator_ids(i):=p_indicators(i);

Line 188: l_indicators BSC_IM_UTILS.varchar_tabletype;

184: p_final_dimensions out nocopy BSC_IM_UTILS.varchar_tabletype,
185: p_number_final_dimensions out nocopy number
186: ) return boolean is
187: l_indicator_ids BSC_IM_UTILS.number_tabletype;
188: l_indicators BSC_IM_UTILS.varchar_tabletype;
189: Begin
190: for i in 1..p_number_indicators loop
191: l_indicator_ids(i):=p_indicators(i);
192: l_indicators(i):=p_indicators(i);

Line 211: BSC_IM_UTILS.g_status_message:=sqlerrm;

207: return false;
208: end if;
209: return true;
210: Exception when others then
211: BSC_IM_UTILS.g_status_message:=sqlerrm;
212: g_status_message:=sqlerrm;
213: write_to_log_file_n('Exception in read_metadata '||sqlerrm);
214: return false;
215: End;

Line 218: p_indicators BSC_IM_UTILS.number_tabletype,

214: return false;
215: End;
216:
217: function read_kpi_required(
218: p_indicators BSC_IM_UTILS.number_tabletype,
219: p_indicator_names BSC_IM_UTILS.varchar_tabletype,
220: p_number_indicators number
221: ) return boolean is
222: -----------------------------------------------------------------

Line 219: p_indicator_names BSC_IM_UTILS.varchar_tabletype,

215: End;
216:
217: function read_kpi_required(
218: p_indicators BSC_IM_UTILS.number_tabletype,
219: p_indicator_names BSC_IM_UTILS.varchar_tabletype,
220: p_number_indicators number
221: ) return boolean is
222: -----------------------------------------------------------------
223: l_stmt varchar2(5000);

Line 224: l_periodicity BSC_IM_UTILS.number_tabletype;

220: p_number_indicators number
221: ) return boolean is
222: -----------------------------------------------------------------
223: l_stmt varchar2(5000);
224: l_periodicity BSC_IM_UTILS.number_tabletype;
225: l_number_periodicity number;
226: -----------------------------------------------------------------
227: Begin
228: write_to_debug_n('In read_kpi_required '||get_time);

Line 244: BSC_IM_UTILS.g_status_message:=sqlerrm;

240: end if;
241: end loop;
242: return true;
243: Exception when others then
244: BSC_IM_UTILS.g_status_message:=sqlerrm;
245: g_status_message:=sqlerrm;
246: write_to_log_file_n('Exception in read_kpi_required '||sqlerrm);
247: return false;
248: End;

Line 255: p_periodicity BSC_IM_UTILS.number_tabletype,

251: this api for XTD supported MV
252: */
253: function read_kpi_map_info(
254: p_indicator number,
255: p_periodicity BSC_IM_UTILS.number_tabletype,
256: p_number_periodicity number
257: )return boolean is
258: -----------------------------------------------------------------
259: l_map_name varchar2(200);

Line 266: l_s_tables BSC_IM_UTILS.varchar_tabletype;

262: -----------------------------------------------------------------
263: l_mv_name varchar2(200);
264: l_zero_code_mv_name varchar2(200);
265: -----------------------------------------------------------------
266: l_s_tables BSC_IM_UTILS.varchar_tabletype;
267: l_periodicity BSC_IM_UTILS.number_tabletype;
268: l_number_s_tables number;
269: -----------------------------------------------------------------
270: l_distinct_list BSC_IM_UTILS.varchar_tabletype;

Line 267: l_periodicity BSC_IM_UTILS.number_tabletype;

263: l_mv_name varchar2(200);
264: l_zero_code_mv_name varchar2(200);
265: -----------------------------------------------------------------
266: l_s_tables BSC_IM_UTILS.varchar_tabletype;
267: l_periodicity BSC_IM_UTILS.number_tabletype;
268: l_number_s_tables number;
269: -----------------------------------------------------------------
270: l_distinct_list BSC_IM_UTILS.varchar_tabletype;
271: l_number_distinct_list number;

Line 270: l_distinct_list BSC_IM_UTILS.varchar_tabletype;

266: l_s_tables BSC_IM_UTILS.varchar_tabletype;
267: l_periodicity BSC_IM_UTILS.number_tabletype;
268: l_number_s_tables number;
269: -----------------------------------------------------------------
270: l_distinct_list BSC_IM_UTILS.varchar_tabletype;
271: l_number_distinct_list number;
272: -----------------------------------------------------------------
273: l_temp_var BSC_IM_UTILS.varchar_tabletype;
274: l_number_temp_var number;

Line 273: l_temp_var BSC_IM_UTILS.varchar_tabletype;

269: -----------------------------------------------------------------
270: l_distinct_list BSC_IM_UTILS.varchar_tabletype;
271: l_number_distinct_list number;
272: -----------------------------------------------------------------
273: l_temp_var BSC_IM_UTILS.varchar_tabletype;
274: l_number_temp_var number;
275: -----------------------------------------------------------------
276: ll_s_tables BSC_IM_UTILS.varchar_tabletype;
277: ll_number_s_tables number;

Line 276: ll_s_tables BSC_IM_UTILS.varchar_tabletype;

272: -----------------------------------------------------------------
273: l_temp_var BSC_IM_UTILS.varchar_tabletype;
274: l_number_temp_var number;
275: -----------------------------------------------------------------
276: ll_s_tables BSC_IM_UTILS.varchar_tabletype;
277: ll_number_s_tables number;
278: -----------------------------------------------------------------
279:
280: -- added 02/13/2006 by Arun

Line 291: p_options BSC_IM_UTILS.varchar_tabletype;

287: --ignoring xtd pattern due to PMD bug 4503527 not having an upgrade script yet
288: --or xtd_pattern is null )
289: and periodicity_type not in (11,12);
290: l_dummy number;
291: p_options BSC_IM_UTILS.varchar_tabletype;
292: l_calendar_id number;
293:
294: Begin
295: if g_debug then

Line 337: l_lang:=BSC_IM_UTILS.get_lang;

333: --l_base_tables are the B tables
334: --for each S table, find the set (all periodicities)
335: --SB tables are considered in the same league as the S tables
336: --MV are created for the SB tables.
337: l_lang:=BSC_IM_UTILS.get_lang;
338: ----------------------
339: --create the metadata for KPI
340: if BSC_IM_INT_MD.create_cube(p_indicator,p_indicator,0,'BSC',p_indicator,null)=false then
341: return false;

Line 349: if BSC_IM_UTILS.in_array(l_distinct_list,l_number_distinct_list,substr(l_s_tables(i),1,

345: return false;
346: end if;
347: l_number_distinct_list:=0;
348: for i in 1..l_number_s_tables loop
349: if BSC_IM_UTILS.in_array(l_distinct_list,l_number_distinct_list,substr(l_s_tables(i),1,
350: instr(l_s_tables(i),'_',-1)-1))=false then
351: l_number_distinct_list:=l_number_distinct_list+1;
352: l_distinct_list(l_number_distinct_list):=substr(l_s_tables(i),1,instr(l_s_tables(i),'_',-1)-1);
353: end if;

Line 423: BSC_IM_UTILS.g_status_message:=sqlerrm;

419: write_to_log_file_n('Returning from read_kpi_map_info '||get_time);
420: end if;
421: return true;
422: Exception when others then
423: BSC_IM_UTILS.g_status_message:=sqlerrm;
424: g_status_message:=sqlerrm;
425: write_to_log_file_n('Exception in read_kpi_map_info '||sqlerrm);
426: return false;
427: End;

Line 430: function get_distinct_list(p_parameter IN BSC_IM_UTILS.varchar_tabletype, l_number_parameters IN NUMBER) return number is

426: return false;
427: End;
428:
429: --bug 3867313
430: function get_distinct_list(p_parameter IN BSC_IM_UTILS.varchar_tabletype, l_number_parameters IN NUMBER) return number is
431: l_final_list BSC_IM_UTILS.varchar_tabletype;
432: l_final_counter number := 0;
433: bFound boolean := false;
434: begin

Line 431: l_final_list BSC_IM_UTILS.varchar_tabletype;

427: End;
428:
429: --bug 3867313
430: function get_distinct_list(p_parameter IN BSC_IM_UTILS.varchar_tabletype, l_number_parameters IN NUMBER) return number is
431: l_final_list BSC_IM_UTILS.varchar_tabletype;
432: l_final_counter number := 0;
433: bFound boolean := false;
434: begin
435: for i in 1..l_number_parameters loop

Line 457: p_s_tables BSC_IM_UTILS.varchar_tabletype,

453: p_map_name varchar2,
454: p_mv_name varchar2,
455: p_zero_code_mv_name varchar2,
456: p_zero_code_map_name varchar2,
457: p_s_tables BSC_IM_UTILS.varchar_tabletype,
458: p_number_s_tables number
459: )return boolean is
460: ---------------s table info-------------------------------------
461: l_fk BSC_IM_UTILS.varchar_tabletype;

Line 461: l_fk BSC_IM_UTILS.varchar_tabletype;

457: p_s_tables BSC_IM_UTILS.varchar_tabletype,
458: p_number_s_tables number
459: )return boolean is
460: ---------------s table info-------------------------------------
461: l_fk BSC_IM_UTILS.varchar_tabletype;
462: l_number_fk number;
463: l_measures BSC_IM_UTILS.varchar_tabletype;
464: l_number_measures number;
465: ---------------src table info-------------------------------------

Line 463: l_measures BSC_IM_UTILS.varchar_tabletype;

459: )return boolean is
460: ---------------s table info-------------------------------------
461: l_fk BSC_IM_UTILS.varchar_tabletype;
462: l_number_fk number;
463: l_measures BSC_IM_UTILS.varchar_tabletype;
464: l_number_measures number;
465: ---------------src table info-------------------------------------
466: l_tables BSC_IM_UTILS.varchar_tabletype;
467: l_source_tables BSC_IM_UTILS.varchar_tabletype;

Line 466: l_tables BSC_IM_UTILS.varchar_tabletype;

462: l_number_fk number;
463: l_measures BSC_IM_UTILS.varchar_tabletype;
464: l_number_measures number;
465: ---------------src table info-------------------------------------
466: l_tables BSC_IM_UTILS.varchar_tabletype;
467: l_source_tables BSC_IM_UTILS.varchar_tabletype;
468: l_relation_type BSC_IM_UTILS.varchar_tabletype;
469: l_source_sql BSC_IM_UTILS.varchar_tabletype;
470: l_table_periodicity BSC_IM_UTILS.number_tabletype;

Line 467: l_source_tables BSC_IM_UTILS.varchar_tabletype;

463: l_measures BSC_IM_UTILS.varchar_tabletype;
464: l_number_measures number;
465: ---------------src table info-------------------------------------
466: l_tables BSC_IM_UTILS.varchar_tabletype;
467: l_source_tables BSC_IM_UTILS.varchar_tabletype;
468: l_relation_type BSC_IM_UTILS.varchar_tabletype;
469: l_source_sql BSC_IM_UTILS.varchar_tabletype;
470: l_table_periodicity BSC_IM_UTILS.number_tabletype;
471: l_table_period_type_id BSC_IM_UTILS.number_tabletype;

Line 468: l_relation_type BSC_IM_UTILS.varchar_tabletype;

464: l_number_measures number;
465: ---------------src table info-------------------------------------
466: l_tables BSC_IM_UTILS.varchar_tabletype;
467: l_source_tables BSC_IM_UTILS.varchar_tabletype;
468: l_relation_type BSC_IM_UTILS.varchar_tabletype;
469: l_source_sql BSC_IM_UTILS.varchar_tabletype;
470: l_table_periodicity BSC_IM_UTILS.number_tabletype;
471: l_table_period_type_id BSC_IM_UTILS.number_tabletype;
472: l_periodicity_id_stmt varchar2(20000);

Line 469: l_source_sql BSC_IM_UTILS.varchar_tabletype;

465: ---------------src table info-------------------------------------
466: l_tables BSC_IM_UTILS.varchar_tabletype;
467: l_source_tables BSC_IM_UTILS.varchar_tabletype;
468: l_relation_type BSC_IM_UTILS.varchar_tabletype;
469: l_source_sql BSC_IM_UTILS.varchar_tabletype;
470: l_table_periodicity BSC_IM_UTILS.number_tabletype;
471: l_table_period_type_id BSC_IM_UTILS.number_tabletype;
472: l_periodicity_id_stmt varchar2(20000);
473: l_eliminate BSC_IM_UTILS.varchar_tabletype;--these are for S tables with SB as src, to have not exists(..)

Line 470: l_table_periodicity BSC_IM_UTILS.number_tabletype;

466: l_tables BSC_IM_UTILS.varchar_tabletype;
467: l_source_tables BSC_IM_UTILS.varchar_tabletype;
468: l_relation_type BSC_IM_UTILS.varchar_tabletype;
469: l_source_sql BSC_IM_UTILS.varchar_tabletype;
470: l_table_periodicity BSC_IM_UTILS.number_tabletype;
471: l_table_period_type_id BSC_IM_UTILS.number_tabletype;
472: l_periodicity_id_stmt varchar2(20000);
473: l_eliminate BSC_IM_UTILS.varchar_tabletype;--these are for S tables with SB as src, to have not exists(..)
474: l_group BSC_IM_UTILS.number_tabletype;

Line 471: l_table_period_type_id BSC_IM_UTILS.number_tabletype;

467: l_source_tables BSC_IM_UTILS.varchar_tabletype;
468: l_relation_type BSC_IM_UTILS.varchar_tabletype;
469: l_source_sql BSC_IM_UTILS.varchar_tabletype;
470: l_table_periodicity BSC_IM_UTILS.number_tabletype;
471: l_table_period_type_id BSC_IM_UTILS.number_tabletype;
472: l_periodicity_id_stmt varchar2(20000);
473: l_eliminate BSC_IM_UTILS.varchar_tabletype;--these are for S tables with SB as src, to have not exists(..)
474: l_group BSC_IM_UTILS.number_tabletype;
475: l_number_source_tables number;

Line 473: l_eliminate BSC_IM_UTILS.varchar_tabletype;--these are for S tables with SB as src, to have not exists(..)

469: l_source_sql BSC_IM_UTILS.varchar_tabletype;
470: l_table_periodicity BSC_IM_UTILS.number_tabletype;
471: l_table_period_type_id BSC_IM_UTILS.number_tabletype;
472: l_periodicity_id_stmt varchar2(20000);
473: l_eliminate BSC_IM_UTILS.varchar_tabletype;--these are for S tables with SB as src, to have not exists(..)
474: l_group BSC_IM_UTILS.number_tabletype;
475: l_number_source_tables number;
476: ---------------group column info---------------------------------
477: --used in the algo to come up with the min number of union all statements

Line 474: l_group BSC_IM_UTILS.number_tabletype;

470: l_table_periodicity BSC_IM_UTILS.number_tabletype;
471: l_table_period_type_id BSC_IM_UTILS.number_tabletype;
472: l_periodicity_id_stmt varchar2(20000);
473: l_eliminate BSC_IM_UTILS.varchar_tabletype;--these are for S tables with SB as src, to have not exists(..)
474: l_group BSC_IM_UTILS.number_tabletype;
475: l_number_source_tables number;
476: ---------------group column info---------------------------------
477: --used in the algo to come up with the min number of union all statements
478: l_group_number BSC_IM_UTILS.number_tabletype;--grp number

Line 478: l_group_number BSC_IM_UTILS.number_tabletype;--grp number

474: l_group BSC_IM_UTILS.number_tabletype;
475: l_number_source_tables number;
476: ---------------group column info---------------------------------
477: --used in the algo to come up with the min number of union all statements
478: l_group_number BSC_IM_UTILS.number_tabletype;--grp number
479: l_group_column_formula BSC_IM_UTILS.varchar_tabletype;
480: l_group_column BSC_IM_UTILS.varchar_tabletype;
481: l_number_group_column number;
482: -----------S table columns--------------------------------------

Line 479: l_group_column_formula BSC_IM_UTILS.varchar_tabletype;

475: l_number_source_tables number;
476: ---------------group column info---------------------------------
477: --used in the algo to come up with the min number of union all statements
478: l_group_number BSC_IM_UTILS.number_tabletype;--grp number
479: l_group_column_formula BSC_IM_UTILS.varchar_tabletype;
480: l_group_column BSC_IM_UTILS.varchar_tabletype;
481: l_number_group_column number;
482: -----------S table columns--------------------------------------
483: l_col_table BSC_IM_UTILS.varchar_tabletype;

Line 480: l_group_column BSC_IM_UTILS.varchar_tabletype;

476: ---------------group column info---------------------------------
477: --used in the algo to come up with the min number of union all statements
478: l_group_number BSC_IM_UTILS.number_tabletype;--grp number
479: l_group_column_formula BSC_IM_UTILS.varchar_tabletype;
480: l_group_column BSC_IM_UTILS.varchar_tabletype;
481: l_number_group_column number;
482: -----------S table columns--------------------------------------
483: l_col_table BSC_IM_UTILS.varchar_tabletype;
484: l_cols BSC_IM_UTILS.varchar_tabletype;

Line 483: l_col_table BSC_IM_UTILS.varchar_tabletype;

479: l_group_column_formula BSC_IM_UTILS.varchar_tabletype;
480: l_group_column BSC_IM_UTILS.varchar_tabletype;
481: l_number_group_column number;
482: -----------S table columns--------------------------------------
483: l_col_table BSC_IM_UTILS.varchar_tabletype;
484: l_cols BSC_IM_UTILS.varchar_tabletype;
485: l_col_type BSC_IM_UTILS.varchar_tabletype;
486: l_col_formula BSC_IM_UTILS.varchar_tabletype;
487: l_col_source BSC_IM_UTILS.varchar_tabletype;

Line 484: l_cols BSC_IM_UTILS.varchar_tabletype;

480: l_group_column BSC_IM_UTILS.varchar_tabletype;
481: l_number_group_column number;
482: -----------S table columns--------------------------------------
483: l_col_table BSC_IM_UTILS.varchar_tabletype;
484: l_cols BSC_IM_UTILS.varchar_tabletype;
485: l_col_type BSC_IM_UTILS.varchar_tabletype;
486: l_col_formula BSC_IM_UTILS.varchar_tabletype;
487: l_col_source BSC_IM_UTILS.varchar_tabletype;
488: l_number_cols number;

Line 485: l_col_type BSC_IM_UTILS.varchar_tabletype;

481: l_number_group_column number;
482: -----------S table columns--------------------------------------
483: l_col_table BSC_IM_UTILS.varchar_tabletype;
484: l_cols BSC_IM_UTILS.varchar_tabletype;
485: l_col_type BSC_IM_UTILS.varchar_tabletype;
486: l_col_formula BSC_IM_UTILS.varchar_tabletype;
487: l_col_source BSC_IM_UTILS.varchar_tabletype;
488: l_number_cols number;
489: ------------for 0 code ------------------------------------------

Line 486: l_col_formula BSC_IM_UTILS.varchar_tabletype;

482: -----------S table columns--------------------------------------
483: l_col_table BSC_IM_UTILS.varchar_tabletype;
484: l_cols BSC_IM_UTILS.varchar_tabletype;
485: l_col_type BSC_IM_UTILS.varchar_tabletype;
486: l_col_formula BSC_IM_UTILS.varchar_tabletype;
487: l_col_source BSC_IM_UTILS.varchar_tabletype;
488: l_number_cols number;
489: ------------for 0 code ------------------------------------------
490: l_calculation_table BSC_IM_UTILS.varchar_tabletype;

Line 487: l_col_source BSC_IM_UTILS.varchar_tabletype;

483: l_col_table BSC_IM_UTILS.varchar_tabletype;
484: l_cols BSC_IM_UTILS.varchar_tabletype;
485: l_col_type BSC_IM_UTILS.varchar_tabletype;
486: l_col_formula BSC_IM_UTILS.varchar_tabletype;
487: l_col_source BSC_IM_UTILS.varchar_tabletype;
488: l_number_cols number;
489: ------------for 0 code ------------------------------------------
490: l_calculation_table BSC_IM_UTILS.varchar_tabletype;
491: l_calculation_type BSC_IM_UTILS.varchar_tabletype;

Line 490: l_calculation_table BSC_IM_UTILS.varchar_tabletype;

486: l_col_formula BSC_IM_UTILS.varchar_tabletype;
487: l_col_source BSC_IM_UTILS.varchar_tabletype;
488: l_number_cols number;
489: ------------for 0 code ------------------------------------------
490: l_calculation_table BSC_IM_UTILS.varchar_tabletype;
491: l_calculation_type BSC_IM_UTILS.varchar_tabletype;
492: l_parameter1 BSC_IM_UTILS.varchar_tabletype;
493: l_parameter2 BSC_IM_UTILS.varchar_tabletype;
494: l_parameter3 BSC_IM_UTILS.varchar_tabletype;

Line 491: l_calculation_type BSC_IM_UTILS.varchar_tabletype;

487: l_col_source BSC_IM_UTILS.varchar_tabletype;
488: l_number_cols number;
489: ------------for 0 code ------------------------------------------
490: l_calculation_table BSC_IM_UTILS.varchar_tabletype;
491: l_calculation_type BSC_IM_UTILS.varchar_tabletype;
492: l_parameter1 BSC_IM_UTILS.varchar_tabletype;
493: l_parameter2 BSC_IM_UTILS.varchar_tabletype;
494: l_parameter3 BSC_IM_UTILS.varchar_tabletype;
495: l_parameter4 BSC_IM_UTILS.varchar_tabletype;

Line 492: l_parameter1 BSC_IM_UTILS.varchar_tabletype;

488: l_number_cols number;
489: ------------for 0 code ------------------------------------------
490: l_calculation_table BSC_IM_UTILS.varchar_tabletype;
491: l_calculation_type BSC_IM_UTILS.varchar_tabletype;
492: l_parameter1 BSC_IM_UTILS.varchar_tabletype;
493: l_parameter2 BSC_IM_UTILS.varchar_tabletype;
494: l_parameter3 BSC_IM_UTILS.varchar_tabletype;
495: l_parameter4 BSC_IM_UTILS.varchar_tabletype;
496: l_parameter5 BSC_IM_UTILS.varchar_tabletype;

Line 493: l_parameter2 BSC_IM_UTILS.varchar_tabletype;

489: ------------for 0 code ------------------------------------------
490: l_calculation_table BSC_IM_UTILS.varchar_tabletype;
491: l_calculation_type BSC_IM_UTILS.varchar_tabletype;
492: l_parameter1 BSC_IM_UTILS.varchar_tabletype;
493: l_parameter2 BSC_IM_UTILS.varchar_tabletype;
494: l_parameter3 BSC_IM_UTILS.varchar_tabletype;
495: l_parameter4 BSC_IM_UTILS.varchar_tabletype;
496: l_parameter5 BSC_IM_UTILS.varchar_tabletype;
497: l_number_parameters number;

Line 494: l_parameter3 BSC_IM_UTILS.varchar_tabletype;

490: l_calculation_table BSC_IM_UTILS.varchar_tabletype;
491: l_calculation_type BSC_IM_UTILS.varchar_tabletype;
492: l_parameter1 BSC_IM_UTILS.varchar_tabletype;
493: l_parameter2 BSC_IM_UTILS.varchar_tabletype;
494: l_parameter3 BSC_IM_UTILS.varchar_tabletype;
495: l_parameter4 BSC_IM_UTILS.varchar_tabletype;
496: l_parameter5 BSC_IM_UTILS.varchar_tabletype;
497: l_number_parameters number;
498: -----------------------------------------------------------------

Line 495: l_parameter4 BSC_IM_UTILS.varchar_tabletype;

491: l_calculation_type BSC_IM_UTILS.varchar_tabletype;
492: l_parameter1 BSC_IM_UTILS.varchar_tabletype;
493: l_parameter2 BSC_IM_UTILS.varchar_tabletype;
494: l_parameter3 BSC_IM_UTILS.varchar_tabletype;
495: l_parameter4 BSC_IM_UTILS.varchar_tabletype;
496: l_parameter5 BSC_IM_UTILS.varchar_tabletype;
497: l_number_parameters number;
498: -----------------------------------------------------------------
499: l_select_sql varchar2(32000);

Line 496: l_parameter5 BSC_IM_UTILS.varchar_tabletype;

492: l_parameter1 BSC_IM_UTILS.varchar_tabletype;
493: l_parameter2 BSC_IM_UTILS.varchar_tabletype;
494: l_parameter3 BSC_IM_UTILS.varchar_tabletype;
495: l_parameter4 BSC_IM_UTILS.varchar_tabletype;
496: l_parameter5 BSC_IM_UTILS.varchar_tabletype;
497: l_number_parameters number;
498: -----------------------------------------------------------------
499: l_select_sql varchar2(32000);
500: l_select_sql_inc varchar2(32000);--for incremental mv sql

Line 510: l_filter_from BSC_IM_UTILS.varchar_tabletype;

506: l_select_basic varchar2(32000);
507: l_select_no_aggregation varchar2(32000);
508: b_no_agg boolean;
509: -----------------------------------------------------------------
510: l_filter_from BSC_IM_UTILS.varchar_tabletype;
511: l_filter_where BSC_IM_UTILS.varchar_tabletype;
512: l_number_filter number;
513: l_filter_first_level BSC_IM_UTILS.varchar_tabletype;
514: l_filter_first_level_alias BSC_IM_UTILS.varchar_tabletype;

Line 511: l_filter_where BSC_IM_UTILS.varchar_tabletype;

507: l_select_no_aggregation varchar2(32000);
508: b_no_agg boolean;
509: -----------------------------------------------------------------
510: l_filter_from BSC_IM_UTILS.varchar_tabletype;
511: l_filter_where BSC_IM_UTILS.varchar_tabletype;
512: l_number_filter number;
513: l_filter_first_level BSC_IM_UTILS.varchar_tabletype;
514: l_filter_first_level_alias BSC_IM_UTILS.varchar_tabletype;
515: l_filter_first_level_fk BSC_IM_UTILS.varchar_tabletype;

Line 513: l_filter_first_level BSC_IM_UTILS.varchar_tabletype;

509: -----------------------------------------------------------------
510: l_filter_from BSC_IM_UTILS.varchar_tabletype;
511: l_filter_where BSC_IM_UTILS.varchar_tabletype;
512: l_number_filter number;
513: l_filter_first_level BSC_IM_UTILS.varchar_tabletype;
514: l_filter_first_level_alias BSC_IM_UTILS.varchar_tabletype;
515: l_filter_first_level_fk BSC_IM_UTILS.varchar_tabletype;
516: l_num_filter_first_level number;
517: -----------------------------------------------------------------

Line 514: l_filter_first_level_alias BSC_IM_UTILS.varchar_tabletype;

510: l_filter_from BSC_IM_UTILS.varchar_tabletype;
511: l_filter_where BSC_IM_UTILS.varchar_tabletype;
512: l_number_filter number;
513: l_filter_first_level BSC_IM_UTILS.varchar_tabletype;
514: l_filter_first_level_alias BSC_IM_UTILS.varchar_tabletype;
515: l_filter_first_level_fk BSC_IM_UTILS.varchar_tabletype;
516: l_num_filter_first_level number;
517: -----------------------------------------------------------------
518: --for zero code

Line 515: l_filter_first_level_fk BSC_IM_UTILS.varchar_tabletype;

511: l_filter_where BSC_IM_UTILS.varchar_tabletype;
512: l_number_filter number;
513: l_filter_first_level BSC_IM_UTILS.varchar_tabletype;
514: l_filter_first_level_alias BSC_IM_UTILS.varchar_tabletype;
515: l_filter_first_level_fk BSC_IM_UTILS.varchar_tabletype;
516: l_num_filter_first_level number;
517: -----------------------------------------------------------------
518: --for zero code
519: --there may be more than 1 fk for rollup. we need to have a union for each

Line 522: l_rollup_select_sql BSC_IM_UTILS.varchar_tabletype;

518: --for zero code
519: --there may be more than 1 fk for rollup. we need to have a union for each
520: --of the fks with rollup and then one more union with zero code for all the keys
521: --combined
522: l_rollup_select_sql BSC_IM_UTILS.varchar_tabletype;
523: l_rollup_from_sql BSC_IM_UTILS.varchar_tabletype;
524: l_rollup_where_sql BSC_IM_UTILS.varchar_tabletype;
525: l_rollup_group_by_sql BSC_IM_UTILS.varchar_tabletype;
526: l_number_rollup_sql number;

Line 523: l_rollup_from_sql BSC_IM_UTILS.varchar_tabletype;

519: --there may be more than 1 fk for rollup. we need to have a union for each
520: --of the fks with rollup and then one more union with zero code for all the keys
521: --combined
522: l_rollup_select_sql BSC_IM_UTILS.varchar_tabletype;
523: l_rollup_from_sql BSC_IM_UTILS.varchar_tabletype;
524: l_rollup_where_sql BSC_IM_UTILS.varchar_tabletype;
525: l_rollup_group_by_sql BSC_IM_UTILS.varchar_tabletype;
526: l_number_rollup_sql number;
527: ----------

Line 524: l_rollup_where_sql BSC_IM_UTILS.varchar_tabletype;

520: --of the fks with rollup and then one more union with zero code for all the keys
521: --combined
522: l_rollup_select_sql BSC_IM_UTILS.varchar_tabletype;
523: l_rollup_from_sql BSC_IM_UTILS.varchar_tabletype;
524: l_rollup_where_sql BSC_IM_UTILS.varchar_tabletype;
525: l_rollup_group_by_sql BSC_IM_UTILS.varchar_tabletype;
526: l_number_rollup_sql number;
527: ----------
528: --l_rollup... will contain stmts with union all. these are used to create fast refresh mv

Line 525: l_rollup_group_by_sql BSC_IM_UTILS.varchar_tabletype;

521: --combined
522: l_rollup_select_sql BSC_IM_UTILS.varchar_tabletype;
523: l_rollup_from_sql BSC_IM_UTILS.varchar_tabletype;
524: l_rollup_where_sql BSC_IM_UTILS.varchar_tabletype;
525: l_rollup_group_by_sql BSC_IM_UTILS.varchar_tabletype;
526: l_number_rollup_sql number;
527: ----------
528: --l_rollup... will contain stmts with union all. these are used to create fast refresh mv
529: -- but in the case where we cannot have fast refresh mv, we need to go for full refresh mv.

Line 541: l_b_tables BSC_IM_UTILS.varchar_tabletype;

537: l_db_version varchar2(200);
538: -----------------------------------------------------------------
539: --used for dummy MV creation.
540: --dummy MV are created for snapshot log maintenance
541: l_b_tables BSC_IM_UTILS.varchar_tabletype;
542: l_number_b_tables number;
543: l_dim_level_tables BSC_IM_UTILS.varchar_tabletype;
544: l_number_dim_level_tables number;
545: -----------------------------------------------------------------

Line 543: l_dim_level_tables BSC_IM_UTILS.varchar_tabletype;

539: --used for dummy MV creation.
540: --dummy MV are created for snapshot log maintenance
541: l_b_tables BSC_IM_UTILS.varchar_tabletype;
542: l_number_b_tables number;
543: l_dim_level_tables BSC_IM_UTILS.varchar_tabletype;
544: l_number_dim_level_tables number;
545: -----------------------------------------------------------------
546: l_base_table_stmt varchar2(20000);--this is the stmt that will be used for snapshot log creation
547: l_dim_level_stmt varchar2(20000);--this will be used to create snapshot log on the dim level

Line 552: l_bt_tables BSC_IM_UTILS.varchar_tabletype;

548: -----------------------------------------------------------------
549: l_full_zero_code_map_name varchar2(200);
550: -----------------------------------------------------------------
551: l_lowest_s_table varchar2(200);
552: l_bt_tables BSC_IM_UTILS.varchar_tabletype;
553: l_number_bt_tables number;
554: -----------------------------------------------------------------
555: l_return_var varchar2(10);
556: l_number_keys number :=0;

Line 567: l_db_version:=BSC_IM_UTILS.get_db_version;

563: write_to_log_file_n('In create_kpi_map_info '||p_map_name||' '||p_mv_name);
564: write_to_log_file_n('In Create_kpi_map_info'||' '||get_time);
565: end if;
566: l_number_source_tables:=0;
567: l_db_version:=BSC_IM_UTILS.get_db_version;
568: l_number_parameters:=0;
569: l_full_zero_code_map_name:=p_zero_code_map_name||'_FULL';
570: --get the fk of the summary tables
571: --if get_table_fks(p_s_tables,p_number_s_tables,l_fk,l_number_fk)=false then

Line 639: l_return_var := BSC_IM_UTILS.get_option_value(g_options,g_number_options,'NO ROLLUP');

635: l_number_cols)=false then
636: return false;
637: end if;
638: --get 0 code calculations
639: l_return_var := BSC_IM_UTILS.get_option_value(g_options,g_number_options,'NO ROLLUP');
640:
641: if l_return_var='Y' then
642: if g_debug then
643: write_to_log_file_n('No rollup specified');

Line 678: if BSC_IM_UTILS.is_like(l_source_tables(i),'BSC_B_') then

674: --------------------------------------------------------------------------
675: l_number_b_tables:=0;
676: l_number_dim_level_tables:=0;
677: for i in 1..l_number_source_tables loop
678: if BSC_IM_UTILS.is_like(l_source_tables(i),'BSC_B_') then
679: if BSC_IM_UTILS.in_array(l_b_tables,l_number_b_tables,l_source_tables(i))=false then
680: l_number_b_tables:=l_number_b_tables+1;
681: l_b_tables(l_number_b_tables):=l_source_tables(i);
682: end if;

Line 679: if BSC_IM_UTILS.in_array(l_b_tables,l_number_b_tables,l_source_tables(i))=false then

675: l_number_b_tables:=0;
676: l_number_dim_level_tables:=0;
677: for i in 1..l_number_source_tables loop
678: if BSC_IM_UTILS.is_like(l_source_tables(i),'BSC_B_') then
679: if BSC_IM_UTILS.in_array(l_b_tables,l_number_b_tables,l_source_tables(i))=false then
680: l_number_b_tables:=l_number_b_tables+1;
681: l_b_tables(l_number_b_tables):=l_source_tables(i);
682: end if;
683: end if;

Line 690: if BSC_IM_UTILS.is_like(l_source_tables(i),'BSC_T_') then --this is a T table

686: write_to_log_file_n('Process the T tables');
687: end if;
688: l_periodicity_id_stmt:=' periodicity_id in (';
689: for i in 1..l_number_source_tables loop
690: if BSC_IM_UTILS.is_like(l_source_tables(i),'BSC_T_') then --this is a T table
691: --construct the sql
692: --we need to get the level tables also here because snp logs need to be created on level tables too
693: --do we need to get the filter to the base tables for T?
694: if get_table_sql(l_source_tables(i),l_source_sql(i),l_b_tables,l_number_b_tables,

Line 725: ll_fk BSC_IM_UTILS.varchar_tabletype;

721: end if;
722: -----------------------------------
723: --load the base table column info also into int metadata for snapshot log
724: declare
725: ll_fk BSC_IM_UTILS.varchar_tabletype;
726: ll_number_fk number;
727: ll_measures BSC_IM_UTILS.varchar_tabletype;
728: ll_number_measures number;
729: begin

Line 727: ll_measures BSC_IM_UTILS.varchar_tabletype;

723: --load the base table column info also into int metadata for snapshot log
724: declare
725: ll_fk BSC_IM_UTILS.varchar_tabletype;
726: ll_number_fk number;
727: ll_measures BSC_IM_UTILS.varchar_tabletype;
728: ll_number_measures number;
729: begin
730: for i in 1..l_number_b_tables loop
731: if get_table_fks(l_b_tables(i),ll_fk,ll_number_fk)=false then

Line 791: ll_col BSC_IM_UTILS.varchar_tabletype;

787: we use the same formula as the lowest S table.
788: */
789: declare
790: -----------------------------------
791: ll_col BSC_IM_UTILS.varchar_tabletype;
792: ll_col_formula BSC_IM_UTILS.varchar_tabletype;
793: ll_number_col number;
794: ll_index number;
795: -----------------------------------

Line 792: ll_col_formula BSC_IM_UTILS.varchar_tabletype;

788: */
789: declare
790: -----------------------------------
791: ll_col BSC_IM_UTILS.varchar_tabletype;
792: ll_col_formula BSC_IM_UTILS.varchar_tabletype;
793: ll_number_col number;
794: ll_index number;
795: -----------------------------------
796: ll_rollup_found boolean;

Line 797: ll_table BSC_IM_UTILS.varchar_tabletype;

793: ll_number_col number;
794: ll_index number;
795: -----------------------------------
796: ll_rollup_found boolean;
797: ll_table BSC_IM_UTILS.varchar_tabletype;
798: ll_number_table number;
799: ll_calculation_type BSC_IM_UTILS.varchar_tabletype;
800: ll_parameter1 BSC_IM_UTILS.varchar_tabletype;
801: ll_parameter2 BSC_IM_UTILS.varchar_tabletype;

Line 799: ll_calculation_type BSC_IM_UTILS.varchar_tabletype;

795: -----------------------------------
796: ll_rollup_found boolean;
797: ll_table BSC_IM_UTILS.varchar_tabletype;
798: ll_number_table number;
799: ll_calculation_type BSC_IM_UTILS.varchar_tabletype;
800: ll_parameter1 BSC_IM_UTILS.varchar_tabletype;
801: ll_parameter2 BSC_IM_UTILS.varchar_tabletype;
802: ll_parameter3 BSC_IM_UTILS.varchar_tabletype;
803: ll_parameter4 BSC_IM_UTILS.varchar_tabletype;

Line 800: ll_parameter1 BSC_IM_UTILS.varchar_tabletype;

796: ll_rollup_found boolean;
797: ll_table BSC_IM_UTILS.varchar_tabletype;
798: ll_number_table number;
799: ll_calculation_type BSC_IM_UTILS.varchar_tabletype;
800: ll_parameter1 BSC_IM_UTILS.varchar_tabletype;
801: ll_parameter2 BSC_IM_UTILS.varchar_tabletype;
802: ll_parameter3 BSC_IM_UTILS.varchar_tabletype;
803: ll_parameter4 BSC_IM_UTILS.varchar_tabletype;
804: ll_parameter5 BSC_IM_UTILS.varchar_tabletype;

Line 801: ll_parameter2 BSC_IM_UTILS.varchar_tabletype;

797: ll_table BSC_IM_UTILS.varchar_tabletype;
798: ll_number_table number;
799: ll_calculation_type BSC_IM_UTILS.varchar_tabletype;
800: ll_parameter1 BSC_IM_UTILS.varchar_tabletype;
801: ll_parameter2 BSC_IM_UTILS.varchar_tabletype;
802: ll_parameter3 BSC_IM_UTILS.varchar_tabletype;
803: ll_parameter4 BSC_IM_UTILS.varchar_tabletype;
804: ll_parameter5 BSC_IM_UTILS.varchar_tabletype;
805: ll_number_parameters number;

Line 802: ll_parameter3 BSC_IM_UTILS.varchar_tabletype;

798: ll_number_table number;
799: ll_calculation_type BSC_IM_UTILS.varchar_tabletype;
800: ll_parameter1 BSC_IM_UTILS.varchar_tabletype;
801: ll_parameter2 BSC_IM_UTILS.varchar_tabletype;
802: ll_parameter3 BSC_IM_UTILS.varchar_tabletype;
803: ll_parameter4 BSC_IM_UTILS.varchar_tabletype;
804: ll_parameter5 BSC_IM_UTILS.varchar_tabletype;
805: ll_number_parameters number;
806: -----------------------------------

Line 803: ll_parameter4 BSC_IM_UTILS.varchar_tabletype;

799: ll_calculation_type BSC_IM_UTILS.varchar_tabletype;
800: ll_parameter1 BSC_IM_UTILS.varchar_tabletype;
801: ll_parameter2 BSC_IM_UTILS.varchar_tabletype;
802: ll_parameter3 BSC_IM_UTILS.varchar_tabletype;
803: ll_parameter4 BSC_IM_UTILS.varchar_tabletype;
804: ll_parameter5 BSC_IM_UTILS.varchar_tabletype;
805: ll_number_parameters number;
806: -----------------------------------
807: begin

Line 804: ll_parameter5 BSC_IM_UTILS.varchar_tabletype;

800: ll_parameter1 BSC_IM_UTILS.varchar_tabletype;
801: ll_parameter2 BSC_IM_UTILS.varchar_tabletype;
802: ll_parameter3 BSC_IM_UTILS.varchar_tabletype;
803: ll_parameter4 BSC_IM_UTILS.varchar_tabletype;
804: ll_parameter5 BSC_IM_UTILS.varchar_tabletype;
805: ll_number_parameters number;
806: -----------------------------------
807: begin
808: for i in 1..l_number_source_tables loop

Line 809: if BSC_IM_UTILS.is_like(l_source_tables(i),'BSC_T_') or

805: ll_number_parameters number;
806: -----------------------------------
807: begin
808: for i in 1..l_number_source_tables loop
809: if BSC_IM_UTILS.is_like(l_source_tables(i),'BSC_T_') or
810: BSC_IM_UTILS.is_like(l_source_tables(i),'BSC_B_') then --this is a T or B table
811: l_lowest_s_table:=l_tables(i);
812: exit;
813: end if;

Line 810: BSC_IM_UTILS.is_like(l_source_tables(i),'BSC_B_') then --this is a T or B table

806: -----------------------------------
807: begin
808: for i in 1..l_number_source_tables loop
809: if BSC_IM_UTILS.is_like(l_source_tables(i),'BSC_T_') or
810: BSC_IM_UTILS.is_like(l_source_tables(i),'BSC_B_') then --this is a T or B table
811: l_lowest_s_table:=l_tables(i);
812: exit;
813: end if;
814: end loop;

Line 835: ll_index:=BSC_IM_UTILS.get_index(ll_col,ll_number_col,l_cols(i));

831: --set the higher levels
832: for i in 1..l_number_cols loop
833: if l_col_table(i) <> l_lowest_s_table then
834: ll_index:=0;
835: ll_index:=BSC_IM_UTILS.get_index(ll_col,ll_number_col,l_cols(i));
836: if ll_index>0 then
837: if l_col_formula(i) <> ll_col_formula(ll_index) then
838: if g_debug then
839: write_to_log_file('For '||l_col_table(i)||', changing '||l_col_formula(i)||' to '||

Line 868: ll_index:=BSC_IM_UTILS.get_index(l_cols,l_number_cols,l_parameter3(i));

864: end if;
865: for i in 1..l_number_parameters loop
866: if l_calculation_table(i)=l_lowest_s_table then
867: ll_index:=0;
868: ll_index:=BSC_IM_UTILS.get_index(l_cols,l_number_cols,l_parameter3(i));
869: if ll_index>0 then
870: if g_debug then
871: write_to_log_file('Changing '||l_parameter5(i)||' to '||l_col_formula(ll_index));
872: end if;

Line 905: ll_index:=BSC_IM_UTILS.get_index(ll_parameter3,ll_number_parameters,l_parameter3(j));

901: for j in 1..l_number_parameters loop
902: if l_calculation_table(j)=p_s_tables(i) then
903: ll_rollup_found:=true;
904: ll_index:=0;
905: ll_index:=BSC_IM_UTILS.get_index(ll_parameter3,ll_number_parameters,l_parameter3(j));
906: if ll_index>0 then
907: if l_parameter5(j)<>ll_parameter5(ll_index) then
908: if g_debug then
909: write_to_log_file('For '||l_calculation_table(j)||', changing '||l_parameter5(j)||

Line 964: ll_tables BSC_IM_UTILS.varchar_tabletype;

960: --make one source.
961: --see if we need to resolve the source. if the relation is B1,B2-> 24_5 -> 24_3 -> 24_1
962: --then we need to make B1,B2-> 24_5 B1,B2-> 24_3 B1,B2-> 24_1
963: declare
964: ll_tables BSC_IM_UTILS.varchar_tabletype;
965: ll_source_tables BSC_IM_UTILS.varchar_tabletype;
966: ll_relation_type BSC_IM_UTILS.varchar_tabletype;
967: ll_source_sql BSC_IM_UTILS.varchar_tabletype;
968: ll_table_periodicity BSC_IM_UTILS.number_tabletype;

Line 965: ll_source_tables BSC_IM_UTILS.varchar_tabletype;

961: --see if we need to resolve the source. if the relation is B1,B2-> 24_5 -> 24_3 -> 24_1
962: --then we need to make B1,B2-> 24_5 B1,B2-> 24_3 B1,B2-> 24_1
963: declare
964: ll_tables BSC_IM_UTILS.varchar_tabletype;
965: ll_source_tables BSC_IM_UTILS.varchar_tabletype;
966: ll_relation_type BSC_IM_UTILS.varchar_tabletype;
967: ll_source_sql BSC_IM_UTILS.varchar_tabletype;
968: ll_table_periodicity BSC_IM_UTILS.number_tabletype;
969: ll_number_source_tables number;

Line 966: ll_relation_type BSC_IM_UTILS.varchar_tabletype;

962: --then we need to make B1,B2-> 24_5 B1,B2-> 24_3 B1,B2-> 24_1
963: declare
964: ll_tables BSC_IM_UTILS.varchar_tabletype;
965: ll_source_tables BSC_IM_UTILS.varchar_tabletype;
966: ll_relation_type BSC_IM_UTILS.varchar_tabletype;
967: ll_source_sql BSC_IM_UTILS.varchar_tabletype;
968: ll_table_periodicity BSC_IM_UTILS.number_tabletype;
969: ll_number_source_tables number;
970: ------------------------------------------

Line 967: ll_source_sql BSC_IM_UTILS.varchar_tabletype;

963: declare
964: ll_tables BSC_IM_UTILS.varchar_tabletype;
965: ll_source_tables BSC_IM_UTILS.varchar_tabletype;
966: ll_relation_type BSC_IM_UTILS.varchar_tabletype;
967: ll_source_sql BSC_IM_UTILS.varchar_tabletype;
968: ll_table_periodicity BSC_IM_UTILS.number_tabletype;
969: ll_number_source_tables number;
970: ------------------------------------------
971: ll_list BSC_IM_UTILS.varchar_tabletype;

Line 968: ll_table_periodicity BSC_IM_UTILS.number_tabletype;

964: ll_tables BSC_IM_UTILS.varchar_tabletype;
965: ll_source_tables BSC_IM_UTILS.varchar_tabletype;
966: ll_relation_type BSC_IM_UTILS.varchar_tabletype;
967: ll_source_sql BSC_IM_UTILS.varchar_tabletype;
968: ll_table_periodicity BSC_IM_UTILS.number_tabletype;
969: ll_number_source_tables number;
970: ------------------------------------------
971: ll_list BSC_IM_UTILS.varchar_tabletype;
972: ll_list_2 BSC_IM_UTILS.varchar_tabletype;

Line 971: ll_list BSC_IM_UTILS.varchar_tabletype;

967: ll_source_sql BSC_IM_UTILS.varchar_tabletype;
968: ll_table_periodicity BSC_IM_UTILS.number_tabletype;
969: ll_number_source_tables number;
970: ------------------------------------------
971: ll_list BSC_IM_UTILS.varchar_tabletype;
972: ll_list_2 BSC_IM_UTILS.varchar_tabletype;
973: ll_number_list number;
974: ll_found boolean;
975: ll_count integer;

Line 972: ll_list_2 BSC_IM_UTILS.varchar_tabletype;

968: ll_table_periodicity BSC_IM_UTILS.number_tabletype;
969: ll_number_source_tables number;
970: ------------------------------------------
971: ll_list BSC_IM_UTILS.varchar_tabletype;
972: ll_list_2 BSC_IM_UTILS.varchar_tabletype;
973: ll_number_list number;
974: ll_found boolean;
975: ll_count integer;
976: -----------------------------------------

Line 977: ll_bt_measures BSC_IM_UTILS.varchar_tabletype;

973: ll_number_list number;
974: ll_found boolean;
975: ll_count integer;
976: -----------------------------------------
977: ll_bt_measures BSC_IM_UTILS.varchar_tabletype;
978: ll_number_bt_measures number;
979: ll_column_merge_group BSC_IM_UTILS.varchar_tabletype;
980: ll_column_merge_group_sql BSC_IM_UTILS.varchar_tabletype;
981: ll_number_column_merge_group number;

Line 979: ll_column_merge_group BSC_IM_UTILS.varchar_tabletype;

975: ll_count integer;
976: -----------------------------------------
977: ll_bt_measures BSC_IM_UTILS.varchar_tabletype;
978: ll_number_bt_measures number;
979: ll_column_merge_group BSC_IM_UTILS.varchar_tabletype;
980: ll_column_merge_group_sql BSC_IM_UTILS.varchar_tabletype;
981: ll_number_column_merge_group number;
982: ll_column_merge_sql BSC_IM_UTILS.varchar_tabletype; --uses p_number_s_tables
983: ll_merge_sql varchar2(32000);

Line 980: ll_column_merge_group_sql BSC_IM_UTILS.varchar_tabletype;

976: -----------------------------------------
977: ll_bt_measures BSC_IM_UTILS.varchar_tabletype;
978: ll_number_bt_measures number;
979: ll_column_merge_group BSC_IM_UTILS.varchar_tabletype;
980: ll_column_merge_group_sql BSC_IM_UTILS.varchar_tabletype;
981: ll_number_column_merge_group number;
982: ll_column_merge_sql BSC_IM_UTILS.varchar_tabletype; --uses p_number_s_tables
983: ll_merge_sql varchar2(32000);
984:

Line 982: ll_column_merge_sql BSC_IM_UTILS.varchar_tabletype; --uses p_number_s_tables

978: ll_number_bt_measures number;
979: ll_column_merge_group BSC_IM_UTILS.varchar_tabletype;
980: ll_column_merge_group_sql BSC_IM_UTILS.varchar_tabletype;
981: ll_number_column_merge_group number;
982: ll_column_merge_sql BSC_IM_UTILS.varchar_tabletype; --uses p_number_s_tables
983: ll_merge_sql varchar2(32000);
984:
985: ll_bt_measures_by_table VARCHAR2(32000);
986: -----------------------------------------

Line 998: if BSC_IM_UTILS.is_like(l_source_tables(i),'BSC_B_')

994: --there is a difference between l_number_bt_tables and l_number_b_tables
995: --l_number_bt_tables sees how many B and T tables feed this base the first level summary
996: --l_number_b_tables goes recursively down and sees all the B tables involved.
997: for i in 1..l_number_source_tables loop
998: if BSC_IM_UTILS.is_like(l_source_tables(i),'BSC_B_')
999: or BSC_IM_UTILS.is_like(l_source_tables(i),'BSC_T_') then
1000: l_number_bt_tables:=l_number_bt_tables+1;
1001: l_bt_tables(l_number_bt_tables):=l_source_tables(i);
1002: end if;

Line 999: or BSC_IM_UTILS.is_like(l_source_tables(i),'BSC_T_') then

995: --l_number_bt_tables sees how many B and T tables feed this base the first level summary
996: --l_number_b_tables goes recursively down and sees all the B tables involved.
997: for i in 1..l_number_source_tables loop
998: if BSC_IM_UTILS.is_like(l_source_tables(i),'BSC_B_')
999: or BSC_IM_UTILS.is_like(l_source_tables(i),'BSC_T_') then
1000: l_number_bt_tables:=l_number_bt_tables+1;
1001: l_bt_tables(l_number_bt_tables):=l_source_tables(i);
1002: end if;
1003: end loop;

Line 1051: BSC_IM_UTILS.is_like(l_source_tables(j),'BSC_B_')

1047: ll_column_merge_sql(i):=null;
1048: ll_number_column_merge_group:=0;
1049: for j in 1..l_number_source_tables loop
1050: if l_tables(j)=p_s_tables(i) and (
1051: BSC_IM_UTILS.is_like(l_source_tables(j),'BSC_B_')
1052: or BSC_IM_UTILS.is_like(l_source_tables(j),'BSC_T_')) then
1053: ll_number_list:=ll_number_list+1;
1054: ll_list(ll_number_list):=l_source_tables(j);
1055: ll_list_2(ll_number_list):=l_source_sql(j);

Line 1052: or BSC_IM_UTILS.is_like(l_source_tables(j),'BSC_T_')) then

1048: ll_number_column_merge_group:=0;
1049: for j in 1..l_number_source_tables loop
1050: if l_tables(j)=p_s_tables(i) and (
1051: BSC_IM_UTILS.is_like(l_source_tables(j),'BSC_B_')
1052: or BSC_IM_UTILS.is_like(l_source_tables(j),'BSC_T_')) then
1053: ll_number_list:=ll_number_list+1;
1054: ll_list(ll_number_list):=l_source_tables(j);
1055: ll_list_2(ll_number_list):=l_source_sql(j);
1056: end if;

Line 1089: if BSC_IM_UTILS.in_array(l_measures,l_number_measures,ll_list(j)) then

1085: ll_number_list)=false then
1086: return false;
1087: end if;
1088: for j in 1..ll_number_list loop
1089: if BSC_IM_UTILS.in_array(l_measures,l_number_measures,ll_list(j)) then
1090: ll_number_bt_measures:=ll_number_bt_measures+1;
1091: ll_bt_measures(ll_number_bt_measures):=ll_list(j);
1092: end if;
1093: end loop;

Line 1119: if bsc_im_utils.is_column_in_object(l_filter_first_level(j),'LANGUAGE') then

1115: for j in 1..l_num_filter_first_level loop
1116: ll_column_merge_sql(i):=ll_column_merge_sql(i)||' and '||ll_column_merge_group(1)||'.'||
1117: l_filter_first_level_fk(j)||'='||l_filter_first_level_alias(j)||'.code ';
1118: --3613094
1119: if bsc_im_utils.is_column_in_object(l_filter_first_level(j),'LANGUAGE') then
1120: ll_column_merge_sql(i):=ll_column_merge_sql(i)||' and '||
1121: l_filter_first_level_alias(j)||'.language='''||BSC_IM_UTILS.get_lang||'''';
1122: end if;
1123: end loop;

Line 1121: l_filter_first_level_alias(j)||'.language='''||BSC_IM_UTILS.get_lang||'''';

1117: l_filter_first_level_fk(j)||'='||l_filter_first_level_alias(j)||'.code ';
1118: --3613094
1119: if bsc_im_utils.is_column_in_object(l_filter_first_level(j),'LANGUAGE') then
1120: ll_column_merge_sql(i):=ll_column_merge_sql(i)||' and '||
1121: l_filter_first_level_alias(j)||'.language='''||BSC_IM_UTILS.get_lang||'''';
1122: end if;
1123: end loop;
1124: for j in 1..l_number_filter loop
1125: ll_column_merge_sql(i):=ll_column_merge_sql(i)||' '||l_filter_where(j);

Line 1169: if bsc_im_utils.is_column_in_object(l_filter_first_level(k),'LANGUAGE') then

1165: for k in 1..l_num_filter_first_level loop
1166: ll_column_merge_sql(i):=ll_column_merge_sql(i)||' and '||ll_column_merge_group(j)||'.'||
1167: l_filter_first_level_fk(k)||'='||l_filter_first_level_alias(k)||'.code ';
1168: --3613094
1169: if bsc_im_utils.is_column_in_object(l_filter_first_level(k),'LANGUAGE') then
1170: ll_column_merge_sql(i):=ll_column_merge_sql(i)||' and '||
1171: l_filter_first_level_alias(k)||'.language='''||BSC_IM_UTILS.get_lang||''' ';
1172: end if;
1173: end loop;

Line 1171: l_filter_first_level_alias(k)||'.language='''||BSC_IM_UTILS.get_lang||''' ';

1167: l_filter_first_level_fk(k)||'='||l_filter_first_level_alias(k)||'.code ';
1168: --3613094
1169: if bsc_im_utils.is_column_in_object(l_filter_first_level(k),'LANGUAGE') then
1170: ll_column_merge_sql(i):=ll_column_merge_sql(i)||' and '||
1171: l_filter_first_level_alias(k)||'.language='''||BSC_IM_UTILS.get_lang||''' ';
1172: end if;
1173: end loop;
1174: for k in 1..l_number_filter loop
1175: ll_column_merge_sql(i):=ll_column_merge_sql(i)||' '||l_filter_where(k);

Line 1209: if BSC_IM_UTILS.is_like(l_source_tables(i),'BSC_B_')

1205: ll_merge_sql := ' (