87: l_count NUMBER(15) :=0;
88: p_status VARCHAR2(1) := NULL;
89:
90: --this cursor prints out all (company, cost_center) with
91: --multiple orgs in table fii_ccc_mgr_gt
92: Cursor c_duplicate_org is
93: select count(*) cnt,
94: company_id,
95: cost_center_id
92: Cursor c_duplicate_org is
93: select count(*) cnt,
94: company_id,
95: cost_center_id
96: from fii_ccc_mgr_gt
97: where company_id is not null
98: and cost_center_id is not null
99: group by company_id, cost_center_id
100: having count(*) > 1;
105: com.flex_value company,
106: cc.flex_value cost_center,
107: per.full_name manager,
108: fnd_date.canonical_to_date(hoi.org_information3) eff_date
109: from fii_ccc_mgr_gt gt,
110: hr_all_organization_units org,
111: fnd_flex_values com,
112: fnd_flex_values cc,
113: per_all_people_f per,
121: and hoi.org_information_context = 'Organization Name Alias'
122: and hoi.organization_id = gt.ccc_org_id;
123:
124: BEGIN
125: -- Populate FII_CCC_MGR_GT
126: FII_GL_EXTRACTION_UTIL.LOAD_CCC_MGR (p_status);
127:
128: IF p_status = -1 then
129: fii_util.write_log('Error in FII_GL_EXTRACTION_UTIL.LOAD_CCC_MGR ...');
126: FII_GL_EXTRACTION_UTIL.LOAD_CCC_MGR (p_status);
127:
128: IF p_status = -1 then
129: fii_util.write_log('Error in FII_GL_EXTRACTION_UTIL.LOAD_CCC_MGR ...');
130: fii_util.write_log('Table FII_CCC_MGR_GT is not populated');
131: raise NO_DATA_FOUND;
132: END IF;
133:
134: l_count := 0;