27: --
28: CURSOR c_org_hier_top (cp_osv_id NUMBER
29: ) IS
30: SELECT DISTINCT organization_id_parent
31: FROM per_org_structure_elements
32: WHERE org_structure_version_id = cp_osv_id
33: AND organization_id_parent NOT IN
34: (SELECT organization_id_child
35: FROM per_org_structure_elements
31: FROM per_org_structure_elements
32: WHERE org_structure_version_id = cp_osv_id
33: AND organization_id_parent NOT IN
34: (SELECT organization_id_child
35: FROM per_org_structure_elements
36: WHERE org_structure_version_id = cp_osv_id
37: );
38: --
39: -- Cursor to walk the ORG hierarchy to return all nodes and levels
45: ,org_structure_version_id
46: ,org_structure_element_id
47: ,organization_id_parent
48: ,organization_id_child
49: FROM per_org_structure_elements
50: WHERE org_structure_version_id = cp_osv_id
51: START WITH organization_id_parent = cp_organization_id_parent
52: CONNECT BY PRIOR organization_id_child = organization_id_parent;
53: --
86:
87: -- Local variables for process_org_list
88: l_org_hier_table t_org_hier_table;
89: l_cal_event_table t_cal_event_table;
90: l_top_org_id per_org_structure_elements.organization_id_parent%TYPE;
91: l_proc VARCHAR2(100);
92:
93: --
94: -------------------------------------------------------------------------
117: ,org_structure_version_id
118: ,org_structure_element_id
119: ,organization_id_parent
120: ,organization_id_child
121: FROM per_org_structure_elements
122: WHERE org_structure_version_id = cp_osv_id
123: AND organization_id_parent = cp_par_org_id;
124: BEGIN
125: l_proc := 'HR_CAL_EVENT_MAPPING_PKG.get_org_hier_elements';