DBA Data[Home] [Help]

APPS.WIP_RESOURCE_VALIDATIONS dependencies on WIP_JOB_DETAILS

Line 41: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)

37: and wjdi.process_status in (wip_constants.running,
38: wip_constants.warning)
39: and wjdi.wip_entity_id = p_wip_entity_id
40: and wjdi.organization_id = p_organization_id
41: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)
42: and wjdi.substitution_type = p_substitution_type
43: and wjdi.operation_seq_num = p_operation_seq_num
44: and ( wjdi.resource_seq_num is null
45: or wjdi.resource_id_old is null);

Line 54: if (wip_job_details.std_alone = 1) then

50: for l_inv_row in c_invalid_rows loop
51: l_error_exists := true;
52: fnd_message.set_name('WIP', 'WIP_JDI_DEL_RES_INFO_MISSING');
53: fnd_message.set_token('INTERFACE', to_char(l_inv_row.interface_id));
54: if (wip_job_details.std_alone = 1) then
55: wip_interface_err_Utils.add_error(p_interface_id => l_inv_row.interface_id,
56: p_text => substr(fnd_message.get,1,500),
57: p_error_type => wip_jdi_utils.msg_error);
58: else

Line 74: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)

70: and process_status in (wip_constants.running,
71: wip_constants.warning)
72: and wip_entity_id = p_wip_entity_id
73: and organization_id = p_organization_id
74: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)
75: and wjdi.substitution_type = p_substitution_type
76: and wjdi.operation_seq_num = p_operation_seq_num
77: and ( wjdi.resource_seq_num is null
78: or wjdi.resource_id_old is null);

Line 103: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)

99: and wjdi.process_status in (wip_constants.running,
100: wip_constants.warning)
101: and wjdi.wip_entity_id = p_wip_entity_id
102: and wjdi.organization_id = p_organization_id
103: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)
104: and wjdi.substitution_type = p_substitution_type
105: and wjdi.operation_seq_num = p_operation_seq_num
106: and wjdi.resource_seq_num = p_resource_seq_num
107: and wjdi.resource_id_old = p_resource_id_old

Line 132: if(wip_job_details.std_alone = 1) then

128: for l_inv_row in c_invalid_rows loop
129: l_error_exists := true;
130: fnd_message.set_name('WIP', 'WIP_JDI_RES_NOT_IN_JOB');
131: fnd_message.set_token('INTERFACE', to_char(l_inv_row.interface_id));
132: if(wip_job_details.std_alone = 1) then
133: wip_interface_err_Utils.add_error(p_interface_id => l_inv_row.interface_id,
134: p_text => substr(fnd_message.get,1,500),
135: p_error_type => wip_jdi_utils.msg_error);
136: else

Line 152: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)

148: and process_status in (wip_constants.running,
149: wip_constants.warning)
150: and wip_entity_id = p_wip_entity_id
151: and organization_id = p_organization_id
152: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)
153: and wjdi.substitution_type = p_substitution_type
154: and wjdi.operation_seq_num = p_operation_seq_num
155: and wjdi.resource_seq_num = p_resource_seq_num
156: and wjdi.resource_id_old = p_resource_id_old

Line 194: and wjdi.load_type = wip_job_details.wip_resource

190: and wjdi.process_status in (wip_constants.running,
191: wip_constants.warning)
192: and wjdi.wip_entity_id = p_wip_entity_id
193: and wjdi.organization_id = p_organization_id
194: and wjdi.load_type = wip_job_details.wip_resource
195: and wjdi.substitution_type = p_substitution_type
196: and wjdi.operation_seq_num = p_operation_seq_num
197: and wor.wip_entity_id = p_wip_entity_id
198: and wor.organization_id = p_organization_id

Line 213: and wjdi.load_type = wip_job_details.wip_resource

209: and wjdi.process_status in (wip_constants.running,
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_resource
214: and wjdi.substitution_type = p_substitution_type
215: and wjdi.operation_seq_num = p_operation_seq_num
216: and ( exists (select 1
217: from wip_transactions wt

Line 242: if(wip_job_details.std_alone = 1) then

238: for l_inv_row in c_invalid_wor_rows loop
239: l_error_exists := true;
240: fnd_message.set_name('WIP', 'WIP_JDI_RES_APPLIED');
241: fnd_message.set_token('INTERFACE', to_char(l_inv_row.interface_id));
242: if(wip_job_details.std_alone = 1) then
243: wip_interface_err_Utils.add_error(p_interface_id => l_inv_row.interface_id,
244: p_text => substr(fnd_message.get,1,500),
245: p_error_type => wip_jdi_utils.msg_error);
246: else

Line 262: and wjdi.load_type = wip_job_details.wip_resource

258: and wjdi.process_status in (wip_constants.running,
259: wip_constants.warning)
260: and wjdi.wip_entity_id = p_wip_entity_id
261: and wjdi.organization_id = p_organization_id
262: and wjdi.load_type = wip_job_details.wip_resource
263: and wjdi.substitution_type = p_substitution_type
264: and wjdi.operation_seq_num = p_operation_seq_num
265: and exists (select 1
266: from wip_operation_resources wor

Line 281: if(wip_job_details.std_alone = 1) then

277: for l_inv_row in c_invalid_txn_rows loop
278: l_error_exists := true;
279: fnd_message.set_name('WIP', 'WIP_JDI_DELETE_RESOURCE');
280: fnd_message.set_token('INTERFACE', to_char(l_inv_row.interface_id));
281: if(wip_job_details.std_alone = 1) then
282: wip_interface_err_Utils.add_error(p_interface_id => l_inv_row.interface_id,
283: p_text => substr(fnd_message.get,1,500),
284: p_error_type => wip_jdi_utils.msg_error);
285: else

Line 301: and wjdi.load_type = wip_job_details.wip_resource

297: and wjdi.process_status in (wip_constants.running,
298: wip_constants.warning)
299: and wjdi.wip_entity_id = p_wip_entity_id
300: and wjdi.organization_id = p_organization_id
301: and wjdi.load_type = wip_job_details.wip_resource
302: and wjdi.substitution_type = p_substitution_type
303: and wjdi.operation_seq_num = p_operation_seq_num
304: and ( exists (select 1
305: from wip_transactions wt

Line 346: and wjdi.load_type = wip_job_details.wip_resource

342: and wjdi.process_status in (wip_constants.running,
343: wip_constants.warning)
344: and wjdi.wip_entity_id = p_wip_entity_id
345: and wjdi.organization_id = p_organization_id
346: and wjdi.load_type = wip_job_details.wip_resource
347: and wjdi.substitution_type = p_substitution_type
348: and wjdi.operation_seq_num = p_operation_seq_num
349: and wjdi.resource_seq_num = p_resource_seq_num
350: and wjdi.resource_id_old = p_resource_id_old

Line 422: IF(wip_job_details.std_alone = 1) THEN

418: -- If we are unable to cancel all PO/requisition associated to this
419: -- job, we will try to cancel as much as we can, then user need to
420: -- manually cancel the rest.
421: wip_utilities.get_message_stack(p_msg =>l_error_text);
422: IF(wip_job_details.std_alone = 1) THEN
423: wip_interface_err_Utils.add_error(
424: p_interface_id => l_inv_row.interface_id,
425: p_text => substrb(l_error_text,1,500),
426: p_error_type => wip_jdi_utils.msg_warning);

Line 439: IF(wip_job_details.std_alone = 1) THEN

435: -- propagate_job_change_to_po is manual or customer does not have PO FPJ
436: l_warning_exists := true;
437: fnd_message.set_name('WIP', 'WIP_DELETE_OSP_RESOURCE');
438: l_error_text := fnd_message.get;
439: IF(wip_job_details.std_alone = 1) THEN
440: wip_interface_err_Utils.add_error(
441: p_interface_id => l_inv_row.interface_id,
442: p_text => l_error_text,
443: p_error_type => wip_jdi_utils.msg_warning);

Line 462: and wjdi.load_type = wip_job_details.wip_resource

458: and wjdi.process_status in (wip_constants.running,
459: wip_constants.warning)
460: and wjdi.wip_entity_id = p_wip_entity_id
461: and wjdi.organization_id = p_organization_id
462: and wjdi.load_type = wip_job_details.wip_resource
463: and wjdi.substitution_type = p_substitution_type
464: and wjdi.operation_seq_num = p_operation_seq_num
465: and wjdi.resource_seq_num = p_resource_seq_num
466: and wjdi.resource_id_old = p_resource_id_old

Line 543: AND load_type = WIP_JOB_DETAILS.WIP_RESOURCE

539: AND process_phase = WIP_CONSTANTS.ML_VALIDATION
540: AND process_status in (WIP_CONSTANTS.RUNNING,WIP_CONSTANTS.WARNING)
541: AND wip_entity_id = p_wip_entity_id
542: AND organization_id = p_organization_id
543: AND load_type = WIP_JOB_DETAILS.WIP_RESOURCE
544: AND substitution_type = p_substitution_type;
545:
546: BEGIN
547: FOR cur_row IN res_info(p_group_id,

Line 625: and wjdi.load_type = wip_job_details.wip_resource

621: and wjdi.process_status in (wip_constants.running,
622: wip_constants.warning)
623: and wjdi.wip_entity_id = p_wip_entity_id
624: and wjdi.organization_id = p_organization_id
625: and wjdi.load_type = wip_job_details.wip_resource
626: and wjdi.substitution_type = p_substitution_type
627: and wjdi.operation_seq_num = p_operation_seq_num
628: and (wjdi.usage_rate_or_amount is null
629: or wjdi.resource_id_new is null);

Line 638: if(wip_job_details.std_alone = 1) then

634: for l_inv_row in c_invalid_rows loop
635: l_error_exists := true;
636: fnd_message.set_name('WIP', 'WIP_JDI_ADD_RES_INFO_MISSING');
637: fnd_message.set_token('INTERFACE', to_char(l_inv_row.interface_id));
638: if(wip_job_details.std_alone = 1) then
639: wip_interface_err_Utils.add_error(p_interface_id => l_inv_row.interface_id,
640: p_text => substr(fnd_message.get,1,500),
641: p_error_type => wip_jdi_utils.msg_error);
642: else

Line 658: and wjdi.load_type = wip_job_details.wip_resource

654: and wjdi.process_status in (wip_constants.running,
655: wip_constants.warning)
656: and wjdi.wip_entity_id = p_wip_entity_id
657: and wjdi.organization_id = p_organization_id
658: and wjdi.load_type = wip_job_details.wip_resource
659: and wjdi.substitution_type = p_substitution_type
660: and wjdi.operation_seq_num = p_operation_seq_num
661: and (wjdi.usage_rate_or_amount is null
662: or wjdi.resource_id_new is null);

Line 684: and wjdi.load_type in (wip_job_details.wip_resource, wjdi.load_type)

680: and wjdi.process_status in (wip_constants.running,
681: wip_constants.warning)
682: and wjdi.wip_entity_id = p_wip_entity_id
683: and wjdi.organization_id = p_organization_id
684: and wjdi.load_type in (wip_job_details.wip_resource, wjdi.load_type)
685: and wjdi.substitution_type = p_substitution_type
686: and wjdi.operation_seq_num = p_operation_seq_num
687: and wjdi.resource_seq_num = p_resource_seq_num
688: and wjdi.resource_id_new = p_resource_id_new

Line 700: if(wip_job_details.std_alone = 1) then

696: for l_inv_row in c_invalid_rows loop
697: l_error_exists := true;
698: fnd_message.set_name('WIP', 'WIP_INVALID_RESOURCE_DATES');
699: fnd_message.set_token('INTERFACE', to_char(l_inv_row.interface_id));
700: if(wip_job_details.std_alone = 1) then
701: wip_interface_err_Utils.add_error(p_interface_id => l_inv_row.interface_id,
702: p_text => substr(fnd_message.get,1,500),
703: p_error_type => wip_jdi_utils.msg_error);
704: else

Line 720: and wjdi.load_type in (wip_job_details.wip_resource, wjdi.load_type)

716: and wjdi.process_status in (wip_constants.running,
717: wip_constants.warning)
718: and wjdi.wip_entity_id = p_wip_entity_id
719: and wjdi.organization_id = p_organization_id
720: and wjdi.load_type in (wip_job_details.wip_resource, wjdi.load_type)
721: and wjdi.substitution_type = p_substitution_type
722: and wjdi.operation_seq_num = p_operation_seq_num
723: and wjdi.resource_seq_num = p_resource_seq_num
724: and wjdi.resource_id_new = p_resource_id_new

Line 748: and wjdi.load_type in (wip_job_details.wip_resource, wjdi.load_type)

744: and wjdi.process_status in (wip_constants.running,
745: wip_constants.warning)
746: and wjdi.wip_entity_id = p_wip_entity_id
747: and wjdi.organization_id = p_organization_id
748: and wjdi.load_type in (wip_job_details.wip_resource, wjdi.load_type)
749: and wjdi.substitution_type = p_substitution_type
750: and wjdi.operation_seq_num = p_operation_seq_num
751: and wjdi.resource_seq_num = p_resource_seq_num
752: and wjdi.resource_id_old = p_resource_id_old

Line 774: if(wip_job_details.std_alone = 1) then

770: for l_inv_row in c_invalid_rows loop
771: l_error_exists := true;
772: fnd_message.set_name('WIP', 'WIP_INVALID_RESOURCE_DATES');
773: fnd_message.set_token('INTERFACE', to_char(l_inv_row.interface_id));
774: if(wip_job_details.std_alone = 1) then
775: wip_interface_err_Utils.add_error(p_interface_id => l_inv_row.interface_id,
776: p_text => substr(fnd_message.get,1,500),
777: p_error_type => wip_jdi_utils.msg_error);
778: else

Line 794: and wjdi.load_type in (wip_job_details.wip_resource, wjdi.load_type)

790: and wjdi.process_status in (wip_constants.running,
791: wip_constants.warning)
792: and wjdi.wip_entity_id = p_wip_entity_id
793: and wjdi.organization_id = p_organization_id
794: and wjdi.load_type in (wip_job_details.wip_resource, wjdi.load_type)
795: and wjdi.substitution_type = p_substitution_type
796: and wjdi.operation_seq_num = p_operation_seq_num
797: and wjdi.resource_seq_num = p_resource_seq_num
798: and wjdi.resource_id_old = p_resource_id_old

Line 833: and wjdi.load_type in (wip_job_details.wip_resource, wjdi.load_type)

829: and wjdi.process_status in (wip_constants.running,
830: wip_constants.warning)
831: and wjdi.wip_entity_id = p_wip_entity_id
832: and wjdi.organization_id = p_organization_id
833: and wjdi.load_type in (wip_job_details.wip_resource, wjdi.load_type)
834: and wjdi.substitution_type = p_substitution_type
835: and wjdi.operation_seq_num = p_operation_seq_num
836: and wjdi.resource_seq_num = p_resource_seq_num
837: and wjdi.resource_id_new = p_resource_id_new

Line 842: and not ( wjdi.load_type = wip_job_details.wip_resource

838: and wo.wip_entity_id = p_wip_entity_id
839: and wo.operation_seq_num = p_operation_seq_num
840: and wo.organization_id = p_organization_id
841: and wo.repetitive_schedule_id is null
842: and not ( wjdi.load_type = wip_job_details.wip_resource
843: and wjdi.substitution_type = wip_job_details.wip_change
844: and wjdi.substitute_group_num is not null
845: -- Bug 12937792. Replacement Group can be Null.
846: --and wjdi.replacement_group_num is not null

Line 843: and wjdi.substitution_type = wip_job_details.wip_change

839: and wo.operation_seq_num = p_operation_seq_num
840: and wo.organization_id = p_organization_id
841: and wo.repetitive_schedule_id is null
842: and not ( wjdi.load_type = wip_job_details.wip_resource
843: and wjdi.substitution_type = wip_job_details.wip_change
844: and wjdi.substitute_group_num is not null
845: -- Bug 12937792. Replacement Group can be Null.
846: --and wjdi.replacement_group_num is not null
847: )

Line 869: if(wip_job_details.std_alone = 1) then

865: for l_inv_row in c_invalid_rows loop
866: l_error_exists := true;
867: fnd_message.set_name('WIP', 'WIP_INVALID_RESOURCE');
868: fnd_message.set_token('INTERFACE', to_char(l_inv_row.interface_id));
869: if(wip_job_details.std_alone = 1) then
870: wip_interface_err_Utils.add_error(p_interface_id => l_inv_row.interface_id,
871: p_text => substr(fnd_message.get,1,500),
872: p_error_type => wip_jdi_utils.msg_error);
873: else

Line 889: and wjdi.load_type in (wip_job_details.wip_resource, wjdi.load_type)

885: and wjdi.process_status in (wip_constants.running,
886: wip_constants.warning)
887: and wjdi.wip_entity_id = p_wip_entity_id
888: and wjdi.organization_id = p_organization_id
889: and wjdi.load_type in (wip_job_details.wip_resource, wjdi.load_type)
890: and wjdi.substitution_type = p_substitution_type
891: and wjdi.operation_seq_num = p_operation_seq_num
892: and wjdi.resource_seq_num = p_resource_seq_num
893: and wjdi.resource_id_new = p_resource_id_new

Line 894: and not ( wjdi.load_type = wip_job_details.wip_resource

890: and wjdi.substitution_type = p_substitution_type
891: and wjdi.operation_seq_num = p_operation_seq_num
892: and wjdi.resource_seq_num = p_resource_seq_num
893: and wjdi.resource_id_new = p_resource_id_new
894: and not ( wjdi.load_type = wip_job_details.wip_resource
895: and wjdi.substitution_type = wip_job_details.wip_change
896: and wjdi.substitute_group_num is not null
897: -- Bug 12937792. Replacement Group can be Null.
898: --and wjdi.replacement_group_num is not null

Line 895: and wjdi.substitution_type = wip_job_details.wip_change

891: and wjdi.operation_seq_num = p_operation_seq_num
892: and wjdi.resource_seq_num = p_resource_seq_num
893: and wjdi.resource_id_new = p_resource_id_new
894: and not ( wjdi.load_type = wip_job_details.wip_resource
895: and wjdi.substitution_type = wip_job_details.wip_change
896: and wjdi.substitute_group_num is not null
897: -- Bug 12937792. Replacement Group can be Null.
898: --and wjdi.replacement_group_num is not null
899: )

Line 936: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)

932: and wjdi.process_status in (wip_constants.running,
933: wip_constants.warning)
934: and wjdi.wip_entity_id = p_wip_entity_id
935: and wjdi.organization_id = p_organization_id
936: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)
937: and wjdi.substitution_type = p_substitution_type
938: and wjdi.operation_seq_num = p_operation_seq_num
939: and wjdi.resource_seq_num = p_resource_seq_num
940: and ( resource_seq_num <= 0

Line 971: if(wip_job_details.std_alone = 1) then

967: for l_inv_row in c_invalid_rows loop
968: l_error_exists := true;
969: fnd_message.set_name('WIP', 'WIP_JDI_RES_SEQ_NUM_EXIST');
970: fnd_message.set_token('INTERFACE', to_char(l_inv_row.interface_id));
971: if(wip_job_details.std_alone = 1) then
972: wip_interface_err_Utils.add_error(p_interface_id => l_inv_row.interface_id,
973: p_text => substr(fnd_message.get,1,500),
974: p_error_type => wip_jdi_utils.msg_error);
975: else

Line 991: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)

987: and wjdi.process_status in (wip_constants.running,
988: wip_constants.warning)
989: and wjdi.wip_entity_id = p_wip_entity_id
990: and wjdi.organization_id = p_organization_id
991: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)
992: and wjdi.substitution_type = p_substitution_type
993: and wjdi.operation_seq_num = p_operation_seq_num
994: and wjdi.resource_seq_num = p_resource_seq_num
995: and ( resource_seq_num <= 0

Line 1028: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)

1024: and wjdi.process_status in (wip_constants.running,
1025: wip_constants.warning)
1026: and wjdi.wip_entity_id = p_wip_entity_id
1027: and wjdi.organization_id = p_organization_id
1028: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)
1029: and wjdi.substitution_type = p_substitution_type
1030: and wjdi.operation_seq_num = p_operation_seq_num
1031: and wjdi.resource_seq_num = p_resource_seq_num
1032: and wjdi.resource_id_new = p_resource_id_new

Line 1034: and not ( wjdi.load_type = wip_job_details.wip_resource

1030: and wjdi.operation_seq_num = p_operation_seq_num
1031: and wjdi.resource_seq_num = p_resource_seq_num
1032: and wjdi.resource_id_new = p_resource_id_new
1033: -- jy: no need to do this validation if doing res substitution
1034: and not ( wjdi.load_type = wip_job_details.wip_resource
1035: and wjdi.substitution_type = wip_job_details.wip_change
1036: and wjdi.substitute_group_num is not null
1037: -- Bug 12937792. Replacement Group can be Null.
1038: -- and wjdi.replacement_group_num is not null

Line 1035: and wjdi.substitution_type = wip_job_details.wip_change

1031: and wjdi.resource_seq_num = p_resource_seq_num
1032: and wjdi.resource_id_new = p_resource_id_new
1033: -- jy: no need to do this validation if doing res substitution
1034: and not ( wjdi.load_type = wip_job_details.wip_resource
1035: and wjdi.substitution_type = wip_job_details.wip_change
1036: and wjdi.substitute_group_num is not null
1037: -- Bug 12937792. Replacement Group can be Null.
1038: -- and wjdi.replacement_group_num is not null
1039: );

Line 1074: if(wip_job_details.std_alone = 1) then

1070: for l_inv_row in c_invalid_rows loop
1071: l_error_exists := true;
1072: fnd_message.set_name('WIP', 'WIP_JDI_NULL_CHARGE_TYPE');
1073: fnd_message.set_token('INTERFACE', to_char(l_inv_row.interface_id));
1074: if(wip_job_details.std_alone = 1) then
1075: wip_interface_err_Utils.add_error(p_interface_id => l_inv_row.interface_id,
1076: p_text => substr(fnd_message.get,1,500),
1077: p_error_type => wip_jdi_utils.msg_error);
1078: else

Line 1094: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)

1090: and wjdi.process_status in (wip_constants.running,
1091: wip_constants.warning)
1092: and wjdi.wip_entity_id = p_wip_entity_id
1093: and wjdi.organization_id = p_organization_id
1094: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)
1095: and wjdi.substitution_type = p_substitution_type
1096: and wjdi.operation_seq_num = p_operation_seq_num
1097: and wjdi.resource_seq_num = p_resource_seq_num
1098: and wjdi.resource_id_new = p_resource_id_new

Line 1099: and not ( wjdi.load_type = wip_job_details.wip_resource

1095: and wjdi.substitution_type = p_substitution_type
1096: and wjdi.operation_seq_num = p_operation_seq_num
1097: and wjdi.resource_seq_num = p_resource_seq_num
1098: and wjdi.resource_id_new = p_resource_id_new
1099: and not ( wjdi.load_type = wip_job_details.wip_resource
1100: and wjdi.substitution_type = wip_job_details.wip_change
1101: and wjdi.substitute_group_num is not null
1102: -- Bug 12937792. Replacement Group can be Null.
1103: --and wjdi.replacement_group_num is not null

Line 1100: and wjdi.substitution_type = wip_job_details.wip_change

1096: and wjdi.operation_seq_num = p_operation_seq_num
1097: and wjdi.resource_seq_num = p_resource_seq_num
1098: and wjdi.resource_id_new = p_resource_id_new
1099: and not ( wjdi.load_type = wip_job_details.wip_resource
1100: and wjdi.substitution_type = wip_job_details.wip_change
1101: and wjdi.substitute_group_num is not null
1102: -- Bug 12937792. Replacement Group can be Null.
1103: --and wjdi.replacement_group_num is not null
1104: );

Line 1115: if(wip_job_details.std_alone = 1) then

1111: if(l_inv_row.usage_rate_or_amount = p_usage_rate_or_amount) then
1112: l_error_exists := true;
1113: fnd_message.set_name('WIP', 'WIP_JDI_INVALID_RATE');
1114: fnd_message.set_token('INTERFACE', to_char(l_inv_row.interface_id));
1115: if(wip_job_details.std_alone = 1) then
1116: wip_interface_err_Utils.add_error(p_interface_id => l_inv_row.interface_id,
1117: p_text => substr(fnd_message.get,1,500),
1118: p_error_type => wip_jdi_utils.msg_error);
1119: else

Line 1136: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)

1132: and wjdi.process_status in (wip_constants.running,
1133: wip_constants.warning)
1134: and wjdi.wip_entity_id = p_wip_entity_id
1135: and wjdi.organization_id = p_organization_id
1136: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)
1137: and wjdi.substitution_type = p_substitution_type
1138: and wjdi.operation_seq_num = p_operation_seq_num
1139: and wjdi.resource_seq_num = p_resource_seq_num
1140: and wjdi.resource_id_new = p_resource_id_new

Line 1142: and not ( wjdi.load_type = wip_job_details.wip_resource

1138: and wjdi.operation_seq_num = p_operation_seq_num
1139: and wjdi.resource_seq_num = p_resource_seq_num
1140: and wjdi.resource_id_new = p_resource_id_new
1141: and wjdi.usage_rate_or_amount = p_usage_rate_or_amount
1142: and not ( wjdi.load_type = wip_job_details.wip_resource
1143: and wjdi.substitution_type = wip_job_details.wip_change
1144: and wjdi.substitute_group_num is not null
1145: -- Bug 12937792. Replacement Group can be Null.
1146: -- and wjdi.replacement_group_num is not null

Line 1143: and wjdi.substitution_type = wip_job_details.wip_change

1139: and wjdi.resource_seq_num = p_resource_seq_num
1140: and wjdi.resource_id_new = p_resource_id_new
1141: and wjdi.usage_rate_or_amount = p_usage_rate_or_amount
1142: and not ( wjdi.load_type = wip_job_details.wip_resource
1143: and wjdi.substitution_type = wip_job_details.wip_change
1144: and wjdi.substitute_group_num is not null
1145: -- Bug 12937792. Replacement Group can be Null.
1146: -- and wjdi.replacement_group_num is not null
1147: );

Line 1176: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)

1172: wip_constants.running,
1173: wip_constants.warning)
1174: and wjdi.wip_entity_id = p_wip_entity_id
1175: and wjdi.organization_id = p_organization_id
1176: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)
1177: and wjdi.substitution_type = p_substitution_type
1178: and wjdi.operation_seq_num = p_operation_seq_num
1179: and wjdi.resource_seq_num = p_resource_seq_num
1180: and (wjdi.assigned_units <= 0

Line 1182: and wjdi.substitution_type = wip_job_details.wip_add)

1178: and wjdi.operation_seq_num = p_operation_seq_num
1179: and wjdi.resource_seq_num = p_resource_seq_num
1180: and (wjdi.assigned_units <= 0
1181: or (wjdi.assigned_units is null
1182: and wjdi.substitution_type = wip_job_details.wip_add)
1183: or (wjdi.assigned_units is not null and wjdi.assigned_units <> 1
1184: and (wjdi.setup_id is not null or exists
1185: (select 1
1186: from bom_resources br

Line 1203: if (p_substitution_type = wip_job_details.wip_change) then

1199:
1200: begin
1201:
1202: /* BEGIN commented for Bug 11844798. Since l_maximum_assigned_units is not used.
1203: if (p_substitution_type = wip_job_details.wip_change) then
1204: if (p_load_type = WIP_JOB_DETAILS.WIP_RESOURCE) then
1205: BEGIN
1206: select maximum_assigned_units
1207: into l_maximum_assigned_units

Line 1204: if (p_load_type = WIP_JOB_DETAILS.WIP_RESOURCE) then

1200: begin
1201:
1202: /* BEGIN commented for Bug 11844798. Since l_maximum_assigned_units is not used.
1203: if (p_substitution_type = wip_job_details.wip_change) then
1204: if (p_load_type = WIP_JOB_DETAILS.WIP_RESOURCE) then
1205: BEGIN
1206: select maximum_assigned_units
1207: into l_maximum_assigned_units
1208: from wip_operation_resources

Line 1224: elsif (p_load_type = WIP_JOB_DETAILS.WIP_SUB_RES) then

1220: and operation_seq_num = p_operation_seq_num
1221: and resource_seq_num = p_resource_seq_num;
1222: END;
1223:
1224: elsif (p_load_type = WIP_JOB_DETAILS.WIP_SUB_RES) then
1225: select maximum_assigned_units
1226: into l_maximum_assigned_units
1227: from wip_sub_operation_resources
1228: where wip_entity_id = p_wip_entity_id

Line 1249: if(wip_job_details.std_alone = 1) then

1245: for l_inv_row in c_invalid_rows loop
1246: l_error_exists := true;
1247: fnd_message.set_name('WIP', 'WIP_INV_ASSIGNED_UNITS');
1248: fnd_message.set_token('INTERFACE', to_char(l_inv_row.interface_id));
1249: if(wip_job_details.std_alone = 1) then
1250: wip_interface_err_Utils.add_error(p_interface_id => l_inv_row.interface_id,
1251: p_text => substr(fnd_message.get,1,500),
1252: p_error_type => wip_jdi_utils.msg_error);
1253: else

Line 1269: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)

1265: and wjdi.process_status in (wip_constants.running,
1266: wip_constants.warning)
1267: and wjdi.wip_entity_id = p_wip_entity_id
1268: and wjdi.organization_id = p_organization_id
1269: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)
1270: and wjdi.substitution_type = p_substitution_type
1271: and (wjdi.assigned_units <= 0
1272: or (wjdi.assigned_units is null
1273: and wjdi.substitution_type = wip_job_details.wip_add)

Line 1273: and wjdi.substitution_type = wip_job_details.wip_add)

1269: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)
1270: and wjdi.substitution_type = p_substitution_type
1271: and (wjdi.assigned_units <= 0
1272: or (wjdi.assigned_units is null
1273: and wjdi.substitution_type = wip_job_details.wip_add)
1274: or (wjdi.assigned_units is not null and wjdi.assigned_units <> 1
1275: and (wjdi.setup_id is not null or exists
1276: (select 1
1277: from bom_resources br

Line 1310: if (p_substitution_type = wip_job_details.WIP_ADD) then

1306: x_res_seq_num number := null;
1307: x_schedule_seq_num number;
1308: begin
1309:
1310: if (p_substitution_type = wip_job_details.WIP_ADD) then
1311: -- default res_seq_num to be max existing res_seq_num + 10
1312: if (p_resource_seq_num is null) then
1313: begin
1314: select nvl(max(resource_seq_num), 0)

Line 1391: elsif (p_substitution_type = wip_job_details.WIP_CHANGE) then

1387: SET schedule_seq_num = x_schedule_seq_num
1388: WHERE rowid = p_rowid;
1389:
1390: end if;
1391: elsif (p_substitution_type = wip_job_details.WIP_CHANGE) then
1392: begin
1393: select setup_id
1394: into x_setup_id
1395: from wip_operation_resources

Line 1452: AND load_type = WIP_JOB_DETAILS.WIP_RESOURCE

1448: AND process_phase = WIP_CONSTANTS.ML_VALIDATION
1449: AND process_status in (WIP_CONSTANTS.RUNNING,WIP_CONSTANTS.WARNING)
1450: AND wip_entity_id = p_wip_entity_id
1451: AND organization_id = p_organization_id
1452: AND load_type = WIP_JOB_DETAILS.WIP_RESOURCE
1453: AND substitution_type = p_substitution_type;
1454:
1455: BEGIN
1456:

Line 1549: WIP_JOB_DETAILS.WIP_RESOURCE,

1545:
1546: Assigned_Units(p_group_id,
1547: p_wip_entity_id,
1548: p_organization_id,
1549: WIP_JOB_DETAILS.WIP_RESOURCE,
1550: p_substitution_type,
1551: cur_row.operation_seq_num,
1552: cur_row.resource_seq_num);
1553:

Line 1619: and wjdi.load_type = wip_job_details.wip_resource

1615: and wjdi.process_status in (wip_constants.running,
1616: wip_constants.warning)
1617: and wjdi.wip_entity_id = p_wip_entity_id
1618: and wjdi.organization_id = p_organization_id
1619: and wjdi.load_type = wip_job_details.wip_resource
1620: and wjdi.substitution_type = p_substitution_type
1621: and wjdi.operation_seq_num = p_operation_seq_num
1622: and wjdi.resource_seq_num = p_resource_seq_num
1623: and (wjdi.assigned_units < 0 or

Line 1644: if(wip_job_details.std_alone = 1) then

1640: for l_inv_row in c_invalid_rows loop
1641: l_error_exists := true;
1642: fnd_message.set_name('WIP', 'WIP_ASSIGNED_UNITS_ERROR');
1643: fnd_message.set_token('INTERFACE', to_char(l_inv_row.interface_id));
1644: if(wip_job_details.std_alone = 1) then
1645: wip_interface_err_Utils.add_error(p_interface_id => l_inv_row.interface_id,
1646: p_text => substr(fnd_message.get,1,500),
1647: p_error_type => wip_jdi_utils.msg_error);
1648: else

Line 1663: and wjdi.load_type in (wip_job_details.wip_resource)

1659: and wjdi.process_status in (wip_constants.running,
1660: wip_constants.warning)
1661: and wjdi.wip_entity_id = p_wip_entity_id
1662: and wjdi.organization_id = p_organization_id
1663: and wjdi.load_type in (wip_job_details.wip_resource)
1664: and wjdi.substitution_type = p_substitution_type
1665: and wjdi.operation_seq_num = p_operation_seq_num
1666: and wjdi.resource_seq_num = p_resource_seq_num
1667: and (wjdi.assigned_units < 0 or

Line 1686: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)

1682: and wjdi.process_status in (wip_constants.running,
1683: wip_constants.warning)
1684: and wjdi.wip_entity_id = p_wip_entity_id
1685: and wjdi.organization_id = p_organization_id
1686: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)
1687: and wjdi.substitution_type = p_substitution_type
1688: and wjdi.operation_seq_num = p_operation_seq_num
1689: and ( wjdi.resource_seq_num is null
1690: or wjdi.resource_id_old is null

Line 1705: if(wip_job_details.std_alone = 1) then

1701: for l_inv_row in c_invalid_rows loop
1702: l_error_exists := true;
1703: fnd_message.set_name('WIP', 'WIP_JDI_CHNG_RES_INFO_MISSING');
1704: fnd_message.set_token('INTERFACE', to_char(l_inv_row.interface_id));
1705: if(wip_job_details.std_alone = 1) then
1706: wip_interface_err_Utils.add_error(p_interface_id => l_inv_row.interface_id,
1707: p_text => substr(fnd_message.get,1,500),
1708: p_error_type => wip_jdi_utils.msg_error);
1709: else

Line 1725: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)

1721: and wjdi.process_status in (wip_constants.running,
1722: wip_constants.warning)
1723: and wjdi.wip_entity_id = p_wip_entity_id
1724: and wjdi.organization_id = p_organization_id
1725: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)
1726: and wjdi.substitution_type = p_substitution_type
1727: and wjdi.operation_seq_num = p_operation_seq_num
1728: and ( wjdi.resource_seq_num is null
1729: or wjdi.resource_id_old is null

Line 1791: AND load_type = WIP_JOB_DETAILS.WIP_RESOURCE

1787: AND process_phase = WIP_CONSTANTS.ML_VALIDATION
1788: AND process_status in (WIP_CONSTANTS.RUNNING,WIP_CONSTANTS.WARNING)
1789: AND wip_entity_id = p_wip_entity_id
1790: AND organization_id = p_organization_id
1791: AND load_type = WIP_JOB_DETAILS.WIP_RESOURCE
1792: AND substitution_type = p_substitution_type;
1793:
1794: BEGIN
1795:

Line 1924: WIP_JOB_DETAILS.WIP_RESOURCE,

1920:
1921: Assigned_Units(p_group_id,
1922: p_wip_entity_id,
1923: p_organization_id,
1924: WIP_JOB_DETAILS.WIP_RESOURCE,
1925: p_substitution_type,
1926: cur_row.operation_seq_num,
1927: cur_row.resource_seq_num);
1928:

Line 2009: AND load_type = WIP_JOB_DETAILS.WIP_RESOURCE

2005: WHERE group_id = p_group_id
2006: AND process_status = WIP_CONSTANTS.ERROR
2007: AND wip_entity_id = p_wip_entity_id
2008: AND organization_id = p_organization_id
2009: AND load_type = WIP_JOB_DETAILS.WIP_RESOURCE
2010: AND substitution_type= p_substitution_type
2011: AND operation_seq_num= p_operation_seq_num
2012: AND resource_seq_num = p_resource_seq_num;
2013:

Line 2033: IF p_substitution_type = WIP_JOB_DETAILS.WIP_DELETE THEN

2029: x_count number := 0;
2030:
2031: BEGIN
2032:
2033: IF p_substitution_type = WIP_JOB_DETAILS.WIP_DELETE THEN
2034: SELECT count(*)
2035: INTO x_count
2036: FROM WIP_JOB_DTLS_INTERFACE
2037: WHERE group_id = p_group_id

Line 2041: AND load_type = WIP_JOB_DETAILS.WIP_RESOURCE

2037: WHERE group_id = p_group_id
2038: AND process_status = WIP_CONSTANTS.ERROR
2039: AND wip_entity_id = p_wip_entity_id
2040: AND organization_id = p_organization_id
2041: AND load_type = WIP_JOB_DETAILS.WIP_RESOURCE
2042: AND substitution_type= p_substitution_type
2043: AND operation_seq_num= p_operation_seq_num
2044: AND (resource_seq_num IS NULL
2045: OR resource_id_old IS NULL);

Line 2047: ELSIF p_substitution_type = WIP_JOB_DETAILS.WIP_ADD THEN

2043: AND operation_seq_num= p_operation_seq_num
2044: AND (resource_seq_num IS NULL
2045: OR resource_id_old IS NULL);
2046:
2047: ELSIF p_substitution_type = WIP_JOB_DETAILS.WIP_ADD THEN
2048: SELECT count(*)
2049: INTO x_count
2050: FROM WIP_JOB_DTLS_INTERFACE
2051: WHERE group_id = p_group_id

Line 2055: AND load_type = WIP_JOB_DETAILS.WIP_RESOURCE

2051: WHERE group_id = p_group_id
2052: AND process_status = WIP_CONSTANTS.ERROR
2053: AND wip_entity_id = p_wip_entity_id
2054: AND organization_id = p_organization_id
2055: AND load_type = WIP_JOB_DETAILS.WIP_RESOURCE
2056: AND substitution_type= p_substitution_type
2057: AND operation_seq_num= p_operation_seq_num
2058: AND (resource_id_new IS NULL
2059: OR usage_rate_or_amount IS NULL);

Line 2061: ELSIF p_substitution_type = WIP_JOB_DETAILS.WIP_CHANGE THEN

2057: AND operation_seq_num= p_operation_seq_num
2058: AND (resource_id_new IS NULL
2059: OR usage_rate_or_amount IS NULL);
2060:
2061: ELSIF p_substitution_type = WIP_JOB_DETAILS.WIP_CHANGE THEN
2062: SELECT count(*)
2063: INTO x_count
2064: FROM WIP_JOB_DTLS_INTERFACE
2065: WHERE group_id = p_group_id

Line 2069: AND load_type = WIP_JOB_DETAILS.WIP_RESOURCE

2065: WHERE group_id = p_group_id
2066: AND process_status = WIP_CONSTANTS.ERROR
2067: AND wip_entity_id = p_wip_entity_id
2068: AND organization_id = p_organization_id
2069: AND load_type = WIP_JOB_DETAILS.WIP_RESOURCE
2070: AND substitution_type= p_substitution_type
2071: AND operation_seq_num= p_operation_seq_num
2072: AND (resource_seq_num IS NULL
2073: OR resource_id_old IS NULL

Line 2114: AND load_type = WIP_JOB_DETAILS.WIP_SUB_RES

2110: AND process_phase = WIP_CONSTANTS.ML_VALIDATION
2111: AND process_status in (WIP_CONSTANTS.RUNNING,WIP_CONSTANTS.WARNING)
2112: AND wip_entity_id = p_wip_entity_id
2113: AND organization_id = p_organization_id
2114: AND load_type = WIP_JOB_DETAILS.WIP_SUB_RES
2115: AND substitution_type = p_substitution_type;
2116:
2117: BEGIN
2118: FOR cur_row IN res_info(p_group_id,

Line 2165: and wjdi.load_type = wip_job_details.wip_resource

2161: and wjdi.process_status in (wip_constants.running,
2162: wip_constants.warning)
2163: and wjdi.wip_entity_id = p_wip_entity_id
2164: and wjdi.organization_id = p_organization_id
2165: and wjdi.load_type = wip_job_details.wip_resource
2166: and wjdi.substitution_type = p_substitution_type
2167: and wjdi.operation_seq_num = p_operation_seq_num
2168: and wjdi.resource_seq_num = p_resource_seq_num
2169: and wjdi.resource_id_old = p_resource_id_old

Line 2224: and wjdi.load_type = wip_job_details.wip_resource

2220: and wjdi.process_status in (wip_constants.running,
2221: wip_constants.warning)
2222: and wjdi.wip_entity_id = p_wip_entity_id
2223: and wjdi.organization_id = p_organization_id
2224: and wjdi.load_type = wip_job_details.wip_resource
2225: and wjdi.substitution_type = p_substitution_type
2226: and wjdi.operation_seq_num = p_operation_seq_num
2227: and wjdi.resource_seq_num = p_resource_seq_num
2228: and wjdi.resource_id_old = p_resource_id_old

Line 2263: and load_type = wip_job_details.wip_resource

2259: and process_status in (wip_constants.running,
2260: wip_constants.warning)
2261: and wip_entity_id = p_wip_entity_id
2262: and organization_id = p_organization_id
2263: and load_type = wip_job_details.wip_resource
2264: and substitution_type = p_substitution_type
2265: and operation_seq_num = p_operation_seq_num
2266: and resource_seq_num = p_resource_seq_num
2267: and resource_id_old = p_resource_id_old

Line 2281: if(wip_job_details.std_alone = 1) then

2277: for l_inv_row in c_invalid_rows loop
2278: l_error_exists := true;
2279: fnd_message.set_name('WIP','WIP_JDI_RES_SUB_INFO_MISSING' );
2280: fnd_message.set_token('INTERFACE', to_char(l_inv_row.interface_id));
2281: if(wip_job_details.std_alone = 1) then
2282: wip_interface_err_Utils.add_error(p_interface_id => l_inv_row.interface_id,
2283: p_text => substr(fnd_message.get,1,500),
2284: p_error_type => wip_jdi_utils.msg_error);
2285: else

Line 2301: and wjdi.load_type = wip_job_details.wip_resource

2297: and wjdi.process_status in (wip_constants.running,
2298: wip_constants.warning)
2299: and wjdi.wip_entity_id = p_wip_entity_id
2300: and wjdi.organization_id = p_organization_id
2301: and wjdi.load_type = wip_job_details.wip_resource
2302: and wjdi.substitution_type = p_substitution_type
2303: and wjdi.operation_seq_num = p_operation_seq_num
2304: and wjdi.resource_seq_num = p_resource_seq_num
2305: and wjdi.resource_id_old = p_resource_id_old

Line 2378: and wjdi.load_type = wip_job_details.wip_sub_res

2374: and wjdi.process_status in (wip_constants.running,
2375: wip_constants.warning)
2376: and wjdi.wip_entity_id = p_wip_entity_id
2377: and wjdi.organization_id = p_organization_id
2378: and wjdi.load_type = wip_job_details.wip_sub_res
2379: and wjdi.substitution_type = p_substitution_type
2380: and wjdi.operation_seq_num = p_operation_seq_num
2381: and wjdi.resource_seq_num = p_resource_seq_num
2382: and ( wjdi.schedule_seq_num < 0

Line 2410: if(wip_job_details.std_alone = 1) then

2406: for l_inv_row in c_invalid_rows loop
2407: l_error_exists := true;
2408: fnd_message.set_name('WIP', 'WIP_JDI_RES_SUB_INFO_MISSING');
2409: fnd_message.set_token('INTERFACE', to_char(l_inv_row.interface_id));
2410: if(wip_job_details.std_alone = 1) then
2411: wip_interface_err_Utils.add_error(p_interface_id => l_inv_row.interface_id,
2412: p_text => substr(fnd_message.get,1,500),
2413: p_error_type => wip_jdi_utils.msg_error);
2414: else

Line 2430: and wjdi.load_type = wip_job_details.wip_sub_res

2426: and wjdi.process_status in (wip_constants.running,
2427: wip_constants.warning)
2428: and wjdi.wip_entity_id = p_wip_entity_id
2429: and wjdi.organization_id = p_organization_id
2430: and wjdi.load_type = wip_job_details.wip_sub_res
2431: and wjdi.substitution_type = p_substitution_type
2432: and wjdi.operation_seq_num = p_operation_seq_num
2433: and wjdi.resource_seq_num = p_resource_seq_num
2434: and ( wjdi.schedule_seq_num is null

Line 2492: AND load_type = WIP_JOB_DETAILS.WIP_SUB_RES

2488: AND process_phase = WIP_CONSTANTS.ML_VALIDATION
2489: AND process_status in (WIP_CONSTANTS.RUNNING,WIP_CONSTANTS.WARNING)
2490: AND wip_entity_id = p_wip_entity_id
2491: AND organization_id = p_organization_id
2492: AND load_type = WIP_JOB_DETAILS.WIP_SUB_RES
2493: AND substitution_type = p_substitution_type;
2494:
2495:
2496: BEGIN

Line 2574: WIP_JOB_DETAILS.WIP_SUB_RES,

2570:
2571: Assigned_Units(p_group_id,
2572: p_wip_entity_id,
2573: p_organization_id,
2574: WIP_JOB_DETAILS.WIP_SUB_RES,
2575: p_substitution_type,
2576: cur_row.operation_seq_num,
2577: cur_row.resource_seq_num);
2578:

Line 2669: AND load_type = WIP_JOB_DETAILS.WIP_SUB_RES

2665: AND process_phase = WIP_CONSTANTS.ML_VALIDATION
2666: AND process_status in (WIP_CONSTANTS.RUNNING,WIP_CONSTANTS.WARNING)
2667: AND wip_entity_id = p_wip_entity_id
2668: AND organization_id = p_organization_id
2669: AND load_type = WIP_JOB_DETAILS.WIP_SUB_RES
2670: AND substitution_type = p_substitution_type;
2671:
2672:
2673: BEGIN

Line 2767: WIP_JOB_DETAILS.WIP_SUB_RES,

2763:
2764: Assigned_Units(p_group_id,
2765: p_wip_entity_id,
2766: p_organization_id,
2767: WIP_JOB_DETAILS.WIP_SUB_RES,
2768: p_substitution_type,
2769: cur_row.operation_seq_num,
2770: cur_row.resource_seq_num);
2771:

Line 2836: and wjdi.load_type = wip_job_details.wip_resource

2832: and wjdi.process_status in (wip_constants.running,
2833: wip_constants.warning)
2834: and wjdi.wip_entity_id = p_wip_entity_id
2835: and wjdi.organization_id = p_organization_id
2836: and wjdi.load_type = wip_job_details.wip_resource
2837: and wjdi.substitution_type = p_substitution_type
2838: and wjdi.operation_seq_num = p_operation_seq_num
2839: and wjdi.resource_seq_num = p_resource_seq_num
2840: and ( (wjdi.schedule_seq_num = p_schedule_seq_num)

Line 2863: p_substitution_type = WIP_JOB_DETAILS.WIP_ADD)) then

2859:
2860: if ((sched_row.substitute_group_num <= 0) OR
2861: (sched_row.schedule_seq_num <= 0) OR
2862: (sched_row.replacement_group_num <= 0 AND
2863: p_substitution_type = WIP_JOB_DETAILS.WIP_ADD)) then
2864:
2865: /*Bug 5227753 - Added AND condition above for p_substitution_type in replacement group check*/
2866: fnd_message.set_name('WIP', 'WIP_JDI_INVALID_SCHED_SUB');
2867: fnd_message.set_token('INTERFACE', to_char(sched_row.interface_id));

Line 2868: if(wip_job_details.std_alone = 1) then

2864:
2865: /*Bug 5227753 - Added AND condition above for p_substitution_type in replacement group check*/
2866: fnd_message.set_name('WIP', 'WIP_JDI_INVALID_SCHED_SUB');
2867: fnd_message.set_token('INTERFACE', to_char(sched_row.interface_id));
2868: if(wip_job_details.std_alone = 1) then
2869: wip_interface_err_Utils.add_error(p_interface_id => sched_row.interface_id,
2870: p_text => substr(fnd_message.get,1,500),
2871: p_error_type => wip_jdi_utils.msg_error);
2872: else

Line 2884: if (sched_row.substitution_type = wip_job_details.wip_add) then

2880: where current of sched_rows;
2881: return;
2882: end if;
2883:
2884: if (sched_row.substitution_type = wip_job_details.wip_add) then
2885: if (sched_row.substitute_group_num is not null) then
2886: begin
2887: select distinct replacement_group_num
2888: into repl_group

Line 2909: elsif (sched_row.substitution_type = wip_job_details.wip_change) then

2905: set replacement_group_num = null
2906: where current of sched_rows;
2907: end if;
2908:
2909: elsif (sched_row.substitution_type = wip_job_details.wip_change) then
2910:
2911: begin
2912: select schedule_seq_num,
2913: substitute_group_num,

Line 3018: and wjdi.load_type = wip_job_details.wip_sub_res

3014: and wjdi.process_status in (wip_constants.running,
3015: wip_constants.warning)
3016: and wjdi.wip_entity_id = p_wip_entity_id
3017: and wjdi.organization_id = p_organization_id
3018: and wjdi.load_type = wip_job_details.wip_sub_res
3019: and wjdi.substitution_type = p_substitution_type
3020: and wjdi.operation_seq_num = p_operation_seq_num
3021: and wjdi.resource_seq_num = p_resource_seq_num
3022: and ( (wjdi.schedule_seq_num = p_schedule_seq_num)

Line 3041: p_substitution_type = WIP_JOB_DETAILS.WIP_ADD)) then

3037: for sched_row in sched_rows loop
3038: if ((sched_row.substitute_group_num <= 0) OR
3039: (sched_row.schedule_seq_num <= 0) OR
3040: (sched_row.replacement_group_num <= 0 AND
3041: p_substitution_type = WIP_JOB_DETAILS.WIP_ADD)) then
3042: /*Bug 5227753 - Added AND condition above for p_substitution_type in replacement group check*/
3043: fnd_message.set_name('WIP', 'WIP_JDI_INVALID_SCHED_SUB');
3044: fnd_message.set_token('INTERFACE', to_char(sched_row.interface_id));
3045: if(wip_job_details.std_alone = 1) then

Line 3045: if(wip_job_details.std_alone = 1) then

3041: p_substitution_type = WIP_JOB_DETAILS.WIP_ADD)) then
3042: /*Bug 5227753 - Added AND condition above for p_substitution_type in replacement group check*/
3043: fnd_message.set_name('WIP', 'WIP_JDI_INVALID_SCHED_SUB');
3044: fnd_message.set_token('INTERFACE', to_char(sched_row.interface_id));
3045: if(wip_job_details.std_alone = 1) then
3046: wip_interface_err_Utils.add_error(p_interface_id => sched_row.interface_id,
3047: p_text => substr(fnd_message.get,1,500),
3048: p_error_type => wip_jdi_utils.msg_error);
3049: else

Line 3062: if (sched_row.substitution_type = wip_job_details.wip_add) then

3058:
3059: return;
3060: end if;
3061:
3062: if (sched_row.substitution_type = wip_job_details.wip_add) then
3063: if (sched_row.substitute_group_num is null) then
3064: fnd_message.set_name('WIP', 'WIP_JDI_ALT_SUB_MISSING');
3065: fnd_message.set_token('INTERFACE', to_char(sched_row.interface_id));
3066: if(wip_job_details.std_alone = 1) then

Line 3066: if(wip_job_details.std_alone = 1) then

3062: if (sched_row.substitution_type = wip_job_details.wip_add) then
3063: if (sched_row.substitute_group_num is null) then
3064: fnd_message.set_name('WIP', 'WIP_JDI_ALT_SUB_MISSING');
3065: fnd_message.set_token('INTERFACE', to_char(sched_row.interface_id));
3066: if(wip_job_details.std_alone = 1) then
3067: wip_interface_err_Utils.add_error(p_interface_id => sched_row.interface_id,
3068: p_text => substr(fnd_message.get,1,500),
3069: p_error_type => wip_jdi_utils.msg_error);
3070: else

Line 3082: elsif (sched_row.substitution_type = wip_job_details.wip_change) then

3078: where current of sched_rows;
3079:
3080: return;
3081: end if;
3082: elsif (sched_row.substitution_type = wip_job_details.wip_change) then
3083: select schedule_seq_num,
3084: substitute_group_num,
3085: replacement_group_num
3086: into sched_seq,

Line 3112: if(wip_job_details.std_alone = 1) then

3108: if ((sched_row.substitute_group_num <> sub_group) AND
3109: (sched_row.replacement_group_num is null)) then
3110: fnd_message.set_name('WIP', 'WIP_JDI_ALT_SUB_MISSING');
3111: fnd_message.set_token('INTERFACE', to_char(sched_row.interface_id));
3112: if(wip_job_details.std_alone = 1) then
3113: wip_interface_err_Utils.add_error(p_interface_id => sched_row.interface_id,
3114: p_text => substr(fnd_message.get,1,500),
3115: p_error_type => wip_jdi_utils.msg_error);
3116: else

Line 3145: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)

3141: and wjdi.process_status in (wip_constants.running,
3142: wip_constants.warning)
3143: and wjdi.wip_entity_id = p_wip_entity_id
3144: and wjdi.organization_id = p_organization_id
3145: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)
3146: and wjdi.operation_seq_num = p_operation_seq_num;
3147:
3148: l_op_seq NUMBER;
3149: l_status VARCHAR2(1);

Line 3156: if(wip_job_details.std_alone = 1) then

3152: wip_op_resources_utilities.validate_sub_groups(p_wip_entity_id, null, l_status, l_error_msg, l_op_seq);
3153:
3154: if (l_status = fnd_api.g_ret_sts_error) then
3155: for l_inv_row in c_invalid_rows(l_op_seq) loop
3156: if(wip_job_details.std_alone = 1) then
3157: wip_interface_err_Utils.add_error(p_interface_id => l_inv_row.interface_id,
3158: p_text => substr(l_error_msg,1,500),
3159: p_error_type => wip_jdi_utils.msg_error);
3160: else

Line 3175: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)

3171: and wjdi.process_status in (wip_constants.running,
3172: wip_constants.warning)
3173: and wjdi.wip_entity_id = p_wip_entity_id
3174: and wjdi.organization_id = p_organization_id
3175: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)
3176: and wjdi.operation_seq_num = l_op_seq;
3177:
3178: return;
3179: end if;