DBA Data[Home] [Help]

APPS.WIP_VALIDATEMLHEADER_PVT dependencies on WIP_CONSTANTS

Line 133: if (l_logLevel <= wip_constants.trace_logging) then

129: l_retStatus varchar2(1);
130:
131: begin
132: x_returnStatus := fnd_api.g_ret_sts_success;
133: if (l_logLevel <= wip_constants.trace_logging) then
134: l_params(1).paramName := 'p_groupID';
135: l_params(1).paramValue := p_groupID;
136: l_params(2).paramName := 'p_validationLevel';
137: l_params(2).paramValue := p_validationLevel;

Line 164: if (l_logLevel <= wip_constants.trace_logging) then

160: if ( x_returnStatus <> fnd_api.g_ret_sts_success ) then
161: raise fnd_api.g_exc_unexpected_error;
162: end if;
163:
164: if (l_logLevel <= wip_constants.trace_logging) then
165: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
166: p_procReturnStatus => x_returnStatus,
167: p_msg => 'success',
168: x_returnStatus => l_retStatus);

Line 173: if(l_logLevel <= wip_constants.trace_logging) then

169: end if;
170:
171: exception
172: when fnd_api.g_exc_unexpected_error then
173: if(l_logLevel <= wip_constants.trace_logging) then
174: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
175: p_procReturnStatus => x_returnStatus,
176: p_msg => 'unexp error:' || x_errorMsg,
177: x_returnStatus => l_retStatus);

Line 211: if (l_logLevel <= wip_constants.trace_logging) then

207: x_request_id := fnd_global.conc_request_id ;
208: x_program_id := fnd_global.conc_program_id ;
209: x_application_id := fnd_global.prog_appl_id ;
210:
211: if (l_logLevel <= wip_constants.trace_logging) then
212: l_params(1).paramName := 'p_groupID';
213: l_params(1).paramValue := p_groupID;
214: l_params(2).paramName := 'p_validationLevel';
215: l_params(2).paramValue := p_validationLevel;

Line 224: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

220: raise fnd_api.g_exc_unexpected_error;
221: end if;
222: end if;
223:
224: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
225:
226: --
227: -- validate load type
228: --

Line 230: set wjsi.process_status = WIP_CONSTANTS.ERROR,

226: --
227: -- validate load type
228: --
229: update wip_job_schedule_interface wjsi
230: set wjsi.process_status = WIP_CONSTANTS.ERROR,
231: wjsi.last_update_date = sysdate
232: where wjsi.group_id = p_groupID
233: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
234: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 233: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

229: update wip_job_schedule_interface wjsi
230: set wjsi.process_status = WIP_CONSTANTS.ERROR,
231: wjsi.last_update_date = sysdate
232: where wjsi.group_id = p_groupID
233: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
234: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
235: and wjsi.load_type not in (WIP_CONSTANTS.CREATE_JOB,
236: WIP_CONSTANTS.CREATE_SCHED,
237: WIP_CONSTANTS.RESCHED_JOB,

Line 234: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

230: set wjsi.process_status = WIP_CONSTANTS.ERROR,
231: wjsi.last_update_date = sysdate
232: where wjsi.group_id = p_groupID
233: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
234: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
235: and wjsi.load_type not in (WIP_CONSTANTS.CREATE_JOB,
236: WIP_CONSTANTS.CREATE_SCHED,
237: WIP_CONSTANTS.RESCHED_JOB,
238: WIP_CONSTANTS.CREATE_NS_JOB)

Line 235: and wjsi.load_type not in (WIP_CONSTANTS.CREATE_JOB,

231: wjsi.last_update_date = sysdate
232: where wjsi.group_id = p_groupID
233: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
234: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
235: and wjsi.load_type not in (WIP_CONSTANTS.CREATE_JOB,
236: WIP_CONSTANTS.CREATE_SCHED,
237: WIP_CONSTANTS.RESCHED_JOB,
238: WIP_CONSTANTS.CREATE_NS_JOB)
239: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 236: WIP_CONSTANTS.CREATE_SCHED,

232: where wjsi.group_id = p_groupID
233: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
234: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
235: and wjsi.load_type not in (WIP_CONSTANTS.CREATE_JOB,
236: WIP_CONSTANTS.CREATE_SCHED,
237: WIP_CONSTANTS.RESCHED_JOB,
238: WIP_CONSTANTS.CREATE_NS_JOB)
239: returning wjsi.interface_id bulk collect into l_interfaceTbl;
240:

Line 237: WIP_CONSTANTS.RESCHED_JOB,

233: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
234: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
235: and wjsi.load_type not in (WIP_CONSTANTS.CREATE_JOB,
236: WIP_CONSTANTS.CREATE_SCHED,
237: WIP_CONSTANTS.RESCHED_JOB,
238: WIP_CONSTANTS.CREATE_NS_JOB)
239: returning wjsi.interface_id bulk collect into l_interfaceTbl;
240:
241: if ( sql%rowcount > 0 ) then

Line 238: WIP_CONSTANTS.CREATE_NS_JOB)

234: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
235: and wjsi.load_type not in (WIP_CONSTANTS.CREATE_JOB,
236: WIP_CONSTANTS.CREATE_SCHED,
237: WIP_CONSTANTS.RESCHED_JOB,
238: WIP_CONSTANTS.CREATE_NS_JOB)
239: returning wjsi.interface_id bulk collect into l_interfaceTbl;
240:
241: if ( sql%rowcount > 0 ) then
242: fnd_message.set_name('WIP', 'WIP_ML_LOAD_TYPE');

Line 254: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

250: set wjsi.request_id = decode(x_request_id,-1,wjsi.request_id,x_request_id),
251: wjsi.program_id = decode(x_program_id,-1,wjsi.program_id,x_program_id),
252: wjsi.program_application_id = decode(x_application_id,-1,wjsi.program_application_id, x_application_id)
253: where wjsi.group_id = p_groupID
254: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
255: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING);
256:
257:
258: --

Line 255: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING);

251: wjsi.program_id = decode(x_program_id,-1,wjsi.program_id,x_program_id),
252: wjsi.program_application_id = decode(x_application_id,-1,wjsi.program_application_id, x_application_id)
253: where wjsi.group_id = p_groupID
254: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
255: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING);
256:
257:
258: --
259: -- default and validate column created_by, created_by_name

Line 262: set wjsi.process_status = WIP_CONSTANTS.ERROR,

258: --
259: -- default and validate column created_by, created_by_name
260: --
261: update wip_job_schedule_interface wjsi
262: set wjsi.process_status = WIP_CONSTANTS.ERROR,
263: wjsi.last_update_date = sysdate
264: where wjsi.group_id = p_groupID
265: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
266: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 265: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

261: update wip_job_schedule_interface wjsi
262: set wjsi.process_status = WIP_CONSTANTS.ERROR,
263: wjsi.last_update_date = sysdate
264: where wjsi.group_id = p_groupID
265: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
266: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
267: and wjsi.created_by_name is not null
268: and wjsi.created_by is null
269: and not exists (select 1

Line 266: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

262: set wjsi.process_status = WIP_CONSTANTS.ERROR,
263: wjsi.last_update_date = sysdate
264: where wjsi.group_id = p_groupID
265: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
266: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
267: and wjsi.created_by_name is not null
268: and wjsi.created_by is null
269: and not exists (select 1
270: from fnd_user usr

Line 280: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/

276: fnd_message.set_token('COLUMN', 'CREATED_BY_NAME', false);
277: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
278: end if;
279:
280: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
281:
282: update wip_job_schedule_interface wjsi
283: set wjsi.process_status = WIP_CONSTANTS.WARNING,
284: wjsi.last_update_date = sysdate

Line 283: set wjsi.process_status = WIP_CONSTANTS.WARNING,

279:
280: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
281:
282: update wip_job_schedule_interface wjsi
283: set wjsi.process_status = WIP_CONSTANTS.WARNING,
284: wjsi.last_update_date = sysdate
285: where wjsi.group_id = p_groupID
286: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
287: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 286: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

282: update wip_job_schedule_interface wjsi
283: set wjsi.process_status = WIP_CONSTANTS.WARNING,
284: wjsi.last_update_date = sysdate
285: where wjsi.group_id = p_groupID
286: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
287: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
288: and wjsi.created_by_name is not null
289: and wjsi.created_by is not null
290: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 287: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

283: set wjsi.process_status = WIP_CONSTANTS.WARNING,
284: wjsi.last_update_date = sysdate
285: where wjsi.group_id = p_groupID
286: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
287: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
288: and wjsi.created_by_name is not null
289: and wjsi.created_by is not null
290: returning wjsi.interface_id bulk collect into l_interfaceTbl;
291:

Line 304: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

300: from fnd_user usr
301: where usr.user_name = wjsi.created_by_name),
302: wjsi.last_update_date = sysdate
303: where wjsi.group_id = p_groupID
304: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
305: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
306: and wjsi.created_by_name is not null
307: and wjsi.created_by is null;
308:

Line 305: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

301: where usr.user_name = wjsi.created_by_name),
302: wjsi.last_update_date = sysdate
303: where wjsi.group_id = p_groupID
304: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
305: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
306: and wjsi.created_by_name is not null
307: and wjsi.created_by is null;
308:
309: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

Line 309: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

305: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
306: and wjsi.created_by_name is not null
307: and wjsi.created_by is null;
308:
309: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
310: update wip_job_schedule_interface wjsi
311: set wjsi.process_status = WIP_CONSTANTS.ERROR,
312: wjsi.last_update_date = sysdate
313: where wjsi.group_id = p_groupID

Line 311: set wjsi.process_status = WIP_CONSTANTS.ERROR,

307: and wjsi.created_by is null;
308:
309: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
310: update wip_job_schedule_interface wjsi
311: set wjsi.process_status = WIP_CONSTANTS.ERROR,
312: wjsi.last_update_date = sysdate
313: where wjsi.group_id = p_groupID
314: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
315: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 314: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

310: update wip_job_schedule_interface wjsi
311: set wjsi.process_status = WIP_CONSTANTS.ERROR,
312: wjsi.last_update_date = sysdate
313: where wjsi.group_id = p_groupID
314: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
315: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
316: and not exists (select 1
317: from fnd_user usr
318: where usr.user_id = wjsi.created_by

Line 315: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

311: set wjsi.process_status = WIP_CONSTANTS.ERROR,
312: wjsi.last_update_date = sysdate
313: where wjsi.group_id = p_groupID
314: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
315: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
316: and not exists (select 1
317: from fnd_user usr
318: where usr.user_id = wjsi.created_by
319: and sysdate between usr.start_date and nvl(end_date, sysdate))

Line 333: set wjsi.process_status = WIP_CONSTANTS.ERROR,

329: --
330: -- default and validate last_updated_by_name and last_updated_by
331: --
332: update wip_job_schedule_interface wjsi
333: set wjsi.process_status = WIP_CONSTANTS.ERROR,
334: wjsi.last_update_date = sysdate
335: where wjsi.group_id = p_groupID
336: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
337: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 336: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

332: update wip_job_schedule_interface wjsi
333: set wjsi.process_status = WIP_CONSTANTS.ERROR,
334: wjsi.last_update_date = sysdate
335: where wjsi.group_id = p_groupID
336: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
337: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
338: and wjsi.last_updated_by_name is not null
339: and wjsi.last_updated_by is null
340: and not exists (select 1

Line 337: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

333: set wjsi.process_status = WIP_CONSTANTS.ERROR,
334: wjsi.last_update_date = sysdate
335: where wjsi.group_id = p_groupID
336: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
337: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
338: and wjsi.last_updated_by_name is not null
339: and wjsi.last_updated_by is null
340: and not exists (select 1
341: from fnd_user usr

Line 350: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/

346: fnd_message.set_name('WIP', 'WIP_ML_FIELD_INVALID');
347: fnd_message.set_token('COLUMN', 'LAST_UPDATED_BY_NAME', false);
348: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
349: end if;
350: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
351:
352: update wip_job_schedule_interface wjsi
353: set wjsi.process_status = WIP_CONSTANTS.WARNING,
354: wjsi.last_update_date = sysdate

Line 353: set wjsi.process_status = WIP_CONSTANTS.WARNING,

349: end if;
350: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
351:
352: update wip_job_schedule_interface wjsi
353: set wjsi.process_status = WIP_CONSTANTS.WARNING,
354: wjsi.last_update_date = sysdate
355: where wjsi.group_id = p_groupID
356: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
357: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 356: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

352: update wip_job_schedule_interface wjsi
353: set wjsi.process_status = WIP_CONSTANTS.WARNING,
354: wjsi.last_update_date = sysdate
355: where wjsi.group_id = p_groupID
356: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
357: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
358: and wjsi.last_updated_by_name is not null
359: and wjsi.last_updated_by is not null
360: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 357: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

353: set wjsi.process_status = WIP_CONSTANTS.WARNING,
354: wjsi.last_update_date = sysdate
355: where wjsi.group_id = p_groupID
356: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
357: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
358: and wjsi.last_updated_by_name is not null
359: and wjsi.last_updated_by is not null
360: returning wjsi.interface_id bulk collect into l_interfaceTbl;
361:

Line 374: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

370: from fnd_user usr
371: where usr.user_name = wjsi.last_updated_by_name),
372: wjsi.last_update_date = sysdate
373: where wjsi.group_id = p_groupID
374: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
375: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
376: and wjsi.last_updated_by_name is not null
377: and wjsi.last_updated_by is null;
378:

Line 375: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

371: where usr.user_name = wjsi.last_updated_by_name),
372: wjsi.last_update_date = sysdate
373: where wjsi.group_id = p_groupID
374: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
375: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
376: and wjsi.last_updated_by_name is not null
377: and wjsi.last_updated_by is null;
378:
379: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

Line 379: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

375: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
376: and wjsi.last_updated_by_name is not null
377: and wjsi.last_updated_by is null;
378:
379: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
380:
381: update wip_job_schedule_interface wjsi
382: set wjsi.process_status = WIP_CONSTANTS.ERROR,
383: wjsi.last_update_date = sysdate

Line 382: set wjsi.process_status = WIP_CONSTANTS.ERROR,

378:
379: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
380:
381: update wip_job_schedule_interface wjsi
382: set wjsi.process_status = WIP_CONSTANTS.ERROR,
383: wjsi.last_update_date = sysdate
384: where wjsi.group_id = p_groupID
385: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
386: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 385: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

381: update wip_job_schedule_interface wjsi
382: set wjsi.process_status = WIP_CONSTANTS.ERROR,
383: wjsi.last_update_date = sysdate
384: where wjsi.group_id = p_groupID
385: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
386: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
387: and not exists (select 1
388: from fnd_user usr
389: where usr.user_id = wjsi.last_updated_by

Line 386: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

382: set wjsi.process_status = WIP_CONSTANTS.ERROR,
383: wjsi.last_update_date = sysdate
384: where wjsi.group_id = p_groupID
385: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
386: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
387: and not exists (select 1
388: from fnd_user usr
389: where usr.user_id = wjsi.last_updated_by
390: and sysdate between usr.start_date and nvl(end_date, sysdate))

Line 406: set wjsi.process_status = WIP_CONSTANTS.ERROR,

402: --
403: -- Bug 4890514. Performance Fix
404: -- saugupta 25th-May-2006
405: update wip_job_schedule_interface wjsi
406: set wjsi.process_status = WIP_CONSTANTS.ERROR,
407: wjsi.last_update_date = sysdate
408: where wjsi.group_id = p_groupID
409: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
410: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 409: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

405: update wip_job_schedule_interface wjsi
406: set wjsi.process_status = WIP_CONSTANTS.ERROR,
407: wjsi.last_update_date = sysdate
408: where wjsi.group_id = p_groupID
409: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
410: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
411: and wjsi.organization_code is not null
412: and wjsi.organization_id is null
413: and not exists (select 1

Line 410: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

406: set wjsi.process_status = WIP_CONSTANTS.ERROR,
407: wjsi.last_update_date = sysdate
408: where wjsi.group_id = p_groupID
409: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
410: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
411: and wjsi.organization_code is not null
412: and wjsi.organization_id is null
413: and not exists (select 1
414: from mtl_parameters ood

Line 424: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/

420: fnd_message.set_token('COLUMN', 'ORGANIZATION_CODE', false);
421: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
422: end if;
423:
424: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
425:
426: update wip_job_schedule_interface wjsi
427: set wjsi.process_status = WIP_CONSTANTS.WARNING,
428: wjsi.last_update_date = sysdate

Line 427: set wjsi.process_status = WIP_CONSTANTS.WARNING,

423:
424: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
425:
426: update wip_job_schedule_interface wjsi
427: set wjsi.process_status = WIP_CONSTANTS.WARNING,
428: wjsi.last_update_date = sysdate
429: where wjsi.group_id = p_groupID
430: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
431: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 430: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

426: update wip_job_schedule_interface wjsi
427: set wjsi.process_status = WIP_CONSTANTS.WARNING,
428: wjsi.last_update_date = sysdate
429: where wjsi.group_id = p_groupID
430: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
431: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
432: and wjsi.organization_code is not null
433: and wjsi.organization_id is not null
434: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 431: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

427: set wjsi.process_status = WIP_CONSTANTS.WARNING,
428: wjsi.last_update_date = sysdate
429: where wjsi.group_id = p_groupID
430: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
431: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
432: and wjsi.organization_code is not null
433: and wjsi.organization_id is not null
434: returning wjsi.interface_id bulk collect into l_interfaceTbl;
435:

Line 450: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

446: from mtl_parameters ood
447: where ood.organization_code = wjsi.organization_code),
448: wjsi.last_update_date = sysdate
449: where wjsi.group_id = p_groupID
450: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
451: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
452: and wjsi.organization_code is not null
453: and wjsi.organization_id is null;
454:

Line 451: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

447: where ood.organization_code = wjsi.organization_code),
448: wjsi.last_update_date = sysdate
449: where wjsi.group_id = p_groupID
450: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
451: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
452: and wjsi.organization_code is not null
453: and wjsi.organization_id is null;
454:
455:

Line 456: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

452: and wjsi.organization_code is not null
453: and wjsi.organization_id is null;
454:
455:
456: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
457: -- Bug 4890514. Performance Fix
458: -- saugupta 25th-May-2006
459: update wip_job_schedule_interface wjsi
460: set wjsi.process_status = WIP_CONSTANTS.ERROR,

Line 460: set wjsi.process_status = WIP_CONSTANTS.ERROR,

456: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
457: -- Bug 4890514. Performance Fix
458: -- saugupta 25th-May-2006
459: update wip_job_schedule_interface wjsi
460: set wjsi.process_status = WIP_CONSTANTS.ERROR,
461: wjsi.last_update_date = sysdate
462: where wjsi.group_id = p_groupID
463: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
464: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 463: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

459: update wip_job_schedule_interface wjsi
460: set wjsi.process_status = WIP_CONSTANTS.ERROR,
461: wjsi.last_update_date = sysdate
462: where wjsi.group_id = p_groupID
463: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
464: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
465: and not exists (select 1
466: from wip_parameters wp,
467: mtl_parameters mp,

Line 464: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

460: set wjsi.process_status = WIP_CONSTANTS.ERROR,
461: wjsi.last_update_date = sysdate
462: where wjsi.group_id = p_groupID
463: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
464: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
465: and not exists (select 1
466: from wip_parameters wp,
467: mtl_parameters mp,
468: hr_organization_units ood

Line 480: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/

476: fnd_message.set_name('WIP', 'WIP_ML_ORGANIZATION_ID');
477: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
478: end if;
479:
480: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
481:
482:
483: --
484: -- default and validate job_name and wip_entity_id column

Line 487: set wjsi.process_status = WIP_CONSTANTS.ERROR,

483: --
484: -- default and validate job_name and wip_entity_id column
485: --
486: update wip_job_schedule_interface wjsi
487: set wjsi.process_status = WIP_CONSTANTS.ERROR,
488: wjsi.last_update_date = sysdate
489: where wjsi.group_id = p_groupID
490: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
491: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 490: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

486: update wip_job_schedule_interface wjsi
487: set wjsi.process_status = WIP_CONSTANTS.ERROR,
488: wjsi.last_update_date = sysdate
489: where wjsi.group_id = p_groupID
490: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
491: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
492: and wjsi.job_name is not null
493: and wjsi.wip_entity_id is null
494: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB

Line 491: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

487: set wjsi.process_status = WIP_CONSTANTS.ERROR,
488: wjsi.last_update_date = sysdate
489: where wjsi.group_id = p_groupID
490: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
491: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
492: and wjsi.job_name is not null
493: and wjsi.wip_entity_id is null
494: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB
495: and not exists (select 1

Line 494: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB

490: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
491: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
492: and wjsi.job_name is not null
493: and wjsi.wip_entity_id is null
494: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB
495: and not exists (select 1
496: from wip_entities we
497: where we.wip_entity_name = wjsi.job_name
498: and we.organization_id = wjsi.organization_id)

Line 508: set wjsi.process_status = WIP_CONSTANTS.WARNING,

504: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
505: end if;
506:
507: update wip_job_schedule_interface wjsi
508: set wjsi.process_status = WIP_CONSTANTS.WARNING,
509: wjsi.last_update_date = sysdate
510: where wjsi.group_id = p_groupID
511: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
512: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 511: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

507: update wip_job_schedule_interface wjsi
508: set wjsi.process_status = WIP_CONSTANTS.WARNING,
509: wjsi.last_update_date = sysdate
510: where wjsi.group_id = p_groupID
511: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
512: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
513: and wjsi.job_name is not null
514: and ( (wjsi.wip_entity_id is not null
515: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB) OR

Line 512: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

508: set wjsi.process_status = WIP_CONSTANTS.WARNING,
509: wjsi.last_update_date = sysdate
510: where wjsi.group_id = p_groupID
511: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
512: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
513: and wjsi.job_name is not null
514: and ( (wjsi.wip_entity_id is not null
515: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB) OR
516: (wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED) )

Line 515: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB) OR

511: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
512: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
513: and wjsi.job_name is not null
514: and ( (wjsi.wip_entity_id is not null
515: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB) OR
516: (wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED) )
517: returning wjsi.interface_id bulk collect into l_interfaceTbl;
518:
519: if ( sql%rowcount > 0 ) then

Line 516: (wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED) )

512: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
513: and wjsi.job_name is not null
514: and ( (wjsi.wip_entity_id is not null
515: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB) OR
516: (wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED) )
517: returning wjsi.interface_id bulk collect into l_interfaceTbl;
518:
519: if ( sql%rowcount > 0 ) then
520: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');

Line 529: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

525: update wip_job_schedule_interface wjsi
526: set wjsi.job_name = fnd_profile.value('WIP_JOB_PREFIX') || wip_job_number_s.nextval,
527: wjsi.last_update_date = sysdate
528: where wjsi.group_id = p_groupID
529: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
530: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
531: and wjsi.job_name is null
532: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB, WIP_CONSTANTS.CREATE_NS_JOB);
533:

Line 530: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

526: set wjsi.job_name = fnd_profile.value('WIP_JOB_PREFIX') || wip_job_number_s.nextval,
527: wjsi.last_update_date = sysdate
528: where wjsi.group_id = p_groupID
529: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
530: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
531: and wjsi.job_name is null
532: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB, WIP_CONSTANTS.CREATE_NS_JOB);
533:
534: update wip_job_schedule_interface wjsi

Line 532: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB, WIP_CONSTANTS.CREATE_NS_JOB);

528: where wjsi.group_id = p_groupID
529: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
530: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
531: and wjsi.job_name is null
532: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB, WIP_CONSTANTS.CREATE_NS_JOB);
533:
534: update wip_job_schedule_interface wjsi
535: set wjsi.wip_entity_id = (select we.wip_entity_id
536: from wip_entities we

Line 541: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

537: where we.wip_entity_name = wjsi.job_name
538: and we.organization_id = wjsi.organization_id),
539: wjsi.last_update_date = sysdate
540: where wjsi.group_id = p_groupID
541: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
542: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
543: and wjsi.job_name is not null
544: and wjsi.wip_entity_id is null
545: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB;

Line 542: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

538: and we.organization_id = wjsi.organization_id),
539: wjsi.last_update_date = sysdate
540: where wjsi.group_id = p_groupID
541: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
542: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
543: and wjsi.job_name is not null
544: and wjsi.wip_entity_id is null
545: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB;
546:

Line 545: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB;

541: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
542: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
543: and wjsi.job_name is not null
544: and wjsi.wip_entity_id is null
545: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB;
546:
547: update wip_job_schedule_interface wjsi
548: set wjsi.process_status = WIP_CONSTANTS.ERROR,
549: wjsi.last_update_date = sysdate

Line 548: set wjsi.process_status = WIP_CONSTANTS.ERROR,

544: and wjsi.wip_entity_id is null
545: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB;
546:
547: update wip_job_schedule_interface wjsi
548: set wjsi.process_status = WIP_CONSTANTS.ERROR,
549: wjsi.last_update_date = sysdate
550: where wjsi.group_id = p_groupID
551: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
552: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 551: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

547: update wip_job_schedule_interface wjsi
548: set wjsi.process_status = WIP_CONSTANTS.ERROR,
549: wjsi.last_update_date = sysdate
550: where wjsi.group_id = p_groupID
551: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
552: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
553: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB, WIP_CONSTANTS.CREATE_NS_JOB)
554: and exists (select 1
555: from wip_entities we

Line 552: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

548: set wjsi.process_status = WIP_CONSTANTS.ERROR,
549: wjsi.last_update_date = sysdate
550: where wjsi.group_id = p_groupID
551: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
552: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
553: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB, WIP_CONSTANTS.CREATE_NS_JOB)
554: and exists (select 1
555: from wip_entities we
556: where we.wip_entity_name = wjsi.job_name

Line 553: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB, WIP_CONSTANTS.CREATE_NS_JOB)

549: wjsi.last_update_date = sysdate
550: where wjsi.group_id = p_groupID
551: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
552: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
553: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB, WIP_CONSTANTS.CREATE_NS_JOB)
554: and exists (select 1
555: from wip_entities we
556: where we.wip_entity_name = wjsi.job_name
557: and we.organization_id = wjsi.organization_id)

Line 569: set wjsi.process_status = WIP_CONSTANTS.WARNING,

565: --
566: -- validate wip entity id
567: --
568: update wip_job_schedule_interface wjsi
569: set wjsi.process_status = WIP_CONSTANTS.WARNING,
570: wjsi.last_update_date = sysdate
571: where wjsi.group_id = p_groupID
572: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
573: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 572: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

568: update wip_job_schedule_interface wjsi
569: set wjsi.process_status = WIP_CONSTANTS.WARNING,
570: wjsi.last_update_date = sysdate
571: where wjsi.group_id = p_groupID
572: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
573: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
574: and wjsi.wip_entity_id is not null
575: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
576: WIP_CONSTANTS.CREATE_NS_JOB,

Line 573: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

569: set wjsi.process_status = WIP_CONSTANTS.WARNING,
570: wjsi.last_update_date = sysdate
571: where wjsi.group_id = p_groupID
572: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
573: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
574: and wjsi.wip_entity_id is not null
575: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
576: WIP_CONSTANTS.CREATE_NS_JOB,
577: WIP_CONSTANTS.CREATE_SCHED)

Line 575: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,

571: where wjsi.group_id = p_groupID
572: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
573: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
574: and wjsi.wip_entity_id is not null
575: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
576: WIP_CONSTANTS.CREATE_NS_JOB,
577: WIP_CONSTANTS.CREATE_SCHED)
578: returning wjsi.interface_id bulk collect into l_interfaceTbl;
579:

Line 576: WIP_CONSTANTS.CREATE_NS_JOB,

572: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
573: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
574: and wjsi.wip_entity_id is not null
575: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
576: WIP_CONSTANTS.CREATE_NS_JOB,
577: WIP_CONSTANTS.CREATE_SCHED)
578: returning wjsi.interface_id bulk collect into l_interfaceTbl;
579:
580: if ( sql%rowcount > 0 ) then

Line 577: WIP_CONSTANTS.CREATE_SCHED)

573: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
574: and wjsi.wip_entity_id is not null
575: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
576: WIP_CONSTANTS.CREATE_NS_JOB,
577: WIP_CONSTANTS.CREATE_SCHED)
578: returning wjsi.interface_id bulk collect into l_interfaceTbl;
579:
580: if ( sql%rowcount > 0 ) then
581: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');

Line 590: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

586: update wip_job_schedule_interface wjsi
587: set wip_entity_id = wip_entities_s.nextval,
588: last_update_date = sysdate
589: where wjsi.group_id = p_groupID
590: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
591: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
592: and wjsi.wip_entity_id is null
593: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
594: WIP_CONSTANTS.CREATE_NS_JOB);

Line 591: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

587: set wip_entity_id = wip_entities_s.nextval,
588: last_update_date = sysdate
589: where wjsi.group_id = p_groupID
590: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
591: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
592: and wjsi.wip_entity_id is null
593: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
594: WIP_CONSTANTS.CREATE_NS_JOB);
595:

Line 593: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,

589: where wjsi.group_id = p_groupID
590: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
591: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
592: and wjsi.wip_entity_id is null
593: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
594: WIP_CONSTANTS.CREATE_NS_JOB);
595:
596: update wip_job_schedule_interface wjsi
597: set wjsi.process_status = WIP_CONSTANTS.ERROR,

Line 594: WIP_CONSTANTS.CREATE_NS_JOB);

590: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
591: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
592: and wjsi.wip_entity_id is null
593: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
594: WIP_CONSTANTS.CREATE_NS_JOB);
595:
596: update wip_job_schedule_interface wjsi
597: set wjsi.process_status = WIP_CONSTANTS.ERROR,
598: wjsi.last_update_date = sysdate

Line 597: set wjsi.process_status = WIP_CONSTANTS.ERROR,

593: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
594: WIP_CONSTANTS.CREATE_NS_JOB);
595:
596: update wip_job_schedule_interface wjsi
597: set wjsi.process_status = WIP_CONSTANTS.ERROR,
598: wjsi.last_update_date = sysdate
599: where wjsi.group_id = p_groupID
600: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
601: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 600: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

596: update wip_job_schedule_interface wjsi
597: set wjsi.process_status = WIP_CONSTANTS.ERROR,
598: wjsi.last_update_date = sysdate
599: where wjsi.group_id = p_groupID
600: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
601: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
602: and ( ( wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB
603: and not exists (select 1
604: from wip_entities we

Line 601: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

597: set wjsi.process_status = WIP_CONSTANTS.ERROR,
598: wjsi.last_update_date = sysdate
599: where wjsi.group_id = p_groupID
600: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
601: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
602: and ( ( wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB
603: and not exists (select 1
604: from wip_entities we
605: where we.organization_id = wjsi.organization_id

Line 602: and ( ( wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB

598: wjsi.last_update_date = sysdate
599: where wjsi.group_id = p_groupID
600: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
601: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
602: and ( ( wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB
603: and not exists (select 1
604: from wip_entities we
605: where we.organization_id = wjsi.organization_id
606: and we.wip_entity_id = wjsi.wip_entity_id))

Line 607: OR ( wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB, WIP_CONSTANTS.CREATE_NS_JOB)

603: and not exists (select 1
604: from wip_entities we
605: where we.organization_id = wjsi.organization_id
606: and we.wip_entity_id = wjsi.wip_entity_id))
607: OR ( wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB, WIP_CONSTANTS.CREATE_NS_JOB)
608: and exists (select 1
609: from wip_entities we
610: where we.organization_id = wjsi.organization_id
611: and we.wip_entity_id = wjsi.wip_entity_id)))

Line 623: set wjsi.process_status = WIP_CONSTANTS.ERROR,

619: --
620: -- validate for entity type
621: --
622: update wip_job_schedule_interface wjsi
623: set wjsi.process_status = WIP_CONSTANTS.ERROR,
624: wjsi.last_update_date = sysdate
625: where wjsi.group_id = p_groupID
626: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
627: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 626: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

622: update wip_job_schedule_interface wjsi
623: set wjsi.process_status = WIP_CONSTANTS.ERROR,
624: wjsi.last_update_date = sysdate
625: where wjsi.group_id = p_groupID
626: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
627: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
628: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB
629: and exists (select 1
630: from wip_entities we

Line 627: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

623: set wjsi.process_status = WIP_CONSTANTS.ERROR,
624: wjsi.last_update_date = sysdate
625: where wjsi.group_id = p_groupID
626: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
627: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
628: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB
629: and exists (select 1
630: from wip_entities we
631: where we.wip_entity_id = wjsi.wip_entity_id

Line 628: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB

624: wjsi.last_update_date = sysdate
625: where wjsi.group_id = p_groupID
626: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
627: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
628: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB
629: and exists (select 1
630: from wip_entities we
631: where we.wip_entity_id = wjsi.wip_entity_id
632: and we.organization_id = wjsi.organization_id

Line 645: set wjsi.process_status = WIP_CONSTANTS.WARNING,

641: --
642: -- default and validate repetitve_schedule_id
643: --
644: update wip_job_schedule_interface wjsi
645: set wjsi.process_status = WIP_CONSTANTS.WARNING,
646: wjsi.last_update_date = sysdate
647: where wjsi.group_id = p_groupID
648: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
649: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 648: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

644: update wip_job_schedule_interface wjsi
645: set wjsi.process_status = WIP_CONSTANTS.WARNING,
646: wjsi.last_update_date = sysdate
647: where wjsi.group_id = p_groupID
648: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
649: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
650: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED
651: and wjsi.repetitive_schedule_id is not null
652: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 649: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

645: set wjsi.process_status = WIP_CONSTANTS.WARNING,
646: wjsi.last_update_date = sysdate
647: where wjsi.group_id = p_groupID
648: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
649: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
650: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED
651: and wjsi.repetitive_schedule_id is not null
652: returning wjsi.interface_id bulk collect into l_interfaceTbl;
653:

Line 650: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED

646: wjsi.last_update_date = sysdate
647: where wjsi.group_id = p_groupID
648: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
649: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
650: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED
651: and wjsi.repetitive_schedule_id is not null
652: returning wjsi.interface_id bulk collect into l_interfaceTbl;
653:
654: if ( sql%rowcount > 0 ) then

Line 664: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

660: update wip_job_schedule_interface wjsi
661: set wjsi.repetitive_schedule_id = wip_repetitive_schedules_s.nextval,
662: wjsi.last_update_date = sysdate
663: where wjsi.group_id = p_groupID
664: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
665: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
666: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED;
667:
668: --

Line 665: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

661: set wjsi.repetitive_schedule_id = wip_repetitive_schedules_s.nextval,
662: wjsi.last_update_date = sysdate
663: where wjsi.group_id = p_groupID
664: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
665: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
666: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED;
667:
668: --
669: -- default and validate schedule_group_id and schedule_group_name

Line 666: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED;

662: wjsi.last_update_date = sysdate
663: where wjsi.group_id = p_groupID
664: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
665: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
666: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED;
667:
668: --
669: -- default and validate schedule_group_id and schedule_group_name
670: --

Line 672: set wjsi.process_status = WIP_CONSTANTS.WARNING,

668: --
669: -- default and validate schedule_group_id and schedule_group_name
670: --
671: update wip_job_schedule_interface wjsi
672: set wjsi.process_status = WIP_CONSTANTS.WARNING,
673: wjsi.last_update_date = sysdate
674: where wjsi.group_id = p_groupID
675: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
676: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 675: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

671: update wip_job_schedule_interface wjsi
672: set wjsi.process_status = WIP_CONSTANTS.WARNING,
673: wjsi.last_update_date = sysdate
674: where wjsi.group_id = p_groupID
675: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
676: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
677: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED
678: and wjsi.schedule_group_id is not null
679: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 676: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

672: set wjsi.process_status = WIP_CONSTANTS.WARNING,
673: wjsi.last_update_date = sysdate
674: where wjsi.group_id = p_groupID
675: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
676: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
677: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED
678: and wjsi.schedule_group_id is not null
679: returning wjsi.interface_id bulk collect into l_interfaceTbl;
680:

Line 677: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED

673: wjsi.last_update_date = sysdate
674: where wjsi.group_id = p_groupID
675: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
676: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
677: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED
678: and wjsi.schedule_group_id is not null
679: returning wjsi.interface_id bulk collect into l_interfaceTbl;
680:
681: if ( sql%rowcount > 0 ) then

Line 688: set wjsi.process_status = WIP_CONSTANTS.WARNING,

684: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationWarning);
685: end if;
686:
687: update wip_job_schedule_interface wjsi
688: set wjsi.process_status = WIP_CONSTANTS.WARNING,
689: wjsi.last_update_date = sysdate
690: where wjsi.group_id = p_groupID
691: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
692: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 691: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

687: update wip_job_schedule_interface wjsi
688: set wjsi.process_status = WIP_CONSTANTS.WARNING,
689: wjsi.last_update_date = sysdate
690: where wjsi.group_id = p_groupID
691: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
692: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
693: and (wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED or
694: wjsi.schedule_group_id is not null)
695: and wjsi.schedule_group_name is not null

Line 692: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

688: set wjsi.process_status = WIP_CONSTANTS.WARNING,
689: wjsi.last_update_date = sysdate
690: where wjsi.group_id = p_groupID
691: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
692: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
693: and (wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED or
694: wjsi.schedule_group_id is not null)
695: and wjsi.schedule_group_name is not null
696: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 693: and (wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED or

689: wjsi.last_update_date = sysdate
690: where wjsi.group_id = p_groupID
691: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
692: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
693: and (wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED or
694: wjsi.schedule_group_id is not null)
695: and wjsi.schedule_group_name is not null
696: returning wjsi.interface_id bulk collect into l_interfaceTbl;
697:

Line 705: set wjsi.process_status = WIP_CONSTANTS.ERROR,

701: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationWarning);
702: end if;
703:
704: update wip_job_schedule_interface wjsi
705: set wjsi.process_status = WIP_CONSTANTS.ERROR,
706: wjsi.last_update_date = sysdate
707: where wjsi.group_id = p_groupID
708: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
709: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 708: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

704: update wip_job_schedule_interface wjsi
705: set wjsi.process_status = WIP_CONSTANTS.ERROR,
706: wjsi.last_update_date = sysdate
707: where wjsi.group_id = p_groupID
708: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
709: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
710: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
711: WIP_CONSTANTS.RESCHED_JOB,
712: WIP_CONSTANTS.CREATE_NS_JOB)

Line 709: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

705: set wjsi.process_status = WIP_CONSTANTS.ERROR,
706: wjsi.last_update_date = sysdate
707: where wjsi.group_id = p_groupID
708: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
709: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
710: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
711: WIP_CONSTANTS.RESCHED_JOB,
712: WIP_CONSTANTS.CREATE_NS_JOB)
713: and wjsi.schedule_group_id is null

Line 710: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,

706: wjsi.last_update_date = sysdate
707: where wjsi.group_id = p_groupID
708: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
709: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
710: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
711: WIP_CONSTANTS.RESCHED_JOB,
712: WIP_CONSTANTS.CREATE_NS_JOB)
713: and wjsi.schedule_group_id is null
714: and wjsi.schedule_group_name is not null

Line 711: WIP_CONSTANTS.RESCHED_JOB,

707: where wjsi.group_id = p_groupID
708: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
709: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
710: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
711: WIP_CONSTANTS.RESCHED_JOB,
712: WIP_CONSTANTS.CREATE_NS_JOB)
713: and wjsi.schedule_group_id is null
714: and wjsi.schedule_group_name is not null
715: and not exists (select 1

Line 712: WIP_CONSTANTS.CREATE_NS_JOB)

708: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
709: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
710: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
711: WIP_CONSTANTS.RESCHED_JOB,
712: WIP_CONSTANTS.CREATE_NS_JOB)
713: and wjsi.schedule_group_id is null
714: and wjsi.schedule_group_name is not null
715: and not exists (select 1
716: from wip_schedule_groups_val_v sg

Line 735: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

731: where sg.schedule_group_name = wjsi.schedule_group_name
732: and sg.organization_id = wjsi.organization_id),
733: wjsi.last_update_date = sysdate
734: where wjsi.group_id = p_groupID
735: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
736: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
737: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
738: WIP_CONSTANTS.RESCHED_JOB,
739: WIP_CONSTANTS.CREATE_NS_JOB)

Line 736: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

732: and sg.organization_id = wjsi.organization_id),
733: wjsi.last_update_date = sysdate
734: where wjsi.group_id = p_groupID
735: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
736: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
737: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
738: WIP_CONSTANTS.RESCHED_JOB,
739: WIP_CONSTANTS.CREATE_NS_JOB)
740: and wjsi.schedule_group_id is null

Line 737: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,

733: wjsi.last_update_date = sysdate
734: where wjsi.group_id = p_groupID
735: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
736: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
737: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
738: WIP_CONSTANTS.RESCHED_JOB,
739: WIP_CONSTANTS.CREATE_NS_JOB)
740: and wjsi.schedule_group_id is null
741: and wjsi.schedule_group_name is not null;

Line 738: WIP_CONSTANTS.RESCHED_JOB,

734: where wjsi.group_id = p_groupID
735: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
736: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
737: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
738: WIP_CONSTANTS.RESCHED_JOB,
739: WIP_CONSTANTS.CREATE_NS_JOB)
740: and wjsi.schedule_group_id is null
741: and wjsi.schedule_group_name is not null;
742:

Line 739: WIP_CONSTANTS.CREATE_NS_JOB)

735: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
736: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
737: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
738: WIP_CONSTANTS.RESCHED_JOB,
739: WIP_CONSTANTS.CREATE_NS_JOB)
740: and wjsi.schedule_group_id is null
741: and wjsi.schedule_group_name is not null;
742:
743: -- if still null, default from job if load type is reschedule job

Line 753: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

749: where wdj.wip_entity_id = wjsi.wip_entity_id
750: and wdj.organization_id = wjsi.organization_id),
751: wjsi.last_update_date = sysdate
752: where wjsi.group_id = p_groupID
753: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
754: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
755: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB
756: and wjsi.schedule_group_id is null; */
757:

Line 754: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

750: and wdj.organization_id = wjsi.organization_id),
751: wjsi.last_update_date = sysdate
752: where wjsi.group_id = p_groupID
753: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
754: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
755: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB
756: and wjsi.schedule_group_id is null; */
757:
758: -- if still null, try to default from the delivery_id provided

Line 755: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB

751: wjsi.last_update_date = sysdate
752: where wjsi.group_id = p_groupID
753: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
754: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
755: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB
756: and wjsi.schedule_group_id is null; */
757:
758: -- if still null, try to default from the delivery_id provided
759: update wip_job_schedule_interface wjsi

Line 769: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

765: and wsg.schedule_group_name = wds.name
766: and wsg.organization_id = wjsi.organization_id),
767: wjsi.last_update_date = sysdate
768: where wjsi.group_id = p_groupID
769: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
770: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
771: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
772: WIP_CONSTANTS.RESCHED_JOB,
773: WIP_CONSTANTS.CREATE_NS_JOB)

Line 770: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

766: and wsg.organization_id = wjsi.organization_id),
767: wjsi.last_update_date = sysdate
768: where wjsi.group_id = p_groupID
769: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
770: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
771: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
772: WIP_CONSTANTS.RESCHED_JOB,
773: WIP_CONSTANTS.CREATE_NS_JOB)
774: and wjsi.schedule_group_id is null

Line 771: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,

767: wjsi.last_update_date = sysdate
768: where wjsi.group_id = p_groupID
769: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
770: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
771: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
772: WIP_CONSTANTS.RESCHED_JOB,
773: WIP_CONSTANTS.CREATE_NS_JOB)
774: and wjsi.schedule_group_id is null
775: and wjsi.source_code = 'WICDOL'

Line 772: WIP_CONSTANTS.RESCHED_JOB,

768: where wjsi.group_id = p_groupID
769: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
770: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
771: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
772: WIP_CONSTANTS.RESCHED_JOB,
773: WIP_CONSTANTS.CREATE_NS_JOB)
774: and wjsi.schedule_group_id is null
775: and wjsi.source_code = 'WICDOL'
776: and wjsi.delivery_id is not null

Line 773: WIP_CONSTANTS.CREATE_NS_JOB)

769: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
770: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
771: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
772: WIP_CONSTANTS.RESCHED_JOB,
773: WIP_CONSTANTS.CREATE_NS_JOB)
774: and wjsi.schedule_group_id is null
775: and wjsi.source_code = 'WICDOL'
776: and wjsi.delivery_id is not null
777: and exists (select wsg.schedule_group_id

Line 789: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

785: select wjsi.interface_id
786: bulk collect into l_interfaceTbl
787: from wip_job_schedule_interface wjsi
788: where wjsi.group_id = p_groupID
789: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
790: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
791: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
792: WIP_CONSTANTS.RESCHED_JOB,
793: WIP_CONSTANTS.CREATE_NS_JOB)

Line 790: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

786: bulk collect into l_interfaceTbl
787: from wip_job_schedule_interface wjsi
788: where wjsi.group_id = p_groupID
789: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
790: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
791: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
792: WIP_CONSTANTS.RESCHED_JOB,
793: WIP_CONSTANTS.CREATE_NS_JOB)
794: and wjsi.schedule_group_id is null

Line 791: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,

787: from wip_job_schedule_interface wjsi
788: where wjsi.group_id = p_groupID
789: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
790: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
791: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
792: WIP_CONSTANTS.RESCHED_JOB,
793: WIP_CONSTANTS.CREATE_NS_JOB)
794: and wjsi.schedule_group_id is null
795: and wjsi.source_code = 'WICDOL'

Line 792: WIP_CONSTANTS.RESCHED_JOB,

788: where wjsi.group_id = p_groupID
789: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
790: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
791: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
792: WIP_CONSTANTS.RESCHED_JOB,
793: WIP_CONSTANTS.CREATE_NS_JOB)
794: and wjsi.schedule_group_id is null
795: and wjsi.source_code = 'WICDOL'
796: and wjsi.delivery_id is not null;

Line 793: WIP_CONSTANTS.CREATE_NS_JOB)

789: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
790: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
791: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
792: WIP_CONSTANTS.RESCHED_JOB,
793: WIP_CONSTANTS.CREATE_NS_JOB)
794: and wjsi.schedule_group_id is null
795: and wjsi.source_code = 'WICDOL'
796: and wjsi.delivery_id is not null;
797:

Line 832: set wjsi.process_status = WIP_CONSTANTS.ERROR,

828: l_interfaceTbl.delete;
829: end if;
830:
831: update wip_job_schedule_interface wjsi
832: set wjsi.process_status = WIP_CONSTANTS.ERROR,
833: wjsi.last_update_date = sysdate
834: where wjsi.group_id = p_groupID
835: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
836: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 835: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

831: update wip_job_schedule_interface wjsi
832: set wjsi.process_status = WIP_CONSTANTS.ERROR,
833: wjsi.last_update_date = sysdate
834: where wjsi.group_id = p_groupID
835: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
836: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
837: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
838: WIP_CONSTANTS.RESCHED_JOB,
839: WIP_CONSTANTS.CREATE_NS_JOB)

Line 836: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

832: set wjsi.process_status = WIP_CONSTANTS.ERROR,
833: wjsi.last_update_date = sysdate
834: where wjsi.group_id = p_groupID
835: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
836: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
837: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
838: WIP_CONSTANTS.RESCHED_JOB,
839: WIP_CONSTANTS.CREATE_NS_JOB)
840: and wjsi.schedule_group_id is not null

Line 837: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,

833: wjsi.last_update_date = sysdate
834: where wjsi.group_id = p_groupID
835: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
836: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
837: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
838: WIP_CONSTANTS.RESCHED_JOB,
839: WIP_CONSTANTS.CREATE_NS_JOB)
840: and wjsi.schedule_group_id is not null
841: and not exists (select 1

Line 838: WIP_CONSTANTS.RESCHED_JOB,

834: where wjsi.group_id = p_groupID
835: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
836: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
837: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
838: WIP_CONSTANTS.RESCHED_JOB,
839: WIP_CONSTANTS.CREATE_NS_JOB)
840: and wjsi.schedule_group_id is not null
841: and not exists (select 1
842: from wip_schedule_groups_val_v sg

Line 839: WIP_CONSTANTS.CREATE_NS_JOB)

835: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
836: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
837: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
838: WIP_CONSTANTS.RESCHED_JOB,
839: WIP_CONSTANTS.CREATE_NS_JOB)
840: and wjsi.schedule_group_id is not null
841: and not exists (select 1
842: from wip_schedule_groups_val_v sg
843: where sg.schedule_group_id = wjsi.schedule_group_id

Line 856: set wjsi.process_status = WIP_CONSTANTS.WARNING,

852: --
853: -- default build_sequence
854: --
855: update wip_job_schedule_interface wjsi
856: set wjsi.process_status = WIP_CONSTANTS.WARNING,
857: wjsi.last_update_date = sysdate
858: where wjsi.group_id = p_groupID
859: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
860: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 859: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

855: update wip_job_schedule_interface wjsi
856: set wjsi.process_status = WIP_CONSTANTS.WARNING,
857: wjsi.last_update_date = sysdate
858: where wjsi.group_id = p_groupID
859: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
860: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
861: and wjsi.build_sequence is not null
862: and wjsi.load_type = wip_constants.create_sched
863: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 860: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

856: set wjsi.process_status = WIP_CONSTANTS.WARNING,
857: wjsi.last_update_date = sysdate
858: where wjsi.group_id = p_groupID
859: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
860: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
861: and wjsi.build_sequence is not null
862: and wjsi.load_type = wip_constants.create_sched
863: returning wjsi.interface_id bulk collect into l_interfaceTbl;
864:

Line 862: and wjsi.load_type = wip_constants.create_sched

858: where wjsi.group_id = p_groupID
859: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
860: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
861: and wjsi.build_sequence is not null
862: and wjsi.load_type = wip_constants.create_sched
863: returning wjsi.interface_id bulk collect into l_interfaceTbl;
864:
865: if ( sql%rowcount > 0 ) then
866: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');

Line 875: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

871: --
872: -- default and validate line_code and line_id
873: --
874:
875: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
876:
877: update wip_job_schedule_interface wjsi
878: set wjsi.process_status = WIP_CONSTANTS.ERROR,
879: wjsi.last_update_date = sysdate

Line 878: set wjsi.process_status = WIP_CONSTANTS.ERROR,

874:
875: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
876:
877: update wip_job_schedule_interface wjsi
878: set wjsi.process_status = WIP_CONSTANTS.ERROR,
879: wjsi.last_update_date = sysdate
880: where wjsi.group_id = p_groupID
881: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
882: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 881: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

877: update wip_job_schedule_interface wjsi
878: set wjsi.process_status = WIP_CONSTANTS.ERROR,
879: wjsi.last_update_date = sysdate
880: where wjsi.group_id = p_groupID
881: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
882: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
883: and wjsi.line_code is not null
884: and wjsi.line_id is null
885: and not exists (select 1

Line 882: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

878: set wjsi.process_status = WIP_CONSTANTS.ERROR,
879: wjsi.last_update_date = sysdate
880: where wjsi.group_id = p_groupID
881: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
882: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
883: and wjsi.line_code is not null
884: and wjsi.line_id is null
885: and not exists (select 1
886: from wip_lines_val_v wl

Line 896: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/

892: fnd_message.set_name('WIP', 'WIP_ML_FIELD_INVALID');
893: fnd_message.set_token('COLUMN', 'LINE_CODE', false);
894: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
895: end if;
896: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
897:
898: update wip_job_schedule_interface wjsi
899: set wjsi.process_status = WIP_CONSTANTS.WARNING,
900: wjsi.last_update_date = sysdate

Line 899: set wjsi.process_status = WIP_CONSTANTS.WARNING,

895: end if;
896: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
897:
898: update wip_job_schedule_interface wjsi
899: set wjsi.process_status = WIP_CONSTANTS.WARNING,
900: wjsi.last_update_date = sysdate
901: where wjsi.group_id = p_groupID
902: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
903: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 902: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

898: update wip_job_schedule_interface wjsi
899: set wjsi.process_status = WIP_CONSTANTS.WARNING,
900: wjsi.last_update_date = sysdate
901: where wjsi.group_id = p_groupID
902: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
903: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
904: and wjsi.line_code is not null
905: and wjsi.line_id is not null
906: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 903: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

899: set wjsi.process_status = WIP_CONSTANTS.WARNING,
900: wjsi.last_update_date = sysdate
901: where wjsi.group_id = p_groupID
902: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
903: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
904: and wjsi.line_code is not null
905: and wjsi.line_id is not null
906: returning wjsi.interface_id bulk collect into l_interfaceTbl;
907:

Line 921: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

917: where wl.line_code = wjsi.line_code
918: and wl.organization_id = wjsi.organization_id),
919: last_update_date = sysdate
920: where wjsi.group_id = p_groupID
921: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
922: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
923: and line_code is not null
924: and line_id is null;
925:

Line 922: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

918: and wl.organization_id = wjsi.organization_id),
919: last_update_date = sysdate
920: where wjsi.group_id = p_groupID
921: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
922: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
923: and line_code is not null
924: and line_id is null;
925:
926: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

Line 926: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

922: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
923: and line_code is not null
924: and line_id is null;
925:
926: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
927:
928: update wip_job_schedule_interface wjsi
929: set wjsi.process_status = WIP_CONSTANTS.ERROR,
930: wjsi.last_update_date = sysdate

Line 929: set wjsi.process_status = WIP_CONSTANTS.ERROR,

925:
926: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
927:
928: update wip_job_schedule_interface wjsi
929: set wjsi.process_status = WIP_CONSTANTS.ERROR,
930: wjsi.last_update_date = sysdate
931: where wjsi.group_id = p_groupID
932: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
933: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 932: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

928: update wip_job_schedule_interface wjsi
929: set wjsi.process_status = WIP_CONSTANTS.ERROR,
930: wjsi.last_update_date = sysdate
931: where wjsi.group_id = p_groupID
932: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
933: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
934: and wjsi.line_id is not null
935: and not exists (select 1
936: from wip_lines_val_v wl

Line 933: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

929: set wjsi.process_status = WIP_CONSTANTS.ERROR,
930: wjsi.last_update_date = sysdate
931: where wjsi.group_id = p_groupID
932: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
933: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
934: and wjsi.line_id is not null
935: and not exists (select 1
936: from wip_lines_val_v wl
937: where wl.line_id = wjsi.line_id

Line 946: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/

942: fnd_message.set_name('WIP', 'WIP_ML_LINE_ID');
943: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
944: end if;
945:
946: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
947:
948: -- ignore serialization_start_op for repetitive
949: update wip_job_schedule_interface wjsi
950: set wjsi.process_status = WIP_CONSTANTS.WARNING,

Line 950: set wjsi.process_status = WIP_CONSTANTS.WARNING,

946: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
947:
948: -- ignore serialization_start_op for repetitive
949: update wip_job_schedule_interface wjsi
950: set wjsi.process_status = WIP_CONSTANTS.WARNING,
951: wjsi.last_update_date = sysdate
952: where wjsi.group_id = p_groupID
953: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
954: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 953: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

949: update wip_job_schedule_interface wjsi
950: set wjsi.process_status = WIP_CONSTANTS.WARNING,
951: wjsi.last_update_date = sysdate
952: where wjsi.group_id = p_groupID
953: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
954: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
955: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED
956: and wjsi.serialization_start_op is not null
957: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 954: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

950: set wjsi.process_status = WIP_CONSTANTS.WARNING,
951: wjsi.last_update_date = sysdate
952: where wjsi.group_id = p_groupID
953: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
954: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
955: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED
956: and wjsi.serialization_start_op is not null
957: returning wjsi.interface_id bulk collect into l_interfaceTbl;
958:

Line 955: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED

951: wjsi.last_update_date = sysdate
952: where wjsi.group_id = p_groupID
953: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
954: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
955: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED
956: and wjsi.serialization_start_op is not null
957: returning wjsi.interface_id bulk collect into l_interfaceTbl;
958:
959: if ( sql%rowcount > 0 ) then

Line 969: set wjsi.process_status = WIP_CONSTANTS.WARNING,

965: --
966: -- default and validate project_number and project_id
967: --
968: update wip_job_schedule_interface wjsi
969: set wjsi.process_status = WIP_CONSTANTS.WARNING,
970: wjsi.last_update_date = sysdate
971: where wjsi.group_id = p_groupID
972: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
973: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 972: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

968: update wip_job_schedule_interface wjsi
969: set wjsi.process_status = WIP_CONSTANTS.WARNING,
970: wjsi.last_update_date = sysdate
971: where wjsi.group_id = p_groupID
972: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
973: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
974: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED
975: and wjsi.project_number is not null
976: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 973: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

969: set wjsi.process_status = WIP_CONSTANTS.WARNING,
970: wjsi.last_update_date = sysdate
971: where wjsi.group_id = p_groupID
972: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
973: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
974: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED
975: and wjsi.project_number is not null
976: returning wjsi.interface_id bulk collect into l_interfaceTbl;
977:

Line 974: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED

970: wjsi.last_update_date = sysdate
971: where wjsi.group_id = p_groupID
972: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
973: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
974: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED
975: and wjsi.project_number is not null
976: returning wjsi.interface_id bulk collect into l_interfaceTbl;
977:
978: if ( sql%rowcount > 0 ) then

Line 985: set wjsi.process_status = WIP_CONSTANTS.WARNING,

981: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationWarning);
982: end if;
983:
984: update wip_job_schedule_interface wjsi
985: set wjsi.process_status = WIP_CONSTANTS.WARNING,
986: wjsi.last_update_date = sysdate
987: where wjsi.group_id = p_groupID
988: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
989: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 988: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

984: update wip_job_schedule_interface wjsi
985: set wjsi.process_status = WIP_CONSTANTS.WARNING,
986: wjsi.last_update_date = sysdate
987: where wjsi.group_id = p_groupID
988: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
989: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
990: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED
991: and wjsi.project_id is not null
992: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 989: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

985: set wjsi.process_status = WIP_CONSTANTS.WARNING,
986: wjsi.last_update_date = sysdate
987: where wjsi.group_id = p_groupID
988: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
989: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
990: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED
991: and wjsi.project_id is not null
992: returning wjsi.interface_id bulk collect into l_interfaceTbl;
993:

Line 990: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED

986: wjsi.last_update_date = sysdate
987: where wjsi.group_id = p_groupID
988: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
989: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
990: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED
991: and wjsi.project_id is not null
992: returning wjsi.interface_id bulk collect into l_interfaceTbl;
993:
994: if ( sql%rowcount > 0 ) then

Line 1004: set wjsi.process_status = WIP_CONSTANTS.WARNING,

1000: --
1001: -- default and validate task_number and task_id
1002: --
1003: update wip_job_schedule_interface wjsi
1004: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1005: wjsi.last_update_date = sysdate
1006: where wjsi.group_id = p_groupID
1007: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1008: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1007: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1003: update wip_job_schedule_interface wjsi
1004: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1005: wjsi.last_update_date = sysdate
1006: where wjsi.group_id = p_groupID
1007: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1008: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1009: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED
1010: and wjsi.task_number is not null
1011: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 1008: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1004: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1005: wjsi.last_update_date = sysdate
1006: where wjsi.group_id = p_groupID
1007: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1008: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1009: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED
1010: and wjsi.task_number is not null
1011: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1012:

Line 1009: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED

1005: wjsi.last_update_date = sysdate
1006: where wjsi.group_id = p_groupID
1007: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1008: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1009: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED
1010: and wjsi.task_number is not null
1011: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1012:
1013: if ( sql%rowcount > 0 ) then

Line 1020: set wjsi.process_status = WIP_CONSTANTS.WARNING,

1016: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationWarning);
1017: end if;
1018:
1019: update wip_job_schedule_interface wjsi
1020: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1021: wjsi.last_update_date = sysdate
1022: where wjsi.group_id = p_groupID
1023: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1024: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1023: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1019: update wip_job_schedule_interface wjsi
1020: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1021: wjsi.last_update_date = sysdate
1022: where wjsi.group_id = p_groupID
1023: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1024: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1025: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED
1026: and wjsi.task_id is not null
1027: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 1024: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1020: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1021: wjsi.last_update_date = sysdate
1022: where wjsi.group_id = p_groupID
1023: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1024: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1025: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED
1026: and wjsi.task_id is not null
1027: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1028:

Line 1025: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED

1021: wjsi.last_update_date = sysdate
1022: where wjsi.group_id = p_groupID
1023: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1024: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1025: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED
1026: and wjsi.task_id is not null
1027: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1028:
1029: if ( sql%rowcount > 0 ) then

Line 1039: set wjsi.firm_planned_flag = WIP_CONSTANTS.NO,

1035: --
1036: -- default and validate firm_planned_flag
1037: --
1038: update wip_job_schedule_interface wjsi
1039: set wjsi.firm_planned_flag = WIP_CONSTANTS.NO,
1040: wjsi.last_update_date = sysdate
1041: where wjsi.group_id = p_groupID
1042: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1043: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1042: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1038: update wip_job_schedule_interface wjsi
1039: set wjsi.firm_planned_flag = WIP_CONSTANTS.NO,
1040: wjsi.last_update_date = sysdate
1041: where wjsi.group_id = p_groupID
1042: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1043: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1044: and wjsi.firm_planned_flag is null
1045: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
1046: WIP_CONSTANTS.CREATE_NS_JOB,

Line 1043: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1039: set wjsi.firm_planned_flag = WIP_CONSTANTS.NO,
1040: wjsi.last_update_date = sysdate
1041: where wjsi.group_id = p_groupID
1042: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1043: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1044: and wjsi.firm_planned_flag is null
1045: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
1046: WIP_CONSTANTS.CREATE_NS_JOB,
1047: WIP_CONSTANTS.CREATE_SCHED);

Line 1045: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,

1041: where wjsi.group_id = p_groupID
1042: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1043: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1044: and wjsi.firm_planned_flag is null
1045: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
1046: WIP_CONSTANTS.CREATE_NS_JOB,
1047: WIP_CONSTANTS.CREATE_SCHED);
1048:
1049: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

Line 1046: WIP_CONSTANTS.CREATE_NS_JOB,

1042: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1043: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1044: and wjsi.firm_planned_flag is null
1045: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
1046: WIP_CONSTANTS.CREATE_NS_JOB,
1047: WIP_CONSTANTS.CREATE_SCHED);
1048:
1049: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1050:

Line 1047: WIP_CONSTANTS.CREATE_SCHED);

1043: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1044: and wjsi.firm_planned_flag is null
1045: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
1046: WIP_CONSTANTS.CREATE_NS_JOB,
1047: WIP_CONSTANTS.CREATE_SCHED);
1048:
1049: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1050:
1051: update wip_job_schedule_interface wjsi

Line 1049: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

1045: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
1046: WIP_CONSTANTS.CREATE_NS_JOB,
1047: WIP_CONSTANTS.CREATE_SCHED);
1048:
1049: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1050:
1051: update wip_job_schedule_interface wjsi
1052: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1053: wjsi.last_update_date = sysdate

Line 1052: set wjsi.process_status = WIP_CONSTANTS.ERROR,

1048:
1049: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1050:
1051: update wip_job_schedule_interface wjsi
1052: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1053: wjsi.last_update_date = sysdate
1054: where wjsi.group_id = p_groupID
1055: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1056: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1055: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1051: update wip_job_schedule_interface wjsi
1052: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1053: wjsi.last_update_date = sysdate
1054: where wjsi.group_id = p_groupID
1055: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1056: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1057: and ( (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB and
1058: wjsi.firm_planned_flag = WIP_CONSTANTS.YES)
1059: or (wjsi.firm_planned_flag = WIP_CONSTANTS.YES and

Line 1056: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1052: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1053: wjsi.last_update_date = sysdate
1054: where wjsi.group_id = p_groupID
1055: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1056: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1057: and ( (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB and
1058: wjsi.firm_planned_flag = WIP_CONSTANTS.YES)
1059: or (wjsi.firm_planned_flag = WIP_CONSTANTS.YES and
1060: wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and

Line 1057: and ( (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB and

1053: wjsi.last_update_date = sysdate
1054: where wjsi.group_id = p_groupID
1055: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1056: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1057: and ( (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB and
1058: wjsi.firm_planned_flag = WIP_CONSTANTS.YES)
1059: or (wjsi.firm_planned_flag = WIP_CONSTANTS.YES and
1060: wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1061: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type

Line 1058: wjsi.firm_planned_flag = WIP_CONSTANTS.YES)

1054: where wjsi.group_id = p_groupID
1055: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1056: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1057: and ( (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB and
1058: wjsi.firm_planned_flag = WIP_CONSTANTS.YES)
1059: or (wjsi.firm_planned_flag = WIP_CONSTANTS.YES and
1060: wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1061: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1062: from wip_discrete_jobs wdj

Line 1059: or (wjsi.firm_planned_flag = WIP_CONSTANTS.YES and

1055: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1056: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1057: and ( (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB and
1058: wjsi.firm_planned_flag = WIP_CONSTANTS.YES)
1059: or (wjsi.firm_planned_flag = WIP_CONSTANTS.YES and
1060: wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1061: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1062: from wip_discrete_jobs wdj
1063: where wdj.wip_entity_id = wjsi.wip_entity_id

Line 1060: wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and

1056: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1057: and ( (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB and
1058: wjsi.firm_planned_flag = WIP_CONSTANTS.YES)
1059: or (wjsi.firm_planned_flag = WIP_CONSTANTS.YES and
1060: wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1061: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1062: from wip_discrete_jobs wdj
1063: where wdj.wip_entity_id = wjsi.wip_entity_id
1064: and wdj.organization_id = wjsi.organization_id))

Line 1061: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type

1057: and ( (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB and
1058: wjsi.firm_planned_flag = WIP_CONSTANTS.YES)
1059: or (wjsi.firm_planned_flag = WIP_CONSTANTS.YES and
1060: wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1061: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1062: from wip_discrete_jobs wdj
1063: where wdj.wip_entity_id = wjsi.wip_entity_id
1064: and wdj.organization_id = wjsi.organization_id))
1065: or (wjsi.firm_planned_flag not in (WIP_CONSTANTS.YES, WIP_CONSTANTS.NO)))

Line 1065: or (wjsi.firm_planned_flag not in (WIP_CONSTANTS.YES, WIP_CONSTANTS.NO)))

1061: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1062: from wip_discrete_jobs wdj
1063: where wdj.wip_entity_id = wjsi.wip_entity_id
1064: and wdj.organization_id = wjsi.organization_id))
1065: or (wjsi.firm_planned_flag not in (WIP_CONSTANTS.YES, WIP_CONSTANTS.NO)))
1066: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1067:
1068: if ( sql%rowcount > 0 ) then
1069: fnd_message.set_name('WIP', 'WIP_ML_FIRM_PLANNED_FLAG');

Line 1072: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/

1068: if ( sql%rowcount > 0 ) then
1069: fnd_message.set_name('WIP', 'WIP_ML_FIRM_PLANNED_FLAG');
1070: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
1071: end if;
1072: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
1073:
1074: --
1075: -- default description
1076: --

Line 1084: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1080: update wip_job_schedule_interface wjsi
1081: set wjsi.description = l_description,
1082: wjsi.last_update_date = sysdate
1083: where wjsi.group_id = p_groupID
1084: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1085: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1086: and wjsi.description is null
1087: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
1088: WIP_CONSTANTS.CREATE_NS_JOB);

Line 1085: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1081: set wjsi.description = l_description,
1082: wjsi.last_update_date = sysdate
1083: where wjsi.group_id = p_groupID
1084: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1085: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1086: and wjsi.description is null
1087: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
1088: WIP_CONSTANTS.CREATE_NS_JOB);
1089:

Line 1087: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,

1083: where wjsi.group_id = p_groupID
1084: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1085: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1086: and wjsi.description is null
1087: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
1088: WIP_CONSTANTS.CREATE_NS_JOB);
1089:
1090: fnd_message.set_name('WIP','WIP_MLR_DESC');
1091: fnd_message.set_token('LOAD_DATE', fnd_date.date_to_charDT(dateval => sysdate,calendar_aware => 2), false);

Line 1088: WIP_CONSTANTS.CREATE_NS_JOB);

1084: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1085: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1086: and wjsi.description is null
1087: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
1088: WIP_CONSTANTS.CREATE_NS_JOB);
1089:
1090: fnd_message.set_name('WIP','WIP_MLR_DESC');
1091: fnd_message.set_token('LOAD_DATE', fnd_date.date_to_charDT(dateval => sysdate,calendar_aware => 2), false);
1092: l_description := fnd_message.get;

Line 1097: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1093: update wip_job_schedule_interface wjsi
1094: set wjsi.description = l_description,
1095: wjsi.last_update_date = sysdate
1096: where wjsi.group_id = p_groupID
1097: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1098: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1099: and wjsi.description is null
1100: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED;
1101:

Line 1098: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1094: set wjsi.description = l_description,
1095: wjsi.last_update_date = sysdate
1096: where wjsi.group_id = p_groupID
1097: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1098: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1099: and wjsi.description is null
1100: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED;
1101:
1102: --

Line 1100: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED;

1096: where wjsi.group_id = p_groupID
1097: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1098: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1099: and wjsi.description is null
1100: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED;
1101:
1102: --
1103: -- default and validate primary_item_id and primary_item_segments
1104: --

Line 1106: set wjsi.process_status = WIP_CONSTANTS.WARNING,

1102: --
1103: -- default and validate primary_item_id and primary_item_segments
1104: --
1105: update wip_job_schedule_interface wjsi
1106: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1107: wjsi.last_update_date = sysdate
1108: where wjsi.group_id = p_groupID
1109: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1110: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1109: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1105: update wip_job_schedule_interface wjsi
1106: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1107: wjsi.last_update_date = sysdate
1108: where wjsi.group_id = p_groupID
1109: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1110: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1111: and (wjsi.load_type = wip_constants.resched_job or
1112: wjsi.primary_item_id is not null)
1113: and wjsi.primary_item_segments is not null

Line 1110: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1106: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1107: wjsi.last_update_date = sysdate
1108: where wjsi.group_id = p_groupID
1109: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1110: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1111: and (wjsi.load_type = wip_constants.resched_job or
1112: wjsi.primary_item_id is not null)
1113: and wjsi.primary_item_segments is not null
1114: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 1111: and (wjsi.load_type = wip_constants.resched_job or

1107: wjsi.last_update_date = sysdate
1108: where wjsi.group_id = p_groupID
1109: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1110: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1111: and (wjsi.load_type = wip_constants.resched_job or
1112: wjsi.primary_item_id is not null)
1113: and wjsi.primary_item_segments is not null
1114: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1115:

Line 1123: set wjsi.process_status = WIP_CONSTANTS.WARNING,

1119: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationWarning);
1120: end if;
1121:
1122: update wip_job_schedule_interface wjsi
1123: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1124: wjsi.last_update_date = sysdate
1125: where wjsi.group_id = p_groupID
1126: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1127: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1126: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1122: update wip_job_schedule_interface wjsi
1123: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1124: wjsi.last_update_date = sysdate
1125: where wjsi.group_id = p_groupID
1126: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1127: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1128: and wjsi.load_type = wip_constants.resched_job
1129: and wjsi.primary_item_id is not null
1130: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 1127: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1123: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1124: wjsi.last_update_date = sysdate
1125: where wjsi.group_id = p_groupID
1126: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1127: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1128: and wjsi.load_type = wip_constants.resched_job
1129: and wjsi.primary_item_id is not null
1130: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1131:

Line 1128: and wjsi.load_type = wip_constants.resched_job

1124: wjsi.last_update_date = sysdate
1125: where wjsi.group_id = p_groupID
1126: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1127: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1128: and wjsi.load_type = wip_constants.resched_job
1129: and wjsi.primary_item_id is not null
1130: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1131:
1132: if ( sql%rowcount > 0 ) then

Line 1144: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1140: from wip_discrete_jobs wdj
1141: where wdj.organization_id = wjsi.organization_id
1142: and wdj.wip_entity_id = wjsi.wip_entity_id)
1143: where wjsi.group_id = p_groupID
1144: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1145: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1146: and wjsi.load_type = wip_constants.resched_job;
1147:
1148: update wip_job_schedule_interface wjsi

Line 1145: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1141: where wdj.organization_id = wjsi.organization_id
1142: and wdj.wip_entity_id = wjsi.wip_entity_id)
1143: where wjsi.group_id = p_groupID
1144: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1145: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1146: and wjsi.load_type = wip_constants.resched_job;
1147:
1148: update wip_job_schedule_interface wjsi
1149: set wjsi.process_status = WIP_CONSTANTS.ERROR,

Line 1146: and wjsi.load_type = wip_constants.resched_job;

1142: and wdj.wip_entity_id = wjsi.wip_entity_id)
1143: where wjsi.group_id = p_groupID
1144: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1145: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1146: and wjsi.load_type = wip_constants.resched_job;
1147:
1148: update wip_job_schedule_interface wjsi
1149: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1150: wjsi.last_update_date = sysdate

Line 1149: set wjsi.process_status = WIP_CONSTANTS.ERROR,

1145: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1146: and wjsi.load_type = wip_constants.resched_job;
1147:
1148: update wip_job_schedule_interface wjsi
1149: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1150: wjsi.last_update_date = sysdate
1151: where wjsi.group_id = p_groupID
1152: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1153: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1152: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1148: update wip_job_schedule_interface wjsi
1149: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1150: wjsi.last_update_date = sysdate
1151: where wjsi.group_id = p_groupID
1152: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1153: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1154: and wjsi.primary_item_segments is not null
1155: and wjsi.primary_item_id is null
1156: and wjsi.load_type in (wip_constants.create_job,

Line 1153: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1149: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1150: wjsi.last_update_date = sysdate
1151: where wjsi.group_id = p_groupID
1152: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1153: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1154: and wjsi.primary_item_segments is not null
1155: and wjsi.primary_item_id is null
1156: and wjsi.load_type in (wip_constants.create_job,
1157: wip_constants.create_ns_job,

Line 1156: and wjsi.load_type in (wip_constants.create_job,

1152: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1153: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1154: and wjsi.primary_item_segments is not null
1155: and wjsi.primary_item_id is null
1156: and wjsi.load_type in (wip_constants.create_job,
1157: wip_constants.create_ns_job,
1158: wip_constants.create_sched)
1159: and not exists (select 1
1160: from mtl_system_items_kfv msik

Line 1157: wip_constants.create_ns_job,

1153: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1154: and wjsi.primary_item_segments is not null
1155: and wjsi.primary_item_id is null
1156: and wjsi.load_type in (wip_constants.create_job,
1157: wip_constants.create_ns_job,
1158: wip_constants.create_sched)
1159: and not exists (select 1
1160: from mtl_system_items_kfv msik
1161: where msik.organization_id = wjsi.organization_id

Line 1158: wip_constants.create_sched)

1154: and wjsi.primary_item_segments is not null
1155: and wjsi.primary_item_id is null
1156: and wjsi.load_type in (wip_constants.create_job,
1157: wip_constants.create_ns_job,
1158: wip_constants.create_sched)
1159: and not exists (select 1
1160: from mtl_system_items_kfv msik
1161: where msik.organization_id = wjsi.organization_id
1162: and msik.concatenated_segments = wjsi.primary_item_segments)

Line 1178: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1174: where msik.organization_id = wjsi.organization_id
1175: and msik.concatenated_segments = wjsi.primary_item_segments),
1176: wjsi.last_update_date = sysdate
1177: where wjsi.group_id = p_groupID
1178: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1179: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1180: and wjsi.load_type in (wip_constants.create_job,
1181: wip_constants.create_ns_job,
1182: wip_constants.create_sched)

Line 1179: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1175: and msik.concatenated_segments = wjsi.primary_item_segments),
1176: wjsi.last_update_date = sysdate
1177: where wjsi.group_id = p_groupID
1178: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1179: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1180: and wjsi.load_type in (wip_constants.create_job,
1181: wip_constants.create_ns_job,
1182: wip_constants.create_sched)
1183: and wjsi.primary_item_segments is not null

Line 1180: and wjsi.load_type in (wip_constants.create_job,

1176: wjsi.last_update_date = sysdate
1177: where wjsi.group_id = p_groupID
1178: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1179: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1180: and wjsi.load_type in (wip_constants.create_job,
1181: wip_constants.create_ns_job,
1182: wip_constants.create_sched)
1183: and wjsi.primary_item_segments is not null
1184: and wjsi.primary_item_id is null;

Line 1181: wip_constants.create_ns_job,

1177: where wjsi.group_id = p_groupID
1178: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1179: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1180: and wjsi.load_type in (wip_constants.create_job,
1181: wip_constants.create_ns_job,
1182: wip_constants.create_sched)
1183: and wjsi.primary_item_segments is not null
1184: and wjsi.primary_item_id is null;
1185:

Line 1182: wip_constants.create_sched)

1178: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1179: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1180: and wjsi.load_type in (wip_constants.create_job,
1181: wip_constants.create_ns_job,
1182: wip_constants.create_sched)
1183: and wjsi.primary_item_segments is not null
1184: and wjsi.primary_item_id is null;
1185:
1186: update wip_job_schedule_interface wjsi

Line 1187: set wjsi.process_status = WIP_CONSTANTS.ERROR,

1183: and wjsi.primary_item_segments is not null
1184: and wjsi.primary_item_id is null;
1185:
1186: update wip_job_schedule_interface wjsi
1187: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1188: wjsi.last_update_date = sysdate
1189: where wjsi.group_id = p_groupID
1190: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1191: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1190: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1186: update wip_job_schedule_interface wjsi
1187: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1188: wjsi.last_update_date = sysdate
1189: where wjsi.group_id = p_groupID
1190: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1191: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1192: and wjsi.primary_item_id is not null
1193: and ( wjsi.load_type in (wip_constants.create_job, wip_constants.create_sched)
1194: or (wjsi.load_type = wip_constants.create_ns_job and wjsi.primary_item_id is not null) )

Line 1191: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1187: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1188: wjsi.last_update_date = sysdate
1189: where wjsi.group_id = p_groupID
1190: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1191: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1192: and wjsi.primary_item_id is not null
1193: and ( wjsi.load_type in (wip_constants.create_job, wip_constants.create_sched)
1194: or (wjsi.load_type = wip_constants.create_ns_job and wjsi.primary_item_id is not null) )
1195: and not exists (select 1

Line 1193: and ( wjsi.load_type in (wip_constants.create_job, wip_constants.create_sched)

1189: where wjsi.group_id = p_groupID
1190: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1191: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1192: and wjsi.primary_item_id is not null
1193: and ( wjsi.load_type in (wip_constants.create_job, wip_constants.create_sched)
1194: or (wjsi.load_type = wip_constants.create_ns_job and wjsi.primary_item_id is not null) )
1195: and not exists (select 1
1196: from mtl_system_items msi
1197: where msi.organization_id = wjsi.organization_id

Line 1194: or (wjsi.load_type = wip_constants.create_ns_job and wjsi.primary_item_id is not null) )

1190: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1191: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1192: and wjsi.primary_item_id is not null
1193: and ( wjsi.load_type in (wip_constants.create_job, wip_constants.create_sched)
1194: or (wjsi.load_type = wip_constants.create_ns_job and wjsi.primary_item_id is not null) )
1195: and not exists (select 1
1196: from mtl_system_items msi
1197: where msi.organization_id = wjsi.organization_id
1198: and msi.inventory_item_id = wjsi.primary_item_id)

Line 1208: set wjsi.process_status = WIP_CONSTANTS.ERROR,

1204: end if;
1205:
1206: l_see_eng_items_flag := fnd_profile.value('WIP_SEE_ENG_ITEMS');
1207: update wip_job_schedule_interface wjsi
1208: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1209: wjsi.last_update_date = sysdate
1210: where wjsi.group_id = p_groupID
1211: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1212: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1211: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1207: update wip_job_schedule_interface wjsi
1208: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1209: wjsi.last_update_date = sysdate
1210: where wjsi.group_id = p_groupID
1211: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1212: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1213: and ( (wjsi.primary_item_id is null and
1214: wjsi.load_type in (wip_constants.create_job, wip_constants.create_sched))
1215: or (wjsi.primary_item_id is not null and

Line 1212: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1208: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1209: wjsi.last_update_date = sysdate
1210: where wjsi.group_id = p_groupID
1211: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1212: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1213: and ( (wjsi.primary_item_id is null and
1214: wjsi.load_type in (wip_constants.create_job, wip_constants.create_sched))
1215: or (wjsi.primary_item_id is not null and
1216: wjsi.load_type in (wip_constants.create_job,

Line 1214: wjsi.load_type in (wip_constants.create_job, wip_constants.create_sched))

1210: where wjsi.group_id = p_groupID
1211: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1212: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1213: and ( (wjsi.primary_item_id is null and
1214: wjsi.load_type in (wip_constants.create_job, wip_constants.create_sched))
1215: or (wjsi.primary_item_id is not null and
1216: wjsi.load_type in (wip_constants.create_job,
1217: wip_constants.create_ns_job,
1218: wip_constants.create_sched) and

Line 1216: wjsi.load_type in (wip_constants.create_job,

1212: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1213: and ( (wjsi.primary_item_id is null and
1214: wjsi.load_type in (wip_constants.create_job, wip_constants.create_sched))
1215: or (wjsi.primary_item_id is not null and
1216: wjsi.load_type in (wip_constants.create_job,
1217: wip_constants.create_ns_job,
1218: wip_constants.create_sched) and
1219: ( 'Y' <> (select msi.build_in_wip_flag
1220: from mtl_system_items msi

Line 1217: wip_constants.create_ns_job,

1213: and ( (wjsi.primary_item_id is null and
1214: wjsi.load_type in (wip_constants.create_job, wip_constants.create_sched))
1215: or (wjsi.primary_item_id is not null and
1216: wjsi.load_type in (wip_constants.create_job,
1217: wip_constants.create_ns_job,
1218: wip_constants.create_sched) and
1219: ( 'Y' <> (select msi.build_in_wip_flag
1220: from mtl_system_items msi
1221: where msi.organization_id = wjsi.organization_id

Line 1218: wip_constants.create_sched) and

1214: wjsi.load_type in (wip_constants.create_job, wip_constants.create_sched))
1215: or (wjsi.primary_item_id is not null and
1216: wjsi.load_type in (wip_constants.create_job,
1217: wip_constants.create_ns_job,
1218: wip_constants.create_sched) and
1219: ( 'Y' <> (select msi.build_in_wip_flag
1220: from mtl_system_items msi
1221: where msi.organization_id = wjsi.organization_id
1222: and msi.inventory_item_id = wjsi.primary_item_id) or

Line 1227: (l_see_eng_items_flag = wip_constants.no and

1223: 'N' <> (select msi.pick_components_flag
1224: from mtl_system_items msi
1225: where msi.organization_id = wjsi.organization_id
1226: and msi.inventory_item_id = wjsi.primary_item_id) or
1227: (l_see_eng_items_flag = wip_constants.no and
1228: 'Y' = (select msi.eng_item_flag
1229: from mtl_system_items msi
1230: where msi.organization_id = wjsi.organization_id
1231: and msi.inventory_item_id = wjsi.primary_item_id)))))

Line 1240: set wjsi.process_status = WIP_CONSTANTS.ERROR,

1236: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
1237: end if;
1238:
1239: update wip_job_schedule_interface wjsi
1240: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1241: wjsi.last_update_date = sysdate
1242: where wjsi.group_id = p_groupID
1243: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1244: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1243: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1239: update wip_job_schedule_interface wjsi
1240: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1241: wjsi.last_update_date = sysdate
1242: where wjsi.group_id = p_groupID
1243: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1244: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1245: and wjsi.load_type = wip_constants.create_sched
1246: and not exists (select 1
1247: from wip_repetitive_items wri

Line 1244: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1240: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1241: wjsi.last_update_date = sysdate
1242: where wjsi.group_id = p_groupID
1243: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1244: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1245: and wjsi.load_type = wip_constants.create_sched
1246: and not exists (select 1
1247: from wip_repetitive_items wri
1248: where wri.line_id = wjsi.line_id

Line 1245: and wjsi.load_type = wip_constants.create_sched

1241: wjsi.last_update_date = sysdate
1242: where wjsi.group_id = p_groupID
1243: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1244: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1245: and wjsi.load_type = wip_constants.create_sched
1246: and not exists (select 1
1247: from wip_repetitive_items wri
1248: where wri.line_id = wjsi.line_id
1249: and wri.primary_item_id = wjsi.primary_item_id

Line 1262: set wjsi.process_status = WIP_CONSTANTS.ERROR,

1258: /* FP bug 4378684. No need to validate whether ATO item has bill or not.
1259: This validation is removed per request by CTO team */
1260:
1261: /* update wip_job_schedule_interface wjsi
1262: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1263: wjsi.last_update_date = sysdate
1264: where wjsi.group_id = p_groupID
1265: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1266: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1265: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1261: /* update wip_job_schedule_interface wjsi
1262: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1263: wjsi.last_update_date = sysdate
1264: where wjsi.group_id = p_groupID
1265: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1266: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1267: and wjsi.load_type in (wip_constants.create_job,
1268: wip_constants.create_sched,
1269: wip_constants.create_ns_job)

Line 1266: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1262: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1263: wjsi.last_update_date = sysdate
1264: where wjsi.group_id = p_groupID
1265: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1266: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1267: and wjsi.load_type in (wip_constants.create_job,
1268: wip_constants.create_sched,
1269: wip_constants.create_ns_job)
1270: and wjsi.primary_item_id is not null

Line 1267: and wjsi.load_type in (wip_constants.create_job,

1263: wjsi.last_update_date = sysdate
1264: where wjsi.group_id = p_groupID
1265: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1266: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1267: and wjsi.load_type in (wip_constants.create_job,
1268: wip_constants.create_sched,
1269: wip_constants.create_ns_job)
1270: and wjsi.primary_item_id is not null
1271: and 'Y' = (select msi.replenish_to_order_flag

Line 1268: wip_constants.create_sched,

1264: where wjsi.group_id = p_groupID
1265: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1266: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1267: and wjsi.load_type in (wip_constants.create_job,
1268: wip_constants.create_sched,
1269: wip_constants.create_ns_job)
1270: and wjsi.primary_item_id is not null
1271: and 'Y' = (select msi.replenish_to_order_flag
1272: from mtl_system_items msi

Line 1269: wip_constants.create_ns_job)

1265: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1266: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1267: and wjsi.load_type in (wip_constants.create_job,
1268: wip_constants.create_sched,
1269: wip_constants.create_ns_job)
1270: and wjsi.primary_item_id is not null
1271: and 'Y' = (select msi.replenish_to_order_flag
1272: from mtl_system_items msi
1273: where msi.organization_id = wjsi.organization_id

Line 1299: set wjsi.process_status = WIP_CONSTANTS.WARNING,

1295: -- default and validate status_type
1296: -- more validation code in the validate line procedure
1297: --
1298: update wip_job_schedule_interface wjsi
1299: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1300: wjsi.last_update_date = sysdate
1301: where wjsi.group_id = p_groupID
1302: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1303: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1302: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1298: update wip_job_schedule_interface wjsi
1299: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1300: wjsi.last_update_date = sysdate
1301: where wjsi.group_id = p_groupID
1302: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1303: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1304: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED
1305: and wjsi.status_type is not null
1306: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 1303: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1299: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1300: wjsi.last_update_date = sysdate
1301: where wjsi.group_id = p_groupID
1302: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1303: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1304: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED
1305: and wjsi.status_type is not null
1306: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1307:

Line 1304: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED

1300: wjsi.last_update_date = sysdate
1301: where wjsi.group_id = p_groupID
1302: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1303: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1304: and wjsi.load_type = WIP_CONSTANTS.CREATE_SCHED
1305: and wjsi.status_type is not null
1306: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1307:
1308: if ( sql%rowcount > 0 ) then

Line 1315: set wjsi.status_type = WIP_CONSTANTS.UNRELEASED,

1311: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationWarning);
1312: end if;
1313:
1314: update wip_job_schedule_interface wjsi
1315: set wjsi.status_type = WIP_CONSTANTS.UNRELEASED,
1316: wjsi.last_update_date = sysdate
1317: where wjsi.group_id = p_groupID
1318: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1319: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1318: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1314: update wip_job_schedule_interface wjsi
1315: set wjsi.status_type = WIP_CONSTANTS.UNRELEASED,
1316: wjsi.last_update_date = sysdate
1317: where wjsi.group_id = p_groupID
1318: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1319: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1320: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB, WIP_CONSTANTS.CREATE_NS_JOB)
1321: and wjsi.status_type is null;
1322:

Line 1319: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1315: set wjsi.status_type = WIP_CONSTANTS.UNRELEASED,
1316: wjsi.last_update_date = sysdate
1317: where wjsi.group_id = p_groupID
1318: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1319: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1320: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB, WIP_CONSTANTS.CREATE_NS_JOB)
1321: and wjsi.status_type is null;
1322:
1323: update wip_job_schedule_interface wjsi

Line 1320: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB, WIP_CONSTANTS.CREATE_NS_JOB)

1316: wjsi.last_update_date = sysdate
1317: where wjsi.group_id = p_groupID
1318: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1319: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1320: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB, WIP_CONSTANTS.CREATE_NS_JOB)
1321: and wjsi.status_type is null;
1322:
1323: update wip_job_schedule_interface wjsi
1324: set wjsi.status_type = (select wdj.status_type

Line 1330: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1326: where wdj.wip_entity_id = wjsi.wip_entity_id
1327: and wdj.organization_id = wjsi.organization_id),
1328: wjsi.last_update_date = sysdate
1329: where wjsi.group_id = p_groupID
1330: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1331: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1332: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB
1333: and wjsi.status_type is null;
1334:

Line 1331: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1327: and wdj.organization_id = wjsi.organization_id),
1328: wjsi.last_update_date = sysdate
1329: where wjsi.group_id = p_groupID
1330: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1331: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1332: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB
1333: and wjsi.status_type is null;
1334:
1335: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

Line 1332: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB

1328: wjsi.last_update_date = sysdate
1329: where wjsi.group_id = p_groupID
1330: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1331: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1332: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB
1333: and wjsi.status_type is null;
1334:
1335: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1336:

Line 1335: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

1331: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1332: and wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB
1333: and wjsi.status_type is null;
1334:
1335: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1336:
1337: update wip_job_schedule_interface wjsi
1338: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1339: wjsi.last_update_date = sysdate

Line 1338: set wjsi.process_status = WIP_CONSTANTS.ERROR,

1334:
1335: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1336:
1337: update wip_job_schedule_interface wjsi
1338: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1339: wjsi.last_update_date = sysdate
1340: where wjsi.group_id = p_groupID
1341: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1342: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1341: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1337: update wip_job_schedule_interface wjsi
1338: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1339: wjsi.last_update_date = sysdate
1340: where wjsi.group_id = p_groupID
1341: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1342: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1343: and ( (wjsi.load_type in (WIP_CONSTANTS.CREATE_NS_JOB,
1344: WIP_CONSTANTS.CREATE_JOB) and
1345: wjsi.status_type not in (WIP_CONSTANTS.UNRELEASED,

Line 1342: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1338: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1339: wjsi.last_update_date = sysdate
1340: where wjsi.group_id = p_groupID
1341: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1342: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1343: and ( (wjsi.load_type in (WIP_CONSTANTS.CREATE_NS_JOB,
1344: WIP_CONSTANTS.CREATE_JOB) and
1345: wjsi.status_type not in (WIP_CONSTANTS.UNRELEASED,
1346: WIP_CONSTANTS.RELEASED,

Line 1343: and ( (wjsi.load_type in (WIP_CONSTANTS.CREATE_NS_JOB,

1339: wjsi.last_update_date = sysdate
1340: where wjsi.group_id = p_groupID
1341: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1342: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1343: and ( (wjsi.load_type in (WIP_CONSTANTS.CREATE_NS_JOB,
1344: WIP_CONSTANTS.CREATE_JOB) and
1345: wjsi.status_type not in (WIP_CONSTANTS.UNRELEASED,
1346: WIP_CONSTANTS.RELEASED,
1347: WIP_CONSTANTS.HOLD))

Line 1344: WIP_CONSTANTS.CREATE_JOB) and

1340: where wjsi.group_id = p_groupID
1341: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1342: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1343: and ( (wjsi.load_type in (WIP_CONSTANTS.CREATE_NS_JOB,
1344: WIP_CONSTANTS.CREATE_JOB) and
1345: wjsi.status_type not in (WIP_CONSTANTS.UNRELEASED,
1346: WIP_CONSTANTS.RELEASED,
1347: WIP_CONSTANTS.HOLD))
1348: or (wjsi.load_type = wip_constants.resched_job and

Line 1345: wjsi.status_type not in (WIP_CONSTANTS.UNRELEASED,

1341: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1342: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1343: and ( (wjsi.load_type in (WIP_CONSTANTS.CREATE_NS_JOB,
1344: WIP_CONSTANTS.CREATE_JOB) and
1345: wjsi.status_type not in (WIP_CONSTANTS.UNRELEASED,
1346: WIP_CONSTANTS.RELEASED,
1347: WIP_CONSTANTS.HOLD))
1348: or (wjsi.load_type = wip_constants.resched_job and
1349: wjsi.status_type is not null and

Line 1346: WIP_CONSTANTS.RELEASED,

1342: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1343: and ( (wjsi.load_type in (WIP_CONSTANTS.CREATE_NS_JOB,
1344: WIP_CONSTANTS.CREATE_JOB) and
1345: wjsi.status_type not in (WIP_CONSTANTS.UNRELEASED,
1346: WIP_CONSTANTS.RELEASED,
1347: WIP_CONSTANTS.HOLD))
1348: or (wjsi.load_type = wip_constants.resched_job and
1349: wjsi.status_type is not null and
1350: wjsi.status_type not in (wip_constants.unreleased,

Line 1347: WIP_CONSTANTS.HOLD))

1343: and ( (wjsi.load_type in (WIP_CONSTANTS.CREATE_NS_JOB,
1344: WIP_CONSTANTS.CREATE_JOB) and
1345: wjsi.status_type not in (WIP_CONSTANTS.UNRELEASED,
1346: WIP_CONSTANTS.RELEASED,
1347: WIP_CONSTANTS.HOLD))
1348: or (wjsi.load_type = wip_constants.resched_job and
1349: wjsi.status_type is not null and
1350: wjsi.status_type not in (wip_constants.unreleased,
1351: wip_constants.released,

Line 1348: or (wjsi.load_type = wip_constants.resched_job and

1344: WIP_CONSTANTS.CREATE_JOB) and
1345: wjsi.status_type not in (WIP_CONSTANTS.UNRELEASED,
1346: WIP_CONSTANTS.RELEASED,
1347: WIP_CONSTANTS.HOLD))
1348: or (wjsi.load_type = wip_constants.resched_job and
1349: wjsi.status_type is not null and
1350: wjsi.status_type not in (wip_constants.unreleased,
1351: wip_constants.released,
1352: wip_constants.comp_chrg,

Line 1350: wjsi.status_type not in (wip_constants.unreleased,

1346: WIP_CONSTANTS.RELEASED,
1347: WIP_CONSTANTS.HOLD))
1348: or (wjsi.load_type = wip_constants.resched_job and
1349: wjsi.status_type is not null and
1350: wjsi.status_type not in (wip_constants.unreleased,
1351: wip_constants.released,
1352: wip_constants.comp_chrg,
1353: wip_constants.hold,
1354: wip_constants.cancelled)) )

Line 1351: wip_constants.released,

1347: WIP_CONSTANTS.HOLD))
1348: or (wjsi.load_type = wip_constants.resched_job and
1349: wjsi.status_type is not null and
1350: wjsi.status_type not in (wip_constants.unreleased,
1351: wip_constants.released,
1352: wip_constants.comp_chrg,
1353: wip_constants.hold,
1354: wip_constants.cancelled)) )
1355: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 1352: wip_constants.comp_chrg,

1348: or (wjsi.load_type = wip_constants.resched_job and
1349: wjsi.status_type is not null and
1350: wjsi.status_type not in (wip_constants.unreleased,
1351: wip_constants.released,
1352: wip_constants.comp_chrg,
1353: wip_constants.hold,
1354: wip_constants.cancelled)) )
1355: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1356:

Line 1353: wip_constants.hold,

1349: wjsi.status_type is not null and
1350: wjsi.status_type not in (wip_constants.unreleased,
1351: wip_constants.released,
1352: wip_constants.comp_chrg,
1353: wip_constants.hold,
1354: wip_constants.cancelled)) )
1355: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1356:
1357: if ( sql%rowcount > 0 ) then

Line 1354: wip_constants.cancelled)) )

1350: wjsi.status_type not in (wip_constants.unreleased,
1351: wip_constants.released,
1352: wip_constants.comp_chrg,
1353: wip_constants.hold,
1354: wip_constants.cancelled)) )
1355: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1356:
1357: if ( sql%rowcount > 0 ) then
1358: fnd_message.set_name('WIP', 'WIP_ML_STATUS_TYPE');

Line 1362: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/

1358: fnd_message.set_name('WIP', 'WIP_ML_STATUS_TYPE');
1359: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
1360: end if;
1361:
1362: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
1363:
1364:
1365:
1366: --

Line 1371: set wjsi.process_status = WIP_CONSTANTS.WARNING,

1367: -- default and validate routing_reference and routing_reference_id
1368: --
1369: /* Modified for bug 5479283. while re-scheduling non-std job we do consider reference fields. */
1370: update wip_job_schedule_interface wjsi
1371: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1372: wjsi.last_update_date = sysdate
1373: where wjsi.group_id = p_groupID
1374: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1375: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1374: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1370: update wip_job_schedule_interface wjsi
1371: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1372: wjsi.last_update_date = sysdate
1373: where wjsi.group_id = p_groupID
1374: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1375: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1376: and ( wjsi.load_type in (wip_constants.create_job,
1377: wip_constants.create_sched,
1378: wip_constants.resched_job)

Line 1375: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1371: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1372: wjsi.last_update_date = sysdate
1373: where wjsi.group_id = p_groupID
1374: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1375: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1376: and ( wjsi.load_type in (wip_constants.create_job,
1377: wip_constants.create_sched,
1378: wip_constants.resched_job)
1379: or (wjsi.load_type = wip_constants.create_ns_job and

Line 1376: and ( wjsi.load_type in (wip_constants.create_job,

1372: wjsi.last_update_date = sysdate
1373: where wjsi.group_id = p_groupID
1374: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1375: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1376: and ( wjsi.load_type in (wip_constants.create_job,
1377: wip_constants.create_sched,
1378: wip_constants.resched_job)
1379: or (wjsi.load_type = wip_constants.create_ns_job and
1380: wjsi.routing_reference_id is not null) )

Line 1377: wip_constants.create_sched,

1373: where wjsi.group_id = p_groupID
1374: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1375: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1376: and ( wjsi.load_type in (wip_constants.create_job,
1377: wip_constants.create_sched,
1378: wip_constants.resched_job)
1379: or (wjsi.load_type = wip_constants.create_ns_job and
1380: wjsi.routing_reference_id is not null) )
1381: and wjsi.routing_reference_segments is not null

Line 1378: wip_constants.resched_job)

1374: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1375: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1376: and ( wjsi.load_type in (wip_constants.create_job,
1377: wip_constants.create_sched,
1378: wip_constants.resched_job)
1379: or (wjsi.load_type = wip_constants.create_ns_job and
1380: wjsi.routing_reference_id is not null) )
1381: and wjsi.routing_reference_segments is not null
1382: and WIP_CONSTANTS.NONSTANDARD <> (select wdj.job_type

Line 1379: or (wjsi.load_type = wip_constants.create_ns_job and

1375: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1376: and ( wjsi.load_type in (wip_constants.create_job,
1377: wip_constants.create_sched,
1378: wip_constants.resched_job)
1379: or (wjsi.load_type = wip_constants.create_ns_job and
1380: wjsi.routing_reference_id is not null) )
1381: and wjsi.routing_reference_segments is not null
1382: and WIP_CONSTANTS.NONSTANDARD <> (select wdj.job_type
1383: from wip_discrete_jobs wdj

Line 1382: and WIP_CONSTANTS.NONSTANDARD <> (select wdj.job_type

1378: wip_constants.resched_job)
1379: or (wjsi.load_type = wip_constants.create_ns_job and
1380: wjsi.routing_reference_id is not null) )
1381: and wjsi.routing_reference_segments is not null
1382: and WIP_CONSTANTS.NONSTANDARD <> (select wdj.job_type
1383: from wip_discrete_jobs wdj
1384: where wdj.wip_entity_id = wjsi.wip_entity_id
1385: and wdj.organization_id = wjsi.organization_id)
1386: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 1395: set wjsi.process_status = WIP_CONSTANTS.WARNING,

1391: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationWarning);
1392: end if;
1393: /* Modified for bug 5479283. while re-scheduling non-std job we do consider reference fields. */
1394: update wip_job_schedule_interface wjsi
1395: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1396: wjsi.last_update_date = sysdate
1397: where wjsi.group_id = p_groupID
1398: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1399: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1398: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1394: update wip_job_schedule_interface wjsi
1395: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1396: wjsi.last_update_date = sysdate
1397: where wjsi.group_id = p_groupID
1398: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1399: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1400: and wjsi.load_type in (wip_constants.create_job,
1401: wip_constants.create_sched,
1402: wip_constants.resched_job)

Line 1399: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1395: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1396: wjsi.last_update_date = sysdate
1397: where wjsi.group_id = p_groupID
1398: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1399: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1400: and wjsi.load_type in (wip_constants.create_job,
1401: wip_constants.create_sched,
1402: wip_constants.resched_job)
1403: and wjsi.routing_reference_id is not null

Line 1400: and wjsi.load_type in (wip_constants.create_job,

1396: wjsi.last_update_date = sysdate
1397: where wjsi.group_id = p_groupID
1398: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1399: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1400: and wjsi.load_type in (wip_constants.create_job,
1401: wip_constants.create_sched,
1402: wip_constants.resched_job)
1403: and wjsi.routing_reference_id is not null
1404: and WIP_CONSTANTS.NONSTANDARD <> (select wdj.job_type

Line 1401: wip_constants.create_sched,

1397: where wjsi.group_id = p_groupID
1398: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1399: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1400: and wjsi.load_type in (wip_constants.create_job,
1401: wip_constants.create_sched,
1402: wip_constants.resched_job)
1403: and wjsi.routing_reference_id is not null
1404: and WIP_CONSTANTS.NONSTANDARD <> (select wdj.job_type
1405: from wip_discrete_jobs wdj

Line 1402: wip_constants.resched_job)

1398: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1399: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1400: and wjsi.load_type in (wip_constants.create_job,
1401: wip_constants.create_sched,
1402: wip_constants.resched_job)
1403: and wjsi.routing_reference_id is not null
1404: and WIP_CONSTANTS.NONSTANDARD <> (select wdj.job_type
1405: from wip_discrete_jobs wdj
1406: where wdj.wip_entity_id = wjsi.wip_entity_id

Line 1404: and WIP_CONSTANTS.NONSTANDARD <> (select wdj.job_type

1400: and wjsi.load_type in (wip_constants.create_job,
1401: wip_constants.create_sched,
1402: wip_constants.resched_job)
1403: and wjsi.routing_reference_id is not null
1404: and WIP_CONSTANTS.NONSTANDARD <> (select wdj.job_type
1405: from wip_discrete_jobs wdj
1406: where wdj.wip_entity_id = wjsi.wip_entity_id
1407: and wdj.organization_id = wjsi.organization_id)
1408: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 1416: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

1412: fnd_message.set_token('COLUMN', 'ROUTING_REFERENCE_ID', false);
1413: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationWarning);
1414: end if;
1415:
1416: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1417: /* Modified for bug 5479283. Validation should happen while re-scheduling non-std job */
1418: update wip_job_schedule_interface wjsi
1419: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1420: wjsi.last_update_date = sysdate

Line 1419: set wjsi.process_status = WIP_CONSTANTS.ERROR,

1415:
1416: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1417: /* Modified for bug 5479283. Validation should happen while re-scheduling non-std job */
1418: update wip_job_schedule_interface wjsi
1419: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1420: wjsi.last_update_date = sysdate
1421: where wjsi.group_id = p_groupID
1422: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1423: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1422: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1418: update wip_job_schedule_interface wjsi
1419: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1420: wjsi.last_update_date = sysdate
1421: where wjsi.group_id = p_groupID
1422: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1423: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1424: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1425: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB
1426: and WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type

Line 1423: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1419: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1420: wjsi.last_update_date = sysdate
1421: where wjsi.group_id = p_groupID
1422: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1423: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1424: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1425: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB
1426: and WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1427: from wip_discrete_jobs wdj

Line 1424: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB

1420: wjsi.last_update_date = sysdate
1421: where wjsi.group_id = p_groupID
1422: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1423: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1424: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1425: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB
1426: and WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1427: from wip_discrete_jobs wdj
1428: where wdj.wip_entity_id = wjsi.wip_entity_id

Line 1425: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB

1421: where wjsi.group_id = p_groupID
1422: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1423: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1424: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1425: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB
1426: and WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1427: from wip_discrete_jobs wdj
1428: where wdj.wip_entity_id = wjsi.wip_entity_id
1429: and wdj.organization_id = wjsi.organization_id)))

Line 1426: and WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type

1422: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1423: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1424: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1425: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB
1426: and WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1427: from wip_discrete_jobs wdj
1428: where wdj.wip_entity_id = wjsi.wip_entity_id
1429: and wdj.organization_id = wjsi.organization_id)))
1430: and wjsi.routing_reference_segments is not null

Line 1443: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/

1439: fnd_message.set_name('WIP', 'WIP_ML_FIELD_INVALID');
1440: fnd_message.set_token('COLUMN', 'ROUTING_REFERENCE_SEGMENTS', false);
1441: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
1442: end if;
1443: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
1444: /* Modified for bug 5479283. When Null is passed for routing reference, old value is maintained. */
1445: update wip_job_schedule_interface wjsi
1446: set routing_reference_id = decode(wjsi.routing_reference_segments,null,(select wdj.routing_reference_id
1447: from wip_discrete_jobs wdj

Line 1456: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1452: where msik.organization_id = wjsi.organization_id
1453: and msik.concatenated_segments = wjsi.routing_reference_segments)),
1454: wjsi.last_update_date = sysdate
1455: where wjsi.group_id = p_groupID
1456: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1457: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1458: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1459: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1460: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type

Line 1457: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1453: and msik.concatenated_segments = wjsi.routing_reference_segments)),
1454: wjsi.last_update_date = sysdate
1455: where wjsi.group_id = p_groupID
1456: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1457: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1458: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1459: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1460: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1461: from wip_discrete_jobs wdj

Line 1458: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB

1454: wjsi.last_update_date = sysdate
1455: where wjsi.group_id = p_groupID
1456: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1457: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1458: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1459: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1460: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1461: from wip_discrete_jobs wdj
1462: where wdj.wip_entity_id = wjsi.wip_entity_id

Line 1459: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and

1455: where wjsi.group_id = p_groupID
1456: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1457: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1458: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1459: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1460: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1461: from wip_discrete_jobs wdj
1462: where wdj.wip_entity_id = wjsi.wip_entity_id
1463: and wdj.organization_id = wjsi.organization_id)))

Line 1460: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type

1456: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1457: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1458: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1459: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1460: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1461: from wip_discrete_jobs wdj
1462: where wdj.wip_entity_id = wjsi.wip_entity_id
1463: and wdj.organization_id = wjsi.organization_id)))
1464: --and wjsi.routing_reference_segments is not null

Line 1467: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

1463: and wdj.organization_id = wjsi.organization_id)))
1464: --and wjsi.routing_reference_segments is not null
1465: and wjsi.routing_reference_id is null ;
1466:
1467: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1468: /*Modified for bug 5479283. Validation should happen while re-scheduling non-std job */
1469: update wip_job_schedule_interface wjsi
1470: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1471: wjsi.last_update_date = sysdate

Line 1470: set wjsi.process_status = WIP_CONSTANTS.ERROR,

1466:
1467: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1468: /*Modified for bug 5479283. Validation should happen while re-scheduling non-std job */
1469: update wip_job_schedule_interface wjsi
1470: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1471: wjsi.last_update_date = sysdate
1472: where wjsi.group_id = p_groupID
1473: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1474: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1473: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1469: update wip_job_schedule_interface wjsi
1470: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1471: wjsi.last_update_date = sysdate
1472: where wjsi.group_id = p_groupID
1473: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1474: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1475: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1476: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1477: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type

Line 1474: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1470: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1471: wjsi.last_update_date = sysdate
1472: where wjsi.group_id = p_groupID
1473: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1474: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1475: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1476: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1477: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1478: from wip_discrete_jobs wdj

Line 1475: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB

1471: wjsi.last_update_date = sysdate
1472: where wjsi.group_id = p_groupID
1473: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1474: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1475: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1476: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1477: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1478: from wip_discrete_jobs wdj
1479: where wdj.wip_entity_id = wjsi.wip_entity_id

Line 1476: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and

1472: where wjsi.group_id = p_groupID
1473: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1474: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1475: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1476: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1477: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1478: from wip_discrete_jobs wdj
1479: where wdj.wip_entity_id = wjsi.wip_entity_id
1480: and wdj.organization_id = wjsi.organization_id)))

Line 1477: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type

1473: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1474: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1475: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1476: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1477: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1478: from wip_discrete_jobs wdj
1479: where wdj.wip_entity_id = wjsi.wip_entity_id
1480: and wdj.organization_id = wjsi.organization_id)))
1481: and wjsi.routing_reference_id is not null

Line 1495: set wjsi.process_status = WIP_CONSTANTS.ERROR,

1491: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
1492: end if;
1493: /*Modified for bug 5479283. Validation should happen while re-scheduling non-std job */
1494: update wip_job_schedule_interface wjsi
1495: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1496: wjsi.last_update_date = sysdate
1497: where wjsi.group_id = p_groupID
1498: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1499: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1498: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1494: update wip_job_schedule_interface wjsi
1495: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1496: wjsi.last_update_date = sysdate
1497: where wjsi.group_id = p_groupID
1498: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1499: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1500: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1501: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1502: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type

Line 1499: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1495: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1496: wjsi.last_update_date = sysdate
1497: where wjsi.group_id = p_groupID
1498: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1499: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1500: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1501: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1502: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1503: from wip_discrete_jobs wdj

Line 1500: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB

1496: wjsi.last_update_date = sysdate
1497: where wjsi.group_id = p_groupID
1498: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1499: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1500: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1501: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1502: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1503: from wip_discrete_jobs wdj
1504: where wdj.wip_entity_id = wjsi.wip_entity_id

Line 1501: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and

1497: where wjsi.group_id = p_groupID
1498: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1499: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1500: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1501: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1502: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1503: from wip_discrete_jobs wdj
1504: where wdj.wip_entity_id = wjsi.wip_entity_id
1505: and wdj.organization_id = wjsi.organization_id)))

Line 1502: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type

1498: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1499: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1500: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1501: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1502: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1503: from wip_discrete_jobs wdj
1504: where wdj.wip_entity_id = wjsi.wip_entity_id
1505: and wdj.organization_id = wjsi.organization_id)))
1506: and wjsi.routing_reference_id is not null

Line 1515: (l_see_eng_items_flag = wip_constants.no and

1511: 'N' <> (select msi.pick_components_flag
1512: from mtl_system_items msi
1513: where msi.organization_id = wjsi.organization_id
1514: and msi.inventory_item_id = wjsi.routing_reference_id) or
1515: (l_see_eng_items_flag = wip_constants.no and
1516: 'Y' = (select msi.eng_item_flag
1517: from mtl_system_items msi
1518: where msi.organization_id = wjsi.organization_id
1519: and msi.inventory_item_id = wjsi.routing_reference_id)))

Line 1526: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/

1522: if ( sql%rowcount > 0 ) then
1523: fnd_message.set_name('WIP', 'WIP_ML_ROUTING_REFERENCE_ID');
1524: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
1525: end if;
1526: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
1527:
1528:
1529: --
1530: -- default and validate alternate_routing_designator

Line 1533: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

1529: --
1530: -- default and validate alternate_routing_designator
1531: --
1532:
1533: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1534:
1535: /*Modified for bug 5479283. When Null is passed for alt routing designator, old value is maintained.
1536: When g_miss_char is passed for alt routing designator, updated to primary routing/bom.*/
1537: update wip_job_schedule_interface wjsi

Line 1538: set wjsi.process_status = WIP_CONSTANTS.ERROR,

1534:
1535: /*Modified for bug 5479283. When Null is passed for alt routing designator, old value is maintained.
1536: When g_miss_char is passed for alt routing designator, updated to primary routing/bom.*/
1537: update wip_job_schedule_interface wjsi
1538: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1539: wjsi.last_update_date = sysdate
1540: where wjsi.group_id = p_groupID
1541: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1542: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1541: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1537: update wip_job_schedule_interface wjsi
1538: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1539: wjsi.last_update_date = sysdate
1540: where wjsi.group_id = p_groupID
1541: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1542: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1543: and wjsi.alternate_routing_designator <> fnd_api.g_miss_char
1544: and ( (wjsi.alternate_routing_designator is not null
1545: and not exists (select 1

Line 1542: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1538: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1539: wjsi.last_update_date = sysdate
1540: where wjsi.group_id = p_groupID
1541: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1542: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1543: and wjsi.alternate_routing_designator <> fnd_api.g_miss_char
1544: and ( (wjsi.alternate_routing_designator is not null
1545: and not exists (select 1
1546: from bom_operational_routings bor

Line 1550: wip_constants.create_ns_job, wjsi.routing_reference_id,

1546: from bom_operational_routings bor
1547: where bor.alternate_routing_designator = wjsi.alternate_routing_designator
1548: and bor.organization_id = wjsi.organization_id
1549: and bor.assembly_item_id = decode(wjsi.load_type,
1550: wip_constants.create_ns_job, wjsi.routing_reference_id,
1551: wip_constants.resched_job, decode((select wdj.job_type
1552: from wip_discrete_jobs wdj
1553: where wdj.organization_id = wjsi.organization_id
1554: and wdj.wip_entity_id = wjsi.wip_entity_id),

Line 1551: wip_constants.resched_job, decode((select wdj.job_type

1547: where bor.alternate_routing_designator = wjsi.alternate_routing_designator
1548: and bor.organization_id = wjsi.organization_id
1549: and bor.assembly_item_id = decode(wjsi.load_type,
1550: wip_constants.create_ns_job, wjsi.routing_reference_id,
1551: wip_constants.resched_job, decode((select wdj.job_type
1552: from wip_discrete_jobs wdj
1553: where wdj.organization_id = wjsi.organization_id
1554: and wdj.wip_entity_id = wjsi.wip_entity_id),
1555: 1, wjsi.primary_item_id, wjsi.routing_reference_id),

Line 1561: and wjsi.load_type in (wip_constants.create_job,

1557: and nvl(bor.cfm_routing_flag, 2) = 2
1558: and (bor.routing_type = 1 or (bor.routing_type = 2 and 1 = to_number(l_see_eng_items_flag))) ))
1559: /* bug 4227345 */
1560: or (wjsi.alternate_routing_designator = fnd_api.g_miss_char
1561: and wjsi.load_type in (wip_constants.create_job,
1562: wip_constants.create_ns_job,
1563: wip_constants.create_sched)))
1564: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1565: if ( sql%rowcount > 0 ) then

Line 1562: wip_constants.create_ns_job,

1558: and (bor.routing_type = 1 or (bor.routing_type = 2 and 1 = to_number(l_see_eng_items_flag))) ))
1559: /* bug 4227345 */
1560: or (wjsi.alternate_routing_designator = fnd_api.g_miss_char
1561: and wjsi.load_type in (wip_constants.create_job,
1562: wip_constants.create_ns_job,
1563: wip_constants.create_sched)))
1564: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1565: if ( sql%rowcount > 0 ) then
1566: fnd_message.set_name('WIP', 'WIP_ML_ALTERNATE_ROUTING');

Line 1563: wip_constants.create_sched)))

1559: /* bug 4227345 */
1560: or (wjsi.alternate_routing_designator = fnd_api.g_miss_char
1561: and wjsi.load_type in (wip_constants.create_job,
1562: wip_constants.create_ns_job,
1563: wip_constants.create_sched)))
1564: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1565: if ( sql%rowcount > 0 ) then
1566: fnd_message.set_name('WIP', 'WIP_ML_ALTERNATE_ROUTING');
1567: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);

Line 1569: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/

1565: if ( sql%rowcount > 0 ) then
1566: fnd_message.set_name('WIP', 'WIP_ML_ALTERNATE_ROUTING');
1567: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
1568: end if;
1569: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
1570:
1571: /*Modified for bug 5479283. When Null is passed for alt routing designator, old value is maintained.
1572: When g_miss_char is passed for alt routing designator, updated to primary routing/bom.*/
1573: update wip_job_schedule_interface wjsi

Line 1580: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1576: where wdj.organization_id = wjsi.organization_id
1577: and wdj.wip_entity_id = wjsi.wip_entity_id),wjsi.alternate_routing_designator),
1578: wjsi.last_update_date = sysdate
1579: where wjsi.group_id = p_groupID
1580: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1581: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1582: and wjsi.load_type = wip_constants.resched_job
1583: and (wjsi.alternate_routing_designator is null
1584: or wjsi.alternate_routing_designator = fnd_api.g_miss_char);

Line 1581: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1577: and wdj.wip_entity_id = wjsi.wip_entity_id),wjsi.alternate_routing_designator),
1578: wjsi.last_update_date = sysdate
1579: where wjsi.group_id = p_groupID
1580: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1581: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1582: and wjsi.load_type = wip_constants.resched_job
1583: and (wjsi.alternate_routing_designator is null
1584: or wjsi.alternate_routing_designator = fnd_api.g_miss_char);
1585:

Line 1582: and wjsi.load_type = wip_constants.resched_job

1578: wjsi.last_update_date = sysdate
1579: where wjsi.group_id = p_groupID
1580: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1581: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1582: and wjsi.load_type = wip_constants.resched_job
1583: and (wjsi.alternate_routing_designator is null
1584: or wjsi.alternate_routing_designator = fnd_api.g_miss_char);
1585:
1586:

Line 1587: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

1583: and (wjsi.alternate_routing_designator is null
1584: or wjsi.alternate_routing_designator = fnd_api.g_miss_char);
1585:
1586:
1587: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1588:
1589: -- you can not change the routing designator for jobs not in unreleased status
1590: update wip_job_schedule_interface wjsi
1591: set wjsi.process_status = WIP_CONSTANTS.ERROR,

Line 1591: set wjsi.process_status = WIP_CONSTANTS.ERROR,

1587: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1588:
1589: -- you can not change the routing designator for jobs not in unreleased status
1590: update wip_job_schedule_interface wjsi
1591: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1592: wjsi.last_update_date = sysdate
1593: where wjsi.group_id = p_groupID
1594: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1595: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1594: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1590: update wip_job_schedule_interface wjsi
1591: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1592: wjsi.last_update_date = sysdate
1593: where wjsi.group_id = p_groupID
1594: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1595: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1596: and wjsi.load_type = wip_constants.resched_job
1597: and nvl(wjsi.alternate_routing_designator, '@@-@@@') <>
1598: nvl( (select wdj.alternate_routing_designator

Line 1595: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1591: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1592: wjsi.last_update_date = sysdate
1593: where wjsi.group_id = p_groupID
1594: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1595: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1596: and wjsi.load_type = wip_constants.resched_job
1597: and nvl(wjsi.alternate_routing_designator, '@@-@@@') <>
1598: nvl( (select wdj.alternate_routing_designator
1599: from wip_discrete_jobs wdj

Line 1596: and wjsi.load_type = wip_constants.resched_job

1592: wjsi.last_update_date = sysdate
1593: where wjsi.group_id = p_groupID
1594: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1595: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1596: and wjsi.load_type = wip_constants.resched_job
1597: and nvl(wjsi.alternate_routing_designator, '@@-@@@') <>
1598: nvl( (select wdj.alternate_routing_designator
1599: from wip_discrete_jobs wdj
1600: where wdj.organization_id = wjsi.organization_id

Line 1612: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/

1608: if ( sql%rowcount > 0 ) then
1609: fnd_message.set_name('WIP', 'WIP_ALTERNATE_ROUTING_NOCHANGE');
1610: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
1611: end if;
1612: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
1613:
1614: --
1615: -- default routing_revision and routing_revision_date
1616: --

Line 1618: set wjsi.process_status = WIP_CONSTANTS.WARNING,

1614: --
1615: -- default routing_revision and routing_revision_date
1616: --
1617: update wip_job_schedule_interface wjsi
1618: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1619: wjsi.last_update_date = sysdate
1620: where wjsi.group_id = p_groupID
1621: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1622: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1621: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1617: update wip_job_schedule_interface wjsi
1618: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1619: wjsi.last_update_date = sysdate
1620: where wjsi.group_id = p_groupID
1621: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1622: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1623: and wjsi.load_type = wip_constants.create_sched
1624: and wjsi.routing_revision_date is not null
1625: and wjsi.routing_revision is not null

Line 1622: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1618: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1619: wjsi.last_update_date = sysdate
1620: where wjsi.group_id = p_groupID
1621: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1622: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1623: and wjsi.load_type = wip_constants.create_sched
1624: and wjsi.routing_revision_date is not null
1625: and wjsi.routing_revision is not null
1626: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 1623: and wjsi.load_type = wip_constants.create_sched

1619: wjsi.last_update_date = sysdate
1620: where wjsi.group_id = p_groupID
1621: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1622: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1623: and wjsi.load_type = wip_constants.create_sched
1624: and wjsi.routing_revision_date is not null
1625: and wjsi.routing_revision is not null
1626: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1627:

Line 1642: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1638: where wdj.organization_id = wjsi.organization_id
1639: and wdj.wip_entity_id = wjsi.wip_entity_id),
1640: wjsi.last_update_date = sysdate
1641: where wjsi.group_id = p_groupID
1642: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1643: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1644: and wjsi.load_type = wip_constants.resched_job
1645: and (wjsi.bom_revision = fnd_api.g_miss_char
1646: or wjsi.bom_revision is null);

Line 1643: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1639: and wdj.wip_entity_id = wjsi.wip_entity_id),
1640: wjsi.last_update_date = sysdate
1641: where wjsi.group_id = p_groupID
1642: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1643: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1644: and wjsi.load_type = wip_constants.resched_job
1645: and (wjsi.bom_revision = fnd_api.g_miss_char
1646: or wjsi.bom_revision is null);
1647:

Line 1644: and wjsi.load_type = wip_constants.resched_job

1640: wjsi.last_update_date = sysdate
1641: where wjsi.group_id = p_groupID
1642: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1643: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1644: and wjsi.load_type = wip_constants.resched_job
1645: and (wjsi.bom_revision = fnd_api.g_miss_char
1646: or wjsi.bom_revision is null);
1647:
1648: update wip_job_schedule_interface wjsi

Line 1649: set wjsi.process_status = WIP_CONSTANTS.ERROR,

1645: and (wjsi.bom_revision = fnd_api.g_miss_char
1646: or wjsi.bom_revision is null);
1647:
1648: update wip_job_schedule_interface wjsi
1649: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1650: wjsi.last_update_date = sysdate
1651: where wjsi.group_id = p_groupID
1652: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1653: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1652: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1648: update wip_job_schedule_interface wjsi
1649: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1650: wjsi.last_update_date = sysdate
1651: where wjsi.group_id = p_groupID
1652: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1653: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1654: and wjsi.load_type = wip_constants.resched_job
1655: and nvl(wjsi.routing_revision, '@@-@@@') <>
1656: nvl( (select wdj.routing_revision

Line 1653: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1649: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1650: wjsi.last_update_date = sysdate
1651: where wjsi.group_id = p_groupID
1652: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1653: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1654: and wjsi.load_type = wip_constants.resched_job
1655: and nvl(wjsi.routing_revision, '@@-@@@') <>
1656: nvl( (select wdj.routing_revision
1657: from wip_discrete_jobs wdj

Line 1654: and wjsi.load_type = wip_constants.resched_job

1650: wjsi.last_update_date = sysdate
1651: where wjsi.group_id = p_groupID
1652: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1653: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1654: and wjsi.load_type = wip_constants.resched_job
1655: and nvl(wjsi.routing_revision, '@@-@@@') <>
1656: nvl( (select wdj.routing_revision
1657: from wip_discrete_jobs wdj
1658: where wdj.organization_id = wjsi.organization_id

Line 1678: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1674: where wdj.organization_id = wjsi.organization_id
1675: and wdj.wip_entity_id = wjsi.wip_entity_id),
1676: wjsi.last_update_date = sysdate
1677: where wjsi.group_id = p_groupID
1678: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1679: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1680: and wjsi.load_type = wip_constants.resched_job
1681: and ( wjsi.routing_revision_date is null
1682: or wjsi.routing_revision_date = fnd_api.g_miss_date);

Line 1679: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1675: and wdj.wip_entity_id = wjsi.wip_entity_id),
1676: wjsi.last_update_date = sysdate
1677: where wjsi.group_id = p_groupID
1678: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1679: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1680: and wjsi.load_type = wip_constants.resched_job
1681: and ( wjsi.routing_revision_date is null
1682: or wjsi.routing_revision_date = fnd_api.g_miss_date);
1683:

Line 1680: and wjsi.load_type = wip_constants.resched_job

1676: wjsi.last_update_date = sysdate
1677: where wjsi.group_id = p_groupID
1678: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1679: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1680: and wjsi.load_type = wip_constants.resched_job
1681: and ( wjsi.routing_revision_date is null
1682: or wjsi.routing_revision_date = fnd_api.g_miss_date);
1683:
1684: update wip_job_schedule_interface wjsi

Line 1685: set wjsi.process_status = WIP_CONSTANTS.ERROR,

1681: and ( wjsi.routing_revision_date is null
1682: or wjsi.routing_revision_date = fnd_api.g_miss_date);
1683:
1684: update wip_job_schedule_interface wjsi
1685: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1686: wjsi.last_update_date = sysdate
1687: where wjsi.group_id = p_groupID
1688: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1689: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1688: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1684: update wip_job_schedule_interface wjsi
1685: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1686: wjsi.last_update_date = sysdate
1687: where wjsi.group_id = p_groupID
1688: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1689: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1690: and wjsi.load_type = wip_constants.resched_job
1691: and nvl(wjsi.routing_revision_date, fnd_api.g_miss_date) <>
1692: nvl((select wdj.routing_revision_date

Line 1689: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1685: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1686: wjsi.last_update_date = sysdate
1687: where wjsi.group_id = p_groupID
1688: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1689: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1690: and wjsi.load_type = wip_constants.resched_job
1691: and nvl(wjsi.routing_revision_date, fnd_api.g_miss_date) <>
1692: nvl((select wdj.routing_revision_date
1693: from wip_discrete_jobs wdj

Line 1690: and wjsi.load_type = wip_constants.resched_job

1686: wjsi.last_update_date = sysdate
1687: where wjsi.group_id = p_groupID
1688: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1689: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1690: and wjsi.load_type = wip_constants.resched_job
1691: and nvl(wjsi.routing_revision_date, fnd_api.g_miss_date) <>
1692: nvl((select wdj.routing_revision_date
1693: from wip_discrete_jobs wdj
1694: where wdj.organization_id = wjsi.organization_id

Line 1712: set wjsi.process_status = WIP_CONSTANTS.WARNING,

1708: -- default and validate bom_reference and bom_reference_id
1709: --
1710: /* Modified for bug 5479283. while re-scheduling non-std job we do consider reference fields. */
1711: update wip_job_schedule_interface wjsi
1712: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1713: wjsi.last_update_date = sysdate
1714: where wjsi.group_id = p_groupID
1715: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1716: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1715: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1711: update wip_job_schedule_interface wjsi
1712: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1713: wjsi.last_update_date = sysdate
1714: where wjsi.group_id = p_groupID
1715: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1716: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1717: and ( wjsi.load_type in (wip_constants.create_job,
1718: wip_constants.create_sched,
1719: wip_constants.resched_job)

Line 1716: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1712: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1713: wjsi.last_update_date = sysdate
1714: where wjsi.group_id = p_groupID
1715: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1716: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1717: and ( wjsi.load_type in (wip_constants.create_job,
1718: wip_constants.create_sched,
1719: wip_constants.resched_job)
1720: or (wjsi.load_type = wip_constants.create_ns_job and

Line 1717: and ( wjsi.load_type in (wip_constants.create_job,

1713: wjsi.last_update_date = sysdate
1714: where wjsi.group_id = p_groupID
1715: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1716: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1717: and ( wjsi.load_type in (wip_constants.create_job,
1718: wip_constants.create_sched,
1719: wip_constants.resched_job)
1720: or (wjsi.load_type = wip_constants.create_ns_job and
1721: wjsi.bom_reference_id is not null) )

Line 1718: wip_constants.create_sched,

1714: where wjsi.group_id = p_groupID
1715: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1716: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1717: and ( wjsi.load_type in (wip_constants.create_job,
1718: wip_constants.create_sched,
1719: wip_constants.resched_job)
1720: or (wjsi.load_type = wip_constants.create_ns_job and
1721: wjsi.bom_reference_id is not null) )
1722: and wjsi.bom_reference_segments is not null

Line 1719: wip_constants.resched_job)

1715: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1716: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1717: and ( wjsi.load_type in (wip_constants.create_job,
1718: wip_constants.create_sched,
1719: wip_constants.resched_job)
1720: or (wjsi.load_type = wip_constants.create_ns_job and
1721: wjsi.bom_reference_id is not null) )
1722: and wjsi.bom_reference_segments is not null
1723: and WIP_CONSTANTS.NONSTANDARD <> (select wdj.job_type

Line 1720: or (wjsi.load_type = wip_constants.create_ns_job and

1716: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1717: and ( wjsi.load_type in (wip_constants.create_job,
1718: wip_constants.create_sched,
1719: wip_constants.resched_job)
1720: or (wjsi.load_type = wip_constants.create_ns_job and
1721: wjsi.bom_reference_id is not null) )
1722: and wjsi.bom_reference_segments is not null
1723: and WIP_CONSTANTS.NONSTANDARD <> (select wdj.job_type
1724: from wip_discrete_jobs wdj

Line 1723: and WIP_CONSTANTS.NONSTANDARD <> (select wdj.job_type

1719: wip_constants.resched_job)
1720: or (wjsi.load_type = wip_constants.create_ns_job and
1721: wjsi.bom_reference_id is not null) )
1722: and wjsi.bom_reference_segments is not null
1723: and WIP_CONSTANTS.NONSTANDARD <> (select wdj.job_type
1724: from wip_discrete_jobs wdj
1725: where wdj.wip_entity_id = wjsi.wip_entity_id
1726: and wdj.organization_id = wjsi.organization_id)
1727: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 1736: set wjsi.process_status = WIP_CONSTANTS.WARNING,

1732: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationWarning);
1733: end if;
1734: /* Modified for bug 5479283. while re-scheduling non-std job we do consider reference fields. */
1735: update wip_job_schedule_interface wjsi
1736: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1737: wjsi.last_update_date = sysdate
1738: where wjsi.group_id = p_groupID
1739: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1740: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1739: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1735: update wip_job_schedule_interface wjsi
1736: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1737: wjsi.last_update_date = sysdate
1738: where wjsi.group_id = p_groupID
1739: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1740: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1741: and wjsi.load_type in (wip_constants.create_job,
1742: wip_constants.create_sched,
1743: wip_constants.resched_job)

Line 1740: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1736: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1737: wjsi.last_update_date = sysdate
1738: where wjsi.group_id = p_groupID
1739: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1740: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1741: and wjsi.load_type in (wip_constants.create_job,
1742: wip_constants.create_sched,
1743: wip_constants.resched_job)
1744: and wjsi.bom_reference_id is not null

Line 1741: and wjsi.load_type in (wip_constants.create_job,

1737: wjsi.last_update_date = sysdate
1738: where wjsi.group_id = p_groupID
1739: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1740: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1741: and wjsi.load_type in (wip_constants.create_job,
1742: wip_constants.create_sched,
1743: wip_constants.resched_job)
1744: and wjsi.bom_reference_id is not null
1745: and WIP_CONSTANTS.NONSTANDARD <> (select wdj.job_type

Line 1742: wip_constants.create_sched,

1738: where wjsi.group_id = p_groupID
1739: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1740: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1741: and wjsi.load_type in (wip_constants.create_job,
1742: wip_constants.create_sched,
1743: wip_constants.resched_job)
1744: and wjsi.bom_reference_id is not null
1745: and WIP_CONSTANTS.NONSTANDARD <> (select wdj.job_type
1746: from wip_discrete_jobs wdj

Line 1743: wip_constants.resched_job)

1739: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1740: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1741: and wjsi.load_type in (wip_constants.create_job,
1742: wip_constants.create_sched,
1743: wip_constants.resched_job)
1744: and wjsi.bom_reference_id is not null
1745: and WIP_CONSTANTS.NONSTANDARD <> (select wdj.job_type
1746: from wip_discrete_jobs wdj
1747: where wdj.wip_entity_id = wjsi.wip_entity_id

Line 1745: and WIP_CONSTANTS.NONSTANDARD <> (select wdj.job_type

1741: and wjsi.load_type in (wip_constants.create_job,
1742: wip_constants.create_sched,
1743: wip_constants.resched_job)
1744: and wjsi.bom_reference_id is not null
1745: and WIP_CONSTANTS.NONSTANDARD <> (select wdj.job_type
1746: from wip_discrete_jobs wdj
1747: where wdj.wip_entity_id = wjsi.wip_entity_id
1748: and wdj.organization_id = wjsi.organization_id)
1749: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 1758: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

1754: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationWarning);
1755: end if;
1756:
1757:
1758: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1759: /*Modified for bug 5479283. Validation should happen while re-scheduling non-std job */
1760: update wip_job_schedule_interface wjsi
1761: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1762: wjsi.last_update_date = sysdate

Line 1761: set wjsi.process_status = WIP_CONSTANTS.ERROR,

1757:
1758: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1759: /*Modified for bug 5479283. Validation should happen while re-scheduling non-std job */
1760: update wip_job_schedule_interface wjsi
1761: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1762: wjsi.last_update_date = sysdate
1763: where wjsi.group_id = p_groupID
1764: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1765: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1764: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1760: update wip_job_schedule_interface wjsi
1761: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1762: wjsi.last_update_date = sysdate
1763: where wjsi.group_id = p_groupID
1764: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1765: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1766: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1767: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1768: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type

Line 1765: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1761: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1762: wjsi.last_update_date = sysdate
1763: where wjsi.group_id = p_groupID
1764: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1765: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1766: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1767: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1768: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1769: from wip_discrete_jobs wdj

Line 1766: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB

1762: wjsi.last_update_date = sysdate
1763: where wjsi.group_id = p_groupID
1764: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1765: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1766: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1767: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1768: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1769: from wip_discrete_jobs wdj
1770: where wdj.wip_entity_id = wjsi.wip_entity_id

Line 1767: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and

1763: where wjsi.group_id = p_groupID
1764: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1765: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1766: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1767: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1768: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1769: from wip_discrete_jobs wdj
1770: where wdj.wip_entity_id = wjsi.wip_entity_id
1771: and wdj.organization_id = wjsi.organization_id)))

Line 1768: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type

1764: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1765: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1766: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1767: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1768: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1769: from wip_discrete_jobs wdj
1770: where wdj.wip_entity_id = wjsi.wip_entity_id
1771: and wdj.organization_id = wjsi.organization_id)))
1772: and wjsi.bom_reference_segments is not null

Line 1785: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/

1781: fnd_message.set_name('WIP', 'WIP_ML_FIELD_INVALID');
1782: fnd_message.set_token('COLUMN', 'BOM_REFERENCE_SEGMENTS', false);
1783: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
1784: end if;
1785: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
1786: /*Modified for bug 5479283. When Null is passed for bom reference, old value is maintained. */
1787: update wip_job_schedule_interface wjsi
1788: set bom_reference_id = decode(wjsi.bom_reference_segments,null,(select wdj.bom_reference_id
1789: from wip_discrete_jobs wdj

Line 1798: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1794: where msik.organization_id = wjsi.organization_id
1795: and msik.concatenated_segments = wjsi.bom_reference_segments)),
1796: wjsi.last_update_date = sysdate
1797: where wjsi.group_id = p_groupID
1798: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1799: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1800: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1801: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1802: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type

Line 1799: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1795: and msik.concatenated_segments = wjsi.bom_reference_segments)),
1796: wjsi.last_update_date = sysdate
1797: where wjsi.group_id = p_groupID
1798: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1799: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1800: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1801: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1802: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1803: from wip_discrete_jobs wdj

Line 1800: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB

1796: wjsi.last_update_date = sysdate
1797: where wjsi.group_id = p_groupID
1798: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1799: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1800: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1801: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1802: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1803: from wip_discrete_jobs wdj
1804: where wdj.wip_entity_id = wjsi.wip_entity_id

Line 1801: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and

1797: where wjsi.group_id = p_groupID
1798: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1799: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1800: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1801: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1802: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1803: from wip_discrete_jobs wdj
1804: where wdj.wip_entity_id = wjsi.wip_entity_id
1805: and wdj.organization_id = wjsi.organization_id)))

Line 1802: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type

1798: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1799: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1800: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1801: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1802: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1803: from wip_discrete_jobs wdj
1804: where wdj.wip_entity_id = wjsi.wip_entity_id
1805: and wdj.organization_id = wjsi.organization_id)))
1806: --and wjsi.bom_reference_segments is not null

Line 1809: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

1805: and wdj.organization_id = wjsi.organization_id)))
1806: --and wjsi.bom_reference_segments is not null
1807: and (wjsi.bom_reference_id is null or wjsi.bom_reference_id=fnd_api.g_miss_num);
1808:
1809: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1810: /*Modified for bug 5479283. Validation should happen while re-scheduling non-std job */
1811: update wip_job_schedule_interface wjsi
1812: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1813: wjsi.last_update_date = sysdate

Line 1812: set wjsi.process_status = WIP_CONSTANTS.ERROR,

1808:
1809: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1810: /*Modified for bug 5479283. Validation should happen while re-scheduling non-std job */
1811: update wip_job_schedule_interface wjsi
1812: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1813: wjsi.last_update_date = sysdate
1814: where wjsi.group_id = p_groupID
1815: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1816: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1815: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1811: update wip_job_schedule_interface wjsi
1812: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1813: wjsi.last_update_date = sysdate
1814: where wjsi.group_id = p_groupID
1815: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1816: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1817: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1818: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1819: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type

Line 1816: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1812: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1813: wjsi.last_update_date = sysdate
1814: where wjsi.group_id = p_groupID
1815: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1816: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1817: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1818: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1819: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1820: from wip_discrete_jobs wdj

Line 1817: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB

1813: wjsi.last_update_date = sysdate
1814: where wjsi.group_id = p_groupID
1815: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1816: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1817: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1818: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1819: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1820: from wip_discrete_jobs wdj
1821: where wdj.wip_entity_id = wjsi.wip_entity_id

Line 1818: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and

1814: where wjsi.group_id = p_groupID
1815: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1816: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1817: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1818: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1819: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1820: from wip_discrete_jobs wdj
1821: where wdj.wip_entity_id = wjsi.wip_entity_id
1822: and wdj.organization_id = wjsi.organization_id)))

Line 1819: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type

1815: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1816: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1817: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1818: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1819: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1820: from wip_discrete_jobs wdj
1821: where wdj.wip_entity_id = wjsi.wip_entity_id
1822: and wdj.organization_id = wjsi.organization_id)))
1823: and wjsi.bom_reference_id is not null

Line 1837: set wjsi.process_status = WIP_CONSTANTS.ERROR,

1833: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
1834: end if;
1835: /*Modified for bug 5479283. Validation should happen while re-scheduling non-std job */
1836: update wip_job_schedule_interface wjsi
1837: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1838: wjsi.last_update_date = sysdate
1839: where wjsi.group_id = p_groupID
1840: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1841: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1840: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1836: update wip_job_schedule_interface wjsi
1837: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1838: wjsi.last_update_date = sysdate
1839: where wjsi.group_id = p_groupID
1840: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1841: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1842: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1843: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1844: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type

Line 1841: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1837: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1838: wjsi.last_update_date = sysdate
1839: where wjsi.group_id = p_groupID
1840: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1841: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1842: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1843: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1844: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1845: from wip_discrete_jobs wdj

Line 1842: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB

1838: wjsi.last_update_date = sysdate
1839: where wjsi.group_id = p_groupID
1840: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1841: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1842: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1843: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1844: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1845: from wip_discrete_jobs wdj
1846: where wdj.wip_entity_id = wjsi.wip_entity_id

Line 1843: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and

1839: where wjsi.group_id = p_groupID
1840: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1841: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1842: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1843: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1844: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1845: from wip_discrete_jobs wdj
1846: where wdj.wip_entity_id = wjsi.wip_entity_id
1847: and wdj.organization_id = wjsi.organization_id)))

Line 1844: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type

1840: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1841: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1842: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1843: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1844: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1845: from wip_discrete_jobs wdj
1846: where wdj.wip_entity_id = wjsi.wip_entity_id
1847: and wdj.organization_id = wjsi.organization_id)))
1848: and wjsi.bom_reference_id is not null

Line 1857: (l_see_eng_items_flag = wip_constants.no and

1853: 'N' <> (select msi.pick_components_flag
1854: from mtl_system_items msi
1855: where msi.organization_id = wjsi.organization_id
1856: and msi.inventory_item_id = wjsi.bom_reference_id) or
1857: (l_see_eng_items_flag = wip_constants.no and
1858: 'Y' = (select msi.eng_item_flag
1859: from mtl_system_items msi
1860: where msi.organization_id = wjsi.organization_id
1861: and msi.inventory_item_id = wjsi.bom_reference_id)))

Line 1868: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/

1864: if ( sql%rowcount > 0 ) then
1865: fnd_message.set_name('WIP', 'WIP_ML_BOM_REFERENCE_ID');
1866: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
1867: end if;
1868: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
1869:
1870:
1871: --
1872: -- default and validate alternate_bom_designator

Line 1874: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

1870:
1871: --
1872: -- default and validate alternate_bom_designator
1873: --
1874: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1875: /*Modified for bug 5479283. When Null is passed for alt bom designator, old value is maintained.
1876: When g_miss_char is passed for alt bom designator, updated to primary routing/bom. */
1877: update wip_job_schedule_interface wjsi
1878: set wjsi.process_status = WIP_CONSTANTS.ERROR,

Line 1878: set wjsi.process_status = WIP_CONSTANTS.ERROR,

1874: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1875: /*Modified for bug 5479283. When Null is passed for alt bom designator, old value is maintained.
1876: When g_miss_char is passed for alt bom designator, updated to primary routing/bom. */
1877: update wip_job_schedule_interface wjsi
1878: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1879: wjsi.last_update_date = sysdate
1880: where wjsi.group_id = p_groupID
1881: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1882: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1881: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1877: update wip_job_schedule_interface wjsi
1878: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1879: wjsi.last_update_date = sysdate
1880: where wjsi.group_id = p_groupID
1881: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1882: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1883: and wjsi.alternate_bom_designator <> fnd_api.g_miss_char
1884: and ( (wjsi.alternate_bom_designator is not null
1885: and not exists (select 1

Line 1882: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1878: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1879: wjsi.last_update_date = sysdate
1880: where wjsi.group_id = p_groupID
1881: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1882: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1883: and wjsi.alternate_bom_designator <> fnd_api.g_miss_char
1884: and ( (wjsi.alternate_bom_designator is not null
1885: and not exists (select 1
1886: from bom_bill_alternates_v bba

Line 1890: wip_constants.create_ns_job, wjsi.bom_reference_id,

1886: from bom_bill_alternates_v bba
1887: where bba.alternate_bom_designator = wjsi.alternate_bom_designator
1888: and bba.organization_id = wjsi.organization_id
1889: and bba.assembly_item_id = decode(wjsi.load_type,
1890: wip_constants.create_ns_job, wjsi.bom_reference_id,
1891: wip_constants.resched_job, decode((select wdj.job_type
1892: from wip_discrete_jobs wdj
1893: where wdj.organization_id = wjsi.organization_id
1894: and wdj.wip_entity_id = wjsi.wip_entity_id),

Line 1891: wip_constants.resched_job, decode((select wdj.job_type

1887: where bba.alternate_bom_designator = wjsi.alternate_bom_designator
1888: and bba.organization_id = wjsi.organization_id
1889: and bba.assembly_item_id = decode(wjsi.load_type,
1890: wip_constants.create_ns_job, wjsi.bom_reference_id,
1891: wip_constants.resched_job, decode((select wdj.job_type
1892: from wip_discrete_jobs wdj
1893: where wdj.organization_id = wjsi.organization_id
1894: and wdj.wip_entity_id = wjsi.wip_entity_id),
1895: 1, wjsi.primary_item_id, wjsi.bom_reference_id),

Line 1900: and wjsi.load_type in (wip_constants.create_job,

1896: wjsi.primary_item_id)
1897: and (bba.assembly_type = 1 or (bba.assembly_type = 2 and 1 = to_number(l_see_eng_items_flag))) ))
1898: /* bug 4227345 */
1899: or (wjsi.alternate_bom_designator = fnd_api.g_miss_char
1900: and wjsi.load_type in (wip_constants.create_job,
1901: wip_constants.create_ns_job,
1902: wip_constants.create_sched)))
1903: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1904:

Line 1901: wip_constants.create_ns_job,

1897: and (bba.assembly_type = 1 or (bba.assembly_type = 2 and 1 = to_number(l_see_eng_items_flag))) ))
1898: /* bug 4227345 */
1899: or (wjsi.alternate_bom_designator = fnd_api.g_miss_char
1900: and wjsi.load_type in (wip_constants.create_job,
1901: wip_constants.create_ns_job,
1902: wip_constants.create_sched)))
1903: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1904:
1905: if ( sql%rowcount > 0 ) then

Line 1902: wip_constants.create_sched)))

1898: /* bug 4227345 */
1899: or (wjsi.alternate_bom_designator = fnd_api.g_miss_char
1900: and wjsi.load_type in (wip_constants.create_job,
1901: wip_constants.create_ns_job,
1902: wip_constants.create_sched)))
1903: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1904:
1905: if ( sql%rowcount > 0 ) then
1906: fnd_message.set_name('WIP', 'WIP_ML_ALTERNATE_BOM');

Line 1909: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/

1905: if ( sql%rowcount > 0 ) then
1906: fnd_message.set_name('WIP', 'WIP_ML_ALTERNATE_BOM');
1907: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
1908: end if;
1909: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
1910:
1911: /*Modified for bug 5479283. When Null is passed for alt bom designator, old value is maintained.
1912: When g_miss_char is passed for alt bom designator, updated to primary routing/bom. */
1913:

Line 1922: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1918: where wdj.organization_id = wjsi.organization_id
1919: and wdj.wip_entity_id = wjsi.wip_entity_id),wjsi.alternate_bom_designator),
1920: wjsi.last_update_date = sysdate
1921: where wjsi.group_id = p_groupID
1922: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1923: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1924: and wjsi.load_type = wip_constants.resched_job
1925: and (wjsi.alternate_bom_designator is null
1926: or wjsi.alternate_bom_designator =fnd_api.g_miss_char);

Line 1923: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1919: and wdj.wip_entity_id = wjsi.wip_entity_id),wjsi.alternate_bom_designator),
1920: wjsi.last_update_date = sysdate
1921: where wjsi.group_id = p_groupID
1922: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1923: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1924: and wjsi.load_type = wip_constants.resched_job
1925: and (wjsi.alternate_bom_designator is null
1926: or wjsi.alternate_bom_designator =fnd_api.g_miss_char);
1927:

Line 1924: and wjsi.load_type = wip_constants.resched_job

1920: wjsi.last_update_date = sysdate
1921: where wjsi.group_id = p_groupID
1922: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1923: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1924: and wjsi.load_type = wip_constants.resched_job
1925: and (wjsi.alternate_bom_designator is null
1926: or wjsi.alternate_bom_designator =fnd_api.g_miss_char);
1927:
1928: -- you can not change the bom designator for jobs not in unreleased status

Line 1929: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

1925: and (wjsi.alternate_bom_designator is null
1926: or wjsi.alternate_bom_designator =fnd_api.g_miss_char);
1927:
1928: -- you can not change the bom designator for jobs not in unreleased status
1929: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1930: update wip_job_schedule_interface wjsi
1931: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1932: wjsi.last_update_date = sysdate
1933: where wjsi.group_id = p_groupID

Line 1931: set wjsi.process_status = WIP_CONSTANTS.ERROR,

1927:
1928: -- you can not change the bom designator for jobs not in unreleased status
1929: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1930: update wip_job_schedule_interface wjsi
1931: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1932: wjsi.last_update_date = sysdate
1933: where wjsi.group_id = p_groupID
1934: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1935: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1934: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1930: update wip_job_schedule_interface wjsi
1931: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1932: wjsi.last_update_date = sysdate
1933: where wjsi.group_id = p_groupID
1934: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1935: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1936: and wjsi.load_type = wip_constants.resched_job
1937: and nvl(wjsi.alternate_bom_designator, '@@-@@@') <>
1938: nvl( (select wdj.alternate_bom_designator

Line 1935: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1931: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1932: wjsi.last_update_date = sysdate
1933: where wjsi.group_id = p_groupID
1934: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1935: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1936: and wjsi.load_type = wip_constants.resched_job
1937: and nvl(wjsi.alternate_bom_designator, '@@-@@@') <>
1938: nvl( (select wdj.alternate_bom_designator
1939: from wip_discrete_jobs wdj

Line 1936: and wjsi.load_type = wip_constants.resched_job

1932: wjsi.last_update_date = sysdate
1933: where wjsi.group_id = p_groupID
1934: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1935: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1936: and wjsi.load_type = wip_constants.resched_job
1937: and nvl(wjsi.alternate_bom_designator, '@@-@@@') <>
1938: nvl( (select wdj.alternate_bom_designator
1939: from wip_discrete_jobs wdj
1940: where wdj.organization_id = wjsi.organization_id

Line 1952: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/

1948: if ( sql%rowcount > 0 ) then
1949: fnd_message.set_name('WIP', 'WIP_ALTERNATE_BOM_NOCHANGE');
1950: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
1951: end if;
1952: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
1953:
1954: --
1955: -- default bom_revision and bom_revision_date
1956: --

Line 1958: set wjsi.process_status = WIP_CONSTANTS.WARNING,

1954: --
1955: -- default bom_revision and bom_revision_date
1956: --
1957: update wip_job_schedule_interface wjsi
1958: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1959: wjsi.last_update_date = sysdate
1960: where wjsi.group_id = p_groupID
1961: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1962: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1961: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1957: update wip_job_schedule_interface wjsi
1958: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1959: wjsi.last_update_date = sysdate
1960: where wjsi.group_id = p_groupID
1961: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1962: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1963: and wjsi.load_type = wip_constants.create_sched
1964: and wjsi.bom_revision_date is not null
1965: and wjsi.bom_revision is not null

Line 1962: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1958: set wjsi.process_status = WIP_CONSTANTS.WARNING,
1959: wjsi.last_update_date = sysdate
1960: where wjsi.group_id = p_groupID
1961: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1962: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1963: and wjsi.load_type = wip_constants.create_sched
1964: and wjsi.bom_revision_date is not null
1965: and wjsi.bom_revision is not null
1966: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 1963: and wjsi.load_type = wip_constants.create_sched

1959: wjsi.last_update_date = sysdate
1960: where wjsi.group_id = p_groupID
1961: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1962: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1963: and wjsi.load_type = wip_constants.create_sched
1964: and wjsi.bom_revision_date is not null
1965: and wjsi.bom_revision is not null
1966: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1967:

Line 1982: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1978: where wdj.organization_id = wjsi.organization_id
1979: and wdj.wip_entity_id = wjsi.wip_entity_id),
1980: wjsi.last_update_date = sysdate
1981: where wjsi.group_id = p_groupID
1982: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1983: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1984: and wjsi.load_type = wip_constants.resched_job
1985: and (wjsi.bom_revision = fnd_api.g_miss_char
1986: or wjsi.bom_revision is null);

Line 1983: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1979: and wdj.wip_entity_id = wjsi.wip_entity_id),
1980: wjsi.last_update_date = sysdate
1981: where wjsi.group_id = p_groupID
1982: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1983: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1984: and wjsi.load_type = wip_constants.resched_job
1985: and (wjsi.bom_revision = fnd_api.g_miss_char
1986: or wjsi.bom_revision is null);
1987:

Line 1984: and wjsi.load_type = wip_constants.resched_job

1980: wjsi.last_update_date = sysdate
1981: where wjsi.group_id = p_groupID
1982: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1983: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1984: and wjsi.load_type = wip_constants.resched_job
1985: and (wjsi.bom_revision = fnd_api.g_miss_char
1986: or wjsi.bom_revision is null);
1987:
1988: update wip_job_schedule_interface wjsi

Line 1989: set wjsi.process_status = WIP_CONSTANTS.ERROR,

1985: and (wjsi.bom_revision = fnd_api.g_miss_char
1986: or wjsi.bom_revision is null);
1987:
1988: update wip_job_schedule_interface wjsi
1989: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1990: wjsi.last_update_date = sysdate
1991: where wjsi.group_id = p_groupID
1992: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1993: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 1992: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

1988: update wip_job_schedule_interface wjsi
1989: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1990: wjsi.last_update_date = sysdate
1991: where wjsi.group_id = p_groupID
1992: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1993: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1994: and wjsi.load_type = wip_constants.resched_job
1995: and nvl(wjsi.bom_revision, '@@-@@@') <>
1996: nvl( (select wdj.bom_revision

Line 1993: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

1989: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1990: wjsi.last_update_date = sysdate
1991: where wjsi.group_id = p_groupID
1992: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1993: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1994: and wjsi.load_type = wip_constants.resched_job
1995: and nvl(wjsi.bom_revision, '@@-@@@') <>
1996: nvl( (select wdj.bom_revision
1997: from wip_discrete_jobs wdj

Line 1994: and wjsi.load_type = wip_constants.resched_job

1990: wjsi.last_update_date = sysdate
1991: where wjsi.group_id = p_groupID
1992: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1993: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1994: and wjsi.load_type = wip_constants.resched_job
1995: and nvl(wjsi.bom_revision, '@@-@@@') <>
1996: nvl( (select wdj.bom_revision
1997: from wip_discrete_jobs wdj
1998: where wdj.organization_id = wjsi.organization_id

Line 2018: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2014: where wdj.organization_id = wjsi.organization_id
2015: and wdj.wip_entity_id = wjsi.wip_entity_id),
2016: wjsi.last_update_date = sysdate
2017: where wjsi.group_id = p_groupID
2018: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2019: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2020: and wjsi.load_type = wip_constants.resched_job
2021: and ( wjsi.bom_revision_date = fnd_api.g_miss_date
2022: or wjsi.bom_revision_date is null);

Line 2019: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2015: and wdj.wip_entity_id = wjsi.wip_entity_id),
2016: wjsi.last_update_date = sysdate
2017: where wjsi.group_id = p_groupID
2018: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2019: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2020: and wjsi.load_type = wip_constants.resched_job
2021: and ( wjsi.bom_revision_date = fnd_api.g_miss_date
2022: or wjsi.bom_revision_date is null);
2023:

Line 2020: and wjsi.load_type = wip_constants.resched_job

2016: wjsi.last_update_date = sysdate
2017: where wjsi.group_id = p_groupID
2018: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2019: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2020: and wjsi.load_type = wip_constants.resched_job
2021: and ( wjsi.bom_revision_date = fnd_api.g_miss_date
2022: or wjsi.bom_revision_date is null);
2023:
2024: update wip_job_schedule_interface wjsi

Line 2025: set wjsi.process_status = WIP_CONSTANTS.ERROR,

2021: and ( wjsi.bom_revision_date = fnd_api.g_miss_date
2022: or wjsi.bom_revision_date is null);
2023:
2024: update wip_job_schedule_interface wjsi
2025: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2026: wjsi.last_update_date = sysdate
2027: where wjsi.group_id = p_groupID
2028: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2029: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2028: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2024: update wip_job_schedule_interface wjsi
2025: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2026: wjsi.last_update_date = sysdate
2027: where wjsi.group_id = p_groupID
2028: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2029: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2030: and wjsi.load_type = wip_constants.resched_job
2031: and nvl(wjsi.bom_revision_date, fnd_api.g_miss_date) <>
2032: nvl( (select wdj.bom_revision_date

Line 2029: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2025: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2026: wjsi.last_update_date = sysdate
2027: where wjsi.group_id = p_groupID
2028: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2029: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2030: and wjsi.load_type = wip_constants.resched_job
2031: and nvl(wjsi.bom_revision_date, fnd_api.g_miss_date) <>
2032: nvl( (select wdj.bom_revision_date
2033: from wip_discrete_jobs wdj

Line 2030: and wjsi.load_type = wip_constants.resched_job

2026: wjsi.last_update_date = sysdate
2027: where wjsi.group_id = p_groupID
2028: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2029: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2030: and wjsi.load_type = wip_constants.resched_job
2031: and nvl(wjsi.bom_revision_date, fnd_api.g_miss_date) <>
2032: nvl( (select wdj.bom_revision_date
2033: from wip_discrete_jobs wdj
2034: where wdj.organization_id = wjsi.organization_id

Line 2054: set wjsi.process_status = WIP_CONSTANTS.WARNING,

2050: --
2051: -- default and validate wip_supply_type
2052: --
2053: update wip_job_schedule_interface wjsi
2054: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2055: wjsi.last_update_date = sysdate
2056: where wjsi.group_id = p_groupID
2057: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2058: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2057: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2053: update wip_job_schedule_interface wjsi
2054: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2055: wjsi.last_update_date = sysdate
2056: where wjsi.group_id = p_groupID
2057: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2058: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2059: and wjsi.load_type in (wip_constants.create_sched, wip_constants.resched_job)
2060: and wjsi.wip_supply_type is not null
2061: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2058: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2054: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2055: wjsi.last_update_date = sysdate
2056: where wjsi.group_id = p_groupID
2057: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2058: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2059: and wjsi.load_type in (wip_constants.create_sched, wip_constants.resched_job)
2060: and wjsi.wip_supply_type is not null
2061: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2062:

Line 2059: and wjsi.load_type in (wip_constants.create_sched, wip_constants.resched_job)

2055: wjsi.last_update_date = sysdate
2056: where wjsi.group_id = p_groupID
2057: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2058: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2059: and wjsi.load_type in (wip_constants.create_sched, wip_constants.resched_job)
2060: and wjsi.wip_supply_type is not null
2061: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2062:
2063: if ( sql%rowcount > 0 ) then

Line 2070: set wjsi.wip_supply_type = wip_constants.based_on_bom,

2066: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationWarning);
2067: end if;
2068:
2069: update wip_job_schedule_interface wjsi
2070: set wjsi.wip_supply_type = wip_constants.based_on_bom,
2071: wjsi.last_update_date = sysdate
2072: where wjsi.group_id = p_groupID
2073: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2074: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2073: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2069: update wip_job_schedule_interface wjsi
2070: set wjsi.wip_supply_type = wip_constants.based_on_bom,
2071: wjsi.last_update_date = sysdate
2072: where wjsi.group_id = p_groupID
2073: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2074: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2075: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB, WIP_CONSTANTS.CREATE_NS_JOB)
2076: and wjsi.wip_supply_type is null;
2077:

Line 2074: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2070: set wjsi.wip_supply_type = wip_constants.based_on_bom,
2071: wjsi.last_update_date = sysdate
2072: where wjsi.group_id = p_groupID
2073: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2074: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2075: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB, WIP_CONSTANTS.CREATE_NS_JOB)
2076: and wjsi.wip_supply_type is null;
2077:
2078: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

Line 2075: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB, WIP_CONSTANTS.CREATE_NS_JOB)

2071: wjsi.last_update_date = sysdate
2072: where wjsi.group_id = p_groupID
2073: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2074: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2075: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB, WIP_CONSTANTS.CREATE_NS_JOB)
2076: and wjsi.wip_supply_type is null;
2077:
2078: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
2079: update wip_job_schedule_interface wjsi

Line 2078: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

2074: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2075: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB, WIP_CONSTANTS.CREATE_NS_JOB)
2076: and wjsi.wip_supply_type is null;
2077:
2078: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
2079: update wip_job_schedule_interface wjsi
2080: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2081: wjsi.last_update_date = sysdate
2082: where wjsi.group_id = p_groupID

Line 2080: set wjsi.process_status = WIP_CONSTANTS.ERROR,

2076: and wjsi.wip_supply_type is null;
2077:
2078: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
2079: update wip_job_schedule_interface wjsi
2080: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2081: wjsi.last_update_date = sysdate
2082: where wjsi.group_id = p_groupID
2083: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2084: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2083: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2079: update wip_job_schedule_interface wjsi
2080: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2081: wjsi.last_update_date = sysdate
2082: where wjsi.group_id = p_groupID
2083: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2084: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2085: and ( (wjsi.load_type in (WIP_CONSTANTS.CREATE_NS_JOB,
2086: WIP_CONSTANTS.CREATE_JOB) and
2087: wjsi.wip_supply_type not in (wip_constants.push,

Line 2084: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2080: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2081: wjsi.last_update_date = sysdate
2082: where wjsi.group_id = p_groupID
2083: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2084: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2085: and ( (wjsi.load_type in (WIP_CONSTANTS.CREATE_NS_JOB,
2086: WIP_CONSTANTS.CREATE_JOB) and
2087: wjsi.wip_supply_type not in (wip_constants.push,
2088: wip_constants.assy_pull,

Line 2085: and ( (wjsi.load_type in (WIP_CONSTANTS.CREATE_NS_JOB,

2081: wjsi.last_update_date = sysdate
2082: where wjsi.group_id = p_groupID
2083: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2084: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2085: and ( (wjsi.load_type in (WIP_CONSTANTS.CREATE_NS_JOB,
2086: WIP_CONSTANTS.CREATE_JOB) and
2087: wjsi.wip_supply_type not in (wip_constants.push,
2088: wip_constants.assy_pull,
2089: wip_constants.op_pull,

Line 2086: WIP_CONSTANTS.CREATE_JOB) and

2082: where wjsi.group_id = p_groupID
2083: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2084: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2085: and ( (wjsi.load_type in (WIP_CONSTANTS.CREATE_NS_JOB,
2086: WIP_CONSTANTS.CREATE_JOB) and
2087: wjsi.wip_supply_type not in (wip_constants.push,
2088: wip_constants.assy_pull,
2089: wip_constants.op_pull,
2090: wip_constants.bulk,

Line 2087: wjsi.wip_supply_type not in (wip_constants.push,

2083: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2084: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2085: and ( (wjsi.load_type in (WIP_CONSTANTS.CREATE_NS_JOB,
2086: WIP_CONSTANTS.CREATE_JOB) and
2087: wjsi.wip_supply_type not in (wip_constants.push,
2088: wip_constants.assy_pull,
2089: wip_constants.op_pull,
2090: wip_constants.bulk,
2091: wip_constants.vendor,

Line 2088: wip_constants.assy_pull,

2084: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2085: and ( (wjsi.load_type in (WIP_CONSTANTS.CREATE_NS_JOB,
2086: WIP_CONSTANTS.CREATE_JOB) and
2087: wjsi.wip_supply_type not in (wip_constants.push,
2088: wip_constants.assy_pull,
2089: wip_constants.op_pull,
2090: wip_constants.bulk,
2091: wip_constants.vendor,
2092: wip_constants.phantom,

Line 2089: wip_constants.op_pull,

2085: and ( (wjsi.load_type in (WIP_CONSTANTS.CREATE_NS_JOB,
2086: WIP_CONSTANTS.CREATE_JOB) and
2087: wjsi.wip_supply_type not in (wip_constants.push,
2088: wip_constants.assy_pull,
2089: wip_constants.op_pull,
2090: wip_constants.bulk,
2091: wip_constants.vendor,
2092: wip_constants.phantom,
2093: wip_constants.based_on_bom))

Line 2090: wip_constants.bulk,

2086: WIP_CONSTANTS.CREATE_JOB) and
2087: wjsi.wip_supply_type not in (wip_constants.push,
2088: wip_constants.assy_pull,
2089: wip_constants.op_pull,
2090: wip_constants.bulk,
2091: wip_constants.vendor,
2092: wip_constants.phantom,
2093: wip_constants.based_on_bom))
2094: or (wjsi.load_type = wip_constants.create_ns_job and

Line 2091: wip_constants.vendor,

2087: wjsi.wip_supply_type not in (wip_constants.push,
2088: wip_constants.assy_pull,
2089: wip_constants.op_pull,
2090: wip_constants.bulk,
2091: wip_constants.vendor,
2092: wip_constants.phantom,
2093: wip_constants.based_on_bom))
2094: or (wjsi.load_type = wip_constants.create_ns_job and
2095: wjsi.primary_item_id is null and

Line 2092: wip_constants.phantom,

2088: wip_constants.assy_pull,
2089: wip_constants.op_pull,
2090: wip_constants.bulk,
2091: wip_constants.vendor,
2092: wip_constants.phantom,
2093: wip_constants.based_on_bom))
2094: or (wjsi.load_type = wip_constants.create_ns_job and
2095: wjsi.primary_item_id is null and
2096: wjsi.wip_supply_type in (wip_constants.assy_pull,

Line 2093: wip_constants.based_on_bom))

2089: wip_constants.op_pull,
2090: wip_constants.bulk,
2091: wip_constants.vendor,
2092: wip_constants.phantom,
2093: wip_constants.based_on_bom))
2094: or (wjsi.load_type = wip_constants.create_ns_job and
2095: wjsi.primary_item_id is null and
2096: wjsi.wip_supply_type in (wip_constants.assy_pull,
2097: wip_constants.op_pull))

Line 2094: or (wjsi.load_type = wip_constants.create_ns_job and

2090: wip_constants.bulk,
2091: wip_constants.vendor,
2092: wip_constants.phantom,
2093: wip_constants.based_on_bom))
2094: or (wjsi.load_type = wip_constants.create_ns_job and
2095: wjsi.primary_item_id is null and
2096: wjsi.wip_supply_type in (wip_constants.assy_pull,
2097: wip_constants.op_pull))
2098: or (wjsi.wip_supply_type = wip_constants.op_pull and

Line 2096: wjsi.wip_supply_type in (wip_constants.assy_pull,

2092: wip_constants.phantom,
2093: wip_constants.based_on_bom))
2094: or (wjsi.load_type = wip_constants.create_ns_job and
2095: wjsi.primary_item_id is null and
2096: wjsi.wip_supply_type in (wip_constants.assy_pull,
2097: wip_constants.op_pull))
2098: or (wjsi.wip_supply_type = wip_constants.op_pull and
2099: not exists
2100: (select 1

Line 2097: wip_constants.op_pull))

2093: wip_constants.based_on_bom))
2094: or (wjsi.load_type = wip_constants.create_ns_job and
2095: wjsi.primary_item_id is null and
2096: wjsi.wip_supply_type in (wip_constants.assy_pull,
2097: wip_constants.op_pull))
2098: or (wjsi.wip_supply_type = wip_constants.op_pull and
2099: not exists
2100: (select 1
2101: from bom_operational_routings bor

Line 2098: or (wjsi.wip_supply_type = wip_constants.op_pull and

2094: or (wjsi.load_type = wip_constants.create_ns_job and
2095: wjsi.primary_item_id is null and
2096: wjsi.wip_supply_type in (wip_constants.assy_pull,
2097: wip_constants.op_pull))
2098: or (wjsi.wip_supply_type = wip_constants.op_pull and
2099: not exists
2100: (select 1
2101: from bom_operational_routings bor
2102: where bor.organization_id = wjsi.organization_id

Line 2104: wip_constants.create_ns_job, wjsi.routing_reference_id,

2100: (select 1
2101: from bom_operational_routings bor
2102: where bor.organization_id = wjsi.organization_id
2103: and bor.assembly_item_id = decode(wjsi.load_type,
2104: wip_constants.create_ns_job, wjsi.routing_reference_id,
2105: wjsi.primary_item_id)
2106: and nvl(alternate_routing_designator, '@@@') =
2107: nvl(wjsi.alternate_routing_designator, '@@@')
2108: and nvl(cfm_routing_flag, 2) = 2)))

Line 2115: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/

2111: if ( sql%rowcount > 0 ) then
2112: fnd_message.set_name('WIP', 'WIP_ML_WIP_SUPPLY_TYPE');
2113: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
2114: end if;
2115: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
2116:
2117: --
2118: -- default and validate start_quantity
2119: --

Line 2121: set wjsi.process_status = WIP_CONSTANTS.WARNING,

2117: --
2118: -- default and validate start_quantity
2119: --
2120: update wip_job_schedule_interface wjsi
2121: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2122: wjsi.last_update_date = sysdate
2123: where wjsi.group_id = p_groupID
2124: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2125: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2124: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2120: update wip_job_schedule_interface wjsi
2121: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2122: wjsi.last_update_date = sysdate
2123: where wjsi.group_id = p_groupID
2124: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2125: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2126: and wjsi.start_quantity is not null
2127: and ( wjsi.load_type = wip_constants.create_sched
2128: or (wjsi.load_type = wip_constants.resched_job and

Line 2125: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2121: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2122: wjsi.last_update_date = sysdate
2123: where wjsi.group_id = p_groupID
2124: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2125: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2126: and wjsi.start_quantity is not null
2127: and ( wjsi.load_type = wip_constants.create_sched
2128: or (wjsi.load_type = wip_constants.resched_job and
2129: (select wdj.status_type

Line 2127: and ( wjsi.load_type = wip_constants.create_sched

2123: where wjsi.group_id = p_groupID
2124: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2125: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2126: and wjsi.start_quantity is not null
2127: and ( wjsi.load_type = wip_constants.create_sched
2128: or (wjsi.load_type = wip_constants.resched_job and
2129: (select wdj.status_type
2130: from wip_discrete_jobs wdj
2131: where wdj.organization_id = wjsi.organization_id

Line 2128: or (wjsi.load_type = wip_constants.resched_job and

2124: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2125: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2126: and wjsi.start_quantity is not null
2127: and ( wjsi.load_type = wip_constants.create_sched
2128: or (wjsi.load_type = wip_constants.resched_job and
2129: (select wdj.status_type
2130: from wip_discrete_jobs wdj
2131: where wdj.organization_id = wjsi.organization_id
2132: and wdj.wip_entity_id = wjsi.wip_entity_id) not in

Line 2133: (wip_constants.unreleased,

2129: (select wdj.status_type
2130: from wip_discrete_jobs wdj
2131: where wdj.organization_id = wjsi.organization_id
2132: and wdj.wip_entity_id = wjsi.wip_entity_id) not in
2133: (wip_constants.unreleased,
2134: wip_constants.released,
2135: wip_constants.comp_chrg,
2136: wip_constants.hold)) )
2137: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2134: wip_constants.released,

2130: from wip_discrete_jobs wdj
2131: where wdj.organization_id = wjsi.organization_id
2132: and wdj.wip_entity_id = wjsi.wip_entity_id) not in
2133: (wip_constants.unreleased,
2134: wip_constants.released,
2135: wip_constants.comp_chrg,
2136: wip_constants.hold)) )
2137: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2138:

Line 2135: wip_constants.comp_chrg,

2131: where wdj.organization_id = wjsi.organization_id
2132: and wdj.wip_entity_id = wjsi.wip_entity_id) not in
2133: (wip_constants.unreleased,
2134: wip_constants.released,
2135: wip_constants.comp_chrg,
2136: wip_constants.hold)) )
2137: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2138:
2139: if ( sql%rowcount > 0 ) then

Line 2136: wip_constants.hold)) )

2132: and wdj.wip_entity_id = wjsi.wip_entity_id) not in
2133: (wip_constants.unreleased,
2134: wip_constants.released,
2135: wip_constants.comp_chrg,
2136: wip_constants.hold)) )
2137: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2138:
2139: if ( sql%rowcount > 0 ) then
2140: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');

Line 2145: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

2141: fnd_message.set_token('COLUMN', 'START_QUANTITY', false);
2142: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationWarning);
2143: end if;
2144:
2145: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
2146: update wip_job_schedule_interface wjsi
2147: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2148: wjsi.last_update_date = sysdate
2149: where wjsi.group_id = p_groupID

Line 2147: set wjsi.process_status = WIP_CONSTANTS.ERROR,

2143: end if;
2144:
2145: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
2146: update wip_job_schedule_interface wjsi
2147: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2148: wjsi.last_update_date = sysdate
2149: where wjsi.group_id = p_groupID
2150: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2151: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2150: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2146: update wip_job_schedule_interface wjsi
2147: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2148: wjsi.last_update_date = sysdate
2149: where wjsi.group_id = p_groupID
2150: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2151: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2152: and ( wjsi.start_quantity < 0
2153: or (wjsi.load_type in (wip_constants.create_job, wip_constants.create_ns_job) and
2154: wjsi.start_quantity is null)

Line 2151: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2147: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2148: wjsi.last_update_date = sysdate
2149: where wjsi.group_id = p_groupID
2150: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2151: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2152: and ( wjsi.start_quantity < 0
2153: or (wjsi.load_type in (wip_constants.create_job, wip_constants.create_ns_job) and
2154: wjsi.start_quantity is null)
2155: or (wjsi.load_type = wip_constants.create_job and

Line 2153: or (wjsi.load_type in (wip_constants.create_job, wip_constants.create_ns_job) and

2149: where wjsi.group_id = p_groupID
2150: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2151: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2152: and ( wjsi.start_quantity < 0
2153: or (wjsi.load_type in (wip_constants.create_job, wip_constants.create_ns_job) and
2154: wjsi.start_quantity is null)
2155: or (wjsi.load_type = wip_constants.create_job and
2156: wjsi.start_quantity = 0)
2157: or (wjsi.load_type = wip_constants.resched_job and

Line 2155: or (wjsi.load_type = wip_constants.create_job and

2151: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2152: and ( wjsi.start_quantity < 0
2153: or (wjsi.load_type in (wip_constants.create_job, wip_constants.create_ns_job) and
2154: wjsi.start_quantity is null)
2155: or (wjsi.load_type = wip_constants.create_job and
2156: wjsi.start_quantity = 0)
2157: or (wjsi.load_type = wip_constants.resched_job and
2158: wjsi.start_quantity = 0 and
2159: wip_constants.standard = (select wdj.job_type

Line 2157: or (wjsi.load_type = wip_constants.resched_job and

2153: or (wjsi.load_type in (wip_constants.create_job, wip_constants.create_ns_job) and
2154: wjsi.start_quantity is null)
2155: or (wjsi.load_type = wip_constants.create_job and
2156: wjsi.start_quantity = 0)
2157: or (wjsi.load_type = wip_constants.resched_job and
2158: wjsi.start_quantity = 0 and
2159: wip_constants.standard = (select wdj.job_type
2160: from wip_discrete_jobs wdj
2161: where wdj.organization_id = wjsi.organization_id

Line 2159: wip_constants.standard = (select wdj.job_type

2155: or (wjsi.load_type = wip_constants.create_job and
2156: wjsi.start_quantity = 0)
2157: or (wjsi.load_type = wip_constants.resched_job and
2158: wjsi.start_quantity = 0 and
2159: wip_constants.standard = (select wdj.job_type
2160: from wip_discrete_jobs wdj
2161: where wdj.organization_id = wjsi.organization_id
2162: and wdj.wip_entity_id = wjsi.wip_entity_id)))
2163: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2171: set wjsi.process_status = WIP_CONSTANTS.ERROR,

2167: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
2168: end if;
2169:
2170: update wip_job_schedule_interface wjsi
2171: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2172: wjsi.last_update_date = sysdate
2173: where wjsi.group_id = p_groupID
2174: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2175: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2174: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2170: update wip_job_schedule_interface wjsi
2171: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2172: wjsi.last_update_date = sysdate
2173: where wjsi.group_id = p_groupID
2174: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2175: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2176: and wjsi.load_type = wip_constants.resched_job
2177: and wjsi.start_quantity is not null
2178: and ( wjsi.start_quantity < (select wdj.quantity_completed

Line 2175: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2171: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2172: wjsi.last_update_date = sysdate
2173: where wjsi.group_id = p_groupID
2174: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2175: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2176: and wjsi.load_type = wip_constants.resched_job
2177: and wjsi.start_quantity is not null
2178: and ( wjsi.start_quantity < (select wdj.quantity_completed
2179: from wip_discrete_jobs wdj

Line 2176: and wjsi.load_type = wip_constants.resched_job

2172: wjsi.last_update_date = sysdate
2173: where wjsi.group_id = p_groupID
2174: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2175: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2176: and wjsi.load_type = wip_constants.resched_job
2177: and wjsi.start_quantity is not null
2178: and ( wjsi.start_quantity < (select wdj.quantity_completed
2179: from wip_discrete_jobs wdj
2180: where wdj.organization_id = wjsi.organization_id

Line 2196: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/

2192: if ( sql%rowcount > 0 ) then
2193: fnd_message.set_name('WIP', 'WIP_ML_RESCHEDULE_QUANTITY');
2194: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
2195: end if;
2196: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
2197:
2198: --
2199: -- default and validate net_quantity
2200: --

Line 2202: set wjsi.process_status = WIP_CONSTANTS.WARNING,

2198: --
2199: -- default and validate net_quantity
2200: --
2201: update wip_job_schedule_interface wjsi
2202: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2203: wjsi.last_update_date = sysdate
2204: where wjsi.group_id = p_groupID
2205: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2206: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2205: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2201: update wip_job_schedule_interface wjsi
2202: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2203: wjsi.last_update_date = sysdate
2204: where wjsi.group_id = p_groupID
2205: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2206: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2207: and wjsi.load_type = wip_constants.create_sched
2208: and wjsi.net_quantity is not null
2209: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2206: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2202: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2203: wjsi.last_update_date = sysdate
2204: where wjsi.group_id = p_groupID
2205: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2206: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2207: and wjsi.load_type = wip_constants.create_sched
2208: and wjsi.net_quantity is not null
2209: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2210:

Line 2207: and wjsi.load_type = wip_constants.create_sched

2203: wjsi.last_update_date = sysdate
2204: where wjsi.group_id = p_groupID
2205: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2206: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2207: and wjsi.load_type = wip_constants.create_sched
2208: and wjsi.net_quantity is not null
2209: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2210:
2211: if ( sql%rowcount > 0 ) then

Line 2221: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2217: update wip_job_schedule_interface wjsi
2218: set wjsi.net_quantity = wjsi.start_quantity,
2219: wjsi.last_update_date = sysdate
2220: where wjsi.group_id = p_groupID
2221: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2222: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2223: and wjsi.load_type = wip_constants.create_job
2224: and wjsi.net_quantity is null;
2225:

Line 2222: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2218: set wjsi.net_quantity = wjsi.start_quantity,
2219: wjsi.last_update_date = sysdate
2220: where wjsi.group_id = p_groupID
2221: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2222: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2223: and wjsi.load_type = wip_constants.create_job
2224: and wjsi.net_quantity is null;
2225:
2226: update wip_job_schedule_interface wjsi

Line 2223: and wjsi.load_type = wip_constants.create_job

2219: wjsi.last_update_date = sysdate
2220: where wjsi.group_id = p_groupID
2221: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2222: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2223: and wjsi.load_type = wip_constants.create_job
2224: and wjsi.net_quantity is null;
2225:
2226: update wip_job_schedule_interface wjsi
2227: set wjsi.net_quantity = (select decode(wdj.net_quantity,

Line 2235: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2231: where wdj.wip_entity_id = wjsi.wip_entity_id
2232: and wdj.organization_id = wjsi.organization_id),
2233: wjsi.last_update_date = sysdate
2234: where wjsi.group_id = p_groupID
2235: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2236: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2237: and wjsi.load_type = wip_constants.resched_job
2238: and wjsi.net_quantity is null;
2239:

Line 2236: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2232: and wdj.organization_id = wjsi.organization_id),
2233: wjsi.last_update_date = sysdate
2234: where wjsi.group_id = p_groupID
2235: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2236: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2237: and wjsi.load_type = wip_constants.resched_job
2238: and wjsi.net_quantity is null;
2239:
2240: update wip_job_schedule_interface wjsi

Line 2237: and wjsi.load_type = wip_constants.resched_job

2233: wjsi.last_update_date = sysdate
2234: where wjsi.group_id = p_groupID
2235: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2236: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2237: and wjsi.load_type = wip_constants.resched_job
2238: and wjsi.net_quantity is null;
2239:
2240: update wip_job_schedule_interface wjsi
2241: set wjsi.net_quantity = 0,

Line 2244: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2240: update wip_job_schedule_interface wjsi
2241: set wjsi.net_quantity = 0,
2242: wjsi.last_update_date = sysdate
2243: where wjsi.group_id = p_groupID
2244: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2245: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2246: and wjsi.load_type = wip_constants.create_ns_job
2247: and wjsi.net_quantity is null;
2248:

Line 2245: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2241: set wjsi.net_quantity = 0,
2242: wjsi.last_update_date = sysdate
2243: where wjsi.group_id = p_groupID
2244: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2245: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2246: and wjsi.load_type = wip_constants.create_ns_job
2247: and wjsi.net_quantity is null;
2248:
2249: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

Line 2246: and wjsi.load_type = wip_constants.create_ns_job

2242: wjsi.last_update_date = sysdate
2243: where wjsi.group_id = p_groupID
2244: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2245: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2246: and wjsi.load_type = wip_constants.create_ns_job
2247: and wjsi.net_quantity is null;
2248:
2249: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
2250: update wip_job_schedule_interface wjsi

Line 2249: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

2245: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2246: and wjsi.load_type = wip_constants.create_ns_job
2247: and wjsi.net_quantity is null;
2248:
2249: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
2250: update wip_job_schedule_interface wjsi
2251: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2252: wjsi.last_update_date = sysdate
2253: where wjsi.group_id = p_groupID

Line 2251: set wjsi.process_status = WIP_CONSTANTS.ERROR,

2247: and wjsi.net_quantity is null;
2248:
2249: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
2250: update wip_job_schedule_interface wjsi
2251: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2252: wjsi.last_update_date = sysdate
2253: where wjsi.group_id = p_groupID
2254: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2255: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2254: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2250: update wip_job_schedule_interface wjsi
2251: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2252: wjsi.last_update_date = sysdate
2253: where wjsi.group_id = p_groupID
2254: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2255: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2256: and wjsi.net_quantity is not null
2257: and wjsi.load_type in (wip_constants.create_job,
2258: wip_constants.create_ns_job,

Line 2255: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2251: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2252: wjsi.last_update_date = sysdate
2253: where wjsi.group_id = p_groupID
2254: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2255: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2256: and wjsi.net_quantity is not null
2257: and wjsi.load_type in (wip_constants.create_job,
2258: wip_constants.create_ns_job,
2259: wip_constants.resched_job)

Line 2257: and wjsi.load_type in (wip_constants.create_job,

2253: where wjsi.group_id = p_groupID
2254: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2255: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2256: and wjsi.net_quantity is not null
2257: and wjsi.load_type in (wip_constants.create_job,
2258: wip_constants.create_ns_job,
2259: wip_constants.resched_job)
2260: and ( wjsi.net_quantity not between 0 and (select nvl(wjsi.start_quantity,wdj.start_quantity)
2261: from wip_discrete_jobs wdj

Line 2258: wip_constants.create_ns_job,

2254: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2255: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2256: and wjsi.net_quantity is not null
2257: and wjsi.load_type in (wip_constants.create_job,
2258: wip_constants.create_ns_job,
2259: wip_constants.resched_job)
2260: and ( wjsi.net_quantity not between 0 and (select nvl(wjsi.start_quantity,wdj.start_quantity)
2261: from wip_discrete_jobs wdj
2262: where wdj.organization_id = wjsi.organization_id

Line 2259: wip_constants.resched_job)

2255: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2256: and wjsi.net_quantity is not null
2257: and wjsi.load_type in (wip_constants.create_job,
2258: wip_constants.create_ns_job,
2259: wip_constants.resched_job)
2260: and ( wjsi.net_quantity not between 0 and (select nvl(wjsi.start_quantity,wdj.start_quantity)
2261: from wip_discrete_jobs wdj
2262: where wdj.organization_id = wjsi.organization_id
2263: and wdj.wip_entity_id = wjsi.wip_entity_id) /*Fix for Bug 6522139*/

Line 2265: and ((wjsi.load_type = wip_constants.create_ns_job and wjsi.primary_item_id is null) or

2261: from wip_discrete_jobs wdj
2262: where wdj.organization_id = wjsi.organization_id
2263: and wdj.wip_entity_id = wjsi.wip_entity_id) /*Fix for Bug 6522139*/
2264: or ( wjsi.net_quantity <> 0
2265: and ((wjsi.load_type = wip_constants.create_ns_job and wjsi.primary_item_id is null) or
2266: (wjsi.load_type = wip_constants.resched_job and
2267: wip_constants.nonstandard = (select wdj.job_type
2268: from wip_discrete_jobs wdj
2269: where wdj.organization_id = wjsi.organization_id

Line 2266: (wjsi.load_type = wip_constants.resched_job and

2262: where wdj.organization_id = wjsi.organization_id
2263: and wdj.wip_entity_id = wjsi.wip_entity_id) /*Fix for Bug 6522139*/
2264: or ( wjsi.net_quantity <> 0
2265: and ((wjsi.load_type = wip_constants.create_ns_job and wjsi.primary_item_id is null) or
2266: (wjsi.load_type = wip_constants.resched_job and
2267: wip_constants.nonstandard = (select wdj.job_type
2268: from wip_discrete_jobs wdj
2269: where wdj.organization_id = wjsi.organization_id
2270: and wdj.wip_entity_id = wjsi.wip_entity_id) and

Line 2267: wip_constants.nonstandard = (select wdj.job_type

2263: and wdj.wip_entity_id = wjsi.wip_entity_id) /*Fix for Bug 6522139*/
2264: or ( wjsi.net_quantity <> 0
2265: and ((wjsi.load_type = wip_constants.create_ns_job and wjsi.primary_item_id is null) or
2266: (wjsi.load_type = wip_constants.resched_job and
2267: wip_constants.nonstandard = (select wdj.job_type
2268: from wip_discrete_jobs wdj
2269: where wdj.organization_id = wjsi.organization_id
2270: and wdj.wip_entity_id = wjsi.wip_entity_id) and
2271: (select wdj.primary_item_id

Line 2281: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/

2277: if ( sql%rowcount > 0 ) then
2278: fnd_message.set_name('WIP', 'WIP_ML_NET_QUANTITY');
2279: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
2280: end if;
2281: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
2282:
2283: --
2284: -- overcompletion_tolerance_type and overcompletion_tolerance_value
2285: --

Line 2287: set wjsi.process_status = WIP_CONSTANTS.WARNING,

2283: --
2284: -- overcompletion_tolerance_type and overcompletion_tolerance_value
2285: --
2286: update wip_job_schedule_interface wjsi
2287: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2288: wjsi.last_update_date = sysdate
2289: where wjsi.group_id = p_groupID
2290: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2291: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2290: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2286: update wip_job_schedule_interface wjsi
2287: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2288: wjsi.last_update_date = sysdate
2289: where wjsi.group_id = p_groupID
2290: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2291: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2292: and wjsi.overcompletion_tolerance_type is not null
2293: and ( wjsi.load_type = wip_constants.create_sched
2294: or (wjsi.load_type = wip_constants.create_ns_job and

Line 2291: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2287: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2288: wjsi.last_update_date = sysdate
2289: where wjsi.group_id = p_groupID
2290: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2291: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2292: and wjsi.overcompletion_tolerance_type is not null
2293: and ( wjsi.load_type = wip_constants.create_sched
2294: or (wjsi.load_type = wip_constants.create_ns_job and
2295: wjsi.primary_item_id is null))

Line 2293: and ( wjsi.load_type = wip_constants.create_sched

2289: where wjsi.group_id = p_groupID
2290: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2291: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2292: and wjsi.overcompletion_tolerance_type is not null
2293: and ( wjsi.load_type = wip_constants.create_sched
2294: or (wjsi.load_type = wip_constants.create_ns_job and
2295: wjsi.primary_item_id is null))
2296: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2297:

Line 2294: or (wjsi.load_type = wip_constants.create_ns_job and

2290: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2291: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2292: and wjsi.overcompletion_tolerance_type is not null
2293: and ( wjsi.load_type = wip_constants.create_sched
2294: or (wjsi.load_type = wip_constants.create_ns_job and
2295: wjsi.primary_item_id is null))
2296: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2297:
2298: if ( sql%rowcount > 0 ) then

Line 2305: set wjsi.process_status = WIP_CONSTANTS.WARNING,

2301: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationWarning);
2302: end if;
2303:
2304: update wip_job_schedule_interface wjsi
2305: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2306: wjsi.last_update_date = sysdate
2307: where wjsi.group_id = p_groupID
2308: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2309: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2308: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2304: update wip_job_schedule_interface wjsi
2305: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2306: wjsi.last_update_date = sysdate
2307: where wjsi.group_id = p_groupID
2308: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2309: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2310: and wjsi.overcompletion_tolerance_value is not null
2311: and ( wjsi.load_type = wip_constants.create_sched
2312: or (wjsi.load_type = wip_constants.create_ns_job and

Line 2309: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2305: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2306: wjsi.last_update_date = sysdate
2307: where wjsi.group_id = p_groupID
2308: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2309: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2310: and wjsi.overcompletion_tolerance_value is not null
2311: and ( wjsi.load_type = wip_constants.create_sched
2312: or (wjsi.load_type = wip_constants.create_ns_job and
2313: wjsi.primary_item_id is null))

Line 2311: and ( wjsi.load_type = wip_constants.create_sched

2307: where wjsi.group_id = p_groupID
2308: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2309: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2310: and wjsi.overcompletion_tolerance_value is not null
2311: and ( wjsi.load_type = wip_constants.create_sched
2312: or (wjsi.load_type = wip_constants.create_ns_job and
2313: wjsi.primary_item_id is null))
2314: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2315:

Line 2312: or (wjsi.load_type = wip_constants.create_ns_job and

2308: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2309: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2310: and wjsi.overcompletion_tolerance_value is not null
2311: and ( wjsi.load_type = wip_constants.create_sched
2312: or (wjsi.load_type = wip_constants.create_ns_job and
2313: wjsi.primary_item_id is null))
2314: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2315:
2316: if ( sql%rowcount > 0 ) then

Line 2326: set wjsi.process_status = WIP_CONSTANTS.WARNING,

2322: --
2323: -- default due_date
2324: --
2325: update wip_job_schedule_interface wjsi
2326: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2327: wjsi.last_update_date = sysdate
2328: where wjsi.group_id = p_groupID
2329: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2330: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2329: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2325: update wip_job_schedule_interface wjsi
2326: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2327: wjsi.last_update_date = sysdate
2328: where wjsi.group_id = p_groupID
2329: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2330: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2331: and wjsi.due_date is not null
2332: and wjsi.load_type = wip_constants.create_sched
2333: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2330: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2326: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2327: wjsi.last_update_date = sysdate
2328: where wjsi.group_id = p_groupID
2329: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2330: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2331: and wjsi.due_date is not null
2332: and wjsi.load_type = wip_constants.create_sched
2333: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2334:

Line 2332: and wjsi.load_type = wip_constants.create_sched

2328: where wjsi.group_id = p_groupID
2329: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2330: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2331: and wjsi.due_date is not null
2332: and wjsi.load_type = wip_constants.create_sched
2333: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2334:
2335: if ( sql%rowcount > 0 ) then
2336: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');

Line 2345: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2341: update wip_job_schedule_interface wjsi
2342: set wjsi.due_date = wjsi.last_unit_completion_date,
2343: wjsi.last_update_date = sysdate
2344: where wjsi.group_id = p_groupID
2345: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2346: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2347: and wjsi.due_date is null
2348: and wjsi.requested_start_date is null
2349: and wjsi.load_type in (wip_constants.create_job, wip_constants.create_ns_job);

Line 2346: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2342: set wjsi.due_date = wjsi.last_unit_completion_date,
2343: wjsi.last_update_date = sysdate
2344: where wjsi.group_id = p_groupID
2345: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2346: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2347: and wjsi.due_date is null
2348: and wjsi.requested_start_date is null
2349: and wjsi.load_type in (wip_constants.create_job, wip_constants.create_ns_job);
2350:

Line 2349: and wjsi.load_type in (wip_constants.create_job, wip_constants.create_ns_job);

2345: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2346: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2347: and wjsi.due_date is null
2348: and wjsi.requested_start_date is null
2349: and wjsi.load_type in (wip_constants.create_job, wip_constants.create_ns_job);
2350:
2351: --
2352: -- validate date_released
2353: --

Line 2355: set wjsi.process_status = WIP_CONSTANTS.WARNING,

2351: --
2352: -- validate date_released
2353: --
2354: update wip_job_schedule_interface wjsi
2355: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2356: wjsi.last_update_date = sysdate
2357: where wjsi.group_id = p_groupID
2358: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2359: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2358: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2354: update wip_job_schedule_interface wjsi
2355: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2356: wjsi.last_update_date = sysdate
2357: where wjsi.group_id = p_groupID
2358: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2359: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2360: and wjsi.date_released is not null
2361: and wjsi.status_type = wip_constants.unreleased
2362: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2359: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2355: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2356: wjsi.last_update_date = sysdate
2357: where wjsi.group_id = p_groupID
2358: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2359: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2360: and wjsi.date_released is not null
2361: and wjsi.status_type = wip_constants.unreleased
2362: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2363:

Line 2361: and wjsi.status_type = wip_constants.unreleased

2357: where wjsi.group_id = p_groupID
2358: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2359: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2360: and wjsi.date_released is not null
2361: and wjsi.status_type = wip_constants.unreleased
2362: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2363:
2364: if ( sql%rowcount > 0 ) then
2365: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');

Line 2371: set wjsi.process_status = WIP_CONSTANTS.WARNING,

2367: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationWarning);
2368: end if;
2369:
2370: update wip_job_schedule_interface wjsi
2371: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2372: wjsi.last_update_date = sysdate
2373: where wjsi.group_id = p_groupID
2374: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2375: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2374: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2370: update wip_job_schedule_interface wjsi
2371: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2372: wjsi.last_update_date = sysdate
2373: where wjsi.group_id = p_groupID
2374: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2375: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2376: and nvl(wjsi.date_released, sysdate) > sysdate
2377: and wjsi.status_type = wip_constants.released
2378: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2375: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2371: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2372: wjsi.last_update_date = sysdate
2373: where wjsi.group_id = p_groupID
2374: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2375: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2376: and nvl(wjsi.date_released, sysdate) > sysdate
2377: and wjsi.status_type = wip_constants.released
2378: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2379:

Line 2377: and wjsi.status_type = wip_constants.released

2373: where wjsi.group_id = p_groupID
2374: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2375: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2376: and nvl(wjsi.date_released, sysdate) > sysdate
2377: and wjsi.status_type = wip_constants.released
2378: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2379:
2380: if ( sql%rowcount > 0 ) then
2381: fnd_message.set_name('WIP', 'WIP_INVALID_RELEASE_DATE');

Line 2388: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2384: update wip_job_schedule_interface wjsi
2385: set wjsi.date_released = sysdate,
2386: wjsi.last_update_date = sysdate
2387: where wjsi.group_id = p_groupID
2388: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2389: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2390: and wjsi.date_released > sysdate
2391: and wjsi.status_type = wip_constants.released;
2392: end if;

Line 2389: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2385: set wjsi.date_released = sysdate,
2386: wjsi.last_update_date = sysdate
2387: where wjsi.group_id = p_groupID
2388: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2389: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2390: and wjsi.date_released > sysdate
2391: and wjsi.status_type = wip_constants.released;
2392: end if;
2393:

Line 2391: and wjsi.status_type = wip_constants.released;

2387: where wjsi.group_id = p_groupID
2388: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2389: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2390: and wjsi.date_released > sysdate
2391: and wjsi.status_type = wip_constants.released;
2392: end if;
2393:
2394: update wip_job_schedule_interface wjsi
2395: set wjsi.process_status = WIP_CONSTANTS.ERROR,

Line 2395: set wjsi.process_status = WIP_CONSTANTS.ERROR,

2391: and wjsi.status_type = wip_constants.released;
2392: end if;
2393:
2394: update wip_job_schedule_interface wjsi
2395: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2396: wjsi.last_update_date = sysdate
2397: where wjsi.group_id = p_groupID
2398: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2399: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2398: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2394: update wip_job_schedule_interface wjsi
2395: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2396: wjsi.last_update_date = sysdate
2397: where wjsi.group_id = p_groupID
2398: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2399: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2400: and wjsi.status_type = wip_constants.released
2401: and exists (select 1
2402: from wip_discrete_jobs

Line 2399: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2395: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2396: wjsi.last_update_date = sysdate
2397: where wjsi.group_id = p_groupID
2398: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2399: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2400: and wjsi.status_type = wip_constants.released
2401: and exists (select 1
2402: from wip_discrete_jobs
2403: where wip_entity_id = wjsi.wip_entity_id

Line 2400: and wjsi.status_type = wip_constants.released

2396: wjsi.last_update_date = sysdate
2397: where wjsi.group_id = p_groupID
2398: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2399: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2400: and wjsi.status_type = wip_constants.released
2401: and exists (select 1
2402: from wip_discrete_jobs
2403: where wip_entity_id = wjsi.wip_entity_id
2404: and organization_Id = wjsi.organization_id

Line 2406: status_type NOT IN (wip_constants.released,wip_constants.comp_chrg,

2402: from wip_discrete_jobs
2403: where wip_entity_id = wjsi.wip_entity_id
2404: and organization_Id = wjsi.organization_id
2405: and (status_type IS NULL OR
2406: status_type NOT IN (wip_constants.released,wip_constants.comp_chrg,
2407: wip_constants.cancelled, wip_constants.hold)))
2408: and not exists (select 1
2409: from org_acct_periods oap
2410: where oap.organization_id = wjsi.organization_id

Line 2407: wip_constants.cancelled, wip_constants.hold)))

2403: where wip_entity_id = wjsi.wip_entity_id
2404: and organization_Id = wjsi.organization_id
2405: and (status_type IS NULL OR
2406: status_type NOT IN (wip_constants.released,wip_constants.comp_chrg,
2407: wip_constants.cancelled, wip_constants.hold)))
2408: and not exists (select 1
2409: from org_acct_periods oap
2410: where oap.organization_id = wjsi.organization_id
2411: and trunc(INV_LE_TIMEZONE_PUB.GET_LE_DAY_FOR_INV_ORG(nvl(wjsi.date_released,sysdate), wjsi.organization_id))

Line 2426: set wjsi.process_status = WIP_CONSTANTS.WARNING,

2422: --
2423: -- requested_start_date
2424: --
2425: update wip_job_schedule_interface wjsi
2426: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2427: wjsi.last_update_date = sysdate
2428: where wjsi.group_id = p_groupID
2429: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2430: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2429: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2425: update wip_job_schedule_interface wjsi
2426: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2427: wjsi.last_update_date = sysdate
2428: where wjsi.group_id = p_groupID
2429: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2430: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2431: and wjsi.requested_start_date is not null
2432: and wjsi.load_type = wip_constants.create_sched
2433: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2430: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2426: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2427: wjsi.last_update_date = sysdate
2428: where wjsi.group_id = p_groupID
2429: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2430: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2431: and wjsi.requested_start_date is not null
2432: and wjsi.load_type = wip_constants.create_sched
2433: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2434:

Line 2432: and wjsi.load_type = wip_constants.create_sched

2428: where wjsi.group_id = p_groupID
2429: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2430: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2431: and wjsi.requested_start_date is not null
2432: and wjsi.load_type = wip_constants.create_sched
2433: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2434:
2435: if ( sql%rowcount > 0 ) then
2436: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');

Line 2445: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2441: update wip_job_schedule_interface wjsi
2442: set wjsi.requested_start_date = wjsi.first_unit_start_date,
2443: wjsi.last_update_date = sysdate
2444: where wjsi.group_id = p_groupID
2445: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2446: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2447: and wjsi.due_date is null
2448: and wjsi.requested_start_date is null
2449: and wjsi.load_type in (wip_constants.create_job, wip_constants.create_ns_job);

Line 2446: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2442: set wjsi.requested_start_date = wjsi.first_unit_start_date,
2443: wjsi.last_update_date = sysdate
2444: where wjsi.group_id = p_groupID
2445: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2446: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2447: and wjsi.due_date is null
2448: and wjsi.requested_start_date is null
2449: and wjsi.load_type in (wip_constants.create_job, wip_constants.create_ns_job);
2450:

Line 2449: and wjsi.load_type in (wip_constants.create_job, wip_constants.create_ns_job);

2445: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2446: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2447: and wjsi.due_date is null
2448: and wjsi.requested_start_date is null
2449: and wjsi.load_type in (wip_constants.create_job, wip_constants.create_ns_job);
2450:
2451: --
2452: -- header_id
2453: --

Line 2455: set wjsi.process_status = WIP_CONSTANTS.WARNING,

2451: --
2452: -- header_id
2453: --
2454: update wip_job_schedule_interface wjsi
2455: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2456: wjsi.last_update_date = sysdate
2457: where wjsi.group_id = p_groupID
2458: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2459: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2458: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2454: update wip_job_schedule_interface wjsi
2455: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2456: wjsi.last_update_date = sysdate
2457: where wjsi.group_id = p_groupID
2458: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2459: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2460: and wjsi.header_id is not null
2461: and wjsi.load_type = wip_constants.create_sched
2462: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2459: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2455: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2456: wjsi.last_update_date = sysdate
2457: where wjsi.group_id = p_groupID
2458: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2459: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2460: and wjsi.header_id is not null
2461: and wjsi.load_type = wip_constants.create_sched
2462: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2463:

Line 2461: and wjsi.load_type = wip_constants.create_sched

2457: where wjsi.group_id = p_groupID
2458: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2459: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2460: and wjsi.header_id is not null
2461: and wjsi.load_type = wip_constants.create_sched
2462: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2463:
2464: if ( sql%rowcount > 0 ) then
2465: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');

Line 2474: set wjsi.process_status = WIP_CONSTANTS.WARNING,

2470: --
2471: -- default and validate processing_work_days
2472: --
2473: update wip_job_schedule_interface wjsi
2474: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2475: wjsi.last_update_date = sysdate
2476: where wjsi.group_id = p_groupID
2477: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2478: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2477: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2473: update wip_job_schedule_interface wjsi
2474: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2475: wjsi.last_update_date = sysdate
2476: where wjsi.group_id = p_groupID
2477: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2478: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2479: and wjsi.processing_work_days is not null
2480: and wjsi.load_type <> wip_constants.create_sched
2481: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2478: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2474: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2475: wjsi.last_update_date = sysdate
2476: where wjsi.group_id = p_groupID
2477: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2478: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2479: and wjsi.processing_work_days is not null
2480: and wjsi.load_type <> wip_constants.create_sched
2481: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2482:

Line 2480: and wjsi.load_type <> wip_constants.create_sched

2476: where wjsi.group_id = p_groupID
2477: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2478: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2479: and wjsi.processing_work_days is not null
2480: and wjsi.load_type <> wip_constants.create_sched
2481: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2482:
2483: if ( sql%rowcount > 0 ) then
2484: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');

Line 2489: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

2485: fnd_message.set_token('COLUMN', 'PROCESSING_WORK_DAYS', false);
2486: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationWarning);
2487: end if;
2488:
2489: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
2490: update wip_job_schedule_interface wjsi
2491: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2492: wjsi.last_update_date = sysdate
2493: where wjsi.group_id = p_groupID

Line 2491: set wjsi.process_status = WIP_CONSTANTS.ERROR,

2487: end if;
2488:
2489: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
2490: update wip_job_schedule_interface wjsi
2491: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2492: wjsi.last_update_date = sysdate
2493: where wjsi.group_id = p_groupID
2494: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2495: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2494: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2490: update wip_job_schedule_interface wjsi
2491: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2492: wjsi.last_update_date = sysdate
2493: where wjsi.group_id = p_groupID
2494: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2495: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2496: and wjsi.load_type = wip_constants.create_sched
2497: and (wjsi.processing_work_days <= 0 or wjsi.processing_work_days is null)
2498: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2495: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2491: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2492: wjsi.last_update_date = sysdate
2493: where wjsi.group_id = p_groupID
2494: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2495: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2496: and wjsi.load_type = wip_constants.create_sched
2497: and (wjsi.processing_work_days <= 0 or wjsi.processing_work_days is null)
2498: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2499:

Line 2496: and wjsi.load_type = wip_constants.create_sched

2492: wjsi.last_update_date = sysdate
2493: where wjsi.group_id = p_groupID
2494: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2495: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2496: and wjsi.load_type = wip_constants.create_sched
2497: and (wjsi.processing_work_days <= 0 or wjsi.processing_work_days is null)
2498: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2499:
2500: if ( sql%rowcount > 0 ) then

Line 2504: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/

2500: if ( sql%rowcount > 0 ) then
2501: fnd_message.set_name('WIP', 'WIP_ML_PROCESSING_WORK_DAYS');
2502: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
2503: end if;
2504: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
2505:
2506: --
2507: -- default and validate daily_production_rate
2508: --

Line 2510: set wjsi.process_status = WIP_CONSTANTS.WARNING,

2506: --
2507: -- default and validate daily_production_rate
2508: --
2509: update wip_job_schedule_interface wjsi
2510: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2511: wjsi.last_update_date = sysdate
2512: where wjsi.group_id = p_groupID
2513: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2514: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2513: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2509: update wip_job_schedule_interface wjsi
2510: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2511: wjsi.last_update_date = sysdate
2512: where wjsi.group_id = p_groupID
2513: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2514: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2515: and wjsi.daily_production_rate is not null
2516: and wjsi.load_type <> wip_constants.create_sched
2517: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2514: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2510: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2511: wjsi.last_update_date = sysdate
2512: where wjsi.group_id = p_groupID
2513: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2514: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2515: and wjsi.daily_production_rate is not null
2516: and wjsi.load_type <> wip_constants.create_sched
2517: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2518:

Line 2516: and wjsi.load_type <> wip_constants.create_sched

2512: where wjsi.group_id = p_groupID
2513: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2514: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2515: and wjsi.daily_production_rate is not null
2516: and wjsi.load_type <> wip_constants.create_sched
2517: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2518:
2519: if ( sql%rowcount > 0 ) then
2520: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');

Line 2525: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

2521: fnd_message.set_token('COLUMN', 'DAILY_PRODUCTION_RATE', false);
2522: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationWarning);
2523: end if;
2524:
2525: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
2526: update wip_job_schedule_interface wjsi
2527: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2528: wjsi.last_update_date = sysdate
2529: where wjsi.group_id = p_groupID

Line 2527: set wjsi.process_status = WIP_CONSTANTS.ERROR,

2523: end if;
2524:
2525: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
2526: update wip_job_schedule_interface wjsi
2527: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2528: wjsi.last_update_date = sysdate
2529: where wjsi.group_id = p_groupID
2530: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2531: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2530: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2526: update wip_job_schedule_interface wjsi
2527: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2528: wjsi.last_update_date = sysdate
2529: where wjsi.group_id = p_groupID
2530: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2531: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2532: and wjsi.load_type = wip_constants.create_sched
2533: and (wjsi.daily_production_rate <= 0 or wjsi.daily_production_rate is null)
2534: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2531: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2527: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2528: wjsi.last_update_date = sysdate
2529: where wjsi.group_id = p_groupID
2530: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2531: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2532: and wjsi.load_type = wip_constants.create_sched
2533: and (wjsi.daily_production_rate <= 0 or wjsi.daily_production_rate is null)
2534: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2535:

Line 2532: and wjsi.load_type = wip_constants.create_sched

2528: wjsi.last_update_date = sysdate
2529: where wjsi.group_id = p_groupID
2530: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2531: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2532: and wjsi.load_type = wip_constants.create_sched
2533: and (wjsi.daily_production_rate <= 0 or wjsi.daily_production_rate is null)
2534: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2535:
2536: if ( sql%rowcount > 0 ) then

Line 2540: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/

2536: if ( sql%rowcount > 0 ) then
2537: fnd_message.set_name('WIP', 'WIP_ML_PROCESSING_WORK_DAYS');
2538: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
2539: end if;
2540: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
2541:
2542: --
2543: -- default and validate demand_class
2544: --

Line 2546: set wjsi.process_status = WIP_CONSTANTS.WARNING,

2542: --
2543: -- default and validate demand_class
2544: --
2545: update wip_job_schedule_interface wjsi
2546: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2547: wjsi.last_update_date = sysdate
2548: where wjsi.group_id = p_groupID
2549: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2550: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2549: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2545: update wip_job_schedule_interface wjsi
2546: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2547: wjsi.last_update_date = sysdate
2548: where wjsi.group_id = p_groupID
2549: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2550: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2551: and wjsi.demand_class is not null
2552: and wjsi.load_type = wip_constants.resched_job
2553: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2550: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2546: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2547: wjsi.last_update_date = sysdate
2548: where wjsi.group_id = p_groupID
2549: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2550: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2551: and wjsi.demand_class is not null
2552: and wjsi.load_type = wip_constants.resched_job
2553: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2554:

Line 2552: and wjsi.load_type = wip_constants.resched_job

2548: where wjsi.group_id = p_groupID
2549: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2550: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2551: and wjsi.demand_class is not null
2552: and wjsi.load_type = wip_constants.resched_job
2553: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2554:
2555: if ( sql%rowcount > 0 ) then
2556: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');

Line 2562: set wjsi.process_status = WIP_CONSTANTS.ERROR,

2558: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationWarning);
2559: end if;
2560:
2561: update wip_job_schedule_interface wjsi
2562: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2563: wjsi.last_update_date = sysdate
2564: where wjsi.group_id = p_groupID
2565: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2566: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2565: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2561: update wip_job_schedule_interface wjsi
2562: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2563: wjsi.last_update_date = sysdate
2564: where wjsi.group_id = p_groupID
2565: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2566: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2567: and wjsi.load_type in (wip_constants.create_sched,
2568: wip_constants.create_job,
2569: wip_constants.create_ns_job)

Line 2566: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2562: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2563: wjsi.last_update_date = sysdate
2564: where wjsi.group_id = p_groupID
2565: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2566: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2567: and wjsi.load_type in (wip_constants.create_sched,
2568: wip_constants.create_job,
2569: wip_constants.create_ns_job)
2570: and wjsi.demand_class is not null

Line 2567: and wjsi.load_type in (wip_constants.create_sched,

2563: wjsi.last_update_date = sysdate
2564: where wjsi.group_id = p_groupID
2565: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2566: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2567: and wjsi.load_type in (wip_constants.create_sched,
2568: wip_constants.create_job,
2569: wip_constants.create_ns_job)
2570: and wjsi.demand_class is not null
2571: and not exists (select 1

Line 2568: wip_constants.create_job,

2564: where wjsi.group_id = p_groupID
2565: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2566: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2567: and wjsi.load_type in (wip_constants.create_sched,
2568: wip_constants.create_job,
2569: wip_constants.create_ns_job)
2570: and wjsi.demand_class is not null
2571: and not exists (select 1
2572: from so_demand_classes_active_v sdc

Line 2569: wip_constants.create_ns_job)

2565: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2566: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2567: and wjsi.load_type in (wip_constants.create_sched,
2568: wip_constants.create_job,
2569: wip_constants.create_ns_job)
2570: and wjsi.demand_class is not null
2571: and not exists (select 1
2572: from so_demand_classes_active_v sdc
2573: where sdc.demand_class_code = wjsi.demand_class)

Line 2585: set wjsi.process_status = WIP_CONSTANTS.WARNING,

2581: --
2582: -- default and validate completion_subinventory
2583: --
2584: update wip_job_schedule_interface wjsi
2585: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2586: wjsi.last_update_date = sysdate
2587: where wjsi.group_id = p_groupID
2588: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2589: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2588: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2584: update wip_job_schedule_interface wjsi
2585: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2586: wjsi.last_update_date = sysdate
2587: where wjsi.group_id = p_groupID
2588: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2589: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2590: and wjsi.completion_subinventory is not null
2591: and wjsi.load_type in (wip_constants.resched_job,
2592: wip_constants.create_sched)

Line 2589: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2585: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2586: wjsi.last_update_date = sysdate
2587: where wjsi.group_id = p_groupID
2588: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2589: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2590: and wjsi.completion_subinventory is not null
2591: and wjsi.load_type in (wip_constants.resched_job,
2592: wip_constants.create_sched)
2593: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2591: and wjsi.load_type in (wip_constants.resched_job,

2587: where wjsi.group_id = p_groupID
2588: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2589: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2590: and wjsi.completion_subinventory is not null
2591: and wjsi.load_type in (wip_constants.resched_job,
2592: wip_constants.create_sched)
2593: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2594:
2595: if ( sql%rowcount > 0 ) then

Line 2592: wip_constants.create_sched)

2588: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2589: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2590: and wjsi.completion_subinventory is not null
2591: and wjsi.load_type in (wip_constants.resched_job,
2592: wip_constants.create_sched)
2593: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2594:
2595: if ( sql%rowcount > 0 ) then
2596: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');

Line 2608: wip_constants.create_job,

2604: from bom_operational_routings bor
2605: where bor.organization_id = wjsi.organization_id
2606: and nvl(bor.cfm_routing_flag,2) = 2
2607: and bor.assembly_item_id = Decode(wjsi.load_type,
2608: wip_constants.create_job,
2609: wjsi.primary_item_id,
2610: wip_constants.create_ns_job,
2611: nvl(wjsi.routing_reference_id,wjsi.primary_item_id)) -- Bug 9765343 for ns job
2612: and nvl(bor.alternate_routing_designator,'@@@') =

Line 2610: wip_constants.create_ns_job,

2606: and nvl(bor.cfm_routing_flag,2) = 2
2607: and bor.assembly_item_id = Decode(wjsi.load_type,
2608: wip_constants.create_job,
2609: wjsi.primary_item_id,
2610: wip_constants.create_ns_job,
2611: nvl(wjsi.routing_reference_id,wjsi.primary_item_id)) -- Bug 9765343 for ns job
2612: and nvl(bor.alternate_routing_designator,'@@@') =
2613: nvl(wjsi.alternate_routing_designator, '@@@')),
2614: wjsi.last_update_date = sysdate

Line 2616: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2612: and nvl(bor.alternate_routing_designator,'@@@') =
2613: nvl(wjsi.alternate_routing_designator, '@@@')),
2614: wjsi.last_update_date = sysdate
2615: where wjsi.group_id = p_groupID
2616: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2617: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2618: and wjsi.completion_subinventory is null
2619: and wjsi.load_type IN (wip_constants.create_job,
2620: wip_constants.create_ns_job) ; -- Bug 9765343 for ns job

Line 2617: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2613: nvl(wjsi.alternate_routing_designator, '@@@')),
2614: wjsi.last_update_date = sysdate
2615: where wjsi.group_id = p_groupID
2616: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2617: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2618: and wjsi.completion_subinventory is null
2619: and wjsi.load_type IN (wip_constants.create_job,
2620: wip_constants.create_ns_job) ; -- Bug 9765343 for ns job
2621:

Line 2619: and wjsi.load_type IN (wip_constants.create_job,

2615: where wjsi.group_id = p_groupID
2616: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2617: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2618: and wjsi.completion_subinventory is null
2619: and wjsi.load_type IN (wip_constants.create_job,
2620: wip_constants.create_ns_job) ; -- Bug 9765343 for ns job
2621:
2622: update wip_job_schedule_interface wjsi
2623: set wjsi.process_status = WIP_CONSTANTS.ERROR,

Line 2620: wip_constants.create_ns_job) ; -- Bug 9765343 for ns job

2616: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2617: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2618: and wjsi.completion_subinventory is null
2619: and wjsi.load_type IN (wip_constants.create_job,
2620: wip_constants.create_ns_job) ; -- Bug 9765343 for ns job
2621:
2622: update wip_job_schedule_interface wjsi
2623: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2624: wjsi.last_update_date = sysdate

Line 2623: set wjsi.process_status = WIP_CONSTANTS.ERROR,

2619: and wjsi.load_type IN (wip_constants.create_job,
2620: wip_constants.create_ns_job) ; -- Bug 9765343 for ns job
2621:
2622: update wip_job_schedule_interface wjsi
2623: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2624: wjsi.last_update_date = sysdate
2625: where wjsi.group_id = p_groupID
2626: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2627: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2626: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2622: update wip_job_schedule_interface wjsi
2623: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2624: wjsi.last_update_date = sysdate
2625: where wjsi.group_id = p_groupID
2626: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2627: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2628: and wjsi.load_type = wip_constants.create_ns_job
2629: and wjsi.primary_item_id is null
2630: and wjsi.completion_subinventory is not null

Line 2627: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2623: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2624: wjsi.last_update_date = sysdate
2625: where wjsi.group_id = p_groupID
2626: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2627: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2628: and wjsi.load_type = wip_constants.create_ns_job
2629: and wjsi.primary_item_id is null
2630: and wjsi.completion_subinventory is not null
2631: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2628: and wjsi.load_type = wip_constants.create_ns_job

2624: wjsi.last_update_date = sysdate
2625: where wjsi.group_id = p_groupID
2626: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2627: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2628: and wjsi.load_type = wip_constants.create_ns_job
2629: and wjsi.primary_item_id is null
2630: and wjsi.completion_subinventory is not null
2631: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2632:

Line 2642: set wjsi.process_status = WIP_CONSTANTS.WARNING,

2638: --
2639: -- Default completion_locator_id
2640: --
2641: update wip_job_schedule_interface wjsi
2642: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2643: wjsi.last_update_date = sysdate
2644: where wjsi.group_id = p_groupID
2645: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2646: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2645: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2641: update wip_job_schedule_interface wjsi
2642: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2643: wjsi.last_update_date = sysdate
2644: where wjsi.group_id = p_groupID
2645: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2646: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2647: and wjsi.completion_locator_id is not null
2648: and wjsi.load_type in (wip_constants.resched_job,
2649: wip_constants.create_sched)

Line 2646: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2642: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2643: wjsi.last_update_date = sysdate
2644: where wjsi.group_id = p_groupID
2645: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2646: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2647: and wjsi.completion_locator_id is not null
2648: and wjsi.load_type in (wip_constants.resched_job,
2649: wip_constants.create_sched)
2650: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2648: and wjsi.load_type in (wip_constants.resched_job,

2644: where wjsi.group_id = p_groupID
2645: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2646: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2647: and wjsi.completion_locator_id is not null
2648: and wjsi.load_type in (wip_constants.resched_job,
2649: wip_constants.create_sched)
2650: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2651:
2652: if ( sql%rowcount > 0 ) then

Line 2649: wip_constants.create_sched)

2645: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2646: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2647: and wjsi.completion_locator_id is not null
2648: and wjsi.load_type in (wip_constants.resched_job,
2649: wip_constants.create_sched)
2650: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2651:
2652: if ( sql%rowcount > 0 ) then
2653: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');

Line 2659: set wjsi.process_status = WIP_CONSTANTS.WARNING,

2655: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationWarning);
2656: end if;
2657:
2658: update wip_job_schedule_interface wjsi
2659: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2660: wjsi.last_update_date = sysdate
2661: where wjsi.group_id = p_groupID
2662: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2663: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2662: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2658: update wip_job_schedule_interface wjsi
2659: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2660: wjsi.last_update_date = sysdate
2661: where wjsi.group_id = p_groupID
2662: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2663: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2664: and wjsi.completion_locator_id is not null
2665: and wjsi.completion_locator_segments is not null
2666: and wjsi.load_type in (wip_constants.create_job,

Line 2663: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2659: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2660: wjsi.last_update_date = sysdate
2661: where wjsi.group_id = p_groupID
2662: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2663: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2664: and wjsi.completion_locator_id is not null
2665: and wjsi.completion_locator_segments is not null
2666: and wjsi.load_type in (wip_constants.create_job,
2667: wip_constants.create_ns_job)

Line 2666: and wjsi.load_type in (wip_constants.create_job,

2662: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2663: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2664: and wjsi.completion_locator_id is not null
2665: and wjsi.completion_locator_segments is not null
2666: and wjsi.load_type in (wip_constants.create_job,
2667: wip_constants.create_ns_job)
2668: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2669:
2670: if ( sql%rowcount > 0 ) then

Line 2667: wip_constants.create_ns_job)

2663: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2664: and wjsi.completion_locator_id is not null
2665: and wjsi.completion_locator_segments is not null
2666: and wjsi.load_type in (wip_constants.create_job,
2667: wip_constants.create_ns_job)
2668: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2669:
2670: if ( sql%rowcount > 0 ) then
2671: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');

Line 2683: wip_constants.create_job,

2679: from bom_operational_routings bor
2680: where bor.organization_id = wjsi.organization_id
2681: and nvl(bor.cfm_routing_flag, 2) = 2
2682: and bor.assembly_item_id = Decode(wjsi.load_type,
2683: wip_constants.create_job,
2684: wjsi.primary_item_id,
2685: wip_constants.create_ns_job,
2686: nvl(wjsi.routing_reference_id,wjsi.primary_item_id)) -- Bug 9765343 for ns job
2687: and nvl(bor.alternate_routing_designator,'@@@') =

Line 2685: wip_constants.create_ns_job,

2681: and nvl(bor.cfm_routing_flag, 2) = 2
2682: and bor.assembly_item_id = Decode(wjsi.load_type,
2683: wip_constants.create_job,
2684: wjsi.primary_item_id,
2685: wip_constants.create_ns_job,
2686: nvl(wjsi.routing_reference_id,wjsi.primary_item_id)) -- Bug 9765343 for ns job
2687: and nvl(bor.alternate_routing_designator,'@@@') =
2688: nvl(wjsi.alternate_routing_designator, '@@@')
2689: and bor.completion_subinventory = wjsi.completion_subinventory),

Line 2692: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2688: nvl(wjsi.alternate_routing_designator, '@@@')
2689: and bor.completion_subinventory = wjsi.completion_subinventory),
2690: wjsi.last_update_date = sysdate
2691: where wjsi.group_id = p_groupID
2692: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2693: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2694: and wjsi.completion_locator_id is null
2695: and wjsi.completion_locator_segments is null
2696: and wjsi.load_type IN (wip_constants.create_job,

Line 2693: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2689: and bor.completion_subinventory = wjsi.completion_subinventory),
2690: wjsi.last_update_date = sysdate
2691: where wjsi.group_id = p_groupID
2692: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2693: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2694: and wjsi.completion_locator_id is null
2695: and wjsi.completion_locator_segments is null
2696: and wjsi.load_type IN (wip_constants.create_job,
2697: wip_constants.create_ns_job) ; -- Bug 9765343 for ns job

Line 2696: and wjsi.load_type IN (wip_constants.create_job,

2692: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2693: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2694: and wjsi.completion_locator_id is null
2695: and wjsi.completion_locator_segments is null
2696: and wjsi.load_type IN (wip_constants.create_job,
2697: wip_constants.create_ns_job) ; -- Bug 9765343 for ns job
2698:
2699: update wip_job_schedule_interface wjsi
2700: set wjsi.process_status = WIP_CONSTANTS.ERROR,

Line 2697: wip_constants.create_ns_job) ; -- Bug 9765343 for ns job

2693: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2694: and wjsi.completion_locator_id is null
2695: and wjsi.completion_locator_segments is null
2696: and wjsi.load_type IN (wip_constants.create_job,
2697: wip_constants.create_ns_job) ; -- Bug 9765343 for ns job
2698:
2699: update wip_job_schedule_interface wjsi
2700: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2701: wjsi.last_update_date = sysdate

Line 2700: set wjsi.process_status = WIP_CONSTANTS.ERROR,

2696: and wjsi.load_type IN (wip_constants.create_job,
2697: wip_constants.create_ns_job) ; -- Bug 9765343 for ns job
2698:
2699: update wip_job_schedule_interface wjsi
2700: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2701: wjsi.last_update_date = sysdate
2702: where wjsi.group_id = p_groupID
2703: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2704: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2703: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2699: update wip_job_schedule_interface wjsi
2700: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2701: wjsi.last_update_date = sysdate
2702: where wjsi.group_id = p_groupID
2703: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2704: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2705: and wjsi.load_type in (wip_constants.create_ns_job, wip_constants.create_job)
2706: and wjsi.completion_subinventory is null
2707: and wjsi.completion_locator_id is not null

Line 2704: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2700: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2701: wjsi.last_update_date = sysdate
2702: where wjsi.group_id = p_groupID
2703: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2704: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2705: and wjsi.load_type in (wip_constants.create_ns_job, wip_constants.create_job)
2706: and wjsi.completion_subinventory is null
2707: and wjsi.completion_locator_id is not null
2708: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2705: and wjsi.load_type in (wip_constants.create_ns_job, wip_constants.create_job)

2701: wjsi.last_update_date = sysdate
2702: where wjsi.group_id = p_groupID
2703: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2704: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2705: and wjsi.load_type in (wip_constants.create_ns_job, wip_constants.create_job)
2706: and wjsi.completion_subinventory is null
2707: and wjsi.completion_locator_id is not null
2708: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2709:

Line 2719: set wjsi.process_status = WIP_CONSTANTS.WARNING,

2715: --
2716: -- default and validate lot_number
2717: --
2718: update wip_job_schedule_interface wjsi
2719: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2720: wjsi.last_update_date = sysdate
2721: where wjsi.group_id = p_groupID
2722: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2723: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2722: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2718: update wip_job_schedule_interface wjsi
2719: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2720: wjsi.last_update_date = sysdate
2721: where wjsi.group_id = p_groupID
2722: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2723: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2724: and wjsi.lot_number is not null
2725: and wjsi.load_type = wip_constants.create_sched
2726: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2723: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2719: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2720: wjsi.last_update_date = sysdate
2721: where wjsi.group_id = p_groupID
2722: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2723: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2724: and wjsi.lot_number is not null
2725: and wjsi.load_type = wip_constants.create_sched
2726: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2727:

Line 2725: and wjsi.load_type = wip_constants.create_sched

2721: where wjsi.group_id = p_groupID
2722: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2723: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2724: and wjsi.lot_number is not null
2725: and wjsi.load_type = wip_constants.create_sched
2726: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2727:
2728: if ( sql%rowcount > 0 ) then
2729: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');

Line 2738: set wjsi.process_status = WIP_CONSTANTS.WARNING,

2734: --
2735: -- default and validate source_code and source_line_id
2736: --
2737: update wip_job_schedule_interface wjsi
2738: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2739: wjsi.last_update_date = sysdate
2740: where wjsi.group_id = p_groupID
2741: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2742: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2741: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2737: update wip_job_schedule_interface wjsi
2738: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2739: wjsi.last_update_date = sysdate
2740: where wjsi.group_id = p_groupID
2741: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2742: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2743: and wjsi.source_code is not null
2744: and wjsi.load_type = wip_constants.create_sched
2745: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2742: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2738: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2739: wjsi.last_update_date = sysdate
2740: where wjsi.group_id = p_groupID
2741: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2742: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2743: and wjsi.source_code is not null
2744: and wjsi.load_type = wip_constants.create_sched
2745: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2746:

Line 2744: and wjsi.load_type = wip_constants.create_sched

2740: where wjsi.group_id = p_groupID
2741: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2742: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2743: and wjsi.source_code is not null
2744: and wjsi.load_type = wip_constants.create_sched
2745: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2746:
2747: if ( sql%rowcount > 0 ) then
2748: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');

Line 2754: set wjsi.process_status = WIP_CONSTANTS.WARNING,

2750: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationWarning);
2751: end if;
2752:
2753: update wip_job_schedule_interface wjsi
2754: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2755: wjsi.last_update_date = sysdate
2756: where wjsi.group_id = p_groupID
2757: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2758: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2757: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2753: update wip_job_schedule_interface wjsi
2754: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2755: wjsi.last_update_date = sysdate
2756: where wjsi.group_id = p_groupID
2757: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2758: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2759: and wjsi.source_line_id is not null
2760: and wjsi.load_type = wip_constants.create_sched
2761: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2758: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2754: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2755: wjsi.last_update_date = sysdate
2756: where wjsi.group_id = p_groupID
2757: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2758: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2759: and wjsi.source_line_id is not null
2760: and wjsi.load_type = wip_constants.create_sched
2761: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2762:

Line 2760: and wjsi.load_type = wip_constants.create_sched

2756: where wjsi.group_id = p_groupID
2757: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2758: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2759: and wjsi.source_line_id is not null
2760: and wjsi.load_type = wip_constants.create_sched
2761: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2762:
2763: if ( sql%rowcount > 0 ) then
2764: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');

Line 2773: set wjsi.process_status = WIP_CONSTANTS.WARNING,

2769: --
2770: -- default and validate scheduling_method
2771: --
2772: update wip_job_schedule_interface wjsi
2773: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2774: wjsi.last_update_date = sysdate
2775: where wjsi.group_id = p_groupID
2776: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2777: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2776: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2772: update wip_job_schedule_interface wjsi
2773: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2774: wjsi.last_update_date = sysdate
2775: where wjsi.group_id = p_groupID
2776: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2777: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2778: and wjsi.scheduling_method is not null
2779: and wjsi.load_type = wip_constants.create_sched
2780: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2777: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2773: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2774: wjsi.last_update_date = sysdate
2775: where wjsi.group_id = p_groupID
2776: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2777: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2778: and wjsi.scheduling_method is not null
2779: and wjsi.load_type = wip_constants.create_sched
2780: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2781:

Line 2779: and wjsi.load_type = wip_constants.create_sched

2775: where wjsi.group_id = p_groupID
2776: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2777: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2778: and wjsi.scheduling_method is not null
2779: and wjsi.load_type = wip_constants.create_sched
2780: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2781:
2782: if ( sql%rowcount > 0 ) then
2783: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');

Line 2790: set wjsi.scheduling_method = wip_constants.ml_manual,

2786: end if;
2787:
2788: /*bug 7568044: setting scheduling_method to be manual for a non-standard discrete job in case when no routing reference is provided*/
2789: update wip_job_schedule_interface wjsi
2790: set wjsi.scheduling_method = wip_constants.ml_manual,
2791: wjsi.last_update_date = sysdate
2792: where wjsi.group_id = p_groupID
2793: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2794: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2793: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2789: update wip_job_schedule_interface wjsi
2790: set wjsi.scheduling_method = wip_constants.ml_manual,
2791: wjsi.last_update_date = sysdate
2792: where wjsi.group_id = p_groupID
2793: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2794: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2795: and wjsi.scheduling_method is null
2796: and wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
2797: and wjsi.routing_reference_id is null;

Line 2794: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2790: set wjsi.scheduling_method = wip_constants.ml_manual,
2791: wjsi.last_update_date = sysdate
2792: where wjsi.group_id = p_groupID
2793: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2794: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2795: and wjsi.scheduling_method is null
2796: and wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
2797: and wjsi.routing_reference_id is null;
2798:

Line 2796: and wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB

2792: where wjsi.group_id = p_groupID
2793: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2794: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2795: and wjsi.scheduling_method is null
2796: and wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
2797: and wjsi.routing_reference_id is null;
2798:
2799: update wip_job_schedule_interface wjsi
2800: set wjsi.scheduling_method = wip_constants.routing,

Line 2800: set wjsi.scheduling_method = wip_constants.routing,

2796: and wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
2797: and wjsi.routing_reference_id is null;
2798:
2799: update wip_job_schedule_interface wjsi
2800: set wjsi.scheduling_method = wip_constants.routing,
2801: wjsi.last_update_date = sysdate
2802: where wjsi.group_id = p_groupID
2803: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2804: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2803: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2799: update wip_job_schedule_interface wjsi
2800: set wjsi.scheduling_method = wip_constants.routing,
2801: wjsi.last_update_date = sysdate
2802: where wjsi.group_id = p_groupID
2803: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2804: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2805: and wjsi.scheduling_method is null
2806: and ( wjsi.allow_explosion is null
2807: or upper(wjsi.allow_explosion) <> 'N');

Line 2804: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2800: set wjsi.scheduling_method = wip_constants.routing,
2801: wjsi.last_update_date = sysdate
2802: where wjsi.group_id = p_groupID
2803: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2804: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2805: and wjsi.scheduling_method is null
2806: and ( wjsi.allow_explosion is null
2807: or upper(wjsi.allow_explosion) <> 'N');
2808:

Line 2810: set wjsi.scheduling_method = wip_constants.ml_manual,

2806: and ( wjsi.allow_explosion is null
2807: or upper(wjsi.allow_explosion) <> 'N');
2808:
2809: update wip_job_schedule_interface wjsi
2810: set wjsi.scheduling_method = wip_constants.ml_manual,
2811: wjsi.last_update_date = sysdate
2812: where wjsi.group_id = p_groupID
2813: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2814: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2813: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2809: update wip_job_schedule_interface wjsi
2810: set wjsi.scheduling_method = wip_constants.ml_manual,
2811: wjsi.last_update_date = sysdate
2812: where wjsi.group_id = p_groupID
2813: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2814: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2815: and wjsi.scheduling_method is null
2816: and upper(wjsi.allow_explosion) = 'N';
2817:

Line 2814: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2810: set wjsi.scheduling_method = wip_constants.ml_manual,
2811: wjsi.last_update_date = sysdate
2812: where wjsi.group_id = p_groupID
2813: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2814: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2815: and wjsi.scheduling_method is null
2816: and upper(wjsi.allow_explosion) = 'N';
2817:
2818: update wip_job_schedule_interface wjsi

Line 2819: set wjsi.process_status = WIP_CONSTANTS.ERROR,

2815: and wjsi.scheduling_method is null
2816: and upper(wjsi.allow_explosion) = 'N';
2817:
2818: update wip_job_schedule_interface wjsi
2819: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2820: wjsi.last_update_date = sysdate
2821: where wjsi.group_id = p_groupID
2822: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2823: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2822: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2818: update wip_job_schedule_interface wjsi
2819: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2820: wjsi.last_update_date = sysdate
2821: where wjsi.group_id = p_groupID
2822: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2823: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2824: and wjsi.load_type in (wip_constants.create_ns_job,
2825: wip_constants.create_job,
2826: wip_constants.resched_job)

Line 2823: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2819: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2820: wjsi.last_update_date = sysdate
2821: where wjsi.group_id = p_groupID
2822: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2823: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2824: and wjsi.load_type in (wip_constants.create_ns_job,
2825: wip_constants.create_job,
2826: wip_constants.resched_job)
2827: and wjsi.scheduling_method not in (wip_constants.routing,

Line 2824: and wjsi.load_type in (wip_constants.create_ns_job,

2820: wjsi.last_update_date = sysdate
2821: where wjsi.group_id = p_groupID
2822: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2823: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2824: and wjsi.load_type in (wip_constants.create_ns_job,
2825: wip_constants.create_job,
2826: wip_constants.resched_job)
2827: and wjsi.scheduling_method not in (wip_constants.routing,
2828: wip_constants.leadtime,

Line 2825: wip_constants.create_job,

2821: where wjsi.group_id = p_groupID
2822: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2823: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2824: and wjsi.load_type in (wip_constants.create_ns_job,
2825: wip_constants.create_job,
2826: wip_constants.resched_job)
2827: and wjsi.scheduling_method not in (wip_constants.routing,
2828: wip_constants.leadtime,
2829: wip_constants.ml_manual)

Line 2826: wip_constants.resched_job)

2822: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2823: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2824: and wjsi.load_type in (wip_constants.create_ns_job,
2825: wip_constants.create_job,
2826: wip_constants.resched_job)
2827: and wjsi.scheduling_method not in (wip_constants.routing,
2828: wip_constants.leadtime,
2829: wip_constants.ml_manual)
2830: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2827: and wjsi.scheduling_method not in (wip_constants.routing,

2823: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2824: and wjsi.load_type in (wip_constants.create_ns_job,
2825: wip_constants.create_job,
2826: wip_constants.resched_job)
2827: and wjsi.scheduling_method not in (wip_constants.routing,
2828: wip_constants.leadtime,
2829: wip_constants.ml_manual)
2830: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2831:

Line 2828: wip_constants.leadtime,

2824: and wjsi.load_type in (wip_constants.create_ns_job,
2825: wip_constants.create_job,
2826: wip_constants.resched_job)
2827: and wjsi.scheduling_method not in (wip_constants.routing,
2828: wip_constants.leadtime,
2829: wip_constants.ml_manual)
2830: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2831:
2832: if ( sql%rowcount > 0 ) then

Line 2829: wip_constants.ml_manual)

2825: wip_constants.create_job,
2826: wip_constants.resched_job)
2827: and wjsi.scheduling_method not in (wip_constants.routing,
2828: wip_constants.leadtime,
2829: wip_constants.ml_manual)
2830: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2831:
2832: if ( sql%rowcount > 0 ) then
2833: fnd_message.set_name('WIP', 'WIP_ML_SCHEDULING_METHOD');

Line 2838: set wjsi.process_status = WIP_CONSTANTS.ERROR,

2834: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
2835: end if;
2836:
2837: update wip_job_schedule_interface wjsi
2838: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2839: wjsi.last_update_date = sysdate
2840: where wjsi.group_id = p_groupID
2841: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2842: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2841: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2837: update wip_job_schedule_interface wjsi
2838: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2839: wjsi.last_update_date = sysdate
2840: where wjsi.group_id = p_groupID
2841: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2842: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2843: and ( (wjsi.scheduling_method = wip_constants.leadtime
2844: and ((wjsi.load_type = wip_constants.create_ns_job and
2845: wjsi.routing_reference_id is null) or

Line 2842: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2838: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2839: wjsi.last_update_date = sysdate
2840: where wjsi.group_id = p_groupID
2841: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2842: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2843: and ( (wjsi.scheduling_method = wip_constants.leadtime
2844: and ((wjsi.load_type = wip_constants.create_ns_job and
2845: wjsi.routing_reference_id is null) or
2846: (wjsi.load_type = wip_constants.resched_job and

Line 2843: and ( (wjsi.scheduling_method = wip_constants.leadtime

2839: wjsi.last_update_date = sysdate
2840: where wjsi.group_id = p_groupID
2841: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2842: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2843: and ( (wjsi.scheduling_method = wip_constants.leadtime
2844: and ((wjsi.load_type = wip_constants.create_ns_job and
2845: wjsi.routing_reference_id is null) or
2846: (wjsi.load_type = wip_constants.resched_job and
2847: (select wdj.job_type

Line 2844: and ((wjsi.load_type = wip_constants.create_ns_job and

2840: where wjsi.group_id = p_groupID
2841: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2842: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2843: and ( (wjsi.scheduling_method = wip_constants.leadtime
2844: and ((wjsi.load_type = wip_constants.create_ns_job and
2845: wjsi.routing_reference_id is null) or
2846: (wjsi.load_type = wip_constants.resched_job and
2847: (select wdj.job_type
2848: from wip_discrete_jobs wdj

Line 2846: (wjsi.load_type = wip_constants.resched_job and

2842: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2843: and ( (wjsi.scheduling_method = wip_constants.leadtime
2844: and ((wjsi.load_type = wip_constants.create_ns_job and
2845: wjsi.routing_reference_id is null) or
2846: (wjsi.load_type = wip_constants.resched_job and
2847: (select wdj.job_type
2848: from wip_discrete_jobs wdj
2849: where wdj.organization_id = wjsi.organization_id
2850: and wdj.wip_entity_id = wjsi.wip_entity_id) = wip_constants.nonstandard and

Line 2850: and wdj.wip_entity_id = wjsi.wip_entity_id) = wip_constants.nonstandard and

2846: (wjsi.load_type = wip_constants.resched_job and
2847: (select wdj.job_type
2848: from wip_discrete_jobs wdj
2849: where wdj.organization_id = wjsi.organization_id
2850: and wdj.wip_entity_id = wjsi.wip_entity_id) = wip_constants.nonstandard and
2851: (select wdj.routing_reference_id
2852: from wip_discrete_jobs wdj
2853: where wdj.organization_id = wjsi.organization_id
2854: and wdj.wip_entity_id = wjsi.wip_entity_id) is null)))

Line 2855: or (wjsi.scheduling_method = wip_constants.ml_manual

2851: (select wdj.routing_reference_id
2852: from wip_discrete_jobs wdj
2853: where wdj.organization_id = wjsi.organization_id
2854: and wdj.wip_entity_id = wjsi.wip_entity_id) is null)))
2855: or (wjsi.scheduling_method = wip_constants.ml_manual
2856: and (wjsi.first_unit_start_date is null or
2857: wjsi.last_unit_completion_date is null or
2858: wjsi.first_unit_start_date > wjsi.last_unit_completion_date)))
2859: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2867: set wjsi.process_status = WIP_CONSTANTS.ERROR,

2863: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
2864: end if;
2865:
2866: update wip_job_schedule_interface wjsi
2867: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2868: wjsi.last_update_date = sysdate
2869: where wjsi.group_id = p_groupID
2870: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2871: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2870: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2866: update wip_job_schedule_interface wjsi
2867: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2868: wjsi.last_update_date = sysdate
2869: where wjsi.group_id = p_groupID
2870: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2871: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2872: and wjsi.scheduling_method = wip_constants.routing
2873: and wjsi.allow_explosion in ('n', 'N')
2874: and wjsi.load_type = wip_constants.create_job

Line 2871: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2867: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2868: wjsi.last_update_date = sysdate
2869: where wjsi.group_id = p_groupID
2870: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2871: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2872: and wjsi.scheduling_method = wip_constants.routing
2873: and wjsi.allow_explosion in ('n', 'N')
2874: and wjsi.load_type = wip_constants.create_job
2875: and (wjsi.first_unit_start_date is null or

Line 2872: and wjsi.scheduling_method = wip_constants.routing

2868: wjsi.last_update_date = sysdate
2869: where wjsi.group_id = p_groupID
2870: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2871: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2872: and wjsi.scheduling_method = wip_constants.routing
2873: and wjsi.allow_explosion in ('n', 'N')
2874: and wjsi.load_type = wip_constants.create_job
2875: and (wjsi.first_unit_start_date is null or
2876: wjsi.last_unit_completion_date is null)

Line 2874: and wjsi.load_type = wip_constants.create_job

2870: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2871: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2872: and wjsi.scheduling_method = wip_constants.routing
2873: and wjsi.allow_explosion in ('n', 'N')
2874: and wjsi.load_type = wip_constants.create_job
2875: and (wjsi.first_unit_start_date is null or
2876: wjsi.last_unit_completion_date is null)
2877: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2878:

Line 2888: set wjsi.process_status = WIP_CONSTANTS.WARNING,

2884: --
2885: -- default and validate allow_explosion
2886: --
2887: update wip_job_schedule_interface wjsi
2888: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2889: wjsi.last_update_date = sysdate
2890: where wjsi.group_id = p_groupID
2891: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2892: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2891: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2887: update wip_job_schedule_interface wjsi
2888: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2889: wjsi.last_update_date = sysdate
2890: where wjsi.group_id = p_groupID
2891: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2892: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2893: and wjsi.allow_explosion is not null
2894: and wjsi.load_type = wip_constants.create_sched
2895: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2892: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2888: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2889: wjsi.last_update_date = sysdate
2890: where wjsi.group_id = p_groupID
2891: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2892: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2893: and wjsi.allow_explosion is not null
2894: and wjsi.load_type = wip_constants.create_sched
2895: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2896:

Line 2894: and wjsi.load_type = wip_constants.create_sched

2890: where wjsi.group_id = p_groupID
2891: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2892: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2893: and wjsi.allow_explosion is not null
2894: and wjsi.load_type = wip_constants.create_sched
2895: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2896:
2897: if ( sql%rowcount > 0 ) then
2898: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');

Line 2907: set wjsi.process_status = WIP_CONSTANTS.WARNING,

2903: --
2904: -- default and validate allow_explosion
2905: --
2906: update wip_job_schedule_interface wjsi
2907: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2908: wjsi.last_update_date = sysdate
2909: where wjsi.group_id = p_groupID
2910: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2911: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2910: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2906: update wip_job_schedule_interface wjsi
2907: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2908: wjsi.last_update_date = sysdate
2909: where wjsi.group_id = p_groupID
2910: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2911: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2912: and wjsi.priority is not null
2913: and wjsi.load_type = wip_constants.create_sched
2914: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2911: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2907: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2908: wjsi.last_update_date = sysdate
2909: where wjsi.group_id = p_groupID
2910: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2911: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2912: and wjsi.priority is not null
2913: and wjsi.load_type = wip_constants.create_sched
2914: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2915:

Line 2913: and wjsi.load_type = wip_constants.create_sched

2909: where wjsi.group_id = p_groupID
2910: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2911: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2912: and wjsi.priority is not null
2913: and wjsi.load_type = wip_constants.create_sched
2914: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2915:
2916: if ( sql%rowcount > 0 ) then
2917: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');

Line 2926: set wjsi.process_status = WIP_CONSTANTS.WARNING,

2922: --
2923: -- default and validate end_item_unit_number
2924: --
2925: update wip_job_schedule_interface wjsi
2926: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2927: wjsi.last_update_date = sysdate
2928: where wjsi.group_id = p_groupID
2929: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2930: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2929: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2925: update wip_job_schedule_interface wjsi
2926: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2927: wjsi.last_update_date = sysdate
2928: where wjsi.group_id = p_groupID
2929: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2930: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2931: and wjsi.end_item_unit_number is not null
2932: and wjsi.load_type in (wip_constants.create_sched,
2933: wip_constants.resched_job)

Line 2930: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2926: set wjsi.process_status = WIP_CONSTANTS.WARNING,
2927: wjsi.last_update_date = sysdate
2928: where wjsi.group_id = p_groupID
2929: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2930: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2931: and wjsi.end_item_unit_number is not null
2932: and wjsi.load_type in (wip_constants.create_sched,
2933: wip_constants.resched_job)
2934: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 2932: and wjsi.load_type in (wip_constants.create_sched,

2928: where wjsi.group_id = p_groupID
2929: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2930: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2931: and wjsi.end_item_unit_number is not null
2932: and wjsi.load_type in (wip_constants.create_sched,
2933: wip_constants.resched_job)
2934: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2935:
2936: if ( sql%rowcount > 0 ) then

Line 2933: wip_constants.resched_job)

2929: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2930: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2931: and wjsi.end_item_unit_number is not null
2932: and wjsi.load_type in (wip_constants.create_sched,
2933: wip_constants.resched_job)
2934: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2935:
2936: if ( sql%rowcount > 0 ) then
2937: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');

Line 2945: if ( p_validationLevel not in (wip_constants.mrp, wip_constants.ato) ) then

2941:
2942: --
2943: -- validate schedule dates
2944: --
2945: if ( p_validationLevel not in (wip_constants.mrp, wip_constants.ato) ) then
2946: /* Modified For bug 5479283. To check against current value of routing reference id.*/
2947: update wip_job_schedule_interface wjsi
2948: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2949: wjsi.last_update_date = sysdate

Line 2948: set wjsi.process_status = WIP_CONSTANTS.ERROR,

2944: --
2945: if ( p_validationLevel not in (wip_constants.mrp, wip_constants.ato) ) then
2946: /* Modified For bug 5479283. To check against current value of routing reference id.*/
2947: update wip_job_schedule_interface wjsi
2948: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2949: wjsi.last_update_date = sysdate
2950: where wjsi.group_id = p_groupID
2951: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2952: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 2951: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

2947: update wip_job_schedule_interface wjsi
2948: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2949: wjsi.last_update_date = sysdate
2950: where wjsi.group_id = p_groupID
2951: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2952: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2953: and ( (wjsi.load_type = wip_constants.create_ns_job and
2954: --must provide both dates when creating a ns job
2955: wjsi.routing_reference_id is null and

Line 2952: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

2948: set wjsi.process_status = WIP_CONSTANTS.ERROR,
2949: wjsi.last_update_date = sysdate
2950: where wjsi.group_id = p_groupID
2951: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2952: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2953: and ( (wjsi.load_type = wip_constants.create_ns_job and
2954: --must provide both dates when creating a ns job
2955: wjsi.routing_reference_id is null and
2956: (wjsi.first_unit_start_date is null or wjsi.last_unit_completion_date is null))

Line 2953: and ( (wjsi.load_type = wip_constants.create_ns_job and

2949: wjsi.last_update_date = sysdate
2950: where wjsi.group_id = p_groupID
2951: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2952: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2953: and ( (wjsi.load_type = wip_constants.create_ns_job and
2954: --must provide both dates when creating a ns job
2955: wjsi.routing_reference_id is null and
2956: (wjsi.first_unit_start_date is null or wjsi.last_unit_completion_date is null))
2957: or (wjsi.load_type = wip_constants.resched_job and

Line 2957: or (wjsi.load_type = wip_constants.resched_job and

2953: and ( (wjsi.load_type = wip_constants.create_ns_job and
2954: --must provide both dates when creating a ns job
2955: wjsi.routing_reference_id is null and
2956: (wjsi.first_unit_start_date is null or wjsi.last_unit_completion_date is null))
2957: or (wjsi.load_type = wip_constants.resched_job and
2958: --when rescheduling a ns job and providing one date, it must have a routing
2959: wip_constants.nonstandard = (select wdj.job_type
2960: from wip_discrete_jobs wdj
2961: where wdj.organization_id = wjsi.organization_id

Line 2959: wip_constants.nonstandard = (select wdj.job_type

2955: wjsi.routing_reference_id is null and
2956: (wjsi.first_unit_start_date is null or wjsi.last_unit_completion_date is null))
2957: or (wjsi.load_type = wip_constants.resched_job and
2958: --when rescheduling a ns job and providing one date, it must have a routing
2959: wip_constants.nonstandard = (select wdj.job_type
2960: from wip_discrete_jobs wdj
2961: where wdj.organization_id = wjsi.organization_id
2962: and wdj.wip_entity_id = wjsi.wip_entity_id) and
2963: /* (select wdj.routing_reference_id

Line 2973: and wjsi.scheduling_method <> wip_constants.ml_manual))

2969: where organization_id = wjsi.organization_id
2970: and wip_entity_id = wjsi.wip_entity_id) = 0 and
2971: ((wjsi.first_unit_start_date is not null or wjsi.last_unit_completion_date is not null)
2972: /* Bug fix : 8407567 If scheduling method is manual, then both the dates are needed */
2973: and wjsi.scheduling_method <> wip_constants.ml_manual))
2974: or (wjsi.load_type in (wip_constants.create_job, wip_constants.create_ns_job) and
2975: --all job creations must have at least one date
2976: wjsi.first_unit_start_date is null and
2977: wjsi.last_unit_completion_date is null)

Line 2974: or (wjsi.load_type in (wip_constants.create_job, wip_constants.create_ns_job) and

2970: and wip_entity_id = wjsi.wip_entity_id) = 0 and
2971: ((wjsi.first_unit_start_date is not null or wjsi.last_unit_completion_date is not null)
2972: /* Bug fix : 8407567 If scheduling method is manual, then both the dates are needed */
2973: and wjsi.scheduling_method <> wip_constants.ml_manual))
2974: or (wjsi.load_type in (wip_constants.create_job, wip_constants.create_ns_job) and
2975: --all job creations must have at least one date
2976: wjsi.first_unit_start_date is null and
2977: wjsi.last_unit_completion_date is null)
2978: or (wjsi.load_type = wip_constants.resched_job and

Line 2978: or (wjsi.load_type = wip_constants.resched_job and

2974: or (wjsi.load_type in (wip_constants.create_job, wip_constants.create_ns_job) and
2975: --all job creations must have at least one date
2976: wjsi.first_unit_start_date is null and
2977: wjsi.last_unit_completion_date is null)
2978: or (wjsi.load_type = wip_constants.resched_job and
2979: --when changing the quantity, you must also provide a date
2980: wjsi.start_quantity is not null and
2981: wjsi.first_unit_start_date is null and
2982: wjsi.last_unit_completion_date is null)

Line 2984: /* or (wjsi.load_type = wip_constants.resched_job and

2980: wjsi.start_quantity is not null and
2981: wjsi.first_unit_start_date is null and
2982: wjsi.last_unit_completion_date is null)
2983: -- Commented this for Bug 13620858. Forms allow re-scheduling based on routing without re-explosion.
2984: /* or (wjsi.load_type = wip_constants.resched_job and
2985: --if not exploding, then the user must provide both dates or none at all
2986: wjsi.allow_explosion in ('N', 'n') and
2987: ((wjsi.first_unit_start_date is not null and wjsi.last_unit_completion_date is null) or
2988: (wjsi.first_unit_start_date is null and wjsi.last_unit_completion_date is not null))) */

Line 3014: set wjsi.process_status = WIP_CONSTANTS.WARNING,

3010: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
3011: end if;
3012:
3013: update wip_job_schedule_interface wjsi
3014: set wjsi.process_status = WIP_CONSTANTS.WARNING,
3015: wjsi.last_update_date = sysdate
3016: where wjsi.group_id = p_groupID
3017: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
3018: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 3017: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

3013: update wip_job_schedule_interface wjsi
3014: set wjsi.process_status = WIP_CONSTANTS.WARNING,
3015: wjsi.last_update_date = sysdate
3016: where wjsi.group_id = p_groupID
3017: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
3018: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
3019: and wjsi.last_unit_start_date is not null
3020: and wjsi.load_type <> wip_constants.create_sched
3021: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 3018: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

3014: set wjsi.process_status = WIP_CONSTANTS.WARNING,
3015: wjsi.last_update_date = sysdate
3016: where wjsi.group_id = p_groupID
3017: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
3018: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
3019: and wjsi.last_unit_start_date is not null
3020: and wjsi.load_type <> wip_constants.create_sched
3021: returning wjsi.interface_id bulk collect into l_interfaceTbl;
3022:

Line 3020: and wjsi.load_type <> wip_constants.create_sched

3016: where wjsi.group_id = p_groupID
3017: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
3018: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
3019: and wjsi.last_unit_start_date is not null
3020: and wjsi.load_type <> wip_constants.create_sched
3021: returning wjsi.interface_id bulk collect into l_interfaceTbl;
3022:
3023: if ( sql%rowcount > 0 ) then
3024: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');

Line 3030: set wjsi.process_status = WIP_CONSTANTS.WARNING,

3026: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationWarning);
3027: end if;
3028:
3029: update wip_job_schedule_interface wjsi
3030: set wjsi.process_status = WIP_CONSTANTS.WARNING,
3031: wjsi.last_update_date = sysdate
3032: where wjsi.group_id = p_groupID
3033: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
3034: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 3033: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

3029: update wip_job_schedule_interface wjsi
3030: set wjsi.process_status = WIP_CONSTANTS.WARNING,
3031: wjsi.last_update_date = sysdate
3032: where wjsi.group_id = p_groupID
3033: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
3034: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
3035: and wjsi.first_unit_completion_date is not null
3036: and wjsi.load_type <> wip_constants.create_sched
3037: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 3034: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

3030: set wjsi.process_status = WIP_CONSTANTS.WARNING,
3031: wjsi.last_update_date = sysdate
3032: where wjsi.group_id = p_groupID
3033: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
3034: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
3035: and wjsi.first_unit_completion_date is not null
3036: and wjsi.load_type <> wip_constants.create_sched
3037: returning wjsi.interface_id bulk collect into l_interfaceTbl;
3038:

Line 3036: and wjsi.load_type <> wip_constants.create_sched

3032: where wjsi.group_id = p_groupID
3033: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
3034: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
3035: and wjsi.first_unit_completion_date is not null
3036: and wjsi.load_type <> wip_constants.create_sched
3037: returning wjsi.interface_id bulk collect into l_interfaceTbl;
3038:
3039: if ( sql%rowcount > 0 ) then
3040: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');

Line 3050: set wjsi.process_status = WIP_CONSTANTS.ERROR,

3046: --
3047: -- validate serialization_start_op
3048: --
3049: update wip_job_schedule_interface wjsi
3050: set wjsi.process_status = WIP_CONSTANTS.ERROR,
3051: wjsi.last_update_date = sysdate
3052: where wjsi.group_id = p_groupID
3053: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
3054: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

Line 3053: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

3049: update wip_job_schedule_interface wjsi
3050: set wjsi.process_status = WIP_CONSTANTS.ERROR,
3051: wjsi.last_update_date = sysdate
3052: where wjsi.group_id = p_groupID
3053: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
3054: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
3055: and wjsi.serialization_start_op is not null
3056: and wjsi.load_type = wip_constants.create_sched
3057: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 3054: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)

3050: set wjsi.process_status = WIP_CONSTANTS.ERROR,
3051: wjsi.last_update_date = sysdate
3052: where wjsi.group_id = p_groupID
3053: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
3054: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
3055: and wjsi.serialization_start_op is not null
3056: and wjsi.load_type = wip_constants.create_sched
3057: returning wjsi.interface_id bulk collect into l_interfaceTbl;
3058:

Line 3056: and wjsi.load_type = wip_constants.create_sched

3052: where wjsi.group_id = p_groupID
3053: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
3054: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
3055: and wjsi.serialization_start_op is not null
3056: and wjsi.load_type = wip_constants.create_sched
3057: returning wjsi.interface_id bulk collect into l_interfaceTbl;
3058:
3059: if ( sql%rowcount > 0 ) then
3060: fnd_message.set_name('WIP', 'WIP_ML_SERIAL_START_OP');

Line 3064: if (l_logLevel <= wip_constants.trace_logging) then

3060: fnd_message.set_name('WIP', 'WIP_ML_SERIAL_START_OP');
3061: loadInterfaceError(l_interfaceTbl, fnd_message.get, validationError);
3062: end if;
3063:
3064: if (l_logLevel <= wip_constants.trace_logging) then
3065: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
3066: p_procReturnStatus => x_returnStatus,
3067: p_msg => 'success',
3068: x_returnStatus => l_retStatus);

Line 3073: if(l_logLevel <= wip_constants.trace_logging) then

3069: end if;
3070:
3071: exception
3072: when others then
3073: if(l_logLevel <= wip_constants.trace_logging) then
3074: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
3075: p_procReturnStatus => x_returnStatus,
3076: p_msg => 'unexp error:' || SQLERRM,
3077: x_returnStatus => l_retStatus);

Line 3105: and process_phase = WIP_CONSTANTS.ML_VALIDATION

3101: select rowid,
3102: interface_id
3103: from wip_job_schedule_interface
3104: where group_id = p_groupID
3105: and process_phase = WIP_CONSTANTS.ML_VALIDATION
3106: and process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING);
3107: begin
3108: x_returnStatus := fnd_api.g_ret_sts_success;
3109: if (l_logLevel <= wip_constants.trace_logging) then

Line 3106: and process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING);

3102: interface_id
3103: from wip_job_schedule_interface
3104: where group_id = p_groupID
3105: and process_phase = WIP_CONSTANTS.ML_VALIDATION
3106: and process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING);
3107: begin
3108: x_returnStatus := fnd_api.g_ret_sts_success;
3109: if (l_logLevel <= wip_constants.trace_logging) then
3110: l_params(2).paramName := 'p_validationLevel';

Line 3109: if (l_logLevel <= wip_constants.trace_logging) then

3105: and process_phase = WIP_CONSTANTS.ML_VALIDATION
3106: and process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING);
3107: begin
3108: x_returnStatus := fnd_api.g_ret_sts_success;
3109: if (l_logLevel <= wip_constants.trace_logging) then
3110: l_params(2).paramName := 'p_validationLevel';
3111: l_params(2).paramValue := p_validationLevel;
3112: wip_logger.entryPoint(p_procName => g_pkgName || '.' || l_procName,
3113: p_params => l_params,

Line 3124: if (l_logLevel <= wip_constants.trace_logging) then

3120: for line in c_line loop
3121: begin
3122: setup(line.rowid);
3123:
3124: if (l_logLevel <= wip_constants.trace_logging) then
3125: wip_logger.log('begin to validate record with interface_id: ' || wjsi_row.interface_id,
3126: l_retStatus);
3127: end if;
3128:

Line 3184: if ( p_validationLevel not in (wip_constants.mrp, wip_constants.ato) ) then

3180: validateOvercompletion(line.rowid, l_msg);
3181: --Bug 5210075:Validate status type should be called always irrespective of
3182: --validation level
3183: validateStatusType(line.rowid, l_msg);
3184: if ( p_validationLevel not in (wip_constants.mrp, wip_constants.ato) ) then
3185: --Bug 5210075:Call to procedure validatestatustype is commented out.
3186: --validateStatusType(line.rowid, l_msg);
3187: validateBuildSequence(line.rowid, l_msg);
3188: validateEndItemUnitNumber(line.rowid, l_msg);

Line 3195: if (l_logLevel <= wip_constants.trace_logging) then

3191: end if;
3192:
3193: exception
3194: when line_validation_error then
3195: if (l_logLevel <= wip_constants.trace_logging) then
3196: wip_logger.log('Validation Error happened on interface_id ' || line.interface_id || ': ' || l_msg,
3197: l_retStatus);
3198: end if;
3199: end;

Line 3210: wip_constants.dt_nosec_fmt), wip_constants.dt_nosec_fmt),

3206: class_code = wjsi_row.class_code,
3207: overcompletion_tolerance_type = wjsi_row.overcompletion_tolerance_type,
3208: overcompletion_tolerance_value = wjsi_row.overcompletion_tolerance_value,
3209: first_unit_start_date = to_date(to_char(wjsi_row.first_unit_start_date,
3210: wip_constants.dt_nosec_fmt), wip_constants.dt_nosec_fmt),
3211: last_unit_start_date = to_date(to_char(wjsi_row.last_unit_start_date,
3212: wip_constants.dt_nosec_fmt), wip_constants.dt_nosec_fmt),
3213: first_unit_completion_date = to_date(to_char(wjsi_row.first_unit_completion_date,
3214: wip_constants.dt_nosec_fmt), wip_constants.dt_nosec_fmt),

Line 3212: wip_constants.dt_nosec_fmt), wip_constants.dt_nosec_fmt),

3208: overcompletion_tolerance_value = wjsi_row.overcompletion_tolerance_value,
3209: first_unit_start_date = to_date(to_char(wjsi_row.first_unit_start_date,
3210: wip_constants.dt_nosec_fmt), wip_constants.dt_nosec_fmt),
3211: last_unit_start_date = to_date(to_char(wjsi_row.last_unit_start_date,
3212: wip_constants.dt_nosec_fmt), wip_constants.dt_nosec_fmt),
3213: first_unit_completion_date = to_date(to_char(wjsi_row.first_unit_completion_date,
3214: wip_constants.dt_nosec_fmt), wip_constants.dt_nosec_fmt),
3215: last_unit_completion_date = to_date(to_char(wjsi_row.last_unit_completion_date,
3216: wip_constants.dt_nosec_fmt), wip_constants.dt_nosec_fmt),

Line 3214: wip_constants.dt_nosec_fmt), wip_constants.dt_nosec_fmt),

3210: wip_constants.dt_nosec_fmt), wip_constants.dt_nosec_fmt),
3211: last_unit_start_date = to_date(to_char(wjsi_row.last_unit_start_date,
3212: wip_constants.dt_nosec_fmt), wip_constants.dt_nosec_fmt),
3213: first_unit_completion_date = to_date(to_char(wjsi_row.first_unit_completion_date,
3214: wip_constants.dt_nosec_fmt), wip_constants.dt_nosec_fmt),
3215: last_unit_completion_date = to_date(to_char(wjsi_row.last_unit_completion_date,
3216: wip_constants.dt_nosec_fmt), wip_constants.dt_nosec_fmt),
3217: build_sequence = wjsi_row.build_sequence,
3218: bom_revision = wjsi_row.bom_revision,

Line 3216: wip_constants.dt_nosec_fmt), wip_constants.dt_nosec_fmt),

3212: wip_constants.dt_nosec_fmt), wip_constants.dt_nosec_fmt),
3213: first_unit_completion_date = to_date(to_char(wjsi_row.first_unit_completion_date,
3214: wip_constants.dt_nosec_fmt), wip_constants.dt_nosec_fmt),
3215: last_unit_completion_date = to_date(to_char(wjsi_row.last_unit_completion_date,
3216: wip_constants.dt_nosec_fmt), wip_constants.dt_nosec_fmt),
3217: build_sequence = wjsi_row.build_sequence,
3218: bom_revision = wjsi_row.bom_revision,
3219: routing_revision = wjsi_row.routing_revision,
3220: bom_revision_date = wjsi_row.bom_revision_date,

Line 3223: wip_constants.dt_nosec_fmt), wip_constants.dt_nosec_fmt),

3219: routing_revision = wjsi_row.routing_revision,
3220: bom_revision_date = wjsi_row.bom_revision_date,
3221: routing_revision_date = wjsi_row.routing_revision_date,
3222: due_date = to_date(to_char(wjsi_row.due_date,
3223: wip_constants.dt_nosec_fmt), wip_constants.dt_nosec_fmt),
3224: requested_start_date = to_date(to_char(wjsi_row.requested_start_date,
3225: wip_constants.dt_nosec_fmt), wip_constants.dt_nosec_fmt),
3226: lot_number = wjsi_row.lot_number,
3227: completion_subinventory = wjsi_row.completion_subinventory,

Line 3225: wip_constants.dt_nosec_fmt), wip_constants.dt_nosec_fmt),

3221: routing_revision_date = wjsi_row.routing_revision_date,
3222: due_date = to_date(to_char(wjsi_row.due_date,
3223: wip_constants.dt_nosec_fmt), wip_constants.dt_nosec_fmt),
3224: requested_start_date = to_date(to_char(wjsi_row.requested_start_date,
3225: wip_constants.dt_nosec_fmt), wip_constants.dt_nosec_fmt),
3226: lot_number = wjsi_row.lot_number,
3227: completion_subinventory = wjsi_row.completion_subinventory,
3228: completion_locator_id = wjsi_row.completion_locator_id,
3229: scheduling_method = wjsi_row.scheduling_method,

Line 3235: if (l_logLevel <= wip_constants.trace_logging) then

3231: where rowid = line.rowid;
3232: end loop;
3233:
3234:
3235: if (l_logLevel <= wip_constants.trace_logging) then
3236: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
3237: p_procReturnStatus => x_returnStatus,
3238: p_msg => 'success',
3239: x_returnStatus => l_retStatus);

Line 3244: if(l_logLevel <= wip_constants.trace_logging) then

3240: end if;
3241:
3242: exception
3243: when others then
3244: if(l_logLevel <= wip_constants.trace_logging) then
3245: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
3246: p_procReturnStatus => x_returnStatus,
3247: p_msg => 'unexp error:' || SQLERRM,
3248: x_returnStatus => l_retStatus);

Line 3267: if ( wjsi_row.load_type = wip_constants.resched_job ) then

3263: into wjsi_row
3264: from wip_job_schedule_interface
3265: where rowid = p_rowid;
3266:
3267: if ( wjsi_row.load_type = wip_constants.resched_job ) then
3268: select we.wip_entity_name,
3269: wdj.status_type,
3270: we.entity_type,
3271: wdj.job_type,

Line 3355: if ( wjsi_row.load_type = wip_constants.create_sched ) then

3351: l_rtgCount number;
3352: l_qty number;
3353: l_msg varchar2(30);
3354: begin
3355: if ( wjsi_row.load_type = wip_constants.create_sched ) then
3356: if(wjsi_row.first_unit_start_date is null) then
3357: if(wjsi_row.last_unit_start_date is not null) then
3358: l_schedDir := wip_constants.lusd;
3359: elsif(wjsi_row.first_unit_completion_date is not null) then

Line 3358: l_schedDir := wip_constants.lusd;

3354: begin
3355: if ( wjsi_row.load_type = wip_constants.create_sched ) then
3356: if(wjsi_row.first_unit_start_date is null) then
3357: if(wjsi_row.last_unit_start_date is not null) then
3358: l_schedDir := wip_constants.lusd;
3359: elsif(wjsi_row.first_unit_completion_date is not null) then
3360: l_schedDir := wip_constants.fucd;
3361: else
3362: l_schedDir := wip_constants.lucd;

Line 3360: l_schedDir := wip_constants.fucd;

3356: if(wjsi_row.first_unit_start_date is null) then
3357: if(wjsi_row.last_unit_start_date is not null) then
3358: l_schedDir := wip_constants.lusd;
3359: elsif(wjsi_row.first_unit_completion_date is not null) then
3360: l_schedDir := wip_constants.fucd;
3361: else
3362: l_schedDir := wip_constants.lucd;
3363: end if;
3364:

Line 3362: l_schedDir := wip_constants.lucd;

3358: l_schedDir := wip_constants.lusd;
3359: elsif(wjsi_row.first_unit_completion_date is not null) then
3360: l_schedDir := wip_constants.fucd;
3361: else
3362: l_schedDir := wip_constants.lucd;
3363: end if;
3364:
3365: wip_calendar.estimate_leadtime(x_org_id => wjsi_row.organization_id,
3366: x_fixed_lead => primary_item_row.fixed_lead_time,

Line 3370: x_entity_type => wip_constants.repetitive,

3366: x_fixed_lead => primary_item_row.fixed_lead_time,
3367: x_var_lead => primary_item_row.variable_lead_time,
3368: x_quantity => wjsi_row.processing_work_days * wjsi_row.daily_production_rate,
3369: x_proc_days => wjsi_row.processing_work_days,
3370: x_entity_type => wip_constants.repetitive,
3371: x_fusd => wjsi_row.first_unit_start_date,
3372: x_fucd => wjsi_row.first_unit_completion_date,
3373: x_lusd => wjsi_row.last_unit_start_date,
3374: x_lucd => wjsi_row.last_unit_completion_date,

Line 3383: if(wjsi_row.load_type = wip_constants.create_ns_job and wjsi_row.routing_reference_id is not null) then

3379: raise fnd_api.g_exc_unexpected_error;
3380: end if;
3381: end if;
3382: else
3383: if(wjsi_row.load_type = wip_constants.create_ns_job and wjsi_row.routing_reference_id is not null) then
3384: select count(*)
3385: into l_rtgCount
3386: from bom_operational_routings
3387: where assembly_item_id = wjsi_row.routing_reference_id

Line 3393: elsif(wjsi_row.load_type = wip_constants.create_job) then

3389: and nvl(alternate_routing_designator, '@@@') =
3390: nvl(wjsi_row.alternate_routing_designator, '@@@')
3391: and nvl(cfm_routing_flag, 2) = 2;
3392: l_qty := wjsi_row.start_quantity;
3393: elsif(wjsi_row.load_type = wip_constants.create_job) then
3394: select count(*)
3395: into l_rtgCount
3396: from bom_operational_routings
3397: where assembly_item_id = wjsi_row.primary_item_id

Line 3403: elsif(wjsi_row.load_type = wip_constants.resched_job) then

3399: and nvl(alternate_routing_designator, '@@@') =
3400: nvl(wjsi_row.alternate_routing_designator, '@@@')
3401: and nvl(cfm_routing_flag, 2) = 2;
3402: l_qty := wjsi_row.start_quantity;
3403: elsif(wjsi_row.load_type = wip_constants.resched_job) then
3404:
3405: /* Modified for Bug 9286094. Modified logic to default scheduling method. */
3406: if ( nvl(wjsi_row.allow_explosion, 'Y') in ('n', 'N') ) then
3407: select count(*)

Line 3423: if(wjsi_row.scheduling_method = wip_constants.routing and l_rtgCount = 0) then

3419: end if;
3420: l_qty := nvl(wjsi_row.start_quantity, wdj_row.start_quantity);
3421: end if;
3422: --if no routing exists, update the scheduling method appropriately
3423: if(wjsi_row.scheduling_method = wip_constants.routing and l_rtgCount = 0) then
3424: if(wjsi_row.first_unit_start_date is not null and
3425: wjsi_row.last_unit_completion_date is not null) then
3426: wjsi_row.scheduling_method := wip_constants.ml_manual;
3427: else

Line 3426: wjsi_row.scheduling_method := wip_constants.ml_manual;

3422: --if no routing exists, update the scheduling method appropriately
3423: if(wjsi_row.scheduling_method = wip_constants.routing and l_rtgCount = 0) then
3424: if(wjsi_row.first_unit_start_date is not null and
3425: wjsi_row.last_unit_completion_date is not null) then
3426: wjsi_row.scheduling_method := wip_constants.ml_manual;
3427: else
3428: wjsi_row.scheduling_method := wip_constants.leadtime;
3429: end if;
3430: end if;

Line 3428: wjsi_row.scheduling_method := wip_constants.leadtime;

3424: if(wjsi_row.first_unit_start_date is not null and
3425: wjsi_row.last_unit_completion_date is not null) then
3426: wjsi_row.scheduling_method := wip_constants.ml_manual;
3427: else
3428: wjsi_row.scheduling_method := wip_constants.leadtime;
3429: end if;
3430: end if;
3431: if(wjsi_row.first_unit_start_date is null and
3432: wjsi_row.last_unit_completion_date is not null and

Line 3433: wjsi_row.scheduling_method = wip_constants.leadtime) then

3429: end if;
3430: end if;
3431: if(wjsi_row.first_unit_start_date is null and
3432: wjsi_row.last_unit_completion_date is not null and
3433: wjsi_row.scheduling_method = wip_constants.leadtime) then
3434: /* Estimate Start Date */
3435: wip_calendar.estimate_leadtime(x_org_id => wjsi_row.organization_id,
3436: x_fixed_lead => primary_item_row.fixed_lead_time,
3437: x_var_lead => primary_item_row.variable_lead_time,

Line 3440: x_entity_type => wip_constants.discrete,

3436: x_fixed_lead => primary_item_row.fixed_lead_time,
3437: x_var_lead => primary_item_row.variable_lead_time,
3438: x_quantity => l_qty,
3439: x_proc_days => 0,
3440: x_entity_type => wip_constants.discrete,
3441: x_fusd => '',
3442: x_fucd => '',
3443: x_lusd => '',
3444: x_lucd => wjsi_row.last_unit_completion_date,

Line 3445: x_sched_dir => wip_constants.lucd,

3441: x_fusd => '',
3442: x_fucd => '',
3443: x_lusd => '',
3444: x_lucd => wjsi_row.last_unit_completion_date,
3445: x_sched_dir => wip_constants.lucd,
3446: x_est_date => wjsi_row.first_unit_start_date);
3447: if(wjsi_row.first_unit_start_date is null) then
3448: l_msg := 'WIP_ML_EST_LEADTIME';
3449: raise fnd_api.g_exc_unexpected_error;

Line 3453: wjsi_row.scheduling_method = wip_constants.leadtime) then

3449: raise fnd_api.g_exc_unexpected_error;
3450: end if;
3451: elsif(wjsi_row.last_unit_completion_date is null and
3452: wjsi_row.first_unit_start_date is not null and
3453: wjsi_row.scheduling_method = wip_constants.leadtime) then
3454: /* Estimate Completion Date */
3455: wip_calendar.estimate_leadtime(x_org_id => wjsi_row.organization_id,
3456: x_fixed_lead => primary_item_row.fixed_lead_time,
3457: x_var_lead => primary_item_row.variable_lead_time,

Line 3460: x_entity_type => wip_constants.discrete,

3456: x_fixed_lead => primary_item_row.fixed_lead_time,
3457: x_var_lead => primary_item_row.variable_lead_time,
3458: x_quantity => l_qty,
3459: x_proc_days => 0,
3460: x_entity_type => wip_constants.discrete,
3461: x_fusd => wjsi_row.first_unit_start_date,
3462: x_fucd => '',
3463: x_lusd => '',
3464: x_lucd => '',

Line 3465: x_sched_dir => wip_constants.fusd,

3461: x_fusd => wjsi_row.first_unit_start_date,
3462: x_fucd => '',
3463: x_lusd => '',
3464: x_lucd => '',
3465: x_sched_dir => wip_constants.fusd,
3466: x_est_date => wjsi_row.last_unit_completion_date);
3467: if(wjsi_row.last_unit_completion_date is null) then
3468: l_msg := 'WIP_NO_CALENDAR';
3469: raise fnd_api.g_exc_unexpected_error;

Line 3474: wjsi_row.scheduling_method = wip_constants.leadtime) then

3470: end if;
3471: -- Added for Bug 9385806.
3472: elsif (wjsi_row.last_unit_completion_date is null and
3473: wjsi_row.first_unit_start_date is null and
3474: wjsi_row.scheduling_method = wip_constants.leadtime) then
3475: if wjsi_row.load_type = wip_constants.resched_job then
3476:
3477: select wdj.scheduled_start_date into wjsi_row.first_unit_start_date
3478: from wip_discrete_jobs wdj

Line 3475: if wjsi_row.load_type = wip_constants.resched_job then

3471: -- Added for Bug 9385806.
3472: elsif (wjsi_row.last_unit_completion_date is null and
3473: wjsi_row.first_unit_start_date is null and
3474: wjsi_row.scheduling_method = wip_constants.leadtime) then
3475: if wjsi_row.load_type = wip_constants.resched_job then
3476:
3477: select wdj.scheduled_start_date into wjsi_row.first_unit_start_date
3478: from wip_discrete_jobs wdj
3479: where wdj.wip_entity_id = wjsi_row.wip_entity_id;

Line 3487: x_entity_type => wip_constants.discrete,

3483: x_fixed_lead => primary_item_row.fixed_lead_time,
3484: x_var_lead => primary_item_row.variable_lead_time,
3485: x_quantity => l_qty,
3486: x_proc_days => 0,
3487: x_entity_type => wip_constants.discrete,
3488: x_fusd => wjsi_row.first_unit_start_date,
3489: x_fucd => '',
3490: x_lusd => '',
3491: x_lucd => '',

Line 3492: x_sched_dir => wip_constants.fusd,

3488: x_fusd => wjsi_row.first_unit_start_date,
3489: x_fucd => '',
3490: x_lusd => '',
3491: x_lucd => '',
3492: x_sched_dir => wip_constants.fusd,
3493: x_est_date => wjsi_row.last_unit_completion_date);
3494: if(wjsi_row.last_unit_completion_date is null) then
3495: l_msg := 'WIP_NO_CALENDAR';
3496: raise fnd_api.g_exc_unexpected_error;

Line 3532: if ( wjsi_row.load_type <> wip_constants.create_sched ) then

3528: AND organization_id = wjsi_row.organization_id;
3529:
3530: MO_GLOBAL.set_policy_context(p_access_mode => 'S',p_org_id => l_ou_context);
3531:
3532: if ( wjsi_row.load_type <> wip_constants.create_sched ) then
3533: begin
3534: if ( wjsi_row.project_number is not null and wjsi_row.project_id is null) then
3535: -- Bug 4890514. Performance Fix
3536: -- saugupta 25th-May-2006

Line 3555: if ( wjsi_row.load_type <> wip_constants.create_sched and

3551: raise line_validation_error;
3552: end;
3553: end if;
3554:
3555: if ( wjsi_row.load_type <> wip_constants.create_sched and
3556: wjsi_row.project_id is not null) then
3557: begin
3558: -- Bug 4890514. Performance Fix
3559: -- saugupta 25th-May-2006

Line 3569: and nvl(mp.project_reference_enabled, 2) = wip_constants.yes;

3565: where mpv.project_id = ppp.project_id
3566: and mpv.project_id = wjsi_row.project_id
3567: and ppp.organization_id = wjsi_row.organization_id
3568: and ppp.organization_id = mp.organization_id
3569: and nvl(mp.project_reference_enabled, 2) = wip_constants.yes;
3570: exception
3571: when others then
3572: fnd_message.set_name('WIP', 'WIP_ML_PROJECT_ID');
3573: x_errorMsg := fnd_message.get;

Line 3579: if ( wjsi_row.load_type <> wip_constants.create_sched and

3575: raise line_validation_error;
3576: end;
3577: end if;
3578:
3579: if ( wjsi_row.load_type <> wip_constants.create_sched and
3580: wjsi_row.task_number is not null and wjsi_row.task_id is null) then
3581: begin
3582: if ( wjsi_row.load_type = wip_constants.resched_job ) then
3583: select pa.task_id

Line 3582: if ( wjsi_row.load_type = wip_constants.resched_job ) then

3578:
3579: if ( wjsi_row.load_type <> wip_constants.create_sched and
3580: wjsi_row.task_number is not null and wjsi_row.task_id is null) then
3581: begin
3582: if ( wjsi_row.load_type = wip_constants.resched_job ) then
3583: select pa.task_id
3584: into wjsi_row.task_id
3585: from pa_tasks_expend_v pa,
3586: wip_discrete_jobs wdj

Line 3608: if ( wjsi_row.load_type in (wip_constants.create_job, wip_constants.create_ns_job) ) then

3604: end;
3605: end if;
3606:
3607: if ( wjsi_row.task_id is not null ) then
3608: if ( wjsi_row.load_type in (wip_constants.create_job, wip_constants.create_ns_job) ) then
3609: l_projectID := wjsi_row.project_id;
3610: else
3611: l_projectID := nvl(wjsi_row.project_id, wdj_row.project_id);
3612: end if;

Line 3629: if ( wjsi_row.load_type = wip_constants.create_job and

3625: raise line_validation_error;
3626: end;
3627: end if;
3628:
3629: if ( wjsi_row.load_type = wip_constants.create_job and
3630: wjsi_row.project_id is not null ) then
3631: l_result := PJM_PROJECT.VALIDATE_PROJ_REFERENCES
3632: (x_inventory_org_id => wjsi_row.organization_id,
3633: x_project_id => wjsi_row.project_id,

Line 3664: /* fix for bug 16079296;removed the wip_constants.resched_job from load_type in list as this should be allowed */

3660: l_errClass2 VARCHAR2(30);
3661: l_checkClassFlag VARCHAR2(1) := 'N'; --fix for bug 16079296
3662: begin
3663:
3664: /* fix for bug 16079296;removed the wip_constants.resched_job from load_type in list as this should be allowed */
3665:
3666: if ( wjsi_row.class_code is not null ) then
3667: if (wjsi_row.load_type = wip_constants.resched_job) and (wjsi_row.class_code <> wdj_row.class_code) then
3668: l_checkClassFlag := 'Y';

Line 3667: if (wjsi_row.load_type = wip_constants.resched_job) and (wjsi_row.class_code <> wdj_row.class_code) then

3663:
3664: /* fix for bug 16079296;removed the wip_constants.resched_job from load_type in list as this should be allowed */
3665:
3666: if ( wjsi_row.class_code is not null ) then
3667: if (wjsi_row.load_type = wip_constants.resched_job) and (wjsi_row.class_code <> wdj_row.class_code) then
3668: l_checkClassFlag := 'Y';
3669: elsif wjsi_row.load_type = wip_constants.create_sched then
3670: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');
3671: fnd_message.set_token('COLUMN', 'CLASS_CODE', false);

Line 3669: elsif wjsi_row.load_type = wip_constants.create_sched then

3665:
3666: if ( wjsi_row.class_code is not null ) then
3667: if (wjsi_row.load_type = wip_constants.resched_job) and (wjsi_row.class_code <> wdj_row.class_code) then
3668: l_checkClassFlag := 'Y';
3669: elsif wjsi_row.load_type = wip_constants.create_sched then
3670: fnd_message.set_name('WIP', 'WIP_ML_FIELD_IGNORED');
3671: fnd_message.set_token('COLUMN', 'CLASS_CODE', false);
3672: setInterfaceError(p_rowid, wjsi_row.interface_id, fnd_message.get, validationWarning);
3673: end if;

Line 3678: if ( wjsi_row.load_type in (wip_constants.create_job, wip_constants.create_ns_job) ) then

3674: end if;
3675:
3676: -- default the class code
3677: if ( wjsi_row.class_code is null ) then
3678: if ( wjsi_row.load_type in (wip_constants.create_job, wip_constants.create_ns_job) ) then
3679: wjsi_row.class_code := wip_common.default_acc_class(
3680: x_org_id => wjsi_row.organization_id,
3681: x_item_id => wjsi_row.primary_item_id,
3682: x_entity_type => wip_constants.discrete,

Line 3682: x_entity_type => wip_constants.discrete,

3678: if ( wjsi_row.load_type in (wip_constants.create_job, wip_constants.create_ns_job) ) then
3679: wjsi_row.class_code := wip_common.default_acc_class(
3680: x_org_id => wjsi_row.organization_id,
3681: x_item_id => wjsi_row.primary_item_id,
3682: x_entity_type => wip_constants.discrete,
3683: x_project_id => wjsi_row.project_id,
3684: x_err_mesg_1 => l_errMsg1,
3685: x_err_mesg_2 => l_errMsg2,
3686: x_err_class_1 => l_errClass1,

Line 3702: elsif ( wjsi_row.load_type = wip_constants.resched_job ) then

3698: x_errorMsg := fnd_message.get;
3699: setInterfaceError(p_rowid, wjsi_row.interface_id, x_errorMsg, validationError);
3700: raise line_validation_error;
3701: end if ;
3702: elsif ( wjsi_row.load_type = wip_constants.resched_job ) then
3703: select wdj.class_code
3704: into wjsi_row.class_code
3705: from wip_discrete_jobs wdj
3706: where wdj.wip_entity_id = wjsi_row.wip_entity_id

Line 3712: if ( wjsi_row.load_type = wip_constants.create_job or l_checkClassFlag = 'Y' ) then

3708: end if;
3709: end if;
3710:
3711: begin
3712: if ( wjsi_row.load_type = wip_constants.create_job or l_checkClassFlag = 'Y' ) then
3713: if(wjsi_row.project_id is null) then
3714: -- Bug 12741768
3715: -- Since the projectid is null, this will check if the default cost group of the organization has any
3716: -- accounting classes assigned.

Line 3728: and ccwac.class_type = wip_constants.discrete

3724: ( SELECT DISTINCT ccwac.class_code
3725: from cst_cg_wip_acct_classes_v ccwac,mtl_parameters mp
3726: where ccwac.class_code = wjsi_row.class_code
3727: and ccwac.organization_id = wjsi_row.organization_id
3728: and ccwac.class_type = wip_constants.discrete
3729: AND ccwac.organization_id=mp.organization_id
3730: AND ( not exists
3731: (SELECT 1
3732: FROM cst_cg_wip_acct_classes_v ccwac2 ,mtl_parameters mp

Line 3736: AND ccwac2.class_type=wip_constants.discrete

3732: FROM cst_cg_wip_acct_classes_v ccwac2 ,mtl_parameters mp
3733: WHERE mp.organization_id=wjsi_row.organization_id
3734: AND ccwac2.cost_group_id = mp.default_cost_group_id
3735: AND ccwac2.organization_id = mp.organization_id
3736: AND ccwac2.class_type=wip_constants.discrete
3737: )
3738: OR ( ccwac.cost_group_id = mp.default_cost_group_id )));
3739:
3740: else

Line 3748: and ccwac.class_type = wip_constants.discrete

3744: from cst_cg_wip_acct_classes_v ccwac,
3745: mtl_parameters mp
3746: where ccwac.class_code = wjsi_row.class_code
3747: and ccwac.organization_id = wjsi_row.organization_id
3748: and ccwac.class_type = wip_constants.discrete
3749: and mp.organization_id = wjsi_row.organization_id
3750: and ( mp.primary_cost_method = wip_constants.cost_std
3751: or ccwac.cost_group_id = (select costing_group_id
3752: from mrp_project_parameters mpp

Line 3750: and ( mp.primary_cost_method = wip_constants.cost_std

3746: where ccwac.class_code = wjsi_row.class_code
3747: and ccwac.organization_id = wjsi_row.organization_id
3748: and ccwac.class_type = wip_constants.discrete
3749: and mp.organization_id = wjsi_row.organization_id
3750: and ( mp.primary_cost_method = wip_constants.cost_std
3751: or ccwac.cost_group_id = (select costing_group_id
3752: from mrp_project_parameters mpp
3753: where organization_id = wjsi_row.organization_id
3754: and mpp.project_id = wjsi_row.project_id)));

Line 3756: elsif ( wjsi_row.load_type = wip_constants.create_ns_job ) then

3752: from mrp_project_parameters mpp
3753: where organization_id = wjsi_row.organization_id
3754: and mpp.project_id = wjsi_row.project_id)));
3755: end if;
3756: elsif ( wjsi_row.load_type = wip_constants.create_ns_job ) then
3757: select 1 into l_dummy
3758: from dual
3759: where exists(select 1
3760: from wip_non_standard_classes_val_v

Line 3777: if(wjsi_row.load_type = wip_constants.create_ns_job) then

3773: procedure validateBOMRevision(p_rowid in rowid,
3774: x_errorMsg out nocopy varchar2) is
3775: l_bomItemID number;
3776: begin
3777: if(wjsi_row.load_type = wip_constants.create_ns_job) then
3778: l_bomItemID := wjsi_row.bom_reference_id;
3779: else
3780: l_bomItemID := wjsi_row.primary_item_id;
3781: end if;

Line 3783: if(wjsi_row.load_type in (wip_constants.create_job,

3779: else
3780: l_bomItemID := wjsi_row.primary_item_id;
3781: end if;
3782:
3783: if(wjsi_row.load_type in (wip_constants.create_job,
3784: wip_constants.create_sched,
3785: wip_constants.create_ns_job) ) then
3786: --Bug 5464449: Default revision date from wdj
3787: IF wjsi_row.load_type = wip_constants.RESCHED_JOB and

Line 3784: wip_constants.create_sched,

3780: l_bomItemID := wjsi_row.primary_item_id;
3781: end if;
3782:
3783: if(wjsi_row.load_type in (wip_constants.create_job,
3784: wip_constants.create_sched,
3785: wip_constants.create_ns_job) ) then
3786: --Bug 5464449: Default revision date from wdj
3787: IF wjsi_row.load_type = wip_constants.RESCHED_JOB and
3788: wjsi_row.wip_entity_id is not null and

Line 3785: wip_constants.create_ns_job) ) then

3781: end if;
3782:
3783: if(wjsi_row.load_type in (wip_constants.create_job,
3784: wip_constants.create_sched,
3785: wip_constants.create_ns_job) ) then
3786: --Bug 5464449: Default revision date from wdj
3787: IF wjsi_row.load_type = wip_constants.RESCHED_JOB and
3788: wjsi_row.wip_entity_id is not null and
3789: wjsi_row.bom_revision_date IS NULL THEN

Line 3787: IF wjsi_row.load_type = wip_constants.RESCHED_JOB and

3783: if(wjsi_row.load_type in (wip_constants.create_job,
3784: wip_constants.create_sched,
3785: wip_constants.create_ns_job) ) then
3786: --Bug 5464449: Default revision date from wdj
3787: IF wjsi_row.load_type = wip_constants.RESCHED_JOB and
3788: wjsi_row.wip_entity_id is not null and
3789: wjsi_row.bom_revision_date IS NULL THEN
3790: BEGIN
3791: select bom_revision_date

Line 3824: if(wjsi_row.load_type = wip_constants.create_ns_job) then

3820: l_count number;
3821: l_ret_status varchar2(20);
3822:
3823: begin
3824: if(wjsi_row.load_type = wip_constants.create_ns_job) then
3825: l_rtgItemID := wjsi_row.routing_reference_id;
3826: else
3827: l_rtgItemID := wjsi_row.primary_item_id;
3828: end if;

Line 3830: if(wjsi_row.load_type in (wip_constants.create_job,

3826: else
3827: l_rtgItemID := wjsi_row.primary_item_id;
3828: end if;
3829:
3830: if(wjsi_row.load_type in (wip_constants.create_job,
3831: wip_constants.create_sched,
3832: wip_constants.create_ns_job,
3833: wip_constants.RESCHED_JOB --5194524
3834: )

Line 3831: wip_constants.create_sched,

3827: l_rtgItemID := wjsi_row.primary_item_id;
3828: end if;
3829:
3830: if(wjsi_row.load_type in (wip_constants.create_job,
3831: wip_constants.create_sched,
3832: wip_constants.create_ns_job,
3833: wip_constants.RESCHED_JOB --5194524
3834: )
3835: ) then

Line 3832: wip_constants.create_ns_job,

3828: end if;
3829:
3830: if(wjsi_row.load_type in (wip_constants.create_job,
3831: wip_constants.create_sched,
3832: wip_constants.create_ns_job,
3833: wip_constants.RESCHED_JOB --5194524
3834: )
3835: ) then
3836:

Line 3833: wip_constants.RESCHED_JOB --5194524

3829:
3830: if(wjsi_row.load_type in (wip_constants.create_job,
3831: wip_constants.create_sched,
3832: wip_constants.create_ns_job,
3833: wip_constants.RESCHED_JOB --5194524
3834: )
3835: ) then
3836:
3837: wip_logger.log('ENTERED into Validate routing revision',l_ret_status);

Line 3843: wip_constants.create_ns_job, wjsi_row.routing_reference_id,

3839: select count(*)
3840: into l_count
3841: from bom_operational_routings
3842: where assembly_item_id = decode(wjsi_row.load_type,
3843: wip_constants.create_ns_job, wjsi_row.routing_reference_id,
3844: wjsi_row.primary_item_id
3845: )
3846: and organization_id = wjsi_row.organization_id
3847: and nvl(alternate_routing_designator, '@@@') =

Line 3850: IF wjsi_row.load_type = wip_constants.RESCHED_JOB and

3846: and organization_id = wjsi_row.organization_id
3847: and nvl(alternate_routing_designator, '@@@') =
3848: nvl(wjsi_row.alternate_routing_designator, '@@@');
3849: --Bug 5464449: Default revision date from wdj
3850: IF wjsi_row.load_type = wip_constants.RESCHED_JOB and
3851: wjsi_row.wip_entity_id is not null and
3852: wjsi_row.routing_revision_date IS NULL THEN
3853: BEGIN
3854: select routing_revision_date

Line 3894: if ( wjsi_row.load_type = wip_constants.resched_job and

3890: l_queueQty number;
3891: l_scheduledQty number;
3892: begin
3893:
3894: if ( wjsi_row.load_type = wip_constants.resched_job and
3895: wjsi_row.start_quantity <> wdj_row.start_quantity ) then
3896:
3897: if ( wjsi_row.start_quantity < wdj_row.quantity_completed ) then
3898: raise fnd_api.g_exc_unexpected_error;

Line 3901: if ( wdj_row.status_type <> wip_constants.unreleased ) then

3897: if ( wjsi_row.start_quantity < wdj_row.quantity_completed ) then
3898: raise fnd_api.g_exc_unexpected_error;
3899: end if;
3900: -- Fix for 5999220 Added if condition by mraman
3901: if ( wdj_row.status_type <> wip_constants.unreleased ) then
3902: select nvl(min(operation_seq_num), fnd_api.g_miss_num)
3903: into l_minOp
3904: from wip_operations
3905: where organization_id = wjsi_row.organization_id

Line 3924: end if; -- end if ( wdj_row.status_type <> wip_constants.unreleased )

3920: if ( l_queueQty < l_scheduledQty - wjsi_row.start_quantity ) then
3921: raise fnd_api.g_exc_unexpected_error;
3922: end if; -- end if (l_queueQty < l_scheduledQty - wjsi_row.start_quantity )
3923: end if ; -- end if (l_minOp <> fnd_api.g_miss_num )
3924: end if; -- end if ( wdj_row.status_type <> wip_constants.unreleased )
3925:
3926: /* bug 5350660. Show warning if job is already pick released */
3927: if ( wip_picking_pub.is_job_pick_released(wjsi_row.wip_entity_id,
3928: wjsi_row.repetitive_schedule_id,

Line 3958: if ( wjsi_row.load_type <> wip_constants.resched_job ) then

3954: where wr.wip_entity_id = wjsi_row.wip_entity_id
3955: and wr.inventory_item_id = nvl(wjsi_row.primary_item_id, wdj_row.primary_item_id)
3956: and wr.organization_id = wjsi_row.organization_id;
3957: begin
3958: if ( wjsi_row.load_type <> wip_constants.resched_job ) then
3959: return;
3960: end if;
3961:
3962: /* Fix for Bug#4406036. Added following sql statement to get existing

Line 3976: /* if ( wjsi_row.status_type in (wip_constants.cancelled,

3972: /* Bug 13075675 -> Give warning when job linked to SO is being completed,
3973: * and give error when job linked to SO is being cancelled or
3974: * complete-no charge.
3975: */
3976: /* if ( wjsi_row.status_type in (wip_constants.cancelled,
3977: wip_constants.comp_chrg)
3978: and (l_old_status not in (wip_constants.cancelled, wip_constants.comp_chrg,
3979: wip_constants.comp_nochrg))) then
3980: open check_so_link;

Line 3977: wip_constants.comp_chrg)

3973: * and give error when job linked to SO is being cancelled or
3974: * complete-no charge.
3975: */
3976: /* if ( wjsi_row.status_type in (wip_constants.cancelled,
3977: wip_constants.comp_chrg)
3978: and (l_old_status not in (wip_constants.cancelled, wip_constants.comp_chrg,
3979: wip_constants.comp_nochrg))) then
3980: open check_so_link;
3981: fetch check_so_link into l_qtyReserved;

Line 3978: and (l_old_status not in (wip_constants.cancelled, wip_constants.comp_chrg,

3974: * complete-no charge.
3975: */
3976: /* if ( wjsi_row.status_type in (wip_constants.cancelled,
3977: wip_constants.comp_chrg)
3978: and (l_old_status not in (wip_constants.cancelled, wip_constants.comp_chrg,
3979: wip_constants.comp_nochrg))) then
3980: open check_so_link;
3981: fetch check_so_link into l_qtyReserved;
3982: close check_so_link;

Line 3979: wip_constants.comp_nochrg))) then

3975: */
3976: /* if ( wjsi_row.status_type in (wip_constants.cancelled,
3977: wip_constants.comp_chrg)
3978: and (l_old_status not in (wip_constants.cancelled, wip_constants.comp_chrg,
3979: wip_constants.comp_nochrg))) then
3980: open check_so_link;
3981: fetch check_so_link into l_qtyReserved;
3982: close check_so_link;
3983:

Line 3995: if ( l_qtyReserved > 0 and wjsi_row.status_type in (wip_constants.cancelled,

3991: open check_so_link;
3992: fetch check_so_link into l_qtyReserved;
3993: close check_so_link;
3994:
3995: if ( l_qtyReserved > 0 and wjsi_row.status_type in (wip_constants.cancelled,
3996: wip_constants.comp_nochrg) -- 13075675
3997: and (l_old_status not in (wip_constants.cancelled, wip_constants.comp_chrg,
3998: wip_constants.comp_nochrg))) then
3999:

Line 3996: wip_constants.comp_nochrg) -- 13075675

3992: fetch check_so_link into l_qtyReserved;
3993: close check_so_link;
3994:
3995: if ( l_qtyReserved > 0 and wjsi_row.status_type in (wip_constants.cancelled,
3996: wip_constants.comp_nochrg) -- 13075675
3997: and (l_old_status not in (wip_constants.cancelled, wip_constants.comp_chrg,
3998: wip_constants.comp_nochrg))) then
3999:
4000: l_msg := 'WIP_CANT_CANCEL_SO';

Line 3997: and (l_old_status not in (wip_constants.cancelled, wip_constants.comp_chrg,

3993: close check_so_link;
3994:
3995: if ( l_qtyReserved > 0 and wjsi_row.status_type in (wip_constants.cancelled,
3996: wip_constants.comp_nochrg) -- 13075675
3997: and (l_old_status not in (wip_constants.cancelled, wip_constants.comp_chrg,
3998: wip_constants.comp_nochrg))) then
3999:
4000: l_msg := 'WIP_CANT_CANCEL_SO';
4001: raise fnd_api.g_exc_unexpected_error;

Line 3998: wip_constants.comp_nochrg))) then

3994:
3995: if ( l_qtyReserved > 0 and wjsi_row.status_type in (wip_constants.cancelled,
3996: wip_constants.comp_nochrg) -- 13075675
3997: and (l_old_status not in (wip_constants.cancelled, wip_constants.comp_chrg,
3998: wip_constants.comp_nochrg))) then
3999:
4000: l_msg := 'WIP_CANT_CANCEL_SO';
4001: raise fnd_api.g_exc_unexpected_error;
4002: end if;

Line 4005: wjsi_row.status_type = wip_constants.comp_chrg) then

4001: raise fnd_api.g_exc_unexpected_error;
4002: end if;
4003:
4004: if ( l_qtyReserved > 0 and
4005: wjsi_row.status_type = wip_constants.comp_chrg) then
4006: fnd_message.set_name('WIP','WIP_SO_EXISTS');
4007: setInterfaceError(p_rowid, wjsi_row.interface_id, fnd_message.get, validationWarning);
4008: end if;
4009: -- 13075675 @end

Line 4011: if ( wjsi_row.status_type in (wip_constants.cancelled,

4007: setInterfaceError(p_rowid, wjsi_row.interface_id, fnd_message.get, validationWarning);
4008: end if;
4009: -- 13075675 @end
4010:
4011: if ( wjsi_row.status_type in (wip_constants.cancelled,
4012: wip_constants.comp_chrg,
4013: wip_constants.comp_nochrg)
4014: and (l_old_status not in (wip_constants.cancelled, wip_constants.comp_chrg,
4015: wip_constants.comp_nochrg))) then

Line 4012: wip_constants.comp_chrg,

4008: end if;
4009: -- 13075675 @end
4010:
4011: if ( wjsi_row.status_type in (wip_constants.cancelled,
4012: wip_constants.comp_chrg,
4013: wip_constants.comp_nochrg)
4014: and (l_old_status not in (wip_constants.cancelled, wip_constants.comp_chrg,
4015: wip_constants.comp_nochrg))) then
4016: if ( wip_osp.po_req_exists(wjsi_row.wip_entity_id,

Line 4013: wip_constants.comp_nochrg)

4009: -- 13075675 @end
4010:
4011: if ( wjsi_row.status_type in (wip_constants.cancelled,
4012: wip_constants.comp_chrg,
4013: wip_constants.comp_nochrg)
4014: and (l_old_status not in (wip_constants.cancelled, wip_constants.comp_chrg,
4015: wip_constants.comp_nochrg))) then
4016: if ( wip_osp.po_req_exists(wjsi_row.wip_entity_id,
4017: null,

Line 4014: and (l_old_status not in (wip_constants.cancelled, wip_constants.comp_chrg,

4010:
4011: if ( wjsi_row.status_type in (wip_constants.cancelled,
4012: wip_constants.comp_chrg,
4013: wip_constants.comp_nochrg)
4014: and (l_old_status not in (wip_constants.cancelled, wip_constants.comp_chrg,
4015: wip_constants.comp_nochrg))) then
4016: if ( wip_osp.po_req_exists(wjsi_row.wip_entity_id,
4017: null,
4018: wjsi_row.organization_id,

Line 4015: wip_constants.comp_nochrg))) then

4011: if ( wjsi_row.status_type in (wip_constants.cancelled,
4012: wip_constants.comp_chrg,
4013: wip_constants.comp_nochrg)
4014: and (l_old_status not in (wip_constants.cancelled, wip_constants.comp_chrg,
4015: wip_constants.comp_nochrg))) then
4016: if ( wip_osp.po_req_exists(wjsi_row.wip_entity_id,
4017: null,
4018: wjsi_row.organization_id,
4019: null,

Line 4020: wip_constants.discrete) = true ) then

4016: if ( wip_osp.po_req_exists(wjsi_row.wip_entity_id,
4017: null,
4018: wjsi_row.organization_id,
4019: null,
4020: wip_constants.discrete) = true ) then
4021: if ( po_code_release_grp.Current_Release >=
4022: po_code_release_grp.PRC_11i_Family_Pack_J ) then
4023: select propagate_job_change_to_po
4024: into l_propagate_job_change_to_po

Line 4028: if ( l_propagate_job_change_to_po = wip_constants.yes and

4024: into l_propagate_job_change_to_po
4025: from wip_parameters wp
4026: where organization_id = wjsi_row.organization_id;
4027:
4028: if ( l_propagate_job_change_to_po = wip_constants.yes and
4029: wjsi_row.status_type in (wip_constants.cancelled,
4030: wip_constants.comp_nochrg) ) then
4031: -- cancel PO/requisition associated to the job if cancel or
4032: -- complete-no-charge

Line 4029: wjsi_row.status_type in (wip_constants.cancelled,

4025: from wip_parameters wp
4026: where organization_id = wjsi_row.organization_id;
4027:
4028: if ( l_propagate_job_change_to_po = wip_constants.yes and
4029: wjsi_row.status_type in (wip_constants.cancelled,
4030: wip_constants.comp_nochrg) ) then
4031: -- cancel PO/requisition associated to the job if cancel or
4032: -- complete-no-charge
4033: wip_osp.cancelPOReq(p_job_id => wjsi_row.wip_entity_id,

Line 4030: wip_constants.comp_nochrg) ) then

4026: where organization_id = wjsi_row.organization_id;
4027:
4028: if ( l_propagate_job_change_to_po = wip_constants.yes and
4029: wjsi_row.status_type in (wip_constants.cancelled,
4030: wip_constants.comp_nochrg) ) then
4031: -- cancel PO/requisition associated to the job if cancel or
4032: -- complete-no-charge
4033: wip_osp.cancelPOReq(p_job_id => wjsi_row.wip_entity_id,
4034: p_org_id => wjsi_row.organization_id,

Line 4037: po_warning_flag := WIP_CONSTANTS.YES;

4033: wip_osp.cancelPOReq(p_job_id => wjsi_row.wip_entity_id,
4034: p_org_id => wjsi_row.organization_id,
4035: x_return_status => l_retStatus);
4036: if ( l_retStatus <> fnd_api.g_ret_sts_success ) then
4037: po_warning_flag := WIP_CONSTANTS.YES;
4038: setInterfaceError(p_rowid, wjsi_row.interface_id, fnd_message.get, validationWarning);
4039: end if;
4040: else
4041: -- propagate_job_change_to_po is manual or job status is 'Complete'

Line 4042: po_warning_flag := WIP_CONSTANTS.YES;

4038: setInterfaceError(p_rowid, wjsi_row.interface_id, fnd_message.get, validationWarning);
4039: end if;
4040: else
4041: -- propagate_job_change_to_po is manual or job status is 'Complete'
4042: po_warning_flag := WIP_CONSTANTS.YES;
4043: fnd_message.set_name('WIP', 'WIP_CANCEL_JOB/SCHED_OPEN_PO');
4044: setInterfaceError(p_rowid, wjsi_row.interface_id, fnd_message.get, validationWarning);
4045: end if;
4046: else

Line 4048: po_warning_flag := WIP_CONSTANTS.YES;

4044: setInterfaceError(p_rowid, wjsi_row.interface_id, fnd_message.get, validationWarning);
4045: end if;
4046: else
4047: -- customer does not have PO patchset J onward, so behave the the old way
4048: po_warning_flag := WIP_CONSTANTS.YES;
4049: fnd_message.set_name('WIP', 'WIP_CANCEL_JOB/SCHED_OPEN_PO');
4050: setInterfaceError(p_rowid, wjsi_row.interface_id, fnd_message.get, validationWarning);
4051: end if;
4052: end if; -- po/requisiton exist

Line 4059: wdj_row.status_type in (wip_constants.comp_chrg, wip_constants.comp_nochrg,

4055: -- Bug 3032515 - Added validation to prevent updation to completed/
4056: -- cancelled/completed-no charges/closed jobs through planner module
4057: -- for which source code is populated as MSC
4058: if ( wjsi_row.source_code = 'MSC' and
4059: wdj_row.status_type in (wip_constants.comp_chrg, wip_constants.comp_nochrg,
4060: wip_constants.cancelled, wip_constants.closed) ) then
4061: l_msg := 'WIP_CANT_UPDATE_JOB';
4062: raise fnd_api.g_exc_unexpected_error;
4063: end if;

Line 4060: wip_constants.cancelled, wip_constants.closed) ) then

4056: -- cancelled/completed-no charges/closed jobs through planner module
4057: -- for which source code is populated as MSC
4058: if ( wjsi_row.source_code = 'MSC' and
4059: wdj_row.status_type in (wip_constants.comp_chrg, wip_constants.comp_nochrg,
4060: wip_constants.cancelled, wip_constants.closed) ) then
4061: l_msg := 'WIP_CANT_UPDATE_JOB';
4062: raise fnd_api.g_exc_unexpected_error;
4063: end if;
4064:

Line 4066: if ( wjsi_row.status_type = WIP_CONSTANTS.UNRELEASED and

4062: raise fnd_api.g_exc_unexpected_error;
4063: end if;
4064:
4065: -- bug# 3436646: job cannot be changed to unreleased if it's been pick released
4066: if ( wjsi_row.status_type = WIP_CONSTANTS.UNRELEASED and
4067: wdj_row.status_type <> WIP_CONSTANTS.UNRELEASED and
4068: WIP_PICKING_PUB.Is_Job_Pick_Released(
4069: p_wip_entity_id => wjsi_row.wip_entity_id,
4070: p_org_id => wjsi_row.organization_id) ) then

Line 4067: wdj_row.status_type <> WIP_CONSTANTS.UNRELEASED and

4063: end if;
4064:
4065: -- bug# 3436646: job cannot be changed to unreleased if it's been pick released
4066: if ( wjsi_row.status_type = WIP_CONSTANTS.UNRELEASED and
4067: wdj_row.status_type <> WIP_CONSTANTS.UNRELEASED and
4068: WIP_PICKING_PUB.Is_Job_Pick_Released(
4069: p_wip_entity_id => wjsi_row.wip_entity_id,
4070: p_org_id => wjsi_row.organization_id) ) then
4071: l_msg := 'WIP_UNRLS_JOB/SCHED';

Line 4088: if ( wjsi_row.load_type = wip_constants.create_sched ) then

4084: x_errorMsg out nocopy varchar2) is
4085: l_retval boolean;
4086: l_buildSeq number;
4087: begin
4088: if ( wjsi_row.load_type = wip_constants.create_sched ) then
4089: return;
4090: end if;
4091:
4092: if ( wjsi_row.build_sequence is null ) then

Line 4093: if ( wjsi_row.load_type = wip_constants.resched_job ) then

4089: return;
4090: end if;
4091:
4092: if ( wjsi_row.build_sequence is null ) then
4093: if ( wjsi_row.load_type = wip_constants.resched_job ) then
4094: l_buildSeq := wdj_row.build_sequence;
4095: else
4096: l_buildSeq := null;
4097: end if;

Line 4128: if ( wjsi_row.load_type = wip_constants.create_ns_job) then

4124: l_dummy number;
4125: l_msg varchar2(30);
4126: begin
4127: --Bug#16002070:Added NVL when bom reference is null for unit effective items
4128: if ( wjsi_row.load_type = wip_constants.create_ns_job) then
4129: l_bomitemID := NVL(wjsi_row.bom_reference_id,wjsi_row.primary_item_id);
4130: else
4131: l_bomItemID := wjsi_row.primary_item_id;
4132: end if;

Line 4159: if( l_isUnitEffective and wjsi_row.load_type = wip_constants.create_sched ) then

4155: end;
4156: end if;
4157:
4158: -- You cannot create a repetitive schedule for a unit effective assembly.
4159: if( l_isUnitEffective and wjsi_row.load_type = wip_constants.create_sched ) then
4160: l_msg := 'WIP_ML_NO_UNIT_EFF_SCHED';
4161: raise fnd_api.g_exc_unexpected_error;
4162: end if;
4163:

Line 4170: if (wjsi_row.load_type in (wip_constants.create_job, wip_constants.create_ns_job)) then

4166: l_msg := 'WIP_ML_UNIT_NUM_MEANINGLESS';
4167: raise fnd_api.g_exc_unexpected_error;
4168: end if;
4169:
4170: if (wjsi_row.load_type in (wip_constants.create_job, wip_constants.create_ns_job)) then
4171: -- Unit number is required for unit effective assemblies.
4172: if( l_isUnitEffective and wjsi_row.end_item_unit_number is null) then
4173: fnd_message.set_name('PJM', 'UEFF-UNIT NUMBER REQUIRED');
4174: x_errorMsg := fnd_message.get;

Line 4181: if ( wjsi_row.load_type = wip_constants.resched_job ) then

4177: end if;
4178: end if;
4179:
4180: --if request is for reschedule, keep as is for all cases except when job_status is unreleased
4181: if ( wjsi_row.load_type = wip_constants.resched_job ) then
4182: if ( wjsi_row.end_item_unit_number is null) then
4183: begin
4184: select wdj.end_item_unit_number
4185: into wjsi_row.end_item_unit_number

Line 4197: if ( wjsi_row.status_type = wip_constants.unreleased and

4193: raise line_validation_error;
4194: end;
4195: end if;
4196:
4197: if ( wjsi_row.status_type = wip_constants.unreleased and
4198: wjsi_row.end_item_unit_number is not null ) then
4199: -- bug#2719927, bom revision code/reexplosion is based on bom_reference_id
4200: select primary_item_id
4201: into wjsi_row.bom_reference_id

Line 4206: if ( wjsi_row.status_type <> wip_constants.unreleased and

4202: from wip_discrete_jobs
4203: where wip_entity_id = wjsi_row.wip_entity_id;
4204: end if;
4205:
4206: if ( wjsi_row.status_type <> wip_constants.unreleased and
4207: wjsi_row.end_item_unit_number is not null ) then
4208: fnd_message.set_name('WIP', 'END_ITEM_UNIT_NUMBER');
4209: setInterfaceError(p_rowid, wjsi_row.interface_id, x_errorMsg, validationWarning);
4210: -- Added by Renga Kannan

Line 4246: if( wjsi_row.load_type <> wip_constants.create_sched ) then

4242: procedure validateDailyProductionRate(p_rowid in rowid,
4243: x_errorMsg out nocopy varchar2) is
4244: l_maxLineRate number;
4245: begin
4246: if( wjsi_row.load_type <> wip_constants.create_sched ) then
4247: return;
4248: end if;
4249:
4250: select daily_maximum_rate

Line 4269: if ( wjsi_row.load_type <> wip_constants.create_sched ) then

4265: l_dateCount number := 0;
4266: l_lineCount number;
4267: l_rtgCount number;
4268: begin
4269: if ( wjsi_row.load_type <> wip_constants.create_sched ) then
4270: return;
4271: end if;
4272:
4273: if ( wjsi_row.first_unit_start_date is not null ) then

Line 4519: if ( l_loadType in (wip_constants.create_job, wip_constants.create_ns_job) ) then

4515: if( l_startOp is not null or l_primaryItem is null ) then
4516: return;
4517: end if;
4518:
4519: if ( l_loadType in (wip_constants.create_job, wip_constants.create_ns_job) ) then
4520: if ( p_rtgVal is not null ) then
4521: update wip_discrete_jobs
4522: set serialization_start_op = p_rtgVal
4523: where wip_entity_id = l_wipID

Line 4528: and serial_number_control_code = wip_constants.full_sn);

4524: and exists (select 1
4525: from mtl_system_items
4526: where inventory_item_id = l_primaryItem
4527: and organization_id = l_orgID
4528: and serial_number_control_code = wip_constants.full_sn);
4529:
4530: elsif ( l_default = wip_constants.yes ) then
4531: update wip_discrete_jobs
4532: set serialization_start_op = (select nvl(min(operation_seq_num), 1)

Line 4530: elsif ( l_default = wip_constants.yes ) then

4526: where inventory_item_id = l_primaryItem
4527: and organization_id = l_orgID
4528: and serial_number_control_code = wip_constants.full_sn);
4529:
4530: elsif ( l_default = wip_constants.yes ) then
4531: update wip_discrete_jobs
4532: set serialization_start_op = (select nvl(min(operation_seq_num), 1)
4533: from wip_operations
4534: where wip_entity_id = l_wipID)

Line 4540: and serial_number_control_code = wip_constants.full_sn);

4536: and exists (select 1
4537: from mtl_system_items
4538: where inventory_item_id = l_primaryItem
4539: and organization_id = l_orgID
4540: and serial_number_control_code = wip_constants.full_sn);
4541: end if;
4542: end if;
4543: end defaultSerializationStartOp;
4544:

Line 4578: if ( wjsi_row.load_type = wip_constants.resched_job ) then

4574: from wip_job_schedule_interface wjsi
4575: where wjsi.rowid = p_rowid;
4576:
4577: if ( l_serialOp is null ) then
4578: if ( wjsi_row.load_type = wip_constants.resched_job ) then
4579: --in this case, we may need to clear the serialization op if the routing was re-exploded
4580: update wip_discrete_jobs wdj
4581: set serialization_start_op = null
4582: where wip_entity_id = l_wipEntityID

Line 4601: and msi.serial_number_control_code = wip_constants.full_sn;

4597: mtl_system_items msi
4598: where wdj.primary_item_id = msi.inventory_item_id
4599: and wdj.organization_id = msi.organization_id
4600: and wdj.wip_entity_id = l_wipEntityID
4601: and msi.serial_number_control_code = wip_constants.full_sn;
4602:
4603: open c_ops(l_wipEntityId);
4604: loop
4605: fetch c_ops into l_curOpSeq;

Line 4627: if ( l_loadType = wip_constants.resched_job ) then

4623: end if;
4624:
4625: -- job must be unreleased to change the serialization op on a
4626: -- reschedule request. This is to guarantee no txns have taken place.
4627: if ( l_loadType = wip_constants.resched_job ) then
4628: select 1
4629: into l_dummy
4630: from wip_discrete_jobs
4631: where wip_entity_id = l_wipEntityID

Line 4632: and status_type = wip_constants.unreleased;

4628: select 1
4629: into l_dummy
4630: from wip_discrete_jobs
4631: where wip_entity_id = l_wipEntityID
4632: and status_type = wip_constants.unreleased;
4633: end if;
4634: exception
4635: when others then
4636: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

Line 4653: wjsi_row.load_type in (wip_constants.create_sched)) then

4649: l_msg varchar2(30);
4650: begin
4651: /*Bug 5446216 (FP Bug 5504790): Subinventory can be passed as null during job rescheduling. */
4652: if ( /* wjsi_row.completion_subinventory is null or */
4653: wjsi_row.load_type in (wip_constants.create_sched)) then
4654: --Bug 5191031:It is allowed to modify locator during job rescheduling.
4655: --Hence validation below should be executed when load_type is resched_job
4656: --wjsi_row.load_type in (wip_constants.create_sched,
4657: -- wip_constants.resched_job) ) then

Line 4656: --wjsi_row.load_type in (wip_constants.create_sched,

4652: if ( /* wjsi_row.completion_subinventory is null or */
4653: wjsi_row.load_type in (wip_constants.create_sched)) then
4654: --Bug 5191031:It is allowed to modify locator during job rescheduling.
4655: --Hence validation below should be executed when load_type is resched_job
4656: --wjsi_row.load_type in (wip_constants.create_sched,
4657: -- wip_constants.resched_job) ) then
4658: return;
4659: end if;
4660:

Line 4657: -- wip_constants.resched_job) ) then

4653: wjsi_row.load_type in (wip_constants.create_sched)) then
4654: --Bug 5191031:It is allowed to modify locator during job rescheduling.
4655: --Hence validation below should be executed when load_type is resched_job
4656: --wjsi_row.load_type in (wip_constants.create_sched,
4657: -- wip_constants.resched_job) ) then
4658: return;
4659: end if;
4660:
4661: if ( wjsi_row.load_type = wip_constants.resched_job ) then

Line 4661: if ( wjsi_row.load_type = wip_constants.resched_job ) then

4657: -- wip_constants.resched_job) ) then
4658: return;
4659: end if;
4660:
4661: if ( wjsi_row.load_type = wip_constants.resched_job ) then
4662: wjsi_row.project_id := nvl(wjsi_row.project_id, wdj_row.project_id);
4663: wjsi_row.task_id := nvl(wjsi_row.task_id, wdj_row.task_id);
4664: /*Bug 5446216 (FP Bug 5504790): Need not copy old value if value is fnd_api.g_miss_char*/
4665: if wjsi_row.completion_subinventory is null then

Line 4711: if(wjsi_row.load_type <> wip_constants.create_sched and

4707: end if;
4708: end if;
4709:
4710: /* Bug 5446216 (FP Bug 5504790):Need not validate locator when subinventory is null */
4711: if(wjsi_row.load_type <> wip_constants.create_sched and
4712: ((wjsi_row.completion_subinventory IS NOT NULL AND wjsi_row.completion_subinventory <> fnd_api.g_miss_char)
4713: OR (wjsi_row.completion_locator_id IS NOT NULL AND wjsi_row.completion_locator_id <> fnd_api.g_miss_num))) then
4714:
4715: l_msg := 'WIP_ML_INVALID_LOCATOR';

Line 4766: if (l_logLevel <= wip_constants.trace_logging) then

4762: l_ret_status varchar2(20);
4763: l_logLevel number := to_number(fnd_log.g_current_runtime_level);
4764: l_procName varchar2(30) := 'deriveScheduleDate';
4765: begin
4766: if (l_logLevel <= wip_constants.trace_logging) then
4767: l_params(1).paramName := 'p_rowid';
4768: l_params(1).paramValue := p_rowid;
4769: wip_logger.entryPoint(p_procName => g_pkgName || '.' || l_procName,
4770: p_params => l_params,

Line 4783: wjsi_row.load_type = wip_constants.resched_job and

4779: dates are updated as original job start date in update_routing procedure in wipschdb.pls .
4780: */
4781:
4782: if (wjsi_row.source_code = 'MSC' and
4783: wjsi_row.load_type = wip_constants.resched_job and
4784: wjsi_row.scheduling_method = wip_constants.ml_manual) then
4785:
4786: begin
4787: select wdj.scheduled_start_date

Line 4784: wjsi_row.scheduling_method = wip_constants.ml_manual) then

4780: */
4781:
4782: if (wjsi_row.source_code = 'MSC' and
4783: wjsi_row.load_type = wip_constants.resched_job and
4784: wjsi_row.scheduling_method = wip_constants.ml_manual) then
4785:
4786: begin
4787: select wdj.scheduled_start_date
4788: into wjsi_row.first_unit_start_date

Line 4811: if (l_logLevel <= wip_constants.trace_logging) then

4807: null;
4808: end;
4809: end if;
4810:
4811: if (l_logLevel <= wip_constants.trace_logging) then
4812: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
4813: p_procReturnStatus => null,
4814: p_msg => 'success',
4815: x_returnStatus => l_ret_status);

Line 4823: if ( wjsi_row.load_type = wip_constants.resched_job ) then

4819:
4820: procedure validateLotNumber(p_rowid in rowid,
4821: x_errorMsg out nocopy varchar2) is
4822: begin
4823: if ( wjsi_row.load_type = wip_constants.resched_job ) then
4824: wjsi_row.lot_number := wip_lot_number_default.lot_number(
4825: p_item_id => wdj_row.primary_item_id,
4826: p_organization_id => wjsi_row.organization_id,
4827: p_lot_number => wjsi_row.lot_number,

Line 4830: elsif ( wjsi_row.load_type in (wip_constants.create_job,

4826: p_organization_id => wjsi_row.organization_id,
4827: p_lot_number => wjsi_row.lot_number,
4828: p_job_name => wdj_row.wip_entity_name,
4829: p_default_flag => 0);
4830: elsif ( wjsi_row.load_type in (wip_constants.create_job,
4831: wip_constants.create_ns_job) ) then
4832: wjsi_row.lot_number := wip_lot_number_default.lot_number(
4833: p_item_id => wjsi_row.primary_item_id,
4834: p_organization_id => wjsi_row.organization_id,

Line 4831: wip_constants.create_ns_job) ) then

4827: p_lot_number => wjsi_row.lot_number,
4828: p_job_name => wdj_row.wip_entity_name,
4829: p_default_flag => 0);
4830: elsif ( wjsi_row.load_type in (wip_constants.create_job,
4831: wip_constants.create_ns_job) ) then
4832: wjsi_row.lot_number := wip_lot_number_default.lot_number(
4833: p_item_id => wjsi_row.primary_item_id,
4834: p_organization_id => wjsi_row.organization_id,
4835: p_lot_number => wjsi_row.lot_number,

Line 4872: if ( p_validationLevel <> wip_constants.inv and l_valid_card = 0 ) then

4868: when others then
4869: null;
4870: end;
4871:
4872: if ( p_validationLevel <> wip_constants.inv and l_valid_card = 0 ) then
4873: l_msg := 'WIP_ML_KB_SRC_NOT_INV';
4874: raise fnd_api.g_exc_unexpected_error;
4875: else
4876: if ( wjsi_row.load_type = wip_constants.create_job ) then

Line 4876: if ( wjsi_row.load_type = wip_constants.create_job ) then

4872: if ( p_validationLevel <> wip_constants.inv and l_valid_card = 0 ) then
4873: l_msg := 'WIP_ML_KB_SRC_NOT_INV';
4874: raise fnd_api.g_exc_unexpected_error;
4875: else
4876: if ( wjsi_row.load_type = wip_constants.create_job ) then
4877: l_raw_job := WIP_Work_Order_Pub.G_MISS_DISCRETEJOB_REC;
4878:
4879: l_raw_job.organization_id := wjsi_row.organization_id;
4880: l_raw_job.kanban_card_id := wjsi_row.kanban_card_id;

Line 4896: elsif ( wjsi_row.load_type = wip_constants.create_sched) then

4892: wjsi_row.primary_item_id := l_defaulted_job.primary_item_id;
4893: wjsi_row.completion_subinventory := l_defaulted_job.completion_subinventory;
4894: wjsi_row.completion_locator_id := l_defaulted_job.completion_locator_id;
4895: wjsi_row.start_quantity := l_defaulted_job.start_quantity;
4896: elsif ( wjsi_row.load_type = wip_constants.create_sched) then
4897: l_raw_sched := WIP_Work_Order_Pub.G_MISS_REPSCHEDULE_REC;
4898:
4899: l_raw_sched.organization_id := wjsi_row.organization_id;
4900: l_raw_sched.kanban_card_id := wjsi_row.kanban_card_id ;

Line 4924: if(wjsi_row.load_type = wip_constants.create_job) then

4920: end if;
4921:
4922: l_msg := 'WIP_ML_KB_UPDATE_FAILED';
4923: l_doc_header_id := wjsi_row.wip_entity_id ;
4924: if(wjsi_row.load_type = wip_constants.create_job) then
4925: l_doc_type := INV_Kanban_PVT.G_doc_type_Discrete_Job ;
4926: elsif(wjsi_row.load_type = wip_constants.create_sched) then
4927: l_doc_type := INV_Kanban_PVT.G_doc_type_Rep_Schedule ;
4928: else

Line 4926: elsif(wjsi_row.load_type = wip_constants.create_sched) then

4922: l_msg := 'WIP_ML_KB_UPDATE_FAILED';
4923: l_doc_header_id := wjsi_row.wip_entity_id ;
4924: if(wjsi_row.load_type = wip_constants.create_job) then
4925: l_doc_type := INV_Kanban_PVT.G_doc_type_Discrete_Job ;
4926: elsif(wjsi_row.load_type = wip_constants.create_sched) then
4927: l_doc_type := INV_Kanban_PVT.G_doc_type_Rep_Schedule ;
4928: else
4929: raise fnd_api.g_exc_unexpected_error;
4930: end if;

Line 4962: if ( wjsi_row.load_type = wip_constants.resched_job ) then

4958: procedure validateOvercompletion(p_rowid in rowid,
4959: x_errorMsg out nocopy varchar2) is
4960: l_msg varchar2(30);
4961: begin
4962: if ( wjsi_row.load_type = wip_constants.resched_job ) then
4963: if ( wjsi_row.overcompletion_tolerance_type is null ) then
4964: wjsi_row.overcompletion_tolerance_type := wdj_row.overcompletion_tolerance_type;
4965: end if;
4966: if ( wjsi_row.overcompletion_tolerance_value is null ) then

Line 4971: if ( wjsi_row.load_type in (wip_constants.create_job, wip_constants.create_ns_job) and

4967: wjsi_row.overcompletion_tolerance_value := wdj_row.overcompletion_tolerance_value;
4968: end if;
4969: end if;
4970:
4971: if ( wjsi_row.load_type in (wip_constants.create_job, wip_constants.create_ns_job) and
4972: wjsi_row.primary_item_id is not null and
4973: wjsi_row.overcompletion_tolerance_type is null and
4974: wjsi_row.overcompletion_tolerance_value is null ) then
4975: wip_overcompletion.get_tolerance_default(

Line 4983: if ( wjsi_row.load_type in (wip_constants.create_job, wip_constants.resched_job) or

4979: p_tolerance_value => wjsi_row.overcompletion_tolerance_value);
4980:
4981: end if;
4982:
4983: if ( wjsi_row.load_type in (wip_constants.create_job, wip_constants.resched_job) or
4984: (wjsi_row.load_type = wip_constants.create_ns_job and wjsi_row.primary_item_id is not null) ) then
4985: if ( wjsi_row.overcompletion_tolerance_type is not null and
4986: wjsi_row.overcompletion_tolerance_value is not null ) then
4987: if ( wjsi_row.overcompletion_tolerance_type not in (wip_constants.percent, wip_constants.amount) ) then

Line 4984: (wjsi_row.load_type = wip_constants.create_ns_job and wjsi_row.primary_item_id is not null) ) then

4980:
4981: end if;
4982:
4983: if ( wjsi_row.load_type in (wip_constants.create_job, wip_constants.resched_job) or
4984: (wjsi_row.load_type = wip_constants.create_ns_job and wjsi_row.primary_item_id is not null) ) then
4985: if ( wjsi_row.overcompletion_tolerance_type is not null and
4986: wjsi_row.overcompletion_tolerance_value is not null ) then
4987: if ( wjsi_row.overcompletion_tolerance_type not in (wip_constants.percent, wip_constants.amount) ) then
4988: l_msg:= 'WIP_ML_COMP_TOLERANCE_TYPE';

Line 4987: if ( wjsi_row.overcompletion_tolerance_type not in (wip_constants.percent, wip_constants.amount) ) then

4983: if ( wjsi_row.load_type in (wip_constants.create_job, wip_constants.resched_job) or
4984: (wjsi_row.load_type = wip_constants.create_ns_job and wjsi_row.primary_item_id is not null) ) then
4985: if ( wjsi_row.overcompletion_tolerance_type is not null and
4986: wjsi_row.overcompletion_tolerance_value is not null ) then
4987: if ( wjsi_row.overcompletion_tolerance_type not in (wip_constants.percent, wip_constants.amount) ) then
4988: l_msg:= 'WIP_ML_COMP_TOLERANCE_TYPE';
4989: raise fnd_api.g_exc_unexpected_error;
4990: end if;
4991: if( wjsi_row.overcompletion_tolerance_value < 0 ) then

Line 5047: l_processStatus := wip_constants.error;

5043: p_text in varchar2,
5044: p_type in number) is
5045: l_processStatus number;
5046: begin
5047: l_processStatus := wip_constants.error;
5048: if ( p_type = validationWarning ) then
5049: l_processStatus := wip_constants.warning;
5050: end if;
5051:

Line 5049: l_processStatus := wip_constants.warning;

5045: l_processStatus number;
5046: begin
5047: l_processStatus := wip_constants.error;
5048: if ( p_type = validationWarning ) then
5049: l_processStatus := wip_constants.warning;
5050: end if;
5051:
5052: update wip_job_schedule_interface
5053: set process_status = l_processStatus,