DBA Data[Home] [Help]

APPS.BSC_MO_UI_PKG dependencies on BSC_MO_HELPER_PKG

Line 13: l_schema := BSC_MO_HELPER_PKG.getBSCSchema;

9: l_stmt VARCHAR2(300);
10: BEGIN
11: l_schema := pSchema;
12: IF (l_schema IS NULL) THEN
13: l_schema := BSC_MO_HELPER_PKG.getBSCSchema;
14: END IF;
15: l_stmt := 'TRUNCATE TABLE '||l_schema||'.'||pTableName;
16: execute immediate l_stmt;
17: END;

Line 45: BSC_METADATA_OPTIMIZER_PKG.gBSCSchema := BSC_MO_HELPER_PKG.getBSCSchema;

41: l_start_time date := sysdate;
42:
43: BEGIN
44: IF BSC_METADATA_OPTIMIZER_PKG.gBSCSchema IS NULL THEN
45: BSC_METADATA_OPTIMIZER_PKG.gBSCSchema := BSC_MO_HELPER_PKG.getBSCSchema;
46: END IF;
47: numNewTables := 0;
48:
49: g_recursion_ctr := g_recursion_ctr +1 ;

Line 107: bsc_mo_helper_pkg.writeTmp( 'Compl. InsertRelatedTables');

103: End If;
104: End If;
105:
106: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
107: bsc_mo_helper_pkg.writeTmp( 'Compl. InsertRelatedTables');
108: END IF;
109:
110: EXCEPTION WHEN OTHERS THEN
111: l_error := sqlerrm;

Line 112: bsc_mo_helper_pkg.writeTmp( 'Error in InsertRelatedTables :'||l_error, FND_LOG.LEVEL_UNEXPECTED);

108: END IF;
109:
110: EXCEPTION WHEN OTHERS THEN
111: l_error := sqlerrm;
112: bsc_mo_helper_pkg.writeTmp( 'Error in InsertRelatedTables :'||l_error, FND_LOG.LEVEL_UNEXPECTED);
113: RAISE;
114: End;
115:
116:

Line 131: bsc_mo_helper_pkg.writeTmp('Inside MarkIndicsAndTables');

127: l_start_time date := sysdate;
128:
129: BEGIN
130: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
131: bsc_mo_helper_pkg.writeTmp('Inside MarkIndicsAndTables');
132: END IF;
133: --Initialize the array garrTables the tables used by the indicators in the array garrIndics()
134: --EDW Integration note:
135: --In BSC_KPI_DATA_TABLES, Metadata Optimizer is storing the name of the view (Example: BSC_3001_0_0_5_V)

Line 164: bsc_mo_helper_pkg.writeTmp('Done with InsertRelatedTables');

160: --Insert in the array garrTables() all the tables in the current
161: --graph that have any relation with them
162: InsertRelatedTables(BSC_METADATA_OPTIMIZER_PKG.gnumTables);
163: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
164: bsc_mo_helper_pkg.writeTmp('Done with InsertRelatedTables');
165: END IF;
166:
167: l_stmt := 'INSERT INTO BSC_TMP_OPT_UI_KPIS (INDICATOR, PROTOTYPE_FLAG, PROCESS_ID)
168: SELECT DISTINCT INDICATOR, 3, :1 FROM BSC_TMP_OPT_KPI_DATA

Line 179: bsc_mo_helper_pkg.writeTmp('Exception in MarkIndicsAndTables : '||l_error);

175: END IF;
176:
177: EXCEPTION WHEN OTHERS THEN
178: l_error := sqlerrm;
179: bsc_mo_helper_pkg.writeTmp('Exception in MarkIndicsAndTables : '||l_error);
180: raise;
181: End;
182:
183:

Line 225: strWhereInIndics := bsc_mo_helper_pkg.Get_New_Big_In_Cond_Number(9, 'I.INDICATOR');

221: --Init and array with the measures used by the indicators flagged for
222: --non-structural changes
223:
224: numMeasures := 0;
225: strWhereInIndics := bsc_mo_helper_pkg.Get_New_Big_In_Cond_Number(9, 'I.INDICATOR');
226: i:= 0;
227: LOOP
228: EXIT WHEN i=BSC_METADATA_OPTIMIZER_PKG.gnumIndics4;
229: bsc_mo_helper_pkg.Add_Value_Big_In_Cond_Number( 9, BSC_METADATA_OPTIMIZER_PKG.garrIndics4(i));

Line 229: bsc_mo_helper_pkg.Add_Value_Big_In_Cond_Number( 9, BSC_METADATA_OPTIMIZER_PKG.garrIndics4(i));

225: strWhereInIndics := bsc_mo_helper_pkg.Get_New_Big_In_Cond_Number(9, 'I.INDICATOR');
226: i:= 0;
227: LOOP
228: EXIT WHEN i=BSC_METADATA_OPTIMIZER_PKG.gnumIndics4;
229: bsc_mo_helper_pkg.Add_Value_Big_In_Cond_Number( 9, BSC_METADATA_OPTIMIZER_PKG.garrIndics4(i));
230: i:=i+1;
231: END LOOP;
232:
233: --PMF-BSC Integration: Filter out PMF measures

Line 265: NumOperands := bsc_mo_helper_pkg.GetFieldExpression(Operands, l_measureCol);

261:
262: LOOP
263: FETCH cv into l_measureID, l_measureCol;
264: EXIT WHEN cv%NOTFOUND;
265: NumOperands := bsc_mo_helper_pkg.GetFieldExpression(Operands, l_measureCol);
266: i:= Operands.first;
267: LOOP
268: EXIT WHEN Operands.count =0 ;
269: IF bsc_mo_helper_pkg.SearchStringExists(arrMeasuresCols, numMeasures, Operands(i)) THEN

Line 269: IF bsc_mo_helper_pkg.SearchStringExists(arrMeasuresCols, numMeasures, Operands(i)) THEN

265: NumOperands := bsc_mo_helper_pkg.GetFieldExpression(Operands, l_measureCol);
266: i:= Operands.first;
267: LOOP
268: EXIT WHEN Operands.count =0 ;
269: IF bsc_mo_helper_pkg.SearchStringExists(arrMeasuresCols, numMeasures, Operands(i)) THEN
270: --One operand of the formula is one of the measures of a indicator flagged with 4
271: --We need to add this formula (measure) to the related ones
272: arrRelatedMeasuresIds(arrRelatedMeasuresIds.count) := l_measureID;
273: END IF;

Line 285: strWhereInMeasures := bsc_mo_helper_pkg.Get_New_Big_In_Cond_Number( 9, 'MEASURE_ID');

281: --Now we need to add to garrIndics4() all the indicators using any of the measures
282: --in arrRelatedMeasuresIds()
283:
284: IF arrRelatedMeasuresIds.count > 0 THEN
285: strWhereInMeasures := bsc_mo_helper_pkg.Get_New_Big_In_Cond_Number( 9, 'MEASURE_ID');
286: i:= arrRelatedMeasuresIds.first;
287:
288: LOOP
289: EXIT WHEN i=arrRelatedMeasuresIds.last;

Line 290: bsc_mo_helper_pkg.Add_Value_Big_In_Cond_Number( 9, arrRelatedMeasuresIds(i));

286: i:= arrRelatedMeasuresIds.first;
287:
288: LOOP
289: EXIT WHEN i=arrRelatedMeasuresIds.last;
290: bsc_mo_helper_pkg.Add_Value_Big_In_Cond_Number( 9, arrRelatedMeasuresIds(i));
291: i:= arrRelatedMeasuresIds.next(i);
292: END LOOP;
293:
294: l_stmt := 'SELECT DISTINCT INDICATOR FROM BSC_DB_MEASURE_BY_KPI_V '||

Line 300: IF Not bsc_mo_helper_pkg.SearchNumberExists(BSC_METADATA_OPTIMIZER_PKG.garrIndics4, BSC_METADATA_OPTIMIZER_PKG.gnumIndics4, l_measureCol) THEN

296: open cv for L_stmt;
297: LOOP
298: fetch cv into l_measureCol;
299: EXIT WHEN cv%NOTFOUND;
300: IF Not bsc_mo_helper_pkg.SearchNumberExists(BSC_METADATA_OPTIMIZER_PKG.garrIndics4, BSC_METADATA_OPTIMIZER_PKG.gnumIndics4, l_measureCol) THEN
301: BSC_METADATA_OPTIMIZER_PKG.garrIndics4(BSC_METADATA_OPTIMIZER_PKG.gnumIndics4) := l_measureCol;
302: BSC_METADATA_OPTIMIZER_PKG.gnumIndics4 := BSC_METADATA_OPTIMIZER_PKG.gnumIndics4 + 1;
303: END IF;
304: END Loop;

Line 310: bsc_mo_helper_pkg.writeTmp('Completed MarkIndicsForNonStrucChanges', FND_LOG.LEVEL_PROCEDURE);

306: l_stack := l_stack ||' Check 5 ';
307: END IF;
308:
309: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
310: bsc_mo_helper_pkg.writeTmp('Completed MarkIndicsForNonStrucChanges', FND_LOG.LEVEL_PROCEDURE);
311: END IF;
312:
313: EXCEPTION WHEN OTHERS THEN
314: l_error := sqlerrm;

Line 315: bsc_mo_helper_pkg.writeTmp('Exception in MarkIndicsForNonStrucChanges : '||l_error);

311: END IF;
312:
313: EXCEPTION WHEN OTHERS THEN
314: l_error := sqlerrm;
315: bsc_mo_helper_pkg.writeTmp('Exception in MarkIndicsForNonStrucChanges : '||l_error);
316: bsc_mo_helper_pkg.writeTmp('Local Stack dump = '||l_stack);
317: raise;
318: End;
319:

Line 316: bsc_mo_helper_pkg.writeTmp('Local Stack dump = '||l_stack);

312:
313: EXCEPTION WHEN OTHERS THEN
314: l_error := sqlerrm;
315: bsc_mo_helper_pkg.writeTmp('Exception in MarkIndicsForNonStrucChanges : '||l_error);
316: bsc_mo_helper_pkg.writeTmp('Local Stack dump = '||l_stack);
317: raise;
318: End;
319:
320:

Line 327: --bsc_mo_helper_pkg.dropTable('BSC_TMP_OPT_UI_KPIS');

323: INDICATOR NUMBER, PROTOTYPE_FLAG NUMBER, PROCESS_ID NUMBER) ';
324:
325: --PRAGMA AUTONOMOUS_TRANSACTION;
326: BEGIN
327: --bsc_mo_helper_pkg.dropTable('BSC_TMP_OPT_UI_KPIS');
328: BSC_MO_HELPER_PKG.Do_DDL(l_stmt, ad_ddl.create_table, 'BSC_TMP_OPT_UI_KPIS');
329: --commit;
330: END;
331:

Line 328: BSC_MO_HELPER_PKG.Do_DDL(l_stmt, ad_ddl.create_table, 'BSC_TMP_OPT_UI_KPIS');

324:
325: --PRAGMA AUTONOMOUS_TRANSACTION;
326: BEGIN
327: --bsc_mo_helper_pkg.dropTable('BSC_TMP_OPT_UI_KPIS');
328: BSC_MO_HELPER_PKG.Do_DDL(l_stmt, ad_ddl.create_table, 'BSC_TMP_OPT_UI_KPIS');
329: --commit;
330: END;
331:
332: --Procedure added for bug 3911548

Line 338: bsc_mo_helper_pkg.dropTable('BSC_TMP_OPT_KPI_DATA');

334: l_stmt varchar2(1000);
335: begin
336: IF (NOT BSC_DBGEN_UTILS.IS_TMP_TABLE_EXISTED('BSC_TMP_OPT_KPI_DATA')) THEN
337: begin
338: bsc_mo_helper_pkg.dropTable('BSC_TMP_OPT_KPI_DATA');
339: exception when others then
340: null;
341: end;
342:

Line 344: BSC_MO_HELPER_PKG.Do_DDL(l_stmt, ad_ddl.create_table, 'BSC_TMP_OPT_KPI_DATA');

340: null;
341: end;
342:
343: l_stmt := 'CREATE GLOBAL TEMPORARY TABLE BSC_TMP_OPT_KPI_DATA (INDICATOR NUMBER, TABLE_NAME VARCHAR2(100)) ON COMMIT PRESERVE ROWS';
344: BSC_MO_HELPER_PKG.Do_DDL(l_stmt, ad_ddl.create_table, 'BSC_TMP_OPT_KPI_DATA');
345: l_stmt := 'create unique index bsc_tmp_opt_kpi_data_u1 on bsc_tmp_opt_kpi_data(indicator, table_name)';
346: BSC_MO_HELPER_PKG.Do_DDL(l_stmt, ad_ddl.create_index, 'BSC_TMP_OPT_KPI_DATA_U1');
347: dbms_stats.gather_table_stats(BSC_METADATA_OPTIMIZER_PKG.gBSCSchema, 'BSC_TMP_OPT_KPI_DATA');
348: dbms_stats.gather_index_stats(BSC_METADATA_OPTIMIZER_PKG.gBSCSchema, 'BSC_TMP_OPT_KPI_DATA_U1');

Line 346: BSC_MO_HELPER_PKG.Do_DDL(l_stmt, ad_ddl.create_index, 'BSC_TMP_OPT_KPI_DATA_U1');

342:
343: l_stmt := 'CREATE GLOBAL TEMPORARY TABLE BSC_TMP_OPT_KPI_DATA (INDICATOR NUMBER, TABLE_NAME VARCHAR2(100)) ON COMMIT PRESERVE ROWS';
344: BSC_MO_HELPER_PKG.Do_DDL(l_stmt, ad_ddl.create_table, 'BSC_TMP_OPT_KPI_DATA');
345: l_stmt := 'create unique index bsc_tmp_opt_kpi_data_u1 on bsc_tmp_opt_kpi_data(indicator, table_name)';
346: BSC_MO_HELPER_PKG.Do_DDL(l_stmt, ad_ddl.create_index, 'BSC_TMP_OPT_KPI_DATA_U1');
347: dbms_stats.gather_table_stats(BSC_METADATA_OPTIMIZER_PKG.gBSCSchema, 'BSC_TMP_OPT_KPI_DATA');
348: dbms_stats.gather_index_stats(BSC_METADATA_OPTIMIZER_PKG.gBSCSchema, 'BSC_TMP_OPT_KPI_DATA_U1');
349: END IF;
350: -- table may not exist after upgrade, so have to make it dynamic

Line 378: bsc_mo_helper_pkg.writeTmp('Started CreateDBMeasureByKpiView', FND_LOG.LEVEL_PROCEDURE);

374:
375: PROCEDURE CreateDBMeasureByKpiView IS
376: l_stmt varchar2(1000);
377: BEGIN
378: bsc_mo_helper_pkg.writeTmp('Started CreateDBMeasureByKpiView', FND_LOG.LEVEL_PROCEDURE);
379: l_stmt := ' CREATE OR REPLACE VIEW BSC_DB_MEASURE_BY_KPI_V( INDICATOR, MEASURE_ID ) AS
380: SELECT DB.INDICATOR, DS.MEASURE_ID1 AS MEASURE_ID
381: FROM BSC_KPI_ANALYSIS_MEASURES_B DB, BSC_SYS_DATASETS_B DS
382: WHERE DB.DATASET_ID = DS.DATASET_ID

Line 388: bsc_mo_helper_pkg.writeTmp('Completed CreateDBMeasureByKpiView', FND_LOG.LEVEL_PROCEDURE);

384: SELECT DB.INDICATOR, DS.MEASURE_ID2 AS MEASURE_ID
385: FROM BSC_KPI_ANALYSIS_MEASURES_B DB, BSC_SYS_DATASETS_B DS
386: WHERE DB.DATASET_ID = DS.DATASET_ID AND DS.MEASURE_ID2 IS NOT NULL ';
387: execute immediate l_stmt;
388: bsc_mo_helper_pkg.writeTmp('Completed CreateDBMeasureByKpiView', FND_LOG.LEVEL_PROCEDURE);
389: exception when others then
390: bsc_mo_helper_pkg.writeTmp('Error in CreateDBMeasureByKpiView :'||sqlerrm, FND_LOG.LEVEL_EXCEPTION, true);
391: raise;
392: END;

Line 390: bsc_mo_helper_pkg.writeTmp('Error in CreateDBMeasureByKpiView :'||sqlerrm, FND_LOG.LEVEL_EXCEPTION, true);

386: WHERE DB.DATASET_ID = DS.DATASET_ID AND DS.MEASURE_ID2 IS NOT NULL ';
387: execute immediate l_stmt;
388: bsc_mo_helper_pkg.writeTmp('Completed CreateDBMeasureByKpiView', FND_LOG.LEVEL_PROCEDURE);
389: exception when others then
390: bsc_mo_helper_pkg.writeTmp('Error in CreateDBMeasureByKpiView :'||sqlerrm, FND_LOG.LEVEL_EXCEPTION, true);
391: raise;
392: END;
393:
394: -- pProcessId = -ICX_Session_Id (For cleanup)

Line 430: BSC_METADATA_OPTIMIZER_PKG.gBSCSchema := BSC_MO_HELPER_PKG.getBSCSchema;

426: bsc_apps.init_bsc_apps;
427: BSC_METADATA_OPTIMIZER_PKG.g_log := false;
428: BSC_METADATA_OPTIMIZER_PKG.gUIAPI := true;
429: IF BSC_METADATA_OPTIMIZER_PKG.gBSCSchema IS NULL THEN
430: BSC_METADATA_OPTIMIZER_PKG.gBSCSchema := BSC_MO_HELPER_PKG.getBSCSchema;
431: END IF;
432: BSC_METADATA_OPTIMIZER_PKG.garrIndics.delete;
433: BSC_METADATA_OPTIMIZER_PKG.gnumIndics := 0;
434: BSC_METADATA_OPTIMIZER_PKG.garrIndics4.delete;

Line 439: IF (NOT BSC_MO_HELPER_PKG.tableExists('BSC_TMP_OPT_UI_KPIS')) THEN

435: BSC_METADATA_OPTIMIZER_PKG.gnumIndics4 := 0;
436: BSC_METADATA_OPTIMIZER_PKG.garrTables.delete;
437: BSC_METADATA_OPTIMIZER_PKG.gnumTables := 0;
438:
439: IF (NOT BSC_MO_HELPER_PKG.tableExists('BSC_TMP_OPT_UI_KPIS')) THEN
440: create_ui_kpi_table;
441: END IF;
442:
443: --EXECUTE IMMEDIATE 'delete BSC_TMP_OPT_UI_KPIS where process_Id = -200 or process_Id = 0 or process_Id is null';

Line 458: BSC_MO_HELPER_PKG.writeTmp( 'Completed updateRelatedIndicators');

454: WHERE PROTOTYPE_FLAG NOT IN (1,2,3,4)';
455: execute immediate l_stmt USING pProcessId;
456: commit;
457: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
458: BSC_MO_HELPER_PKG.writeTmp( 'Completed updateRelatedIndicators');
459: END IF;
460: return;
461: end if;
462:

Line 473: BSC_MO_HELPER_PKG.writeTmp( 'Completed updateRelatedIndicators');

469: WHERE BSC_DBGEN_UTILS.GET_OBJECTIVE_TYPE(SHORT_NAME) = :2 ';
470: execute immediate l_stmt USING pProcessId, 'OBJECTIVE';
471: commit;
472: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
473: BSC_MO_HELPER_PKG.writeTmp( 'Completed updateRelatedIndicators');
474: END IF;
475: return;
476: end if;
477:

Line 489: BSC_MO_HELPER_PKG.writeTmp( 'Completed updateRelatedIndicators');

485:
486: IF (SQL%ROWCOUNT = l_total_kpis) THEN
487: commit;
488: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
489: BSC_MO_HELPER_PKG.writeTmp( 'Completed updateRelatedIndicators');
490: END IF;
491: return;
492: END If;
493:

Line 496: BSC_MO_HELPER_PKG.writeTmp('# of Indics = '||BSC_METADATA_OPTIMIZER_PKG.gnumIndics);

492: END If;
493:
494: BSC_METADATA_OPTIMIZER_PKG.gnumIndics := SQL%ROWCOUNT;
495: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
496: BSC_MO_HELPER_PKG.writeTmp('# of Indics = '||BSC_METADATA_OPTIMIZER_PKG.gnumIndics);
497: END IF;
498:
499: MarkIndicsAndTables(pProcessId);
500:

Line 530: strWhereInIndics4 := BSC_MO_HELPER_PKG.Get_New_Big_In_Cond_Number( 2, 'INDICATOR');

526: IF BSC_METADATA_OPTIMIZER_PKG.gnumIndics4 > 0 THEN
527: CreateDBMeasureByKpiView;
528: MarkIndicsForNonStrucChanges;
529: --Add the indicators from garrIndics4() to gIndicadores
530: strWhereInIndics4 := BSC_MO_HELPER_PKG.Get_New_Big_In_Cond_Number( 2, 'INDICATOR');
531: i:= 0;
532: LOOP
533: exit when i = BSC_METADATA_OPTIMIZER_PKG.gnumIndics4;
534: BSC_MO_HELPER_PKG.Add_Value_Big_In_Cond_Number( 2, BSC_METADATA_OPTIMIZER_PKG.garrIndics4(i));

Line 534: BSC_MO_HELPER_PKG.Add_Value_Big_In_Cond_Number( 2, BSC_METADATA_OPTIMIZER_PKG.garrIndics4(i));

530: strWhereInIndics4 := BSC_MO_HELPER_PKG.Get_New_Big_In_Cond_Number( 2, 'INDICATOR');
531: i:= 0;
532: LOOP
533: exit when i = BSC_METADATA_OPTIMIZER_PKG.gnumIndics4;
534: BSC_MO_HELPER_PKG.Add_Value_Big_In_Cond_Number( 2, BSC_METADATA_OPTIMIZER_PKG.garrIndics4(i));
535: i:= i+1;
536: END LOOP;
537: strWhereNotInIndics4 := 'NOT (' || strWhereInIndics4 || ')';
538: l_stmt := 'INSERT INTO BSC_TMP_OPT_UI_KPIS( INDICATOR, PROTOTYPE_FLAG, process_id)

Line 591: BSC_MO_HELPER_PKG.writeTmp( 'Completed updateRelatedIndicators');

587: END IF;
588: commit;
589:
590: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
591: BSC_MO_HELPER_PKG.writeTmp( 'Completed updateRelatedIndicators');
592: END IF;
593:
594: EXCEPTION WHEN OTHERS THEN
595: l_error := sqlerrm;

Line 596: BSC_MO_HELPER_PKG.writeTmp('Exception in updateRelatedIndicators : '||l_error, FND_LOG.LEVEL_EXCEPTION);

592: END IF;
593:
594: EXCEPTION WHEN OTHERS THEN
595: l_error := sqlerrm;
596: BSC_MO_HELPER_PKG.writeTmp('Exception in updateRelatedIndicators : '||l_error, FND_LOG.LEVEL_EXCEPTION);
597: raise;
598: END;
599:
600: -- Incremental Run call from UI

Line 627: BSC_METADATA_OPTIMIZER_PKG.gBSCSchema := BSC_MO_HELPER_PKG.getBSCSchema;

623:
624: -- Bug 3830308 : Added owner clause because of new GSCC validation added on aug 9, 2004
625: --------------
626: IF BSC_METADATA_OPTIMIZER_PKG.gBSCSchema IS NULL THEN
627: BSC_METADATA_OPTIMIZER_PKG.gBSCSchema := BSC_MO_HELPER_PKG.getBSCSchema;
628: END IF;
629:
630: IF BSC_METADATA_OPTIMIZER_PKG.gAppsSchema IS NULL THEN
631: BSC_METADATA_OPTIMIZER_PKG.gAppsSchema := BSC_MO_HELPER_PKG.getAppsSchema;

Line 631: BSC_METADATA_OPTIMIZER_PKG.gAppsSchema := BSC_MO_HELPER_PKG.getAppsSchema;

627: BSC_METADATA_OPTIMIZER_PKG.gBSCSchema := BSC_MO_HELPER_PKG.getBSCSchema;
628: END IF;
629:
630: IF BSC_METADATA_OPTIMIZER_PKG.gAppsSchema IS NULL THEN
631: BSC_METADATA_OPTIMIZER_PKG.gAppsSchema := BSC_MO_HELPER_PKG.getAppsSchema;
632: END IF;
633: --------------
634: -- Check if table already exists
635: -- Bug 3830308 : Added owner clause because of new GSCC validation added on aug 9, 2004

Line 664: --BSC_MO_HELPER_PKG.createCopyTable(pOld, pNew, BSC_APPS.get_tablespace_name(BSC_APPS.input_table_tbs_type));

660: exception when others then
661: null;
662: end;
663: execute immediate 'create synonym '||pNew||' for '||BSC_METADATA_OPTIMIZER_PKG.gBSCSchema||'.'||pNew;
664: --BSC_MO_HELPER_PKG.createCopyTable(pOld, pNew, BSC_APPS.get_tablespace_name(BSC_APPS.input_table_tbs_type));
665: --BSC_MO_HELPER_PKG.CreateCopyIndexes (pOld, pNew, BSC_APPS.get_tablespace_name(BSC_APPS.input_index_tbs_type));
666: --BSC_MO_HELPER_PKG.dropTable(pOld);
667: pStatus := 'Y';
668:

Line 665: --BSC_MO_HELPER_PKG.CreateCopyIndexes (pOld, pNew, BSC_APPS.get_tablespace_name(BSC_APPS.input_index_tbs_type));

661: null;
662: end;
663: execute immediate 'create synonym '||pNew||' for '||BSC_METADATA_OPTIMIZER_PKG.gBSCSchema||'.'||pNew;
664: --BSC_MO_HELPER_PKG.createCopyTable(pOld, pNew, BSC_APPS.get_tablespace_name(BSC_APPS.input_table_tbs_type));
665: --BSC_MO_HELPER_PKG.CreateCopyIndexes (pOld, pNew, BSC_APPS.get_tablespace_name(BSC_APPS.input_index_tbs_type));
666: --BSC_MO_HELPER_PKG.dropTable(pOld);
667: pStatus := 'Y';
668:
669: EXCEPTION WHEN OTHERS THEN

Line 666: --BSC_MO_HELPER_PKG.dropTable(pOld);

662: end;
663: execute immediate 'create synonym '||pNew||' for '||BSC_METADATA_OPTIMIZER_PKG.gBSCSchema||'.'||pNew;
664: --BSC_MO_HELPER_PKG.createCopyTable(pOld, pNew, BSC_APPS.get_tablespace_name(BSC_APPS.input_table_tbs_type));
665: --BSC_MO_HELPER_PKG.CreateCopyIndexes (pOld, pNew, BSC_APPS.get_tablespace_name(BSC_APPS.input_index_tbs_type));
666: --BSC_MO_HELPER_PKG.dropTable(pOld);
667: pStatus := 'Y';
668:
669: EXCEPTION WHEN OTHERS THEN
670: pMessage := sqlerrm;

Line 689: BSC_MO_HELPER_PKG.Do_DDL(l_stmt, ad_ddl.create_table, 'BSC_TMP_OPT_UI_LEVELS');

685: ON COMMIT PRESERVE ROWS';
686:
687: PRAGMA AUTONOMOUS_TRANSACTION;
688: BEGIN
689: BSC_MO_HELPER_PKG.Do_DDL(l_stmt, ad_ddl.create_table, 'BSC_TMP_OPT_UI_LEVELS');
690: END;
691:
692:
693: PROCEDURE initializeIndicator (pIndicator IN NUMBER) IS

Line 708: BSC_MO_HELPER_PKG.AddIndicator( BSC_METADATA_OPTIMIZER_PKG.gIndicators, cIndAPI.Indicator, cIndAPI.name,

704: IF (BSC_METADATA_OPTIMIZER_PKG.gUIAPI) THEN
705: -- need to initialize gIndicators with this Ind
706: OPEN cAPI;
707: FETCH cAPI INTO cIndAPI;
708: BSC_MO_HELPER_PKG.AddIndicator( BSC_METADATA_OPTIMIZER_PKG.gIndicators, cIndAPI.Indicator, cIndAPI.name,
709: cIndAPI.indicator_type, cIndAPI.Config_Type,
710: cIndAPI.periodicity_id, 1, cIndAPI.prototype_flag, cIndAPI.share_flag,
711: cIndAPI.source_indicator, cIndAPI.edw_flag, 1);
712: END IF;

Line 746: l_groupids := BSC_MO_HELPER_PKG.getGroupIds(p_levels);

742: --l_indLevel clsIndicatorLevels;
743:
744: BEGIN
745:
746: l_groupids := BSC_MO_HELPER_PKG.getGroupIds(p_levels);
747: l_dim_index := l_groupids.first;
748:
749: LOOP
750: EXIT WHEN l_groupids.count = 0;

Line 751: DimensionLevels := BSC_MO_HELPER_PKG.get_Tab_clsLevels(p_levels, l_groupids(l_dim_index)) ;

747: l_dim_index := l_groupids.first;
748:
749: LOOP
750: EXIT WHEN l_groupids.count = 0;
751: DimensionLevels := BSC_MO_HELPER_PKG.get_Tab_clsLevels(p_levels, l_groupids(l_dim_index)) ;
752: l_level_index := DimensionLevels.first;
753: LOOP
754: EXIT WHEN DimensionLevels.count = 0;
755:

Line 781: BSC_METADATA_OPTIMIZER_PKG.gBSCSchema := BSC_MO_HELPER_PKG.getBSCSchema;

777: BEGIN
778: BSC_METADATA_OPTIMIZER_PKG.g_log := false;
779: BSC_METADATA_OPTIMIZER_PKG.gUIAPI := true;
780: IF BSC_METADATA_OPTIMIZER_PKG.gBSCSchema IS NULL THEN
781: BSC_METADATA_OPTIMIZER_PKG.gBSCSchema := BSC_MO_HELPER_PKG.getBSCSchema;
782: END IF;
783: IF (NOT BSC_MO_HELPER_PKG.tableExists('BSC_TMP_OPT_UI_LEVELS')) THEN
784: create_ui_table;
785: ELSE

Line 783: IF (NOT BSC_MO_HELPER_PKG.tableExists('BSC_TMP_OPT_UI_LEVELS')) THEN

779: BSC_METADATA_OPTIMIZER_PKG.gUIAPI := true;
780: IF BSC_METADATA_OPTIMIZER_PKG.gBSCSchema IS NULL THEN
781: BSC_METADATA_OPTIMIZER_PKG.gBSCSchema := BSC_MO_HELPER_PKG.getBSCSchema;
782: END IF;
783: IF (NOT BSC_MO_HELPER_PKG.tableExists('BSC_TMP_OPT_UI_LEVELS')) THEN
784: create_ui_table;
785: ELSE
786: execute immediate 'delete BSC_TMP_OPT_UI_LEVELS';
787: commit;

Line 800: BSC_MO_HELPER_PKG.InitializeMasterTables;

796: -- -- everytime the metadata optimizer UI is launched, the cleanup will be done, as its a perm. temp table
797: --END IF;
798:
799: initializeIndicator(pIndicator);
800: BSC_MO_HELPER_PKG.InitializeMasterTables;
801: colConfigurations := bsc_mo_indicator_pkg.GetColConfigForIndic(pIndicator);
802: l_config_index := colConfigurations.first;
803: LOOP
804: EXIT WHEN colConfigurations.count = 0;

Line 930: l_description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_BACKEND', 'INTERNAL_COLUMN');

926: --Bug 3919130 superseds bug 3900047
927: -- Description for the TIME_FK should be Date
928: IF (l_description IS NULL) THEN
929: If UPPER(pColumnName) = 'PERIODICITY_ID' OR UPPER(pColumnName) = 'PERIOD_TYPE_ID' Then
930: l_description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_BACKEND', 'INTERNAL_COLUMN');
931: ElsIf UPPER(pColumnName) = 'TIME_FK' Then
932: l_description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_COMMON', 'DATE');
933: ElsIf UPPER(pColumnName) = 'YEAR' Then
934: l_description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_BACKEND', 'YEAR_1999_2000_ACTUAL_YEAR');

Line 932: l_description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_COMMON', 'DATE');

928: IF (l_description IS NULL) THEN
929: If UPPER(pColumnName) = 'PERIODICITY_ID' OR UPPER(pColumnName) = 'PERIOD_TYPE_ID' Then
930: l_description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_BACKEND', 'INTERNAL_COLUMN');
931: ElsIf UPPER(pColumnName) = 'TIME_FK' Then
932: l_description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_COMMON', 'DATE');
933: ElsIf UPPER(pColumnName) = 'YEAR' Then
934: l_description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_BACKEND', 'YEAR_1999_2000_ACTUAL_YEAR');
935: ElsIf UPPER(pColumnName) = 'TYPE' Then
936: l_description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_BACKEND', 'TYPE_0_ACTUAL_1_PLAN');

Line 934: l_description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_BACKEND', 'YEAR_1999_2000_ACTUAL_YEAR');

930: l_description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_BACKEND', 'INTERNAL_COLUMN');
931: ElsIf UPPER(pColumnName) = 'TIME_FK' Then
932: l_description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_COMMON', 'DATE');
933: ElsIf UPPER(pColumnName) = 'YEAR' Then
934: l_description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_BACKEND', 'YEAR_1999_2000_ACTUAL_YEAR');
935: ElsIf UPPER(pColumnName) = 'TYPE' Then
936: l_description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_BACKEND', 'TYPE_0_ACTUAL_1_PLAN');
937: IF (cRow1.target_flag =1) THEN -- this is a target table
938: l_description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_BACKEND', 'TYPE1_PLAN');

Line 936: l_description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_BACKEND', 'TYPE_0_ACTUAL_1_PLAN');

932: l_description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_COMMON', 'DATE');
933: ElsIf UPPER(pColumnName) = 'YEAR' Then
934: l_description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_BACKEND', 'YEAR_1999_2000_ACTUAL_YEAR');
935: ElsIf UPPER(pColumnName) = 'TYPE' Then
936: l_description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_BACKEND', 'TYPE_0_ACTUAL_1_PLAN');
937: IF (cRow1.target_flag =1) THEN -- this is a target table
938: l_description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_BACKEND', 'TYPE1_PLAN');
939: END IF;
940: ElsIf UPPER(pColumnName) = UPPER(NomCampoPeriod) Then

Line 938: l_description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_BACKEND', 'TYPE1_PLAN');

934: l_description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_BACKEND', 'YEAR_1999_2000_ACTUAL_YEAR');
935: ElsIf UPPER(pColumnName) = 'TYPE' Then
936: l_description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_BACKEND', 'TYPE_0_ACTUAL_1_PLAN');
937: IF (cRow1.target_flag =1) THEN -- this is a target table
938: l_description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_BACKEND', 'TYPE1_PLAN');
939: END IF;
940: ElsIf UPPER(pColumnName) = UPPER(NomCampoPeriod) Then
941:
942: If (BSC_METADATA_OPTIMIZER_PKG.g_BSC_MV And (cRow1.Table_Type = 0 Or isBaseTable)) Or (Not BSC_METADATA_OPTIMIZER_PKG.g_BSC_MV) Then

Line 947: l_description := l_description||BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_COMMON', 'PERIOD') ||

943:
944: If Yearly_Flag = 1 Then
945: l_description := l_description || '0'; --bug#3980028
946: Else
947: l_description := l_description||BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_COMMON', 'PERIOD') ||
948: BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_COMMON', 'SYMBOL_COLON') || ' 1' || ' ' ||
949: BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_IVIEWER', 'TO') || ' ' || MaxPeriod;
950: End If;
951: Else

Line 948: BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_COMMON', 'SYMBOL_COLON') || ' 1' || ' ' ||

944: If Yearly_Flag = 1 Then
945: l_description := l_description || '0'; --bug#3980028
946: Else
947: l_description := l_description||BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_COMMON', 'PERIOD') ||
948: BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_COMMON', 'SYMBOL_COLON') || ' 1' || ' ' ||
949: BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_IVIEWER', 'TO') || ' ' || MaxPeriod;
950: End If;
951: Else
952: --Do not mention more info about period. MV has multiple periodicities.

Line 949: BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_IVIEWER', 'TO') || ' ' || MaxPeriod;

945: l_description := l_description || '0'; --bug#3980028
946: Else
947: l_description := l_description||BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_COMMON', 'PERIOD') ||
948: BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_COMMON', 'SYMBOL_COLON') || ' 1' || ' ' ||
949: BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_IVIEWER', 'TO') || ' ' || MaxPeriod;
950: End If;
951: Else
952: --Do not mention more info about period. MV has multiple periodicities.
953: l_description := l_description||BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_COMMON', 'PERIOD');

Line 953: l_description := l_description||BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_COMMON', 'PERIOD');

949: BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_IVIEWER', 'TO') || ' ' || MaxPeriod;
950: End If;
951: Else
952: --Do not mention more info about period. MV has multiple periodicities.
953: l_description := l_description||BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_COMMON', 'PERIOD');
954: End If;
955: ElsIf UPPER(pColumnName) = UPPER(NomCampoSubPeriod) Then
956: l_description := l_description ||BSC_MO_HELPER_PKG.Get_LookUp_Value(
957: 'BSC_UI_BACKEND', 'SUBPERIOD_1_TO') || ' ' || MaxSubPeriod;

Line 956: l_description := l_description ||BSC_MO_HELPER_PKG.Get_LookUp_Value(

952: --Do not mention more info about period. MV has multiple periodicities.
953: l_description := l_description||BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_COMMON', 'PERIOD');
954: End If;
955: ElsIf UPPER(pColumnName) = UPPER(NomCampoSubPeriod) Then
956: l_description := l_description ||BSC_MO_HELPER_PKG.Get_LookUp_Value(
957: 'BSC_UI_BACKEND', 'SUBPERIOD_1_TO') || ' ' || MaxSubPeriod;
958: End If;
959:
960: END IF;

Line 1063: l_schema := bsc_mo_helper_pkg.getAppsSchema;

1059: l_ret_clob CLOB;
1060: BEGIN
1061:
1062: IF (pTableName like 'BSC%MV') THEN
1063: l_schema := bsc_mo_helper_pkg.getAppsSchema;
1064: ELSE
1065: l_schema := bsc_mo_helper_pkg.getBSCSchema;
1066: END IF;
1067:

Line 1065: l_schema := bsc_mo_helper_pkg.getBSCSchema;

1061:
1062: IF (pTableName like 'BSC%MV') THEN
1063: l_schema := bsc_mo_helper_pkg.getAppsSchema;
1064: ELSE
1065: l_schema := bsc_mo_helper_pkg.getBSCSchema;
1066: END IF;
1067:
1068: IF (pTabType <> 2) THEN
1069: IF (pColType like 'DIM%') THEN

Line 1210: BSC_METADATA_OPTIMIZER_PKG.gBSCSchema := BSC_MO_HELPER_PKG.getBSCSchema;

1206:
1207: BSC_METADATA_OPTIMIZER_PKG.g_log := false;
1208: BSC_METADATA_OPTIMIZER_PKG.gUIAPI := true;
1209: IF BSC_METADATA_OPTIMIZER_PKG.gBSCSchema IS NULL THEN
1210: BSC_METADATA_OPTIMIZER_PKG.gBSCSchema := BSC_MO_HELPER_PKG.getBSCSchema;
1211: END IF;
1212:
1213: IF (NOT BSC_MO_HELPER_PKG.tableExists('BSC_TMP_OPT_UI_KPIS')) THEN
1214: create_ui_kpi_table;

Line 1213: IF (NOT BSC_MO_HELPER_PKG.tableExists('BSC_TMP_OPT_UI_KPIS')) THEN

1209: IF BSC_METADATA_OPTIMIZER_PKG.gBSCSchema IS NULL THEN
1210: BSC_METADATA_OPTIMIZER_PKG.gBSCSchema := BSC_MO_HELPER_PKG.getBSCSchema;
1211: END IF;
1212:
1213: IF (NOT BSC_MO_HELPER_PKG.tableExists('BSC_TMP_OPT_UI_KPIS')) THEN
1214: create_ui_kpi_table;
1215: END IF;
1216: create_tmp_opt_kpi_data;
1217:

Line 1262: BSC_MO_HELPER_PKG.writeTmp('# of Indics = '||BSC_METADATA_OPTIMIZER_PKG.gnumIndics);

1258: RETURN;
1259: END IF;
1260: BSC_METADATA_OPTIMIZER_PKG.gnumIndics := l_selected_kpis;
1261: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1262: BSC_MO_HELPER_PKG.writeTmp('# of Indics = '||BSC_METADATA_OPTIMIZER_PKG.gnumIndics);
1263: END IF;
1264:
1265: MarkIndicsAndTables(pProcessId);
1266:

Line 1282: BSC_MO_HELPER_PKG.writeTmp( 'Completed getRelatedIndicators');

1278: AND NOT EXISTS (SELECT 1 FROM BSC_TMP_OPT_UI_KPIS c WHERE c.indicator = k.indicator AND c.PROCESS_ID = :3)';
1279: EXECUTE IMMEDIATE l_stmt using pProcessId, pProcessId, pProcessId;
1280:
1281: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1282: BSC_MO_HELPER_PKG.writeTmp( 'Completed getRelatedIndicators');
1283: END IF;
1284: COMMIT;
1285:
1286: EXCEPTION WHEN OTHERS THEN

Line 1289: BSC_MO_HELPER_PKG.writeTmp('Exception in getRelatedIndicators : '||l_error, FND_LOG.LEVEL_EXCEPTION);

1285:
1286: EXCEPTION WHEN OTHERS THEN
1287: ROLLBACK;
1288: l_error := sqlerrm;
1289: BSC_MO_HELPER_PKG.writeTmp('Exception in getRelatedIndicators : '||l_error, FND_LOG.LEVEL_EXCEPTION);
1290: raise;
1291: END;
1292:
1293: PROCEDURE deleteBSCSession(pSession IN NUMBER) IS

Line 1303: BSC_MO_HELPER_PKG.writeTmp( 'Started cleanUITempTable');

1299: PROCEDURE cleanUITempTable IS
1300: l_del_stmt varchar2(2000);
1301: BEGIN
1302: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1303: BSC_MO_HELPER_PKG.writeTmp( 'Started cleanUITempTable');
1304: END IF;
1305:
1306: -- Removed entries for concurrent requests that were finished
1307: DELETE BSC_TMP_OPT_UI_KPIS

Line 1312: WHERE A.APPLICATION_SHORT_NAME = BSC_MO_HELPER_PKG.getBSCSchema

1308: WHERE PROCESS_ID > 0
1309: AND TO_CHAR(PROCESS_ID) NOT IN (
1310: SELECT /*+ INDEX(R FND_CONCURRENT_REQUESTS_N6)*/ R.ARGUMENT2
1311: FROM FND_CONCURRENT_REQUESTS R, FND_CONCURRENT_PROGRAMS_VL P, FND_APPLICATION A
1312: WHERE A.APPLICATION_SHORT_NAME = BSC_MO_HELPER_PKG.getBSCSchema
1313: AND A.APPLICATION_ID = P.APPLICATION_ID
1314: AND P.APPLICATION_ID = R.PROGRAM_APPLICATION_ID
1315: AND P.CONCURRENT_PROGRAM_ID = R.CONCURRENT_PROGRAM_ID
1316: AND P.CONCURRENT_PROGRAM_NAME = 'BSC_METADATA_OPTIMIZER'

Line 1331: BSC_MO_HELPER_PKG.writeTmp( 'Completed cleanUITempTable');

1327: WHERE (FND_SESSION_MANAGEMENT.CHECK_SESSION(SESSION_ID,NULL,NULL,'N') = 'VALID'));
1328: COMMIT;
1329:
1330: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1331: BSC_MO_HELPER_PKG.writeTmp( 'Completed cleanUITempTable');
1332: END IF;
1333:
1334: EXCEPTION WHEN OTHERS THEN
1335: BSC_MO_HELPER_PKG.writeTmp('Exception in cleanUITempTable : '||sqlerrm, FND_LOG.LEVEL_EXCEPTION);

Line 1335: BSC_MO_HELPER_PKG.writeTmp('Exception in cleanUITempTable : '||sqlerrm, FND_LOG.LEVEL_EXCEPTION);

1331: BSC_MO_HELPER_PKG.writeTmp( 'Completed cleanUITempTable');
1332: END IF;
1333:
1334: EXCEPTION WHEN OTHERS THEN
1335: BSC_MO_HELPER_PKG.writeTmp('Exception in cleanUITempTable : '||sqlerrm, FND_LOG.LEVEL_EXCEPTION);
1336: raise;
1337: END;
1338:
1339: /*------------------------------------------------------------------------------------------