DBA Data[Home] [Help]

APPS.AHL_MC_NODE_PVT dependencies on AHL_MC_RELATIONSHIPS

Line 153: FROM ahl_mc_relationships

149: -- Define cursor check_dup_poskey to check for duplicate position key within same MC
150: CURSOR check_dup_poskey
151: IS
152: SELECT 'x'
153: FROM ahl_mc_relationships
154: WHERE mc_header_id = p_x_node_rec.mc_header_id AND
155: position_key = p_x_node_rec.position_key;
156: -- Since expired nodes are also copied, so duplicate position key check must happen for expired nodes also
157: -- AND G_TRUNC_DATE < trunc(nvl(p_x_node_rec.active_end_date, G_SYSDATE + 1));

Line 276: SELECT ahl_mc_relationships_s.nextval INTO p_x_node_rec.relationship_id FROM DUAL;

272: 'Node validation successful'
273: );
274: END IF;
275:
276: SELECT ahl_mc_relationships_s.nextval INTO p_x_node_rec.relationship_id FROM DUAL;
277: p_x_node_rec.object_version_number := 1;
278: p_x_node_rec.security_group_id := null;
279:
280: -- 4. Insert the node record into AHL_MC_RELATIONSHIPS table

Line 280: -- 4. Insert the node record into AHL_MC_RELATIONSHIPS table

276: SELECT ahl_mc_relationships_s.nextval INTO p_x_node_rec.relationship_id FROM DUAL;
277: p_x_node_rec.object_version_number := 1;
278: p_x_node_rec.security_group_id := null;
279:
280: -- 4. Insert the node record into AHL_MC_RELATIONSHIPS table
281: INSERT INTO AHL_MC_RELATIONSHIPS
282: (
283: RELATIONSHIP_ID,
284: POSITION_REF_CODE,

Line 281: INSERT INTO AHL_MC_RELATIONSHIPS

277: p_x_node_rec.object_version_number := 1;
278: p_x_node_rec.security_group_id := null;
279:
280: -- 4. Insert the node record into AHL_MC_RELATIONSHIPS table
281: INSERT INTO AHL_MC_RELATIONSHIPS
282: (
283: RELATIONSHIP_ID,
284: POSITION_REF_CODE,
285: PARENT_RELATIONSHIP_ID,

Line 538: FROM ahl_mc_relationships

534: -- Define cursor check_poskey_update to verify whether the position key for a MC node is updated
535: CURSOR check_poskey_update
536: IS
537: SELECT 'x'
538: FROM ahl_mc_relationships
539: WHERE relationship_id = p_x_node_rec.relationship_id AND
540: position_key <> p_x_node_rec.position_key;
541:
542: -- Define cursor get_node_details to retrieve details of the MC node

Line 546: FROM ahl_mc_relationships

542: -- Define cursor get_node_details to retrieve details of the MC node
543: CURSOR get_node_details
544: IS
545: SELECT active_end_date
546: FROM ahl_mc_relationships
547: WHERE relationship_id = p_x_node_rec.relationship_id;
548:
549: --R12
550: --priyan MEL-CDL

Line 558: FROM ahl_mc_relationships_v rel, ahl_mc_headers_b mch

554: p_rel_id in number
555: )
556: IS
557: SELECT rel.ata_code, rel.position_ref_meaning , mch.name
558: FROM ahl_mc_relationships_v rel, ahl_mc_headers_b mch
559: WHERE rel.relationship_id IN
560: (
561: SELECT relationship_id
562: FROM ahl_mc_config_relations

Line 566: FROM ahl_mc_relationships

562: FROM ahl_mc_config_relations
563: WHERE mc_header_id IN
564: (
565: SELECT mc_header_id
566: FROM ahl_mc_relationships
567: WHERE relationship_id = p_rel_id
568: )
569: )
570: AND rel.mc_header_id = mch.mc_header_id;

Line 579: FROM ahl_mc_relationships_v rel, ahl_mc_headers_b mch

575: p_rel_id in number
576: )
577: IS
578: SELECT rel.ata_code , mch.name, rel.position_ref_meaning
579: FROM ahl_mc_relationships_v rel, ahl_mc_headers_b mch
580: WHERE rel.mc_header_id IN
581: (
582: SELECT mc_header_id
583: FROM ahl_mc_config_relations

Line 593: FROM ahl_mc_relationships

589: -- Define check_root_node to check whether the node to topnode of a MC
590: CURSOR check_root_node
591: IS
592: SELECT 'x'
593: FROM ahl_mc_relationships
594: WHERE parent_relationship_id is null AND
595: relationship_id = p_x_node_rec.relationship_id;
596:
597: -- Define check_leaf_node to check whether the node a leaf node

Line 601: FROM ahl_mc_relationships

597: -- Define check_leaf_node to check whether the node a leaf node
598: CURSOR check_leaf_node
599: IS
600: SELECT 'x'
601: FROM ahl_mc_relationships
602: WHERE parent_relationship_id = p_x_node_rec.relationship_id AND
603: G_TRUNC_DATE < trunc(nvl(active_end_date, G_SYSDATE + 1));
604:
605: --End priyan Changes

Line 738: -- 1d. Update the node record in AHL_MC_RELATIONSHIPS table

734: END IF;
735:
736: p_x_node_rec.object_version_number := p_x_node_rec.object_version_number + 1;
737:
738: -- 1d. Update the node record in AHL_MC_RELATIONSHIPS table
739: UPDATE AHL_MC_RELATIONSHIPS
740: SET POSITION_REF_CODE = p_x_node_rec.position_ref_code,
741: ITEM_GROUP_ID = p_x_node_rec.item_group_id,
742: UOM_CODE = p_x_node_rec.uom_code,

Line 739: UPDATE AHL_MC_RELATIONSHIPS

735:
736: p_x_node_rec.object_version_number := p_x_node_rec.object_version_number + 1;
737:
738: -- 1d. Update the node record in AHL_MC_RELATIONSHIPS table
739: UPDATE AHL_MC_RELATIONSHIPS
740: SET POSITION_REF_CODE = p_x_node_rec.position_ref_code,
741: ITEM_GROUP_ID = p_x_node_rec.item_group_id,
742: UOM_CODE = p_x_node_rec.uom_code,
743: QUANTITY = p_x_node_rec.quantity,

Line 1107: FROM ahl_mc_relationships

1103: p_rel_id in number
1104: )
1105: IS
1106: SELECT *
1107: FROM ahl_mc_relationships
1108: CONNECT BY parent_relationship_id = PRIOR relationship_id
1109: START WITH relationship_id = p_rel_id
1110: ORDER BY relationship_id DESC;
1111:

Line 1239: DELETE FROM ahl_mc_relationships

1235: );
1236: END IF;
1237:
1238: -- 9i. Delete the MC node
1239: DELETE FROM ahl_mc_relationships
1240: WHERE relationship_id = l_node_csr_rec.relationship_id;
1241:
1242: END LOOP;
1243:

Line 1437: FROM ahl_mc_relationships new, ahl_mc_relationships old

1433: -- Read the newly created node details into the in/out parameters
1434: BEGIN
1435: SELECT new.relationship_id, new.object_version_number
1436: INTO p_x_node_id, p_x_node_obj_ver_num
1437: FROM ahl_mc_relationships new, ahl_mc_relationships old
1438: WHERE new.position_ref_code = old.position_ref_code AND
1439: old.relationship_id = p_x_node_id AND
1440: new.parent_relationship_id = p_parent_rel_id;
1441: EXCEPTION

Line 1543: FROM ahl_mc_relationships

1539: p_topnode_id in number
1540: )
1541: IS
1542: SELECT *
1543: FROM ahl_mc_relationships
1544: WHERE relationship_id <> p_topnode_id
1545: -- Expired nodes also to be copied or else position path copy will fail
1546: -- AND G_TRUNC_DATE < trunc(nvl(active_end_date, G_SYSDATE + 1))
1547: CONNECT BY parent_relationship_id = PRIOR relationship_id

Line 1557: from ahl_mc_relationships_v

1553: p_relationship_id in number
1554: )
1555: IS
1556: select POSITION_REF_MEANING,POSITION_NECESSITY_MEANING,GROUP_NAME,ATA_MEANING -- R12 priyan MEL-CDL
1557: from ahl_mc_relationships_v
1558: where relationship_id = p_relationship_id;
1559:
1560: -- 2. Define cursor get_ctr_rule_update_csr to read all counter update rules for a particular MC node
1561: CURSOR get_ctr_rule_update_csr

Line 1576: FROM ahl_mc_relationships

1572: -- Define get_mc_header_id to read the mc_header_id of the destination MC node
1573: CURSOR get_mc_header_id
1574: IS
1575: SELECT mc_header_id
1576: FROM ahl_mc_relationships
1577: WHERE relationship_id = p_dest_rel_id;
1578:
1579: -- Define cursor get_max_dispord to read the maximum of display orders of the children of a MC node with relationship_id = p_rel_id
1580: CURSOR get_max_dispord

Line 1586: FROM ahl_mc_relationships

1582: p_rel_id in number
1583: )
1584: IS
1585: SELECT max(display_order)
1586: FROM ahl_mc_relationships
1587: WHERE parent_relationship_id = p_rel_id;
1588:
1589: -- Define cursor get_root_node to read details of the top node (in the case of copy_node)
1590: CURSOR get_root_node

Line 1596: FROM ahl_mc_relationships_v

1592: p_topnode_id in number
1593: )
1594: IS
1595: SELECT *
1596: FROM ahl_mc_relationships_v
1597: WHERE relationship_id = p_topnode_id;
1598:
1599: -- Define local variables
1600: l_api_name CONSTANT VARCHAR2(30) := 'Copy_MC_Nodes';

Line 1610: l_root_node_csr_rec ahl_mc_relationships_v%rowtype;

1606: l_node_rec Node_Rec_Type;
1607: l_nodes_tbl Node_Tbl_Type;
1608: l_node_csr_rec get_mc_tree_csr%rowtype;
1609:
1610: l_root_node_csr_rec ahl_mc_relationships_v%rowtype;
1611:
1612:
1613:
1614: -- declared by anraj to remove the CONNECT BY PRIOR on joins

Line 2508: UPDATE ahl_mc_relationships

2504: IF x_msg_count > 0 THEN
2505: RAISE FND_API.G_EXC_ERROR;
2506: END IF;
2507:
2508: UPDATE ahl_mc_relationships
2509: SET item_group_id = l_item_group_id
2510: WHERE relationship_id = p_nodes_tbl(i).relationship_id;
2511:
2512: IF (fnd_log.level_statement >= fnd_log.g_current_runtime_level)

Line 2610: FROM ahl_mc_relationships

2606:
2607: CURSOR check_node_exists
2608: IS
2609: SELECT object_version_number
2610: FROM ahl_mc_relationships
2611: WHERE relationship_id = p_rel_id;
2612:
2613: BEGIN
2614:

Line 2662: FROM ahl_mc_relationships

2658: CURSOR get_node_details
2659: IS
2660: SELECT quantity,
2661: active_end_date
2662: FROM ahl_mc_relationships
2663: WHERE relationship_id = p_x_node_rec.parent_relationship_id;
2664:
2665: -- Define cursor check_subconfig_assos to check whether the parent node has any subconfig associations
2666: CURSOR check_subconfig_assos

Line 2678: FROM ahl_mc_relationships

2674: -- Define cursor check_dup_pos_ref to check whether the parent node does not have the same position reference
2675: CURSOR check_dup_pos_ref
2676: IS
2677: SELECT 'x'
2678: FROM ahl_mc_relationships
2679: WHERE position_ref_code = p_x_node_rec.position_ref_code AND
2680: parent_relationship_id = p_x_node_rec.parent_relationship_id AND
2681: G_TRUNC_DATE < trunc(nvl(active_end_date, G_SYSDATE + 1)) AND
2682: relationship_id <> nvl(p_x_node_rec.relationship_id, -1);

Line 2688: FROM ahl_mc_relationships

2684: -- Define cursor check_topnode_exists to check whether a topnode already exists for the MC
2685: CURSOR check_topnode_exists
2686: IS
2687: SELECT 'x'
2688: FROM ahl_mc_relationships
2689: WHERE parent_relationship_id is null AND
2690: mc_header_id = p_x_node_rec.mc_header_id;
2691:
2692: -- Define cursor get_item_group_id to retrieve item group id, type and status

Line 2718: FROM ahl_mc_relationships

2714: -- Define cursor check_child_exists to check whether the node has any children in which case quantity = 1
2715: CURSOR check_child_exists
2716: IS
2717: SELECT 'x'
2718: FROM ahl_mc_relationships
2719: WHERE parent_relationship_id = p_x_node_rec.relationship_id
2720: AND G_TRUNC_DATE < trunc(nvl(active_end_date, G_SYSDATE + 1));
2721:
2722: -- Define cursor check_dup_display_order to check display order duplication

Line 2726: FROM ahl_mc_relationships

2722: -- Define cursor check_dup_display_order to check display order duplication
2723: CURSOR check_dup_display_order
2724: IS
2725: SELECT 'x'
2726: FROM ahl_mc_relationships
2727: WHERE display_order = p_x_node_rec.display_order AND
2728: parent_relationship_id = p_x_node_rec.parent_relationship_id AND
2729: G_TRUNC_DATE < trunc(nvl(active_end_date, G_SYSDATE + 1)) AND
2730: relationship_id <> nvl(p_x_node_rec.relationship_id, -1);

Line 2736: FROM ahl_mc_relationships

2732: -- Define cursor get_node_dates to retrieve start and end date of the node
2733: CURSOR get_node_dates
2734: IS
2735: SELECT active_start_date, active_end_date
2736: FROM ahl_mc_relationships
2737: WHERE relationship_id = p_x_node_rec.relationship_id;
2738:
2739: -- Declare local variables
2740: l_qty NUMBER;

Line 3339: FROM ahl_mc_relationships_v

3335: -- Define cursor get_node_posref to read the position reference of the MC node, used for displaying errors
3336: CURSOR get_node_posref
3337: IS
3338: SELECT position_ref_meaning
3339: FROM ahl_mc_relationships_v
3340: WHERE relationship_id = p_counter_rule_rec.relationship_id;
3341:
3342: -- Define cursor check_uom_rule to check whether the same combination of UOM and rule
3343: -- already exists for the node or not

Line 3583: FROM ahl_mc_config_relations submc, ahl_mc_relationships node

3579: (
3580: -- Establish parent-child relationship between subconfiguration associations
3581: -- and the MC to which they are associated
3582: SELECT submc.mc_header_id child, node.mc_header_id parent
3583: FROM ahl_mc_config_relations submc, ahl_mc_relationships node
3584: WHERE submc.relationship_id = node.relationship_id
3585: CONNECT BY node.mc_header_id = PRIOR submc.mc_header_id
3586: START WITH node.mc_header_id = p_subconfig_id
3587: ) submc_tree, ahl_mc_relationships mc_node

Line 3587: ) submc_tree, ahl_mc_relationships mc_node

3583: FROM ahl_mc_config_relations submc, ahl_mc_relationships node
3584: WHERE submc.relationship_id = node.relationship_id
3585: CONNECT BY node.mc_header_id = PRIOR submc.mc_header_id
3586: START WITH node.mc_header_id = p_subconfig_id
3587: ) submc_tree, ahl_mc_relationships mc_node
3588: WHERE submc_tree.child = mc_node.mc_header_id AND
3589: mc_node.relationship_id = p_rel_id;
3590:
3591: -- Define cursor get_node_mc_details to read detail of the MC of a MC node

Line 3595: FROM ahl_mc_headers_b mch, ahl_mc_relationships mcr

3591: -- Define cursor get_node_mc_details to read detail of the MC of a MC node
3592: CURSOR get_node_mc_details
3593: IS
3594: SELECT mch.name
3595: FROM ahl_mc_headers_b mch, ahl_mc_relationships mcr
3596: WHERE mch.mc_header_id = mcr.mc_header_id AND
3597: mcr.relationship_id = p_rel_id;
3598:
3599: -- Define cursor get_mc_details to read detail of a MC

Line 3661: FROM ahl_mc_headers_v mch, ahl_mc_relationships mcr

3657:
3658: CURSOR get_node_mc_status
3659: IS
3660: SELECT mch.config_status_code
3661: FROM ahl_mc_headers_v mch, ahl_mc_relationships mcr
3662: WHERE mch.mc_header_id = mcr.mc_header_id AND
3663: mcr.relationship_id = p_rel_id;
3664:
3665: l_status VARCHAR2(30);

Line 3737: ( SELECT relationship_id from ahl_mc_relationships

3733: IS
3734: /* SELECT 'X' FROM ahl_mc_config_relations
3735: WHERE mc_header_id = p_dest_config_id
3736: AND relationship_id IN
3737: ( SELECT relationship_id from ahl_mc_relationships
3738: WHERE mc_header_id = p_subconfig_id
3739: START WITH parent_relationship_id IS NULL
3740: CONNECT BY parent_relationship_id = prior relationship_id);
3741: */

Line 3747: FROM ahl_mc_relationships mcr

3743: FROM ahl_mc_config_relations cnr
3744: WHERE cnr.mc_header_id = p_dest_config_id
3745: AND EXISTS
3746: ( SELECT 'X'
3747: FROM ahl_mc_relationships mcr
3748: WHERE mcr.mc_header_id = p_subconfig_id
3749: AND mcr.relationship_id = cnr.relationship_id );
3750:
3751: BEGIN

Line 3767: ( SELECT relationship_id FROM ahl_mc_relationships

3763: -- Also, changed IN to EXISTS.
3764: /* SELECT mc_header_id bulk collect
3765: INTO l_subconfigs_table
3766: FROM ahl_mc_config_relations WHERE relationship_id IN
3767: ( SELECT relationship_id FROM ahl_mc_relationships
3768: WHERE mc_header_id = p_subconfig_id
3769: START WITH parent_relationship_id IS NULL
3770: CONNECT BY parent_relationship_id = prior relationship_id );
3771: */

Line 3777: FROM ahl_mc_relationships mcr

3773: INTO l_subconfigs_table
3774: FROM ahl_mc_config_relations cnr
3775: WHERE EXISTS
3776: ( SELECT 'X'
3777: FROM ahl_mc_relationships mcr
3778: WHERE mcr.mc_header_id = p_subconfig_id
3779: AND mcr.relationship_id = cnr.relationship_id );
3780:
3781: IF ( l_subconfigs_table.COUNT > 0 ) THEN

Line 3804: FROM ahl_mc_headers_b mch, ahl_mc_relationships mcr

3800: p_rel_id in number
3801: )
3802: IS
3803: SELECT mch.mc_header_id, mch.config_status_code
3804: FROM ahl_mc_headers_b mch, ahl_mc_relationships mcr
3805: WHERE mch.mc_header_id = mcr.mc_header_id AND
3806: mcr.relationship_id = p_rel_id;
3807:
3808: l_mc_header_id NUMBER;

Line 3957: FROM ahl_mc_relationships_v

3953: -- Define cursor get_node_posref to read the position reference of the MC node, used for displaying errors
3954: CURSOR get_node_posref
3955: IS
3956: SELECT position_ref_meaning
3957: FROM ahl_mc_relationships_v
3958: WHERE relationship_id = p_x_counter_rule_rec.relationship_id;
3959:
3960: -- Define cursor check_uom_rule to check whether the same combination of UOM and rule
3961: -- already exists for the node or not

Line 4109: FROM ahl_mc_relationships

4105: -- Define check_root_node to check whether the node to which subconfiguration is being associated is not a topnode of a MC
4106: CURSOR check_root_node
4107: IS
4108: SELECT 'x'
4109: FROM ahl_mc_relationships
4110: WHERE parent_relationship_id is null AND
4111: relationship_id = p_x_subconfig_rec.relationship_id;
4112:
4113: -- Define check_leaf_node to check whether the node to which subconfiguration is being associated is a leaf node

Line 4117: FROM ahl_mc_relationships

4113: -- Define check_leaf_node to check whether the node to which subconfiguration is being associated is a leaf node
4114: CURSOR check_leaf_node
4115: IS
4116: SELECT 'x'
4117: FROM ahl_mc_relationships
4118: WHERE parent_relationship_id = p_x_subconfig_rec.relationship_id AND
4119: G_TRUNC_DATE < trunc(nvl(active_end_date, G_SYSDATE + 1));
4120:
4121: -- Define a cursor to get the MC header id , when a relationship id is given

Line 4125: FROM ahl_mc_relationships

4121: -- Define a cursor to get the MC header id , when a relationship id is given
4122: CURSOR get_dest_header_id(p_dest_rel_id in number)
4123: IS
4124: SELECT mc_header_id
4125: FROM ahl_mc_relationships
4126: WHERE relationship_id = p_dest_rel_id;
4127: -- Define cursor get_node_mc_details to read detail of the MC of a MC node
4128: CURSOR get_node_mc_details(p_dest_rel_id in number)
4129: IS

Line 4131: FROM ahl_mc_headers_b mch, ahl_mc_relationships mcr

4127: -- Define cursor get_node_mc_details to read detail of the MC of a MC node
4128: CURSOR get_node_mc_details(p_dest_rel_id in number)
4129: IS
4130: SELECT mch.name
4131: FROM ahl_mc_headers_b mch, ahl_mc_relationships mcr
4132: WHERE mch.mc_header_id = mcr.mc_header_id AND
4133: mcr.relationship_id = p_dest_rel_id;
4134: -- Define cursor get_mc_details to read detail of a MC
4135: CURSOR get_mc_details(p_subconfig_id in number )

Line 4710: FROM ahl_mc_relationships

4706: -- Define a cursor to get the MC header id , when a relationship id is given
4707: CURSOR get_dest_header_id
4708: IS
4709: SELECT mc_header_id
4710: FROM ahl_mc_relationships
4711: WHERE relationship_id = p_dest_rel_id;
4712: -- Define cursor get_node_mc_details to read detail of the MC of a MC node
4713: CURSOR get_node_mc_details
4714: IS

Line 4716: FROM ahl_mc_headers_b mch, ahl_mc_relationships mcr

4712: -- Define cursor get_node_mc_details to read detail of the MC of a MC node
4713: CURSOR get_node_mc_details
4714: IS
4715: SELECT mch.name
4716: FROM ahl_mc_headers_b mch, ahl_mc_relationships mcr
4717: WHERE mch.mc_header_id = mcr.mc_header_id AND
4718: mcr.relationship_id = p_dest_rel_id;
4719: -- Define cursor get_mc_details to read detail of a MC
4720: CURSOR get_mc_details(p_subconfig_id in number)

Line 4741: FROM ahl_mc_relationships

4737: p_rel_id in number
4738: )
4739: IS
4740: SELECT 'x'
4741: FROM ahl_mc_relationships
4742: WHERE parent_relationship_id = p_rel_id AND
4743: G_TRUNC_DATE < trunc(nvl(active_end_date, G_SYSDATE + 1));
4744:
4745: -- Declare local variables