<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Dashboards, Executive, Performance Management and Prototyping</title>
<link>http://www.beyeblogs.com/dashboards/</link>
<description>Discuss effective ways to create quick dashboard prototypes, good dashboarding practices, discuss Oracle DBI, Discoverer, EPB, FCH and other CPM products</description>
<language>en</language>
<copyright>Copyright 2008</copyright>
<lastBuildDate>Tue, 25 Sep 2007 13:45:00 -0700</lastBuildDate>
<generator>http://www.movabletype.org/?v=3.33</generator>
<docs>http://blogs.law.harvard.edu/tech/rss</docs> 


<item>
<title>DBI Cost Center Hierarchy</title>
<description><![CDATA[<p>In DBI (Daily Business Intelligence), the cost center hierarchy is maintained in the following table "fii_cost_ctr_hierarchies"</p>
<p><img id="image364" alt="dbi_cost_center_hierarchy.png" src="http://www.appsbi.com/wp-content/uploads/2007/07/dbi_cost_center_hierarchy.png" /></p>
<p>So, using the above table, it is possible to get all children for any given node. (This is possible from the FND tables in Oracle apps too)</p>
<p>Here is the query</p>
<pre><br />
SELECT child_value<br />
FROM<br />
(<br />
SELECT LEVEL,<br />
parent_cc_id,<br />
child_cc_id,<br />
child_value,<br />
lpad(' ',    3 *(LEVEL -1)) || child_desc cc_hrchy,<br />
next_level_is_leaf_flag<br />
FROM<br />
(<br />
select<br />
h.parent_cc_id<br />
,h.child_cc_id<br />
,node_child.flex_value child_value<br />
,node_child.description child_desc<br />
,h.is_leaf_flag<br />
,h.next_level_is_leaf_flag<br />
from fii_cost_ctr_hierarchies h<br />
, fnd_flex_values_vl node_child<br />
where  h.child_cc_id = node_child.flex_value_id<br />
and  node_child.flex_value_set_id = h.child_flex_value_set_id<br />
and parent_level = child_level -1<br />
)<br />
START WITH parent_cc_id in ( select flex_value_id from fnd_flex_values_vl<br />
where flex_value=''<br />
and flex_value_set_id = 1005351 )<br />
CONNECT BY PRIOR child_cc_id = parent_cc_id<br />
)<br />
where  next_level_is_leaf_flag='Y'</pre>
<p>If you need to see only sub-parent nodes then replace the last line in the query to next_level_is_leaf_flag='N'</p>
<p>This query can be used in other reporting requirements such as using in any Discoverer reports.</p>
<p>For e.g. In your GL chart of accounts, lets say your Cost Center is segment2 and there is a need to find total balance for some particular Cost Center node "XYZ" then you could write a query similar to</p>
<pre><br />
select sum(balance column)<br />
<br />
from gl_balances gb, gl_code_combinations gcc<br />
<br />
where gcc.code_combination_id= gb.code_combination_id<br />
<br />
and ...<br />
<br />
and ...<br />
<br />
and gcc.segment2 in ( result set from the above query...)</pre>

<p>-Nilesh<br />
<a href="http://www.infocaptor.com">http://www.infocaptor.com</a></p>]]></description>
<link>http://www.beyeblogs.com/dashboards/archive/2007/09/dbi_cost_center_hierarchy.php</link>
<guid>http://www.beyeblogs.com/dashboards/archive/2007/09/dbi_cost_center_hierarchy.php</guid>
<category></category>
<pubDate>Tue, 25 Sep 2007 13:45:00 -0700</pubDate>
</item>


</channel>
</rss>