DBA Data[Home] [Help]

APPS.BSC_MO_INPUT_TABLE_PKG dependencies on FND_LOG

Line 369: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in load_upgrade_tables_db : '||l_error, FND_LOG.LEVEL_UNEXPECTED);

365: BSC_MO_HELPER_PKG.writeTmp('Completed load_upgrade_tables_db');
366: END IF;
367: EXCEPTION WHEN OTHERS THEN
368: l_error := sqlerrm;
369: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in load_upgrade_tables_db : '||l_error, FND_LOG.LEVEL_UNEXPECTED);
370: BSC_MO_HELPER_PKG.writeTmp('l_stack ='||l_stack, FND_LOG.LEVEL_UNEXPECTED, true);
371: raise;
372: End ;
373:

Line 370: BSC_MO_HELPER_PKG.writeTmp('l_stack ='||l_stack, FND_LOG.LEVEL_UNEXPECTED, true);

366: END IF;
367: EXCEPTION WHEN OTHERS THEN
368: l_error := sqlerrm;
369: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in load_upgrade_tables_db : '||l_error, FND_LOG.LEVEL_UNEXPECTED);
370: BSC_MO_HELPER_PKG.writeTmp('l_stack ='||l_stack, FND_LOG.LEVEL_UNEXPECTED, true);
371: raise;
372: End ;
373:
374:

Line 407: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in all_key_comb_registered : '||l_error, FND_LOG.LEVEL_UNEXPECTED);

403: END LOOP;
404: return true;
405: EXCEPTION WHEN OTHERS THEN
406: l_error := sqlerrm;
407: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in all_key_comb_registered : '||l_error, FND_LOG.LEVEL_UNEXPECTED);
408: raise;
409: End;
410:
411:

Line 433: BSC_MO_HELPER_PKG.writeTmp('Inside TableOriginExists, key_combinations = ', FND_LOG.LEVEL_PROCEDURE);

429: l_origins DBMS_SQL.VARCHAR2_TABLE;
430: l_error VARCHAR2(1000);
431: BEGIN
432: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
433: BSC_MO_HELPER_PKG.writeTmp('Inside TableOriginExists, key_combinations = ', FND_LOG.LEVEL_PROCEDURE);
434: BSC_MO_HELPER_PKG.writeTmp(' Parameter p_table_name='||p_table_name
435: ||', and p_table_origins is '||p_table_origins, FND_LOG.LEVEL_STATEMENT);
436: END IF;
437: l_origins := BSC_MO_HELPER_PKG.getDecomposedString(p_table_origins, ',');

Line 435: ||', and p_table_origins is '||p_table_origins, FND_LOG.LEVEL_STATEMENT);

431: BEGIN
432: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
433: BSC_MO_HELPER_PKG.writeTmp('Inside TableOriginExists, key_combinations = ', FND_LOG.LEVEL_PROCEDURE);
434: BSC_MO_HELPER_PKG.writeTmp(' Parameter p_table_name='||p_table_name
435: ||', and p_table_origins is '||p_table_origins, FND_LOG.LEVEL_STATEMENT);
436: END IF;
437: l_origins := BSC_MO_HELPER_PKG.getDecomposedString(p_table_origins, ',');
438: IF (l_origins.count = 0) THEN
439: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN

Line 440: BSC_MO_HELPER_PKG.writeTmp('Completed TableOriginExists, returning false', FND_LOG.LEVEL_PROCEDURE);

436: END IF;
437: l_origins := BSC_MO_HELPER_PKG.getDecomposedString(p_table_origins, ',');
438: IF (l_origins.count = 0) THEN
439: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
440: BSC_MO_HELPER_PKG.writeTmp('Completed TableOriginExists, returning false', FND_LOG.LEVEL_PROCEDURE);
441: END IF;
442: return false;
443: END IF;
444: l_count1 := l_origins.first;

Line 449: BSC_MO_HELPER_PKG.writeTmp('Completed TableOriginExists, returning true', FND_LOG.LEVEL_PROCEDURE);

445: LOOP
446: l_table := l_origins(l_count1);
447: If UPPER(l_table) = UPPER(p_table_name) Then
448: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
449: BSC_MO_HELPER_PKG.writeTmp('Completed TableOriginExists, returning true', FND_LOG.LEVEL_PROCEDURE);
450: END IF;
451: return true;
452: End If;
453: EXIT WHEN l_count1= l_origins.last;

Line 457: BSC_MO_HELPER_PKG.writeTmp('Completed TableOriginExists, returning false', FND_LOG.LEVEL_PROCEDURE);

453: EXIT WHEN l_count1= l_origins.last;
454: l_count1 := l_origins.next(l_count1);
455: END LOOP;
456: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
457: BSC_MO_HELPER_PKG.writeTmp('Completed TableOriginExists, returning false', FND_LOG.LEVEL_PROCEDURE);
458: END IF;
459: return false;
460: EXCEPTION WHEN OTHERS THEN
461: l_error := sqlerrm;

Line 504: BSC_MO_HELPER_PKG.writeTmp('Done with get_matching_tables, returning -1', FND_LOG.LEVEL_PROCEDURE);

500: l_return_table DBMS_SQL.NUMBER_TABLE ;
501: BEGIN
502: IF (p_BTTables.count = 0) THEN
503: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
504: BSC_MO_HELPER_PKG.writeTmp('Done with get_matching_tables, returning -1', FND_LOG.LEVEL_PROCEDURE);
505: END IF;
506: return l_return_table;
507: END IF;
508:

Line 577: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in get_matching_tables : '||l_error, FND_LOG.LEVEL_UNEXPECTED);

573: END LOOP;
574: return l_return_table;
575: EXCEPTION WHEN OTHERS THEN
576: l_error := sqlerrm;
577: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in get_matching_tables : '||l_error, FND_LOG.LEVEL_UNEXPECTED);
578: IF (l_temp=-1) THEN
579: BSC_MO_HELPER_PKG.writeTmp('Measure '||p_BTTables(i).Data(0).fieldName||', source=' ||p_BTTables(i).Data(0).source||' does not exist in the list of measures in bsc_sys_measures.', FND_LOG.LEVEL_STATEMENT, true);
580: END IF;
581: raise;

Line 579: BSC_MO_HELPER_PKG.writeTmp('Measure '||p_BTTables(i).Data(0).fieldName||', source=' ||p_BTTables(i).Data(0).source||' does not exist in the list of measures in bsc_sys_measures.', FND_LOG.LEVEL_STATEMENT, true);

575: EXCEPTION WHEN OTHERS THEN
576: l_error := sqlerrm;
577: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in get_matching_tables : '||l_error, FND_LOG.LEVEL_UNEXPECTED);
578: IF (l_temp=-1) THEN
579: BSC_MO_HELPER_PKG.writeTmp('Measure '||p_BTTables(i).Data(0).fieldName||', source=' ||p_BTTables(i).Data(0).source||' does not exist in the list of measures in bsc_sys_measures.', FND_LOG.LEVEL_STATEMENT, true);
580: END IF;
581: raise;
582: End ;
583:

Line 684: BSC_MO_HELPER_PKG.writeTmp('Inside connect_i_to_b_tables '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);

680: l_error VARCHAR2(1000);
681: l_table_null BSC_METADATA_OPTIMIZER_PKG.clsTable;
682: BEGIN
683: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
684: BSC_MO_HELPER_PKG.writeTmp('Inside connect_i_to_b_tables '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);
685: END IF;
686: IF (BSC_METADATA_OPTIMIZER_PKG.gTables.count=0) THEN
687: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
688: BSC_MO_HELPER_PKG.writeTmp('Completed connect_i_to_b_tables, gTables.count was 0', FND_LOG.LEVEL_PROCEDURE);

Line 688: BSC_MO_HELPER_PKG.writeTmp('Completed connect_i_to_b_tables, gTables.count was 0', FND_LOG.LEVEL_PROCEDURE);

684: BSC_MO_HELPER_PKG.writeTmp('Inside connect_i_to_b_tables '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);
685: END IF;
686: IF (BSC_METADATA_OPTIMIZER_PKG.gTables.count=0) THEN
687: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
688: BSC_MO_HELPER_PKG.writeTmp('Completed connect_i_to_b_tables, gTables.count was 0', FND_LOG.LEVEL_PROCEDURE);
689: END IF;
690: return;
691: END IF;
692: l_index1 := BSC_METADATA_OPTIMIZER_PKG.gTables.first;

Line 702: ') : '||l_table.name, FND_LOG.LEVEL_STATEMENT);

698: END IF;
699: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
700: BSC_MO_HELPER_PKG.writeTmp('');
701: BSC_MO_HELPER_PKG.writeTmp('Processing table gTables('||l_index1||
702: ') : '||l_table.name, FND_LOG.LEVEL_STATEMENT);
703: END IF;
704: Tabla_Origin.delete;
705: Tabla_Origin := BSC_MO_HELPER_PKG.getDecomposedString(l_table.originTable, ',');
706: --For tables with no origin (base tables)

Line 762: BSC_MO_HELPER_PKG.writeTmp('Completed connect_i_to_b_tables '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);

758: EXIT WHEN l_index1 = BSC_METADATA_OPTIMIZER_PKG.gTables.last;
759: l_index1 := BSC_METADATA_OPTIMIZER_PKG.gTables.next(l_index1);
760: END LOOP;
761: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
762: BSC_MO_HELPER_PKG.writeTmp('Completed connect_i_to_b_tables '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);
763: END IF;
764: EXCEPTION WHEN OTHERS THEN
765: l_error := sqlerrm;
766: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in connect_i_to_b_tables : '||l_error, FND_LOG.LEVEL_UNEXPECTED);

Line 766: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in connect_i_to_b_tables : '||l_error, FND_LOG.LEVEL_UNEXPECTED);

762: BSC_MO_HELPER_PKG.writeTmp('Completed connect_i_to_b_tables '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);
763: END IF;
764: EXCEPTION WHEN OTHERS THEN
765: l_error := sqlerrm;
766: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in connect_i_to_b_tables : '||l_error, FND_LOG.LEVEL_UNEXPECTED);
767: raise;
768: End;
769: --****************************************************************************
770: -- add_to_gtables: AdicTablasTempATablasSistema

Line 794: FND_LOG.LEVEL_PROCEDURE);

790:
791: IF (p_tables.count =0) THEN
792: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
793: BSC_MO_HELPER_PKG.writeTmp('Done with add_to_gtables, p_tables.count=0',
794: FND_LOG.LEVEL_PROCEDURE);
795: END IF;
796: return;
797: END IF;
798: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN

Line 799: BSC_MO_HELPER_PKG.writeTmp('Inside add_to_gtables '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);

795: END IF;
796: return;
797: END IF;
798: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
799: BSC_MO_HELPER_PKG.writeTmp('Inside add_to_gtables '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);
800: END IF;
801: l_index1 := p_tables.first;
802: LOOP
803: BSC_MO_HELPER_PKG.addTable(p_tables(l_index1), 'add_to_gtables');

Line 808: BSC_MO_HELPER_PKG.writeTmp('Completed add_to_gtables '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);

804: EXIT WHEN l_index1 = p_tables.last;
805: l_index1 := p_tables.next(l_index1);
806: END LOOP;
807: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
808: BSC_MO_HELPER_PKG.writeTmp('Completed add_to_gtables '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);
809: END IF;
810: EXCEPTION WHEN OTHERS THEN
811: l_error := sqlerrm;
812: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in add_to_gtables : '||l_error);

Line 865: p_tables.count, FND_LOG.LEVEL_PROCEDURE);

861: l_measure_group := BSC_METADATA_OPTIMIZER_PKG.gLov(l_measure_index).groupCode;
862: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
863: BSC_MO_HELPER_PKG.writeTmp('Inside get_origin_table, pPeriodicity='||pPeriodicity
864: ||', fieldName ='||fieldName||', source='||p_source||', measure_group='||p_measure_group||', p_impl_type='||p_impl_type||', p_tables.count = '||
865: p_tables.count, FND_LOG.LEVEL_PROCEDURE);
866: END IF;
867: l_index1 := p_tables.first;
868:
869: LOOP

Line 896: L_Table.Name, FND_LOG.LEVEL_PROCEDURE);

892: END LOOP;
893: If keysEqual Then
894: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
895: BSC_MO_HELPER_PKG.writeTmp('Compl get_origin_table, returning '||
896: L_Table.Name, FND_LOG.LEVEL_PROCEDURE);
897: BSC_MO_HELPER_PKG.writeTmp('Elapsed time (secs) '||
898: (sysdate-l_start_time)*86400, FND_LOG.LEVEL_STATEMENT);
899: END IF;
900: return L_Table.Name;

Line 898: (sysdate-l_start_time)*86400, FND_LOG.LEVEL_STATEMENT);

894: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
895: BSC_MO_HELPER_PKG.writeTmp('Compl get_origin_table, returning '||
896: L_Table.Name, FND_LOG.LEVEL_PROCEDURE);
897: BSC_MO_HELPER_PKG.writeTmp('Elapsed time (secs) '||
898: (sysdate-l_start_time)*86400, FND_LOG.LEVEL_STATEMENT);
899: END IF;
900: return L_Table.Name;
901: End If;
902: End If;

Line 909: BSC_MO_HELPER_PKG.writeTmp('Compl get_origin_table, returning null', FND_LOG.LEVEL_PROCEDURE);

905: EXIT WHEN l_index1 = p_tables.last;
906: l_index1 := p_tables.next(l_index1);
907: END LOOP;
908: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
909: BSC_MO_HELPER_PKG.writeTmp('Compl get_origin_table, returning null', FND_LOG.LEVEL_PROCEDURE);
910: END IF;
911: return null;
912:
913: EXCEPTION WHEN OTHERS THEN

Line 944: BSC_MO_HELPER_PKG.writeTmp('Inside connect_s_to_b_tables '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);

940: l_error VARCHAR2(1000);
941:
942: BEGIN
943: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
944: BSC_MO_HELPER_PKG.writeTmp('Inside connect_s_to_b_tables '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);
945: BSC_MO_HELPER_PKG.writeTmp('System time is '||to_char(sysdate, 'hh24:mi:ss'), FND_LOG.LEVEL_STATEMENT);
946: END IF;
947: IF (BSC_METADATA_OPTIMIZER_PKG.gTables.count=0) THEN
948: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN

Line 945: BSC_MO_HELPER_PKG.writeTmp('System time is '||to_char(sysdate, 'hh24:mi:ss'), FND_LOG.LEVEL_STATEMENT);

941:
942: BEGIN
943: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
944: BSC_MO_HELPER_PKG.writeTmp('Inside connect_s_to_b_tables '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);
945: BSC_MO_HELPER_PKG.writeTmp('System time is '||to_char(sysdate, 'hh24:mi:ss'), FND_LOG.LEVEL_STATEMENT);
946: END IF;
947: IF (BSC_METADATA_OPTIMIZER_PKG.gTables.count=0) THEN
948: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
949: BSC_MO_HELPER_PKG.writeTmp('Compl connect_s_to_b_tables, gTables.count was 0', FND_LOG.LEVEL_PROCEDURE);

Line 949: BSC_MO_HELPER_PKG.writeTmp('Compl connect_s_to_b_tables, gTables.count was 0', FND_LOG.LEVEL_PROCEDURE);

945: BSC_MO_HELPER_PKG.writeTmp('System time is '||to_char(sysdate, 'hh24:mi:ss'), FND_LOG.LEVEL_STATEMENT);
946: END IF;
947: IF (BSC_METADATA_OPTIMIZER_PKG.gTables.count=0) THEN
948: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
949: BSC_MO_HELPER_PKG.writeTmp('Compl connect_s_to_b_tables, gTables.count was 0', FND_LOG.LEVEL_PROCEDURE);
950: END IF;
951: return;
952: END IF;
953: l_index1 := BSC_METADATA_OPTIMIZER_PKG.gTables.first;

Line 962: FND_LOG.LEVEL_STATEMENT);

958: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
959: BSC_MO_HELPER_PKG.writeTmp('');
960: BSC_MO_HELPER_PKG.writeTmp('Processing table '||l_index1||' '||
961: l_table.name||', System time is '||bsc_mo_helper_pkg.get_time,
962: FND_LOG.LEVEL_STATEMENT);
963: BSC_MO_HELPER_PKG.writeTmp('------------------------------------------------');
964: END IF;
965: --Only consider tables with no origin
966: If Tabla_OriginTable.Count = 0 Then

Line 1013: BSC_MO_HELPER_PKG.writeTmp('10. Origin = '||l_origin_table, FND_LOG.LEVEL_STATEMENT);

1009: l_table.impl_type,
1010: BSC_METADATA_OPTIMIZER_PKG.g_bt_tables_precalc);
1011: End If;
1012: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1013: BSC_MO_HELPER_PKG.writeTmp('10. Origin = '||l_origin_table, FND_LOG.LEVEL_STATEMENT);
1014: END IF;
1015: IF (l_origin_table is null) THEN
1016: BSC_MO_HELPER_PKG.writeTmp('ERROR:connect_s_to_b_tables: Unable to find source table for '||
1017: l_table.name||'.'||l_measure.fieldName, FND_LOG.LEVEL_EXCEPTION, true);

Line 1017: l_table.name||'.'||l_measure.fieldName, FND_LOG.LEVEL_EXCEPTION, true);

1013: BSC_MO_HELPER_PKG.writeTmp('10. Origin = '||l_origin_table, FND_LOG.LEVEL_STATEMENT);
1014: END IF;
1015: IF (l_origin_table is null) THEN
1016: BSC_MO_HELPER_PKG.writeTmp('ERROR:connect_s_to_b_tables: Unable to find source table for '||
1017: l_table.name||'.'||l_measure.fieldName, FND_LOG.LEVEL_EXCEPTION, true);
1018: raise bsc_metadata_optimizer_pkg.optimizer_exception;
1019: END IF;
1020: --In the Indicator tables l_measure.Origen was already set
1021: --TablasOri

Line 1024: BSC_MO_HELPER_PKG.writeTmp('11. Table does not have source ', FND_LOG.LEVEL_STATEMENT);

1020: --In the Indicator tables l_measure.Origen was already set
1021: --TablasOri
1022: If Not TableOriginExists(l_table.originTable, l_origin_table) Then
1023: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1024: BSC_MO_HELPER_PKG.writeTmp('11. Table does not have source ', FND_LOG.LEVEL_STATEMENT);
1025: END IF;
1026: l_table_origin := l_origin_table;
1027: IF (l_table.originTable IS NOT NULL) THEN
1028: l_table.originTable := l_table.originTable||',';

Line 1049: BSC_MO_HELPER_PKG.writeTmp('Elapsed time (secs) '||(l_end-l_start_time)*86400, FND_LOG.LEVEL_STATEMENT);

1045: l_index1 := BSC_METADATA_OPTIMIZER_PKG.gTables.next(l_index1);
1046: END LOOP;
1047: l_end := sysdate;
1048: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1049: BSC_MO_HELPER_PKG.writeTmp('Elapsed time (secs) '||(l_end-l_start_time)*86400, FND_LOG.LEVEL_STATEMENT);
1050: END IF;
1051: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1052: BSC_MO_HELPER_PKG.writeTmp('Completed connect_s_to_b_tables '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);
1053: END IF;

Line 1052: BSC_MO_HELPER_PKG.writeTmp('Completed connect_s_to_b_tables '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);

1048: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1049: BSC_MO_HELPER_PKG.writeTmp('Elapsed time (secs) '||(l_end-l_start_time)*86400, FND_LOG.LEVEL_STATEMENT);
1050: END IF;
1051: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1052: BSC_MO_HELPER_PKG.writeTmp('Completed connect_s_to_b_tables '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);
1053: END IF;
1054: EXCEPTION WHEN OTHERS THEN
1055: l_error := sqlerrm;
1056: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in connect_s_to_b_tables : '||l_error);

Line 1092: BSC_MO_HELPER_PKG.writeTmp('Inside deduce_bt_tables_precalc, # of precalc measures = '||BSC_METADATA_OPTIMIZER_PKG.g_unique_measures_precalc.count||', system time is '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);

1088: return;
1089: END IF;
1090: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1091: BSC_MO_HELPER_PKG.writeTmp(g_newline||g_newline||g_newline);
1092: BSC_MO_HELPER_PKG.writeTmp('Inside deduce_bt_tables_precalc, # of precalc measures = '||BSC_METADATA_OPTIMIZER_PKG.g_unique_measures_precalc.count||', system time is '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);
1093: END IF;
1094: l_index1 := BSC_METADATA_OPTIMIZER_PKG.g_unique_measures_precalc.first;
1095:
1096: LOOP

Line 1147: bsc_mo_helper_pkg.writeTmp('Adding following table to g_bt_tables_precalc', FND_LOG.LEVEL_STATEMENT,false);

1143: --Note: other properties for internal columns are not used in input, base, temporal tables
1144: l_table.data(l_table.data.count) := l_datafield;
1145: --Add the table to the collection g_bt_tables_precalc
1146: BSC_METADATA_OPTIMIZER_PKG.g_bt_tables_precalc(BSC_METADATA_OPTIMIZER_PKG.g_bt_tables_precalc.count) := l_table;
1147: bsc_mo_helper_pkg.writeTmp('Adding following table to g_bt_tables_precalc', FND_LOG.LEVEL_STATEMENT,false);
1148: bsc_mo_helper_pkg.write_this(l_table);
1149: ELSE
1150: --Add the field to the temporal table
1151: --Data columns

Line 1175: BSC_MO_HELPER_PKG.writeTmp('g_bt_tables_precalc is ', FND_LOG.LEVEL_STATEMENT);

1171: l_index1 := BSC_METADATA_OPTIMIZER_PKG.g_unique_measures_precalc.next(l_index1);
1172: END LOOP;
1173:
1174: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1175: BSC_MO_HELPER_PKG.writeTmp('g_bt_tables_precalc is ', FND_LOG.LEVEL_STATEMENT);
1176: BSC_MO_HELPER_PKG.write_THIS(BSC_METADATA_OPTIMIZER_PKG.g_bt_tables_precalc, FND_LOG.LEVEL_STATEMENT);
1177: BSC_MO_HELPER_PKG.writeTmp('Completed deduce_bt_tables_precalc, system time is '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);
1178: END IF;
1179:

Line 1176: BSC_MO_HELPER_PKG.write_THIS(BSC_METADATA_OPTIMIZER_PKG.g_bt_tables_precalc, FND_LOG.LEVEL_STATEMENT);

1172: END LOOP;
1173:
1174: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1175: BSC_MO_HELPER_PKG.writeTmp('g_bt_tables_precalc is ', FND_LOG.LEVEL_STATEMENT);
1176: BSC_MO_HELPER_PKG.write_THIS(BSC_METADATA_OPTIMIZER_PKG.g_bt_tables_precalc, FND_LOG.LEVEL_STATEMENT);
1177: BSC_MO_HELPER_PKG.writeTmp('Completed deduce_bt_tables_precalc, system time is '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);
1178: END IF;
1179:
1180: EXCEPTION WHEN OTHERS THEN

Line 1177: BSC_MO_HELPER_PKG.writeTmp('Completed deduce_bt_tables_precalc, system time is '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);

1173:
1174: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1175: BSC_MO_HELPER_PKG.writeTmp('g_bt_tables_precalc is ', FND_LOG.LEVEL_STATEMENT);
1176: BSC_MO_HELPER_PKG.write_THIS(BSC_METADATA_OPTIMIZER_PKG.g_bt_tables_precalc, FND_LOG.LEVEL_STATEMENT);
1177: BSC_MO_HELPER_PKG.writeTmp('Completed deduce_bt_tables_precalc, system time is '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);
1178: END IF;
1179:
1180: EXCEPTION WHEN OTHERS THEN
1181: l_error := sqlerrm;

Line 1212: BSC_MO_HELPER_PKG.writeTmp('Inside areDisaggsSame', FND_LOG.LEVEL_PROCEDURE);

1208:
1209: l_error VARCHAR2(4000);
1210: BEGIN
1211: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1212: BSC_MO_HELPER_PKG.writeTmp('Inside areDisaggsSame', FND_LOG.LEVEL_PROCEDURE);
1213: END IF;
1214: If pPeriodicityA = pPeriodicityB Then
1215: If keysA.Count = keysB.Count Then
1216: keysEqual := True;

Line 1231: BSC_MO_HELPER_PKG.writeTmp('Completed areDisaggsSame, ret true', FND_LOG.LEVEL_PROCEDURE);

1227: END LOOP;
1228: END IF;
1229: If keysEqual Then
1230: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1231: BSC_MO_HELPER_PKG.writeTmp('Completed areDisaggsSame, ret true', FND_LOG.LEVEL_PROCEDURE);
1232: END IF;
1233: return true;
1234: End If;
1235: End If;

Line 1239: BSC_MO_HELPER_PKG.writeTmp('Completed areDisaggsSame ret false', FND_LOG.LEVEL_PROCEDURE);

1235: End If;
1236: End If;
1237:
1238: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1239: BSC_MO_HELPER_PKG.writeTmp('Completed areDisaggsSame ret false', FND_LOG.LEVEL_PROCEDURE);
1240: END IF;
1241: return false;
1242: EXCEPTION WHEN OTHERS THEN
1243: l_error := sqlerrm;

Line 1245: BSC_MO_HELPER_PKG.writeTmp('pPeriodicityA='||pPeriodicityA||', pPeriodicityB='||pPeriodicityB, FND_LOG.LEVEL_EXCEPTION, true);

1241: return false;
1242: EXCEPTION WHEN OTHERS THEN
1243: l_error := sqlerrm;
1244: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in areDisaggsSame, '||l_error);
1245: BSC_MO_HELPER_PKG.writeTmp('pPeriodicityA='||pPeriodicityA||', pPeriodicityB='||pPeriodicityB, FND_LOG.LEVEL_EXCEPTION, true);
1246: BSC_MO_HELPER_PKG.writeTmp('KeysA=', FND_LOG.LEVEL_EXCEPTION, true);
1247: BSC_MO_HELPER_PKG.write_this(keysA, FND_LOG.LEVEL_EXCEPTION, true);
1248: BSC_MO_HELPER_PKG.writeTmp('KeysB=', FND_LOG.LEVEL_EXCEPTION, true);
1249: BSC_MO_HELPER_PKG.write_this(keysB, FND_LOG.LEVEL_EXCEPTION, true);

Line 1246: BSC_MO_HELPER_PKG.writeTmp('KeysA=', FND_LOG.LEVEL_EXCEPTION, true);

1242: EXCEPTION WHEN OTHERS THEN
1243: l_error := sqlerrm;
1244: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in areDisaggsSame, '||l_error);
1245: BSC_MO_HELPER_PKG.writeTmp('pPeriodicityA='||pPeriodicityA||', pPeriodicityB='||pPeriodicityB, FND_LOG.LEVEL_EXCEPTION, true);
1246: BSC_MO_HELPER_PKG.writeTmp('KeysA=', FND_LOG.LEVEL_EXCEPTION, true);
1247: BSC_MO_HELPER_PKG.write_this(keysA, FND_LOG.LEVEL_EXCEPTION, true);
1248: BSC_MO_HELPER_PKG.writeTmp('KeysB=', FND_LOG.LEVEL_EXCEPTION, true);
1249: BSC_MO_HELPER_PKG.write_this(keysB, FND_LOG.LEVEL_EXCEPTION, true);
1250: raise;

Line 1247: BSC_MO_HELPER_PKG.write_this(keysA, FND_LOG.LEVEL_EXCEPTION, true);

1243: l_error := sqlerrm;
1244: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in areDisaggsSame, '||l_error);
1245: BSC_MO_HELPER_PKG.writeTmp('pPeriodicityA='||pPeriodicityA||', pPeriodicityB='||pPeriodicityB, FND_LOG.LEVEL_EXCEPTION, true);
1246: BSC_MO_HELPER_PKG.writeTmp('KeysA=', FND_LOG.LEVEL_EXCEPTION, true);
1247: BSC_MO_HELPER_PKG.write_this(keysA, FND_LOG.LEVEL_EXCEPTION, true);
1248: BSC_MO_HELPER_PKG.writeTmp('KeysB=', FND_LOG.LEVEL_EXCEPTION, true);
1249: BSC_MO_HELPER_PKG.write_this(keysB, FND_LOG.LEVEL_EXCEPTION, true);
1250: raise;
1251: End ;

Line 1248: BSC_MO_HELPER_PKG.writeTmp('KeysB=', FND_LOG.LEVEL_EXCEPTION, true);

1244: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in areDisaggsSame, '||l_error);
1245: BSC_MO_HELPER_PKG.writeTmp('pPeriodicityA='||pPeriodicityA||', pPeriodicityB='||pPeriodicityB, FND_LOG.LEVEL_EXCEPTION, true);
1246: BSC_MO_HELPER_PKG.writeTmp('KeysA=', FND_LOG.LEVEL_EXCEPTION, true);
1247: BSC_MO_HELPER_PKG.write_this(keysA, FND_LOG.LEVEL_EXCEPTION, true);
1248: BSC_MO_HELPER_PKG.writeTmp('KeysB=', FND_LOG.LEVEL_EXCEPTION, true);
1249: BSC_MO_HELPER_PKG.write_this(keysB, FND_LOG.LEVEL_EXCEPTION, true);
1250: raise;
1251: End ;
1252: --****************************************************************************

Line 1249: BSC_MO_HELPER_PKG.write_this(keysB, FND_LOG.LEVEL_EXCEPTION, true);

1245: BSC_MO_HELPER_PKG.writeTmp('pPeriodicityA='||pPeriodicityA||', pPeriodicityB='||pPeriodicityB, FND_LOG.LEVEL_EXCEPTION, true);
1246: BSC_MO_HELPER_PKG.writeTmp('KeysA=', FND_LOG.LEVEL_EXCEPTION, true);
1247: BSC_MO_HELPER_PKG.write_this(keysA, FND_LOG.LEVEL_EXCEPTION, true);
1248: BSC_MO_HELPER_PKG.writeTmp('KeysB=', FND_LOG.LEVEL_EXCEPTION, true);
1249: BSC_MO_HELPER_PKG.write_this(keysB, FND_LOG.LEVEL_EXCEPTION, true);
1250: raise;
1251: End ;
1252: --****************************************************************************
1253: -- CreaLoopDesagDestOri:circular_dependency_exists

Line 1278: BSC_MO_HELPER_PKG.writeTmp('Inside circular_dependency_exists for p_target_keys='||p_target_keys||', p_origin_keys='||p_origin_keys, FND_LOG.LEVEL_PROCEDURE);

1274: l_index2 NUMBER;
1275: l_error VARCHAR2(4000);
1276: begin
1277: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1278: BSC_MO_HELPER_PKG.writeTmp('Inside circular_dependency_exists for p_target_keys='||p_target_keys||', p_origin_keys='||p_origin_keys, FND_LOG.LEVEL_PROCEDURE);
1279: BSC_MO_HELPER_PKG.write_this(p_key_combinations);
1280: END IF;
1281: l_index1 := BSC_MO_HELPER_PKG.findIndex(p_key_combinations, p_origin_keys);
1282: l_index2 := BSC_MO_HELPER_PKG.findIndex(p_key_combinations, p_target_keys);

Line 1292: bsc_mo_helper_pkg.boolean_decode(res), FND_LOG.LEVEL_PROCEDURE);

1288: res := circular_dependency_exists(p_target_keys, p_key_combinations(l_index1).Origin, p_key_combinations);
1289: End If;
1290: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1291: BSC_MO_HELPER_PKG.writeTmp('Completed circular_dependency_exists, res='||
1292: bsc_mo_helper_pkg.boolean_decode(res), FND_LOG.LEVEL_PROCEDURE);
1293: END IF;
1294: return res;
1295: EXCEPTION WHEN OTHERS THEN
1296: l_error := sqlerrm;

Line 1346: BSC_MO_HELPER_PKG.writeTmp('Bad Periodicities metadata for Periodicity='||p_key_comb_target.Periodicity, FND_LOG.LEVEL_EXCEPTION, true);

1342: BEGIN
1343: If p_key_comb_target.Periodicity <> p_key_comb_origin.Periodicity Then
1344: l_index := BSC_MO_HELPER_PKG.FindIndex(BSC_METADATA_OPTIMIZER_PKG.gPeriodicities, p_key_comb_target.Periodicity);
1345: IF (l_index = -1) THEN -- metadata bad
1346: BSC_MO_HELPER_PKG.writeTmp('Bad Periodicities metadata for Periodicity='||p_key_comb_target.Periodicity, FND_LOG.LEVEL_EXCEPTION, true);
1347: END IF;
1348: l_per_origin := BSC_MO_HELPER_PKG.decomposeStringtoNumber(BSC_METADATA_OPTIMIZER_PKG.gPeriodicities(l_index).PeriodicityOrigin, ',' );
1349: If BSC_MO_HELPER_PKG.findIndex(l_per_origin, p_key_comb_origin.Periodicity) = -1 Then
1350: return false;

Line 1371: BSC_MO_HELPER_PKG.writeTmp('Bad dimension metadata for key='||l_key_origin.keyName, FND_LOG.LEVEL_EXCEPTION, true);

1367: End If;
1368: l_index1 := BSC_MO_HELPER_PKG.findKeyIndex(BSC_METADATA_OPTIMIZER_PKG.gMasterTable, l_key_origin.keyName);
1369: l_index2 := BSC_MO_HELPER_PKG.findKeyIndex(BSC_METADATA_OPTIMIZER_PKG.gMasterTable, l_key_target.keyName);
1370: IF (l_index1 = -1) THEN -- metadata bad
1371: BSC_MO_HELPER_PKG.writeTmp('Bad dimension metadata for key='||l_key_origin.keyName, FND_LOG.LEVEL_EXCEPTION, true);
1372: END IF;
1373: IF (l_index2 = -1) THEN -- metadata bad
1374: BSC_MO_HELPER_PKG.writeTmp('Bad dimension metadata for key='||l_key_target.keyName, FND_LOG.LEVEL_EXCEPTION, true);
1375: END IF;

Line 1374: BSC_MO_HELPER_PKG.writeTmp('Bad dimension metadata for key='||l_key_target.keyName, FND_LOG.LEVEL_EXCEPTION, true);

1370: IF (l_index1 = -1) THEN -- metadata bad
1371: BSC_MO_HELPER_PKG.writeTmp('Bad dimension metadata for key='||l_key_origin.keyName, FND_LOG.LEVEL_EXCEPTION, true);
1372: END IF;
1373: IF (l_index2 = -1) THEN -- metadata bad
1374: BSC_MO_HELPER_PKG.writeTmp('Bad dimension metadata for key='||l_key_target.keyName, FND_LOG.LEVEL_EXCEPTION, true);
1375: END IF;
1376: If BSC_MO_INDICATOR_PKG.IndexRelation1N(BSC_METADATA_OPTIMIZER_PKG.gMasterTable(l_index1).Name,
1377: BSC_METADATA_OPTIMIZER_PKG.gMasterTable(l_index2).Name) >= 0 Then
1378: If Not BSC_MO_INDICATOR_PKG.keyFieldExists(l_changed_levels, l_key_origin.keyName) Then

Line 1398: BSC_MO_HELPER_PKG.writeTmp('p_key_comb_targetCode ='||p_key_comb_targetCode||',p_key_comb_originCode ='||p_key_comb_originCode||', pTableName='||pTableName, FND_LOG.LEVEL_EXCEPTION, true);

1394:
1395: EXCEPTION WHEN OTHERS THEN
1396: l_error := sqlerrm;
1397: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in can_derive_keys : '||l_error);
1398: BSC_MO_HELPER_PKG.writeTmp('p_key_comb_targetCode ='||p_key_comb_targetCode||',p_key_comb_originCode ='||p_key_comb_originCode||', pTableName='||pTableName, FND_LOG.LEVEL_EXCEPTION, true);
1399: BSC_MO_HELPER_PKG.write_this(p_key_comb_target, 1, FND_LOG.LEVEL_EXCEPTION, true);
1400: BSC_MO_HELPER_PKG.write_this(p_key_comb_origin, 1, FND_LOG.LEVEL_EXCEPTION, true);
1401: raise;
1402: End ;

Line 1399: BSC_MO_HELPER_PKG.write_this(p_key_comb_target, 1, FND_LOG.LEVEL_EXCEPTION, true);

1395: EXCEPTION WHEN OTHERS THEN
1396: l_error := sqlerrm;
1397: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in can_derive_keys : '||l_error);
1398: BSC_MO_HELPER_PKG.writeTmp('p_key_comb_targetCode ='||p_key_comb_targetCode||',p_key_comb_originCode ='||p_key_comb_originCode||', pTableName='||pTableName, FND_LOG.LEVEL_EXCEPTION, true);
1399: BSC_MO_HELPER_PKG.write_this(p_key_comb_target, 1, FND_LOG.LEVEL_EXCEPTION, true);
1400: BSC_MO_HELPER_PKG.write_this(p_key_comb_origin, 1, FND_LOG.LEVEL_EXCEPTION, true);
1401: raise;
1402: End ;
1403: --****************************************************************************

Line 1400: BSC_MO_HELPER_PKG.write_this(p_key_comb_origin, 1, FND_LOG.LEVEL_EXCEPTION, true);

1396: l_error := sqlerrm;
1397: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in can_derive_keys : '||l_error);
1398: BSC_MO_HELPER_PKG.writeTmp('p_key_comb_targetCode ='||p_key_comb_targetCode||',p_key_comb_originCode ='||p_key_comb_originCode||', pTableName='||pTableName, FND_LOG.LEVEL_EXCEPTION, true);
1399: BSC_MO_HELPER_PKG.write_this(p_key_comb_target, 1, FND_LOG.LEVEL_EXCEPTION, true);
1400: BSC_MO_HELPER_PKG.write_this(p_key_comb_origin, 1, FND_LOG.LEVEL_EXCEPTION, true);
1401: raise;
1402: End ;
1403: --****************************************************************************
1404: -- InicListaTablasTemporalesyBasicas :deduce_bt_tables

Line 1439: bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);

1435: BEGIN
1436: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1437: BSC_MO_HELPER_PKG.writeTmp('Inside deduce_bt_tables, forTargets = '||
1438: bsc_mo_helper_pkg.boolean_decode(forTargets)||' , system time is '||
1439: bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);
1440: END IF;
1441:
1442: If forTargets Then
1443: l_unique_measures := BSC_METADATA_OPTIMIZER_PKG.g_unique_measures_tgt;

Line 1472: BSC_MO_HELPER_PKG.writeTmp('Atleast one disagg is not registered', FND_LOG.LEVEL_STATEMENT);

1468: BSC_MO_HELPER_PKG.write_this(l_tablename, uniqueField.fieldName, uniqueField.key_combinations);
1469: END IF;
1470: bMeasureLogged := true;
1471: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1472: BSC_MO_HELPER_PKG.writeTmp('Atleast one disagg is not registered', FND_LOG.LEVEL_STATEMENT);
1473: END IF;
1474: IF (uniqueField.key_combinations.count>0) THEN
1475: FOR l_count2 IN uniqueField.key_combinations.first..uniqueField.key_combinations.last
1476: LOOP

Line 1517: ', origin table = '||l_BTTables(iMatchingTableIndex(l_loop_ctr)).originTable , FND_LOG.LEVEL_STATEMENT);

1513: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1514: BSC_MO_HELPER_PKG.writeTmp('Found a existing temporal table with the same periodicity and '||
1515: ' disagregation and same field grouping.');
1516: BSC_MO_HELPER_PKG.writeTmp('Table name = '||l_BTTables(iMatchingTableIndex(l_loop_ctr)).Name||
1517: ', origin table = '||l_BTTables(iMatchingTableIndex(l_loop_ctr)).originTable , FND_LOG.LEVEL_STATEMENT);
1518: END IF;
1519: l_BTTables_origin := BSC_MO_HELPER_PKG.getDecomposedString(l_BTTables(iMatchingTableIndex(l_loop_ctr)).originTable, ',');
1520: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1521: BSC_MO_HELPER_PKG.writeTmp('7. l_key_combination.Origin = '||l_key_combination.Origin ||

Line 1523: bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_STATEMENT);

1519: l_BTTables_origin := BSC_MO_HELPER_PKG.getDecomposedString(l_BTTables(iMatchingTableIndex(l_loop_ctr)).originTable, ',');
1520: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1521: BSC_MO_HELPER_PKG.writeTmp('7. l_key_combination.Origin = '||l_key_combination.Origin ||
1522: ', l_BTTables_origin.Count = '||l_BTTables_origin.Count||' , system time is '||
1523: bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_STATEMENT);
1524: END IF;
1525: If l_key_combination.Origin = 0 Then
1526: If l_BTTables_origin.Count = 0 -- if its a B table added in this run
1527: -- or if its a production B table

Line 1612: BSC_MO_HELPER_PKG.writeTmp('14. l_origin_table = '||l_origin_table||' system time is '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_STATEMENT);

1608: uniqueField.impl_type,
1609: l_BTTables);
1610: End If;
1611: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1612: BSC_MO_HELPER_PKG.writeTmp('14. l_origin_table = '||l_origin_table||' system time is '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_STATEMENT);
1613: END IF;
1614: --Note: removed the name of the table as prefix of the column
1615: --I do not see that the same column could be in two origin tables.
1616: l_measure_column.Origin := l_measure_column.aggFunction|| '('|| l_measure_column.fieldName || ')';

Line 1639: BSC_MO_HELPER_PKG.writeTmp('15. Registered key combination', FND_LOG.LEVEL_STATEMENT);

1635: END IF;
1636: l_BTTables(l_BTTables.count) := l_table;
1637: l_key_combination.Registered := True;
1638: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1639: BSC_MO_HELPER_PKG.writeTmp('15. Registered key combination', FND_LOG.LEVEL_STATEMENT);
1640: END IF;
1641: Else -- Table already exists
1642: --Add the field to the temporal table
1643: --Data columns

Line 1651: BSC_MO_HELPER_PKG.writeTmp('16. Add current field '||l_measure_column.fieldName, FND_LOG.LEVEL_STATEMENT);

1647: l_measure_column.source := uniqueField.source;
1648: l_measure_column.MeasureGroup := get_measure_group(uniqueField.fieldname, uniqueField.source);
1649: l_measure_column.aggFunction := uniqueField.aggFunction;
1650: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1651: BSC_MO_HELPER_PKG.writeTmp('16. Add current field '||l_measure_column.fieldName, FND_LOG.LEVEL_STATEMENT);
1652: END IF;
1653: If l_key_combination.Origin <> 0 Then
1654: l_index := BSC_MO_HELPER_PKG.findIndex(uniqueField.key_combinations, l_key_combination.Origin);
1655: l_origin_table := get_origin_table(

Line 1665: BSC_MO_HELPER_PKG.writeTmp('17. Origin table is '||l_origin_table, FND_LOG.LEVEL_STATEMENT);

1661: uniqueField.impl_type,
1662: l_BTTables);
1663: End If;
1664: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1665: BSC_MO_HELPER_PKG.writeTmp('17. Origin table is '||l_origin_table, FND_LOG.LEVEL_STATEMENT);
1666: END IF;
1667: --Note: removed the name of the table as prefix of the column
1668: --I do not see that the same column could be in two origin tables.
1669: l_measure_column.Origin := l_measure_column.aggFunction || '(' || l_measure_column.fieldName || ')';

Line 1675: BSC_MO_HELPER_PKG.writeTmp('ChangeType for '||l_measure_column.fieldName ||' = NEW', FND_LOG.LEVEL_STATEMENT);

1671: NOT BSC_MO_INDICATOR_PKG.DataFieldExists(l_BTTables(iMatchingTableIndex(l_loop_ctr)).Data, l_measure_column.fieldName)) THEN
1672: l_BTTables(iMatchingTableIndex(l_loop_ctr)).isProductionTableAltered := true;
1673: l_measure_column.changeType := 'NEW';
1674: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1675: BSC_MO_HELPER_PKG.writeTmp('ChangeType for '||l_measure_column.fieldName ||' = NEW', FND_LOG.LEVEL_STATEMENT);
1676: END IF;
1677: END IF;
1678: --Note: other properties for internal columns are not used in input, base, temporal tables
1679: -- If the field does not exist already in the table, then add it.

Line 1682: BSC_MO_HELPER_PKG.writeTmp('18. Add origin table '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_STATEMENT);

1678: --Note: other properties for internal columns are not used in input, base, temporal tables
1679: -- If the field does not exist already in the table, then add it.
1680: IF( NOT BSC_MO_INDICATOR_PKG.DataFieldExists(l_BTTables(iMatchingTableIndex(l_loop_ctr)).Data, l_measure_column.fieldName))THEN
1681: l_BTTables(iMatchingTableIndex(l_loop_ctr)).Data(l_BTTables(iMatchingTableIndex(l_loop_ctr)).Data.count) := l_measure_column;
1682: BSC_MO_HELPER_PKG.writeTmp('18. Add origin table '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_STATEMENT);
1683: --TablasOri
1684: --Add to the list the name of the origin table
1685: IF l_key_combination.Origin <> 0 Then
1686: IF Not TableOriginExists(l_BTTables(iMatchingTableIndex(l_loop_ctr)).originTable, l_origin_table) Then

Line 1699: BSC_MO_HELPER_PKG.writeTmp('19. Registered key combination', FND_LOG.LEVEL_STATEMENT);

1695: END If;
1696: END IF;
1697:
1698: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1699: BSC_MO_HELPER_PKG.writeTmp('19. Registered key combination', FND_LOG.LEVEL_STATEMENT);
1700: END IF;
1701: l_key_combination.Registered := True;
1702: End If; -- End of NeedNewTable
1703: End If;-- ENd of to be considered

Line 1728: BSC_MO_HELPER_PKG.write_this(g_unique, BSC_METADATA_OPTIMIZER_PKG.g_unique_measures, FND_LOG.LEVEL_STATEMENT, false);

1724: BSC_METADATA_OPTIMIZER_PKG.g_unique_measures := l_unique_measures;
1725: BSC_METADATA_OPTIMIZER_PKG.g_bt_tables := l_BTTables;
1726: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1727: BSC_MO_HELPER_PKG.writeTmp('g_unique_measures is ');
1728: BSC_MO_HELPER_PKG.write_this(g_unique, BSC_METADATA_OPTIMIZER_PKG.g_unique_measures, FND_LOG.LEVEL_STATEMENT, false);
1729: BSC_MO_HELPER_PKG.writeTmp('g_bt_tables is ');
1730: BSC_MO_HELPER_PKG.write_this(BSC_METADATA_OPTIMIZER_PKG.g_bt_tables, FND_LOG.LEVEL_STATEMENT, false, false);
1731: END IF;
1732: END IF;

Line 1730: BSC_MO_HELPER_PKG.write_this(BSC_METADATA_OPTIMIZER_PKG.g_bt_tables, FND_LOG.LEVEL_STATEMENT, false, false);

1726: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1727: BSC_MO_HELPER_PKG.writeTmp('g_unique_measures is ');
1728: BSC_MO_HELPER_PKG.write_this(g_unique, BSC_METADATA_OPTIMIZER_PKG.g_unique_measures, FND_LOG.LEVEL_STATEMENT, false);
1729: BSC_MO_HELPER_PKG.writeTmp('g_bt_tables is ');
1730: BSC_MO_HELPER_PKG.write_this(BSC_METADATA_OPTIMIZER_PKG.g_bt_tables, FND_LOG.LEVEL_STATEMENT, false, false);
1731: END IF;
1732: END IF;
1733:
1734: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN

Line 1735: BSC_MO_HELPER_PKG.writeTmp('Compl deduce_bt_tables, system time is '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);

1731: END IF;
1732: END IF;
1733:
1734: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1735: BSC_MO_HELPER_PKG.writeTmp('Compl deduce_bt_tables, system time is '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);
1736: END IF;
1737:
1738: EXCEPTION WHEN OTHERS THEN
1739: l_error := sqlerrm;

Line 1779: BSC_MO_HELPER_PKG.writeTmp('Inside resolve_key_origins '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);

1775: END IF;
1776: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1777: BSC_MO_HELPER_PKG.writeTmp(' ');
1778: BSC_MO_HELPER_PKG.writeTmp(' ');
1779: BSC_MO_HELPER_PKG.writeTmp('Inside resolve_key_origins '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);
1780: END IF;
1781: IF (p_unique_measures.count>0) THEN
1782: FOR i IN p_unique_measures.first..p_unique_measures.last
1783: LOOP

Line 1795: BSC_MO_HELPER_PKG.writeTmp('Looping for unique field : '||uniqueField.fieldName||', source='||uniqueField.source, FND_LOG.LEVEL_STATEMENT);

1791: IF (l_key_combination.registered = false) THEN -- ignore registered disaggs from prod. tables
1792:
1793: IF bMeasureLogged =false and BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1794: BSC_MO_HELPER_PKG.writeTmp(' ');
1795: BSC_MO_HELPER_PKG.writeTmp('Looping for unique field : '||uniqueField.fieldName||', source='||uniqueField.source, FND_LOG.LEVEL_STATEMENT);
1796: bsc_mo_helper_pkg.write_this(null, uniqueField);
1797: END IF;
1798: bMeasureLogged := true;
1799: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN

Line 1800: BSC_MO_HELPER_PKG.writeTmp(' Disagg is '||l_key_combination.code, FND_LOG.LEVEL_STATEMENT);

1796: bsc_mo_helper_pkg.write_this(null, uniqueField);
1797: END IF;
1798: bMeasureLogged := true;
1799: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1800: BSC_MO_HELPER_PKG.writeTmp(' Disagg is '||l_key_combination.code, FND_LOG.LEVEL_STATEMENT);
1801: END IF;
1802: l_index := BSC_MO_HELPER_PKG.findIndex(uniqueField.key_combinations, l_key_combination.code);
1803: l_key_combination.keys := uniqueField.key_combinations(l_index).keys;
1804: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN

Line 1805: BSC_MO_HELPER_PKG.writeTmp(' Disagg Keys are ', FND_LOG.LEVEL_STATEMENT);

1801: END IF;
1802: l_index := BSC_MO_HELPER_PKG.findIndex(uniqueField.key_combinations, l_key_combination.code);
1803: l_key_combination.keys := uniqueField.key_combinations(l_index).keys;
1804: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1805: BSC_MO_HELPER_PKG.writeTmp(' Disagg Keys are ', FND_LOG.LEVEL_STATEMENT);
1806: BSC_MO_HELPER_PKG.write_this(l_key_combination.keys);
1807: END IF;
1808: FOR k IN uniqueField.key_combinations.first..uniqueField.key_combinations.last
1809: LOOP

Line 1816: BSC_MO_HELPER_PKG.writeTmp(' Disagg.code is '||l_key_combination.code||' and Disagg1.code is '||desag1.code, FND_LOG.LEVEL_STATEMENT);

1812: If Desag1.Code <> l_key_combination.Code Then
1813: If can_derive_keys(--uniqueField.fieldName,
1814: l_key_combination, l_key_combination.code, Desag1, Desag1.code, l_tablename) Then
1815: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1816: BSC_MO_HELPER_PKG.writeTmp(' Disagg.code is '||l_key_combination.code||' and Disagg1.code is '||desag1.code, FND_LOG.LEVEL_STATEMENT);
1817: BSC_MO_HELPER_PKG.writeTmp('Origin exists, verify there is no loop ', FND_LOG.LEVEL_STATEMENT);
1818: END IF;
1819: --verify that it is not creating a loop when l_key_combination is originated from Desag1
1820: If Not circular_dependency_exists(l_key_combination.Code, Desag1.Code, uniqueField.key_combinations) Then

Line 1817: BSC_MO_HELPER_PKG.writeTmp('Origin exists, verify there is no loop ', FND_LOG.LEVEL_STATEMENT);

1813: If can_derive_keys(--uniqueField.fieldName,
1814: l_key_combination, l_key_combination.code, Desag1, Desag1.code, l_tablename) Then
1815: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1816: BSC_MO_HELPER_PKG.writeTmp(' Disagg.code is '||l_key_combination.code||' and Disagg1.code is '||desag1.code, FND_LOG.LEVEL_STATEMENT);
1817: BSC_MO_HELPER_PKG.writeTmp('Origin exists, verify there is no loop ', FND_LOG.LEVEL_STATEMENT);
1818: END IF;
1819: --verify that it is not creating a loop when l_key_combination is originated from Desag1
1820: If Not circular_dependency_exists(l_key_combination.Code, Desag1.Code, uniqueField.key_combinations) Then
1821: l_key_combination.Origin := Desag1.Code;

Line 1849: BSC_MO_HELPER_PKG.writeTmp('Completed resolve_key_origins '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);

1845: p_unique_measures(i) := uniqueField;
1846: END LOOP;
1847: END IF;
1848: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1849: BSC_MO_HELPER_PKG.writeTmp('Completed resolve_key_origins '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);
1850: BSC_MO_HELPER_PKG.write_This(null,p_unique_measures, FND_LOG.LEVEL_STATEMENT, true);
1851: END IF;
1852: EXCEPTION WHEN OTHERS THEN
1853: l_error := sqlerrm;

Line 1850: BSC_MO_HELPER_PKG.write_This(null,p_unique_measures, FND_LOG.LEVEL_STATEMENT, true);

1846: END LOOP;
1847: END IF;
1848: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
1849: BSC_MO_HELPER_PKG.writeTmp('Completed resolve_key_origins '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);
1850: BSC_MO_HELPER_PKG.write_This(null,p_unique_measures, FND_LOG.LEVEL_STATEMENT, true);
1851: END IF;
1852: EXCEPTION WHEN OTHERS THEN
1853: l_error := sqlerrm;
1854: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in resolve_key_origins : '||l_error);

Line 1945: BSC_MO_HELPER_PKG.writeTmp('Stack is :'||l_stack, FND_LOG.LEVEL_UNEXPECTED, true);

1941:
1942: EXCEPTION WHEN OTHERS THEN
1943: l_error := sqlerrm;
1944: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in GetDisaggCode :'||l_error);
1945: BSC_MO_HELPER_PKG.writeTmp('Stack is :'||l_stack, FND_LOG.LEVEL_UNEXPECTED, true);
1946: raise;
1947:
1948: End ;
1949:

Line 1988: BSC_MO_HELPER_PKG.writeTmp('Exception in UniqueFieldExists, '||sqlerrm, FND_LOG.LEVEL_UNEXPECTED, true);

1984: l_count := p_unique_measure_list.next(l_count);
1985: END LOOP;
1986: return FALSE;
1987: EXCEPTION WHEN OTHERS THEN
1988: BSC_MO_HELPER_PKG.writeTmp('Exception in UniqueFieldExists, '||sqlerrm, FND_LOG.LEVEL_UNEXPECTED, true);
1989: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in UniqueFieldExists, '||sqlerrm);
1990: raise;
1991: End ;
1992:

Line 2031: BSC_METADATA_OPTIMIZER_PKG.g_unique_measures_precalc.count||' '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);

2027: return;
2028: END IF;
2029: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
2030: BSC_MO_HELPER_PKG.writeTmp('Inside init_s_table_measures_precalc, g_unique_measures_precalc.count='||
2031: BSC_METADATA_OPTIMIZER_PKG.g_unique_measures_precalc.count||' '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);
2032: END IF;
2033: l_count1 := p_tables.first;
2034: LOOP
2035: IF (length(l_stack) > 30000) THEN

Line 2192: BSC_METADATA_OPTIMIZER_PKG.g_unique_measures_precalc.count||' '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);

2188: l_stack := null;
2189: END LOOP;
2190: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
2191: BSC_MO_HELPER_PKG.writeTmp('Completed init_s_table_measures_precalc, g_unique_measures_precalc.count='||
2192: BSC_METADATA_OPTIMIZER_PKG.g_unique_measures_precalc.count||' '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);
2193: END IF;
2194: BSC_MO_HELPER_PKG.writeTmp('g_unique_measures_precalc = ');
2195: BSC_MO_HELPER_PKG.write_this(g_unique, BSC_METADATA_OPTIMIZER_PKG.g_unique_measures_precalc );
2196:

Line 2200: BSC_MO_HELPER_PKG.writeTmp('l_stack : '||l_stack, FND_LOG.LEVEL_UNEXPECTED, true);

2196:
2197: EXCEPTION WHEN OTHERS THEN
2198: l_error := sqlerrm;
2199: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in init_s_table_measures_precalc : '||l_error);
2200: BSC_MO_HELPER_PKG.writeTmp('l_stack : '||l_stack, FND_LOG.LEVEL_UNEXPECTED, true);
2201: BSC_MO_HELPER_PKG.TerminateWithError('BSC_RETR_PC_DATACOL_FAILED', 'init_s_table_measures_precalc');
2202: raise;
2203: End;
2204:

Line 2249: , FND_LOG.LEVEL_PROCEDURE);

2245: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
2246: BSC_MO_HELPER_PKG.writeTmp('Inside init_s_table_measures, p_tables.count = '||p_tables.count||', g_unique_measures .count='||
2247: BSC_METADATA_OPTIMIZER_PKG.g_unique_measures .count||
2248: ', g_unique_measures_tgt.count='||BSC_METADATA_OPTIMIZER_PKG.g_unique_measures_tgt.count||' '||bsc_mo_helper_pkg.get_time
2249: , FND_LOG.LEVEL_PROCEDURE);
2250: END IF;
2251: l_count := p_tables.first;
2252: LOOP
2253: l_clstable := p_tables(l_count);

Line 2473: BSC_MO_HELPER_PKG.writeTmp('Completed init_s_table_measures, system time is '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);

2469: BSC_MO_HELPER_PKG.writeTmp('g_unique_measures = ');
2470: BSC_MO_HELPER_PKG.write_this(g_unique, BSC_METADATA_OPTIMIZER_PKG.g_unique_measures );
2471: BSC_MO_HELPER_PKG.writeTmp('g_unique_measures_tgt = ');
2472: BSC_MO_HELPER_PKG.write_this(g_Target, BSC_METADATA_OPTIMIZER_PKG.g_unique_measures_tgt);
2473: BSC_MO_HELPER_PKG.writeTmp('Completed init_s_table_measures, system time is '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);
2474: END IF;
2475: EXCEPTION WHEN OTHERS THEN
2476: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in init_s_table_measures : '||sqlerrm);
2477: BSC_MO_HELPER_PKG.writeTmp('l_stack = '||l_stack, FND_LOG.LEVEL_UNEXPECTED, true);

Line 2477: BSC_MO_HELPER_PKG.writeTmp('l_stack = '||l_stack, FND_LOG.LEVEL_UNEXPECTED, true);

2473: BSC_MO_HELPER_PKG.writeTmp('Completed init_s_table_measures, system time is '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE);
2474: END IF;
2475: EXCEPTION WHEN OTHERS THEN
2476: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in init_s_table_measures : '||sqlerrm);
2477: BSC_MO_HELPER_PKG.writeTmp('l_stack = '||l_stack, FND_LOG.LEVEL_UNEXPECTED, true);
2478: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in init_s_table_measures : '||sqlerrm);
2479: raise;
2480: End ;
2481:

Line 2497: BSC_MO_HELPER_PKG.writeTmp(' ', FND_LOG.LEVEL_STATEMENT, true);

2493: KpiTable bsc_metadata_optimizer_pkg.clsTable;
2494: l_index NUMBER;
2495: l_error VARCHAR2(3000);
2496: BEGIN
2497: BSC_MO_HELPER_PKG.writeTmp(' ', FND_LOG.LEVEL_STATEMENT, true);
2498: BSC_MO_HELPER_PKG.writeTmp('Inside InputTables '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE, true);
2499: --BSC-MV Note: If the indicator is not processed for structural changes and
2500: --the summarization level was changed from NULL to NOT NULL (upgrade)
2501: --then I need to get from the database the source table of the indicator and set

Line 2498: BSC_MO_HELPER_PKG.writeTmp('Inside InputTables '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE, true);

2494: l_index NUMBER;
2495: l_error VARCHAR2(3000);
2496: BEGIN
2497: BSC_MO_HELPER_PKG.writeTmp(' ', FND_LOG.LEVEL_STATEMENT, true);
2498: BSC_MO_HELPER_PKG.writeTmp('Inside InputTables '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE, true);
2499: --BSC-MV Note: If the indicator is not processed for structural changes and
2500: --the summarization level was changed from NULL to NOT NULL (upgrade)
2501: --then I need to get from the database the source table of the indicator and set
2502: --the origin in gTablas.

Line 2532: BSC_MO_HELPER_PKG.writeTmp('Calling init_s_table_measures', FND_LOG.LEVEL_STATEMENT, true);

2528: --b. EDW KPIs and BSC KPIs dont share periodicities.
2529: --c. EDW KPIs and BSC KPIs dont share measures.
2530: --Initilize the list of unique measures for indicators being processed
2531: BSC_METADATA_OPTIMIZER_PKG.logProgress('INPUT', 'Calling init_s_table_measures');
2532: BSC_MO_HELPER_PKG.writeTmp('Calling init_s_table_measures', FND_LOG.LEVEL_STATEMENT, true);
2533: init_s_table_measures(BSC_METADATA_OPTIMIZER_PKG.gTables);
2534:
2535: --Initilize the list of unique measures for indicators being processed - Precalc
2536: BSC_METADATA_OPTIMIZER_PKG.logProgress('INPUT', 'Calling init_s_table_measures_precalc');

Line 2537: BSC_MO_HELPER_PKG.writeTmp('Calling init_s_table_measures_precalc', FND_LOG.LEVEL_STATEMENT, true);

2533: init_s_table_measures(BSC_METADATA_OPTIMIZER_PKG.gTables);
2534:
2535: --Initilize the list of unique measures for indicators being processed - Precalc
2536: BSC_METADATA_OPTIMIZER_PKG.logProgress('INPUT', 'Calling init_s_table_measures_precalc');
2537: BSC_MO_HELPER_PKG.writeTmp('Calling init_s_table_measures_precalc', FND_LOG.LEVEL_STATEMENT, true);
2538: init_s_table_measures_precalc(BSC_METADATA_OPTIMIZER_PKG.gTables);
2539:
2540: -- Load the existing B and T tables into memory for better optimization
2541: BSC_METADATA_OPTIMIZER_PKG.logProgress('INPUT', 'Calling LOAD_B_T_TABLES_FROM_DB');

Line 2542: BSC_MO_HELPER_PKG.writeTmp('Calling LOAD_B_T_TABLES_FROM_DB', FND_LOG.LEVEL_STATEMENT, true);

2538: init_s_table_measures_precalc(BSC_METADATA_OPTIMIZER_PKG.gTables);
2539:
2540: -- Load the existing B and T tables into memory for better optimization
2541: BSC_METADATA_OPTIMIZER_PKG.logProgress('INPUT', 'Calling LOAD_B_T_TABLES_FROM_DB');
2542: BSC_MO_HELPER_PKG.writeTmp('Calling LOAD_B_T_TABLES_FROM_DB', FND_LOG.LEVEL_STATEMENT, true);
2543: LOAD_B_T_TABLES_FROM_DB;
2544:
2545: --Resolve the origin of each dissagregation of each field
2546: --This is done only for non-precalculated fields

Line 2548: BSC_MO_HELPER_PKG.writeTmp('Calling resolve_key_origins', FND_LOG.LEVEL_STATEMENT, true);

2544:
2545: --Resolve the origin of each dissagregation of each field
2546: --This is done only for non-precalculated fields
2547: BSC_METADATA_OPTIMIZER_PKG.logProgress('INPUT', 'Calling resolve_key_origins');
2548: BSC_MO_HELPER_PKG.writeTmp('Calling resolve_key_origins', FND_LOG.LEVEL_STATEMENT, true);
2549: resolve_key_origins (BSC_METADATA_OPTIMIZER_PKG.g_unique_measures , false);
2550:
2551: --Resolve the origin of each dissagregation for Targets
2552: BSC_METADATA_OPTIMIZER_PKG.logProgress('INPUT', 'Calling resolve_key_origins for Targets');

Line 2553: BSC_MO_HELPER_PKG.writeTmp('Calling resolve_key_origins for Targets', FND_LOG.LEVEL_STATEMENT, true);

2549: resolve_key_origins (BSC_METADATA_OPTIMIZER_PKG.g_unique_measures , false);
2550:
2551: --Resolve the origin of each dissagregation for Targets
2552: BSC_METADATA_OPTIMIZER_PKG.logProgress('INPUT', 'Calling resolve_key_origins for Targets');
2553: BSC_MO_HELPER_PKG.writeTmp('Calling resolve_key_origins for Targets', FND_LOG.LEVEL_STATEMENT, true);
2554: resolve_key_origins ( BSC_METADATA_OPTIMIZER_PKG.g_unique_measures_tgt, true);
2555:
2556: --Make the list of temporal and base tables
2557: BSC_METADATA_OPTIMIZER_PKG.gMaxT := getMaxTableIndex('BSC_T_');

Line 2570: BSC_MO_HELPER_PKG.writeTmp('Calling deduce_bt_tables - Normal', FND_LOG.LEVEL_STATEMENT, true);

2566: BSC_METADATA_OPTIMIZER_PKG.gMaxB||', gMaxI='||BSC_METADATA_OPTIMIZER_PKG.gMaxI);
2567: IF (bsc_metadata_optimizer_pkg.g_retcode <> 0) THEN
2568: return;
2569: END IF;
2570: BSC_MO_HELPER_PKG.writeTmp('Calling deduce_bt_tables - Normal', FND_LOG.LEVEL_STATEMENT, true);
2571: BSC_METADATA_OPTIMIZER_PKG.logProgress('INPUT', 'Calling deduce_bt_tables - Normal');
2572: deduce_bt_tables(False);
2573:
2574: BSC_MO_HELPER_PKG.writeTmp('Calling deduce_bt_tables - Targets', FND_LOG.LEVEL_STATEMENT, true);

Line 2574: BSC_MO_HELPER_PKG.writeTmp('Calling deduce_bt_tables - Targets', FND_LOG.LEVEL_STATEMENT, true);

2570: BSC_MO_HELPER_PKG.writeTmp('Calling deduce_bt_tables - Normal', FND_LOG.LEVEL_STATEMENT, true);
2571: BSC_METADATA_OPTIMIZER_PKG.logProgress('INPUT', 'Calling deduce_bt_tables - Normal');
2572: deduce_bt_tables(False);
2573:
2574: BSC_MO_HELPER_PKG.writeTmp('Calling deduce_bt_tables - Targets', FND_LOG.LEVEL_STATEMENT, true);
2575: BSC_METADATA_OPTIMIZER_PKG.logProgress('INPUT', 'Calling deduce_bt_tables - Targets');
2576: deduce_bt_tables (True );--For targets
2577:
2578: IF (bsc_metadata_optimizer_pkg.g_retcode <> 0) THEN

Line 2582: BSC_MO_HELPER_PKG.writeTmp('Calling deduce_bt_tables_precalc', FND_LOG.LEVEL_STATEMENT);

2578: IF (bsc_metadata_optimizer_pkg.g_retcode <> 0) THEN
2579: return;
2580: END IF;
2581: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
2582: BSC_MO_HELPER_PKG.writeTmp('Calling deduce_bt_tables_precalc', FND_LOG.LEVEL_STATEMENT);
2583: END IF;
2584: BSC_MO_HELPER_PKG.writeTmp('Calling deduce_bt_tables_precalc', FND_LOG.LEVEL_STATEMENT, true);
2585: BSC_METADATA_OPTIMIZER_PKG.logProgress('INPUT', 'Calling deduce_bt_tables_precalc');
2586: deduce_bt_tables_precalc;

Line 2584: BSC_MO_HELPER_PKG.writeTmp('Calling deduce_bt_tables_precalc', FND_LOG.LEVEL_STATEMENT, true);

2580: END IF;
2581: IF BSC_METADATA_OPTIMIZER_PKG.g_log THEN
2582: BSC_MO_HELPER_PKG.writeTmp('Calling deduce_bt_tables_precalc', FND_LOG.LEVEL_STATEMENT);
2583: END IF;
2584: BSC_MO_HELPER_PKG.writeTmp('Calling deduce_bt_tables_precalc', FND_LOG.LEVEL_STATEMENT, true);
2585: BSC_METADATA_OPTIMIZER_PKG.logProgress('INPUT', 'Calling deduce_bt_tables_precalc');
2586: deduce_bt_tables_precalc;
2587:
2588: IF (bsc_metadata_optimizer_pkg.g_retcode <> 0) THEN

Line 2593: BSC_MO_HELPER_PKG.writeTmp('Calling connect_s_to_b_tables', FND_LOG.LEVEL_STATEMENT, true);

2589: return;
2590: END IF;
2591:
2592: --Connect base indicator tables with temporal tables
2593: BSC_MO_HELPER_PKG.writeTmp('Calling connect_s_to_b_tables', FND_LOG.LEVEL_STATEMENT, true);
2594: BSC_METADATA_OPTIMIZER_PKG.logProgress('INPUT', 'Calling connect_s_to_b_tables');
2595: connect_s_to_b_tables;
2596:
2597: --Add each temporal table to the collection of system tables

Line 2598: BSC_MO_HELPER_PKG.writeTmp('Calling add_to_gtables', FND_LOG.LEVEL_STATEMENT, true);

2594: BSC_METADATA_OPTIMIZER_PKG.logProgress('INPUT', 'Calling connect_s_to_b_tables');
2595: connect_s_to_b_tables;
2596:
2597: --Add each temporal table to the collection of system tables
2598: BSC_MO_HELPER_PKG.writeTmp('Calling add_to_gtables', FND_LOG.LEVEL_STATEMENT, true);
2599:
2600: add_to_gtables (BSC_METADATA_OPTIMIZER_PKG.g_bt_tables);
2601: add_to_gtables (BSC_METADATA_OPTIMIZER_PKG.g_bt_tables_tgt);
2602: add_to_gtables (BSC_METADATA_OPTIMIZER_PKG.g_bt_tables_precalc);

Line 2605: BSC_MO_HELPER_PKG.writeTmp('Calling connect_i_to_b_tables', FND_LOG.LEVEL_STATEMENT, true);

2601: add_to_gtables (BSC_METADATA_OPTIMIZER_PKG.g_bt_tables_tgt);
2602: add_to_gtables (BSC_METADATA_OPTIMIZER_PKG.g_bt_tables_precalc);
2603:
2604: --Make input tables and connect them to the base tables
2605: BSC_MO_HELPER_PKG.writeTmp('Calling connect_i_to_b_tables', FND_LOG.LEVEL_STATEMENT, true);
2606: BSC_METADATA_OPTIMIZER_PKG.logProgress('INPUT', 'Calling connect_i_to_b_tables');
2607: connect_i_to_b_tables;
2608:
2609:

Line 2622: BSC_MO_HELPER_PKG.writeTmp('-------------------------------------', FND_LOG.LEVEL_STATEMENT, true);

2618: bsc_metadata_optimizer_pkg.garrTablesUpgrade);
2619: bsc_metadata_optimizer_pkg.gnumTablesUpgrade := bsc_metadata_optimizer_pkg.garrTablesUpgrade.count;
2620: load_upgrade_tables_db;
2621: End If;
2622: BSC_MO_HELPER_PKG.writeTmp('-------------------------------------', FND_LOG.LEVEL_STATEMENT, true);
2623: BSC_MO_HELPER_PKG.writeTmp('Completed InputTables '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE, true);
2624:
2625: EXCEPTION WHEN OTHERS THEN
2626: l_error := sqlerrm;

Line 2623: BSC_MO_HELPER_PKG.writeTmp('Completed InputTables '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE, true);

2619: bsc_metadata_optimizer_pkg.gnumTablesUpgrade := bsc_metadata_optimizer_pkg.garrTablesUpgrade.count;
2620: load_upgrade_tables_db;
2621: End If;
2622: BSC_MO_HELPER_PKG.writeTmp('-------------------------------------', FND_LOG.LEVEL_STATEMENT, true);
2623: BSC_MO_HELPER_PKG.writeTmp('Completed InputTables '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE, true);
2624:
2625: EXCEPTION WHEN OTHERS THEN
2626: l_error := sqlerrm;
2627: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in InputTables : '||l_error);

Line 2701: bsc_mo_helper_pkg.writeTmp('Loading table '||p_table||' '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_STATEMENT, false);

2697: l_src_table VARCHAR2(100);
2698: l_state varchar2(4000);
2699:
2700: BEGIN
2701: bsc_mo_helper_pkg.writeTmp('Loading table '||p_table||' '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_STATEMENT, false);
2702: l_kpis_using_table := BSC_MO_HELPER_PKG.find_objectives_for_table(p_table);
2703: IF (l_kpis_using_table.count=0) THEN
2704: return;
2705: END IF;

Line 2706: bsc_mo_helper_pkg.writeTmp('# of objectives using this table= '||l_kpis_using_table.count||' '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_STATEMENT, false);

2702: l_kpis_using_table := BSC_MO_HELPER_PKG.find_objectives_for_table(p_table);
2703: IF (l_kpis_using_table.count=0) THEN
2704: return;
2705: END IF;
2706: bsc_mo_helper_pkg.writeTmp('# of objectives using this table= '||l_kpis_using_table.count||' '||bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_STATEMENT, false);
2707: OPEN cKeys;
2708: LOOP
2709: FETCH cKeys INTO l_column;
2710: EXIT WHEN cKeys%NOTFOUND;

Line 2808: BSC_MO_HELPER_PKG.writeTmp('state = '||l_state, FND_LOG.LEVEL_EXCEPTION, true);

2804: END IF;
2805: l_state := l_state||'
2806: Loaded table '||p_table;
2807: EXCEPTION WHEN OTHERS THEN
2808: BSC_MO_HELPER_PKG.writeTmp('state = '||l_state, FND_LOG.LEVEL_EXCEPTION, true);
2809: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in Load_Table_From_DB : '||sqlerrm);
2810:
2811: BSC_MO_HELPER_PKG.terminateWithError('BSC_RETR_TTABLES_FAILED', 'Load_Table_From_DB');
2812: raise;

Line 2859: bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE, true);

2855: l_indicator_num number;
2856: l_dim_set number;
2857: BEGIN
2858: BSC_MO_HELPER_PKG.writeTmp('Inside LOAD_B_T_TABLES_FROM_DB, system time is '||
2859: bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE, true);
2860: l_stmt := 'select distinct table_name from bsc_db_tables where (table_name like ''BSC_B%'' or table_name like ''BSC_T%'' ) and table_type=1';
2861: OPEN cv FOR l_stmt ;
2862: LOOP
2863: FETCH cv INTO l_table;

Line 2866: BSC_MO_HELPER_PKG.writeTmp('Loading production table '||l_table||' into memory '||BSC_MO_HELPER_PKG.get_time, FND_LOG.LEVEL_PROCEDURE, false);

2862: LOOP
2863: FETCH cv INTO l_table;
2864: EXIT WHEN cv%NOTFOUND;
2865: IF is_production_table(l_table, l_indicator_num, l_dim_set) THEN
2866: BSC_MO_HELPER_PKG.writeTmp('Loading production table '||l_table||' into memory '||BSC_MO_HELPER_PKG.get_time, FND_LOG.LEVEL_PROCEDURE, false);
2867: Load_Table_From_DB(l_table, l_indicator_num, l_dim_set);
2868: END IF;
2869: END LOOP;
2870:

Line 2873: BSC_MO_HELPER_PKG.writeTmp('Calling init_s_table_measures for Production tables - Targets', FND_LOG.LEVEL_STATEMENT, true);

2869: END LOOP;
2870:
2871: -- Intialize the disaggregations in the Production tables - Targets
2872: BSC_METADATA_OPTIMIZER_PKG.logProgress('INPUT', 'Calling init_s_table_measures for Production tables - Targets');
2873: BSC_MO_HELPER_PKG.writeTmp('Calling init_s_table_measures for Production tables - Targets', FND_LOG.LEVEL_STATEMENT, true);
2874: init_s_table_measures(BSC_METADATA_OPTIMIZER_PKG.g_bt_tables_tgt);
2875:
2876: -- Intialize the disaggregations in the Production tables
2877: BSC_METADATA_OPTIMIZER_PKG.logProgress('INPUT', 'Calling init_s_table_measures for Production tables - Normal');

Line 2878: BSC_MO_HELPER_PKG.writeTmp('Calling init_s_table_measures for Production tables - Normal', FND_LOG.LEVEL_STATEMENT, true);

2874: init_s_table_measures(BSC_METADATA_OPTIMIZER_PKG.g_bt_tables_tgt);
2875:
2876: -- Intialize the disaggregations in the Production tables
2877: BSC_METADATA_OPTIMIZER_PKG.logProgress('INPUT', 'Calling init_s_table_measures for Production tables - Normal');
2878: BSC_MO_HELPER_PKG.writeTmp('Calling init_s_table_measures for Production tables - Normal', FND_LOG.LEVEL_STATEMENT, true);
2879: init_s_table_measures(BSC_METADATA_OPTIMIZER_PKG.g_bt_tables);
2880:
2881: -- Intialize the disaggregations in the Production tables - precalc
2882: BSC_METADATA_OPTIMIZER_PKG.logProgress('INPUT', 'Calling init_s_table_measures_precalc for Production tables');

Line 2883: BSC_MO_HELPER_PKG.writeTmp('Calling init_s_table_measures_precalc for Production tables', FND_LOG.LEVEL_STATEMENT, true);

2879: init_s_table_measures(BSC_METADATA_OPTIMIZER_PKG.g_bt_tables);
2880:
2881: -- Intialize the disaggregations in the Production tables - precalc
2882: BSC_METADATA_OPTIMIZER_PKG.logProgress('INPUT', 'Calling init_s_table_measures_precalc for Production tables');
2883: BSC_MO_HELPER_PKG.writeTmp('Calling init_s_table_measures_precalc for Production tables', FND_LOG.LEVEL_STATEMENT, true);
2884: init_s_table_measures_precalc(BSC_METADATA_OPTIMIZER_PKG.g_bt_tables_precalc);
2885:
2886: BSC_MO_HELPER_PKG.writeTmp('Completed LOAD_B_T_TABLES_FROM_DB, system time is '||
2887: bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE, true);

Line 2887: bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE, true);

2883: BSC_MO_HELPER_PKG.writeTmp('Calling init_s_table_measures_precalc for Production tables', FND_LOG.LEVEL_STATEMENT, true);
2884: init_s_table_measures_precalc(BSC_METADATA_OPTIMIZER_PKG.g_bt_tables_precalc);
2885:
2886: BSC_MO_HELPER_PKG.writeTmp('Completed LOAD_B_T_TABLES_FROM_DB, system time is '||
2887: bsc_mo_helper_pkg.get_time, FND_LOG.LEVEL_PROCEDURE, true);
2888: EXCEPTION WHEN OTHERS THEN
2889: BSC_MO_HELPER_PKG.TerminateWithMsg('Exception in LOAD_B_T_TABLES_FROM_DB : '||sqlerrm);
2890: BSC_MO_HELPER_PKG.terminateWithError('BSC_RETR_TTABLES_FAILED', 'LOAD_B_T_TABLES_FROM_DB');
2891: raise;