[Home] [Help]
108: l_error_message_code VARCHAR2(250);
109:
110: l_rowid VARCHAR2(255);
111: l_proj_element_id PA_PROJ_ELEMENTS.PROJ_ELEMENT_ID%TYPE;
112: l_structure_type_id PA_STRUCTURE_TYPES.STRUCTURE_TYPE_ID%TYPE;
113: l_proj_structure_type_id PA_PROJ_STRUCTURE_TYPES.PROJ_STRUCTURE_TYPE_ID%TYPE;
114: l_structure_type PA_STRUCTURE_TYPES.STRUCTURE_TYPE_CLASS_CODE%TYPE;
115:
116: l_workplan_license VARCHAR2(1);
110: l_rowid VARCHAR2(255);
111: l_proj_element_id PA_PROJ_ELEMENTS.PROJ_ELEMENT_ID%TYPE;
112: l_structure_type_id PA_STRUCTURE_TYPES.STRUCTURE_TYPE_ID%TYPE;
113: l_proj_structure_type_id PA_PROJ_STRUCTURE_TYPES.PROJ_STRUCTURE_TYPE_ID%TYPE;
114: l_structure_type PA_STRUCTURE_TYPES.STRUCTURE_TYPE_CLASS_CODE%TYPE;
115:
116: l_workplan_license VARCHAR2(1);
117: l_financial_license VARCHAR2(1);
118: l_multi_struc_license VARCHAR2(1);
148: cursor get_licensed(p_workplan VARCHAR2,
149: p_financial VARCHAR2,
150: p_deliverable VARCHAR2) IS
151: select structure_type_id, structure_type_class_code
152: from pa_structure_types
153: where (structure_type_class_code = 'WORKPLAN' and 'Y' = p_workplan)
154: or (structure_type_class_code = 'FINANCIAL' and 'Y' = p_financial)
155: or (structure_type_class_code = 'DELIVERABLE' and 'Y' = p_deliverable);
156: l_deliverable_license VARCHAR2(1) := 'N';
979: and status_code <> 'STRUCTURE_PUBLISHED';
980:
981: CURSOR check_financial_type(c_structure_id NUMBER) IS
982: select '1'
983: from pa_proj_structure_types p, pa_structure_types s
984: where s.structure_type_class_code IN ('FINANCIAL')
985: and s.structure_type_id = p.structure_type_id
986: and p.proj_element_id = c_structure_id;
987:
6323:
6324: CURSOR l_get_structure_type_csr(c_structure_version_id NUMBER)
6325: IS
6326: SELECT pst.structure_type_class_code
6327: FROM PA_STRUCTURE_TYPES pst,
6328: PA_PROJ_ELEMENT_VERSIONS ppev,
6329: PA_PROJ_STRUCTURE_TYPES ppst
6330: WHERE ppev.element_version_id = c_structure_version_id
6331: AND ppev.proj_element_id = ppst.proj_element_id
6330: WHERE ppev.element_version_id = c_structure_version_id
6331: AND ppev.proj_element_id = ppst.proj_element_id
6332: AND ppst.structure_type_id = pst.structure_type_id;
6333:
6334: l_structure_type PA_STRUCTURE_TYPES.structure_type%TYPE;
6335:
6336: CURSOR l_check_working_versions_csr(c_structure_version_id NUMBER)
6337: IS
6338: SELECT 'Y'
6369: and v1.parent_structure_version_id = v2.element_version_id;
6370: l_info_task_ver_rec get_task_version_info%ROWTYPE;
6371:
6372: l_new_obj_rel_id PA_OBJECT_RELATIONSHIPS.OBJECT_RELATIONSHIP_ID%TYPE;
6373: l_structure_type1 PA_STRUCTURE_TYPES.structure_type_class_code%TYPE;
6374:
6375: --hsiu
6376: --added for task weighting
6377: CURSOR get_cur_task_ver_weighting(c_ver_id NUMBER) IS
6494: FETCH l_get_structure_ver_csr INTO l_structure_ver_to_rec;
6495:
6496: SELECT pst.structure_type_class_code
6497: INTO l_structure_type1
6498: FROM PA_STRUCTURE_TYPES pst,
6499: PA_PROJ_STRUCTURE_TYPES ppst
6500: WHERE ppst.proj_element_id = l_structure_ver_to_rec.proj_element_id
6501: AND pst.structure_type_id = ppst.structure_type_id;
6502:
6533: FETCH get_task_version_info INTO l_info_task_ver_rec;
6534:
6535: SELECT pst.structure_type_class_code
6536: INTO l_structure_type1
6537: FROM PA_STRUCTURE_TYPES pst,
6538: PA_PROJ_STRUCTURE_TYPES ppst
6539: WHERE ppst.proj_element_id = l_info_task_ver_rec.structure_id
6540: AND pst.structure_type_id = ppst.structure_type_id;
6541:
7101: l_msg_count NUMBER;
7102: l_msg_data VARCHAR2(250);
7103: l_split_cost_workplan_flag VARCHAR2(1);
7104: l_structure_id NUMBER;
7105: l_structure_type PA_STRUCTURE_TYPES.structure_type_class_code%TYPE;
7106:
7107: --Bug 2189657
7108: --Added for linking tasks with no display sequence.
7109: Type T_EquivElemVerTable IS TABLE OF NUMBER
7113:
7114: CURSOR l_get_structure_type_csr(c_proj_element_id NUMBER)
7115: IS
7116: SELECT structure_type_class_code
7117: FROM PA_STRUCTURE_TYPES pst,
7118: PA_PROJ_STRUCTURE_TYPES ppst
7119: WHERE ppst.proj_element_id = c_proj_element_id
7120: AND pst.structure_type_id = ppst.structure_type_id;
7121:
8954: cursor c1 IS
8955: select a.proj_element_id
8956: from pa_proj_elements a,
8957: pa_proj_structure_types b,
8958: pa_structure_types c
8959: where a.project_id = p_project_id
8960: and a.object_type = 'PA_STRUCTURES'
8961: and a.proj_element_id = b.proj_element_id
8962: and b.structure_type_id = c.structure_type_id
8963: and c.structure_type_class_code IN ('FINANCIAL');
8964:
8965: cursor sel_struct_type(c_structure_id NUMBER) IS
8966: select a.rowid
8967: from pa_proj_structure_types a, pa_structure_types b
8968: where a.proj_element_id = c_structure_id
8969: and a.structure_type_id = b.structure_type_id
8970: and b.structure_type_class_code = 'WORKPLAN';
8971:
9895: select b.proj_element_id, a.record_version_number
9896: from pa_proj_workplan_attr a,
9897: pa_proj_elements b,
9898: pa_proj_structure_types c,
9899: pa_structure_types d
9900: where a.project_id = b.project_id
9901: and a.proj_element_id = b.proj_element_id
9902: and b.project_id = p_project_id
9903: and b.proj_element_id = c.proj_element_id
9906:
9907: cursor sel_wp_struct_type(c_structure_id NUMBER) IS
9908: select a.rowid
9909: from pa_proj_structure_types a,
9910: pa_structure_types b
9911: where a.proj_element_id = c_structure_id
9912: and a.structure_type_id = b.structure_type_id
9913: and b.structure_type_class_code = 'WORKPLAN';
9914:
9923: cursor sel_wp_structure_id IS
9924: select a.proj_element_id
9925: from pa_proj_elements a,
9926: pa_proj_structure_types b,
9927: pa_structure_types c
9928: where a.project_id = p_project_id
9929: and a.object_type = 'PA_STRUCTURES'
9930: and a.proj_element_id = b.proj_element_id
9931: and b.structure_type_id = c.structure_type_id
9972: cursor sel_fin_structure_id IS
9973: select a.proj_element_id
9974: from pa_proj_elements a,
9975: pa_proj_structure_types b,
9976: pa_structure_types c
9977: where a.project_id = p_project_id
9978: and a.object_type = 'PA_STRUCTURES'
9979: and a.proj_element_id = b.proj_element_id
9980: and b.structure_type_id = c.structure_type_id
9981: and c.structure_type_class_code = 'FINANCIAL';
9982:
9983: CURSOR sel_struc_type_id IS
9984: select structure_type_id
9985: from pa_structure_types
9986: where structure_type_class_code = 'WORKPLAN';
9987:
9988: cursor sel_struc_ver(c_structure_id NUMBER) IS
9989: select element_version_id
11666: select ppevs.element_version_id
11667: from pa_proj_elem_ver_structure ppevs,
11668: pa_proj_elements ppe,
11669: pa_proj_structure_types ppst,
11670: pa_structure_types pst
11671: where ppevs.status_code <> 'STRUCTURE_PUBLISHED'
11672: and ppevs.project_id = ppe.project_id
11673: and ppevs.proj_element_id = ppe.proj_element_id
11674: and ppe.object_type = 'PA_STRUCTURES'
11681: select ppevs.element_version_id
11682: from pa_proj_elem_ver_structure ppevs,
11683: pa_proj_elements ppe,
11684: pa_proj_structure_types ppst,
11685: pa_structure_types pst
11686: where ppevs.status_code = 'STRUCTURE_PUBLISHED'
11687: and ppevs.project_id = ppe.project_id
11688: and ppevs.proj_element_id = ppe.proj_element_id
11689: and ppe.object_type = 'PA_STRUCTURES'
13325:
13326: CURSOR l_get_structure_type_csr(c_structure_version_id NUMBER)
13327: IS
13328: SELECT pst.structure_type_class_code
13329: FROM PA_STRUCTURE_TYPES pst,
13330: PA_PROJ_ELEMENT_VERSIONS ppev,
13331: PA_PROJ_STRUCTURE_TYPES ppst
13332: WHERE ppev.element_version_id = c_structure_version_id
13333: AND ppev.proj_element_id = ppst.proj_element_id
13332: WHERE ppev.element_version_id = c_structure_version_id
13333: AND ppev.proj_element_id = ppst.proj_element_id
13334: AND ppst.structure_type_id = pst.structure_type_id;
13335:
13336: l_structure_type PA_STRUCTURE_TYPES.structure_type%TYPE;
13337:
13338: CURSOR l_check_working_versions_csr(c_structure_version_id NUMBER)
13339: IS
13340: SELECT 'Y'
13353: l_dummy VARCHAR2(1);
13354:
13355:
13356: l_new_obj_rel_id PA_OBJECT_RELATIONSHIPS.OBJECT_RELATIONSHIP_ID%TYPE;
13357: l_structure_type1 PA_STRUCTURE_TYPES.structure_type_class_code%TYPE;
13358:
13359: --Added by rtarway
13360: l_rowid VARCHAR2(255);
13361:
14256: select b.proj_element_id, a.record_version_number
14257: from pa_proj_workplan_attr a,
14258: pa_proj_elements b,
14259: pa_proj_structure_types c,
14260: pa_structure_types d
14261: where a.project_id = b.project_id
14262: and a.proj_element_id = b.proj_element_id
14263: and b.project_id = p_project_id
14264: and b.proj_element_id = c.proj_element_id
14267:
14268: cursor sel_wp_struct_type(c_structure_id NUMBER) IS
14269: select a.rowid
14270: from pa_proj_structure_types a,
14271: pa_structure_types b
14272: where a.proj_element_id = c_structure_id
14273: and a.structure_type_id = b.structure_type_id
14274: and b.structure_type_class_code = 'WORKPLAN';
14275:
14286: cursor sel_wp_structure_id IS
14287: select a.proj_element_id
14288: from pa_proj_elements a,
14289: pa_proj_structure_types b,
14290: pa_structure_types c
14291: where a.project_id = p_project_id
14292: and a.object_type = 'PA_STRUCTURES'
14293: and a.proj_element_id = b.proj_element_id
14294: and b.structure_type_id = c.structure_type_id
14338: cursor sel_fin_structure_id IS
14339: select a.proj_element_id
14340: from pa_proj_elements a,
14341: pa_proj_structure_types b,
14342: pa_structure_types c
14343: where a.project_id = p_project_id
14344: and a.object_type = 'PA_STRUCTURES'
14345: and a.proj_element_id = b.proj_element_id
14346: and b.structure_type_id = c.structure_type_id
14348: and c.structure_type_class_code = l_fin_structure_code;
14349:
14350: CURSOR sel_struc_type_id IS
14351: select structure_type_id
14352: from pa_structure_types
14353: where structure_type_class_code = 'WORKPLAN';
14354:
14355: cursor sel_struc_ver(c_structure_id NUMBER) IS
14356: select element_version_id
14421: l_wp_name VARCHAR2(240);
14422:
14423: CURSOR sel_fin_struc_type_id IS
14424: select structure_type_id
14425: from pa_structure_types
14426: where structure_type_class_code = 'FINANCIAL';
14427: l_fin_struc_type_id NUMBER;
14428: l_del_name VARCHAR2(240);
14429: l_wp_enabled VARCHAR2(1);
16488: --delete from pa_proj_structure_types
16489: DELETe FROM pa_proj_structure_types
16490: where proj_element_id = l_structure_id
16491: and structure_type_id = (
16492: select structure_type_id from pa_structure_types
16493: where structure_type = 'WORKPLAN');
16494:
16495: /* Bug 3906015
16496: Moved this code to above (i.e) before deleting the elements (Before deleting task)
16964: --delete from pa_proj_structure_types
16965: DELETe FROM pa_proj_structure_types
16966: where proj_element_id = l_structure_id
16967: and structure_type_id = (
16968: select structure_type_id from pa_structure_types
16969: where structure_type = 'WORKPLAN');
16970:
16971: -- NYU
16972: -- delete deliverable associations