[Home] [Help]
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
563: WHERE mc_header_id IN
564: (
565: SELECT mc_header_id
566: FROM ahl_mc_relationships
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
584: WHERE relationship_id = p_rel_id
585: )
586: AND parent_relationship_id IS NULL
587: AND mch.mc_header_id = rel.mc_header_id;
1182:
1183: -- ER #2631303 is not valid since there can be no units created from DRAFT MCs
1184:
1185: -- 9d. Delete all subconfiguration associations with the current node
1186: DELETE FROM ahl_mc_config_relations
1187: WHERE relationship_id = l_node_csr_rec.relationship_id;
1188:
1189: IF (fnd_log.level_statement >= fnd_log.g_current_runtime_level)
1190: THEN
2663: -- Define cursor check_subconfig_assos to check whether the parent node has any subconfig associations
2664: CURSOR check_subconfig_assos
2665: IS
2666: SELECT 'x'
2667: FROM ahl_mc_config_relations
2668: WHERE relationship_id = p_x_node_rec.parent_relationship_id;
2669: -- Since expired subconfig associations can be unexpired, so no need to filter on active_end_date
2670: -- AND G_TRUNC_DATE < trunc(nvl(active_end_date, G_SYSDATE + 1));
2671:
3475:
3476: CURSOR check_submc_exists
3477: IS
3478: SELECT object_version_number
3479: FROM ahl_mc_config_relations
3480: WHERE mc_config_relation_id = p_submc_assos_id;
3481:
3482: BEGIN
3483:
3526:
3527: CURSOR check_priority_dup_exists
3528: IS
3529: SELECT priority
3530: FROM ahl_mc_config_relations
3531: WHERE relationship_id = p_subconfig_tbl(1).relationship_id
3532: group by priority
3533: having count(mc_config_relation_id) > 1;
3534:
3576: (
3577: -- Establish parent-child relationship between subconfiguration associations
3578: -- and the MC to which they are associated
3579: SELECT submc.mc_header_id child, node.mc_header_id parent
3580: FROM ahl_mc_config_relations submc, ahl_mc_relationships node
3581: WHERE submc.relationship_id = node.relationship_id
3582: CONNECT BY node.mc_header_id = PRIOR submc.mc_header_id
3583: START WITH node.mc_header_id = p_subconfig_id
3584: ) submc_tree, ahl_mc_relationships mc_node
3725: l_dummy_varchar VARCHAR2(1);
3726: -- cursor to check whether the Cyclic relation really exist.
3727: CURSOR CHECK_RELATIONS_CYCLE
3728: IS
3729: SELECT 'X' FROM ahl_mc_config_relations
3730: WHERE mc_header_id = p_dest_config_id
3731: AND relationship_id IN
3732: ( SELECT relationship_id from ahl_mc_relationships
3733: WHERE mc_header_id = p_subconfig_id
3746: CLOSE CHECK_RELATIONS_CYCLE;
3747: -- get the next level of subconfigs
3748: SELECT mc_header_id bulk collect
3749: INTO l_subconfigs_table
3750: FROM ahl_mc_config_relations WHERE relationship_id IN
3751: ( SELECT relationship_id FROM ahl_mc_relationships
3752: WHERE mc_header_id = p_subconfig_id
3753: START WITH parent_relationship_id IS NULL
3754: CONNECT BY parent_relationship_id = prior relationship_id );
4068: -- Define cursor check_submc_exists to check whether the subconfiguration association already exists for this node
4069: CURSOR check_submc_exists
4070: IS
4071: SELECT name
4072: FROM ahl_mc_config_relations submc, ahl_mc_headers_b mch
4073: WHERE submc.mc_header_id = mch.mc_header_id AND
4074: submc.relationship_id = p_x_subconfig_rec.relationship_id AND
4075: submc.mc_header_id = p_x_subconfig_rec.mc_header_id;
4076: -- Since expired subconfig associations can be unexpired, so no need to filter on active_end_date
4351: p_x_subconfig_rec.object_version_number := 1;
4352: p_x_subconfig_rec.security_group_id := null;
4353:
4354: -- Create association record for destination node
4355: INSERT INTO AHL_MC_CONFIG_RELATIONS
4356: (
4357: MC_CONFIG_RELATION_ID,
4358: RELATIONSHIP_ID,
4359: MC_HEADER_ID,
4432: p_mc_config_rel_id in number
4433: )
4434: IS
4435: SELECT active_start_date, active_end_date
4436: FROM ahl_mc_config_relations
4437: WHERE mc_config_relation_id = p_mc_config_rel_id;
4438:
4439: -- Declare local variables
4440: l_api_name CONSTANT VARCHAR2(30) := 'Modify_Subconfig';
4598:
4599: p_x_subconfig_rec.OBJECT_VERSION_NUMBER := p_x_subconfig_rec.OBJECT_VERSION_NUMBER + 1;
4600:
4601: -- Create association record for destination node
4602: UPDATE AHL_MC_CONFIG_RELATIONS
4603: SET PRIORITY = p_x_subconfig_rec.priority,
4604: ACTIVE_START_DATE = p_x_subconfig_rec.ACTIVE_START_DATE,
4605: ACTIVE_END_DATE = p_x_subconfig_rec.ACTIVE_END_DATE,
4606: LAST_UPDATE_DATE = G_SYSDATE,
4654:
4655: -- Validate p_mc_config_relation_id exists
4656: Validate_Subconfig_Exists(p_mc_config_relation_id, nvl(p_object_ver_num, 0));
4657:
4658: DELETE FROM ahl_mc_config_relations
4659: WHERE mc_config_relation_id = p_mc_config_relation_id;
4660:
4661: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)
4662: THEN
4699: -- Define cursor get_subconfigs to read all valid subconfiguration associations with a particular MC node
4700: CURSOR get_subconfigs
4701: IS
4702: SELECT *
4703: FROM ahl_mc_config_relations
4704: WHERE relationship_id = p_source_rel_id;
4705: -- Expired subconfig associations also need to be copied or else copying position paths will fail
4706: -- AND G_TRUNC_DATE < trunc(nvl(active_end_date, G_SYSDATE + 1));
4707:
4841: -- Set values for l_subconfig_csr_rec
4842: SELECT ahl_mc_config_rel_s.nextval INTO l_mc_config_rel_id FROM DUAL;
4843:
4844: -- Create association record for destination node
4845: INSERT INTO AHL_MC_CONFIG_RELATIONS
4846: (
4847: MC_CONFIG_RELATION_ID,
4848: RELATIONSHIP_ID,
4849: MC_HEADER_ID,