DBA Data[Home] [Help]

APPS.BSC_DBGEN_BSC_READER dependencies on BSC_MO_HELPER_PKG

Line 179: bsc_mo_helper_pkg.writeTmp('Exception in load_system_measures: '||l_stmt, FND_LOG.LEVEL_UNEXPECTED, true);

175: g_sys_measures_loaded := true;
176: return;
177: exception when others then
178: l_stmt := sqlerrm;
179: bsc_mo_helper_pkg.writeTmp('Exception in load_system_measures: '||l_stmt, FND_LOG.LEVEL_UNEXPECTED, true);
180: bsc_mo_helper_pkg.TerminateWithError('BSC_VAR_LIST_INIT_FAILED', 'load_system_measures');
181: raise;
182: End;
183:

Line 180: bsc_mo_helper_pkg.TerminateWithError('BSC_VAR_LIST_INIT_FAILED', 'load_system_measures');

176: return;
177: exception when others then
178: l_stmt := sqlerrm;
179: bsc_mo_helper_pkg.writeTmp('Exception in load_system_measures: '||l_stmt, FND_LOG.LEVEL_UNEXPECTED, true);
180: bsc_mo_helper_pkg.TerminateWithError('BSC_VAR_LIST_INIT_FAILED', 'load_system_measures');
181: raise;
182: End;
183:
184: --****************************************************************************

Line 276: bsc_mo_helper_pkg.writeTmp( 'Inside InsertInDBMeasureCols, P_Measure_Col = ');

272: i NUMBER;
273:
274: BEGIN
275: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
276: bsc_mo_helper_pkg.writeTmp( 'Inside InsertInDBMeasureCols, P_Measure_Col = ');
277: END IF;
278:
279: bsc_mo_helper_pkg.write_this(P_Measure_Col);
280: --Delete the records if exists

Line 279: bsc_mo_helper_pkg.write_this(P_Measure_Col);

275: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
276: bsc_mo_helper_pkg.writeTmp( 'Inside InsertInDBMeasureCols, P_Measure_Col = ');
277: END IF;
278:
279: bsc_mo_helper_pkg.write_this(P_Measure_Col);
280: --Delete the records if exists
281: l_stmt := 'DELETE FROM BSC_DB_MEASURE_COLS_TL WHERE MEASURE_COL = :1';
282: EXECUTE IMMEDIATE l_stmt using P_Measure_Col.fieldName;
283:

Line 298: bsc_mo_helper_pkg.writeTmp( 'Compl. InsertInDBMeasureCols');

294: EXIT WHEN i = BSC_METADATA_OPTIMIZER_PKG.gInstalled_Languages.last;
295: i := BSC_METADATA_OPTIMIZER_PKG.gInstalled_Languages.next(i);
296: END LOOP;
297: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
298: bsc_mo_helper_pkg.writeTmp( 'Compl. InsertInDBMeasureCols');
299: END IF;
300:
301:
302: EXCEPTION WHEN OTHERS THEN

Line 333: l_temp := bsc_mo_helper_pkg.findIndex(BSC_METADATA_OPTIMIZER_PKG.gLov, baseColumns(baseColumns.first));

329: l_temp number;
330: BEGIN
331:
332: L_Measure_Col.fieldName := internalColumn;
333: l_temp := bsc_mo_helper_pkg.findIndex(BSC_METADATA_OPTIMIZER_PKG.gLov, baseColumns(baseColumns.first));
334: L_Measure_Col.groupCode := BSC_METADATA_OPTIMIZER_PKG.gLov(l_temp).groupCode;
335: L_Measure_Col.Description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_BACKEND', 'INTERNAL_COLUMN');
336:
337: IF (InternalColumnType =1) THEN

Line 335: L_Measure_Col.Description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_BACKEND', 'INTERNAL_COLUMN');

331:
332: L_Measure_Col.fieldName := internalColumn;
333: l_temp := bsc_mo_helper_pkg.findIndex(BSC_METADATA_OPTIMIZER_PKG.gLov, baseColumns(baseColumns.first));
334: L_Measure_Col.groupCode := BSC_METADATA_OPTIMIZER_PKG.gLov(l_temp).groupCode;
335: L_Measure_Col.Description := BSC_MO_HELPER_PKG.Get_LookUp_Value('BSC_UI_BACKEND', 'INTERNAL_COLUMN');
336:
337: IF (InternalColumnType =1) THEN
338: --Formula
339: --The projection method of the calculated column is deduced from the

Line 360: l_temp := bsc_mo_helper_pkg.findIndex(BSC_METADATA_OPTIMIZER_PKG.gLov, baseColumns(i));

356: L_Measure_Col.prjMethod := 1; --Moving average has the lowest priority
357: i := baseColumns.first;
358: LOOP
359: EXIT WHEN baseColumns.count = 0;
360: l_temp := bsc_mo_helper_pkg.findIndex(BSC_METADATA_OPTIMIZER_PKG.gLov, baseColumns(i));
361: prjMethod := BSC_METADATA_OPTIMIZER_PKG.gLov(l_temp).prjMethod;
362:
363: If prjMethod = 0 Then
364: --No forecast

Line 391: l_temp := bsc_mo_helper_pkg.findIndex(BSC_METADATA_OPTIMIZER_PKG.gLov, baseColumns(i));

387: --2: Balance
388: i := baseColumns.first;
389: LOOP
390: EXIT WHEN baseColumns.count = 0;
391: l_temp := bsc_mo_helper_pkg.findIndex(BSC_METADATA_OPTIMIZER_PKG.gLov, baseColumns(i));
392: L_Measure_Col.measureType := BSC_METADATA_OPTIMIZER_PKG.gLov(l_temp).measureType;
393: If L_Measure_Col.measureType = 2 Then
394: EXIT;
395: END IF;

Line 404: l_temp := bsc_mo_helper_pkg.findIndex(BSC_METADATA_OPTIMIZER_PKG.gLov, baseColumns(baseColumns.first));

400: --Total and counter for Average at Lowest Level
401:
402: --Projection method and type are the same of the base column
403: --In this case there is only one base column
404: l_temp := bsc_mo_helper_pkg.findIndex(BSC_METADATA_OPTIMIZER_PKG.gLov, baseColumns(baseColumns.first));
405: L_Measure_Col.prjMethod := BSC_METADATA_OPTIMIZER_PKG.gLov(l_temp).prjMethod;
406: L_Measure_Col.measureType := BSC_METADATA_OPTIMIZER_PKG.gLov(l_temp).measureType;
407: END IF;
408:

Line 417: l_temp := bsc_mo_helper_pkg.findIndex(g_sys_measures, internalColumn);

413: g_sys_measures(1) := L_Measure_Col;
414: END IF;
415: Else
416: --Update the filed with the new information
417: l_temp := bsc_mo_helper_pkg.findIndex(g_sys_measures, internalColumn);
418: g_sys_measures(l_temp).groupCode := L_Measure_Col.groupCode;
419: g_sys_measures(l_temp).Description := L_Measure_Col.Description;
420: g_sys_measures(l_temp).measureType := L_Measure_Col.measureType;
421: g_sys_measures(l_temp).prjMethod := L_Measure_Col.prjMethod;

Line 426: bsc_mo_helper_pkg.writeTmp( 'Compl AddInternalColumnInDB');

422: END IF;
423: InsertInDBMeasureCols( L_Measure_Col);
424:
425: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
426: bsc_mo_helper_pkg.writeTmp( 'Compl AddInternalColumnInDB');
427: END IF;
428:
429:
430: EXCEPTION WHEN OTHERS THEN

Line 808: l_parents_list := bsc_mo_helper_pkg.decomposeStringtoNumber(p_parents, ',');

804: l_stmt VARCHAR2(1000) := 'INSERT INTO '||l_table_name||'(periodicity, source) values (:1, :2)';
805: l_index NUMBER;
806: l_per_id_list DBMS_SQL.NUMBER_TABLE;
807: BEGIN
808: l_parents_list := bsc_mo_helper_pkg.decomposeStringtoNumber(p_parents, ',');
809: IF (p_periodicity_list.count>0) THEN
810: FOR i IN p_periodicity_list.first..p_periodicity_list.last LOOP
811: l_per_id_list(l_per_id_list.count+1) :=p_periodicity_list(i).periodicity_id;
812: END LOOP;

Line 816: IF bsc_mo_helper_pkg.searchNumberExists(l_per_id_list, l_per_id_list.count, l_parents_list(i)) THEN

812: END LOOP;
813: END IF;
814: IF l_parents_list.count>0 THEN
815: FOR i IN l_parents_list.first..l_parents_list.last LOOP
816: IF bsc_mo_helper_pkg.searchNumberExists(l_per_id_list, l_per_id_list.count, l_parents_list(i)) THEN
817: execute immediate l_stmt USING p_periodicity, l_parents_list(i);
818: END IF;
819: end loop;
820: END IF;

Line 843: bsc_mo_helper_pkg.dropTable(l_table_name);

839: TYPE CurTyp IS REF CURSOR;
840: cv CurTyp;
841: BEGIN
842: l_periodicity_list := p_periodicity_list;
843: bsc_mo_helper_pkg.dropTable(l_table_name);
844: bsc_mo_helper_pkg.Do_DDL(l_stmt, ad_ddl.create_table, l_table_name);
845: IF p_periodicity_list.count>0 THEN
846: FOR i IN p_periodicity_list.first..p_periodicity_list.last LOOP
847: OPEN cPeriods(p_periodicity_list(i).periodicity_id);

Line 844: bsc_mo_helper_pkg.Do_DDL(l_stmt, ad_ddl.create_table, l_table_name);

840: cv CurTyp;
841: BEGIN
842: l_periodicity_list := p_periodicity_list;
843: bsc_mo_helper_pkg.dropTable(l_table_name);
844: bsc_mo_helper_pkg.Do_DDL(l_stmt, ad_ddl.create_table, l_table_name);
845: IF p_periodicity_list.count>0 THEN
846: FOR i IN p_periodicity_list.first..p_periodicity_list.last LOOP
847: OPEN cPeriods(p_periodicity_list(i).periodicity_id);
848: FETCH cPeriods INTO l_parents;

Line 870: bsc_mo_helper_pkg.dropTable(l_table_name);

866: raise;
867: END ;
868: END LOOP;
869: END IF;
870: bsc_mo_helper_pkg.dropTable(l_table_name);
871: commit;
872: return p_periodicity_list;
873: EXCEPTION WHEN OTHERS THEN
874: g_error := sqlerrm;

Line 1024: NumOperands := BSC_MO_HELPER_PKG.GetFieldExpression(Operands, l_measureCol);

1020: OPEN cv FOR l_stmt;
1021: LOOP
1022: FETCH cv into l_measureID, l_measureCol;
1023: EXIT WHEN cv%NOTFOUND;
1024: NumOperands := BSC_MO_HELPER_PKG.GetFieldExpression(Operands, l_measureCol);
1025: i:= Operands.first;
1026: LOOP
1027: EXIT WHEN Operands.count =0 ;
1028: IF BSC_MO_HELPER_PKG.SearchStringExists(arrMeasuresCols, arrMeasuresCols.count, Operands(i)) THEN

Line 1028: IF BSC_MO_HELPER_PKG.SearchStringExists(arrMeasuresCols, arrMeasuresCols.count, Operands(i)) THEN

1024: NumOperands := BSC_MO_HELPER_PKG.GetFieldExpression(Operands, l_measureCol);
1025: i:= Operands.first;
1026: LOOP
1027: EXIT WHEN Operands.count =0 ;
1028: IF BSC_MO_HELPER_PKG.SearchStringExists(arrMeasuresCols, arrMeasuresCols.count, Operands(i)) THEN
1029: --One operand of the formula is one of the measures of a indicator flagged with 4
1030: --We need to add this formula (measure) to the related ones
1031: arrRelatedMeasuresIds(arrRelatedMeasuresIds.count+1) := l_measureID;
1032: END IF;

Line 1054: IF Not bsc_mo_helper_pkg.SearchNumberExists(l_fact_ids, l_fact_ids.count, l_indicator_id) THEN

1050: open cv for L_stmt;
1051: LOOP
1052: FETCH cv into l_indicator_id;/*Indicator*/
1053: EXIT WHEN cv%NOTFOUND;
1054: IF Not bsc_mo_helper_pkg.SearchNumberExists(l_fact_ids, l_fact_ids.count, l_indicator_id) THEN
1055: l_fact_ids(l_fact_ids.count+1) := l_indicator_id;
1056: END IF;
1057: END Loop;
1058: CLOSE cv;

Line 1062: bsc_mo_helper_pkg.writeTmp('Exception in Get_Facts_To_Recalculate : '||sqlerrm, FND_LOG.LEVEL_EXCEPTION, true);

1058: CLOSE cv;
1059: END IF;
1060: return Get_Fact_Info(null, null, l_fact_ids);
1061: EXCEPTION WHEN OTHERS THEN
1062: bsc_mo_helper_pkg.writeTmp('Exception in Get_Facts_To_Recalculate : '||sqlerrm, FND_LOG.LEVEL_EXCEPTION, true);
1063: raise;
1064: END;
1065:
1066: FUNCTION Fact_ID_Exists(p_facts IN BSC_DBGEN_STD_METADATA.tab_clsFact, p_fact_id IN NUMBER) RETURN BOOLEAN IS

Line 1193: bsc_mo_helper_pkg.writeTmp( 'Inside GetMeasuresForFact, System time is '||bsc_mo_helper_pkg.get_time, fnd_log.level_statement, true);

1189: TYPE CurTyp IS REF CURSOR;
1190: cv CurTyp;
1191: l_measure_source varchar2(30);
1192: BEGIN
1193: bsc_mo_helper_pkg.writeTmp( 'Inside GetMeasuresForFact, System time is '||bsc_mo_helper_pkg.get_time, fnd_log.level_statement, true);
1194: OPEN cv for l_stmt2 USING BSC_METADATA_OPTIMIZER_PKG.C_PFORMULASOURCE,
1195: BSC_METADATA_OPTIMIZER_PKG.C_PAVGL,
1196: BSC_METADATA_OPTIMIZER_PKG.C_PAVGLTOTAL,
1197: BSC_METADATA_OPTIMIZER_PKG.C_PAVGLCOUNTER, p_dim_set, to_number(p_fact);

Line 1357: bsc_mo_helper_pkg.writeTmp( 'Compl. GetMeasuresForFact, System time is '||bsc_mo_helper_pkg.get_time, fnd_log.level_statement, true);

1353: END IF;
1354: END Loop;
1355: close cv;
1356:
1357: bsc_mo_helper_pkg.writeTmp( 'Compl. GetMeasuresForFact, System time is '||bsc_mo_helper_pkg.get_time, fnd_log.level_statement, true);
1358: return colMeasures;
1359: EXCEPTION WHEN OTHERS THEN
1360: g_error := sqlerrm;
1361: fnd_file.put_line(fnd_file.log, 'Exception in bsc_dbgen_bsc_reader.get_measures_for_fact, p_fact='||p_fact||', dimset='||p_dim_set||g_error);

Line 1616: fnd_file.put_line(FND_FILE.LOG, 'Error in BSC_DBGEN_BSC_READER.Get_Dimensions_For_Fact:fact='||p_fact||', dimset='||p_dim_set||', missing levels='||bsc_mo_helper_pkg.boolean_decode(p_include_missing_levels)||', error='||sqlerrm);

1612: close cv;
1613:
1614: return l_dimensions;
1615: EXCEPTION WHEN OTHERS THEN
1616: fnd_file.put_line(FND_FILE.LOG, 'Error in BSC_DBGEN_BSC_READER.Get_Dimensions_For_Fact:fact='||p_fact||', dimset='||p_dim_set||', missing levels='||bsc_mo_helper_pkg.boolean_decode(p_include_missing_levels)||', error='||sqlerrm);
1617: raise;
1618: END;
1619:
1620:

Line 2009: fnd_file.put_line(FND_FILE.LOG, 'Error in BSC_DBGEN_BSC_READER.Get_b_table_measures_for_fact:'||p_fact||','||p_dim_set||','||p_base_table||','||bsc_mo_helper_pkg.boolean_decode(p_include_derived_columns)||':'||sqlerrm);

2005: END IF;
2006: return l_measure_list;
2007:
2008: Exception when others then
2009: fnd_file.put_line(FND_FILE.LOG, 'Error in BSC_DBGEN_BSC_READER.Get_b_table_measures_for_fact:'||p_fact||','||p_dim_set||','||p_base_table||','||bsc_mo_helper_pkg.boolean_decode(p_include_derived_columns)||':'||sqlerrm);
2010: raise;
2011: End;
2012:
2013: function get_periodicity_for_table(

Line 2144: fnd_file.put_line(FND_FILE.LOG, 'Error in BSC_DBGEN_BSC_READER.Get_base_tables_for_dim_set:'||p_fact||','||p_dim_set||','||bsc_mo_helper_pkg.boolean_decode(p_targets)||':'||sqlerrm);

2140: l_table_list(l_table_list.count+1) := i.table_name;
2141: END LOOP;
2142: return l_table_list;
2143: Exception when others then
2144: fnd_file.put_line(FND_FILE.LOG, 'Error in BSC_DBGEN_BSC_READER.Get_base_tables_for_dim_set:'||p_fact||','||p_dim_set||','||bsc_mo_helper_pkg.boolean_decode(p_targets)||':'||sqlerrm);
2145: raise;
2146: END;
2147:
2148:

Line 2888: IF BSC_MO_HELPER_PKG.FindIndex(BSC_METADATA_OPTIMIZER_PKG.g_bt_tables_tgt,p_b_table_name) = -1 THEN

2884: l_col_type2 := 'A';
2885: end if;
2886:
2887: --rkumar: modified for bug#5506476
2888: IF BSC_MO_HELPER_PKG.FindIndex(BSC_METADATA_OPTIMIZER_PKG.g_bt_tables_tgt,p_b_table_name) = -1 THEN
2889: open cSummary('BSC_S_'||p_fact);
2890: fetch cSummary into l_s_table;
2891: close cSummary;
2892: ELSE