DBA Data[Home] [Help]

APPS.WIP_SCHED_RELATION_GRP dependencies on WIP_CONSTANTS

Line 134: IF p_parentObjectTypeID <> WIP_CONSTANTS.G_Obj_TYPE_WO

130: x_return_status := FND_API.G_RET_STS_SUCCESS;
131:
132:
133: /* Object type can be WO only */
134: IF p_parentObjectTypeID <> WIP_CONSTANTS.G_Obj_TYPE_WO
135: OR p_childObjectTypeID <> WIP_CONSTANTS.G_Obj_TYPE_WO
136: THEN
137: raise INVALID_OBJ_TYPE_EXCEPTION;
138: END IF;

Line 135: OR p_childObjectTypeID <> WIP_CONSTANTS.G_Obj_TYPE_WO

131:
132:
133: /* Object type can be WO only */
134: IF p_parentObjectTypeID <> WIP_CONSTANTS.G_Obj_TYPE_WO
135: OR p_childObjectTypeID <> WIP_CONSTANTS.G_Obj_TYPE_WO
136: THEN
137: raise INVALID_OBJ_TYPE_EXCEPTION;
138: END IF;
139:

Line 142: IF p_relationshipType <> WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED

138: END IF;
139:
140:
141: /* Relationship type can be Type 1(Constrained) or Type 2(Dependent) only */
142: IF p_relationshipType <> WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED
143: AND p_relationshipType <> WIP_CONSTANTS.G_REL_TYPE_DEPENDENT
144: THEN
145: raise INVALID_REL_TYPE_EXCEPTION;
146: END IF;

Line 143: AND p_relationshipType <> WIP_CONSTANTS.G_REL_TYPE_DEPENDENT

139:
140:
141: /* Relationship type can be Type 1(Constrained) or Type 2(Dependent) only */
142: IF p_relationshipType <> WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED
143: AND p_relationshipType <> WIP_CONSTANTS.G_REL_TYPE_DEPENDENT
144: THEN
145: raise INVALID_REL_TYPE_EXCEPTION;
146: END IF;
147:

Line 156: IF p_relationshipStatus <> WIP_CONSTANTS.G_REL_Status_Pending

152: END IF;
153:
154:
155: /* Check if Relationship Status is 0,1,2 and 3 only */
156: IF p_relationshipStatus <> WIP_CONSTANTS.G_REL_Status_Pending
157: AND p_relationshipStatus <> WIP_CONSTANTS.G_REL_Status_Processing
158: AND p_relationshipStatus <> WIP_CONSTANTS.G_REL_Status_Valid
159: AND p_relationshipStatus <> WIP_CONSTANTS.G_REL_Status_Invalid
160: then

Line 157: AND p_relationshipStatus <> WIP_CONSTANTS.G_REL_Status_Processing

153:
154:
155: /* Check if Relationship Status is 0,1,2 and 3 only */
156: IF p_relationshipStatus <> WIP_CONSTANTS.G_REL_Status_Pending
157: AND p_relationshipStatus <> WIP_CONSTANTS.G_REL_Status_Processing
158: AND p_relationshipStatus <> WIP_CONSTANTS.G_REL_Status_Valid
159: AND p_relationshipStatus <> WIP_CONSTANTS.G_REL_Status_Invalid
160: then
161: raise BAD_REL_STATUS_EXCEPTION;

Line 158: AND p_relationshipStatus <> WIP_CONSTANTS.G_REL_Status_Valid

154:
155: /* Check if Relationship Status is 0,1,2 and 3 only */
156: IF p_relationshipStatus <> WIP_CONSTANTS.G_REL_Status_Pending
157: AND p_relationshipStatus <> WIP_CONSTANTS.G_REL_Status_Processing
158: AND p_relationshipStatus <> WIP_CONSTANTS.G_REL_Status_Valid
159: AND p_relationshipStatus <> WIP_CONSTANTS.G_REL_Status_Invalid
160: then
161: raise BAD_REL_STATUS_EXCEPTION;
162: END IF;

Line 159: AND p_relationshipStatus <> WIP_CONSTANTS.G_REL_Status_Invalid

155: /* Check if Relationship Status is 0,1,2 and 3 only */
156: IF p_relationshipStatus <> WIP_CONSTANTS.G_REL_Status_Pending
157: AND p_relationshipStatus <> WIP_CONSTANTS.G_REL_Status_Processing
158: AND p_relationshipStatus <> WIP_CONSTANTS.G_REL_Status_Valid
159: AND p_relationshipStatus <> WIP_CONSTANTS.G_REL_Status_Invalid
160: then
161: raise BAD_REL_STATUS_EXCEPTION;
162: END IF;
163:

Line 168: IF P_RELATIONSHIPTYPE = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED

164:
165: /*----------------------------+
166: | VALIDATE FOR Rel Type 1 |
167: +----------------------------*/
168: IF P_RELATIONSHIPTYPE = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED
169: THEN
170:
171: /* Check Parent AND Child don't have Dependent Relationship */
172:

Line 177: WHERE relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED

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
181: raise DUPLICATE_PARENT_EXCEPTION;

Line 190: WHERE relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT

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
194: CONNECT BY PRIOR child_object_id = parent_object_id

Line 193: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT

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
194: CONNECT BY PRIOR child_object_id = parent_object_id
195: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT;
196:
197:

Line 195: AND 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
194: CONNECT BY PRIOR child_object_id = parent_object_id
195: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT;
196:
197:
198: /* Check IF Parent doesn't lie in Child hierarchy */
199: SELECT count(*) INTO l_count_b

Line 201: WHERE relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT

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
205: CONNECT BY PRIOR child_object_id = parent_object_id

Line 204: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT

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
205: CONNECT BY PRIOR child_object_id = parent_object_id
206: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT;
207:
208:

Line 206: AND 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
205: CONNECT BY PRIOR child_object_id = parent_object_id
206: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT;
207:
208:
209: /* both l_count_a AND l_count_b should be ZERO. */
210: IF l_count_a <>0 OR l_count_b <>0 then

Line 238: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED;

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;
239:
240: END IF;
241: /*----------------------------+
242: | END Relationship TYPE 1 |

Line 252: IF P_RELATIONSHIPTYPE = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT

248:
249: /*----------------------------+
250: | VALIDATE FOR Rel Type 2 |
251: +----------------------------*/
252: IF P_RELATIONSHIPTYPE = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT
253: THEN
254:
255:
256: /* Check Parent AND Child don't have CONSTRAINED Relationship */

Line 261: WHERE relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED

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
265: CONNECT BY PRIOR child_object_id = parent_object_id

Line 264: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED

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
265: CONNECT BY PRIOR child_object_id = parent_object_id
266: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED;
267:
268: /* Check if Parent doesn't lie in Child hierarchy */

Line 266: AND 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
265: CONNECT BY PRIOR child_object_id = parent_object_id
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

Line 271: WHERE 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
275: CONNECT BY PRIOR child_object_id = parent_object_id

Line 274: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED

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
275: CONNECT BY PRIOR child_object_id = parent_object_id
276: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED;
277:
278: /* both l_count_a AND l_count_b should be ZERO. */

Line 276: AND 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
275: CONNECT BY PRIOR child_object_id = parent_object_id
276: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED;
277:
278: /* both l_count_a AND l_count_b should be ZERO. */
279: IF l_count_a <>0 OR l_count_b <>0 then
280: raise CONST_REL_EXIST_EXCEPTION;

Line 293: WHERE relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT

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
297: CONNECT BY PRIOR child_object_id = parent_object_id

Line 296: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT

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
297: CONNECT BY PRIOR child_object_id = parent_object_id
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 */

Line 298: AND 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
297: CONNECT BY PRIOR child_object_id = parent_object_id
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

Line 303: WHERE 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
307: CONNECT BY PRIOR child_object_id = parent_object_id

Line 306: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT

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
307: CONNECT BY PRIOR child_object_id = parent_object_id
308: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT;
309:
310: /* both l_count_a AND l_count_b should be ZERO. */

Line 308: AND 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
307: CONNECT BY PRIOR child_object_id = parent_object_id
308: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT;
309:
310: /* both l_count_a AND l_count_b should be ZERO. */
311: IF l_count_a <>0 OR l_count_b <>0 then
312: raise LOOP_FOUND_EXCEPTION;

Line 587: WHERE relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT

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
591: FROM wip_sched_relationships

Line 659: IF l_relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED

655:
656: /*-------------------+
657: | FOR Rel Type 1 |
658: +-------------------*/
659: IF l_relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED
660: then
661:
662: /* Check CHILD not involved in any rel type 2 */
663: SELECT count(*) INTO l_count_a

Line 665: WHERE relationship_type = WIP_CONSTANTS.G_REL_TYPE_DEPENDENT

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:
669: IF l_count_a <> 0

Line 681: WHERE relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED

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
685: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED);

Line 683: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED

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
685: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED);
686:
687:

Line 685: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED);

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
685: AND relationship_type = WIP_CONSTANTS.G_REL_TYPE_CONSTRAINED);
686:
687:
688: /* UPDATE Top_level_object_id for all Rel type 2 relationships under Parent_object */
689: FOR dependent_rel_cur_rec IN dependent_rels_cur