176: select interface_id
177: from wip_job_dtls_interface
178: where group_id = p_group_id
179: and parent_header_id = p_parent_header_id /* Fix for Bug#3636378 */
180: and process_phase = wip_constants.ml_validation /* Bug 2751349 */
181: and process_status in (wip_constants.running, wip_constants.warning) /* Bug 2751349 */
182: and substitution_type = p_sub_type
183: and load_type = wip_job_details.wip_operation
184: and ( operation_seq_num is null
177: from wip_job_dtls_interface
178: where group_id = p_group_id
179: and parent_header_id = p_parent_header_id /* Fix for Bug#3636378 */
180: and process_phase = wip_constants.ml_validation /* Bug 2751349 */
181: and process_status in (wip_constants.running, wip_constants.warning) /* Bug 2751349 */
182: and substitution_type = p_sub_type
183: and load_type = wip_job_details.wip_operation
184: and ( operation_seq_num is null
185: or department_id is null
196: select interface_id
197: from wip_job_dtls_interface
198: where group_id = p_group_id
199: and parent_header_id = p_parent_header_id /* Fix for Bug#3636378 */
200: and process_phase = wip_constants.ml_validation /* Bug 2751349 */
201: and process_status in (wip_constants.running, wip_constants.warning) /* Bug 2751349 */
202: and substitution_type = p_sub_type
203: and load_type = wip_job_details.wip_operation
204: and operation_seq_num is null;
197: from wip_job_dtls_interface
198: where group_id = p_group_id
199: and parent_header_id = p_parent_header_id /* Fix for Bug#3636378 */
200: and process_phase = wip_constants.ml_validation /* Bug 2751349 */
201: and process_status in (wip_constants.running, wip_constants.warning) /* Bug 2751349 */
202: and substitution_type = p_sub_type
203: and load_type = wip_job_details.wip_operation
204: and operation_seq_num is null;
205:
244:
245: if(l_error_exists) then
246: if(p_sub_type = wip_job_details.wip_add) then
247: update wip_job_dtls_interface wjdi
248: set process_status = wip_constants.error
249: where group_id = p_group_id
250: and process_phase = wip_constants.ml_validation /* Bug 2751349 */
251: and process_status in (wip_constants.running, wip_constants.warning) /* Bug 2751349 */
252: and substitution_type = p_sub_type
246: if(p_sub_type = wip_job_details.wip_add) then
247: update wip_job_dtls_interface wjdi
248: set process_status = wip_constants.error
249: where group_id = p_group_id
250: and process_phase = wip_constants.ml_validation /* Bug 2751349 */
251: and process_status in (wip_constants.running, wip_constants.warning) /* Bug 2751349 */
252: and substitution_type = p_sub_type
253: and load_type = wip_job_details.wip_operation
254: and ( operation_seq_num IS NULL
247: update wip_job_dtls_interface wjdi
248: set process_status = wip_constants.error
249: where group_id = p_group_id
250: and process_phase = wip_constants.ml_validation /* Bug 2751349 */
251: and process_status in (wip_constants.running, wip_constants.warning) /* Bug 2751349 */
252: and substitution_type = p_sub_type
253: and load_type = wip_job_details.wip_operation
254: and ( operation_seq_num IS NULL
255: OR department_id IS NULL
262: OR backflush_flag IS NULL
263: );
264: else
265: update wip_job_dtls_interface wjdi
266: set process_status = wip_constants.error
267: where group_id = p_group_id
268: and process_phase = wip_constants.ml_validation /* Bug 2751349 */
269: and process_status in (wip_constants.running, wip_constants.warning) /* Bug 2751349 */
270: and substitution_type = p_sub_type
264: else
265: update wip_job_dtls_interface wjdi
266: set process_status = wip_constants.error
267: where group_id = p_group_id
268: and process_phase = wip_constants.ml_validation /* Bug 2751349 */
269: and process_status in (wip_constants.running, wip_constants.warning) /* Bug 2751349 */
270: and substitution_type = p_sub_type
271: and load_type = wip_job_details.wip_operation
272: and operation_seq_num IS NULL;
265: update wip_job_dtls_interface wjdi
266: set process_status = wip_constants.error
267: where group_id = p_group_id
268: and process_phase = wip_constants.ml_validation /* Bug 2751349 */
269: and process_status in (wip_constants.running, wip_constants.warning) /* Bug 2751349 */
270: and substitution_type = p_sub_type
271: and load_type = wip_job_details.wip_operation
272: and operation_seq_num IS NULL;
273: end if;
287: cursor c_invalid_rows is
288: select interface_id
289: from wip_job_dtls_interface wjdi
290: where group_id = p_group_id
291: and process_phase = wip_constants.ml_validation
292: and process_status in (wip_constants.running,
293: wip_constants.warning)
294: and load_type = wip_job_details.wip_operation
295: and substitution_type = p_sub_type
288: select interface_id
289: from wip_job_dtls_interface wjdi
290: where group_id = p_group_id
291: and process_phase = wip_constants.ml_validation
292: and process_status in (wip_constants.running,
293: wip_constants.warning)
294: and load_type = wip_job_details.wip_operation
295: and substitution_type = p_sub_type
296: and wip_entity_id = p_wip_entity_id
289: from wip_job_dtls_interface wjdi
290: where group_id = p_group_id
291: and process_phase = wip_constants.ml_validation
292: and process_status in (wip_constants.running,
293: wip_constants.warning)
294: and load_type = wip_job_details.wip_operation
295: and substitution_type = p_sub_type
296: and wip_entity_id = p_wip_entity_id
297: and organization_id = p_organization_id
324: end loop;
325:
326: if(l_error_exists) then
327: update wip_job_dtls_interface wjdi
328: set process_status = wip_constants.error
329: where group_id = p_group_id
330: and process_phase = wip_constants.ml_validation
331: and process_status in (wip_constants.running,
332: wip_constants.warning)
326: if(l_error_exists) then
327: update wip_job_dtls_interface wjdi
328: set process_status = wip_constants.error
329: where group_id = p_group_id
330: and process_phase = wip_constants.ml_validation
331: and process_status in (wip_constants.running,
332: wip_constants.warning)
333: and wip_entity_id = p_wip_entity_id
334: and organization_id = p_organization_id
327: update wip_job_dtls_interface wjdi
328: set process_status = wip_constants.error
329: where group_id = p_group_id
330: and process_phase = wip_constants.ml_validation
331: and process_status in (wip_constants.running,
332: wip_constants.warning)
333: and wip_entity_id = p_wip_entity_id
334: and organization_id = p_organization_id
335: and ( ( department_id is null
328: set process_status = wip_constants.error
329: where group_id = p_group_id
330: and process_phase = wip_constants.ml_validation
331: and process_status in (wip_constants.running,
332: wip_constants.warning)
333: and wip_entity_id = p_wip_entity_id
334: and organization_id = p_organization_id
335: and ( ( department_id is null
336: and p_sub_type = wip_job_details.wip_add
354: select interface_id,
355: operation_seq_num
356: from wip_job_dtls_interface wjdi
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.warning)
361: and load_type = wip_job_details.wip_operation
362: and substitution_type = wip_job_details.wip_change
355: operation_seq_num
356: from wip_job_dtls_interface wjdi
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.warning)
361: and load_type = wip_job_details.wip_operation
362: and substitution_type = wip_job_details.wip_change
363: and wip_entity_id = p_wip_entity_id
356: from wip_job_dtls_interface wjdi
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.warning)
361: and load_type = wip_job_details.wip_operation
362: and substitution_type = wip_job_details.wip_change
363: and wip_entity_id = p_wip_entity_id
364: and organization_id = p_organization_id
397: end loop;
398:
399: if(l_error_exists) then
400: update wip_job_dtls_interface wjdi
401: set process_status = wip_constants.error
402: where group_id = p_group_id
403: and process_phase = wip_constants.ml_validation
404: and process_status in (wip_constants.running,
405: wip_constants.warning)
399: if(l_error_exists) then
400: update wip_job_dtls_interface wjdi
401: set process_status = wip_constants.error
402: where group_id = p_group_id
403: and process_phase = wip_constants.ml_validation
404: and process_status in (wip_constants.running,
405: wip_constants.warning)
406: and load_type = wip_job_details.wip_operation
407: and substitution_type = wip_job_details.wip_change
400: update wip_job_dtls_interface wjdi
401: set process_status = wip_constants.error
402: where group_id = p_group_id
403: and process_phase = wip_constants.ml_validation
404: and process_status in (wip_constants.running,
405: wip_constants.warning)
406: and load_type = wip_job_details.wip_operation
407: and substitution_type = wip_job_details.wip_change
408: and wip_entity_id = p_wip_entity_id
401: set process_status = wip_constants.error
402: where group_id = p_group_id
403: and process_phase = wip_constants.ml_validation
404: and process_status in (wip_constants.running,
405: wip_constants.warning)
406: and load_type = wip_job_details.wip_operation
407: and substitution_type = wip_job_details.wip_change
408: and wip_entity_id = p_wip_entity_id
409: and organization_id = p_organization_id
433: cursor c_invalid_rows is
434: select interface_id
435: from wip_job_dtls_interface wjdi
436: where group_id = p_group_id
437: and process_phase = wip_constants.ml_validation
438: and process_status in (wip_constants.running,
439: wip_constants.warning)
440: and load_type = wip_job_details.wip_operation
441: and substitution_type = p_sub_type
434: select interface_id
435: from wip_job_dtls_interface wjdi
436: where group_id = p_group_id
437: and process_phase = wip_constants.ml_validation
438: and process_status in (wip_constants.running,
439: wip_constants.warning)
440: and load_type = wip_job_details.wip_operation
441: and substitution_type = p_sub_type
442: and wip_entity_id = p_wip_entity_id
435: from wip_job_dtls_interface wjdi
436: where group_id = p_group_id
437: and process_phase = wip_constants.ml_validation
438: and process_status in (wip_constants.running,
439: wip_constants.warning)
440: and load_type = wip_job_details.wip_operation
441: and substitution_type = p_sub_type
442: and wip_entity_id = p_wip_entity_id
443: and organization_id = p_organization_id
467: end loop;
468:
469: if(l_error_exists) then
470: update wip_job_dtls_interface wjdi
471: set process_status = wip_constants.error
472: where group_id = p_group_id
473: and process_phase = wip_constants.ml_validation
474: and process_status in (wip_constants.running,
475: wip_constants.warning)
469: if(l_error_exists) then
470: update wip_job_dtls_interface wjdi
471: set process_status = wip_constants.error
472: where group_id = p_group_id
473: and process_phase = wip_constants.ml_validation
474: and process_status in (wip_constants.running,
475: wip_constants.warning)
476: and load_type = wip_job_details.wip_operation
477: and substitution_type = p_sub_type
470: update wip_job_dtls_interface wjdi
471: set process_status = wip_constants.error
472: where group_id = p_group_id
473: and process_phase = wip_constants.ml_validation
474: and process_status in (wip_constants.running,
475: wip_constants.warning)
476: and load_type = wip_job_details.wip_operation
477: and substitution_type = p_sub_type
478: and wip_entity_id = p_wip_entity_id
471: set process_status = wip_constants.error
472: where group_id = p_group_id
473: and process_phase = wip_constants.ml_validation
474: and process_status in (wip_constants.running,
475: wip_constants.warning)
476: and load_type = wip_job_details.wip_operation
477: and substitution_type = p_sub_type
478: and wip_entity_id = p_wip_entity_id
479: and organization_id = p_organization_id
496: cursor c_invalid_rows is
497: select interface_id
498: from wip_job_dtls_interface
499: where group_id = p_group_id
500: and process_phase = wip_constants.ml_validation
501: and process_status in (wip_constants.running,
502: wip_constants.warning)
503: and load_type = wip_job_details.wip_operation
504: and substitution_type = p_sub_type
497: select interface_id
498: from wip_job_dtls_interface
499: where group_id = p_group_id
500: and process_phase = wip_constants.ml_validation
501: and process_status in (wip_constants.running,
502: wip_constants.warning)
503: and load_type = wip_job_details.wip_operation
504: and substitution_type = p_sub_type
505: and wip_entity_id = p_wip_entity_id
498: from wip_job_dtls_interface
499: where group_id = p_group_id
500: and process_phase = wip_constants.ml_validation
501: and process_status in (wip_constants.running,
502: wip_constants.warning)
503: and load_type = wip_job_details.wip_operation
504: and substitution_type = p_sub_type
505: and wip_entity_id = p_wip_entity_id
506: and organization_id = p_organization_id
527: end loop;
528:
529: if(l_error_exists) then
530: update wip_job_dtls_interface wjdi
531: set process_status = wip_constants.error
532: where group_id = p_group_id
533: and process_phase = wip_constants.ml_validation
534: and process_status in (wip_constants.running,
535: wip_constants.warning)
529: if(l_error_exists) then
530: update wip_job_dtls_interface wjdi
531: set process_status = wip_constants.error
532: where group_id = p_group_id
533: and process_phase = wip_constants.ml_validation
534: and process_status in (wip_constants.running,
535: wip_constants.warning)
536: and load_type = wip_job_details.wip_operation
537: and substitution_type = p_sub_type
530: update wip_job_dtls_interface wjdi
531: set process_status = wip_constants.error
532: where group_id = p_group_id
533: and process_phase = wip_constants.ml_validation
534: and process_status in (wip_constants.running,
535: wip_constants.warning)
536: and load_type = wip_job_details.wip_operation
537: and substitution_type = p_sub_type
538: and wip_entity_id = p_wip_entity_id
531: set process_status = wip_constants.error
532: where group_id = p_group_id
533: and process_phase = wip_constants.ml_validation
534: and process_status in (wip_constants.running,
535: wip_constants.warning)
536: and load_type = wip_job_details.wip_operation
537: and substitution_type = p_sub_type
538: and wip_entity_id = p_wip_entity_id
539: and organization_id = p_organization_id
554: cursor c_invalid_rows is
555: select interface_id
556: from wip_job_dtls_interface wjdi
557: where group_id = p_group_id
558: and process_phase = wip_constants.ml_validation
559: and process_status in (wip_constants.running,
560: wip_constants.warning)
561: and load_type = wip_job_details.wip_operation
562: and substitution_type = p_sub_type
555: select interface_id
556: from wip_job_dtls_interface wjdi
557: where group_id = p_group_id
558: and process_phase = wip_constants.ml_validation
559: and process_status in (wip_constants.running,
560: wip_constants.warning)
561: and load_type = wip_job_details.wip_operation
562: and substitution_type = p_sub_type
563: and wip_entity_id = p_wip_entity_id
556: from wip_job_dtls_interface wjdi
557: where group_id = p_group_id
558: and process_phase = wip_constants.ml_validation
559: and process_status in (wip_constants.running,
560: wip_constants.warning)
561: and load_type = wip_job_details.wip_operation
562: and substitution_type = p_sub_type
563: and wip_entity_id = p_wip_entity_id
564: and organization_id = p_organization_id
592: end loop;
593:
594: if(l_error_exists) then
595: update wip_job_dtls_interface wjdi
596: set process_status = wip_constants.error
597: where group_id = p_group_id
598: and process_phase = wip_constants.ml_validation
599: and process_status in (wip_constants.running,
600: wip_constants.warning)
594: if(l_error_exists) then
595: update wip_job_dtls_interface wjdi
596: set process_status = wip_constants.error
597: where group_id = p_group_id
598: and process_phase = wip_constants.ml_validation
599: and process_status in (wip_constants.running,
600: wip_constants.warning)
601: and load_type = wip_job_details.wip_operation
602: and substitution_type = p_sub_type
595: update wip_job_dtls_interface wjdi
596: set process_status = wip_constants.error
597: where group_id = p_group_id
598: and process_phase = wip_constants.ml_validation
599: and process_status in (wip_constants.running,
600: wip_constants.warning)
601: and load_type = wip_job_details.wip_operation
602: and substitution_type = p_sub_type
603: and wip_entity_id = p_wip_entity_id
596: set process_status = wip_constants.error
597: where group_id = p_group_id
598: and process_phase = wip_constants.ml_validation
599: and process_status in (wip_constants.running,
600: wip_constants.warning)
601: and load_type = wip_job_details.wip_operation
602: and substitution_type = p_sub_type
603: and wip_entity_id = p_wip_entity_id
604: and organization_id = p_organization_id
626: cursor c_invalid_rows is
627: select interface_id
628: from wip_job_dtls_interface wjdi
629: where group_id = p_group_id
630: and process_phase = wip_constants.ml_validation
631: and process_status in (wip_constants.running,
632: wip_constants.warning)
633: and load_type = wip_job_details.wip_operation
634: and substitution_type = p_sub_type
627: select interface_id
628: from wip_job_dtls_interface wjdi
629: where group_id = p_group_id
630: and process_phase = wip_constants.ml_validation
631: and process_status in (wip_constants.running,
632: wip_constants.warning)
633: and load_type = wip_job_details.wip_operation
634: and substitution_type = p_sub_type
635: and wip_entity_id = p_wip_entity_id
628: from wip_job_dtls_interface wjdi
629: where group_id = p_group_id
630: and process_phase = wip_constants.ml_validation
631: and process_status in (wip_constants.running,
632: wip_constants.warning)
633: and load_type = wip_job_details.wip_operation
634: and substitution_type = p_sub_type
635: and wip_entity_id = p_wip_entity_id
636: and organization_id = p_organization_id
664: end loop;
665:
666: if(l_error_exists) then
667: update wip_job_dtls_interface wjdi
668: set process_status = wip_constants.error
669: where group_id = p_group_id
670: and load_type = wip_job_details.wip_operation
671: and substitution_type = p_sub_type
672: and process_phase = wip_constants.ml_validation
668: set process_status = wip_constants.error
669: where group_id = p_group_id
670: and load_type = wip_job_details.wip_operation
671: and substitution_type = p_sub_type
672: and process_phase = wip_constants.ml_validation
673: and process_status in (wip_constants.running,
674: wip_constants.warning)
675: and wip_entity_id = p_wip_entity_id
676: and organization_id = p_organization_id
669: where group_id = p_group_id
670: and load_type = wip_job_details.wip_operation
671: and substitution_type = p_sub_type
672: and process_phase = wip_constants.ml_validation
673: and process_status in (wip_constants.running,
674: wip_constants.warning)
675: and wip_entity_id = p_wip_entity_id
676: and organization_id = p_organization_id
677: and ( ( backflush_flag is null
670: and load_type = wip_job_details.wip_operation
671: and substitution_type = p_sub_type
672: and process_phase = wip_constants.ml_validation
673: and process_status in (wip_constants.running,
674: wip_constants.warning)
675: and wip_entity_id = p_wip_entity_id
676: and organization_id = p_organization_id
677: and ( ( backflush_flag is null
678: and p_sub_type = wip_job_details.wip_add
699: cursor c_invalid_rows is
700: select interface_id, operation_seq_num
701: from wip_job_dtls_interface wjdi
702: where group_id = p_group_id
703: and process_phase = wip_constants.ml_validation
704: and process_status in (wip_constants.running,
705: wip_constants.warning)
706: and load_type = wip_job_details.wip_operation
707: and substitution_type = wip_job_details.wip_add
700: select interface_id, operation_seq_num
701: from wip_job_dtls_interface wjdi
702: where group_id = p_group_id
703: and process_phase = wip_constants.ml_validation
704: and process_status in (wip_constants.running,
705: wip_constants.warning)
706: and load_type = wip_job_details.wip_operation
707: and substitution_type = wip_job_details.wip_add
708: and wip_entity_id = p_wip_entity_id
701: from wip_job_dtls_interface wjdi
702: where group_id = p_group_id
703: and process_phase = wip_constants.ml_validation
704: and process_status in (wip_constants.running,
705: wip_constants.warning)
706: and load_type = wip_job_details.wip_operation
707: and substitution_type = wip_job_details.wip_add
708: and wip_entity_id = p_wip_entity_id
709: and organization_id = p_organization_id
739: end loop;
740:
741: if(l_error_exists) then
742: update wip_job_dtls_interface wjdi
743: set process_status = wip_constants.error
744: where group_id = p_group_id
745: and load_type = wip_job_details.wip_operation
746: and substitution_type = wip_job_details.wip_add
747: and process_phase = wip_constants.ml_validation
743: set process_status = wip_constants.error
744: where group_id = p_group_id
745: and load_type = wip_job_details.wip_operation
746: and substitution_type = wip_job_details.wip_add
747: and process_phase = wip_constants.ml_validation
748: and process_status in (wip_constants.running,
749: wip_constants.warning)
750: and wip_entity_id = p_wip_entity_id
751: and organization_id = p_organization_id
744: where group_id = p_group_id
745: and load_type = wip_job_details.wip_operation
746: and substitution_type = wip_job_details.wip_add
747: and process_phase = wip_constants.ml_validation
748: and process_status in (wip_constants.running,
749: wip_constants.warning)
750: and wip_entity_id = p_wip_entity_id
751: and organization_id = p_organization_id
752: and (exists (select 1
745: and load_type = wip_job_details.wip_operation
746: and substitution_type = wip_job_details.wip_add
747: and process_phase = wip_constants.ml_validation
748: and process_status in (wip_constants.running,
749: wip_constants.warning)
750: and wip_entity_id = p_wip_entity_id
751: and organization_id = p_organization_id
752: and (exists (select 1
753: from wip_operations
768: cursor c_ml_invalid_rows is
769: select interface_id
770: from wip_job_dtls_interface wjdi
771: where group_id = p_group_id
772: and process_phase = wip_constants.ml_validation
773: and process_status in (wip_constants.running,
774: wip_constants.warning)
775: and load_type = wip_job_details.wip_operation
776: and substitution_type = wip_job_details.wip_add
769: select interface_id
770: from wip_job_dtls_interface wjdi
771: where group_id = p_group_id
772: and process_phase = wip_constants.ml_validation
773: and process_status in (wip_constants.running,
774: wip_constants.warning)
775: and load_type = wip_job_details.wip_operation
776: and substitution_type = wip_job_details.wip_add
777: and wip_entity_id = p_wip_entity_id
770: from wip_job_dtls_interface wjdi
771: where group_id = p_group_id
772: and process_phase = wip_constants.ml_validation
773: and process_status in (wip_constants.running,
774: wip_constants.warning)
775: and load_type = wip_job_details.wip_operation
776: and substitution_type = wip_job_details.wip_add
777: and wip_entity_id = p_wip_entity_id
778: and organization_id = p_organization_id
793: cursor c_wdj_invalid_rows is
794: select interface_id
795: from wip_job_dtls_interface wjdi
796: where group_id = p_group_id
797: and process_phase = wip_constants.ml_validation
798: and process_status in (wip_constants.running,
799: wip_constants.warning)
800: and load_type = wip_job_details.wip_operation
801: and substitution_type = wip_job_details.wip_add
794: select interface_id
795: from wip_job_dtls_interface wjdi
796: where group_id = p_group_id
797: and process_phase = wip_constants.ml_validation
798: and process_status in (wip_constants.running,
799: wip_constants.warning)
800: and load_type = wip_job_details.wip_operation
801: and substitution_type = wip_job_details.wip_add
802: and wip_entity_id = p_wip_entity_id
795: from wip_job_dtls_interface wjdi
796: where group_id = p_group_id
797: and process_phase = wip_constants.ml_validation
798: and process_status in (wip_constants.running,
799: wip_constants.warning)
800: and load_type = wip_job_details.wip_operation
801: and substitution_type = wip_job_details.wip_add
802: and wip_entity_id = p_wip_entity_id
803: and organization_id = p_organization_id
855:
856: if(l_error_exists) then
857: if(wip_job_details.std_alone = 1) then
858: update wip_job_dtls_interface wjdi
859: set process_status = wip_constants.error
860: where group_id = p_group_id
861: and process_phase = wip_constants.ml_validation
862: and process_status in (wip_constants.running,
863: wip_constants.warning)
857: if(wip_job_details.std_alone = 1) then
858: update wip_job_dtls_interface wjdi
859: set process_status = wip_constants.error
860: where group_id = p_group_id
861: and process_phase = wip_constants.ml_validation
862: and process_status in (wip_constants.running,
863: wip_constants.warning)
864: and load_type = wip_job_details.wip_operation
865: and substitution_type = wip_job_details.wip_add
858: update wip_job_dtls_interface wjdi
859: set process_status = wip_constants.error
860: where group_id = p_group_id
861: and process_phase = wip_constants.ml_validation
862: and process_status in (wip_constants.running,
863: wip_constants.warning)
864: and load_type = wip_job_details.wip_operation
865: and substitution_type = wip_job_details.wip_add
866: and wip_entity_id = p_wip_entity_id
859: set process_status = wip_constants.error
860: where group_id = p_group_id
861: and process_phase = wip_constants.ml_validation
862: and process_status in (wip_constants.running,
863: wip_constants.warning)
864: and load_type = wip_job_details.wip_operation
865: and substitution_type = wip_job_details.wip_add
866: and wip_entity_id = p_wip_entity_id
867: and organization_id = p_organization_id
877: /* bug3669728 end */
878: );
879: else
880: update wip_job_dtls_interface wjdi
881: set process_status = wip_constants.error
882: where group_id = p_group_id
883: and process_phase = wip_constants.ml_validation
884: and process_status in (wip_constants.running,
885: wip_constants.warning)
879: else
880: update wip_job_dtls_interface wjdi
881: set process_status = wip_constants.error
882: where group_id = p_group_id
883: and process_phase = wip_constants.ml_validation
884: and process_status in (wip_constants.running,
885: wip_constants.warning)
886: and load_type = wip_job_details.wip_operation
887: and substitution_type = wip_job_details.wip_add
880: update wip_job_dtls_interface wjdi
881: set process_status = wip_constants.error
882: where group_id = p_group_id
883: and process_phase = wip_constants.ml_validation
884: and process_status in (wip_constants.running,
885: wip_constants.warning)
886: and load_type = wip_job_details.wip_operation
887: and substitution_type = wip_job_details.wip_add
888: and wip_entity_id = p_wip_entity_id
881: set process_status = wip_constants.error
882: where group_id = p_group_id
883: and process_phase = wip_constants.ml_validation
884: and process_status in (wip_constants.running,
885: wip_constants.warning)
886: and load_type = wip_job_details.wip_operation
887: and substitution_type = wip_job_details.wip_add
888: and wip_entity_id = p_wip_entity_id
889: and organization_id = p_organization_id
916: cursor c_invalid_rows is
917: select interface_id
918: from wip_job_dtls_interface wjdi
919: where group_id = p_group_id
920: and process_phase = wip_constants.ml_validation
921: and process_status in (wip_constants.running,
922: wip_constants.warning)
923: and load_type = wip_job_details.wip_operation
924: and substitution_type = wip_job_details.wip_change
917: select interface_id
918: from wip_job_dtls_interface wjdi
919: where group_id = p_group_id
920: and process_phase = wip_constants.ml_validation
921: and process_status in (wip_constants.running,
922: wip_constants.warning)
923: and load_type = wip_job_details.wip_operation
924: and substitution_type = wip_job_details.wip_change
925: and wip_entity_id = p_wip_entity_id
918: from wip_job_dtls_interface wjdi
919: where group_id = p_group_id
920: and process_phase = wip_constants.ml_validation
921: and process_status in (wip_constants.running,
922: wip_constants.warning)
923: and load_type = wip_job_details.wip_operation
924: and substitution_type = wip_job_details.wip_change
925: and wip_entity_id = p_wip_entity_id
926: and not exists (select 1
948: end loop;
949:
950: if(l_error_exists) then
951: update wip_job_dtls_interface wjdi
952: set process_status = wip_constants.error
953: where group_id = p_group_id
954: and process_phase = wip_constants.ml_validation
955: and process_status in (wip_constants.running,
956: wip_constants.warning)
950: if(l_error_exists) then
951: update wip_job_dtls_interface wjdi
952: set process_status = wip_constants.error
953: where group_id = p_group_id
954: and process_phase = wip_constants.ml_validation
955: and process_status in (wip_constants.running,
956: wip_constants.warning)
957: and wip_entity_id = p_wip_entity_id
958: and not exists (select 1
951: update wip_job_dtls_interface wjdi
952: set process_status = wip_constants.error
953: where group_id = p_group_id
954: and process_phase = wip_constants.ml_validation
955: and process_status in (wip_constants.running,
956: wip_constants.warning)
957: and wip_entity_id = p_wip_entity_id
958: and not exists (select 1
959: from wip_operations
952: set process_status = wip_constants.error
953: where group_id = p_group_id
954: and process_phase = wip_constants.ml_validation
955: and process_status in (wip_constants.running,
956: wip_constants.warning)
957: and wip_entity_id = p_wip_entity_id
958: and not exists (select 1
959: from wip_operations
960: where wip_entity_id = wjdi.wip_entity_id
973: cursor c_invalid_rows is
974: select interface_id
975: from wip_job_dtls_interface wjdi
976: where group_id = p_group_id
977: and process_phase = wip_constants.ml_validation
978: and process_status in (wip_constants.running,
979: wip_constants.warning)
980: and load_type = wip_job_details.wip_operation
981: and substitution_type = wip_job_details.wip_change
974: select interface_id
975: from wip_job_dtls_interface wjdi
976: where group_id = p_group_id
977: and process_phase = wip_constants.ml_validation
978: and process_status in (wip_constants.running,
979: wip_constants.warning)
980: and load_type = wip_job_details.wip_operation
981: and substitution_type = wip_job_details.wip_change
982: and wip_entity_id = p_wip_entity_id
975: from wip_job_dtls_interface wjdi
976: where group_id = p_group_id
977: and process_phase = wip_constants.ml_validation
978: and process_status in (wip_constants.running,
979: wip_constants.warning)
980: and load_type = wip_job_details.wip_operation
981: and substitution_type = wip_job_details.wip_change
982: and wip_entity_id = p_wip_entity_id
983: and organization_id = p_organization_id
1026: end loop;
1027:
1028: if(l_error_exists) then
1029: update wip_job_dtls_interface wjdi
1030: set process_status = wip_constants.error
1031: where group_id = p_group_id
1032: and process_phase = wip_constants.ml_validation
1033: and process_status in (wip_constants.running,
1034: wip_constants.warning)
1028: if(l_error_exists) then
1029: update wip_job_dtls_interface wjdi
1030: set process_status = wip_constants.error
1031: where group_id = p_group_id
1032: and process_phase = wip_constants.ml_validation
1033: and process_status in (wip_constants.running,
1034: wip_constants.warning)
1035: and load_type = wip_job_details.wip_operation
1036: and substitution_type = wip_job_details.wip_change
1029: update wip_job_dtls_interface wjdi
1030: set process_status = wip_constants.error
1031: where group_id = p_group_id
1032: and process_phase = wip_constants.ml_validation
1033: and process_status in (wip_constants.running,
1034: wip_constants.warning)
1035: and load_type = wip_job_details.wip_operation
1036: and substitution_type = wip_job_details.wip_change
1037: and wip_entity_id = p_wip_entity_id
1030: set process_status = wip_constants.error
1031: where group_id = p_group_id
1032: and process_phase = wip_constants.ml_validation
1033: and process_status in (wip_constants.running,
1034: wip_constants.warning)
1035: and load_type = wip_job_details.wip_operation
1036: and substitution_type = wip_job_details.wip_change
1037: and wip_entity_id = p_wip_entity_id
1038: and organization_id = p_organization_id