DBA Data[Home] [Help]

APPS.BSC_UPDATE_BASE dependencies on BSC_APPS

Line 586: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN

582:
583: --- BSC-MV Note: Get info other periodicities
584: -- AW_INTEGRATION: If the base table is for AW there are not higher periodicities
585: -- in the base table, so we do not need info for other periodicities.
586: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN
587: OPEN c_other_periodicities(x_base_table, 6);
588: LOOP
589: FETCH c_other_periodicities INTO h_other_periodicity_id, h_yearly_flag;
590: EXIT WHEN c_other_periodicities%NOTFOUND;

Line 651: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN

647:
648: -- BSC-MV Note: For this architecture we need to delete the projection
649: -- from all other periodicities stored in the base table.
650: -- AW_INTEGRATION: If the base table is for AW then there are not higher periodicities
651: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN
652: FOR h_i IN 1..h_num_other_periodicities LOOP
653: --AW_INTEGRATION: Pass x_aw_flag to Delete_Projection_Base_Table and h_change_vector_value
654: IF NOT BSC_UPDATE_CALC.Delete_Projection_Base_Table(x_base_table,
655: h_arr_other_periodicities(h_i).periodicity_id,

Line 775: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN

771: -- BSC-MV Note: For this architecture we need to calculate projection
772: -- from all other periodicities stored in the base table.
773: -- AW_INTEGRATION: If the base table is for AW there are no higher peridicities
774:
775: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN
776:
777: -- For other periodicities, the projection is calculated by rolling up
778: -- the projection in the base periodicity.
779: -- We know that for Yearly periodicity we need to re-calculate projection.

Line 857: IF BSC_APPS.bsc_mv THEN

853:
854: -- Calculate Profit
855: -- BSC-MV Note: Only in this architecture the profit is calculated in the base table
856: -- AW_INTEGRATION: Profit needs to be calculated in this architecture too
857: IF BSC_APPS.bsc_mv THEN
858: h_b := BSC_UPDATE_CALC.Table_Has_Profit_Calc(x_base_table);
859: IF h_b IS NULL THEN
860: RAISE e_unexpected_error;
861: END IF;

Line 1000: IF BSC_APPS.bsc_mv THEN

996: h_table_columns(h_num_columns).data_type := 'VARCHAR2';
997: h_table_columns(h_num_columns).data_size := 400;
998: h_table_columns(h_num_columns).add_to_index := 'N';
999: END LOOP;
1000: IF BSC_APPS.bsc_mv THEN
1001: h_num_columns := h_num_columns + 1;
1002: h_table_columns(h_num_columns).column_name := 'PERIODICITY_ID';
1003: h_table_columns(h_num_columns).data_type := 'NUMBER';
1004: h_table_columns(h_num_columns).data_size := NULL;

Line 1057: IF BSC_APPS.bsc_mv THEN

1053: ---------------venu--------------------------------------------
1054: --because we aggregate the data to higher periodicities, we need to
1055: --capture the before update signature from the base table and then
1056: --we use this to subtract from the base table
1057: IF BSC_APPS.bsc_mv THEN
1058: -- BSC_TMP_BASE_BU
1059: --Bug#3875046: Do not create index on temporary tables
1060: h_table_name := 'BSC_TMP_BASE_BU';
1061: IF NOT BSC_UPDATE_UTIL.Create_Global_Temp_Table(h_table_name, h_table_columns, h_num_columns) THEN

Line 1161: IF BSC_APPS.bsc_mv THEN

1157: h_table_columns(h_num_columns).data_type := 'VARCHAR2';
1158: h_table_columns(h_num_columns).data_size := 400;
1159: h_table_columns(h_num_columns).add_to_index := 'N';
1160: END LOOP;
1161: IF BSC_APPS.bsc_mv THEN
1162: h_num_columns := h_num_columns + 1;
1163: h_table_columns(h_num_columns).column_name := 'PERIODICITY_ID';
1164: h_table_columns(h_num_columns).data_type := 'NUMBER';
1165: h_table_columns(h_num_columns).data_size := NULL;

Line 1318: IF BSC_APPS.bsc_mv THEN

1314: h_table_columns(h_num_columns).data_type := 'VARCHAR2';
1315: h_table_columns(h_num_columns).data_size := 400;
1316: h_table_columns(h_num_columns).add_to_index := 'N';
1317: END LOOP;
1318: IF BSC_APPS.bsc_mv THEN
1319: h_num_columns := h_num_columns + 1;
1320: h_table_columns(h_num_columns).column_name := 'PERIODICITY_ID';
1321: h_table_columns(h_num_columns).data_type := 'NUMBER';
1322: h_table_columns(h_num_columns).data_size := NULL;

Line 1669: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN

1665: commit;
1666:
1667: -- BSC-MV Note: This table only used in this architecture
1668: -- AW_INTEGRATION: If the base table is for AW there are not higher periodicities.
1669: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN
1670: --h_sql := 'DELETE FROM BSC_TMP_BASE_BU';
1671: --BSC_UPDATE_UTIL.Execute_Immediate(h_sql);
1672: BSC_UPDATE_UTIL.Truncate_Table('BSC_TMP_BASE_BU');
1673: commit;

Line 1705: IF BSC_APPS.bsc_mv AND x_aw_flag THEN

1701: h_lst_data_columns_temp := BSC_UPDATE_UTIL.Make_Lst_Fixed_Column('DATA', x_num_data_columns);
1702: h_lst_data_formulas := BSC_UPDATE_UTIL.Make_Lst_From_Array_Varchar2(x_data_formulas, x_num_data_columns);
1703:
1704: --AW_INTEGRATION: Base table has an additional column called PROJECTION and CHANGE_VECTOR
1705: IF BSC_APPS.bsc_mv AND x_aw_flag THEN
1706: h_lst_data_columns := h_lst_data_columns||', PROJECTION, CHANGE_VECTOR';
1707: h_lst_data_columns_temp := h_lst_data_columns_temp||', PROJECTION, CHANGE_VECTOR';
1708: -- Fix bug#4653405: AW_INTEGRATION: we need to set projection flag Y for any period
1709: -- beyond the current period no matter if it is target

Line 1752: IF BSC_APPS.bsc_mv THEN

1748: -- BSC-BIS-DIMENSIONS: If the dimension is a DBI dimension and it is materialized and
1749: -- the table exists then we use the table created in BSC to materialize
1750: -- the DBI dimension to translate from USER_CODE into CODE.
1751: -- Note that is only in MV Architecture.
1752: IF BSC_APPS.bsc_mv THEN
1753: SELECT short_name, source
1754: INTO h_level_short_name, h_level_source
1755: FROM bsc_sys_dim_levels_b
1756: WHERE level_view_name = h_level_table_name;

Line 1763: IF BSC_APPS.Table_Exists(h_dbi_dim_data.table_name) THEN

1759: BSC_UPDATE_DIM.Get_Dbi_Dim_Data(h_level_short_name, h_dbi_dim_data);
1760: IF (h_dbi_dim_data.short_name IS NOT NULL) AND
1761: (h_dbi_dim_data.table_name IS NOT NULL) AND
1762: (h_dbi_dim_data.materialized='YES') THEN
1763: IF BSC_APPS.Table_Exists(h_dbi_dim_data.table_name) THEN
1764: h_level_table_name := h_dbi_dim_data.table_name;
1765: END IF;
1766: END IF;
1767: END IF;

Line 1794: IF BSC_APPS.bsc_mv AND x_aw_flag THEN

1790: END IF;
1791: h_lst_data_columns_temp_p := h_lst_data_columns_temp_p||'BSC_TMP_BASE.DATA'||h_i;
1792: END LOOP;
1793: -- AW_INTEGRATION: Base table has an additional column called projection and change_vector
1794: IF BSC_APPS.bsc_mv AND x_aw_flag THEN
1795: h_lst_data_columns_temp_p := h_lst_data_columns_temp_p||',BSC_TMP_BASE.PROJECTION, BSC_TMP_BASE.CHANGE_VECTOR';
1796: END IF;
1797:
1798: /*--------------------------------------------------------------+

Line 1959: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN

1955: h_sql:=h_sql||' parallel (bsc_tmp_base)';
1956: end if;
1957: h_sql := h_sql||' */';
1958: h_sql :=h_sql||'INTO BSC_TMP_BASE ('||h_lst_key_columns_temp||'YEAR, TYPE, PERIOD, ';
1959: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN
1960: h_sql := h_sql||'PERIODICITY_ID, ';
1961: END IF;
1962: h_sql := h_sql||h_lst_data_columns_temp||')'||
1963: ' SELECT ';

Line 1968: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN

1964: if BSC_UPDATE_UTIL.is_parallel then
1965: h_sql:=h_sql||'/*+ '||l_parallel_hint||' */ ';
1966: end if;
1967: h_sql:=h_sql||h_lst_select||', ';
1968: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN
1969: h_sql := h_sql||':1, ';
1970: END IF;
1971: h_sql := h_sql||h_lst_data_formulas||
1972: ' FROM '||h_lst_from;

Line 1978: if BSC_APPS.bsc_mv and x_correction_flag and (NOT x_aw_flag) then

1974: h_sql := h_sql||' WHERE '||h_lst_where;
1975: END IF;
1976: h_sql := h_sql||' GROUP BY '||h_lst_select;
1977: -------------------venu------------------------------
1978: if BSC_APPS.bsc_mv and x_correction_flag and (NOT x_aw_flag) then
1979: /*
1980: the user has made some mistake. say user entered sum(m1), then loaded BSC. later, user changes
1981: sum(m1) to avg(m1). in this case, the higher periodicities in the base table are first deleted,
1982: and then data from the base table is moved to the tmp table. so the step of pulling data from

Line 2011: elsif ((NOT BSC_APPS.bsc_mv) OR x_aw_flag) AND x_correction_flag then

2007: --Fix bug#3875046: Need to maintain track of number of rpws in tmp table to be used later
2008: h_row_count := BSC_UPDATE_UTIL.Execute_Immediate(h_sql,l_bind_vars_values,1);
2009: h_num_rows_tmp := h_num_rows_tmp + h_row_count;
2010: ---------------------------------------------------
2011: elsif ((NOT BSC_APPS.bsc_mv) OR x_aw_flag) AND x_correction_flag then
2012: /*
2013: in summary tables architecture and incremental mode, no need to pull data from the
2014: input table. We jsut need to insert all the rows from the base table to the BSC_TMP_BASE table.
2015: AW_INTEGRATION: If the base table is for AW then there are not higher periodicities.

Line 2038: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN

2034: else
2035: l_bind_vars_values.delete;
2036: l_num_bind_vars := 0;
2037:
2038: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN
2039: l_bind_vars_values(1):= x_base_percode;
2040: l_num_bind_vars := 1;
2041: END IF;
2042: IF l_bind_var_per IS NOT NULL THEN

Line 2073: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN

2069: h_lst_join := h_lst_join||' AND ';
2070: END IF;
2071:
2072: -- BSC-MV Note: Add periodicity_id column in the join
2073: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN
2074: h_lst_join := h_lst_join||
2075: x_base_tbl||'.PERIODICITY_ID = BSC_TMP_BASE.PERIODICITY_ID AND ';
2076: END IF;
2077: h_lst_join := h_lst_join||

Line 2085: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN

2081:
2082: -----venu-------------------------------------------------------------------
2083: --BSC-MV Note: This code applies only for new architecture
2084: --AW_INTEGRATION: If the base table is for AW, it does not have higher periodicities
2085: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN
2086: --get all the higher periodicities for the base table
2087: if get_base_higher_periodicities(
2088: x_base_tbl,
2089: l_periodicity,

Line 2201: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN

2197: END IF;
2198:
2199: --BSC-MV Note: Add periodicity id
2200: --AW_INTEGRATION: no need periodicity_id
2201: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN
2202: h_lst_select := h_lst_select||'BSC_TMP_BASE.PERIODICITY_ID,';
2203: END IF;
2204: h_lst_select := h_lst_select||'BSC_TMP_BASE.YEAR, BSC_TMP_BASE.TYPE, BSC_TMP_BASE.PERIOD, '||
2205: h_lst_data_columns_temp_p;

Line 2207: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN

2203: END IF;
2204: h_lst_select := h_lst_select||'BSC_TMP_BASE.YEAR, BSC_TMP_BASE.TYPE, BSC_TMP_BASE.PERIOD, '||
2205: h_lst_data_columns_temp_p;
2206:
2207: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN
2208: h_lst_join := h_lst_join||
2209: 'BSC_TMP_BASE.PERIODICITY_ID = '||x_base_tbl||'.PERIODICITY_ID (+) AND ';
2210: END IF;
2211: h_lst_join := h_lst_join||

Line 2216: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN

2212: 'BSC_TMP_BASE.YEAR = '||x_base_tbl||'.YEAR (+) AND '||
2213: 'BSC_TMP_BASE.TYPE = '||x_base_tbl||'.TYPE (+) AND '||
2214: 'BSC_TMP_BASE.PERIOD = '||x_base_tbl||'.PERIOD (+)';
2215:
2216: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN
2217: h_lst_cond_null := h_lst_cond_null||
2218: x_base_tbl||'.PERIODICITY_ID IS NULL OR ';
2219: END IF;
2220: h_lst_cond_null := h_lst_cond_null||

Line 2241: if BSC_IM_UTILS.check_snapshot_log(x_base_tbl,BSC_APPS.bsc_apps_schema) then

2237: ll_use_append boolean;
2238: ll_base_count number;
2239: begin
2240: ll_use_append:=true;
2241: if BSC_IM_UTILS.check_snapshot_log(x_base_tbl,BSC_APPS.bsc_apps_schema) then
2242: --see if the base table has any data
2243: --does_table_have_data will return 2 if the snapshot log has data, 0 if there is some error and
2244: --1 if there is no data
2245: ll_base_count:=BSC_IM_UTILS.does_table_have_data(x_base_tbl,null);

Line 2261: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN

2257: end if;
2258: end;
2259: h_sql := h_sql||' */';
2260: h_sql := h_sql ||'INTO '||x_base_tbl||' ('||h_lst_key_columns;
2261: IF BSC_APPS.bsc_mv AND (NOT x_aw_flag) THEN
2262: h_sql := h_sql||'PERIODICITY_ID, ';
2263: END IF;
2264: h_sql := h_sql||'YEAR, TYPE, PERIOD, '||h_lst_data_columns||')'||
2265: ' SELECT ';

Line 2291: IF (NOT BSC_APPS.bsc_mv) OR x_aw_flag THEN

2287:
2288: ---------------------venu------------------------------------------
2289: --BSC-MV Note: This code only applies for new architecture
2290: --AW_INTEGRATION: This code does not apply if the base table of fo AW
2291: IF (NOT BSC_APPS.bsc_mv) OR x_aw_flag THEN
2292: RETURN TRUE;
2293: END IF;
2294:
2295: -- Fix bug#4235448: If there is at least one balance column we need to

Line 2835: where table_name = x_base_tbl and owner= BSC_APPS.BSC_APPS_SCHEMA;

2831: -- a. get number of rows of the base table. Since the base table is analyzed we can do:
2832: select nvl(num_rows,0)
2833: into h_num_rows_base
2834: from all_tables
2835: where table_name = x_base_tbl and owner= BSC_APPS.BSC_APPS_SCHEMA;
2836: --b. see what hint to use
2837: -- Fix bug#4097873: remove ordered hint
2838: if h_num_rows_base = 0 then
2839: l_hint := '/*+ use_hash(bsc_tmp_base) use_hash('||x_base_tbl||') */';