DBA Data[Home] [Help]

APPS.AHL_MC_PATH_POSITION_PVT dependencies on AHL_MC_RELATIONSHIPS

Line 45: FROM ahl_mc_headers_b hd, ahl_mc_relationships rel

41: CURSOR check_mc_ids_csr (p_mc_id IN NUMBER,
42: p_ver_num IN NUMBER,
43: p_pos_key IN NUMBER) IS
44: SELECT 'X'
45: FROM ahl_mc_headers_b hd, ahl_mc_relationships rel
46: WHERE hd.mc_header_id = rel.mc_header_id
47: AND hd.mc_id = p_mc_id
48: AND hd.version_number = nvl(p_ver_num, hd.version_number)
49: AND rel.position_key = p_pos_key;

Line 64: FROM ahl_mc_relationships r, ahl_mc_headers_b h

60: AND hd.mc_id = p_child_mc_id
61: AND hd.version_number = nvl(p_child_ver_num, hd.version_number)
62: AND rel.relationship_id IN
63: (SELECT r.relationship_id
64: FROM ahl_mc_relationships r, ahl_mc_headers_b h
65: WHERE h.mc_header_id = r.mc_header_id
66: AND h.mc_id = p_mc_id
67: AND h.version_number = nvl(p_ver_num, h.version_number)
68: AND r.position_key = p_pos_key);

Line 78: FROM ahl_mc_relationships r1, ahl_mc_relationships r2, ahl_mc_headers_b hdr

74: WHERE pos.encoded_path_position = p_encoded_path;
75: --
76: CURSOR get_sibling_poskey_csr(p_mc_id IN NUMBER, p_poskey IN NUMBER) IS
77: SELECT distinct r2.position_key
78: FROM ahl_mc_relationships r1, ahl_mc_relationships r2, ahl_mc_headers_b hdr
79: WHERE r1.parent_relationship_id = r2.parent_relationship_id
80: AND r1.position_key <> r2.position_key
81: AND r1.position_key = p_poskey
82: AND r1.mc_header_id = hdr.mc_header_id

Line 474: FROM ahl_mc_headers_b hdr, ahl_mc_relationships rel,

470: --
471: --Fetches lowest level info
472: CURSOR get_last_uc_rec_csr (p_csi_instance_id IN NUMBER) IS
473: SELECT hdr.mc_id, hdr.version_number, rel.position_key
474: FROM ahl_mc_headers_b hdr, ahl_mc_relationships rel,
475: csi_ii_relationships csi_ii
476: WHERE csi_ii.subject_id = p_csi_instance_id
477: AND CSI_II.RELATIONSHIP_TYPE_CODE = 'COMPONENT-OF'
478: AND TRUNC(nvl(CSI_II.ACTIVE_START_DATE, sysdate)) <= TRUNC(sysdate)

Line 485: FROM ahl_mc_headers_b hdr, ahl_mc_relationships rel,

481: AND REL.mc_header_id = HDR.mc_header_id;
482: --
483: CURSOR get_top_unit_inst_csr (p_csi_instance_id IN NUMBER) IS
484: SELECT hdr.mc_id, hdr.version_number, rel.position_key
485: FROM ahl_mc_headers_b hdr, ahl_mc_relationships rel,
486: ahl_unit_config_headers uch, csi_unit_instances_v csi_u
487: WHERE uch.csi_item_instance_id = p_csi_instance_id
488: AND TRUNC(nvl(uch.ACTIVE_START_DATE, sysdate)) <= TRUNC(sysdate)
489: AND TRUNC(nvl(uch.ACTIVE_END_DATE, sysdate+1)) > TRUNC(sysdate)

Line 516: ahl_mc_relationships amr

512: CURSOR get_current_mc_rec_csr(c_instance_id IN NUMBER) IS
513: SELECT amh.mc_id, amh.version_number, amr.position_key
514: FROM ahl_unit_config_headers auch,
515: ahl_mc_headers_b amh,
516: ahl_mc_relationships amr
517: WHERE auch.csi_item_instance_id = c_instance_id
518: AND amh.mc_header_id = auch.master_config_id
519: AND amr.mc_header_id = amh.mc_header_id
520: AND amr.parent_relationship_id is null;

Line 732: FROM AHL_MC_RELATIONSHIPS rel, AHL_MC_HEADERS_B HDR

728: CURSOR check_pos_key_top_csr(p_mc_id IN NUMBER,
729: p_ver_num IN NUMBER,
730: p_position_key IN NUMBER) IS
731: SELECT 'X'
732: FROM AHL_MC_RELATIONSHIPS rel, AHL_MC_HEADERS_B HDR
733: WHERE HDR.mc_header_id = REL.mc_header_id
734: AND REL.parent_relationship_id is NULL
735: AND REL.position_key = p_position_key
736: AND HDR.mc_id = p_mc_id

Line 864: ' FROM ahl_mc_relationships rel, csi_ii_relationships csi_ii '||

860:
861: ELSE
862: v_Stmt := 'INSERT INTO AHL_APPLICABLE_INSTANCES '||
863: ' SELECT csi_ii.subject_id ,'|| p_position_id ||
864: ' FROM ahl_mc_relationships rel, csi_ii_relationships csi_ii '||
865: ' WHERE TO_NUMBER(CSI_II.POSITION_REFERENCE)=REL.RELATIONSHIP_ID '
866: ||' AND REL.position_key = :pos_key'||l_path_tbl.LAST
867: ||' START WITH csi_ii.object_id IN ( '
868: || v_Select || v_From || v_Where || ' ) '

Line 1050: from ahl_mc_relationships rel

1046: p_position_key IN NUMBER) IS
1047: SELECT csi_ii.subject_id, csi_ii.object_id, TO_NUMBER(csi_ii.position_reference)
1048: FROM csi_ii_relationships csi_ii
1049: WHERE TO_NUMBER(CSI_II.POSITION_REFERENCE) in (select REL.RELATIONSHIP_ID
1050: from ahl_mc_relationships rel
1051: where REL.position_key = p_position_key)
1052: START WITH csi_ii.object_id = p_lowest_uc_ii_id
1053: AND CSI_II.RELATIONSHIP_TYPE_CODE = 'COMPONENT-OF'
1054: AND TRUNC(nvl(CSI_II.ACTIVE_START_DATE, sysdate)) <= TRUNC(sysdate)

Line 1065: FROM AHL_MC_RELATIONSHIPS rel, AHL_UNIT_CONFIG_HEADERS UCH, CSI_II_RELATIONSHIPS csi_ii

1061: AND TRUNC(nvl(CSI_II.ACTIVE_END_DATE, sysdate+1)) > TRUNC(sysdate)
1062: AND CSI_II.POSITION_REFERENCE IS NOT NULL
1063: UNION ALL
1064: SELECT uch.csi_item_instance_id, csi_ii.object_id, TO_NUMBER(csi_ii.position_reference)
1065: FROM AHL_MC_RELATIONSHIPS rel, AHL_UNIT_CONFIG_HEADERS UCH, CSI_II_RELATIONSHIPS csi_ii
1066: WHERE UCH.master_config_id = REL.mc_header_id
1067: AND REL.parent_relationship_id is NULL
1068: AND REL.position_key = p_position_key
1069: AND uch.csi_item_instance_id = p_lowest_uc_ii_id

Line 1086: FROM AHL_MC_RELATIONSHIPS rel, AHL_MC_HEADERS_B hdr, AHL_MC_RELATIONSHIPS prel

1082: p_version_number IN NUMBER,
1083: p_position_key IN NUMBER)
1084: IS
1085: SELECT rel.relationship_id, prel.position_key
1086: FROM AHL_MC_RELATIONSHIPS rel, AHL_MC_HEADERS_B hdr, AHL_MC_RELATIONSHIPS prel
1087: WHERE prel.relationship_id = rel.parent_relationship_id
1088: AND rel.position_key = p_position_key
1089: AND hdr.mc_header_id = rel.mc_header_id
1090: AND hdr.mc_id = p_mc_id

Line 2046: FROM AHL_MC_HEADERS_B hd, AHL_MC_RELATIONSHIPS rel,

2042: --
2043: --Select the default position reference.
2044: CURSOR get_def_pos_ref_csr (p_position_id IN NUMBER) IS
2045: SELECT rel.position_ref_code
2046: FROM AHL_MC_HEADERS_B hd, AHL_MC_RELATIONSHIPS rel,
2047: AHL_MC_PATH_POSITION_NODES pnodes
2048: WHERE hd.mc_header_id = rel.mc_header_id
2049: AND rel.position_key = pnodes.position_key
2050: AND hd.mc_id = pnodes.mc_id

Line 2117: FROM AHL_MC_HEADERS_B hd, AHL_MC_RELATIONSHIPS rel

2113: CURSOR get_def_path_pos_ref_csr (p_mc_id IN NUMBER,
2114: p_version_number IN NUMBER,
2115: p_position_key IN NUMBER) IS
2116: SELECT rel.position_ref_code
2117: FROM AHL_MC_HEADERS_B hd, AHL_MC_RELATIONSHIPS rel
2118: WHERE rel.position_key = p_position_key
2119: AND hd.mc_header_id = rel.mc_header_id
2120: AND hd.mc_id = p_mc_id
2121: AND hd.version_number = nvl(p_version_number, hd.version_number)

Line 2202: FROM AHL_MC_HEADERS_B a, AHL_MC_RELATIONSHIPS b

2198: WHERE uc_header_id = p_uc_header_id;
2199: --
2200: CURSOR get_rel_info_csr (p_rel_id IN VARCHAR2) IS
2201: SELECT a.mc_id, b.position_key
2202: FROM AHL_MC_HEADERS_B a, AHL_MC_RELATIONSHIPS b
2203: WHERE a.mc_header_id = b.mc_header_id
2204: AND b.relationship_id = p_rel_id;
2205: --
2206: CURSOR get_path_pos_ref_csr (p_encoded_path IN VARCHAR2) IS

Line 2214: FROM AHL_MC_RELATIONSHIPS rel

2210: --
2211: --Select the default position reference.
2212: CURSOR get_def_path_pos_ref_csr (p_relationship_id IN NUMBER) IS
2213: SELECT rel.position_ref_code
2214: FROM AHL_MC_RELATIONSHIPS rel
2215: WHERE rel.relationship_id = p_relationship_id;
2216: --
2217: l_pos_ref_code VARCHAR2(30);
2218: l_pos_ref_meaning VARCHAR2(80);

Line 2491: FROM ahl_mc_headers_b hdr, ahl_mc_relationships rel,

2487: --
2488: --Fetches lowest level info
2489: CURSOR get_last_uc_rec_csr (p_csi_instance_id IN NUMBER) IS
2490: SELECT hdr.mc_id, hdr.version_number, rel.position_key
2491: FROM ahl_mc_headers_b hdr, ahl_mc_relationships rel,
2492: csi_ii_relationships csi_ii
2493: WHERE csi_ii.subject_id = p_csi_instance_id
2494: AND CSI_II.RELATIONSHIP_TYPE_CODE = 'COMPONENT-OF'
2495: AND TRUNC(nvl(CSI_II.ACTIVE_START_DATE, sysdate)) <= TRUNC(sysdate)

Line 2506: FROM ahl_mc_headers_b hdr, ahl_mc_relationships rel,

2502: -- since it does not take dates into consideration
2503: /*
2504: CURSOR get_top_unit_inst_csr (p_csi_instance_id IN NUMBER) IS
2505: SELECT hdr.mc_id, hdr.version_number, rel.position_key
2506: FROM ahl_mc_headers_b hdr, ahl_mc_relationships rel,
2507: ahl_unit_config_headers uch, csi_unit_instances_v csi_u
2508: WHERE uch.csi_item_instance_id = p_csi_instance_id
2509: AND TRUNC(nvl(uch.ACTIVE_START_DATE, sysdate)) <= TRUNC(sysdate)
2510: AND TRUNC(nvl(uch.ACTIVE_END_DATE, sysdate+1)) > TRUNC(sysdate)

Line 2518: FROM ahl_mc_headers_b hdr, ahl_mc_relationships rel,

2514: AND uch.csi_item_instance_id = csi_u.instance_id;
2515: */
2516: CURSOR get_top_unit_inst_csr (p_csi_instance_id IN NUMBER) IS
2517: SELECT hdr.mc_id, hdr.version_number, rel.position_key
2518: FROM ahl_mc_headers_b hdr, ahl_mc_relationships rel,
2519: ahl_unit_config_headers uch
2520: WHERE uch.csi_item_instance_id = p_csi_instance_id
2521: AND TRUNC(nvl(uch.ACTIVE_START_DATE, sysdate)) <= TRUNC(sysdate)
2522: AND TRUNC(nvl(uch.ACTIVE_END_DATE, sysdate+1)) > TRUNC(sysdate)

Line 2539: FROM ahl_mc_headers_b hdr, ahl_mc_relationships rel

2535: -- position.
2536: CURSOR get_mc_relationship_csr (p_relationships_id IN NUMBER,
2537: p_parent_instance_id IN NUMBER) IS
2538: SELECT hdr.mc_id, hdr.version_number, rel.position_key
2539: FROM ahl_mc_headers_b hdr, ahl_mc_relationships rel
2540: WHERE hdr.mc_header_id = rel.mc_header_id
2541: AND rel.relationship_id = p_relationship_id
2542: --Jerry rewrite the following condition on 03/03/2005 in order to fix bug 4090856
2543: --after verifying the bug fix on scmtsb2

Line 2545: FROM ahl_mc_relationships

2541: AND rel.relationship_id = p_relationship_id
2542: --Jerry rewrite the following condition on 03/03/2005 in order to fix bug 4090856
2543: --after verifying the bug fix on scmtsb2
2544: AND rel.relationship_id IN (SELECT relationship_id
2545: FROM ahl_mc_relationships
2546: WHERE mc_header_id = (SELECT mc_header_id
2547: FROM ahl_mc_relationships
2548: WHERE relationship_id = (SELECT to_number(position_reference)
2549: FROM csi_ii_relationships

Line 2547: FROM ahl_mc_relationships

2543: --after verifying the bug fix on scmtsb2
2544: AND rel.relationship_id IN (SELECT relationship_id
2545: FROM ahl_mc_relationships
2546: WHERE mc_header_id = (SELECT mc_header_id
2547: FROM ahl_mc_relationships
2548: WHERE relationship_id = (SELECT to_number(position_reference)
2549: FROM csi_ii_relationships
2550: WHERE subject_id = p_parent_instance_id
2551: AND RELATIONSHIP_TYPE_CODE = 'COMPONENT-OF'

Line 2562: FROM AHL_MC_RELATIONSHIPS r, AHL_UNIT_CONFIG_HEADERS uch

2558:
2559: /*
2560: AND rel.parent_relationship_id IN
2561: ( SELECT r.relationship_id
2562: FROM AHL_MC_RELATIONSHIPS r, AHL_UNIT_CONFIG_HEADERS uch
2563: WHERE uch.csi_item_instance_id = p_parent_instance_id
2564: AND uch.master_config_id = r.mc_header_id
2565: --AND r.parent_relationship_id IS NULL
2566: --Jerry commented out the above condition on 01/14/2005 to fix bug 4090856

Line 2577: FROM ahl_mc_config_relations crel, ahl_mc_relationships subrel,

2573: AND TRUNC(nvl(CSI_II.ACTIVE_START_DATE, sysdate)) <= TRUNC(sysdate)
2574: AND TRUNC(nvl(CSI_II.ACTIVE_END_DATE, sysdate+1)) > TRUNC(sysdate)
2575: UNION ALL
2576: SELECT subrel.relationship_id
2577: FROM ahl_mc_config_relations crel, ahl_mc_relationships subrel,
2578: csi_ii_relationships csi_ii
2579: WHERE csi_ii.subject_id = p_parent_instance_id
2580: AND CSI_II.RELATIONSHIP_TYPE_CODE = 'COMPONENT-OF'
2581: AND TRUNC(nvl(CSI_II.ACTIVE_START_DATE, sysdate)) <= TRUNC(sysdate)

Line 2780: -- from the mc header id and position key (from ahl_mc_path_position_nodes), get the relationship id from ahl_mc_relationships

2776: ) RETURN VARCHAR2 IS
2777: --
2778: -- for a given path position id, get the mc id and version no from ahl_mc_path_position_nodes
2779: -- from the mc id and version no, get the mc header id from ahl_mc_headers_b
2780: -- from the mc header id and position key (from ahl_mc_path_position_nodes), get the relationship id from ahl_mc_relationships
2781: CURSOR get_rel_id_csr (p_path_position_id NUMBER) IS
2782: SELECT mcr.relationship_id
2783: FROM ahl_mc_path_position_nodes mpn, ahl_mc_headers_b mch,
2784: ahl_mc_relationships mcr

Line 2784: ahl_mc_relationships mcr

2780: -- from the mc header id and position key (from ahl_mc_path_position_nodes), get the relationship id from ahl_mc_relationships
2781: CURSOR get_rel_id_csr (p_path_position_id NUMBER) IS
2782: SELECT mcr.relationship_id
2783: FROM ahl_mc_path_position_nodes mpn, ahl_mc_headers_b mch,
2784: ahl_mc_relationships mcr
2785: WHERE mpn.path_position_id = p_path_position_id
2786: AND mpn.sequence = (
2787: SELECT MAX(sequence)
2788: FROM ahl_mc_path_position_nodes

Line 2796: -- for a given relationship id, get the item group id from ahl_mc_relationships

2792: AND mch.version_number = NVL(mpn.version_number, mch.version_number)
2793: AND mcr.mc_header_id = mch.mc_header_id
2794: AND mcr.position_key = mpn.position_key;
2795:
2796: -- for a given relationship id, get the item group id from ahl_mc_relationships
2797: CURSOR get_item_group_id_csr (p_relationship_id NUMBER) IS
2798: SELECT item_group_id
2799: FROM ahl_mc_relationships
2800: WHERE relationship_id = p_relationship_id;

Line 2799: FROM ahl_mc_relationships

2795:
2796: -- for a given relationship id, get the item group id from ahl_mc_relationships
2797: CURSOR get_item_group_id_csr (p_relationship_id NUMBER) IS
2798: SELECT item_group_id
2799: FROM ahl_mc_relationships
2800: WHERE relationship_id = p_relationship_id;
2801:
2802: -- for a given item group id, get the serial control code of the associated items
2803: CURSOR get_serial_cntrl_code_csr (p_item_group_id NUMBER) IS