DBA Data[Home] [Help]

APPS.PA_ORG_UTILS dependencies on PA_IMPLEMENTATIONS

Line 123: from pa_implementations;

119: select decode(x_usage,'PROJECTS',PROJ_ORG_STRUCTURE_VERSION_ID
120: ,'EXPENDITURES',EXP_ORG_STRUCTURE_VERSION_ID
121: ,'REPORTING',ORG_STRUCTURE_VERSION_ID)
122: into x_org_version_id
123: from pa_implementations;
124: RETURN (x_org_version_id);
125: END;
126:
127: /* 1333116 Added this function to return the org hierarchy version and to

Line 138: from pa_implementations imp,hr_organization_information hr

134: ,'EXPENDITURES',EXP_ORG_STRUCTURE_VERSION_ID
135: ,'REPORTING',ORG_STRUCTURE_VERSION_ID
136: ,'BURDENING',to_number(org_information2))
137: into x_org_version_id
138: from pa_implementations imp,hr_organization_information hr
139: where imp.business_group_id = hr.organization_id
140: and hr.org_information_context = 'Project Burdening Hierarchy';
141: RETURN (x_org_version_id);
142: EXCEPTION when no_data_found then

Line 154: from pa_implementations;

150: select decode(x_usage,'PROJECTS',PROJ_START_ORG_ID
151: ,'EXPENDITURES',EXP_START_ORG_ID
152: ,'REPORTING',START_ORGANIZATION_ID)
153: into x_start_org_id
154: from pa_implementations;
155: RETURN (x_start_org_id);
156: END;
157:
158: /* 1333116 Added this function to return the org hierarchy

Line 169: from pa_implementations;

165: select decode(x_usage,'PROJECTS',PROJ_START_ORG_ID
166: ,'EXPENDITURES',EXP_START_ORG_ID
167: ,'REPORTING',START_ORGANIZATION_ID)
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

Line 173: ,pa_implementations b

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
177: where d.org_structure_version_id = to_number(c.org_information2)

Line 252: l_org_id IN pa_implementations_all.org_id%TYPE

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
256: WHERE ( proj_org_structure_version_id = c_org_struct_version_id

Line 255: SELECT 'Y' FROM pa_implementations_all

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
256: WHERE ( proj_org_structure_version_id = c_org_struct_version_id
257: OR exp_org_structure_version_id = c_org_struct_version_id )
258: and ORG_ID <> l_org_id;
259:

Line 979: from pa_implementations_all imp

975:
976: /* For all operating units where the Project Org structure
977: specified is same as the changed Org structure */
978: for imp_rec in ( select org_id,proj_start_org_id
979: from pa_implementations_all imp
980: where proj_org_structure_version_id = x_org_version_id
981: )
982:
983: loop

Line 1124: from pa_implementations_all imp

1120:
1121: /* For all operating units where the Exp Org structure
1122: specified is same as the changed Org structure */
1123: for imp_rec in ( select org_id, exp_start_org_id
1124: from pa_implementations_all imp
1125: where exp_org_structure_version_id = x_org_version_id
1126: )
1127: loop
1128:

Line 1361: from pa_implementations_all imp

1357: Begin
1358: /* For all operating units where the Project Org structure
1359: specified is same as the changed Org structure */
1360: for imp_rec in ( select org_id,proj_start_org_id
1361: from pa_implementations_all imp
1362: where proj_org_structure_version_id = x_org_version_id
1363: )
1364:
1365: loop

Line 1378: from pa_implementations_all imp

1374:
1375: /* For all operating units where the Exp Org structure
1376: specified is same as the changed Org structure */
1377: for imp_rec in ( select org_id, exp_start_org_id
1378: from pa_implementations_all imp
1379: where exp_org_structure_version_id = x_org_version_id
1380: )
1381: loop
1382: update pa_all_organizations

Line 1504: --- pa_implementations_all. And check that CUrrent Organization

1500:
1501: ----- Means This Organization is being classified as
1502: ---- Projects Task / owning Organization and classification
1503: --- is enabled. Now Loop theough all the records from
1504: --- pa_implementations_all. And check that CUrrent Organization
1505: ---- Being changed is attached to an Organization structure which
1506: ---- is defined in Implementation as Project Structure.
1507: for imp_rec in (select proj_start_org_id, proj_org_structure_version_id,
1508: org_id

Line 1509: from pa_implementations_all )

1505: ---- Being changed is attached to an Organization structure which
1506: ---- is defined in Implementation as Project Structure.
1507: for imp_rec in (select proj_start_org_id, proj_org_structure_version_id,
1508: org_id
1509: from pa_implementations_all )
1510: loop
1511: v_start_org_id := imp_rec.proj_start_org_id;
1512: v_org_structure_version_id := imp_rec.proj_org_structure_version_id;
1513: ---- Check that Current Organization which is getting changed is below

Line 1597: from pa_implementations_all )

1593: end loop;
1594: else
1595: for imp_rec in (select proj_start_org_id, proj_org_structure_version_id,
1596: org_id
1597: from pa_implementations_all )
1598: loop
1599:
1600: update pa_all_organizations
1601: set inactive_date = trunc(sysdate)

Line 1625: --- pa_implementations_all. And check that Current Organization

1621: if x_org_information2 = 'Y' then
1622: ----- Means This Organization is being classified as
1623: ---- Projects Expenditure owing Organization and classification
1624: --- is enabled. Now Loop theough all the records from
1625: --- pa_implementations_all. And check that Current Organization
1626: ---- Being changed is attached to an Organization structure which
1627: ---- is defined in Implementation as Project Structure.
1628: for imp_rec in (select exp_start_org_id, exp_org_structure_version_id,
1629: org_id

Line 1630: from pa_implementations_all )

1626: ---- Being changed is attached to an Organization structure which
1627: ---- is defined in Implementation as Project Structure.
1628: for imp_rec in (select exp_start_org_id, exp_org_structure_version_id,
1629: org_id
1630: from pa_implementations_all )
1631: loop
1632: v_start_org_id := imp_rec.exp_start_org_id;
1633: v_org_structure_version_id := imp_rec.exp_org_structure_version_id;
1634: ---- Check that Current Organization which is getting changed is below

Line 1717: from pa_implementations_all )

1713: end loop;
1714: else
1715: for imp_rec in (select exp_start_org_id, exp_org_structure_version_id,
1716: org_id
1717: from pa_implementations_all )
1718: loop
1719:
1720: update pa_all_organizations
1721: set inactive_date = trunc(sysdate)

Line 2017: org2 org3 -> start org in pa_implementations

2013:
2014: Assume that following is the hierarchy:
2015: org1
2016: / \
2017: org2 org3 -> start org in pa_implementations
2018: / \
2019: org5 org6
2020: |
2021: org7

Line 2025: In this example the start org defined in the pa_implementations is org3.

2021: org7
2022:
2023:
2024:
2025: In this example the start org defined in the pa_implementations is org3.
2026:
2027: For the TP_SCHEDULE purpose the hierarchy is always populated from the start
2028: of the hierarcy rather than the start org mentioned in the pa_implementations.
2029:

Line 2028: of the hierarcy rather than the start org mentioned in the pa_implementations.

2024:
2025: In this example the start org defined in the pa_implementations is org3.
2026:
2027: For the TP_SCHEDULE purpose the hierarchy is always populated from the start
2028: of the hierarcy rather than the start org mentioned in the pa_implementations.
2029:
2030: The aim of this procedure is to populate pa_org_denorm table with following data.
2031:
2032: parent child p_level c_level

Line 2236: ---- may be different from the start_organization_id set up in pa_implementations

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
2240: SELECT distinct organization_id_parent

Line 2237: ---- so always the reporting hierarchy is formed based on pa_implementations

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
2240: SELECT distinct organization_id_parent
2241: FROM per_org_structure_elements

Line 2426: -- check whether the org exist in the given pa implementations ou

2422: START WITH organization_id_parent = start_org_id
2423: and org_structure_version_id = version_id
2424: ORDER by 1;
2425:
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

Line 2462: from pa_implementations_all imp

2458:
2459: --dbms_output.put_line('acquired fclock and aclock');
2460:
2461: for imp_rec in ( select org_id, start_organization_id
2462: from pa_implementations_all imp
2463: where org_structure_version_id = p_org_version_id
2464: )
2465: LOOP
2466: v_start_org_id := imp_rec.start_organization_id;

Line 2690: FROM pa_implementations_all imp,

2686: cursor org_version is
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;

Line 2739: org2 org3 -> start org in pa_implementations

2735:
2736: /* Take following heirarchy for understanding this piece of logic
2737: org1
2738: / \
2739: org2 org3 -> start org in pa_implementations
2740: / / \
2741: org4 org5 org6
2742: | / \
2743: org7 org8 org9

Line 2999: from pa_implementations_all imp

2995:
2996: /* For all operating units where the Org structure
2997: specified is same as the changed Org structure */
2998: for imp_rec in ( select org_id
2999: from pa_implementations_all imp
3000: where org_structure_version_id = x_org_version_id
3001: )
3002: loop
3003:

Line 3026: org2 org3 -> start org in pa_implementations

3022: /*
3023: Take following heirarchy for understanding this piece of logic
3024: org1
3025: / \
3026: org2 org3 -> start org in pa_implementations
3027: / / \
3028: org4 org5 org6
3029: | / \
3030: org7 org8 org9

Line 3151: from pa_implementations_all imp

3147:
3148: /* For all operating units where the Project Org structure
3149: specified is same as the changed Org structure */
3150: for imp_rec in ( select org_id
3151: from pa_implementations_all imp
3152: where org_structure_version_id = x_org_version_id
3153: )
3154: loop
3155:

Line 3210: SELECT 'Y' FROM pa_implementations_all

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;
3213:
3214: l_version_id per_org_structure_elements.org_structure_version_id%TYPE;

Line 3236: l_org_id pa_implementations_all.org_id%type) IS

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
3240: where org_hierarchy_version_id = l_version_id

Line 3245: cursor all_org_id (l_version_id pa_implementations_all.org_structure_version_id%TYPE,

3241: and nvl(org_id, -99) = nvl(l_org_id, -99)
3242: and pa_org_use_type = 'REPORTING'
3243: and parent_organization_id = l_start_org_id;
3244:
3245: cursor all_org_id (l_version_id pa_implementations_all.org_structure_version_id%TYPE,
3246: l_start_org_id IN pa_implementations_all.start_organization_id%TYPE) IS
3247: SELECT org_id FROM pa_implementations_all
3248: WHERE org_structure_version_id = l_version_id
3249: and start_organization_id = l_start_org_id;

Line 3246: l_start_org_id IN pa_implementations_all.start_organization_id%TYPE) IS

3242: and pa_org_use_type = 'REPORTING'
3243: and parent_organization_id = l_start_org_id;
3244:
3245: cursor all_org_id (l_version_id pa_implementations_all.org_structure_version_id%TYPE,
3246: l_start_org_id IN pa_implementations_all.start_organization_id%TYPE) IS
3247: SELECT org_id FROM pa_implementations_all
3248: WHERE org_structure_version_id = l_version_id
3249: and start_organization_id = l_start_org_id;
3250:

Line 3247: SELECT org_id FROM pa_implementations_all

3243: and parent_organization_id = l_start_org_id;
3244:
3245: cursor all_org_id (l_version_id pa_implementations_all.org_structure_version_id%TYPE,
3246: l_start_org_id IN pa_implementations_all.start_organization_id%TYPE) IS
3247: SELECT org_id FROM pa_implementations_all
3248: WHERE org_structure_version_id = l_version_id
3249: and start_organization_id = l_start_org_id;
3250:
3251: l_child_organization_id_tbl SYSTEM.PA_NUM_TBL_TYPE := SYSTEM.PA_NUM_TBL_TYPE();

Line 3255: l_tmp_org_id pa_implementations_all.org_id%type;

3251: l_child_organization_id_tbl SYSTEM.PA_NUM_TBL_TYPE := SYSTEM.PA_NUM_TBL_TYPE();
3252: l_child_level_tbl SYSTEM.PA_NUM_TBL_TYPE := SYSTEM.PA_NUM_TBL_TYPE();
3253: l_org_id_tbl SYSTEM.PA_NUM_TBL_TYPE := SYSTEM.PA_NUM_TBL_TYPE();
3254:
3255: l_tmp_org_id pa_implementations_all.org_id%type;
3256: l_plsql_max_array_size CONSTANT NUMBER := 1000;
3257: -- End for bug#5952671
3258:
3259: --Start 5934849

Line 3349: pa_implementations_all

3345: The code is similar to the populate_hierarchy_denorm2 procedure added in 115.25 version of this file */
3346:
3347: /* Commented and added for bug#5952671
3348: FOR imp_rec IN (SELECT org_id, start_organization_id FROM
3349: pa_implementations_all
3350: WHERE org_structure_version_id = l_version_id) */
3351: FOR imp_rec IN (SELECT distinct start_organization_id FROM
3352: pa_implementations_all
3353: WHERE org_structure_version_id = l_version_id)

Line 3352: pa_implementations_all

3348: FOR imp_rec IN (SELECT org_id, start_organization_id FROM
3349: pa_implementations_all
3350: WHERE org_structure_version_id = l_version_id) */
3351: FOR imp_rec IN (SELECT distinct start_organization_id FROM
3352: pa_implementations_all
3353: WHERE org_structure_version_id = l_version_id)
3354: LOOP
3355: /* Commented for bug#5952671
3356: DELETE from pa_org_hierarchy_denorm

Line 3400: pa_implementations_all

3396: LIMIT l_plsql_max_array_size;
3397:
3398: IF nvl(l_child_organization_id_tbl.last,0) > 0 THEN
3399: FOR imp1_rec IN (SELECT org_id FROM
3400: pa_implementations_all
3401: WHERE org_structure_version_id = l_version_id and start_organization_id = imp_rec.start_organization_id)
3402: LOOP
3403: forall i in l_child_organization_id_tbl.first..l_child_organization_id_tbl.last
3404: INSERT INTO pa_org_hierarchy_denorm

Line 3452: pa_implementations_all

3448: LIMIT l_plsql_max_array_size;
3449:
3450: IF nvl(l_child_organization_id_tbl.last,0) > 0 THEN
3451: FOR imp1_rec IN (SELECT org_id FROM
3452: pa_implementations_all
3453: WHERE org_structure_version_id = l_version_id and start_organization_id = imp_rec.start_organization_id)
3454: LOOP
3455: FORALL i in l_child_organization_id_tbl.first..l_child_organization_id_tbl.last
3456: INSERT INTO pa_org_hierarchy_denorm

Line 3490: pa_implementations_all

3486: EXIT WHEN nvl(l_child_organization_id_tbl.last,0) < l_plsql_max_array_size;
3487: END LOOP;
3488: CLOSE pa_org_hier_sec_rec;
3489: FOR imp1_rec IN (SELECT org_id FROM
3490: pa_implementations_all
3491: WHERE org_structure_version_id = l_version_id AND start_organization_id = imp_rec.start_organization_id)
3492: LOOP
3493: INSERT INTO pa_org_hierarchy_denorm
3494: ( parent_organization_id

Line 3633: FROM pa_implementations_all imp

3629: l_child_org_id2_var num2_tbl_type;
3630:
3631: Cursor start_orgs (c_version_id in number) IS
3632: SELECT decode(p_org_use_type, 'PROJECTS', proj_start_org_id, 'EXPENDITURES', exp_start_org_id) start_organization_id
3633: FROM pa_implementations_all imp
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:

Line 3669: FROM pa_implementations_all

3665:
3666: BEGIN
3667:
3668: SELECT 'Y' INTO l_imp_proj_exp
3669: FROM pa_implementations_all
3670: WHERE decode(p_org_use_type, 'PROJECTS', proj_org_structure_version_id,
3671: 'EXPENDITURES', exp_org_structure_version_id) = p_version_id
3672: AND ROWNUM = 1;
3673:

Line 3907: from pa_implementations_all imp

3903: Begin
3904:
3905:
3906: for imp_rec in ( select org_id,proj_start_org_id
3907: from pa_implementations_all imp
3908: where proj_org_structure_version_id = x_org_version_id
3909: )
3910:
3911: loop

Line 3954: from pa_implementations_all imp

3950:
3951: END LOOP;
3952:
3953: for imp_rec in ( select org_id, exp_start_org_id
3954: from pa_implementations_all imp
3955: where exp_org_structure_version_id = x_org_version_id
3956: )
3957:
3958: loop