203: cursor c_invalid_rows is
204: select interface_id
205: from wip_job_dtls_interface wjdi
206: where wjdi.group_id = p_group_id
207: and wjdi.process_phase = wip_constants.ml_validation
208: and wjdi.process_status in (wip_constants.running,
209: wip_constants.pending,
210: wip_constants.warning)
211: and wjdi.wip_entity_id = p_wip_entity_id
204: select interface_id
205: from wip_job_dtls_interface wjdi
206: where wjdi.group_id = p_group_id
207: and wjdi.process_phase = wip_constants.ml_validation
208: and wjdi.process_status in (wip_constants.running,
209: wip_constants.pending,
210: wip_constants.warning)
211: and wjdi.wip_entity_id = p_wip_entity_id
212: and wjdi.organization_id = p_organization_id
205: from wip_job_dtls_interface wjdi
206: where wjdi.group_id = p_group_id
207: and wjdi.process_phase = wip_constants.ml_validation
208: and wjdi.process_status in (wip_constants.running,
209: wip_constants.pending,
210: wip_constants.warning)
211: and wjdi.wip_entity_id = p_wip_entity_id
212: and wjdi.organization_id = p_organization_id
213: and wjdi.load_type = wip_job_details.wip_serial
206: where wjdi.group_id = p_group_id
207: and wjdi.process_phase = wip_constants.ml_validation
208: and wjdi.process_status in (wip_constants.running,
209: wip_constants.pending,
210: wip_constants.warning)
211: and wjdi.wip_entity_id = p_wip_entity_id
212: and wjdi.organization_id = p_organization_id
213: and wjdi.load_type = wip_job_details.wip_serial
214: and wjdi.substitution_type = p_substitution_type
232: end loop;
233:
234: if(x_return_status <> fnd_api.g_ret_sts_success) then
235: update wip_job_dtls_interface wjdi
236: set process_status = wip_constants.error
237: where group_id = p_group_id
238: and process_phase = wip_constants.ml_validation
239: and process_status in (wip_constants.running,
240: wip_constants.pending,
234: if(x_return_status <> fnd_api.g_ret_sts_success) then
235: update wip_job_dtls_interface wjdi
236: set process_status = wip_constants.error
237: where group_id = p_group_id
238: and process_phase = wip_constants.ml_validation
239: and process_status in (wip_constants.running,
240: wip_constants.pending,
241: wip_constants.warning)
242: and wip_entity_id = p_wip_entity_id
235: update wip_job_dtls_interface wjdi
236: set process_status = wip_constants.error
237: where group_id = p_group_id
238: and process_phase = wip_constants.ml_validation
239: and process_status in (wip_constants.running,
240: wip_constants.pending,
241: wip_constants.warning)
242: and wip_entity_id = p_wip_entity_id
243: and organization_id = p_organization_id
236: set process_status = wip_constants.error
237: where group_id = p_group_id
238: and process_phase = wip_constants.ml_validation
239: and process_status in (wip_constants.running,
240: wip_constants.pending,
241: wip_constants.warning)
242: and wip_entity_id = p_wip_entity_id
243: and organization_id = p_organization_id
244: and wjdi.load_type = wip_job_details.wip_serial
237: where group_id = p_group_id
238: and process_phase = wip_constants.ml_validation
239: and process_status in (wip_constants.running,
240: wip_constants.pending,
241: wip_constants.warning)
242: and wip_entity_id = p_wip_entity_id
243: and organization_id = p_organization_id
244: and wjdi.load_type = wip_job_details.wip_serial
245: and wjdi.substitution_type = p_substitution_type
259: wjdi.rowid
260: from wip_job_dtls_interface wjdi,
261: wip_entities we
262: where wjdi.group_id = p_group_id
263: and wjdi.process_phase = wip_constants.ml_validation
264: and wjdi.process_status in (wip_constants.running,
265: wip_constants.pending,
266: wip_constants.warning)
267: and wjdi.wip_entity_id = p_wip_entity_id
260: from wip_job_dtls_interface wjdi,
261: wip_entities we
262: where wjdi.group_id = p_group_id
263: and wjdi.process_phase = wip_constants.ml_validation
264: and wjdi.process_status in (wip_constants.running,
265: wip_constants.pending,
266: wip_constants.warning)
267: and wjdi.wip_entity_id = p_wip_entity_id
268: and wjdi.organization_id = p_organization_id
261: wip_entities we
262: where wjdi.group_id = p_group_id
263: and wjdi.process_phase = wip_constants.ml_validation
264: and wjdi.process_status in (wip_constants.running,
265: wip_constants.pending,
266: wip_constants.warning)
267: and wjdi.wip_entity_id = p_wip_entity_id
268: and wjdi.organization_id = p_organization_id
269: and wjdi.load_type = wip_job_details.wip_serial
262: where wjdi.group_id = p_group_id
263: and wjdi.process_phase = wip_constants.ml_validation
264: and wjdi.process_status in (wip_constants.running,
265: wip_constants.pending,
266: wip_constants.warning)
267: and wjdi.wip_entity_id = p_wip_entity_id
268: and wjdi.organization_id = p_organization_id
269: and wjdi.load_type = wip_job_details.wip_serial
270: and wjdi.substitution_type = p_substitution_type
308: p_text => substr(fnd_message.get,1,500),
309: p_error_type => wip_jdi_utils.msg_error);
310: end if;
311: update wip_job_dtls_interface wjdi
312: set process_status = wip_constants.error
313: where rowid = l_ser_rec.rowid;
314: end if;
315: end loop;
316: end create_serials;
323: cursor c_invalid_rows is
324: select interface_id
325: from wip_job_dtls_interface wjdi
326: where wjdi.group_id = p_group_id
327: and wjdi.process_phase = wip_constants.ml_validation
328: and wjdi.process_status in (wip_constants.running,
329: wip_constants.pending,
330: wip_constants.warning)
331: and wjdi.wip_entity_id = p_wip_entity_id
324: select interface_id
325: from wip_job_dtls_interface wjdi
326: where wjdi.group_id = p_group_id
327: and wjdi.process_phase = wip_constants.ml_validation
328: and wjdi.process_status in (wip_constants.running,
329: wip_constants.pending,
330: wip_constants.warning)
331: and wjdi.wip_entity_id = p_wip_entity_id
332: and wjdi.organization_id = p_organization_id
325: from wip_job_dtls_interface wjdi
326: where wjdi.group_id = p_group_id
327: and wjdi.process_phase = wip_constants.ml_validation
328: and wjdi.process_status in (wip_constants.running,
329: wip_constants.pending,
330: wip_constants.warning)
331: and wjdi.wip_entity_id = p_wip_entity_id
332: and wjdi.organization_id = p_organization_id
333: and wjdi.load_type = wip_job_details.wip_serial
326: where wjdi.group_id = p_group_id
327: and wjdi.process_phase = wip_constants.ml_validation
328: and wjdi.process_status in (wip_constants.running,
329: wip_constants.pending,
330: wip_constants.warning)
331: and wjdi.wip_entity_id = p_wip_entity_id
332: and wjdi.organization_id = p_organization_id
333: and wjdi.load_type = wip_job_details.wip_serial
334: and wjdi.substitution_type = p_substitution_type
352: end loop;
353:
354: if(x_return_status <> fnd_api.g_ret_sts_success) then
355: update wip_job_dtls_interface wjdi
356: set process_status = wip_constants.error
357: where group_id = p_group_id
358: and process_phase = wip_constants.ml_validation
359: and process_status in (wip_constants.running,
360: wip_constants.pending,
354: if(x_return_status <> fnd_api.g_ret_sts_success) then
355: update wip_job_dtls_interface wjdi
356: set process_status = wip_constants.error
357: where group_id = p_group_id
358: and process_phase = wip_constants.ml_validation
359: and process_status in (wip_constants.running,
360: wip_constants.pending,
361: wip_constants.warning)
362: and wip_entity_id = p_wip_entity_id
355: update wip_job_dtls_interface wjdi
356: set process_status = wip_constants.error
357: where group_id = p_group_id
358: and process_phase = wip_constants.ml_validation
359: and process_status in (wip_constants.running,
360: wip_constants.pending,
361: wip_constants.warning)
362: and wip_entity_id = p_wip_entity_id
363: and organization_id = p_organization_id
356: set process_status = wip_constants.error
357: where group_id = p_group_id
358: and process_phase = wip_constants.ml_validation
359: and process_status in (wip_constants.running,
360: wip_constants.pending,
361: wip_constants.warning)
362: and wip_entity_id = p_wip_entity_id
363: and organization_id = p_organization_id
364: and wjdi.load_type = wip_job_details.wip_serial
357: where group_id = p_group_id
358: and process_phase = wip_constants.ml_validation
359: and process_status in (wip_constants.running,
360: wip_constants.pending,
361: wip_constants.warning)
362: and wip_entity_id = p_wip_entity_id
363: and organization_id = p_organization_id
364: and wjdi.load_type = wip_job_details.wip_serial
365: and wjdi.substitution_type = p_substitution_type
375: cursor c_invalid_rows is
376: select interface_id
377: from wip_job_dtls_interface wjdi
378: where wjdi.group_id = p_group_id
379: and wjdi.process_phase = wip_constants.ml_validation
380: and wjdi.process_status in (wip_constants.running,
381: wip_constants.pending,
382: wip_constants.warning)
383: and wjdi.wip_entity_id = p_wip_entity_id
376: select interface_id
377: from wip_job_dtls_interface wjdi
378: where wjdi.group_id = p_group_id
379: and wjdi.process_phase = wip_constants.ml_validation
380: and wjdi.process_status in (wip_constants.running,
381: wip_constants.pending,
382: wip_constants.warning)
383: and wjdi.wip_entity_id = p_wip_entity_id
384: and wjdi.organization_id = p_organization_id
377: from wip_job_dtls_interface wjdi
378: where wjdi.group_id = p_group_id
379: and wjdi.process_phase = wip_constants.ml_validation
380: and wjdi.process_status in (wip_constants.running,
381: wip_constants.pending,
382: wip_constants.warning)
383: and wjdi.wip_entity_id = p_wip_entity_id
384: and wjdi.organization_id = p_organization_id
385: and wjdi.load_type = wip_job_details.wip_serial
378: where wjdi.group_id = p_group_id
379: and wjdi.process_phase = wip_constants.ml_validation
380: and wjdi.process_status in (wip_constants.running,
381: wip_constants.pending,
382: wip_constants.warning)
383: and wjdi.wip_entity_id = p_wip_entity_id
384: and wjdi.organization_id = p_organization_id
385: and wjdi.load_type = wip_job_details.wip_serial
386: and wjdi.substitution_type = p_substitution_type
412: end loop;
413:
414: if(x_return_status <> fnd_api.g_ret_sts_success) then
415: update wip_job_dtls_interface wjdi
416: set process_status = wip_constants.error
417: where group_id = p_group_id
418: and process_phase = wip_constants.ml_validation
419: and process_status in (wip_constants.running,
420: wip_constants.pending,
414: if(x_return_status <> fnd_api.g_ret_sts_success) then
415: update wip_job_dtls_interface wjdi
416: set process_status = wip_constants.error
417: where group_id = p_group_id
418: and process_phase = wip_constants.ml_validation
419: and process_status in (wip_constants.running,
420: wip_constants.pending,
421: wip_constants.warning)
422: and wip_entity_id = p_wip_entity_id
415: update wip_job_dtls_interface wjdi
416: set process_status = wip_constants.error
417: where group_id = p_group_id
418: and process_phase = wip_constants.ml_validation
419: and process_status in (wip_constants.running,
420: wip_constants.pending,
421: wip_constants.warning)
422: and wip_entity_id = p_wip_entity_id
423: and organization_id = p_organization_id
416: set process_status = wip_constants.error
417: where group_id = p_group_id
418: and process_phase = wip_constants.ml_validation
419: and process_status in (wip_constants.running,
420: wip_constants.pending,
421: wip_constants.warning)
422: and wip_entity_id = p_wip_entity_id
423: and organization_id = p_organization_id
424: and wjdi.load_type = wip_job_details.wip_serial
417: where group_id = p_group_id
418: and process_phase = wip_constants.ml_validation
419: and process_status in (wip_constants.running,
420: wip_constants.pending,
421: wip_constants.warning)
422: and wip_entity_id = p_wip_entity_id
423: and organization_id = p_organization_id
424: and wjdi.load_type = wip_job_details.wip_serial
425: and wjdi.substitution_type = p_substitution_type
445: cursor c_invalid_rows is
446: select interface_id
447: from wip_job_dtls_interface wjdi
448: where wjdi.group_id = p_group_id
449: and wjdi.process_phase = wip_constants.ml_validation
450: and wjdi.process_status in (wip_constants.running,
451: wip_constants.pending,
452: wip_constants.warning)
453: and wjdi.wip_entity_id = p_wip_entity_id
446: select interface_id
447: from wip_job_dtls_interface wjdi
448: where wjdi.group_id = p_group_id
449: and wjdi.process_phase = wip_constants.ml_validation
450: and wjdi.process_status in (wip_constants.running,
451: wip_constants.pending,
452: wip_constants.warning)
453: and wjdi.wip_entity_id = p_wip_entity_id
454: and wjdi.organization_id = p_organization_id
447: from wip_job_dtls_interface wjdi
448: where wjdi.group_id = p_group_id
449: and wjdi.process_phase = wip_constants.ml_validation
450: and wjdi.process_status in (wip_constants.running,
451: wip_constants.pending,
452: wip_constants.warning)
453: and wjdi.wip_entity_id = p_wip_entity_id
454: and wjdi.organization_id = p_organization_id
455: and wjdi.load_type = wip_job_details.wip_serial
448: where wjdi.group_id = p_group_id
449: and wjdi.process_phase = wip_constants.ml_validation
450: and wjdi.process_status in (wip_constants.running,
451: wip_constants.pending,
452: wip_constants.warning)
453: and wjdi.wip_entity_id = p_wip_entity_id
454: and wjdi.organization_id = p_organization_id
455: and wjdi.load_type = wip_job_details.wip_serial
456: and wjdi.substitution_type = p_substitution_type
483: end loop;
484:
485: if(x_return_status <> fnd_api.g_ret_sts_success) then
486: update wip_job_dtls_interface wjdi
487: set process_status = wip_constants.error
488: where group_id = p_group_id
489: and process_phase = wip_constants.ml_validation
490: and process_status in (wip_constants.running,
491: wip_constants.pending,
485: if(x_return_status <> fnd_api.g_ret_sts_success) then
486: update wip_job_dtls_interface wjdi
487: set process_status = wip_constants.error
488: where group_id = p_group_id
489: and process_phase = wip_constants.ml_validation
490: and process_status in (wip_constants.running,
491: wip_constants.pending,
492: wip_constants.warning)
493: and wip_entity_id = p_wip_entity_id
486: update wip_job_dtls_interface wjdi
487: set process_status = wip_constants.error
488: where group_id = p_group_id
489: and process_phase = wip_constants.ml_validation
490: and process_status in (wip_constants.running,
491: wip_constants.pending,
492: wip_constants.warning)
493: and wip_entity_id = p_wip_entity_id
494: and organization_id = p_organization_id
487: set process_status = wip_constants.error
488: where group_id = p_group_id
489: and process_phase = wip_constants.ml_validation
490: and process_status in (wip_constants.running,
491: wip_constants.pending,
492: wip_constants.warning)
493: and wip_entity_id = p_wip_entity_id
494: and organization_id = p_organization_id
495: and wjdi.load_type = wip_job_details.wip_serial
488: where group_id = p_group_id
489: and process_phase = wip_constants.ml_validation
490: and process_status in (wip_constants.running,
491: wip_constants.pending,
492: wip_constants.warning)
493: and wip_entity_id = p_wip_entity_id
494: and organization_id = p_organization_id
495: and wjdi.load_type = wip_job_details.wip_serial
496: and wjdi.substitution_type = p_substitution_type
516: cursor c_invalid_rows is
517: select interface_id
518: from wip_job_dtls_interface wjdi
519: where wjdi.group_id = p_group_id
520: and wjdi.process_phase = wip_constants.ml_validation
521: and wjdi.process_status in (wip_constants.running,
522: wip_constants.pending,
523: wip_constants.warning)
524: and wjdi.wip_entity_id = p_wip_entity_id
517: select interface_id
518: from wip_job_dtls_interface wjdi
519: where wjdi.group_id = p_group_id
520: and wjdi.process_phase = wip_constants.ml_validation
521: and wjdi.process_status in (wip_constants.running,
522: wip_constants.pending,
523: wip_constants.warning)
524: and wjdi.wip_entity_id = p_wip_entity_id
525: and wjdi.organization_id = p_organization_id
518: from wip_job_dtls_interface wjdi
519: where wjdi.group_id = p_group_id
520: and wjdi.process_phase = wip_constants.ml_validation
521: and wjdi.process_status in (wip_constants.running,
522: wip_constants.pending,
523: wip_constants.warning)
524: and wjdi.wip_entity_id = p_wip_entity_id
525: and wjdi.organization_id = p_organization_id
526: and wjdi.substitution_type = p_substitution_type
519: where wjdi.group_id = p_group_id
520: and wjdi.process_phase = wip_constants.ml_validation
521: and wjdi.process_status in (wip_constants.running,
522: wip_constants.pending,
523: wip_constants.warning)
524: and wjdi.wip_entity_id = p_wip_entity_id
525: and wjdi.organization_id = p_organization_id
526: and wjdi.substitution_type = p_substitution_type
527: and wjdi.load_type = wip_job_details.wip_serial
528: and not exists (select 1
529: from wip_job_schedule_interface wjsi
530: where wjsi.header_id = wjdi.parent_header_id
531: and wjsi.group_id = wjdi.group_id
532: and wjsi.load_type in (wip_constants.create_job,
533: wip_constants.create_ns_job,
534: wip_constants.resched_job));
535:
536: begin
529: from wip_job_schedule_interface wjsi
530: where wjsi.header_id = wjdi.parent_header_id
531: and wjsi.group_id = wjdi.group_id
532: and wjsi.load_type in (wip_constants.create_job,
533: wip_constants.create_ns_job,
534: wip_constants.resched_job));
535:
536: begin
537: x_return_status := fnd_api.g_ret_sts_success;
530: where wjsi.header_id = wjdi.parent_header_id
531: and wjsi.group_id = wjdi.group_id
532: and wjsi.load_type in (wip_constants.create_job,
533: wip_constants.create_ns_job,
534: wip_constants.resched_job));
535:
536: begin
537: x_return_status := fnd_api.g_ret_sts_success;
538: for l_inv_row in c_invalid_rows loop
551: end loop;
552:
553: if(x_return_status <> fnd_api.g_ret_sts_success) then
554: update wip_job_dtls_interface wjdi
555: set process_status = wip_constants.error
556: where group_id = p_group_id
557: and process_phase = wip_constants.ml_validation
558: and process_status in (wip_constants.running,
559: wip_constants.pending,
553: if(x_return_status <> fnd_api.g_ret_sts_success) then
554: update wip_job_dtls_interface wjdi
555: set process_status = wip_constants.error
556: where group_id = p_group_id
557: and process_phase = wip_constants.ml_validation
558: and process_status in (wip_constants.running,
559: wip_constants.pending,
560: wip_constants.warning)
561: and wip_entity_id = p_wip_entity_id
554: update wip_job_dtls_interface wjdi
555: set process_status = wip_constants.error
556: where group_id = p_group_id
557: and process_phase = wip_constants.ml_validation
558: and process_status in (wip_constants.running,
559: wip_constants.pending,
560: wip_constants.warning)
561: and wip_entity_id = p_wip_entity_id
562: and organization_id = p_organization_id
555: set process_status = wip_constants.error
556: where group_id = p_group_id
557: and process_phase = wip_constants.ml_validation
558: and process_status in (wip_constants.running,
559: wip_constants.pending,
560: wip_constants.warning)
561: and wip_entity_id = p_wip_entity_id
562: and organization_id = p_organization_id
563: and wjdi.substitution_type = p_substitution_type
556: where group_id = p_group_id
557: and process_phase = wip_constants.ml_validation
558: and process_status in (wip_constants.running,
559: wip_constants.pending,
560: wip_constants.warning)
561: and wip_entity_id = p_wip_entity_id
562: and organization_id = p_organization_id
563: and wjdi.substitution_type = p_substitution_type
564: and wjdi.load_type = wip_job_details.wip_serial
565: and not exists (select 1
566: from wip_job_schedule_interface wjsi
567: where wjsi.header_id = wjdi.parent_header_id
568: and wjsi.group_id = wjdi.group_id
569: and wjsi.load_type in (wip_constants.create_job,
570: wip_constants.create_ns_job,
571: wip_constants.resched_job));
572: end if;
573: end valid_parent_load_type;
566: from wip_job_schedule_interface wjsi
567: where wjsi.header_id = wjdi.parent_header_id
568: and wjsi.group_id = wjdi.group_id
569: and wjsi.load_type in (wip_constants.create_job,
570: wip_constants.create_ns_job,
571: wip_constants.resched_job));
572: end if;
573: end valid_parent_load_type;
574:
567: where wjsi.header_id = wjdi.parent_header_id
568: and wjsi.group_id = wjdi.group_id
569: and wjsi.load_type in (wip_constants.create_job,
570: wip_constants.create_ns_job,
571: wip_constants.resched_job));
572: end if;
573: end valid_parent_load_type;
574:
575: procedure valid_job_exists(p_group_id in number,
580: cursor c_invalid_rows is
581: select interface_id
582: from wip_job_dtls_interface wjdi
583: where wjdi.group_id = p_group_id
584: and wjdi.process_phase = wip_constants.ml_validation
585: and wjdi.process_status in (wip_constants.running,
586: wip_constants.pending,
587: wip_constants.warning)
588: and wjdi.wip_entity_id = p_wip_entity_id
581: select interface_id
582: from wip_job_dtls_interface wjdi
583: where wjdi.group_id = p_group_id
584: and wjdi.process_phase = wip_constants.ml_validation
585: and wjdi.process_status in (wip_constants.running,
586: wip_constants.pending,
587: wip_constants.warning)
588: and wjdi.wip_entity_id = p_wip_entity_id
589: and wjdi.organization_id = p_organization_id
582: from wip_job_dtls_interface wjdi
583: where wjdi.group_id = p_group_id
584: and wjdi.process_phase = wip_constants.ml_validation
585: and wjdi.process_status in (wip_constants.running,
586: wip_constants.pending,
587: wip_constants.warning)
588: and wjdi.wip_entity_id = p_wip_entity_id
589: and wjdi.organization_id = p_organization_id
590: and wjdi.substitution_type = p_substitution_type
583: where wjdi.group_id = p_group_id
584: and wjdi.process_phase = wip_constants.ml_validation
585: and wjdi.process_status in (wip_constants.running,
586: wip_constants.pending,
587: wip_constants.warning)
588: and wjdi.wip_entity_id = p_wip_entity_id
589: and wjdi.organization_id = p_organization_id
590: and wjdi.substitution_type = p_substitution_type
591: and wjdi.load_type = wip_job_details.wip_serial
594: where wjsi.header_id = wjdi.parent_header_id
595: and wjsi.group_id = wjdi.group_id
596: and wjsi.wip_entity_id = wdj.wip_entity_id
597: and wdj.serialization_start_op is not null
598: and wdj.status_type in (wip_constants.unreleased,
599: wip_constants.released,
600: wip_constants.hold,
601: wip_constants.comp_chrg));
602:
595: and wjsi.group_id = wjdi.group_id
596: and wjsi.wip_entity_id = wdj.wip_entity_id
597: and wdj.serialization_start_op is not null
598: and wdj.status_type in (wip_constants.unreleased,
599: wip_constants.released,
600: wip_constants.hold,
601: wip_constants.comp_chrg));
602:
603: begin
596: and wjsi.wip_entity_id = wdj.wip_entity_id
597: and wdj.serialization_start_op is not null
598: and wdj.status_type in (wip_constants.unreleased,
599: wip_constants.released,
600: wip_constants.hold,
601: wip_constants.comp_chrg));
602:
603: begin
604: x_return_status := fnd_api.g_ret_sts_success;
597: and wdj.serialization_start_op is not null
598: and wdj.status_type in (wip_constants.unreleased,
599: wip_constants.released,
600: wip_constants.hold,
601: wip_constants.comp_chrg));
602:
603: begin
604: x_return_status := fnd_api.g_ret_sts_success;
605: for l_inv_row in c_invalid_rows loop
618: end loop;
619:
620: if(x_return_status <> fnd_api.g_ret_sts_success) then
621: update wip_job_dtls_interface wjdi
622: set process_status = wip_constants.error
623: where group_id = p_group_id
624: and process_phase = wip_constants.ml_validation
625: and process_status in (wip_constants.running,
626: wip_constants.pending,
620: if(x_return_status <> fnd_api.g_ret_sts_success) then
621: update wip_job_dtls_interface wjdi
622: set process_status = wip_constants.error
623: where group_id = p_group_id
624: and process_phase = wip_constants.ml_validation
625: and process_status in (wip_constants.running,
626: wip_constants.pending,
627: wip_constants.warning)
628: and wip_entity_id = p_wip_entity_id
621: update wip_job_dtls_interface wjdi
622: set process_status = wip_constants.error
623: where group_id = p_group_id
624: and process_phase = wip_constants.ml_validation
625: and process_status in (wip_constants.running,
626: wip_constants.pending,
627: wip_constants.warning)
628: and wip_entity_id = p_wip_entity_id
629: and organization_id = p_organization_id
622: set process_status = wip_constants.error
623: where group_id = p_group_id
624: and process_phase = wip_constants.ml_validation
625: and process_status in (wip_constants.running,
626: wip_constants.pending,
627: wip_constants.warning)
628: and wip_entity_id = p_wip_entity_id
629: and organization_id = p_organization_id
630: and wjdi.substitution_type = p_substitution_type
623: where group_id = p_group_id
624: and process_phase = wip_constants.ml_validation
625: and process_status in (wip_constants.running,
626: wip_constants.pending,
627: wip_constants.warning)
628: and wip_entity_id = p_wip_entity_id
629: and organization_id = p_organization_id
630: and wjdi.substitution_type = p_substitution_type
631: and wjdi.load_type = wip_job_details.wip_serial
632: and not exists (select 1
633: from wip_discrete_jobs wdj
634: where wjdi.wip_entity_id = wdj.wip_entity_id
635: and wdj.serialization_start_op is not null
636: and wdj.status_type in (wip_constants.unreleased,
637: wip_constants.released,
638: wip_constants.hold,
639: wip_constants.comp_chrg));
640: end if;
633: from wip_discrete_jobs wdj
634: where wjdi.wip_entity_id = wdj.wip_entity_id
635: and wdj.serialization_start_op is not null
636: and wdj.status_type in (wip_constants.unreleased,
637: wip_constants.released,
638: wip_constants.hold,
639: wip_constants.comp_chrg));
640: end if;
641: end valid_job_exists;
634: where wjdi.wip_entity_id = wdj.wip_entity_id
635: and wdj.serialization_start_op is not null
636: and wdj.status_type in (wip_constants.unreleased,
637: wip_constants.released,
638: wip_constants.hold,
639: wip_constants.comp_chrg));
640: end if;
641: end valid_job_exists;
642: end wip_serial_assoc_validations;
635: and wdj.serialization_start_op is not null
636: and wdj.status_type in (wip_constants.unreleased,
637: wip_constants.released,
638: wip_constants.hold,
639: wip_constants.comp_chrg));
640: end if;
641: end valid_job_exists;
642: end wip_serial_assoc_validations;