4575: l_pc_version number := -1;
4576:
4577: cursor csr_top_node(p_pc_version in number) is
4578: select a.organization_id_parent organization_id
4579: from per_org_structure_elements a
4580: where a.org_structure_version_id = p_pc_version
4581: and not exists
4582: (select null
4583: from per_org_structure_elements b
4579: from per_org_structure_elements a
4580: where a.org_structure_version_id = p_pc_version
4581: and not exists
4582: (select null
4583: from per_org_structure_elements b
4584: where b.org_structure_version_id = p_pc_version
4585: AND b.organization_id_child = a.organization_id_parent);
4586: begin
4587: l_pc_version := get_pc_str_version(p_business_group_id, p_effective_date);