18: cursor c_usage_rows is
19: select resource_seq_num, parent_seq_num, operation_seq_num, resource_id_new, rowid
20: from wip_job_dtls_interface wjdi
21: where group_id = p_group_id
22: and process_phase = wip_constants.ml_validation
23: and process_status in (wip_constants.running,
24: wip_constants.warning)
25: and wip_entity_id = p_wip_entity_id
26: and organization_id = p_organization_id
19: select resource_seq_num, parent_seq_num, operation_seq_num, resource_id_new, rowid
20: from wip_job_dtls_interface wjdi
21: where group_id = p_group_id
22: and process_phase = wip_constants.ml_validation
23: and process_status in (wip_constants.running,
24: wip_constants.warning)
25: and wip_entity_id = p_wip_entity_id
26: and organization_id = p_organization_id
27: and load_type in (wip_job_details.wip_res_usage,
20: from wip_job_dtls_interface wjdi
21: where group_id = p_group_id
22: and process_phase = wip_constants.ml_validation
23: and process_status in (wip_constants.running,
24: wip_constants.warning)
25: and wip_entity_id = p_wip_entity_id
26: and organization_id = p_organization_id
27: and load_type in (wip_job_details.wip_res_usage,
28: wip_job_details.wip_res_instance_usage)
115: cursor c_invalid_rows is
116: select interface_id
117: from wip_job_dtls_interface wjdi
118: where group_id = p_group_id
119: and process_phase = wip_constants.ml_validation
120: and process_status in (wip_constants.running,
121: wip_constants.warning)
122: and wip_entity_id = p_wip_entity_id
123: and organization_id = p_organization_id
116: select interface_id
117: from wip_job_dtls_interface wjdi
118: where group_id = p_group_id
119: and process_phase = wip_constants.ml_validation
120: and process_status in (wip_constants.running,
121: wip_constants.warning)
122: and wip_entity_id = p_wip_entity_id
123: and organization_id = p_organization_id
124: and load_type in (wip_job_details.wip_res_usage,
117: from wip_job_dtls_interface wjdi
118: where group_id = p_group_id
119: and process_phase = wip_constants.ml_validation
120: and process_status in (wip_constants.running,
121: wip_constants.warning)
122: and wip_entity_id = p_wip_entity_id
123: and organization_id = p_organization_id
124: and load_type in (wip_job_details.wip_res_usage,
125: wip_job_details.wip_res_instance_usage)
145: end loop;
146:
147: if(l_error_exists) then
148: update wip_job_dtls_interface wjdi
149: set process_status = wip_constants.error
150: where group_id = p_group_id
151: and process_phase = wip_constants.ml_validation
152: and process_status in (wip_constants.running,
153: wip_constants.warning)
147: if(l_error_exists) then
148: update wip_job_dtls_interface wjdi
149: set process_status = wip_constants.error
150: where group_id = p_group_id
151: and process_phase = wip_constants.ml_validation
152: and process_status in (wip_constants.running,
153: wip_constants.warning)
154: and wip_entity_id = p_wip_entity_id
155: and organization_id = p_organization_id
148: update wip_job_dtls_interface wjdi
149: set process_status = wip_constants.error
150: where group_id = p_group_id
151: and process_phase = wip_constants.ml_validation
152: and process_status in (wip_constants.running,
153: wip_constants.warning)
154: and wip_entity_id = p_wip_entity_id
155: and organization_id = p_organization_id
156: and load_type in (wip_job_details.wip_res_usage,
149: set process_status = wip_constants.error
150: where group_id = p_group_id
151: and process_phase = wip_constants.ml_validation
152: and process_status in (wip_constants.running,
153: wip_constants.warning)
154: and wip_entity_id = p_wip_entity_id
155: and organization_id = p_organization_id
156: and load_type in (wip_job_details.wip_res_usage,
157: wip_job_details.wip_res_instance_usage)
167: cursor c_invalid_rows is
168: select interface_id
169: from wip_job_dtls_interface wjdi
170: where group_id = p_group_id
171: and process_phase = wip_constants.ml_validation
172: and process_status in (wip_constants.running,
173: wip_constants.warning)
174: and wip_entity_id = p_wip_entity_id
175: and organization_id = p_organization_id
168: select interface_id
169: from wip_job_dtls_interface wjdi
170: where group_id = p_group_id
171: and process_phase = wip_constants.ml_validation
172: and process_status in (wip_constants.running,
173: wip_constants.warning)
174: and wip_entity_id = p_wip_entity_id
175: and organization_id = p_organization_id
176: and substitution_type = wip_job_details.wip_add
169: from wip_job_dtls_interface wjdi
170: where group_id = p_group_id
171: and process_phase = wip_constants.ml_validation
172: and process_status in (wip_constants.running,
173: wip_constants.warning)
174: and wip_entity_id = p_wip_entity_id
175: and organization_id = p_organization_id
176: and substitution_type = wip_job_details.wip_add
177: and ((load_type = wip_job_details.wip_res_instance_usage
207: end loop;
208:
209: if(l_error_exists) then
210: update wip_job_dtls_interface wjdi
211: set process_status = wip_constants.error
212: where group_id = p_group_id
213: and process_phase = wip_constants.ml_validation
214: and process_status in (wip_constants.running,
215: wip_constants.warning)
209: if(l_error_exists) then
210: update wip_job_dtls_interface wjdi
211: set process_status = wip_constants.error
212: where group_id = p_group_id
213: and process_phase = wip_constants.ml_validation
214: and process_status in (wip_constants.running,
215: wip_constants.warning)
216: and wip_entity_id = p_wip_entity_id
217: and organization_id = p_organization_id
210: update wip_job_dtls_interface wjdi
211: set process_status = wip_constants.error
212: where group_id = p_group_id
213: and process_phase = wip_constants.ml_validation
214: and process_status in (wip_constants.running,
215: wip_constants.warning)
216: and wip_entity_id = p_wip_entity_id
217: and organization_id = p_organization_id
218: and substitution_type = wip_job_details.wip_add
211: set process_status = wip_constants.error
212: where group_id = p_group_id
213: and process_phase = wip_constants.ml_validation
214: and process_status in (wip_constants.running,
215: wip_constants.warning)
216: and wip_entity_id = p_wip_entity_id
217: and organization_id = p_organization_id
218: and substitution_type = wip_job_details.wip_add
219: and ((load_type = wip_job_details.wip_res_instance_usage
239: cursor c_invalid_rows is
240: select interface_id
241: from wip_job_dtls_interface wjdi
242: where group_id = p_group_id
243: and process_phase = wip_constants.ml_validation
244: and process_status in (wip_constants.running,
245: wip_constants.warning)
246: and wip_entity_id = p_wip_entity_id
247: and organization_id = p_organization_id
240: select interface_id
241: from wip_job_dtls_interface wjdi
242: where group_id = p_group_id
243: and process_phase = wip_constants.ml_validation
244: and process_status in (wip_constants.running,
245: wip_constants.warning)
246: and wip_entity_id = p_wip_entity_id
247: and organization_id = p_organization_id
248: and load_type in (wip_job_details.wip_res_usage,
241: from wip_job_dtls_interface wjdi
242: where group_id = p_group_id
243: and process_phase = wip_constants.ml_validation
244: and process_status in (wip_constants.running,
245: wip_constants.warning)
246: and wip_entity_id = p_wip_entity_id
247: and organization_id = p_organization_id
248: and load_type in (wip_job_details.wip_res_usage,
249: wip_job_details.wip_res_instance_usage)
286: end loop;
287:
288: if(l_error_exists) then
289: update wip_job_dtls_interface wjdi
290: set process_status = wip_constants.error
291: where group_id = p_group_id
292: and process_phase = wip_constants.ml_validation
293: and process_status in (wip_constants.running,
294: wip_constants.warning)
288: if(l_error_exists) then
289: update wip_job_dtls_interface wjdi
290: set process_status = wip_constants.error
291: where group_id = p_group_id
292: and process_phase = wip_constants.ml_validation
293: and process_status in (wip_constants.running,
294: wip_constants.warning)
295: and wip_entity_id = p_wip_entity_id
296: and organization_id = p_organization_id
289: update wip_job_dtls_interface wjdi
290: set process_status = wip_constants.error
291: where group_id = p_group_id
292: and process_phase = wip_constants.ml_validation
293: and process_status in (wip_constants.running,
294: wip_constants.warning)
295: and wip_entity_id = p_wip_entity_id
296: and organization_id = p_organization_id
297: and load_type in (wip_job_details.wip_res_usage,
290: set process_status = wip_constants.error
291: where group_id = p_group_id
292: and process_phase = wip_constants.ml_validation
293: and process_status in (wip_constants.running,
294: wip_constants.warning)
295: and wip_entity_id = p_wip_entity_id
296: and organization_id = p_organization_id
297: and load_type in (wip_job_details.wip_res_usage,
298: wip_job_details.wip_res_instance_usage)
321: cursor c_invalid_rows is
322: select interface_id
323: from wip_job_dtls_interface wjdi
324: where group_id = p_group_id
325: and process_phase = wip_constants.ml_validation
326: and process_status in (wip_constants.running,
327: wip_constants.warning)
328: and wip_entity_id = p_wip_entity_id
329: and organization_id = p_organization_id
322: select interface_id
323: from wip_job_dtls_interface wjdi
324: where group_id = p_group_id
325: and process_phase = wip_constants.ml_validation
326: and process_status in (wip_constants.running,
327: wip_constants.warning)
328: and wip_entity_id = p_wip_entity_id
329: and organization_id = p_organization_id
330: and load_type in (wip_job_details.wip_res_usage,
323: from wip_job_dtls_interface wjdi
324: where group_id = p_group_id
325: and process_phase = wip_constants.ml_validation
326: and process_status in (wip_constants.running,
327: wip_constants.warning)
328: and wip_entity_id = p_wip_entity_id
329: and organization_id = p_organization_id
330: and load_type in (wip_job_details.wip_res_usage,
331: wip_job_details.wip_res_instance_usage)
352: end loop;
353:
354: if(l_error_exists) 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.warning)
354: if(l_error_exists) 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.warning)
361: and wip_entity_id = p_wip_entity_id
362: and organization_id = p_organization_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.warning)
361: and wip_entity_id = p_wip_entity_id
362: and organization_id = p_organization_id
363: and load_type in (wip_job_details.wip_res_usage,
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.warning)
361: and wip_entity_id = p_wip_entity_id
362: and organization_id = p_organization_id
363: and load_type in (wip_job_details.wip_res_usage,
364: wip_job_details.wip_res_instance_usage)
373: cursor c_invalid_res_inst_usage_rows is
374: select interface_id
375: from wip_job_dtls_interface wjdi
376: where group_id = p_group_id
377: and process_phase = wip_constants.ml_validation
378: and process_status in (wip_constants.running,
379: wip_constants.warning)
380: and wip_entity_id = p_wip_entity_id
381: and organization_id = p_organization_id
374: select interface_id
375: from wip_job_dtls_interface wjdi
376: where group_id = p_group_id
377: and process_phase = wip_constants.ml_validation
378: and process_status in (wip_constants.running,
379: wip_constants.warning)
380: and wip_entity_id = p_wip_entity_id
381: and organization_id = p_organization_id
382: and load_type = wip_job_details.wip_res_instance_usage
375: from wip_job_dtls_interface wjdi
376: where group_id = p_group_id
377: and process_phase = wip_constants.ml_validation
378: and process_status in (wip_constants.running,
379: wip_constants.warning)
380: and wip_entity_id = p_wip_entity_id
381: and organization_id = p_organization_id
382: and load_type = wip_job_details.wip_res_instance_usage
383: and substitution_type = wip_job_details.wip_add
411: end loop;
412:
413: if(l_error_exists) then
414: update wip_job_dtls_interface wjdi
415: set process_status = wip_constants.error
416: where group_id = p_group_id
417: and process_phase = wip_constants.ml_validation
418: and process_status in (wip_constants.running,
419: wip_constants.warning)
413: if(l_error_exists) then
414: update wip_job_dtls_interface wjdi
415: set process_status = wip_constants.error
416: where group_id = p_group_id
417: and process_phase = wip_constants.ml_validation
418: and process_status in (wip_constants.running,
419: wip_constants.warning)
420: and wip_entity_id = p_wip_entity_id
421: and organization_id = p_organization_id
414: update wip_job_dtls_interface wjdi
415: set process_status = wip_constants.error
416: where group_id = p_group_id
417: and process_phase = wip_constants.ml_validation
418: and process_status in (wip_constants.running,
419: wip_constants.warning)
420: and wip_entity_id = p_wip_entity_id
421: and organization_id = p_organization_id
422: and load_type = wip_job_details.wip_res_instance_usage
415: set process_status = wip_constants.error
416: where group_id = p_group_id
417: and process_phase = wip_constants.ml_validation
418: and process_status in (wip_constants.running,
419: wip_constants.warning)
420: and wip_entity_id = p_wip_entity_id
421: and organization_id = p_organization_id
422: and load_type = wip_job_details.wip_res_instance_usage
423: and substitution_type = wip_job_details.wip_add
441: cursor c_invalid_res_usage_rows is
442: select interface_id
443: from wip_job_dtls_interface wjdi
444: where group_id = p_group_id
445: and process_phase = wip_constants.ml_validation
446: and process_status in (wip_constants.running,
447: wip_constants.warning)
448: and wip_entity_id = p_wip_entity_id
449: and organization_id = p_organization_id
442: select interface_id
443: from wip_job_dtls_interface wjdi
444: where group_id = p_group_id
445: and process_phase = wip_constants.ml_validation
446: and process_status in (wip_constants.running,
447: wip_constants.warning)
448: and wip_entity_id = p_wip_entity_id
449: and organization_id = p_organization_id
450: and load_type = wip_job_details.wip_res_usage
443: from wip_job_dtls_interface wjdi
444: where group_id = p_group_id
445: and process_phase = wip_constants.ml_validation
446: and process_status in (wip_constants.running,
447: wip_constants.warning)
448: and wip_entity_id = p_wip_entity_id
449: and organization_id = p_organization_id
450: and load_type = wip_job_details.wip_res_usage
451: and substitution_type = wip_job_details.wip_add
479: end loop;
480:
481: if(l_error_exists) then
482: update wip_job_dtls_interface wjdi
483: set process_status = wip_constants.error
484: where group_id = p_group_id
485: and process_phase = wip_constants.ml_validation
486: and process_status in (wip_constants.running,
487: wip_constants.warning)
481: if(l_error_exists) then
482: update wip_job_dtls_interface wjdi
483: set process_status = wip_constants.error
484: where group_id = p_group_id
485: and process_phase = wip_constants.ml_validation
486: and process_status in (wip_constants.running,
487: wip_constants.warning)
488: and wip_entity_id = p_wip_entity_id
489: and organization_id = p_organization_id
482: update wip_job_dtls_interface wjdi
483: set process_status = wip_constants.error
484: where group_id = p_group_id
485: and process_phase = wip_constants.ml_validation
486: and process_status in (wip_constants.running,
487: wip_constants.warning)
488: and wip_entity_id = p_wip_entity_id
489: and organization_id = p_organization_id
490: and load_type = wip_job_details.wip_res_usage
483: set process_status = wip_constants.error
484: where group_id = p_group_id
485: and process_phase = wip_constants.ml_validation
486: and process_status in (wip_constants.running,
487: wip_constants.warning)
488: and wip_entity_id = p_wip_entity_id
489: and organization_id = p_organization_id
490: and load_type = wip_job_details.wip_res_usage
491: and substitution_type = wip_job_details.wip_add
509: cursor c_invalid_rows is
510: select interface_id
511: from wip_job_dtls_interface wjdi
512: where group_id = p_group_id
513: and process_phase = wip_constants.ml_validation
514: and process_status in (wip_constants.running,
515: wip_constants.warning)
516: and wip_entity_id = p_wip_entity_id
517: and organization_id = p_organization_id
510: select interface_id
511: from wip_job_dtls_interface wjdi
512: where group_id = p_group_id
513: and process_phase = wip_constants.ml_validation
514: and process_status in (wip_constants.running,
515: wip_constants.warning)
516: and wip_entity_id = p_wip_entity_id
517: and organization_id = p_organization_id
518: and load_type = wip_job_details.wip_res_usage
511: from wip_job_dtls_interface wjdi
512: where group_id = p_group_id
513: and process_phase = wip_constants.ml_validation
514: and process_status in (wip_constants.running,
515: wip_constants.warning)
516: and wip_entity_id = p_wip_entity_id
517: and organization_id = p_organization_id
518: and load_type = wip_job_details.wip_res_usage
519: and substitution_type = wip_job_details.wip_add
563: end loop;
564:
565: if(l_error_exists) then
566: update wip_job_dtls_interface wjdi
567: set process_status = wip_constants.error
568: where group_id = p_group_id
569: and process_phase = wip_constants.ml_validation
570: and process_status in (wip_constants.running,
571: wip_constants.warning)
565: if(l_error_exists) then
566: update wip_job_dtls_interface wjdi
567: set process_status = wip_constants.error
568: where group_id = p_group_id
569: and process_phase = wip_constants.ml_validation
570: and process_status in (wip_constants.running,
571: wip_constants.warning)
572: and wip_entity_id = p_wip_entity_id
573: and organization_id = p_organization_id
566: update wip_job_dtls_interface wjdi
567: set process_status = wip_constants.error
568: where group_id = p_group_id
569: and process_phase = wip_constants.ml_validation
570: and process_status in (wip_constants.running,
571: wip_constants.warning)
572: and wip_entity_id = p_wip_entity_id
573: and organization_id = p_organization_id
574: and load_type = wip_job_details.wip_res_usage
567: set process_status = wip_constants.error
568: where group_id = p_group_id
569: and process_phase = wip_constants.ml_validation
570: and process_status in (wip_constants.running,
571: wip_constants.warning)
572: and wip_entity_id = p_wip_entity_id
573: and organization_id = p_organization_id
574: and load_type = wip_job_details.wip_res_usage
575: and substitution_type = wip_job_details.wip_add