DBA Data[Home] [Help]

APPS.WIP_SCHED_RELATION_GRP dependencies on WIP_SCHED_RELATIONSHIPS

Line 25: * inserted in WIP_SCHED_RELATIONSHIPS Table *

21:
22: /******************************************************************************
23: * PROCEDURE INSERTROW *
24: * This procedure is used to validate AND create Relationships to be *
25: * inserted in WIP_SCHED_RELATIONSHIPS Table *
26: * The input parameters for this procedure are: *
27: * p_parentObjectID : Parent Object Idetifier *
28: * p_parentObjectTypeID : Parent Object type Idetifier *
29: * p_childObjectID : Child Object Idetifier *

Line 69: FROM wip_sched_relationships

65:
66: CURSOR top_level_object_cur IS
67: SELECT top_level_object_id,
68: top_level_object_type_id
69: FROM wip_sched_relationships
70: WHERE child_object_id = p_parentObjectID
71: AND relationship_type = 1;
72:
73: CURSOR top_id_rel2_parent_cur IS

Line 76: FROM wip_sched_relationships

72:
73: CURSOR top_id_rel2_parent_cur IS
74: SELECT top_level_object_id,
75: top_level_object_type_id
76: FROM wip_sched_relationships
77: WHERE child_object_id = p_parentObjectID
78: AND relationship_type = 1;
79:
80: CURSOR top_id_rel2_child_cur IS

Line 83: FROM wip_sched_relationships

79:
80: CURSOR top_id_rel2_child_cur IS
81: SELECT top_level_object_id,
82: top_level_object_type_id
83: FROM wip_sched_relationships
84: WHERE child_object_id = p_childObjectID
85: AND relationship_type = 1;
86:
87: l_top_level_object_id NUMBER;

Line 176: FROM wip_sched_relationships

172:
173: /* Check that the Child doesn't already have an existing Parent */
174: SELECT count(*)
175: INTO l_count_a
176: FROM wip_sched_relationships
177: WHERE relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED
178: AND child_object_id = p_childObjectID;
179:
180: IF l_count_a <>0 then

Line 189: FROM wip_sched_relationships

185: l_count_a := 0;
186: /* Check IF Child doesn't lie in Parent hierarchy */
187: SELECT count(*)
188: INTO l_count_a
189: FROM wip_sched_relationships
190: WHERE relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT
191: AND child_object_id = p_childObjectID
192: START WITH parent_object_id = p_parentObjectID
193: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT

Line 200: FROM wip_sched_relationships

196:
197:
198: /* Check IF Parent doesn't lie in Child hierarchy */
199: SELECT count(*) INTO l_count_b
200: FROM wip_sched_relationships
201: WHERE relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT
202: AND child_object_id = p_parentObjectID
203: START WITH parent_object_id = p_childObjectID
204: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT

Line 234: UPDATE wip_sched_relationships

230: CLOSE top_level_object_cur;
231:
232:
233: /* For Rel Type 1, UPDATE TOP_LEVEL_OBJECT_ID for all records whose parent is CHILD */
234: UPDATE wip_sched_relationships
235: SET top_level_object_id = l_top_level_object_id,
236: top_level_object_type_id = l_top_level_object_type_id
237: WHERE top_level_object_id = p_childObjectID
238: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED;

Line 260: FROM wip_sched_relationships

256: /* Check Parent AND Child don't have CONSTRAINED Relationship */
257:
258: /* Check if Child doesn't lie in Parent hierarchy */
259: SELECT count(*) INTO l_count_a
260: FROM wip_sched_relationships
261: WHERE relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED
262: AND child_object_id = p_childObjectID
263: START WITH parent_object_id = p_parentObjectID
264: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED

Line 270: FROM wip_sched_relationships

266: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED;
267:
268: /* Check if Parent doesn't lie in Child hierarchy */
269: SELECT count(*) INTO l_count_b
270: FROM wip_sched_relationships
271: WHERE relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED
272: AND child_object_id = p_parentObjectID
273: START WITH parent_object_id = p_childObjectID
274: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED

Line 292: FROM wip_sched_relationships

288: | CHECK FOR LOOP IN CASE of DEPENDENT Relationships |
289: +------------------------------------------------------*/
290: /* Check if Child doesn't lie in Parent hierarchy for Rel Type 2 */
291: SELECT count(*) INTO l_count_a
292: FROM wip_sched_relationships
293: WHERE relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT
294: AND child_object_id = p_childObjectID
295: START WITH parent_object_id = p_parentObjectID
296: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT

Line 302: FROM wip_sched_relationships

298: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT;
299:
300: /* Check if Parent doesn't lie in Child hierarchy for Rel Type 2 */
301: SELECT count(*) INTO l_count_b
302: FROM wip_sched_relationships
303: WHERE relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT
304: AND child_object_id = p_parentObjectID
305: START WITH parent_object_id = p_childObjectID
306: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT

Line 357: INSERT INTO WIP_SCHED_RELATIONSHIPS(

353: l_last_UPDATE_date := SYSDATE;
354: l_last_UPDATEd_by := FND_GLOBAL.USER_ID;
355: l_last_UPDATE_login := FND_GLOBAL.LOGIN_ID;
356:
357: INSERT INTO WIP_SCHED_RELATIONSHIPS(
358: SCHED_RELATIONSHIP_ID,
359: PARENT_OBJECT_ID,
360: PARENT_OBJECT_TYPE_ID,
361: CHILD_OBJECT_ID,

Line 373: WIP_SCHED_RELATIONSHIPS_S.NEXTVAL,

369: LAST_UPDATED_BY,
370: LAST_UPDATE_DATE,
371: Last_UPDATE_Login)
372: VALUES(
373: WIP_SCHED_RELATIONSHIPS_S.NEXTVAL,
374: p_parentObjectID,
375: p_parentObjectTypeID,
376: p_childObjectID,
377: p_childObjectTypeID,

Line 547: * WIP_SCHED_RELATIONSHIPS Table *

543:
544: /************************************************************************
545: * PROCEDURE DELETEROW *
546: * This procedure is used to validate AND DELETE Relationships FROM *
547: * WIP_SCHED_RELATIONSHIPS Table *
548: * The input parameters for this procedure are: *
549: * p_relationshipID : Relationship idetifier to be deleted *
550: * x_return_status : To indicate procedure success, failure, error *
551: * x_msg_count : To indicate number of msgs in msg list *

Line 586: FROM wip_sched_relationships

582: DELETE_FAIL_EXCEPTION EXCEPTION;
583:
584: CURSOR dependent_rels_cur IS
585: SELECT distinct sched_relationship_id
586: FROM wip_sched_relationships
587: WHERE relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT
588: AND sched_relationship_id
589: IN
590: (SELECT SCHED_RELATIONSHIP_ID

Line 591: FROM wip_sched_relationships

587: WHERE relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT
588: AND sched_relationship_id
589: IN
590: (SELECT SCHED_RELATIONSHIP_ID
591: FROM wip_sched_relationships
592: START WITH parent_object_id = l_parent_object_id
593: CONNECT BY PRIOR child_object_id = parent_object_id);
594:
595: CURSOR top_id_rel2_parent_cur IS

Line 598: FROM wip_sched_relationships

594:
595: CURSOR top_id_rel2_parent_cur IS
596: SELECT top_level_object_id,
597: top_level_object_type_id
598: FROM wip_sched_relationships
599: WHERE relationship_type = 1
600: AND child_object_id =
601: (SELECT parent_object_id
602: FROM wip_sched_relationships

Line 602: FROM wip_sched_relationships

598: FROM wip_sched_relationships
599: WHERE relationship_type = 1
600: AND child_object_id =
601: (SELECT parent_object_id
602: FROM wip_sched_relationships
603: WHERE sched_relationship_id =
604: l_relationship_id_tmp);
605:
606: CURSOR top_id_rel2_child_cur IS

Line 609: FROM wip_sched_relationships

605:
606: CURSOR top_id_rel2_child_cur IS
607: SELECT top_level_object_id,
608: top_level_object_type_id
609: FROM wip_sched_relationships
610: WHERE relationship_type = 1
611: AND child_object_id =
612: (SELECT child_object_id
613: FROM wip_sched_relationships

Line 613: FROM wip_sched_relationships

609: FROM wip_sched_relationships
610: WHERE relationship_type = 1
611: AND child_object_id =
612: (SELECT child_object_id
613: FROM wip_sched_relationships
614: WHERE sched_relationship_id =
615: l_relationship_id_tmp);
616:
617: BEGIN

Line 647: FROM WIP_SCHED_RELATIONSHIPS

643: relationship_type
644: INTO l_child_object_id,
645: l_parent_object_id,
646: l_relationship_type
647: FROM WIP_SCHED_RELATIONSHIPS
648: WHERE sched_relationship_ID = p_relationshipID;
649: EXCEPTION
650: When NO_DATA_FOUND then
651: raise NO_SUCH_RELID_EXCEPTION;

Line 664: FROM wip_sched_relationships

660: then
661:
662: /* Check CHILD not involved in any rel type 2 */
663: SELECT count(*) INTO l_count_a
664: FROM wip_sched_relationships
665: WHERE relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT
666: AND (parent_object_id = l_child_object_id
667: OR child_object_id = l_child_object_id);
668:

Line 676: UPDATE wip_sched_relationships

672: END IF;
673:
674:
675: /* UPDATE the TOP_LEVEL_OBJECT_ID of the subtree rooted at CHILD to be CHILD */
676: UPDATE wip_sched_relationships
677: SET top_level_object_id = l_child_object_id
678: WHERE SCHED_RELATIONSHIP_ID
679: IN
680: (SELECT SCHED_RELATIONSHIP_ID FROM wip_sched_relationships

Line 680: (SELECT SCHED_RELATIONSHIP_ID FROM wip_sched_relationships

676: UPDATE wip_sched_relationships
677: SET top_level_object_id = l_child_object_id
678: WHERE SCHED_RELATIONSHIP_ID
679: IN
680: (SELECT SCHED_RELATIONSHIP_ID FROM wip_sched_relationships
681: WHERE relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED
682: START WITH parent_object_id = l_child_object_id
683: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED
684: CONNECT BY PRIOR child_object_id = parent_object_id

Line 702: UPDATE wip_sched_relationships

698: /*if top_level_object_id of parent Or Child node in Rel type 2 is either NULL or Not equal */
699: /* UPDATE it to NULL*/
700: IF l_top_level_object_id_tmp1 <> l_top_level_object_id_tmp2
701: then
702: UPDATE wip_sched_relationships
703: SET top_level_object_id = NULL
704: WHERE sched_relationship_id = l_relationship_id_tmp;
705: END IF;
706:

Line 718: DELETE FROM WIP_SCHED_RELATIONSHIPS

714: | END IF for Rel type 1|
715: +---------------------*/
716:
717: /* Delete the row NOW */
718: DELETE FROM WIP_SCHED_RELATIONSHIPS
719: WHERE SCHED_RELATIONSHIP_ID = p_relationshipID ;
720:
721: /* Check IF Delete fails */
722: IF SQL%NOTFOUND THEN