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 465: FROM ahl_mc_headers_b hdr, ahl_mc_relationships rel,

461: --
462: --Fetches lowest level info
463: CURSOR get_last_uc_rec_csr (p_csi_instance_id IN NUMBER) IS
464: SELECT hdr.mc_id, hdr.version_number, rel.position_key
465: FROM ahl_mc_headers_b hdr, ahl_mc_relationships rel,
466: csi_ii_relationships csi_ii
467: WHERE csi_ii.subject_id = p_csi_instance_id
468: AND CSI_II.RELATIONSHIP_TYPE_CODE = 'COMPONENT-OF'
469: AND TRUNC(nvl(CSI_II.ACTIVE_START_DATE, sysdate)) <= TRUNC(sysdate)

Line 476: FROM ahl_mc_headers_b hdr, ahl_mc_relationships rel,

472: AND REL.mc_header_id = HDR.mc_header_id;
473: --
474: CURSOR get_top_unit_inst_csr (p_csi_instance_id IN NUMBER) IS
475: SELECT hdr.mc_id, hdr.version_number, rel.position_key
476: FROM ahl_mc_headers_b hdr, ahl_mc_relationships rel,
477: ahl_unit_config_headers uch, csi_unit_instances_v csi_u
478: WHERE uch.csi_item_instance_id = p_csi_instance_id
479: AND TRUNC(nvl(uch.ACTIVE_START_DATE, sysdate)) <= TRUNC(sysdate)
480: AND TRUNC(nvl(uch.ACTIVE_END_DATE, sysdate+1)) > TRUNC(sysdate)

Line 678: FROM AHL_MC_RELATIONSHIPS rel, AHL_MC_HEADERS_B HDR

674: CURSOR check_pos_key_top_csr(p_mc_id IN NUMBER,
675: p_ver_num IN NUMBER,
676: p_position_key IN NUMBER) IS
677: SELECT 'X'
678: FROM AHL_MC_RELATIONSHIPS rel, AHL_MC_HEADERS_B HDR
679: WHERE HDR.mc_header_id = REL.mc_header_id
680: AND REL.parent_relationship_id is NULL
681: AND REL.position_key = p_position_key
682: AND HDR.mc_id = p_mc_id

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

806:
807: ELSE
808: v_Stmt := 'INSERT INTO AHL_APPLICABLE_INSTANCES '||
809: ' SELECT csi_ii.subject_id ,'|| p_position_id ||
810: ' FROM ahl_mc_relationships rel, csi_ii_relationships csi_ii '||
811: ' WHERE TO_NUMBER(CSI_II.POSITION_REFERENCE)=REL.RELATIONSHIP_ID '
812: ||' AND REL.position_key = :pos_key'||l_path_tbl.LAST
813: ||' START WITH csi_ii.object_id IN ( '
814: || v_Select || v_From || v_Where || ' ) '

Line 992: from ahl_mc_relationships rel

988: p_position_key IN NUMBER) IS
989: SELECT csi_ii.subject_id, csi_ii.object_id, TO_NUMBER(csi_ii.position_reference)
990: FROM csi_ii_relationships csi_ii
991: WHERE TO_NUMBER(CSI_II.POSITION_REFERENCE) in (select REL.RELATIONSHIP_ID
992: from ahl_mc_relationships rel
993: where REL.position_key = p_position_key)
994: START WITH csi_ii.object_id = p_lowest_uc_ii_id
995: AND CSI_II.RELATIONSHIP_TYPE_CODE = 'COMPONENT-OF'
996: AND TRUNC(nvl(CSI_II.ACTIVE_START_DATE, sysdate)) <= TRUNC(sysdate)

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

1003: AND TRUNC(nvl(CSI_II.ACTIVE_END_DATE, sysdate+1)) > TRUNC(sysdate)
1004: AND CSI_II.POSITION_REFERENCE IS NOT NULL
1005: UNION ALL
1006: SELECT uch.csi_item_instance_id, csi_ii.object_id, TO_NUMBER(csi_ii.position_reference)
1007: FROM AHL_MC_RELATIONSHIPS rel, AHL_UNIT_CONFIG_HEADERS UCH, CSI_II_RELATIONSHIPS csi_ii
1008: WHERE UCH.master_config_id = REL.mc_header_id
1009: AND REL.parent_relationship_id is NULL
1010: AND REL.position_key = p_position_key
1011: AND uch.csi_item_instance_id = p_lowest_uc_ii_id

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

1024: p_version_number IN NUMBER,
1025: p_position_key IN NUMBER)
1026: IS
1027: SELECT rel.relationship_id, prel.position_key
1028: FROM AHL_MC_RELATIONSHIPS rel, AHL_MC_HEADERS_B hdr, AHL_MC_RELATIONSHIPS prel
1029: WHERE prel.relationship_id = rel.parent_relationship_id
1030: AND rel.position_key = p_position_key
1031: AND hdr.mc_header_id = rel.mc_header_id
1032: AND hdr.mc_id = p_mc_id

Line 1988: FROM AHL_MC_HEADERS_B hd, AHL_MC_RELATIONSHIPS rel,

1984: --
1985: --Select the default position reference.
1986: CURSOR get_def_pos_ref_csr (p_position_id IN NUMBER) IS
1987: SELECT rel.position_ref_code
1988: FROM AHL_MC_HEADERS_B hd, AHL_MC_RELATIONSHIPS rel,
1989: AHL_MC_PATH_POSITION_NODES pnodes
1990: WHERE hd.mc_header_id = rel.mc_header_id
1991: AND rel.position_key = pnodes.position_key
1992: AND hd.mc_id = pnodes.mc_id

Line 2059: FROM AHL_MC_HEADERS_B hd, AHL_MC_RELATIONSHIPS rel

2055: CURSOR get_def_path_pos_ref_csr (p_mc_id IN NUMBER,
2056: p_version_number IN NUMBER,
2057: p_position_key IN NUMBER) IS
2058: SELECT rel.position_ref_code
2059: FROM AHL_MC_HEADERS_B hd, AHL_MC_RELATIONSHIPS rel
2060: WHERE rel.position_key = p_position_key
2061: AND hd.mc_header_id = rel.mc_header_id
2062: AND hd.mc_id = p_mc_id
2063: AND hd.version_number = nvl(p_version_number, hd.version_number)

Line 2144: FROM AHL_MC_HEADERS_B a, AHL_MC_RELATIONSHIPS b

2140: WHERE uc_header_id = p_uc_header_id;
2141: --
2142: CURSOR get_rel_info_csr (p_rel_id IN VARCHAR2) IS
2143: SELECT a.mc_id, b.position_key
2144: FROM AHL_MC_HEADERS_B a, AHL_MC_RELATIONSHIPS b
2145: WHERE a.mc_header_id = b.mc_header_id
2146: AND b.relationship_id = p_rel_id;
2147: --
2148: CURSOR get_path_pos_ref_csr (p_encoded_path IN VARCHAR2) IS

Line 2156: FROM AHL_MC_RELATIONSHIPS rel

2152: --
2153: --Select the default position reference.
2154: CURSOR get_def_path_pos_ref_csr (p_relationship_id IN NUMBER) IS
2155: SELECT rel.position_ref_code
2156: FROM AHL_MC_RELATIONSHIPS rel
2157: WHERE rel.relationship_id = p_relationship_id;
2158: --
2159: l_pos_ref_code VARCHAR2(30);
2160: l_pos_ref_meaning VARCHAR2(80);

Line 2433: FROM ahl_mc_headers_b hdr, ahl_mc_relationships rel,

2429: --
2430: --Fetches lowest level info
2431: CURSOR get_last_uc_rec_csr (p_csi_instance_id IN NUMBER) IS
2432: SELECT hdr.mc_id, hdr.version_number, rel.position_key
2433: FROM ahl_mc_headers_b hdr, ahl_mc_relationships rel,
2434: csi_ii_relationships csi_ii
2435: WHERE csi_ii.subject_id = p_csi_instance_id
2436: AND CSI_II.RELATIONSHIP_TYPE_CODE = 'COMPONENT-OF'
2437: AND TRUNC(nvl(CSI_II.ACTIVE_START_DATE, sysdate)) <= TRUNC(sysdate)

Line 2448: FROM ahl_mc_headers_b hdr, ahl_mc_relationships rel,

2444: -- since it does not take dates into consideration
2445: /*
2446: CURSOR get_top_unit_inst_csr (p_csi_instance_id IN NUMBER) IS
2447: SELECT hdr.mc_id, hdr.version_number, rel.position_key
2448: FROM ahl_mc_headers_b hdr, ahl_mc_relationships rel,
2449: ahl_unit_config_headers uch, csi_unit_instances_v csi_u
2450: WHERE uch.csi_item_instance_id = p_csi_instance_id
2451: AND TRUNC(nvl(uch.ACTIVE_START_DATE, sysdate)) <= TRUNC(sysdate)
2452: AND TRUNC(nvl(uch.ACTIVE_END_DATE, sysdate+1)) > TRUNC(sysdate)

Line 2460: FROM ahl_mc_headers_b hdr, ahl_mc_relationships rel,

2456: AND uch.csi_item_instance_id = csi_u.instance_id;
2457: */
2458: CURSOR get_top_unit_inst_csr (p_csi_instance_id IN NUMBER) IS
2459: SELECT hdr.mc_id, hdr.version_number, rel.position_key
2460: FROM ahl_mc_headers_b hdr, ahl_mc_relationships rel,
2461: ahl_unit_config_headers uch
2462: WHERE uch.csi_item_instance_id = p_csi_instance_id
2463: AND TRUNC(nvl(uch.ACTIVE_START_DATE, sysdate)) <= TRUNC(sysdate)
2464: AND TRUNC(nvl(uch.ACTIVE_END_DATE, sysdate+1)) > TRUNC(sysdate)

Line 2481: FROM ahl_mc_headers_b hdr, ahl_mc_relationships rel

2477: -- position.
2478: CURSOR get_mc_relationship_csr (p_relationships_id IN NUMBER,
2479: p_parent_instance_id IN NUMBER) IS
2480: SELECT hdr.mc_id, hdr.version_number, rel.position_key
2481: FROM ahl_mc_headers_b hdr, ahl_mc_relationships rel
2482: WHERE hdr.mc_header_id = rel.mc_header_id
2483: AND rel.relationship_id = p_relationship_id
2484: --Jerry rewrite the following condition on 03/03/2005 in order to fix bug 4090856
2485: --after verifying the bug fix on scmtsb2

Line 2487: FROM ahl_mc_relationships

2483: AND rel.relationship_id = p_relationship_id
2484: --Jerry rewrite the following condition on 03/03/2005 in order to fix bug 4090856
2485: --after verifying the bug fix on scmtsb2
2486: AND rel.relationship_id IN (SELECT relationship_id
2487: FROM ahl_mc_relationships
2488: WHERE mc_header_id = (SELECT mc_header_id
2489: FROM ahl_mc_relationships
2490: WHERE relationship_id = (SELECT to_number(position_reference)
2491: FROM csi_ii_relationships

Line 2489: FROM ahl_mc_relationships

2485: --after verifying the bug fix on scmtsb2
2486: AND rel.relationship_id IN (SELECT relationship_id
2487: FROM ahl_mc_relationships
2488: WHERE mc_header_id = (SELECT mc_header_id
2489: FROM ahl_mc_relationships
2490: WHERE relationship_id = (SELECT to_number(position_reference)
2491: FROM csi_ii_relationships
2492: WHERE subject_id = p_parent_instance_id
2493: AND RELATIONSHIP_TYPE_CODE = 'COMPONENT-OF'

Line 2504: FROM AHL_MC_RELATIONSHIPS r, AHL_UNIT_CONFIG_HEADERS uch

2500:
2501: /*
2502: AND rel.parent_relationship_id IN
2503: ( SELECT r.relationship_id
2504: FROM AHL_MC_RELATIONSHIPS r, AHL_UNIT_CONFIG_HEADERS uch
2505: WHERE uch.csi_item_instance_id = p_parent_instance_id
2506: AND uch.master_config_id = r.mc_header_id
2507: --AND r.parent_relationship_id IS NULL
2508: --Jerry commented out the above condition on 01/14/2005 to fix bug 4090856

Line 2519: FROM ahl_mc_config_relations crel, ahl_mc_relationships subrel,

2515: AND TRUNC(nvl(CSI_II.ACTIVE_START_DATE, sysdate)) <= TRUNC(sysdate)
2516: AND TRUNC(nvl(CSI_II.ACTIVE_END_DATE, sysdate+1)) > TRUNC(sysdate)
2517: UNION ALL
2518: SELECT subrel.relationship_id
2519: FROM ahl_mc_config_relations crel, ahl_mc_relationships subrel,
2520: csi_ii_relationships csi_ii
2521: WHERE csi_ii.subject_id = p_parent_instance_id
2522: AND CSI_II.RELATIONSHIP_TYPE_CODE = 'COMPONENT-OF'
2523: AND TRUNC(nvl(CSI_II.ACTIVE_START_DATE, sysdate)) <= TRUNC(sysdate)

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

2718: ) RETURN VARCHAR2 IS
2719: --
2720: -- for a given path position id, get the mc id and version no from ahl_mc_path_position_nodes
2721: -- from the mc id and version no, get the mc header id from ahl_mc_headers_b
2722: -- from the mc header id and position key (from ahl_mc_path_position_nodes), get the relationship id from ahl_mc_relationships
2723: CURSOR get_rel_id_csr (p_path_position_id NUMBER) IS
2724: SELECT mcr.relationship_id
2725: FROM ahl_mc_path_position_nodes mpn, ahl_mc_headers_b mch,
2726: ahl_mc_relationships mcr

Line 2726: ahl_mc_relationships mcr

2722: -- from the mc header id and position key (from ahl_mc_path_position_nodes), get the relationship id from ahl_mc_relationships
2723: CURSOR get_rel_id_csr (p_path_position_id NUMBER) IS
2724: SELECT mcr.relationship_id
2725: FROM ahl_mc_path_position_nodes mpn, ahl_mc_headers_b mch,
2726: ahl_mc_relationships mcr
2727: WHERE mpn.path_position_id = p_path_position_id
2728: AND mpn.sequence = (
2729: SELECT MAX(sequence)
2730: FROM ahl_mc_path_position_nodes

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

2734: AND mch.version_number = NVL(mpn.version_number, mch.version_number)
2735: AND mcr.mc_header_id = mch.mc_header_id
2736: AND mcr.position_key = mpn.position_key;
2737:
2738: -- for a given relationship id, get the item group id from ahl_mc_relationships
2739: CURSOR get_item_group_id_csr (p_relationship_id NUMBER) IS
2740: SELECT item_group_id
2741: FROM ahl_mc_relationships
2742: WHERE relationship_id = p_relationship_id;

Line 2741: FROM ahl_mc_relationships

2737:
2738: -- for a given relationship id, get the item group id from ahl_mc_relationships
2739: CURSOR get_item_group_id_csr (p_relationship_id NUMBER) IS
2740: SELECT item_group_id
2741: FROM ahl_mc_relationships
2742: WHERE relationship_id = p_relationship_id;
2743:
2744: -- for a given item group id, get the serial control code of the associated items
2745: CURSOR get_serial_cntrl_code_csr (p_item_group_id NUMBER) IS