DBA Data[Home] [Help]

APPS.PA_ORG_UTILS dependencies on PER_ORG_STRUCTURE_ELEMENTS

Line 28: FROM per_org_structure_elements

24:
25: else
26: SELECT max(level)
27: INTO l_tmp_level
28: FROM per_org_structure_elements
29: WHERE org_structure_version_id = p_org_version_id
30: AND organization_id_parent = p_child_parent_org_id
31: CONNECT BY PRIOR organization_id_child = organization_id_parent
32: AND org_structure_version_id = p_org_version_id

Line 40: FROM per_org_structure_elements

36: If l_tmp_level is NULL then
37:
38: SELECT max(level)
39: INTO l_tmp_level
40: FROM per_org_structure_elements
41: WHERE org_structure_version_id = p_org_version_id
42: AND organization_id_child = p_child_parent_org_id
43: CONNECT BY PRIOR organization_id_child = organization_id_parent
44: AND org_structure_version_id = p_org_version_id

Line 83: FROM per_org_structure_elements

79: IS
80: l_max_org_level number;
81: BEGIN
82: SELECT max(level) into l_max_org_level
83: FROM per_org_structure_elements
84: WHERE org_structure_version_id = p_org_version_id
85: CONNECT BY PRIOR organization_id_child = organization_id_parent
86: and org_structure_version_id = p_org_version_id
87: START WITH organization_id_parent = p_start_org_id

Line 103: FROM per_org_structure_elements a

99: BEGIN
100:
101: SELECT a.organization_id_parent
102: INTO l_start_org_id
103: FROM per_org_structure_elements a
104: WHERE org_structure_version_id = p_org_version_id
105: AND not exists ( select 'a' from per_org_structure_elements b
106: WHERE a.organization_id_parent = b.organization_id_child and
107: a.org_structure_version_id = b.org_structure_version_id)

Line 105: AND not exists ( select 'a' from per_org_structure_elements b

101: SELECT a.organization_id_parent
102: INTO l_start_org_id
103: FROM per_org_structure_elements a
104: WHERE org_structure_version_id = p_org_version_id
105: AND not exists ( select 'a' from per_org_structure_elements b
106: WHERE a.organization_id_parent = b.organization_id_child and
107: a.org_structure_version_id = b.org_structure_version_id)
108: AND rownum = 1;
109:

Line 172: from per_org_structure_elements a

168: into x_start_org_id
169: from pa_implementations;
170: else
171: select distinct organization_id_parent into x_start_org_id
172: from per_org_structure_elements a
173: ,pa_implementations b
174: ,hr_organization_information c
175: where organization_id_parent not in
176: ( select d.ORGANIZATION_ID_CHILD from per_org_structure_elements d

Line 176: ( select d.ORGANIZATION_ID_CHILD from per_org_structure_elements d

172: from per_org_structure_elements a
173: ,pa_implementations b
174: ,hr_organization_information c
175: where organization_id_parent not in
176: ( select d.ORGANIZATION_ID_CHILD from per_org_structure_elements d
177: where d.org_structure_version_id = to_number(c.org_information2)
178: )
179: and a.org_structure_version_id = to_number(c.org_information2)
180: and b.business_group_id = c.organization_id

Line 213: FROM per_org_structure_elements

209: SELECT l_new_start_org_id
210: FROM dual
211: UNION ALL
212: SELECT organization_id_child
213: FROM per_org_structure_elements
214: WHERE org_structure_version_id = l_new_org_version_id
215: CONNECT BY PRIOR organization_id_child = organization_id_parent
216: AND org_structure_version_id = l_new_org_version_id
217: START WITH organization_id_parent = l_new_start_org_id

Line 227: FROM per_org_structure_elements

223: SELECT l_org_id
224: FROM dual
225: UNION ALL
226: SELECT organization_id_child
227: FROM per_org_structure_elements
228: WHERE org_structure_version_id = l_new_org_version_id
229: CONNECT BY PRIOR organization_id_child = organization_id_parent
230: AND org_structure_version_id = l_new_org_version_id
231: START WITH organization_id_parent = l_org_id

Line 238: from per_org_structure_elements se

234: /* Bug 3795903 - Added parameters to the cursor check_org_exists */
235:
236: cursor check_org_exists (l_old_org_version_id IN NUMBER,l_old_org_start_id IN NUMBER, l_new_start_org_id IN NUMBER) is
237: (select se.organization_id_child
238: from per_org_structure_elements se
239: where se.org_structure_version_id = l_old_org_version_id
240: connect by prior se.organization_id_child = se.organization_id_parent
241: and org_structure_version_id = l_old_org_version_id
242: start with se.organization_id_parent = l_old_org_start_id

Line 251: c_org_struct_version_id IN per_org_structure_elements.org_structure_version_id%TYPE,

247: (select l_new_start_org_id from sys.dual );
248:
249: /* Added the cursor for bug 4232613 */
250: CURSOR proj_exp_check(
251: c_org_struct_version_id IN per_org_structure_elements.org_structure_version_id%TYPE,
252: l_org_id IN pa_implementations_all.org_id%TYPE
253: )
254: IS
255: SELECT 'Y' FROM pa_implementations_all

Line 301: from per_org_structure_elements se

297: pa_org_use_type )
298: ( (select se.organization_id_child
299: ,x_org_id
300: ,'PROJECTS'
301: from per_org_structure_elements se
302: where org_structure_version_id = x_new_proj_org_version_id
303: AND EXISTS (select 'X'
304: from hr_organization_information info
305: where info.organization_id = se.organization_id_child

Line 451: from per_org_structure_elements se

447: pa_org_use_type)
448: ( (select se.organization_id_child
449: ,x_org_id
450: ,'EXPENDITURES'
451: from per_org_structure_elements se
452: where org_structure_version_id = x_new_exp_org_version_id
453: AND EXISTS (select 'X'
454: from hr_organization_information info
455: where info.organization_id = se.organization_id_child

Line 680: FROM per_org_structure_elements

676: SELECT l_dummy_level,lp_start_org_id
677: FROM dual
678: UNION ALL
679: SELECT level,organization_id_child
680: FROM per_org_structure_elements
681: WHERE org_structure_version_id = lp_org_version_id
682: CONNECT BY PRIOR organization_id_child = organization_id_parent
683: AND org_structure_version_id = lp_org_version_id
684: START WITH organization_id_parent = lp_start_org_id

Line 693: FROM per_org_structure_elements

689: SELECT l_dummy_level,lp_org_id
690: FROM dual
691: UNION ALL
692: SELECT level,organization_id_child
693: FROM per_org_structure_elements
694: WHERE org_structure_version_id = lp_org_version_id
695: CONNECT BY PRIOR organization_id_child = organization_id_parent
696: AND org_structure_version_id = lp_org_version_id
697: START WITH organization_id_parent = lp_org_id

Line 888: from per_org_structure_elements se

884:
885: cursor check_org_exists is
886: (
887: select se.organization_id_parent
888: from per_org_structure_elements se
889: where se.org_structure_version_id = x_org_version_id
890: connect by prior se.organization_id_parent =
891: se.organization_id_child
892: and org_structure_version_id = x_org_version_id

Line 907: from per_org_structure_elements se

903:
904: /* Commented for Bug#2620151 Added cursor above
905: cursor check_org_exists is
906: (select se.organization_id_child
907: from per_org_structure_elements se
908: where se.org_structure_version_id =
909: x_org_version_id
910: connect by prior se.organization_id_child =
911: se.organization_id_parent

Line 930: FROM per_org_structure_elements

926: (SELECT x_organization_id_parent
927: FROM dual
928: UNION
929: SELECT organization_id_parent
930: FROM per_org_structure_elements
931: WHERE org_structure_version_id = x_org_version_id
932: CONNECT BY PRIOR organization_id_parent= organization_id_child
933: AND org_structure_version_id = x_org_version_id
934: START WITH organization_id_child = x_organization_id_parent

Line 949: FROM per_org_structure_elements

945: (SELECT lp_organization_id_parent
946: FROM dual
947: UNION
948: SELECT organization_id_parent
949: FROM per_org_structure_elements
950: WHERE org_structure_version_id = lp_org_version_id
951: CONNECT BY PRIOR organization_id_parent= organization_id_child
952: AND org_structure_version_id = lp_org_version_id
953: START WITH organization_id_child = lp_organization_id_parent

Line 1453: from per_org_structure_elements se

1449:
1450: cursor check_org_exists is
1451: (
1452: select se.organization_id_parent
1453: from per_org_structure_elements se
1454: where se.org_structure_version_id = v_org_structure_version_id
1455: and se.organization_id_parent =
1456: v_start_org_id
1457: connect by prior se.organization_id_parent =

Line 1468: from per_org_structure_elements se

1464:
1465: /* Commeneted the cursor below for bug#2620151, Added new cursor above
1466: cursor check_org_exists is
1467: (select se.organization_id_child
1468: from per_org_structure_elements se
1469: where se.org_structure_version_id = v_org_structure_version_id
1470: and se.organization_id_child = x_organization_id ---made changes as Suggested
1471: connect by prior se.organization_id_child =
1472: se.organization_id_parent

Line 1485: FROM per_org_structure_elements

1481: (SELECT x_organization_id
1482: FROM dual
1483: UNION ALL
1484: SELECT organization_id_parent
1485: FROM per_org_structure_elements
1486: WHERE org_structure_version_id = v_org_structure_version_id
1487: CONNECT BY PRIOR organization_id_parent= organization_id_child
1488: AND org_structure_version_id = v_org_structure_version_id
1489: START WITH organization_id_child = x_organization_id);

Line 1758: FROM per_org_structure_elements se

1754: IS
1755:
1756: CURSOR cur_all_old_org IS
1757: SELECT se.organization_id_child organization_id
1758: FROM per_org_structure_elements se
1759: WHERE org_structure_version_id = x_old_org_version_id
1760: CONNECT BY PRIOR se.organization_id_child
1761: = se.organization_id_parent
1762: AND org_structure_version_id = x_old_org_version_id

Line 1770: FROM per_org_structure_elements se

1766: SELECT x_old_start_org_id FROM Sys.dual ;
1767:
1768: CURSOR cur_proj_new_org IS
1769: SELECT se.organization_id_child organization_id
1770: FROM per_org_structure_elements se
1771: WHERE org_structure_version_id = x_new_org_version_id
1772: AND EXISTS (select 'X'
1773: from hr_organization_information info
1774: where info.organization_id = se.organization_id_child

Line 1795: FROM per_org_structure_elements se

1791:
1792:
1793: CURSOR cur_exp_new_org IS
1794: SELECT se.organization_id_child organization_id
1795: FROM per_org_structure_elements se
1796: WHERE org_structure_version_id = x_new_org_version_id
1797: AND EXISTS (select 'X'
1798: from hr_organization_information info
1799: where info.organization_id = se.organization_id_child

Line 2228: FROM per_org_structure_elements

2224: SELECT P_organization_id_parent
2225: FROM dual
2226: UNION
2227: (SELECT distinct organization_id_parent
2228: FROM per_org_structure_elements
2229: WHERE org_structure_version_id = P_org_version_id
2230: CONNECT BY PRIOR organization_id_parent= organization_id_child
2231: AND org_structure_version_id = P_org_version_id
2232: START WITH organization_id_child = P_organization_id_parent

Line 2235: ---- since the start organization id defined in per_org_structure_elements

2231: AND org_structure_version_id = P_org_version_id
2232: START WITH organization_id_child = P_organization_id_parent
2233: AND org_structure_version_id = P_org_version_id
2234: /* ---- The following query is added to fix the bug : 1654453 ---
2235: ---- since the start organization id defined in per_org_structure_elements
2236: ---- may be different from the start_organization_id set up in pa_implementations
2237: ---- so always the reporting hierarchy is formed based on pa_implementations
2238: ---- start_organization_id */
2239: MINUS

Line 2241: FROM per_org_structure_elements

2237: ---- so always the reporting hierarchy is formed based on pa_implementations
2238: ---- start_organization_id */
2239: MINUS
2240: SELECT distinct organization_id_parent
2241: FROM per_org_structure_elements
2242: WHERE org_structure_version_id = P_org_version_id
2243: CONNECT BY PRIOR organization_id_parent= organization_id_child
2244: AND org_structure_version_id = P_org_version_id
2245: START WITH organization_id_child = P_start_org_id

Line 2315: -- get the parent organization level from the per_org_structure_elements

2311: v_clevel := P_org_max_level - P_org_level + 1;
2312:
2313:
2314: -- set the parent level based on the following condition
2315: -- get the parent organization level from the per_org_structure_elements
2316: -- then apply the formula
2317: SELECT max(level)
2318: INTO v_parent_org_level
2319: FROM per_org_structure_elements

Line 2319: FROM per_org_structure_elements

2315: -- get the parent organization level from the per_org_structure_elements
2316: -- then apply the formula
2317: SELECT max(level)
2318: INTO v_parent_org_level
2319: FROM per_org_structure_elements
2320: WHERE org_structure_version_id = P_org_version_id
2321: AND organization_id_parent = v_parent_org_id
2322: CONNECT BY PRIOR organization_id_child = organization_id_parent
2323: AND org_structure_version_id = P_org_version_id

Line 2330: FROM per_org_structure_elements

2326: If v_parent_org_level is NULL then
2327:
2328: SELECT max(level)
2329: INTO v_parent_org_level
2330: FROM per_org_structure_elements
2331: WHERE org_structure_version_id = P_org_version_id
2332: AND organization_id_child = v_parent_org_id
2333: CONNECT BY PRIOR organization_id_child = organization_id_parent
2334: AND org_structure_version_id = P_org_version_id

Line 2418: FROM per_org_structure_elements

2414: SELECT distinct
2415: level plevel
2416: ,organization_id_parent
2417: ,organization_id_child
2418: FROM per_org_structure_elements
2419: WHERE org_structure_version_id = version_id
2420: CONNECT BY PRIOR organization_id_child = organization_id_parent
2421: and org_structure_version_id = version_id
2422: START WITH organization_id_parent = start_org_id

Line 2430: FROM per_org_structure_elements

2426: -- check whether the org exist in the given pa implementations ou
2427: -- and falls within the start org
2428: cursor check_org_exists(version_id NUMBER,start_org_id NUMBER) is
2429: (SELECT organization_id_child
2430: FROM per_org_structure_elements
2431: WHERE org_structure_version_id = version_id
2432: CONNECT BY PRIOR organization_id_child = organization_id_parent
2433: and org_structure_version_id = version_id
2434: START WITH organization_id_parent = start_org_id

Line 2496: FROM per_org_structure_elements

2492: specified is same as the changed Org structure */
2493:
2494: -- get maximum level for the set up
2495: SELECT max(level) into v_maximumlevel
2496: FROM per_org_structure_elements
2497: WHERE org_structure_version_id = p_org_version_id
2498: CONNECT BY PRIOR organization_id_child = organization_id_parent
2499: and org_structure_version_id = p_org_version_id
2500: START WITH organization_id_parent = v_start_org_id

Line 2691: per_org_structure_elements posg

2687: SELECT distinct
2688: imp.org_structure_version_id version_id
2689: ,imp.start_organization_id start_org_id
2690: FROM pa_implementations_all imp,
2691: per_org_structure_elements posg
2692: WHERE posg.org_structure_version_id = imp.org_structure_version_id;
2693:
2694: v_err_code NUMBER;
2695: v_err_stack VARCHAR2(200);

Line 2776: FROM per_org_structure_elements a

2772:
2773: CURSOR all_parents (max_level number) IS
2774: SELECT distinct organization_id_parent
2775: ,(max_level - level + 1) rev_level
2776: FROM per_org_structure_elements a
2777: WHERE a.org_structure_version_id = p_org_version_id
2778: CONNECT BY PRIOR a.organization_id_child = a.organization_id_parent
2779: AND a.org_structure_version_id = p_org_version_id
2780: START WITH a.organization_id_parent = p_organization_id_parent

Line 2820: FROM per_org_structure_elements a

2816: */
2817:
2818: SELECT MAX(level+1)
2819: INTO v_max_level
2820: FROM per_org_structure_elements a
2821: WHERE a.org_structure_version_id = p_org_version_id
2822: CONNECT BY PRIOR a.organization_id_child = a.organization_id_parent
2823: AND a.org_structure_version_id = p_org_version_id
2824: START WITH a.organization_id_parent = p_organization_id_parent

Line 2869: FROM per_org_structure_elements a

2865: , nvl(TO_NUMBER(FND_PROFILE.VALUE('LOGIN_ID')),1)
2866: , c1rec.rev_level
2867: , c1rec.rev_level - level
2868: , p_org_id
2869: FROM per_org_structure_elements a
2870: WHERE a.org_structure_version_id = p_org_version_id
2871: CONNECT BY PRIOR a.organization_id_child = a.organization_id_parent
2872: AND a.org_structure_version_id = p_org_version_id
2873: START WITH a.organization_id_parent = c1rec.organization_id_parent

Line 2965: when a new organization is added in the hierarchy. That is added in per_org_structure_elements table.

2961:
2962: END POPULATE_HIERARCHY_DENORM2;
2963:
2964: /* Bug#2643047 - This procedure is added so as to populate organizations for REPORTING pa_org_use_type
2965: when a new organization is added in the hierarchy. That is added in per_org_structure_elements table.
2966: The call to this procedure will be made from maintain_org_hist_bri
2967: The newly added organization is x_organiation_id_child which is added under x_organization_id_parent*/
2968:
2969: Procedure populate_reporting_orgs(

Line 3185: per_org_structure_elements. */

3181:
3182: end restructure_rpt_orgs_denorm;
3183:
3184: /* Bug 3649799 - This procedure will be called by statement level trigger for update on
3185: per_org_structure_elements. */
3186:
3187: procedure maintain_org_hist_update(x_err_code in out NOCOPY number, --File.Sql.39 bug 4440895
3188: x_err_stage in out NOCOPY varchar2, --File.Sql.39 bug 4440895
3189: x_err_stack in out NOCOPY varchar2) is --File.Sql.39 bug 4440895

Line 3195: l_org_struct_ver_id IN per_org_structure_elements.org_structure_version_id%TYPE,

3191:
3192: /* This cursor is to get all the parents for the organization l_start_org_id in hierarchy l_org_struct_ver_id */
3193:
3194: CURSOR all_parents (max_level number,
3195: l_org_struct_ver_id IN per_org_structure_elements.org_structure_version_id%TYPE,
3196: l_start_org_id IN per_org_structure_elements.organization_id_child%TYPE) IS
3197: SELECT distinct organization_id_parent
3198: ,(max_level - level + 1) rev_level
3199: FROM per_org_structure_elements a

Line 3196: l_start_org_id IN per_org_structure_elements.organization_id_child%TYPE) IS

3192: /* This cursor is to get all the parents for the organization l_start_org_id in hierarchy l_org_struct_ver_id */
3193:
3194: CURSOR all_parents (max_level number,
3195: l_org_struct_ver_id IN per_org_structure_elements.org_structure_version_id%TYPE,
3196: l_start_org_id IN per_org_structure_elements.organization_id_child%TYPE) IS
3197: SELECT distinct organization_id_parent
3198: ,(max_level - level + 1) rev_level
3199: FROM per_org_structure_elements a
3200: WHERE a.org_structure_version_id = l_org_struct_ver_id

Line 3199: FROM per_org_structure_elements a

3195: l_org_struct_ver_id IN per_org_structure_elements.org_structure_version_id%TYPE,
3196: l_start_org_id IN per_org_structure_elements.organization_id_child%TYPE) IS
3197: SELECT distinct organization_id_parent
3198: ,(max_level - level + 1) rev_level
3199: FROM per_org_structure_elements a
3200: WHERE a.org_structure_version_id = l_org_struct_ver_id
3201: CONNECT BY PRIOR a.organization_id_child = a.organization_id_parent
3202: AND a.org_structure_version_id = l_org_struct_ver_id
3203: START WITH a.organization_id_parent = l_start_org_id

Line 3208: CURSOR proj_exp_check(c_org_struct_version_id IN per_org_structure_elements.org_structure_version_id%TYPE)

3204: AND a.org_structure_version_id = l_org_struct_ver_id
3205: ORDER by rev_level desc;
3206:
3207: /* Added this cursor for bug 4218163 */
3208: CURSOR proj_exp_check(c_org_struct_version_id IN per_org_structure_elements.org_structure_version_id%TYPE)
3209: IS
3210: SELECT 'Y' FROM pa_implementations_all
3211: WHERE proj_org_structure_version_id = c_org_struct_version_id
3212: OR exp_org_structure_version_id = c_org_struct_version_id;

Line 3214: l_version_id per_org_structure_elements.org_structure_version_id%TYPE;

3210: SELECT 'Y' FROM pa_implementations_all
3211: WHERE proj_org_structure_version_id = c_org_struct_version_id
3212: OR exp_org_structure_version_id = c_org_struct_version_id;
3213:
3214: l_version_id per_org_structure_elements.org_structure_version_id%TYPE;
3215: l_new_parent_org_id per_org_structure_elements.organization_id_parent%TYPE;
3216: l_new_child_org_id per_org_structure_elements.organization_id_child%TYPE;
3217: v_max_level number;
3218: l_imp_proj_exp VARCHAR2(1);

Line 3215: l_new_parent_org_id per_org_structure_elements.organization_id_parent%TYPE;

3211: WHERE proj_org_structure_version_id = c_org_struct_version_id
3212: OR exp_org_structure_version_id = c_org_struct_version_id;
3213:
3214: l_version_id per_org_structure_elements.org_structure_version_id%TYPE;
3215: l_new_parent_org_id per_org_structure_elements.organization_id_parent%TYPE;
3216: l_new_child_org_id per_org_structure_elements.organization_id_child%TYPE;
3217: v_max_level number;
3218: l_imp_proj_exp VARCHAR2(1);
3219:

Line 3216: l_new_child_org_id per_org_structure_elements.organization_id_child%TYPE;

3212: OR exp_org_structure_version_id = c_org_struct_version_id;
3213:
3214: l_version_id per_org_structure_elements.org_structure_version_id%TYPE;
3215: l_new_parent_org_id per_org_structure_elements.organization_id_parent%TYPE;
3216: l_new_child_org_id per_org_structure_elements.organization_id_child%TYPE;
3217: v_max_level number;
3218: l_imp_proj_exp VARCHAR2(1);
3219:
3220: -- Added for bug#5952671

Line 3222: cursor pa_org_hier_rec (l_org_id_parent per_org_structure_elements.organization_id_parent%TYPE,

3218: l_imp_proj_exp VARCHAR2(1);
3219:
3220: -- Added for bug#5952671
3221:
3222: cursor pa_org_hier_rec (l_org_id_parent per_org_structure_elements.organization_id_parent%TYPE,
3223: l_level number,
3224: l_version_id per_org_structure_elements.org_structure_version_id%TYPE) IS
3225: SELECT organization_id_child
3226: , l_level - level

Line 3224: l_version_id per_org_structure_elements.org_structure_version_id%TYPE) IS

3220: -- Added for bug#5952671
3221:
3222: cursor pa_org_hier_rec (l_org_id_parent per_org_structure_elements.organization_id_parent%TYPE,
3223: l_level number,
3224: l_version_id per_org_structure_elements.org_structure_version_id%TYPE) IS
3225: SELECT organization_id_child
3226: , l_level - level
3227: FROM per_org_structure_elements a
3228: WHERE a.org_structure_version_id = l_version_id

Line 3227: FROM per_org_structure_elements a

3223: l_level number,
3224: l_version_id per_org_structure_elements.org_structure_version_id%TYPE) IS
3225: SELECT organization_id_child
3226: , l_level - level
3227: FROM per_org_structure_elements a
3228: WHERE a.org_structure_version_id = l_version_id
3229: CONNECT BY PRIOR a.organization_id_child = a.organization_id_parent
3230: AND a.org_structure_version_id = l_version_id
3231: START WITH a.organization_id_parent = l_org_id_parent

Line 3234: cursor pa_org_hier_sec_rec (l_version_id per_org_structure_elements.org_structure_version_id%TYPE,

3230: AND a.org_structure_version_id = l_version_id
3231: START WITH a.organization_id_parent = l_org_id_parent
3232: AND a.org_structure_version_id = l_version_id;
3233:
3234: cursor pa_org_hier_sec_rec (l_version_id per_org_structure_elements.org_structure_version_id%TYPE,
3235: l_start_org_id IN per_org_structure_elements.organization_id_child%TYPE,
3236: l_org_id pa_implementations_all.org_id%type) IS
3237: SELECT child_organization_id
3238: , child_level

Line 3235: l_start_org_id IN per_org_structure_elements.organization_id_child%TYPE,

3231: START WITH a.organization_id_parent = l_org_id_parent
3232: AND a.org_structure_version_id = l_version_id;
3233:
3234: cursor pa_org_hier_sec_rec (l_version_id per_org_structure_elements.org_structure_version_id%TYPE,
3235: l_start_org_id IN per_org_structure_elements.organization_id_child%TYPE,
3236: l_org_id pa_implementations_all.org_id%type) IS
3237: SELECT child_organization_id
3238: , child_level
3239: FROM pa_org_hierarchy_denorm

Line 3261: per_org_structure_elements.org_structure_version_id%TYPE index by binary_integer;

3257: -- End for bug#5952671
3258:
3259: --Start 5934849
3260: TYPE l_str_version_id_tbltype IS TABLE OF
3261: per_org_structure_elements.org_structure_version_id%TYPE index by binary_integer;
3262:
3263: L_STR_VERSION_ID_TMP l_str_version_id_tbltype;
3264: L_STR_VERSION_ID l_str_version_id_tbltype;
3265: l_str_exists varchar2(1) :='N';

Line 3275: from per_org_structure_elements

3271: --for the rowids in newRows tab
3272: FOR k in pa_org_utils.newRows.first..pa_org_utils.newRows.last Loop
3273: select distinct org_structure_version_id
3274: into L_STR_VERSION_ID_TMP(L_STR_VERSION_ID_TMP.count+1)
3275: from per_org_structure_elements
3276: where
3277: ROWID = pa_org_utils.newRows(k);
3278: End loop;
3279:

Line 3309: FROM per_org_structure_elements

3305: /* Fetching the Organization Hierarchy version id, the new parent organization id and child organization id
3306:
3307: SELECT org_structure_version_id, organization_id_parent, organization_id_child
3308: INTO l_version_id, l_new_parent_org_id, l_new_child_org_id
3309: FROM per_org_structure_elements
3310: WHERE ROWID = pa_org_utils.newRows(i); */
3311: maintain_pa_all_org( x_org_version_id => l_version_id,
3312: x_err_code => x_err_code,
3313: x_err_stage => x_err_stage,

Line 3377: FROM per_org_structure_elements a

3373: /* End bug#5952671 */
3374:
3375: SELECT MAX(level+1)
3376: INTO v_max_level
3377: FROM per_org_structure_elements a
3378: WHERE a.org_structure_version_id = l_version_id
3379: CONNECT BY PRIOR a.organization_id_child = a.organization_id_parent
3380: AND a.org_structure_version_id = l_version_id
3381: START WITH a.organization_id_parent = imp_rec.start_organization_id

Line 3551: FROM per_org_structure_elements a

3547: , nvl(TO_NUMBER(FND_PROFILE.VALUE('LOGIN_ID')),1)
3548: , c1rec.rev_level
3549: , c1rec.rev_level - level
3550: , imp_rec.org_id
3551: FROM per_org_structure_elements a
3552: WHERE a.org_structure_version_id = l_version_id
3553: CONNECT BY PRIOR a.organization_id_child = a.organization_id_parent
3554: AND a.org_structure_version_id = l_version_id
3555: START WITH a.organization_id_parent = c1rec.organization_id_parent

Line 3625: l_parent_org_id per_org_structure_elements.organization_id_parent%TYPE;

3621: x_err_stack in out NOCOPY varchar2) is --File.Sql.39 bug 4440895
3622: l_imp_proj_exp VARCHAR2(1);
3623: l_exist_recs VARCHAR2(1);
3624: class_org_true varchar2(3);
3625: l_parent_org_id per_org_structure_elements.organization_id_parent%TYPE;
3626: l_child_org_id per_org_structure_elements.organization_id_parent%TYPE;
3627:
3628: TYPE num2_tbl_type IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
3629: l_child_org_id2_var num2_tbl_type;

Line 3626: l_child_org_id per_org_structure_elements.organization_id_parent%TYPE;

3622: l_imp_proj_exp VARCHAR2(1);
3623: l_exist_recs VARCHAR2(1);
3624: class_org_true varchar2(3);
3625: l_parent_org_id per_org_structure_elements.organization_id_parent%TYPE;
3626: l_child_org_id per_org_structure_elements.organization_id_parent%TYPE;
3627:
3628: TYPE num2_tbl_type IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
3629: l_child_org_id2_var num2_tbl_type;
3630:

Line 3638: CURSOR c_get_new_org ( c_org_struct_ver_id IN per_org_structure_elements.org_structure_version_id%TYPE,

3634: WHERE decode(p_org_use_type, 'PROJECTS', proj_org_structure_version_id,
3635: 'EXPENDITURES', exp_org_structure_version_id) = c_version_id;
3636:
3637:
3638: CURSOR c_get_new_org ( c_org_struct_ver_id IN per_org_structure_elements.org_structure_version_id%TYPE,
3639: c_start_org_id IN per_org_structure_elements.organization_id_child%TYPE)
3640: IS
3641: SELECT c_start_org_id FROM dual
3642: UNION ALL

Line 3639: c_start_org_id IN per_org_structure_elements.organization_id_child%TYPE)

3635: 'EXPENDITURES', exp_org_structure_version_id) = c_version_id;
3636:
3637:
3638: CURSOR c_get_new_org ( c_org_struct_ver_id IN per_org_structure_elements.org_structure_version_id%TYPE,
3639: c_start_org_id IN per_org_structure_elements.organization_id_child%TYPE)
3640: IS
3641: SELECT c_start_org_id FROM dual
3642: UNION ALL
3643: SELECT organization_id_child

Line 3644: FROM per_org_structure_elements

3640: IS
3641: SELECT c_start_org_id FROM dual
3642: UNION ALL
3643: SELECT organization_id_child
3644: FROM per_org_structure_elements
3645: WHERE org_structure_version_id = c_org_struct_ver_id
3646: CONNECT BY PRIOR organization_id_child = organization_id_parent
3647: AND org_structure_version_id = c_org_struct_ver_id
3648: START WITH organization_id_parent = c_start_org_id

Line 3651: CURSOR c_get_sub_orgs (c_org_struct_ver_id IN per_org_structure_elements.org_structure_version_id%TYPE,

3647: AND org_structure_version_id = c_org_struct_ver_id
3648: START WITH organization_id_parent = c_start_org_id
3649: AND org_structure_version_id = c_org_struct_ver_id;
3650:
3651: CURSOR c_get_sub_orgs (c_org_struct_ver_id IN per_org_structure_elements.org_structure_version_id%TYPE,
3652: c_org_id IN per_org_structure_elements.organization_id_child%TYPE) IS
3653: SELECT c_org_id
3654: FROM dual
3655: UNION ALL

Line 3652: c_org_id IN per_org_structure_elements.organization_id_child%TYPE) IS

3648: START WITH organization_id_parent = c_start_org_id
3649: AND org_structure_version_id = c_org_struct_ver_id;
3650:
3651: CURSOR c_get_sub_orgs (c_org_struct_ver_id IN per_org_structure_elements.org_structure_version_id%TYPE,
3652: c_org_id IN per_org_structure_elements.organization_id_child%TYPE) IS
3653: SELECT c_org_id
3654: FROM dual
3655: UNION ALL
3656: SELECT organization_id_child

Line 3657: FROM per_org_structure_elements

3653: SELECT c_org_id
3654: FROM dual
3655: UNION ALL
3656: SELECT organization_id_child
3657: FROM per_org_structure_elements
3658: WHERE org_structure_version_id = c_org_struct_ver_id
3659: CONNECT BY PRIOR organization_id_child = organization_id_parent
3660: AND org_structure_version_id = c_org_struct_ver_id
3661: START WITH organization_id_parent = c_org_id

Line 3806: per_org_structure_elements

3802: select organization_id_child child_outer,
3803: organization_id_parent parent_outer,
3804: org_structure_version_id
3805: from
3806: per_org_structure_elements
3807: where org_structure_version_id = p_version_id
3808: CONNECT BY PRIOR organization_id_child =
3809: organization_id_parent
3810: AND org_structure_version_id = p_version_id

Line 3856: FROM per_org_structure_elements se

3852: v_org_id number;
3853:
3854: CURSOR cur_proj_new_org IS
3855: SELECT se.organization_id_child organization_id
3856: FROM per_org_structure_elements se
3857: WHERE org_structure_version_id = x_org_version_id
3858: AND EXISTS (select 'X'
3859: from hr_organization_information info
3860: where info.organization_id = se.organization_id_child

Line 3880: FROM per_org_structure_elements se

3876: and info.organization_id = v_start_org_id);
3877:
3878: CURSOR cur_exp_new_org IS
3879: SELECT se.organization_id_child organization_id
3880: FROM per_org_structure_elements se
3881: WHERE org_structure_version_id = x_org_version_id
3882: AND EXISTS (select 'X'
3883: from hr_organization_information info
3884: where info.organization_id = se.organization_id_child