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: and wjdi.replacement_group_num is not null
846: )

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: and wjdi.replacement_group_num is not null
846: )
847: and ( not exists(select 1

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

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

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

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

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

889: and wjdi.substitution_type = p_substitution_type
890: and wjdi.operation_seq_num = p_operation_seq_num
891: and wjdi.resource_seq_num = p_resource_seq_num
892: and wjdi.resource_id_new = p_resource_id_new
893: and not ( wjdi.load_type = wip_job_details.wip_resource
894: and wjdi.substitution_type = wip_job_details.wip_change
895: and wjdi.substitute_group_num is not null
896: and wjdi.replacement_group_num is not null
897: )

Line 894: and wjdi.substitution_type = wip_job_details.wip_change

890: and wjdi.operation_seq_num = p_operation_seq_num
891: and wjdi.resource_seq_num = p_resource_seq_num
892: and wjdi.resource_id_new = p_resource_id_new
893: and not ( wjdi.load_type = wip_job_details.wip_resource
894: and wjdi.substitution_type = wip_job_details.wip_change
895: and wjdi.substitute_group_num is not null
896: and wjdi.replacement_group_num is not null
897: )
898: and ( not exists(select 1

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

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

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

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

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

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

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

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

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

1028: and wjdi.operation_seq_num = p_operation_seq_num
1029: and wjdi.resource_seq_num = p_resource_seq_num
1030: and wjdi.resource_id_new = p_resource_id_new
1031: -- jy: no need to do this validation if doing res substitution
1032: and not ( wjdi.load_type = wip_job_details.wip_resource
1033: and wjdi.substitution_type = wip_job_details.wip_change
1034: and wjdi.substitute_group_num is not null
1035: and wjdi.replacement_group_num is not null
1036: );

Line 1033: and wjdi.substitution_type = wip_job_details.wip_change

1029: and wjdi.resource_seq_num = p_resource_seq_num
1030: and wjdi.resource_id_new = p_resource_id_new
1031: -- jy: no need to do this validation if doing res substitution
1032: and not ( wjdi.load_type = wip_job_details.wip_resource
1033: and wjdi.substitution_type = wip_job_details.wip_change
1034: and wjdi.substitute_group_num is not null
1035: and wjdi.replacement_group_num is not null
1036: );
1037:

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

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

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

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

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

1092: and wjdi.substitution_type = p_substitution_type
1093: and wjdi.operation_seq_num = p_operation_seq_num
1094: and wjdi.resource_seq_num = p_resource_seq_num
1095: and wjdi.resource_id_new = p_resource_id_new
1096: and not ( wjdi.load_type = wip_job_details.wip_resource
1097: and wjdi.substitution_type = wip_job_details.wip_change
1098: and wjdi.substitute_group_num is not null
1099: and wjdi.replacement_group_num is not null
1100: );

Line 1097: and wjdi.substitution_type = wip_job_details.wip_change

1093: and wjdi.operation_seq_num = p_operation_seq_num
1094: and wjdi.resource_seq_num = p_resource_seq_num
1095: and wjdi.resource_id_new = p_resource_id_new
1096: and not ( wjdi.load_type = wip_job_details.wip_resource
1097: and wjdi.substitution_type = wip_job_details.wip_change
1098: and wjdi.substitute_group_num is not null
1099: and wjdi.replacement_group_num is not null
1100: );
1101:

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

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

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

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

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

1134: and wjdi.operation_seq_num = p_operation_seq_num
1135: and wjdi.resource_seq_num = p_resource_seq_num
1136: and wjdi.resource_id_new = p_resource_id_new
1137: and wjdi.usage_rate_or_amount = p_usage_rate_or_amount
1138: and not ( wjdi.load_type = wip_job_details.wip_resource
1139: and wjdi.substitution_type = wip_job_details.wip_change
1140: and wjdi.substitute_group_num is not null
1141: and wjdi.replacement_group_num is not null
1142: );

Line 1139: and wjdi.substitution_type = wip_job_details.wip_change

1135: and wjdi.resource_seq_num = p_resource_seq_num
1136: and wjdi.resource_id_new = p_resource_id_new
1137: and wjdi.usage_rate_or_amount = p_usage_rate_or_amount
1138: and not ( wjdi.load_type = wip_job_details.wip_resource
1139: and wjdi.substitution_type = wip_job_details.wip_change
1140: and wjdi.substitute_group_num is not null
1141: and wjdi.replacement_group_num is not null
1142: );
1143: end if;

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

1164: wip_constants.running,
1165: wip_constants.warning)
1166: and wjdi.wip_entity_id = p_wip_entity_id
1167: and wjdi.organization_id = p_organization_id
1168: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)
1169: and wjdi.substitution_type = p_substitution_type
1170: and wjdi.operation_seq_num = p_operation_seq_num
1171: and wjdi.resource_seq_num = p_resource_seq_num
1172: and (wjdi.assigned_units <= 0

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

1170: and wjdi.operation_seq_num = p_operation_seq_num
1171: and wjdi.resource_seq_num = p_resource_seq_num
1172: and (wjdi.assigned_units <= 0
1173: or (wjdi.assigned_units is null
1174: and wjdi.substitution_type = wip_job_details.wip_add)
1175: or (wjdi.assigned_units is not null and wjdi.assigned_units <> 1
1176: and (wjdi.setup_id is not null or exists
1177: (select 1
1178: from bom_resources br

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

1189: -- nvl(wjdi.maximum_assigned_units, l_maximum_assigned_units))
1190: );
1191:
1192: begin
1193: if (p_substitution_type = wip_job_details.wip_change) then
1194: if (p_load_type = WIP_JOB_DETAILS.WIP_RESOURCE) then
1195: select maximum_assigned_units
1196: into l_maximum_assigned_units
1197: from wip_operation_resources

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

1190: );
1191:
1192: begin
1193: if (p_substitution_type = wip_job_details.wip_change) then
1194: if (p_load_type = WIP_JOB_DETAILS.WIP_RESOURCE) then
1195: select maximum_assigned_units
1196: into l_maximum_assigned_units
1197: from wip_operation_resources
1198: where wip_entity_id = p_wip_entity_id

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

1198: where wip_entity_id = p_wip_entity_id
1199: and organization_id = p_organization_id
1200: and operation_seq_num = p_operation_seq_num
1201: and resource_seq_num = p_resource_seq_num;
1202: elsif (p_load_type = WIP_JOB_DETAILS.WIP_SUB_RES) then
1203: select maximum_assigned_units
1204: into l_maximum_assigned_units
1205: from wip_sub_operation_resources
1206: where wip_entity_id = p_wip_entity_id

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

1213: for l_inv_row in c_invalid_rows loop
1214: l_error_exists := true;
1215: fnd_message.set_name('WIP', 'WIP_INV_ASSIGNED_UNITS');
1216: fnd_message.set_token('INTERFACE', to_char(l_inv_row.interface_id));
1217: if(wip_job_details.std_alone = 1) then
1218: wip_interface_err_Utils.add_error(p_interface_id => l_inv_row.interface_id,
1219: p_text => substr(fnd_message.get,1,500),
1220: p_error_type => wip_jdi_utils.msg_error);
1221: else

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

1233: and wjdi.process_status in (wip_constants.running,
1234: wip_constants.warning)
1235: and wjdi.wip_entity_id = p_wip_entity_id
1236: and wjdi.organization_id = p_organization_id
1237: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)
1238: and wjdi.substitution_type = p_substitution_type
1239: and (wjdi.assigned_units <= 0
1240: or (wjdi.assigned_units is null
1241: and wjdi.substitution_type = wip_job_details.wip_add)

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

1237: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)
1238: and wjdi.substitution_type = p_substitution_type
1239: and (wjdi.assigned_units <= 0
1240: or (wjdi.assigned_units is null
1241: and wjdi.substitution_type = wip_job_details.wip_add)
1242: or (wjdi.assigned_units is not null and wjdi.assigned_units <> 1
1243: and (wjdi.setup_id is not null or exists
1244: (select 1
1245: from bom_resources br

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

1274: x_res_seq_num number := null;
1275: x_schedule_seq_num number;
1276: begin
1277:
1278: if (p_substitution_type = wip_job_details.WIP_ADD) then
1279: -- default res_seq_num to be max existing res_seq_num + 10
1280: if (p_resource_seq_num is null) then
1281: begin
1282: select nvl(max(resource_seq_num), 0)

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

1355: SET schedule_seq_num = x_schedule_seq_num
1356: WHERE rowid = p_rowid;
1357:
1358: end if;
1359: elsif (p_substitution_type = wip_job_details.WIP_CHANGE) then
1360: begin
1361: select setup_id
1362: into x_setup_id
1363: from wip_operation_resources

Line 1420: AND load_type = WIP_JOB_DETAILS.WIP_RESOURCE

1416: AND process_phase = WIP_CONSTANTS.ML_VALIDATION
1417: AND process_status in (WIP_CONSTANTS.RUNNING,WIP_CONSTANTS.WARNING)
1418: AND wip_entity_id = p_wip_entity_id
1419: AND organization_id = p_organization_id
1420: AND load_type = WIP_JOB_DETAILS.WIP_RESOURCE
1421: AND substitution_type = p_substitution_type;
1422:
1423: BEGIN
1424:

Line 1517: WIP_JOB_DETAILS.WIP_RESOURCE,

1513:
1514: Assigned_Units(p_group_id,
1515: p_wip_entity_id,
1516: p_organization_id,
1517: WIP_JOB_DETAILS.WIP_RESOURCE,
1518: p_substitution_type,
1519: cur_row.operation_seq_num,
1520: cur_row.resource_seq_num);
1521:

Line 1587: and wjdi.load_type = wip_job_details.wip_resource

1583: and wjdi.process_status in (wip_constants.running,
1584: wip_constants.warning)
1585: and wjdi.wip_entity_id = p_wip_entity_id
1586: and wjdi.organization_id = p_organization_id
1587: and wjdi.load_type = wip_job_details.wip_resource
1588: and wjdi.substitution_type = p_substitution_type
1589: and wjdi.operation_seq_num = p_operation_seq_num
1590: and wjdi.resource_seq_num = p_resource_seq_num
1591: and (wjdi.assigned_units < 0 or

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

1608: for l_inv_row in c_invalid_rows loop
1609: l_error_exists := true;
1610: fnd_message.set_name('WIP', 'WIP_ASSIGNED_UNITS_ERROR');
1611: fnd_message.set_token('INTERFACE', to_char(l_inv_row.interface_id));
1612: if(wip_job_details.std_alone = 1) then
1613: wip_interface_err_Utils.add_error(p_interface_id => l_inv_row.interface_id,
1614: p_text => substr(fnd_message.get,1,500),
1615: p_error_type => wip_jdi_utils.msg_error);
1616: else

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

1627: and wjdi.process_status in (wip_constants.running,
1628: wip_constants.warning)
1629: and wjdi.wip_entity_id = p_wip_entity_id
1630: and wjdi.organization_id = p_organization_id
1631: and wjdi.load_type in (wip_job_details.wip_resource)
1632: and wjdi.substitution_type = p_substitution_type
1633: and wjdi.operation_seq_num = p_operation_seq_num
1634: and wjdi.resource_seq_num = p_resource_seq_num
1635: and (wjdi.assigned_units < 0 or

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

1650: and wjdi.process_status in (wip_constants.running,
1651: wip_constants.warning)
1652: and wjdi.wip_entity_id = p_wip_entity_id
1653: and wjdi.organization_id = p_organization_id
1654: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)
1655: and wjdi.substitution_type = p_substitution_type
1656: and wjdi.operation_seq_num = p_operation_seq_num
1657: and ( wjdi.resource_seq_num is null
1658: or wjdi.resource_id_old is null

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

1669: for l_inv_row in c_invalid_rows loop
1670: l_error_exists := true;
1671: fnd_message.set_name('WIP', 'WIP_JDI_CHNG_RES_INFO_MISSING');
1672: fnd_message.set_token('INTERFACE', to_char(l_inv_row.interface_id));
1673: if(wip_job_details.std_alone = 1) then
1674: wip_interface_err_Utils.add_error(p_interface_id => l_inv_row.interface_id,
1675: p_text => substr(fnd_message.get,1,500),
1676: p_error_type => wip_jdi_utils.msg_error);
1677: else

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

1689: and wjdi.process_status in (wip_constants.running,
1690: wip_constants.warning)
1691: and wjdi.wip_entity_id = p_wip_entity_id
1692: and wjdi.organization_id = p_organization_id
1693: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)
1694: and wjdi.substitution_type = p_substitution_type
1695: and wjdi.operation_seq_num = p_operation_seq_num
1696: and ( wjdi.resource_seq_num is null
1697: or wjdi.resource_id_old is null

Line 1756: AND load_type = WIP_JOB_DETAILS.WIP_RESOURCE

1752: AND process_phase = WIP_CONSTANTS.ML_VALIDATION
1753: AND process_status in (WIP_CONSTANTS.RUNNING,WIP_CONSTANTS.WARNING)
1754: AND wip_entity_id = p_wip_entity_id
1755: AND organization_id = p_organization_id
1756: AND load_type = WIP_JOB_DETAILS.WIP_RESOURCE
1757: AND substitution_type = p_substitution_type;
1758:
1759: BEGIN
1760: FOR cur_row IN res_info(p_group_id,

Line 1882: WIP_JOB_DETAILS.WIP_RESOURCE,

1878:
1879: Assigned_Units(p_group_id,
1880: p_wip_entity_id,
1881: p_organization_id,
1882: WIP_JOB_DETAILS.WIP_RESOURCE,
1883: p_substitution_type,
1884: cur_row.operation_seq_num,
1885: cur_row.resource_seq_num);
1886:

Line 1963: AND load_type = WIP_JOB_DETAILS.WIP_RESOURCE

1959: WHERE group_id = p_group_id
1960: AND process_status = WIP_CONSTANTS.ERROR
1961: AND wip_entity_id = p_wip_entity_id
1962: AND organization_id = p_organization_id
1963: AND load_type = WIP_JOB_DETAILS.WIP_RESOURCE
1964: AND substitution_type= p_substitution_type
1965: AND operation_seq_num= p_operation_seq_num
1966: AND resource_seq_num = p_resource_seq_num;
1967:

Line 1987: IF p_substitution_type = WIP_JOB_DETAILS.WIP_DELETE THEN

1983: x_count number := 0;
1984:
1985: BEGIN
1986:
1987: IF p_substitution_type = WIP_JOB_DETAILS.WIP_DELETE THEN
1988: SELECT count(*)
1989: INTO x_count
1990: FROM WIP_JOB_DTLS_INTERFACE
1991: WHERE group_id = p_group_id

Line 1995: AND load_type = WIP_JOB_DETAILS.WIP_RESOURCE

1991: WHERE group_id = p_group_id
1992: AND process_status = WIP_CONSTANTS.ERROR
1993: AND wip_entity_id = p_wip_entity_id
1994: AND organization_id = p_organization_id
1995: AND load_type = WIP_JOB_DETAILS.WIP_RESOURCE
1996: AND substitution_type= p_substitution_type
1997: AND operation_seq_num= p_operation_seq_num
1998: AND (resource_seq_num IS NULL
1999: OR resource_id_old IS NULL);

Line 2001: ELSIF p_substitution_type = WIP_JOB_DETAILS.WIP_ADD THEN

1997: AND operation_seq_num= p_operation_seq_num
1998: AND (resource_seq_num IS NULL
1999: OR resource_id_old IS NULL);
2000:
2001: ELSIF p_substitution_type = WIP_JOB_DETAILS.WIP_ADD THEN
2002: SELECT count(*)
2003: INTO x_count
2004: FROM WIP_JOB_DTLS_INTERFACE
2005: WHERE group_id = p_group_id

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_id_new IS NULL
2013: OR usage_rate_or_amount IS NULL);

Line 2015: ELSIF p_substitution_type = WIP_JOB_DETAILS.WIP_CHANGE THEN

2011: AND operation_seq_num= p_operation_seq_num
2012: AND (resource_id_new IS NULL
2013: OR usage_rate_or_amount IS NULL);
2014:
2015: ELSIF p_substitution_type = WIP_JOB_DETAILS.WIP_CHANGE THEN
2016: SELECT count(*)
2017: INTO x_count
2018: FROM WIP_JOB_DTLS_INTERFACE
2019: WHERE group_id = p_group_id

Line 2023: AND load_type = WIP_JOB_DETAILS.WIP_RESOURCE

2019: WHERE group_id = p_group_id
2020: AND process_status = WIP_CONSTANTS.ERROR
2021: AND wip_entity_id = p_wip_entity_id
2022: AND organization_id = p_organization_id
2023: AND load_type = WIP_JOB_DETAILS.WIP_RESOURCE
2024: AND substitution_type= p_substitution_type
2025: AND operation_seq_num= p_operation_seq_num
2026: AND (resource_seq_num IS NULL
2027: OR resource_id_old IS NULL

Line 2070: AND load_type = WIP_JOB_DETAILS.WIP_SUB_RES

2066: AND process_phase = WIP_CONSTANTS.ML_VALIDATION
2067: AND process_status in (WIP_CONSTANTS.RUNNING,WIP_CONSTANTS.WARNING)
2068: AND wip_entity_id = p_wip_entity_id
2069: AND organization_id = p_organization_id
2070: AND load_type = WIP_JOB_DETAILS.WIP_SUB_RES
2071: AND substitution_type = p_substitution_type;
2072:
2073: BEGIN
2074: FOR cur_row IN res_info(p_group_id,

Line 2121: and wjdi.load_type = wip_job_details.wip_resource

2117: and wjdi.process_status in (wip_constants.running,
2118: wip_constants.warning)
2119: and wjdi.wip_entity_id = p_wip_entity_id
2120: and wjdi.organization_id = p_organization_id
2121: and wjdi.load_type = wip_job_details.wip_resource
2122: and wjdi.substitution_type = p_substitution_type
2123: and wjdi.operation_seq_num = p_operation_seq_num
2124: and wjdi.resource_seq_num = p_resource_seq_num
2125: and wjdi.resource_id_old = p_resource_id_old

Line 2179: and wjdi.load_type = wip_job_details.wip_resource

2175: and wjdi.process_status in (wip_constants.running,
2176: wip_constants.warning)
2177: and wjdi.wip_entity_id = p_wip_entity_id
2178: and wjdi.organization_id = p_organization_id
2179: and wjdi.load_type = wip_job_details.wip_resource
2180: and wjdi.substitution_type = p_substitution_type
2181: and wjdi.operation_seq_num = p_operation_seq_num
2182: and wjdi.resource_seq_num = p_resource_seq_num
2183: and wjdi.resource_id_old = p_resource_id_old

Line 2218: and load_type = wip_job_details.wip_resource

2214: and process_status in (wip_constants.running,
2215: wip_constants.warning)
2216: and wip_entity_id = p_wip_entity_id
2217: and organization_id = p_organization_id
2218: and load_type = wip_job_details.wip_resource
2219: and substitution_type = p_substitution_type
2220: and operation_seq_num = p_operation_seq_num
2221: and resource_seq_num = p_resource_seq_num
2222: and resource_id_old = p_resource_id_old

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

2232: for l_inv_row in c_invalid_rows loop
2233: l_error_exists := true;
2234: fnd_message.set_name('WIP','WIP_JDI_RES_SUB_INFO_MISSING' );
2235: fnd_message.set_token('INTERFACE', to_char(l_inv_row.interface_id));
2236: if(wip_job_details.std_alone = 1) then
2237: wip_interface_err_Utils.add_error(p_interface_id => l_inv_row.interface_id,
2238: p_text => substr(fnd_message.get,1,500),
2239: p_error_type => wip_jdi_utils.msg_error);
2240: else

Line 2256: and wjdi.load_type = wip_job_details.wip_resource

2252: and wjdi.process_status in (wip_constants.running,
2253: wip_constants.warning)
2254: and wjdi.wip_entity_id = p_wip_entity_id
2255: and wjdi.organization_id = p_organization_id
2256: and wjdi.load_type = wip_job_details.wip_resource
2257: and wjdi.substitution_type = p_substitution_type
2258: and wjdi.operation_seq_num = p_operation_seq_num
2259: and wjdi.resource_seq_num = p_resource_seq_num
2260: and wjdi.resource_id_old = p_resource_id_old

Line 2332: and wjdi.load_type = wip_job_details.wip_sub_res

2328: and wjdi.process_status in (wip_constants.running,
2329: wip_constants.warning)
2330: and wjdi.wip_entity_id = p_wip_entity_id
2331: and wjdi.organization_id = p_organization_id
2332: and wjdi.load_type = wip_job_details.wip_sub_res
2333: and wjdi.substitution_type = p_substitution_type
2334: and wjdi.operation_seq_num = p_operation_seq_num
2335: and wjdi.resource_seq_num = p_resource_seq_num
2336: and ( wjdi.schedule_seq_num < 0

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

2359: for l_inv_row in c_invalid_rows loop
2360: l_error_exists := true;
2361: fnd_message.set_name('WIP', 'WIP_JDI_RES_SUB_INFO_MISSING');
2362: fnd_message.set_token('INTERFACE', to_char(l_inv_row.interface_id));
2363: if(wip_job_details.std_alone = 1) then
2364: wip_interface_err_Utils.add_error(p_interface_id => l_inv_row.interface_id,
2365: p_text => substr(fnd_message.get,1,500),
2366: p_error_type => wip_jdi_utils.msg_error);
2367: else

Line 2383: and wjdi.load_type = wip_job_details.wip_sub_res

2379: and wjdi.process_status in (wip_constants.running,
2380: wip_constants.warning)
2381: and wjdi.wip_entity_id = p_wip_entity_id
2382: and wjdi.organization_id = p_organization_id
2383: and wjdi.load_type = wip_job_details.wip_sub_res
2384: and wjdi.substitution_type = p_substitution_type
2385: and wjdi.operation_seq_num = p_operation_seq_num
2386: and wjdi.resource_seq_num = p_resource_seq_num
2387: and ( wjdi.schedule_seq_num is null

Line 2444: AND load_type = WIP_JOB_DETAILS.WIP_SUB_RES

2440: AND process_phase = WIP_CONSTANTS.ML_VALIDATION
2441: AND process_status in (WIP_CONSTANTS.RUNNING,WIP_CONSTANTS.WARNING)
2442: AND wip_entity_id = p_wip_entity_id
2443: AND organization_id = p_organization_id
2444: AND load_type = WIP_JOB_DETAILS.WIP_SUB_RES
2445: AND substitution_type = p_substitution_type;
2446:
2447:
2448: BEGIN

Line 2526: WIP_JOB_DETAILS.WIP_SUB_RES,

2522:
2523: Assigned_Units(p_group_id,
2524: p_wip_entity_id,
2525: p_organization_id,
2526: WIP_JOB_DETAILS.WIP_SUB_RES,
2527: p_substitution_type,
2528: cur_row.operation_seq_num,
2529: cur_row.resource_seq_num);
2530:

Line 2621: AND load_type = WIP_JOB_DETAILS.WIP_SUB_RES

2617: AND process_phase = WIP_CONSTANTS.ML_VALIDATION
2618: AND process_status in (WIP_CONSTANTS.RUNNING,WIP_CONSTANTS.WARNING)
2619: AND wip_entity_id = p_wip_entity_id
2620: AND organization_id = p_organization_id
2621: AND load_type = WIP_JOB_DETAILS.WIP_SUB_RES
2622: AND substitution_type = p_substitution_type;
2623:
2624:
2625: BEGIN

Line 2719: WIP_JOB_DETAILS.WIP_SUB_RES,

2715:
2716: Assigned_Units(p_group_id,
2717: p_wip_entity_id,
2718: p_organization_id,
2719: WIP_JOB_DETAILS.WIP_SUB_RES,
2720: p_substitution_type,
2721: cur_row.operation_seq_num,
2722: cur_row.resource_seq_num);
2723:

Line 2788: and wjdi.load_type = wip_job_details.wip_resource

2784: and wjdi.process_status in (wip_constants.running,
2785: wip_constants.warning)
2786: and wjdi.wip_entity_id = p_wip_entity_id
2787: and wjdi.organization_id = p_organization_id
2788: and wjdi.load_type = wip_job_details.wip_resource
2789: and wjdi.substitution_type = p_substitution_type
2790: and wjdi.operation_seq_num = p_operation_seq_num
2791: and wjdi.resource_seq_num = p_resource_seq_num
2792: and ( (wjdi.schedule_seq_num = p_schedule_seq_num)

Line 2811: p_substitution_type = WIP_JOB_DETAILS.WIP_ADD)) then

2807: for sched_row in sched_rows loop
2808: if ((sched_row.substitute_group_num <= 0) OR
2809: (sched_row.schedule_seq_num <= 0) OR
2810: (sched_row.replacement_group_num <= 0 AND
2811: p_substitution_type = WIP_JOB_DETAILS.WIP_ADD)) then
2812: /*Bug 5227753 - Added AND condition above for p_substitution_type in replacement group check*/
2813: fnd_message.set_name('WIP', 'WIP_JDI_INVALID_SCHED_SUB');
2814: fnd_message.set_token('INTERFACE', to_char(sched_row.interface_id));
2815: if(wip_job_details.std_alone = 1) then

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

2811: p_substitution_type = WIP_JOB_DETAILS.WIP_ADD)) then
2812: /*Bug 5227753 - Added AND condition above for p_substitution_type in replacement group check*/
2813: fnd_message.set_name('WIP', 'WIP_JDI_INVALID_SCHED_SUB');
2814: fnd_message.set_token('INTERFACE', to_char(sched_row.interface_id));
2815: if(wip_job_details.std_alone = 1) then
2816: wip_interface_err_Utils.add_error(p_interface_id => sched_row.interface_id,
2817: p_text => substr(fnd_message.get,1,500),
2818: p_error_type => wip_jdi_utils.msg_error);
2819: else

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

2828:
2829: return;
2830: end if;
2831:
2832: if (sched_row.substitution_type = wip_job_details.wip_add) then
2833: if (sched_row.substitute_group_num is not null) then
2834: begin
2835: select distinct replacement_group_num
2836: into repl_group

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

2851: update wip_job_dtls_interface
2852: set replacement_group_num = null
2853: where current of sched_rows;
2854: end if;
2855: elsif (sched_row.substitution_type = wip_job_details.wip_change) then
2856: select schedule_seq_num,
2857: substitute_group_num,
2858: replacement_group_num
2859: into sched_seq,

Line 2945: and wjdi.load_type = wip_job_details.wip_sub_res

2941: and wjdi.process_status in (wip_constants.running,
2942: wip_constants.warning)
2943: and wjdi.wip_entity_id = p_wip_entity_id
2944: and wjdi.organization_id = p_organization_id
2945: and wjdi.load_type = wip_job_details.wip_sub_res
2946: and wjdi.substitution_type = p_substitution_type
2947: and wjdi.operation_seq_num = p_operation_seq_num
2948: and wjdi.resource_seq_num = p_resource_seq_num
2949: and ( (wjdi.schedule_seq_num = p_schedule_seq_num)

Line 2968: p_substitution_type = WIP_JOB_DETAILS.WIP_ADD)) then

2964: for sched_row in sched_rows loop
2965: if ((sched_row.substitute_group_num <= 0) OR
2966: (sched_row.schedule_seq_num <= 0) OR
2967: (sched_row.replacement_group_num <= 0 AND
2968: p_substitution_type = WIP_JOB_DETAILS.WIP_ADD)) then
2969: /*Bug 5227753 - Added AND condition above for p_substitution_type in replacement group check*/
2970: fnd_message.set_name('WIP', 'WIP_JDI_INVALID_SCHED_SUB');
2971: fnd_message.set_token('INTERFACE', to_char(sched_row.interface_id));
2972: if(wip_job_details.std_alone = 1) then

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

2968: p_substitution_type = WIP_JOB_DETAILS.WIP_ADD)) then
2969: /*Bug 5227753 - Added AND condition above for p_substitution_type in replacement group check*/
2970: fnd_message.set_name('WIP', 'WIP_JDI_INVALID_SCHED_SUB');
2971: fnd_message.set_token('INTERFACE', to_char(sched_row.interface_id));
2972: if(wip_job_details.std_alone = 1) then
2973: wip_interface_err_Utils.add_error(p_interface_id => sched_row.interface_id,
2974: p_text => substr(fnd_message.get,1,500),
2975: p_error_type => wip_jdi_utils.msg_error);
2976: else

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

2985:
2986: return;
2987: end if;
2988:
2989: if (sched_row.substitution_type = wip_job_details.wip_add) then
2990: if (sched_row.substitute_group_num is null) then
2991: fnd_message.set_name('WIP', 'WIP_JDI_ALT_SUB_MISSING');
2992: fnd_message.set_token('INTERFACE', to_char(sched_row.interface_id));
2993: if(wip_job_details.std_alone = 1) then

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

2989: if (sched_row.substitution_type = wip_job_details.wip_add) then
2990: if (sched_row.substitute_group_num is null) then
2991: fnd_message.set_name('WIP', 'WIP_JDI_ALT_SUB_MISSING');
2992: fnd_message.set_token('INTERFACE', to_char(sched_row.interface_id));
2993: if(wip_job_details.std_alone = 1) then
2994: wip_interface_err_Utils.add_error(p_interface_id => sched_row.interface_id,
2995: p_text => substr(fnd_message.get,1,500),
2996: p_error_type => wip_jdi_utils.msg_error);
2997: else

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

3005: where current of sched_rows;
3006:
3007: return;
3008: end if;
3009: elsif (sched_row.substitution_type = wip_job_details.wip_change) then
3010: select schedule_seq_num,
3011: substitute_group_num,
3012: replacement_group_num
3013: into sched_seq,

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

3035: if ((sched_row.substitute_group_num <> sub_group) AND
3036: (sched_row.replacement_group_num is null)) then
3037: fnd_message.set_name('WIP', 'WIP_JDI_ALT_SUB_MISSING');
3038: fnd_message.set_token('INTERFACE', to_char(sched_row.interface_id));
3039: if(wip_job_details.std_alone = 1) then
3040: wip_interface_err_Utils.add_error(p_interface_id => sched_row.interface_id,
3041: p_text => substr(fnd_message.get,1,500),
3042: p_error_type => wip_jdi_utils.msg_error);
3043: else

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

3068: and wjdi.process_status in (wip_constants.running,
3069: wip_constants.warning)
3070: and wjdi.wip_entity_id = p_wip_entity_id
3071: and wjdi.organization_id = p_organization_id
3072: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)
3073: and wjdi.operation_seq_num = p_operation_seq_num;
3074:
3075: l_op_seq NUMBER;
3076: l_status VARCHAR2(1);

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

3079: wip_op_resources_utilities.validate_sub_groups(p_wip_entity_id, null, l_status, l_error_msg, l_op_seq);
3080:
3081: if (l_status = fnd_api.g_ret_sts_error) then
3082: for l_inv_row in c_invalid_rows(l_op_seq) loop
3083: if(wip_job_details.std_alone = 1) then
3084: wip_interface_err_Utils.add_error(p_interface_id => l_inv_row.interface_id,
3085: p_text => substr(l_error_msg,1,500),
3086: p_error_type => wip_jdi_utils.msg_error);
3087: else

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

3098: and wjdi.process_status in (wip_constants.running,
3099: wip_constants.warning)
3100: and wjdi.wip_entity_id = p_wip_entity_id
3101: and wjdi.organization_id = p_organization_id
3102: and wjdi.load_type in (wip_job_details.wip_resource, wip_job_details.wip_sub_res)
3103: and wjdi.operation_seq_num = l_op_seq;
3104:
3105: return;
3106: end if;