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 851: from pa_implementations_all imp

847:
848: /* For all operating units where the Project Org structure
849: specified is same as the changed Org structure */
850: for imp_rec in ( select org_id,proj_start_org_id
851: from pa_implementations_all imp
852: where proj_org_structure_version_id = x_org_version_id
853: )
854:
855: loop

Line 962: from pa_implementations_all imp

958:
959: /* For all operating units where the Exp Org structure
960: specified is same as the changed Org structure */
961: for imp_rec in ( select org_id, exp_start_org_id
962: from pa_implementations_all imp
963: where exp_org_structure_version_id = x_org_version_id
964: )
965: loop
966:

Line 1155: from pa_implementations_all imp

1151: Begin
1152: /* For all operating units where the Project Org structure
1153: specified is same as the changed Org structure */
1154: for imp_rec in ( select org_id,proj_start_org_id
1155: from pa_implementations_all imp
1156: where proj_org_structure_version_id = x_org_version_id
1157: )
1158:
1159: loop

Line 1172: from pa_implementations_all imp

1168:
1169: /* For all operating units where the Exp Org structure
1170: specified is same as the changed Org structure */
1171: for imp_rec in ( select org_id, exp_start_org_id
1172: from pa_implementations_all imp
1173: where exp_org_structure_version_id = x_org_version_id
1174: )
1175: loop
1176: update pa_all_organizations

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

1294:
1295: ----- Means This Organization is being classified as
1296: ---- Projects Task / owning Organization and classification
1297: --- is enabled. Now Loop theough all the records from
1298: --- pa_implementations_all. And check that CUrrent Organization
1299: ---- Being changed is attached to an Organization structure which
1300: ---- is defined in Implementation as Project Structure.
1301: for imp_rec in (select proj_start_org_id, proj_org_structure_version_id,
1302: org_id

Line 1303: from pa_implementations_all )

1299: ---- Being changed is attached to an Organization structure which
1300: ---- is defined in Implementation as Project Structure.
1301: for imp_rec in (select proj_start_org_id, proj_org_structure_version_id,
1302: org_id
1303: from pa_implementations_all )
1304: loop
1305: v_start_org_id := imp_rec.proj_start_org_id;
1306: v_org_structure_version_id := imp_rec.proj_org_structure_version_id;
1307: ---- Check that Current Organization which is getting changed is below

Line 1391: from pa_implementations_all )

1387: end loop;
1388: else
1389: for imp_rec in (select proj_start_org_id, proj_org_structure_version_id,
1390: org_id
1391: from pa_implementations_all )
1392: loop
1393:
1394: update pa_all_organizations
1395: set inactive_date = trunc(sysdate)

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

1415: if x_org_information2 = 'Y' then
1416: ----- Means This Organization is being classified as
1417: ---- Projects Expenditure owing Organization and classification
1418: --- is enabled. Now Loop theough all the records from
1419: --- pa_implementations_all. And check that Current Organization
1420: ---- Being changed is attached to an Organization structure which
1421: ---- is defined in Implementation as Project Structure.
1422: for imp_rec in (select exp_start_org_id, exp_org_structure_version_id,
1423: org_id

Line 1424: from pa_implementations_all )

1420: ---- Being changed is attached to an Organization structure which
1421: ---- is defined in Implementation as Project Structure.
1422: for imp_rec in (select exp_start_org_id, exp_org_structure_version_id,
1423: org_id
1424: from pa_implementations_all )
1425: loop
1426: v_start_org_id := imp_rec.exp_start_org_id;
1427: v_org_structure_version_id := imp_rec.exp_org_structure_version_id;
1428: ---- Check that Current Organization which is getting changed is below

Line 1511: from pa_implementations_all )

1507: end loop;
1508: else
1509: for imp_rec in (select exp_start_org_id, exp_org_structure_version_id,
1510: org_id
1511: from pa_implementations_all )
1512: loop
1513:
1514: update pa_all_organizations
1515: set inactive_date = trunc(sysdate)

Line 1810: org2 org3 -> start org in pa_implementations

1806:
1807: Assume that following is the hierarchy:
1808: org1
1809: / \
1810: org2 org3 -> start org in pa_implementations
1811: / \
1812: org5 org6
1813: |
1814: org7

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

1814: org7
1815:
1816:
1817:
1818: In this example the start org defined in the pa_implementations is org3.
1819:
1820: For the TP_SCHEDULE purpose the hierarchy is always populated from the start
1821: of the hierarcy rather than the start org mentioned in the pa_implementations.
1822:

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

1817:
1818: In this example the start org defined in the pa_implementations is org3.
1819:
1820: For the TP_SCHEDULE purpose the hierarchy is always populated from the start
1821: of the hierarcy rather than the start org mentioned in the pa_implementations.
1822:
1823: The aim of this procedure is to populate pa_org_denorm table with following data.
1824:
1825: parent child p_level c_level

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

2025: START WITH organization_id_child = P_organization_id_parent
2026: AND org_structure_version_id = P_org_version_id
2027: /* ---- The following query is added to fix the bug : 1654453 ---
2028: ---- since the start organization id defined in per_org_structure_elements
2029: ---- may be different from the start_organization_id set up in pa_implementations
2030: ---- so always the reporting hierarchy is formed based on pa_implementations
2031: ---- start_organization_id */
2032: MINUS
2033: SELECT distinct organization_id_parent

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

2026: AND org_structure_version_id = P_org_version_id
2027: /* ---- The following query is added to fix the bug : 1654453 ---
2028: ---- since the start organization id defined in per_org_structure_elements
2029: ---- may be different from the start_organization_id set up in pa_implementations
2030: ---- so always the reporting hierarchy is formed based on pa_implementations
2031: ---- start_organization_id */
2032: MINUS
2033: SELECT distinct organization_id_parent
2034: FROM per_org_structure_elements

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

2215: START WITH organization_id_parent = start_org_id
2216: and org_structure_version_id = version_id
2217: ORDER by 1;
2218:
2219: -- check whether the org exist in the given pa implementations ou
2220: -- and falls within the start org
2221: cursor check_org_exists(version_id NUMBER,start_org_id NUMBER) is
2222: (SELECT organization_id_child
2223: FROM per_org_structure_elements

Line 2255: from pa_implementations_all imp

2251:
2252: --dbms_output.put_line('acquired fclock and aclock');
2253:
2254: for imp_rec in ( select org_id, start_organization_id
2255: from pa_implementations_all imp
2256: where org_structure_version_id = p_org_version_id
2257: )
2258: LOOP
2259: v_start_org_id := imp_rec.start_organization_id;

Line 2483: FROM pa_implementations_all imp,

2479: cursor org_version is
2480: SELECT distinct
2481: imp.org_structure_version_id version_id
2482: ,imp.start_organization_id start_org_id
2483: FROM pa_implementations_all imp,
2484: per_org_structure_elements posg
2485: WHERE posg.org_structure_version_id = imp.org_structure_version_id;
2486:
2487: v_err_code NUMBER;

Line 2532: org2 org3 -> start org in pa_implementations

2528:
2529: /* Take following heirarchy for understanding this piece of logic
2530: org1
2531: / \
2532: org2 org3 -> start org in pa_implementations
2533: / / \
2534: org4 org5 org6
2535: | / \
2536: org7 org8 org9

Line 2792: from pa_implementations_all imp

2788:
2789: /* For all operating units where the Org structure
2790: specified is same as the changed Org structure */
2791: for imp_rec in ( select org_id
2792: from pa_implementations_all imp
2793: where org_structure_version_id = x_org_version_id
2794: )
2795: loop
2796:

Line 2819: org2 org3 -> start org in pa_implementations

2815: /*
2816: Take following heirarchy for understanding this piece of logic
2817: org1
2818: / \
2819: org2 org3 -> start org in pa_implementations
2820: / / \
2821: org4 org5 org6
2822: | / \
2823: org7 org8 org9

Line 2944: from pa_implementations_all imp

2940:
2941: /* For all operating units where the Project Org structure
2942: specified is same as the changed Org structure */
2943: for imp_rec in ( select org_id
2944: from pa_implementations_all imp
2945: where org_structure_version_id = x_org_version_id
2946: )
2947: loop
2948:

Line 3003: SELECT 'Y' FROM pa_implementations_all

2999:
3000: /* Added this cursor for bug 4218163 */
3001: CURSOR proj_exp_check(c_org_struct_version_id IN per_org_structure_elements.org_structure_version_id%TYPE)
3002: IS
3003: SELECT 'Y' FROM pa_implementations_all
3004: WHERE proj_org_structure_version_id = c_org_struct_version_id
3005: OR exp_org_structure_version_id = c_org_struct_version_id;
3006:
3007: l_version_id per_org_structure_elements.org_structure_version_id%TYPE;

Line 3029: l_org_id pa_implementations_all.org_id%type) IS

3025: AND a.org_structure_version_id = l_version_id;
3026:
3027: cursor pa_org_hier_sec_rec (l_version_id per_org_structure_elements.org_structure_version_id%TYPE,
3028: l_start_org_id IN per_org_structure_elements.organization_id_child%TYPE,
3029: l_org_id pa_implementations_all.org_id%type) IS
3030: SELECT child_organization_id
3031: , child_level
3032: FROM pa_org_hierarchy_denorm
3033: where org_hierarchy_version_id = l_version_id

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

3034: and nvl(org_id, -99) = nvl(l_org_id, -99)
3035: and pa_org_use_type = 'REPORTING'
3036: and parent_organization_id = l_start_org_id;
3037:
3038: cursor all_org_id (l_version_id pa_implementations_all.org_structure_version_id%TYPE,
3039: l_start_org_id IN pa_implementations_all.start_organization_id%TYPE) IS
3040: SELECT org_id FROM pa_implementations_all
3041: WHERE org_structure_version_id = l_version_id
3042: and start_organization_id = l_start_org_id;

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

3035: and pa_org_use_type = 'REPORTING'
3036: and parent_organization_id = l_start_org_id;
3037:
3038: cursor all_org_id (l_version_id pa_implementations_all.org_structure_version_id%TYPE,
3039: l_start_org_id IN pa_implementations_all.start_organization_id%TYPE) IS
3040: SELECT org_id FROM pa_implementations_all
3041: WHERE org_structure_version_id = l_version_id
3042: and start_organization_id = l_start_org_id;
3043:

Line 3040: SELECT org_id FROM pa_implementations_all

3036: and parent_organization_id = l_start_org_id;
3037:
3038: cursor all_org_id (l_version_id pa_implementations_all.org_structure_version_id%TYPE,
3039: l_start_org_id IN pa_implementations_all.start_organization_id%TYPE) IS
3040: SELECT org_id FROM pa_implementations_all
3041: WHERE org_structure_version_id = l_version_id
3042: and start_organization_id = l_start_org_id;
3043:
3044: l_child_organization_id_tbl SYSTEM.PA_NUM_TBL_TYPE := SYSTEM.PA_NUM_TBL_TYPE();

Line 3048: l_tmp_org_id pa_implementations_all.org_id%type;

3044: l_child_organization_id_tbl SYSTEM.PA_NUM_TBL_TYPE := SYSTEM.PA_NUM_TBL_TYPE();
3045: l_child_level_tbl SYSTEM.PA_NUM_TBL_TYPE := SYSTEM.PA_NUM_TBL_TYPE();
3046: l_org_id_tbl SYSTEM.PA_NUM_TBL_TYPE := SYSTEM.PA_NUM_TBL_TYPE();
3047:
3048: l_tmp_org_id pa_implementations_all.org_id%type;
3049: l_plsql_max_array_size CONSTANT NUMBER := 1000;
3050: -- End for bug#5952671
3051:
3052: --Start 5934849

Line 3142: pa_implementations_all

3138: The code is similar to the populate_hierarchy_denorm2 procedure added in 115.25 version of this file */
3139:
3140: /* Commented and added for bug#5952671
3141: FOR imp_rec IN (SELECT org_id, start_organization_id FROM
3142: pa_implementations_all
3143: WHERE org_structure_version_id = l_version_id) */
3144: FOR imp_rec IN (SELECT distinct start_organization_id FROM
3145: pa_implementations_all
3146: WHERE org_structure_version_id = l_version_id)

Line 3145: pa_implementations_all

3141: FOR imp_rec IN (SELECT org_id, start_organization_id FROM
3142: pa_implementations_all
3143: WHERE org_structure_version_id = l_version_id) */
3144: FOR imp_rec IN (SELECT distinct start_organization_id FROM
3145: pa_implementations_all
3146: WHERE org_structure_version_id = l_version_id)
3147: LOOP
3148: /* Commented for bug#5952671
3149: DELETE from pa_org_hierarchy_denorm

Line 3193: pa_implementations_all

3189: LIMIT l_plsql_max_array_size;
3190:
3191: IF nvl(l_child_organization_id_tbl.last,0) > 0 THEN
3192: FOR imp1_rec IN (SELECT org_id FROM
3193: pa_implementations_all
3194: WHERE org_structure_version_id = l_version_id and start_organization_id = imp_rec.start_organization_id)
3195: LOOP
3196: forall i in l_child_organization_id_tbl.first..l_child_organization_id_tbl.last
3197: INSERT INTO pa_org_hierarchy_denorm

Line 3245: pa_implementations_all

3241: LIMIT l_plsql_max_array_size;
3242:
3243: IF nvl(l_child_organization_id_tbl.last,0) > 0 THEN
3244: FOR imp1_rec IN (SELECT org_id FROM
3245: pa_implementations_all
3246: WHERE org_structure_version_id = l_version_id and start_organization_id = imp_rec.start_organization_id)
3247: LOOP
3248: FORALL i in l_child_organization_id_tbl.first..l_child_organization_id_tbl.last
3249: INSERT INTO pa_org_hierarchy_denorm

Line 3283: pa_implementations_all

3279: EXIT WHEN nvl(l_child_organization_id_tbl.last,0) < l_plsql_max_array_size;
3280: END LOOP;
3281: CLOSE pa_org_hier_sec_rec;
3282: FOR imp1_rec IN (SELECT org_id FROM
3283: pa_implementations_all
3284: WHERE org_structure_version_id = l_version_id AND start_organization_id = imp_rec.start_organization_id)
3285: LOOP
3286: INSERT INTO pa_org_hierarchy_denorm
3287: ( parent_organization_id

Line 3423: FROM pa_implementations_all imp

3419: l_child_org_id per_org_structure_elements.organization_id_parent%TYPE;
3420:
3421: Cursor start_orgs (c_version_id in number) IS
3422: SELECT decode(p_org_use_type, 'PROJECTS', proj_start_org_id, 'EXPENDITURES', exp_start_org_id) start_organization_id
3423: FROM pa_implementations_all imp
3424: WHERE decode(p_org_use_type, 'PROJECTS', proj_org_structure_version_id,
3425: 'EXPENDITURES', exp_org_structure_version_id) = c_version_id;
3426:
3427:

Line 3459: FROM pa_implementations_all

3455:
3456: BEGIN
3457:
3458: SELECT 'Y' INTO l_imp_proj_exp
3459: FROM pa_implementations_all
3460: WHERE decode(p_org_use_type, 'PROJECTS', proj_org_structure_version_id,
3461: 'EXPENDITURES', exp_org_structure_version_id) = p_version_id
3462: AND ROWNUM = 1;
3463:

Line 3591: from pa_implementations_all imp

3587: Begin
3588:
3589:
3590: for imp_rec in ( select org_id,proj_start_org_id
3591: from pa_implementations_all imp
3592: where proj_org_structure_version_id = x_org_version_id
3593: )
3594:
3595: loop

Line 3638: from pa_implementations_all imp

3634:
3635: END LOOP;
3636:
3637: for imp_rec in ( select org_id, exp_start_org_id
3638: from pa_implementations_all imp
3639: where exp_org_structure_version_id = x_org_version_id
3640: )
3641:
3642: loop