DBA Data[Home] [Help]

APPS.FII_CC_MAINTAIN_PKG dependencies on FII_COST_CTR_HIER_GT

Line 485: FROM FII_COST_CTR_HIER_GT

481: --we look at records such as (P1,A,A) and (P2,A,A)
482: Cursor Dup_Assg_Cur IS
483: SELECT count(parent_cc_id) parents,
484: child_cc_id flex_value_id
485: FROM FII_COST_CTR_HIER_GT
486: WHERE next_level_cc_id = child_cc_id
487: AND parent_level = next_level - 1
488: GROUP BY child_cc_id
489: HAVING count(parent_cc_id) > 1;

Line 498: FROM FII_COST_CTR_HIER_GT

494: SELECT parent_cc_id,
495: parent_flex_value_set_id,
496: child_cc_id,
497: child_flex_value_set_id
498: FROM FII_COST_CTR_HIER_GT
499: WHERE child_cc_id = p_child_value_id
500: AND next_level_cc_id = child_cc_id
501: AND parent_level = next_level - 1;
502:

Line 632: INSERT INTO fii_COST_CTR_hier_gt (

628: FOR direct_children_rec IN direct_children_csr(p_vset_id, p_root_node)
629: LOOP
630:
631: /* Inserting record with all parents */
632: INSERT INTO fii_COST_CTR_hier_gt (
633: parent_level,
634: parent_cc_id,
635: child_cc_id,
636: next_level,

Line 697: FROM fii_COST_CTR_hier_gt

693: CURSOR MAIN_CSR is
694: SELECT parent_level, parent_cc_id, next_level, next_level_cc_id,
695: child_level, child_cc_id, child_flex_value_set_id,
696: parent_flex_value_set_id
697: FROM fii_COST_CTR_hier_gt
698: ORDER BY parent_level, child_level;
699:
700: l_flex_value VARCHAR2(150);
701: p_parent_id NUMBER(15);

Line 710: FII_UTIL.truncate_table ('FII_COST_CTR_HIER_GT', 'FII', g_retcode);

706: FII_MESSAGE.Func_Ent(func_name => 'FII_CC_MAINTAIN_PKG.'||
707: 'Flatten_CC_Dim_Hier');
708: END IF;
709: g_phase := 'Truncate table FII_CC_HIER_GT';
710: FII_UTIL.truncate_table ('FII_COST_CTR_HIER_GT', 'FII', g_retcode);
711:
712: -----------------------------------------------------------------
713:
714: CCDIM_parent_node := p_root_node;

Line 733: insert into fii_COST_CTR_hier_gt (

729: g_phase := 'insert top node self row and invoke Ins_Imm_Child_nodes';
730:
731: INSERT_IMM_CHILD_NODES (p_vset_id, p_root_node);
732:
733: insert into fii_COST_CTR_hier_gt (
734: parent_level,
735: parent_cc_id,
736: next_level,
737: next_level_cc_id,

Line 755: from (select distinct child_cc_id,child_level,child_flex_value_set_id from fii_cOST_CTR_hier_gt);

751: child_flex_value_set_id,
752: child_flex_value_set_id,
753: 'N',
754: 'N'
755: from (select distinct child_cc_id,child_level,child_flex_value_set_id from fii_cOST_CTR_hier_gt);
756:
757: IF (FIIDIM_Debug) THEN
758: FII_UTIL.Write_Log('Inserted ' || SQL%ROWCOUNT || ' rows into fii_cost_ctr_hier_gt');
759: END IF;

Line 758: FII_UTIL.Write_Log('Inserted ' || SQL%ROWCOUNT || ' rows into fii_cost_ctr_hier_gt');

754: 'N'
755: from (select distinct child_cc_id,child_level,child_flex_value_set_id from fii_cOST_CTR_hier_gt);
756:
757: IF (FIIDIM_Debug) THEN
758: FII_UTIL.Write_Log('Inserted ' || SQL%ROWCOUNT || ' rows into fii_cost_ctr_hier_gt');
759: END IF;
760:
761: INSERT INTO fii_COST_CTR_hier_gt
762: (parent_level,

Line 761: INSERT INTO fii_COST_CTR_hier_gt

757: IF (FIIDIM_Debug) THEN
758: FII_UTIL.Write_Log('Inserted ' || SQL%ROWCOUNT || ' rows into fii_cost_ctr_hier_gt');
759: END IF;
760:
761: INSERT INTO fii_COST_CTR_hier_gt
762: (parent_level,
763: parent_cc_id,
764: next_level,
765: next_level_cc_id,

Line 785: FII_UTIL.Write_Log('Inserted ' || SQL%ROWCOUNT || ' rows into fii_cost_ctr_hier_gt');

781: 'N',
782: 'N');
783:
784: IF (FIIDIM_Debug) THEN
785: FII_UTIL.Write_Log('Inserted ' || SQL%ROWCOUNT || ' rows into fii_cost_ctr_hier_gt');
786: END IF;
787:
788: --Insert the UNASSIGNED to the hierarchy table.
789: --Use top node as the parent

Line 793: INSERT INTO fii_COST_CTR_hier_gt

789: --Use top node as the parent
790: g_phase := 'Insert the UNASSIGNED to the hierarchy table';
791:
792: -- First one is (G_TOP_NODE_ID, UNASSIGNED, UNASSIGNED)
793: INSERT INTO fii_COST_CTR_hier_gt
794: (parent_level,
795: parent_cc_id,
796: next_level,
797: next_level_cc_id,

Line 817: FII_UTIL.Write_Log('Inserted ' || SQL%ROWCOUNT || ' rows into fii_cost_ctr_hier_gt');

813: 'N',
814: 'N');
815:
816: IF (FIIDIM_Debug) THEN
817: FII_UTIL.Write_Log('Inserted ' || SQL%ROWCOUNT || ' rows into fii_cost_ctr_hier_gt');
818: END IF;
819:
820: -- Another one is (UNASSIGNED, UNASSIGNED, UNASSIGNED)
821: INSERT INTO fii_COST_CTR_hier_gt

Line 821: INSERT INTO fii_COST_CTR_hier_gt

817: FII_UTIL.Write_Log('Inserted ' || SQL%ROWCOUNT || ' rows into fii_cost_ctr_hier_gt');
818: END IF;
819:
820: -- Another one is (UNASSIGNED, UNASSIGNED, UNASSIGNED)
821: INSERT INTO fii_COST_CTR_hier_gt
822: (parent_level,
823: parent_cc_id,
824: next_level,
825: next_level_cc_id,

Line 845: FII_UTIL.Write_Log('Inserted ' || SQL%ROWCOUNT || ' rows into fii_cost_ctr_hier_gt');

841: 'N',
842: 'N');
843:
844: IF (FIIDIM_Debug) THEN
845: FII_UTIL.Write_Log('Inserted ' || SQL%ROWCOUNT || ' rows into fii_cost_ctr_hier_gt');
846: END IF;
847:
848: -- Insert a dummy super top node (-999) to the hierarchy table
849: -- (the dummy value set id is -998)

Line 852: INSERT INTO fii_COST_CTR_hier_gt

848: -- Insert a dummy super top node (-999) to the hierarchy table
849: -- (the dummy value set id is -998)
850: g_phase := 'Insert a dummy top node (-999) to the hierarchy table';
851:
852: INSERT INTO fii_COST_CTR_hier_gt
853: (parent_level,
854: parent_cc_id,
855: next_level,
856: next_level_cc_id,

Line 874: FROM fii_COST_CTR_hier_gt

870: child_flex_value_set_id,
871: -998,
872: 'N',
873: 'N'
874: FROM fii_COST_CTR_hier_gt
875: WHERE child_cc_id = parent_cc_id;
876:
877:
878: IF (FIIDIM_Debug) THEN

Line 879: FII_UTIL.Write_Log('Inserted ' || SQL%ROWCOUNT || ' rows into fii_cost_ctr_hier_gt');

875: WHERE child_cc_id = parent_cc_id;
876:
877:
878: IF (FIIDIM_Debug) THEN
879: FII_UTIL.Write_Log('Inserted ' || SQL%ROWCOUNT || ' rows into fii_cost_ctr_hier_gt');
880: END IF;
881:
882: --Call FND_STATS to collect statistics after populating the table
883: g_phase := 'gather_table_stats for FII_FIN_ITEM_HIER_GT';

Line 946: from fii_cost_ctr_hier_gt

942: , child_cc_id cid
943: , child_level clv
944: , child_flex_value_set_id cvs
945: , is_leaf_flag clf
946: from fii_cost_ctr_hier_gt
947: where parent_level + 1 = child_level
948: --and child_flex_value_set_id = G_MASTER_VALUE_SET_ID
949: union all
950: select NULL, -999, 0, -998, 'N'

Line 985: update fii_cost_ctr_hier_gt

981: ELSE
982: n_top := p_top + 1;
983: END IF;
984:
985: update fii_cost_ctr_hier_gt
986: set LEVEL2_CC_ID = r_stack( least( p_top + 2, c_top+1 ) ).cid
987: , LEVEL3_CC_ID = r_stack( least( p_top + 3, c_top+1 ) ).cid
988: , LEVEL4_CC_ID = r_stack( least( p_top + 4, c_top+1 ) ).cid
989: , LEVEL5_CC_ID = r_stack( least( p_top + 5, c_top+1 ) ).cid

Line 1016: Delete from FII_COST_CTR_HIER_GT

1012: --Delete from FII_CC_HIER_GT for child value set not equal to
1013: --the master value set and not equal to the UNASSIGNED value set.
1014: g_phase := 'Delete FII_CC_HIER_GT #1';
1015:
1016: Delete from FII_COST_CTR_HIER_GT
1017: Where child_flex_value_set_id <> G_MASTER_VALUE_SET_ID
1018: And child_flex_value_set_id <> G_FII_INT_VALUE_SET_ID;
1019:
1020: IF (FIIDIM_Debug) THEN

Line 1021: FII_UTIL.Write_Log('Deleted ' || SQL%ROWCOUNT || ' rows from fii_COST_CTR_hier_gt');

1017: Where child_flex_value_set_id <> G_MASTER_VALUE_SET_ID
1018: And child_flex_value_set_id <> G_FII_INT_VALUE_SET_ID;
1019:
1020: IF (FIIDIM_Debug) THEN
1021: FII_UTIL.Write_Log('Deleted ' || SQL%ROWCOUNT || ' rows from fii_COST_CTR_hier_gt');
1022: END IF;
1023:
1024: Get_level_populated;
1025:

Line 1032: Update fii_cost_ctr_hier_gt tab1

1028: g_phase := 'Update next_level_is_leaf_flag, is_leaf_flag';
1029:
1030: --Update the column next_level_is_leaf_flag
1031: --We look at those records (P,A,A) in which A is a leaf value
1032: Update fii_cost_ctr_hier_gt tab1
1033: Set next_level_is_leaf_flag = 'Y'
1034: Where tab1.next_level_cc_id = tab1.child_cc_id
1035: and tab1.next_level_cc_id IN (
1036: select /*+ ordered */ tab3.next_level_cc_id

Line 1037: from fii_cost_ctr_hier_gt tab3,

1033: Set next_level_is_leaf_flag = 'Y'
1034: Where tab1.next_level_cc_id = tab1.child_cc_id
1035: and tab1.next_level_cc_id IN (
1036: select /*+ ordered */ tab3.next_level_cc_id
1037: from fii_cost_ctr_hier_gt tab3,
1038: fii_cost_ctr_hier_gt tab2
1039: where tab2.parent_cc_id = tab3.parent_cc_id
1040: and tab3.parent_cc_id = tab3.child_cc_id
1041: group by tab3.next_level_cc_id

Line 1038: fii_cost_ctr_hier_gt tab2

1034: Where tab1.next_level_cc_id = tab1.child_cc_id
1035: and tab1.next_level_cc_id IN (
1036: select /*+ ordered */ tab3.next_level_cc_id
1037: from fii_cost_ctr_hier_gt tab3,
1038: fii_cost_ctr_hier_gt tab2
1039: where tab2.parent_cc_id = tab3.parent_cc_id
1040: and tab3.parent_cc_id = tab3.child_cc_id
1041: group by tab3.next_level_cc_id
1042: having count(*) = 1);

Line 1045: FII_UTIL.Write_Log('Updated ' || SQL%ROWCOUNT || ' rows in fii_COST_CTR_hier_gt');

1041: group by tab3.next_level_cc_id
1042: having count(*) = 1);
1043:
1044: IF (FIIDIM_Debug) THEN
1045: FII_UTIL.Write_Log('Updated ' || SQL%ROWCOUNT || ' rows in fii_COST_CTR_hier_gt');
1046: END IF;
1047:
1048:
1049: -- Update the column is_leaf_flag

Line 1051: Update fii_COST_CTR_hier_gt

1047:
1048:
1049: -- Update the column is_leaf_flag
1050: -- We look at all records (A,A,A) in which A is a leaf value
1051: Update fii_COST_CTR_hier_gt
1052: Set is_leaf_flag = 'Y'
1053: Where parent_cc_id = child_cc_id
1054: and next_level_is_leaf_flag = 'Y';
1055:

Line 1057: FII_UTIL.Write_Log('Updated ' || SQL%ROWCOUNT || ' rows in fii_COST_CTR_hier_gt');

1053: Where parent_cc_id = child_cc_id
1054: and next_level_is_leaf_flag = 'Y';
1055:
1056: IF (FIIDIM_Debug) THEN
1057: FII_UTIL.Write_Log('Updated ' || SQL%ROWCOUNT || ' rows in fii_COST_CTR_hier_gt');
1058: END IF;
1059:
1060: IF (FIIDIM_Debug) THEN
1061: FII_MESSAGE.Func_Succ(func_name => 'FII_CC_MAINTAIN_PKG.'||

Line 1268: FROM FII_COST_CTR_HIER_GT;

1264: FII_USER_ID,
1265: SYSDATE,
1266: FII_USER_ID,
1267: FII_LOGIN_ID
1268: FROM FII_COST_CTR_HIER_GT;
1269:
1270: IF (FIIDIM_Debug) THEN
1271: FII_UTIL.Write_Log('Inserted ' || SQL%ROWCOUNT || ' rows into FII_FULL_COST_CTR_HIERS');
1272: END IF;

Line 1337: FROM FII_COST_CTR_HIER_GT;

1333: FII_USER_ID,
1334: SYSDATE,
1335: FII_USER_ID,
1336: FII_LOGIN_ID
1337: FROM FII_COST_CTR_HIER_GT;
1338:
1339:
1340: IF (FIIDIM_Debug) THEN
1341: FII_UTIL.Write_Log('Inserted ' || SQL%ROWCOUNT || ' rows into FII_COST_CTR_HIERARCHIES');

Line 1474: FROM FII_COST_CTR_HIER_GT;

1470: FII_USER_ID,
1471: SYSDATE,
1472: FII_USER_ID,
1473: FII_LOGIN_ID
1474: FROM FII_COST_CTR_HIER_GT;
1475:
1476: IF (FIIDIM_Debug) THEN
1477: FII_UTIL.Write_Log('Inserted ' || SQL%ROWCOUNT || ' rows into FII_FULL_COST_CTR_HIERS');
1478: END IF;

Line 1497: -- All data is now in the temporary table FII_COST_CTR_HIER_GT,

1493: --Copy FII_CC_HIER_GT to the final (pruned) dimension table
1494: g_phase := 'Copy TMP hierarchy table to the final pruned dimension table';
1495:
1496: -- Incremental Dimension Maintence
1497: -- All data is now in the temporary table FII_COST_CTR_HIER_GT,
1498: -- we need to maintain the permanent table FII_COST_CTR_HIERARCHIES
1499: -- by diffing the 2 tables.
1500: -- The maintenance is done by 2 statements, one INSERT and one DELETE.
1501:

Line 1533: FROM FII_COST_CTR_HIER_GT);

1529: child_flex_value_set_id, NVL(next_level_cc_sort_order, -92883), LEVEL2_CC_ID,
1530: LEVEL3_CC_ID,
1531: LEVEL4_CC_ID ,
1532: LEVEL5_CC_ID
1533: FROM FII_COST_CTR_HIER_GT);
1534:
1535:
1536: IF (FIIDIM_Debug) THEN
1537: FII_UTIL.Write_Log('Deleted ' || SQL%ROWCOUNT || ' rows from FII_COST_CTR_HIERARCHIES');

Line 1583: FROM FII_COST_CTR_HIER_GT

1579: FII_USER_ID,
1580: SYSDATE,
1581: FII_USER_ID,
1582: FII_LOGIN_ID
1583: FROM FII_COST_CTR_HIER_GT
1584: MINUS
1585: SELECT parent_level,
1586: parent_cc_id,
1587: next_level,