DBA Data[Home] [Help]

APPS.WIP_MTI_PUB dependencies on WIP_CONSTANTS

Line 79: 'Y', wip_constants.flow,

75: mti.overcompletion_transaction_qty,
76: mti.overcompletion_primary_qty,
77: mti.move_transaction_id,
78: decode(upper(mti.flow_schedule),
79: 'Y', wip_constants.flow,
80: we.entity_type),
81: mti.transaction_uom,
82: msi.primary_uom_code,
83: mti.locator_id,

Line 93: and mti.transaction_action_id in (wip_constants.cplassy_action,

89: wip_entities we,
90: mtl_system_items msi
91: where mti.transaction_header_id = p_txnHeaderID
92: and mti.transaction_source_type_id = 5
93: and mti.transaction_action_id in (wip_constants.cplassy_action,
94: wip_constants.retassy_action,
95: wip_constants.scrassy_action)
96: and mti.transaction_source_id = we.wip_entity_id (+)
97: and mti.organization_id = we.organization_id (+)

Line 94: wip_constants.retassy_action,

90: mtl_system_items msi
91: where mti.transaction_header_id = p_txnHeaderID
92: and mti.transaction_source_type_id = 5
93: and mti.transaction_action_id in (wip_constants.cplassy_action,
94: wip_constants.retassy_action,
95: wip_constants.scrassy_action)
96: and mti.transaction_source_id = we.wip_entity_id (+)
97: and mti.organization_id = we.organization_id (+)
98: and mti.inventory_item_id = msi.inventory_item_id

Line 95: wip_constants.scrassy_action)

91: where mti.transaction_header_id = p_txnHeaderID
92: and mti.transaction_source_type_id = 5
93: and mti.transaction_action_id in (wip_constants.cplassy_action,
94: wip_constants.retassy_action,
95: wip_constants.scrassy_action)
96: and mti.transaction_source_id = we.wip_entity_id (+)
97: and mti.organization_id = we.organization_id (+)
98: and mti.inventory_item_id = msi.inventory_item_id
99: and mti.organization_id = msi.organization_id;

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

108: l_convPriQty NUMBER;
109: l_convOverCplPriQty NUMBER;
110: l_convErrExists boolean;
111: begin
112: if (l_logLevel <= wip_constants.trace_logging) then
113: l_params(1).paramName := 'p_txnHeaderID';
114: l_params(1).paramValue := p_txnHeaderID;
115: wip_logger.entryPoint(p_procName => 'wip_mti_pub.preInvWipProcessing',
116: p_params => l_params,

Line 198: if(l_logLevel <= wip_constants.full_logging) then

194: end if;
195: /* End of fix for Bug 5411401 */
196:
197: if(l_convErrExists) then
198: if(l_logLevel <= wip_constants.full_logging) then
199: wip_logger.log('uom conversion failed.', l_returnStatus);
200: wip_logger.log('l_convPriQty' || l_convPriQty, l_returnStatus);
201: wip_logger.log('l_convOverCplPriQty' || l_convOverCplPriQty, l_returnStatus);
202: end if;

Line 236: if(l_logLevel <= wip_constants.full_logging) then

232: request_id = fnd_global.conc_request_id,
233: primary_quantity = l_tbls.priQty(i),
234: overcompletion_primary_qty = l_tbls.overCplPriQty(i)
235: where transaction_interface_id = l_tbls.txnIntID(i);
236: if(l_logLevel <= wip_constants.full_logging) then
237: wip_logger.log('pri qty:' || l_tbls.priQty(i), l_returnStatus);
238: wip_logger.log('ovcpl pri qty:' || l_tbls.overCplPriQty(i), l_returnStatus);
239: end if;
240: end if;

Line 242: if(l_tbls.wipEntityType(i) <> wip_constants.flow and not l_convErrExists) then

238: wip_logger.log('ovcpl pri qty:' || l_tbls.overCplPriQty(i), l_returnStatus);
239: end if;
240: end if;
241:
242: if(l_tbls.wipEntityType(i) <> wip_constants.flow and not l_convErrExists) then
243: if(l_logLevel <= wip_constants.full_logging) then
244: wip_logger.log('calling work order row-by-row processor', l_returnStatus);
245: end if;
246: preInvProcessWorkOrder(p_txnHeaderID => p_txnHeaderID,

Line 243: if(l_logLevel <= wip_constants.full_logging) then

239: end if;
240: end if;
241:
242: if(l_tbls.wipEntityType(i) <> wip_constants.flow and not l_convErrExists) then
243: if(l_logLevel <= wip_constants.full_logging) then
244: wip_logger.log('calling work order row-by-row processor', l_returnStatus);
245: end if;
246: preInvProcessWorkOrder(p_txnHeaderID => p_txnHeaderID,
247: p_tbls => l_tbls,

Line 255: if(l_logLevel <= wip_constants.full_logging) then

251: end if;
252: end loop;
253:
254: if ( l_errTbls.txnIntID is not null ) then
255: if(l_logLevel <= wip_constants.full_logging) then
256: wip_logger.log(l_errTbls.txnIntID.count || ' records failed work order pre-processing', l_returnStatus);
257: for i in 1..l_errTbls.txnIntID.count loop
258: wip_logger.log('txnIntID: ' || l_errTbls.txnIntID(i), l_returnStatus);
259: wip_logger.log(' errCode: ' || l_errTbls.errCode(i), l_returnStatus);

Line 273: process_flag = wip_constants.mti_error,

269: program_application_id = fnd_global.prog_appl_id,
270: program_id = fnd_global.conc_program_id,
271: program_update_date = sysdate,
272: request_id = fnd_global.conc_request_id,
273: process_flag = wip_constants.mti_error,
274: error_code = l_errTbls.errCode(i),
275: error_explanation = l_errTbls.errExpl(i),
276: lock_flag = 2 --unlock the record so it can be re-submitted
277: where transaction_interface_id = l_errTbls.txnIntID(i);

Line 280: if(l_logLevel <= wip_constants.full_logging) then

276: lock_flag = 2 --unlock the record so it can be re-submitted
277: where transaction_interface_id = l_errTbls.txnIntID(i);
278: end if;
279:
280: if(l_logLevel <= wip_constants.full_logging) then
281: wip_logger.log('calling flow group processor', l_returnStatus);
282: end if;
283:
284: preInvProcessFlow(p_txnHeaderID => p_txnHeaderID,

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

284: preInvProcessFlow(p_txnHeaderID => p_txnHeaderID,
285: x_returnStatus => l_returnStatus);
286:
287:
288: if (l_logLevel <= wip_constants.trace_logging) then
289: wip_logger.exitPoint(p_procName => 'wip_mti_pub.preInvWIPProcessing',
290: p_procReturnStatus => x_returnStatus,
291: p_msg => 'success',
292: x_returnStatus => l_returnStatus);

Line 315: and process_flag = wip_constants.mti_inventory;

311: error_code = 'wip_mti_pub.preInvWIPProcessing',
312: error_explanation = l_errExp
313: where transaction_header_id = p_txnHeaderID
314: and transaction_source_type_id = 5
315: and process_flag = wip_constants.mti_inventory;
316:
317: if(l_logLevel <= wip_constants.trace_logging) then
318: wip_logger.exitPoint(p_procName => 'wip_mti_pub.preInvWIPProcessing',
319: p_procReturnStatus => x_returnStatus,

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

313: where transaction_header_id = p_txnHeaderID
314: and transaction_source_type_id = 5
315: and process_flag = wip_constants.mti_inventory;
316:
317: if(l_logLevel <= wip_constants.trace_logging) then
318: wip_logger.exitPoint(p_procName => 'wip_mti_pub.preInvWIPProcessing',
319: p_procReturnStatus => x_returnStatus,
320: p_msg => 'unexpected error: ' || SQLERRM,
321: x_returnStatus => l_returnStatus); --discard logging return status

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

339: l_returnStatus VARCHAR2(1);
340: begin
341: savepoint wipmtivb10;
342:
343: if(l_logLevel <= wip_constants.trace_logging) then
344: l_params(1).paramName := 'p_txnHeaderID';
345: l_params(1).paramValue := p_txnHeaderID;
346: l_params(2).paramName := 'p_index';
347: l_params(2).paramValue := p_index;

Line 359: if(p_tbls.txnActionID(p_index) = wip_constants.cplassy_action) then

355: end if;
356:
357: x_returnStatus := fnd_api.g_ret_sts_success;
358:
359: if(p_tbls.txnActionID(p_index) = wip_constants.cplassy_action) then
360: l_txnType := wip_constants.comp_txn;
361: elsif(p_tbls.txnActionID(p_index) = wip_constants.retassy_action) then
362: l_txnType := wip_constants.ret_txn;
363: else --scrap. don't do anything

Line 360: l_txnType := wip_constants.comp_txn;

356:
357: x_returnStatus := fnd_api.g_ret_sts_success;
358:
359: if(p_tbls.txnActionID(p_index) = wip_constants.cplassy_action) then
360: l_txnType := wip_constants.comp_txn;
361: elsif(p_tbls.txnActionID(p_index) = wip_constants.retassy_action) then
362: l_txnType := wip_constants.ret_txn;
363: else --scrap. don't do anything
364: if (l_logLevel <= wip_constants.trace_logging) then

Line 361: elsif(p_tbls.txnActionID(p_index) = wip_constants.retassy_action) then

357: x_returnStatus := fnd_api.g_ret_sts_success;
358:
359: if(p_tbls.txnActionID(p_index) = wip_constants.cplassy_action) then
360: l_txnType := wip_constants.comp_txn;
361: elsif(p_tbls.txnActionID(p_index) = wip_constants.retassy_action) then
362: l_txnType := wip_constants.ret_txn;
363: else --scrap. don't do anything
364: if (l_logLevel <= wip_constants.trace_logging) then
365: wip_logger.exitPoint(p_procName => 'wip_mti_pub.preInvWIPProcessing',

Line 362: l_txnType := wip_constants.ret_txn;

358:
359: if(p_tbls.txnActionID(p_index) = wip_constants.cplassy_action) then
360: l_txnType := wip_constants.comp_txn;
361: elsif(p_tbls.txnActionID(p_index) = wip_constants.retassy_action) then
362: l_txnType := wip_constants.ret_txn;
363: else --scrap. don't do anything
364: if (l_logLevel <= wip_constants.trace_logging) then
365: wip_logger.exitPoint(p_procName => 'wip_mti_pub.preInvWIPProcessing',
366: p_procReturnStatus => x_returnStatus,

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

360: l_txnType := wip_constants.comp_txn;
361: elsif(p_tbls.txnActionID(p_index) = wip_constants.retassy_action) then
362: l_txnType := wip_constants.ret_txn;
363: else --scrap. don't do anything
364: if (l_logLevel <= wip_constants.trace_logging) then
365: wip_logger.exitPoint(p_procName => 'wip_mti_pub.preInvWIPProcessing',
366: p_procReturnStatus => x_returnStatus,
367: p_msg => 'success (scrap txn)',
368: x_returnStatus => l_returnStatus);

Line 375: if (l_logLevel <= wip_constants.full_logging) then

371: end if;
372:
373: --if repetitive cpl, check allocation table to see if schedule has already been pre-processed
374: if(p_tbls.repLineID(p_index) is not null) then
375: if (l_logLevel <= wip_constants.full_logging) then
376: wip_logger.log('doing repetitive processing', l_returnStatus);
377: end if;
378: select count(*)
379: into l_count

Line 384: if (l_logLevel <= wip_constants.full_logging) then

380: from wip_mtl_allocations_temp
381: where transaction_temp_id = p_tbls.txnIntID(p_index);
382:
383: if(l_count = 0) then
384: if (l_logLevel <= wip_constants.full_logging) then
385: wip_logger.log('found unallocated schedule', l_returnStatus);
386: end if;
387: wip_cplProc_priv.preAllocateSchedules(p_txnHdrID => p_txnHeaderID,
388: p_cplTxnID => p_tbls.cplTxnID(p_index),

Line 392: p_tblName => wip_constants.MTI_TBL,

388: p_cplTxnID => p_tbls.cplTxnID(p_index),
389: p_txnActionID => p_tbls.txnActionID(p_index),
390: p_wipEntityID => p_tbls.wipEntityID(p_index),
391: p_repLineID => p_tbls.repLineID(p_index),
392: p_tblName => wip_constants.MTI_TBL,
393: p_endDebug => fnd_api.g_false,
394: x_returnStatus => x_returnStatus);
395: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
396: raise fnd_api.g_exc_error;

Line 407: and transaction_action_id in (wip_constants.isscomp_action, wip_constants.retcomp_action,

403: into l_count
404: from mtl_transactions_interface
405: where transaction_header_id = p_txnHeaderID
406: and completion_transaction_id = p_tbls.cplTxnID(p_index)
407: and transaction_action_id in (wip_constants.isscomp_action, wip_constants.retcomp_action,
408: wip_constants.issnegc_action, wip_constants.retnegc_action);
409: if(l_count = 0) then
410: if (l_logLevel <= wip_constants.full_logging) then
411: wip_logger.log('backflushing cpl', l_returnStatus);

Line 408: wip_constants.issnegc_action, wip_constants.retnegc_action);

404: from mtl_transactions_interface
405: where transaction_header_id = p_txnHeaderID
406: and completion_transaction_id = p_tbls.cplTxnID(p_index)
407: and transaction_action_id in (wip_constants.isscomp_action, wip_constants.retcomp_action,
408: wip_constants.issnegc_action, wip_constants.retnegc_action);
409: if(l_count = 0) then
410: if (l_logLevel <= wip_constants.full_logging) then
411: wip_logger.log('backflushing cpl', l_returnStatus);
412: end if;

Line 410: if (l_logLevel <= wip_constants.full_logging) then

406: and completion_transaction_id = p_tbls.cplTxnID(p_index)
407: and transaction_action_id in (wip_constants.isscomp_action, wip_constants.retcomp_action,
408: wip_constants.issnegc_action, wip_constants.retnegc_action);
409: if(l_count = 0) then
410: if (l_logLevel <= wip_constants.full_logging) then
411: wip_logger.log('backflushing cpl', l_returnStatus);
412: end if;
413: wip_bflProc_priv.backflush(p_wipEntityID => p_tbls.wipEntityID(p_index),
414: p_orgID => p_tbls.orgID(p_index),

Line 422: p_tblName => wip_constants.MTI_TBL,

418: p_batchID => p_tbls.txnBatchID(p_index),
419: p_batchSeq => p_tbls.txnSeqNum(p_index) + 1,
420: p_txnType => l_txnType,
421: p_entityType => p_tbls.wipEntityType(p_index),
422: p_tblName => wip_constants.MTI_TBL,
423: p_lineID => p_tbls.repLineID(p_index),
424: p_ocQty => p_tbls.overCplPriQty(p_index),
425: p_childMovTxnID => p_tbls.movTxnID(p_index),
426: p_cplTxnID => p_tbls.cplTxnID(p_index),

Line 428: p_lockFlag => wip_constants.yes,

424: p_ocQty => p_tbls.overCplPriQty(p_index),
425: p_childMovTxnID => p_tbls.movTxnID(p_index),
426: p_cplTxnID => p_tbls.cplTxnID(p_index),
427: p_mtlTxnMode => inv_txn_manager_grp.PROC_MODE_MTI,
428: p_lockFlag => wip_constants.yes,
429: p_reasonID => p_tbls.reasonID(p_index),
430: p_reference => p_tbls.reference(p_index),
431: x_bfRequired => l_bfRequired,
432: x_lotSerRequired => l_lsRequired,

Line 435: if (l_logLevel <= wip_constants.full_logging) then

431: x_bfRequired => l_bfRequired,
432: x_lotSerRequired => l_lsRequired,
433: x_returnStatus => x_returnStatus);
434:
435: if (l_logLevel <= wip_constants.full_logging) then
436: wip_logger.log('bf required:' || l_bfRequired, l_returnStatus);
437: wip_logger.log('ls required:' || l_lsRequired, l_returnStatus);
438: end if;
439: --if the procedure fails or some lot/serial info for backflush components can not

Line 444: if(l_lsRequired = wip_constants.yes) then

440: --be derived then error
441: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
442: raise fnd_api.g_exc_error;
443: end if;
444: if(l_lsRequired = wip_constants.yes) then
445: fnd_message.set_name('WIP', 'WIP_NO_LOT_SER_COMP_BKGND');
446: fnd_msg_pub.add;
447: raise fnd_api.g_exc_error;
448: end if;

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

447: raise fnd_api.g_exc_error;
448: end if;
449:
450: end if;
451: if (l_logLevel <= wip_constants.trace_logging) then
452: wip_logger.exitPoint(p_procName => 'wip_mti_pub.preInvWIPProcessing',
453: p_procReturnStatus => x_returnStatus,
454: p_msg => 'success',
455: x_returnStatus => l_returnStatus);

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

461: l_errCount := extendErrTbls(p_errTbls);
462: p_errTbls.txnIntID(l_errCount) := p_tbls.txnIntID(p_index);
463: p_errTbls.errCode(l_errCount) := 'WIP_PREPROCESSING';
464: wip_utilities.get_message_stack(p_msg => l_msg);
465: if(l_logLevel <= wip_constants.trace_logging) then
466: wip_logger.exitPoint(p_procName => 'wip_mti_pub.preInvWIPProcessing',
467: p_procReturnStatus => x_returnStatus,
468: p_msg => 'error:' || l_msg,
469: x_returnStatus => l_returnStatus);

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

469: x_returnStatus => l_returnStatus);
470: end if;
471: p_errTbls.errExpl(l_errCount) := substrb(l_msg, 1, 240);
472: when others then
473: if(l_logLevel <= wip_constants.trace_logging) then
474: wip_logger.exitPoint(p_procName => 'wip_mti_pub.preInvWIPProcessing',
475: p_procReturnStatus => x_returnStatus,
476: p_msg => 'unexp error:' || SQLERRM,
477: x_returnStatus => l_returnStatus);

Line 518: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,

514: from mtl_transactions_interface
515: where transaction_header_id = p_txnHeaderID
516: and process_flag = 1
517: and transaction_source_type_id = 5
518: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
519: WIP_CONSTANTS.CPLASSY_ACTION,
520: WIP_CONSTANTS.RETASSY_ACTION);
521: l_logLevel NUMBER := to_number(fnd_log.g_current_runtime_level);
522: l_params wip_logger.param_tbl_t;

Line 519: WIP_CONSTANTS.CPLASSY_ACTION,

515: where transaction_header_id = p_txnHeaderID
516: and process_flag = 1
517: and transaction_source_type_id = 5
518: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
519: WIP_CONSTANTS.CPLASSY_ACTION,
520: WIP_CONSTANTS.RETASSY_ACTION);
521: l_logLevel NUMBER := to_number(fnd_log.g_current_runtime_level);
522: l_params wip_logger.param_tbl_t;
523: l_returnStatus varchar2(1);

Line 520: WIP_CONSTANTS.RETASSY_ACTION);

516: and process_flag = 1
517: and transaction_source_type_id = 5
518: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
519: WIP_CONSTANTS.CPLASSY_ACTION,
520: WIP_CONSTANTS.RETASSY_ACTION);
521: l_logLevel NUMBER := to_number(fnd_log.g_current_runtime_level);
522: l_params wip_logger.param_tbl_t;
523: l_returnStatus varchar2(1);
524: l_msgCount number;

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

561: l_logLevel NUMBER := to_number(fnd_log.g_current_runtime_level);
562: l_bigErrMsg VARCHAR2(2000);
563: begin
564:
565: if (l_logLevel <= wip_constants.trace_logging) then
566: l_params(1).paramName := 'p_txnHeaderID';
567: l_params(1).paramValue := p_txnHeaderID;
568: wip_logger.entryPoint(p_procName => 'wip_mti_pub.preInvProcessFlow',
569: p_params => l_params,

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

575:
576: -- do derivation and validation only for flow records
577: wip_flowUtil_priv.processFlowInterfaceRecords(p_txnHeaderID);
578:
579: if (l_logLevel <= wip_constants.trace_logging) then
580: wip_logger.exitPoint(p_procName => 'wip_mti_pub.preInvProcessFlow',
581: p_procReturnStatus => x_returnStatus,
582: p_msg => 'Finished pre inventory flow processing!',
583: x_returnStatus => l_returnStatus); --discard logging return status

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

584: end if;
585: exception
586: when others then
587: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
588: if (l_logLevel <= wip_constants.trace_logging) then
589: wip_logger.exitPoint(p_procName => 'wip_mti_pub.preInvProcessFlow',
590: p_procReturnStatus => x_returnStatus,
591: p_msg => 'unexpected error: ' || SQLERRM,
592: x_returnStatus => l_returnStatus); --discard logging return status

Line 623: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,

619: from mtl_transactions_interface
620: where transaction_header_id = p_txnHeaderID
621: and process_flag = 1
622: and transaction_source_type_id = 5
623: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
624: WIP_CONSTANTS.RETASSY_ACTION,
625: WIP_CONSTANTS.ISSCOMP_ACTION,
626: WIP_CONSTANTS.RETCOMP_ACTION,
627: WIP_CONSTANTS.ISSNEGC_ACTION,

Line 624: WIP_CONSTANTS.RETASSY_ACTION,

620: where transaction_header_id = p_txnHeaderID
621: and process_flag = 1
622: and transaction_source_type_id = 5
623: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
624: WIP_CONSTANTS.RETASSY_ACTION,
625: WIP_CONSTANTS.ISSCOMP_ACTION,
626: WIP_CONSTANTS.RETCOMP_ACTION,
627: WIP_CONSTANTS.ISSNEGC_ACTION,
628: WIP_CONSTANTS.RETNEGC_ACTION);

Line 625: WIP_CONSTANTS.ISSCOMP_ACTION,

621: and process_flag = 1
622: and transaction_source_type_id = 5
623: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
624: WIP_CONSTANTS.RETASSY_ACTION,
625: WIP_CONSTANTS.ISSCOMP_ACTION,
626: WIP_CONSTANTS.RETCOMP_ACTION,
627: WIP_CONSTANTS.ISSNEGC_ACTION,
628: WIP_CONSTANTS.RETNEGC_ACTION);
629: l_locatorCntlCode number;

Line 626: WIP_CONSTANTS.RETCOMP_ACTION,

622: and transaction_source_type_id = 5
623: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
624: WIP_CONSTANTS.RETASSY_ACTION,
625: WIP_CONSTANTS.ISSCOMP_ACTION,
626: WIP_CONSTANTS.RETCOMP_ACTION,
627: WIP_CONSTANTS.ISSNEGC_ACTION,
628: WIP_CONSTANTS.RETNEGC_ACTION);
629: l_locatorCntlCode number;
630: l_projRefEnabled number;

Line 627: WIP_CONSTANTS.ISSNEGC_ACTION,

623: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
624: WIP_CONSTANTS.RETASSY_ACTION,
625: WIP_CONSTANTS.ISSCOMP_ACTION,
626: WIP_CONSTANTS.RETCOMP_ACTION,
627: WIP_CONSTANTS.ISSNEGC_ACTION,
628: WIP_CONSTANTS.RETNEGC_ACTION);
629: l_locatorCntlCode number;
630: l_projRefEnabled number;
631: l_projID number;

Line 628: WIP_CONSTANTS.RETNEGC_ACTION);

624: WIP_CONSTANTS.RETASSY_ACTION,
625: WIP_CONSTANTS.ISSCOMP_ACTION,
626: WIP_CONSTANTS.RETCOMP_ACTION,
627: WIP_CONSTANTS.ISSNEGC_ACTION,
628: WIP_CONSTANTS.RETNEGC_ACTION);
629: l_locatorCntlCode number;
630: l_projRefEnabled number;
631: l_projID number;
632: l_taskID number;

Line 674: if (pt_rec.transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,

670: from wip_discrete_jobs
671: where wip_entity_id = pt_rec.transaction_source_id;
672: end if; -- end of flow_schedule = 'Y'
673:
674: if (pt_rec.transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
675: WIP_CONSTANTS.RETASSY_ACTION)) then
676:
677: l_success := pjm_project_locator.check_project_references(
678: p_organization_id => pt_rec.organization_id,

Line 675: WIP_CONSTANTS.RETASSY_ACTION)) then

671: where wip_entity_id = pt_rec.transaction_source_id;
672: end if; -- end of flow_schedule = 'Y'
673:
674: if (pt_rec.transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
675: WIP_CONSTANTS.RETASSY_ACTION)) then
676:
677: l_success := pjm_project_locator.check_project_references(
678: p_organization_id => pt_rec.organization_id,
679: p_locator_id => pt_rec.locator_id,

Line 730: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,

726: where transaction_header_id = p_txnHeaderID
727: and process_flag = 1
728: and transaction_source_type_id = 5
729: and upper(nvl(flow_schedule, 'N')) = 'N'
730: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
731: WIP_CONSTANTS.CPLASSY_ACTION,
732: WIP_CONSTANTS.RETASSY_ACTION);
733:
734: l_primaryCostMethod number;

Line 731: WIP_CONSTANTS.CPLASSY_ACTION,

727: and process_flag = 1
728: and transaction_source_type_id = 5
729: and upper(nvl(flow_schedule, 'N')) = 'N'
730: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
731: WIP_CONSTANTS.CPLASSY_ACTION,
732: WIP_CONSTANTS.RETASSY_ACTION);
733:
734: l_primaryCostMethod number;
735: l_cstRetVal number;

Line 732: WIP_CONSTANTS.RETASSY_ACTION);

728: and transaction_source_type_id = 5
729: and upper(nvl(flow_schedule, 'N')) = 'N'
730: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
731: WIP_CONSTANTS.CPLASSY_ACTION,
732: WIP_CONSTANTS.RETASSY_ACTION);
733:
734: l_primaryCostMethod number;
735: l_cstRetVal number;
736:

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

745: l_engItemFlag number := 2;
746: l_logLevel NUMBER := to_number(fnd_log.g_current_runtime_level);
747: begin
748:
749: if (l_logLevel <= wip_constants.trace_logging) then
750: l_params(1).paramName := 'p_txnHeaderID';
751: l_params(1).paramValue := p_txnHeaderID;
752: wip_logger.entryPoint(p_procName => 'wip_mti_pub.postInvWIPValidation.',
753: p_params => l_params,

Line 897: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,

893: error_explanation = l_errMsg
894: where transaction_header_id = p_txnHeaderID
895: and process_flag = 1
896: and transaction_source_type_id = 5
897: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
898: WIP_CONSTANTS.CPLASSY_ACTION,
899: WIP_CONSTANTS.RETASSY_ACTION)
900: and ( (exists (select 'X'
901: from wip_discrete_jobs wdj

Line 898: WIP_CONSTANTS.CPLASSY_ACTION,

894: where transaction_header_id = p_txnHeaderID
895: and process_flag = 1
896: and transaction_source_type_id = 5
897: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
898: WIP_CONSTANTS.CPLASSY_ACTION,
899: WIP_CONSTANTS.RETASSY_ACTION)
900: and ( (exists (select 'X'
901: from wip_discrete_jobs wdj
902: where wdj.wip_entity_id = mti.transaction_source_id

Line 899: WIP_CONSTANTS.RETASSY_ACTION)

895: and process_flag = 1
896: and transaction_source_type_id = 5
897: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
898: WIP_CONSTANTS.CPLASSY_ACTION,
899: WIP_CONSTANTS.RETASSY_ACTION)
900: and ( (exists (select 'X'
901: from wip_discrete_jobs wdj
902: where wdj.wip_entity_id = mti.transaction_source_id
903: and wdj.organization_id = mti.organization_id

Line 960: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,

956: and wo.next_operation_seq_num is null)
957: where transaction_header_id = p_txnHeaderID
958: and transaction_source_type_id = 5
959: and process_flag = 1
960: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
961: WIP_CONSTANTS.RETASSY_ACTION);
962:
963: -- derive op seq num for wip component issue/return
964: update mtl_transactions_interface mti

Line 961: WIP_CONSTANTS.RETASSY_ACTION);

957: where transaction_header_id = p_txnHeaderID
958: and transaction_source_type_id = 5
959: and process_flag = 1
960: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
961: WIP_CONSTANTS.RETASSY_ACTION);
962:
963: -- derive op seq num for wip component issue/return
964: update mtl_transactions_interface mti
965: set last_update_date = sysdate,

Line 984: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,

980: where transaction_header_id = p_txnHeaderID
981: and transaction_source_type_id = 5
982: and process_flag = 1
983: and operation_seq_num is null
984: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
985: WIP_CONSTANTS.RETCOMP_ACTION);
986:
987:
988: -- validate operation seq num

Line 985: WIP_CONSTANTS.RETCOMP_ACTION);

981: and transaction_source_type_id = 5
982: and process_flag = 1
983: and operation_seq_num is null
984: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
985: WIP_CONSTANTS.RETCOMP_ACTION);
986:
987:
988: -- validate operation seq num
989: fnd_message.set_name('WIP', 'WIP_INVALID_OPERATION');

Line 1007: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,

1003: where transaction_header_id = p_txnHeaderID
1004: and process_flag = 1
1005: and transaction_source_type_id = 5
1006: and wip_entity_type in (1, 2, 5, 6)
1007: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1008: WIP_CONSTANTS.RETCOMP_ACTION,
1009: WIP_CONSTANTS.ISSNEGC_ACTION,
1010: WIP_CONSTANTS.RETNEGC_ACTION)
1011: and operation_seq_num is not null

Line 1008: WIP_CONSTANTS.RETCOMP_ACTION,

1004: and process_flag = 1
1005: and transaction_source_type_id = 5
1006: and wip_entity_type in (1, 2, 5, 6)
1007: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1008: WIP_CONSTANTS.RETCOMP_ACTION,
1009: WIP_CONSTANTS.ISSNEGC_ACTION,
1010: WIP_CONSTANTS.RETNEGC_ACTION)
1011: and operation_seq_num is not null
1012: and 0 =(select decode(count(wo.operation_seq_num),

Line 1009: WIP_CONSTANTS.ISSNEGC_ACTION,

1005: and transaction_source_type_id = 5
1006: and wip_entity_type in (1, 2, 5, 6)
1007: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1008: WIP_CONSTANTS.RETCOMP_ACTION,
1009: WIP_CONSTANTS.ISSNEGC_ACTION,
1010: WIP_CONSTANTS.RETNEGC_ACTION)
1011: and operation_seq_num is not null
1012: and 0 =(select decode(count(wo.operation_seq_num),
1013: 0,

Line 1010: WIP_CONSTANTS.RETNEGC_ACTION)

1006: and wip_entity_type in (1, 2, 5, 6)
1007: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1008: WIP_CONSTANTS.RETCOMP_ACTION,
1009: WIP_CONSTANTS.ISSNEGC_ACTION,
1010: WIP_CONSTANTS.RETNEGC_ACTION)
1011: and operation_seq_num is not null
1012: and 0 =(select decode(count(wo.operation_seq_num),
1013: 0,
1014: decode(mti.operation_seq_num, 1, 1, 0),

Line 1055: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,

1051: error_explanation = l_errMsg
1052: where transaction_header_id = p_txnHeaderID
1053: and process_flag = 1
1054: and transaction_source_type_id = 5
1055: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1056: WIP_CONSTANTS.RETCOMP_ACTION,
1057: WIP_CONSTANTS.ISSNEGC_ACTION,
1058: WIP_CONSTANTS.RETNEGC_ACTION)
1059: and not exists (select 'X'

Line 1056: WIP_CONSTANTS.RETCOMP_ACTION,

1052: where transaction_header_id = p_txnHeaderID
1053: and process_flag = 1
1054: and transaction_source_type_id = 5
1055: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1056: WIP_CONSTANTS.RETCOMP_ACTION,
1057: WIP_CONSTANTS.ISSNEGC_ACTION,
1058: WIP_CONSTANTS.RETNEGC_ACTION)
1059: and not exists (select 'X'
1060: from mtl_system_items msi

Line 1057: WIP_CONSTANTS.ISSNEGC_ACTION,

1053: and process_flag = 1
1054: and transaction_source_type_id = 5
1055: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1056: WIP_CONSTANTS.RETCOMP_ACTION,
1057: WIP_CONSTANTS.ISSNEGC_ACTION,
1058: WIP_CONSTANTS.RETNEGC_ACTION)
1059: and not exists (select 'X'
1060: from mtl_system_items msi
1061: where msi.organization_id = mti.organization_id

Line 1058: WIP_CONSTANTS.RETNEGC_ACTION)

1054: and transaction_source_type_id = 5
1055: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1056: WIP_CONSTANTS.RETCOMP_ACTION,
1057: WIP_CONSTANTS.ISSNEGC_ACTION,
1058: WIP_CONSTANTS.RETNEGC_ACTION)
1059: and not exists (select 'X'
1060: from mtl_system_items msi
1061: where msi.organization_id = mti.organization_id
1062: and msi.inventory_item_id = mti.inventory_item_id

Line 1109: and transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION

1105: error_explanation = l_errMsg
1106: where transaction_header_id = p_txnHeaderID
1107: and process_flag = 1
1108: and transaction_source_type_id = 5
1109: and transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1110: and upper(nvl(mti.flow_schedule, 'N')) = 'N'
1111: and operation_seq_num is not null
1112: and exists (select 'X'
1113: from wip_shop_floor_status_codes wsfsc,

Line 1146: and transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION

1142: where transaction_header_id = p_txnHeaderID
1143: and process_flag = 1
1144: and transaction_source_type_id = 5
1145: and upper(nvl(flow_schedule, 'N')) = 'N'
1146: and transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1147: and upper(nvl(final_completion_flag, 'E')) not in ('Y', 'N');
1148:
1149:
1150: -- derive item revision for completion txns for discrete jobs

Line 1166: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,

1162: and wdj.wip_entity_id = mti.transaction_source_id)
1163: where transaction_header_id = p_txnHeaderID
1164: and transaction_source_type_id = 5
1165: and process_flag = 1
1166: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
1167: WIP_CONSTANTS.RETASSY_ACTION)
1168: and wip_entity_type in (1,5)
1169: and exists(select 'X'
1170: from mtl_system_items msi

Line 1167: WIP_CONSTANTS.RETASSY_ACTION)

1163: where transaction_header_id = p_txnHeaderID
1164: and transaction_source_type_id = 5
1165: and process_flag = 1
1166: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
1167: WIP_CONSTANTS.RETASSY_ACTION)
1168: and wip_entity_type in (1,5)
1169: and exists(select 'X'
1170: from mtl_system_items msi
1171: where msi.organization_id = mti.organization_id

Line 1192: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,

1188: and wrs.repetitive_schedule_id = mti.schedule_id)
1189: where transaction_header_id = p_txnHeaderID
1190: and transaction_source_type_id = 5
1191: and process_flag = 1
1192: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
1193: WIP_CONSTANTS.RETASSY_ACTION)
1194: and wip_entity_type = 2
1195: and exists(select 'X'
1196: from mtl_system_items msi

Line 1193: WIP_CONSTANTS.RETASSY_ACTION)

1189: where transaction_header_id = p_txnHeaderID
1190: and transaction_source_type_id = 5
1191: and process_flag = 1
1192: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
1193: WIP_CONSTANTS.RETASSY_ACTION)
1194: and wip_entity_type = 2
1195: and exists(select 'X'
1196: from mtl_system_items msi
1197: where msi.organization_id = mti.organization_id

Line 1217: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,

1213: and wfs.wip_entity_id = mti.transaction_source_id)
1214: where transaction_header_id = p_txnHeaderID
1215: and transaction_source_type_id = 5
1216: and process_flag = 1
1217: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
1218: WIP_CONSTANTS.RETASSY_ACTION,
1219: WIP_CONSTANTS.SCRASSY_ACTION)
1220: and wip_entity_type = 4
1221: and exists(select 'X'

Line 1218: WIP_CONSTANTS.RETASSY_ACTION,

1214: where transaction_header_id = p_txnHeaderID
1215: and transaction_source_type_id = 5
1216: and process_flag = 1
1217: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
1218: WIP_CONSTANTS.RETASSY_ACTION,
1219: WIP_CONSTANTS.SCRASSY_ACTION)
1220: and wip_entity_type = 4
1221: and exists(select 'X'
1222: from mtl_system_items msi

Line 1219: WIP_CONSTANTS.SCRASSY_ACTION)

1215: and transaction_source_type_id = 5
1216: and process_flag = 1
1217: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
1218: WIP_CONSTANTS.RETASSY_ACTION,
1219: WIP_CONSTANTS.SCRASSY_ACTION)
1220: and wip_entity_type = 4
1221: and exists(select 'X'
1222: from mtl_system_items msi
1223: where msi.organization_id = mti.organization_id

Line 1245: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,

1241: and process_flag = 1
1242: -- Fixed bug 4405815. We should only update completion_transaction_id
1243: -- if it is null.
1244: and completion_transaction_id is null
1245: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1246: WIP_CONSTANTS.RETCOMP_ACTION,
1247: WIP_CONSTANTS.ISSNEGC_ACTION,
1248: WIP_CONSTANTS.RETNEGC_ACTION)
1249: and wip_entity_type = 4

Line 1246: WIP_CONSTANTS.RETCOMP_ACTION,

1242: -- Fixed bug 4405815. We should only update completion_transaction_id
1243: -- if it is null.
1244: and completion_transaction_id is null
1245: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1246: WIP_CONSTANTS.RETCOMP_ACTION,
1247: WIP_CONSTANTS.ISSNEGC_ACTION,
1248: WIP_CONSTANTS.RETNEGC_ACTION)
1249: and wip_entity_type = 4
1250: and flow_schedule = 'Y';

Line 1247: WIP_CONSTANTS.ISSNEGC_ACTION,

1243: -- if it is null.
1244: and completion_transaction_id is null
1245: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1246: WIP_CONSTANTS.RETCOMP_ACTION,
1247: WIP_CONSTANTS.ISSNEGC_ACTION,
1248: WIP_CONSTANTS.RETNEGC_ACTION)
1249: and wip_entity_type = 4
1250: and flow_schedule = 'Y';
1251:

Line 1248: WIP_CONSTANTS.RETNEGC_ACTION)

1244: and completion_transaction_id is null
1245: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1246: WIP_CONSTANTS.RETCOMP_ACTION,
1247: WIP_CONSTANTS.ISSNEGC_ACTION,
1248: WIP_CONSTANTS.RETNEGC_ACTION)
1249: and wip_entity_type = 4
1250: and flow_schedule = 'Y';
1251:
1252:

Line 1271: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,

1267: error_explanation = l_errMsg
1268: where transaction_header_id = p_txnHeaderID
1269: and process_flag = 1
1270: and transaction_source_type_id = 5
1271: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
1272: WIP_CONSTANTS.RETASSY_ACTION,
1273: WIP_CONSTANTS.SCRASSY_ACTION)
1274: and exists (select 'X'
1275: from mtl_system_items msi

Line 1272: WIP_CONSTANTS.RETASSY_ACTION,

1268: where transaction_header_id = p_txnHeaderID
1269: and process_flag = 1
1270: and transaction_source_type_id = 5
1271: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
1272: WIP_CONSTANTS.RETASSY_ACTION,
1273: WIP_CONSTANTS.SCRASSY_ACTION)
1274: and exists (select 'X'
1275: from mtl_system_items msi
1276: where msi.organization_id = mti.organization_id

Line 1273: WIP_CONSTANTS.SCRASSY_ACTION)

1269: and process_flag = 1
1270: and transaction_source_type_id = 5
1271: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
1272: WIP_CONSTANTS.RETASSY_ACTION,
1273: WIP_CONSTANTS.SCRASSY_ACTION)
1274: and exists (select 'X'
1275: from mtl_system_items msi
1276: where msi.organization_id = mti.organization_id
1277: and msi.inventory_item_id = mti.inventory_item_id

Line 1313: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,

1309: and mir2.effectivity_date <= sysdate))
1310: where transaction_header_id = p_txnHeaderID
1311: and transaction_source_type_id = 5
1312: and process_flag = 1
1313: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1314: WIP_CONSTANTS.RETCOMP_ACTION,
1315: WIP_CONSTANTS.ISSNEGC_ACTION,
1316: WIP_CONSTANTS.RETNEGC_ACTION)
1317: and revision is null

Line 1314: WIP_CONSTANTS.RETCOMP_ACTION,

1310: where transaction_header_id = p_txnHeaderID
1311: and transaction_source_type_id = 5
1312: and process_flag = 1
1313: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1314: WIP_CONSTANTS.RETCOMP_ACTION,
1315: WIP_CONSTANTS.ISSNEGC_ACTION,
1316: WIP_CONSTANTS.RETNEGC_ACTION)
1317: and revision is null
1318: and exists (select 'X'

Line 1315: WIP_CONSTANTS.ISSNEGC_ACTION,

1311: and transaction_source_type_id = 5
1312: and process_flag = 1
1313: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1314: WIP_CONSTANTS.RETCOMP_ACTION,
1315: WIP_CONSTANTS.ISSNEGC_ACTION,
1316: WIP_CONSTANTS.RETNEGC_ACTION)
1317: and revision is null
1318: and exists (select 'X'
1319: from mtl_system_items msi

Line 1316: WIP_CONSTANTS.RETNEGC_ACTION)

1312: and process_flag = 1
1313: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1314: WIP_CONSTANTS.RETCOMP_ACTION,
1315: WIP_CONSTANTS.ISSNEGC_ACTION,
1316: WIP_CONSTANTS.RETNEGC_ACTION)
1317: and revision is null
1318: and exists (select 'X'
1319: from mtl_system_items msi
1320: where msi.organization_id = mti.organization_id

Line 1348: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,

1344: error_explanation = l_errMsg
1345: where transaction_header_id = p_txnHeaderID
1346: and process_flag = 1
1347: and transaction_source_type_id = 5
1348: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1349: WIP_CONSTANTS.RETCOMP_ACTION,
1350: WIP_CONSTANTS.ISSNEGC_ACTION,
1351: WIP_CONSTANTS.RETNEGC_ACTION)
1352: and ( ( revision is not null

Line 1349: WIP_CONSTANTS.RETCOMP_ACTION,

1345: where transaction_header_id = p_txnHeaderID
1346: and process_flag = 1
1347: and transaction_source_type_id = 5
1348: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1349: WIP_CONSTANTS.RETCOMP_ACTION,
1350: WIP_CONSTANTS.ISSNEGC_ACTION,
1351: WIP_CONSTANTS.RETNEGC_ACTION)
1352: and ( ( revision is not null
1353: and ( ( exists(select 'item under rev ctl'

Line 1350: WIP_CONSTANTS.ISSNEGC_ACTION,

1346: and process_flag = 1
1347: and transaction_source_type_id = 5
1348: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1349: WIP_CONSTANTS.RETCOMP_ACTION,
1350: WIP_CONSTANTS.ISSNEGC_ACTION,
1351: WIP_CONSTANTS.RETNEGC_ACTION)
1352: and ( ( revision is not null
1353: and ( ( exists(select 'item under rev ctl'
1354: from mtl_system_items msi

Line 1351: WIP_CONSTANTS.RETNEGC_ACTION)

1347: and transaction_source_type_id = 5
1348: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1349: WIP_CONSTANTS.RETCOMP_ACTION,
1350: WIP_CONSTANTS.ISSNEGC_ACTION,
1351: WIP_CONSTANTS.RETNEGC_ACTION)
1352: and ( ( revision is not null
1353: and ( ( exists(select 'item under rev ctl'
1354: from mtl_system_items msi
1355: where msi.organization_id = mti.organization_id

Line 1425: and transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION

1421: error_explanation = l_errMsg
1422: where transaction_header_id = p_txnHeaderID
1423: and process_flag = 1
1424: and transaction_source_type_id = 5
1425: and transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1426: and wip_entity_type is not null
1427: and wip_entity_type <> 4
1428: and operation_seq_num is not null
1429: and (primary_quantity - nvl(overcompletion_primary_qty, 0)) >

Line 1469: and transaction_action_id = WIP_CONSTANTS.RETASSY_ACTION

1465: error_explanation = l_errMsg
1466: where transaction_header_id = p_txnHeaderID
1467: and process_flag = 1
1468: and transaction_source_type_id = 5
1469: and transaction_action_id = WIP_CONSTANTS.RETASSY_ACTION
1470: and ( wip_entity_type in (1,5)
1471: and (-1*primary_quantity > (select wdj.quantity_completed
1472: from wip_discrete_jobs wdj
1473: where wdj.organization_id = mti.organization_id

Line 1502: and transaction_action_id <> WIP_CONSTANTS.SCRASSY_ACTION

1498: error_explanation = l_errMsg
1499: where transaction_header_id = p_txnHeaderID
1500: and process_flag = 1
1501: and transaction_source_type_id = 5
1502: and transaction_action_id <> WIP_CONSTANTS.SCRASSY_ACTION
1503: and ( ( l_poExpToAssetTnsf = 2
1504: and not exists(select 'X'
1505: from mtl_secondary_inventories sub,
1506: mtl_system_items msi

Line 1587: and ( ( mti.transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION

1583: and inventory_item_id = mti.inventory_item_id
1584: and nvl(revision, '--1') = nvl(mti.revision, '--1')
1585: and demand_source_type_id = inv_reservation_global.g_source_type_oe
1586: and demand_source_header_id = mti.demand_source_header_id
1587: and ( ( mti.transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1588: and supply_source_header_id = mti.transaction_source_id
1589: and supply_source_type_id =
1590: inv_reservation_global.g_source_type_wip)
1591: or ( mti.transaction_action_id = WIP_CONSTANTS.RETASSY_ACTION

Line 1591: or ( mti.transaction_action_id = WIP_CONSTANTS.RETASSY_ACTION

1587: and ( ( mti.transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1588: and supply_source_header_id = mti.transaction_source_id
1589: and supply_source_type_id =
1590: inv_reservation_global.g_source_type_wip)
1591: or ( mti.transaction_action_id = WIP_CONSTANTS.RETASSY_ACTION
1592: and supply_source_type_id =
1593: inv_reservation_global.g_source_type_inv
1594: and subinventory_code = mti.subinventory_code
1595: and nvl(locator_id, -1) = nvl(mti.locator_id, -1) )));

Line 1627: and ( ( mti.transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION

1623: inv_reservation_global.g_source_type_oe
1624: and demand_source_header_id = mti.demand_source_header_id
1625: and nvl(demand_source_line_id, -1) =
1626: nvl(to_number(mti.demand_source_line), -1)
1627: and ( ( mti.transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1628: and supply_source_header_id = mti.transaction_source_id
1629: and supply_source_type_id =
1630: inv_reservation_global.g_source_type_wip)
1631: or ( mti.transaction_action_id = WIP_CONSTANTS.RETASSY_ACTION

Line 1631: or ( mti.transaction_action_id = WIP_CONSTANTS.RETASSY_ACTION

1627: and ( ( mti.transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1628: and supply_source_header_id = mti.transaction_source_id
1629: and supply_source_type_id =
1630: inv_reservation_global.g_source_type_wip)
1631: or ( mti.transaction_action_id = WIP_CONSTANTS.RETASSY_ACTION
1632: and supply_source_type_id =
1633: inv_reservation_global.g_source_type_inv
1634: and subinventory_code = mti.subinventory_code
1635: and nvl(locator_id, -1) = nvl(mti.locator_id, -1) )));

Line 1657: and transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION

1653: where transaction_header_id = p_txnHeaderID
1654: and process_flag = 1
1655: and transaction_source_type_id = 5
1656: and wip_entity_type in (1, 2, 5)
1657: and transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1658: and demand_source_header_id is not null
1659: and not exists (select 'X'
1660: from mtl_reservations
1661: where organization_id = mti.organization_id

Line 1694: and transaction_action_id = WIP_CONSTANTS.RETASSY_ACTION

1690: where transaction_header_id = p_txnHeaderID
1691: and process_flag = 1
1692: and transaction_source_type_id = 5
1693: and wip_entity_type in (1, 2, 5)
1694: and transaction_action_id = WIP_CONSTANTS.RETASSY_ACTION
1695: and demand_source_header_id is not null
1696: and not exists (select 'X'
1697: from mtl_reservations
1698: where organization_id = mti.organization_id

Line 1733: and ( ( transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION

1729: error_explanation = l_errMsg
1730: where transaction_header_id = p_txnHeaderID
1731: and process_flag = 1
1732: and transaction_source_type_id = 5
1733: and ( ( transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1734: and demand_source_header_id is not null
1735: and kanban_card_id is not null)
1736: or( transaction_action_id <> WIP_CONSTANTS.CPLASSY_ACTION
1737: and kanban_card_id is not null));

Line 1736: or( transaction_action_id <> WIP_CONSTANTS.CPLASSY_ACTION

1732: and transaction_source_type_id = 5
1733: and ( ( transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1734: and demand_source_header_id is not null
1735: and kanban_card_id is not null)
1736: or( transaction_action_id <> WIP_CONSTANTS.CPLASSY_ACTION
1737: and kanban_card_id is not null));
1738:
1739:
1740: -- validate the kanban card

Line 1760: and transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION

1756: error_explanation = l_errMsg
1757: where transaction_header_id = p_txnHeaderID
1758: and process_flag = 1
1759: and transaction_source_type_id = 5
1760: and transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1761: and kanban_card_id is not null
1762: and not exists (select 'X'
1763: from mtl_kanban_cards mkc
1764: where mkc.kanban_card_id = mti.kanban_card_id

Line 1791: and transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION

1787: error_explanation = l_errMsg
1788: where transaction_header_id = p_txnHeaderID
1789: and process_flag = 1
1790: and transaction_source_type_id = 5
1791: and transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1792: and kanban_card_id is not null
1793: and not exists (select 'X'
1794: from mtl_kanban_cards mkc
1795: where mkc.kanban_card_id = mti.kanban_card_id

Line 1826: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,

1822: error_explanation = l_errMsg
1823: where transaction_header_id = p_txnHeaderID
1824: and process_flag = 1
1825: and transaction_source_type_id = 5
1826: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1827: WIP_CONSTANTS.RETCOMP_ACTION)
1828: and wip_entity_type = 2
1829: and negative_req_flag is not null
1830: and negative_req_flag not in (1, -1);

Line 1827: WIP_CONSTANTS.RETCOMP_ACTION)

1823: where transaction_header_id = p_txnHeaderID
1824: and process_flag = 1
1825: and transaction_source_type_id = 5
1826: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1827: WIP_CONSTANTS.RETCOMP_ACTION)
1828: and wip_entity_type = 2
1829: and negative_req_flag is not null
1830: and negative_req_flag not in (1, -1);
1831:

Line 1832: if(l_logLevel <= wip_constants.full_logging) then

1828: and wip_entity_type = 2
1829: and negative_req_flag is not null
1830: and negative_req_flag not in (1, -1);
1831:
1832: if(l_logLevel <= wip_constants.full_logging) then
1833: wip_logger.log('about to call EAM validations', l_returnStatus);
1834: end if;
1835:
1836: -- for discrete job, we do not support background transactions for

Line 1864: and (we.entity_type = wip_constants.lotbased or

1860: wip_entities we
1861: where wdj.wip_entity_id = mti.transaction_source_id
1862: and wdj.organization_id = mti.organization_id
1863: and wdj.wip_entity_id = we.wip_entity_id
1864: and (we.entity_type = wip_constants.lotbased or
1865: wdj.serialization_start_op is null));
1866:
1867:
1868: --for assy completions and returns, project/task must match

Line 1883: and transaction_action_id in (wip_constants.cplassy_action,

1879: task_id = source_task_id
1880: where transaction_header_id = p_txnHeaderID
1881: and process_flag = 1
1882: and transaction_source_type_id = 5
1883: and transaction_action_id in (wip_constants.cplassy_action,
1884: wip_constants.retassy_action);
1885:
1886:
1887: --call eam specific validations. if it errors, just return error status

Line 1884: wip_constants.retassy_action);

1880: where transaction_header_id = p_txnHeaderID
1881: and process_flag = 1
1882: and transaction_source_type_id = 5
1883: and transaction_action_id in (wip_constants.cplassy_action,
1884: wip_constants.retassy_action);
1885:
1886:
1887: --call eam specific validations. if it errors, just return error status
1888: wip_eamMtlProc_priv.validateTxns(p_txnHdrID => p_txnHeaderID,

Line 1891: if(l_logLevel <= wip_constants.full_logging) then

1887: --call eam specific validations. if it errors, just return error status
1888: wip_eamMtlProc_priv.validateTxns(p_txnHdrID => p_txnHeaderID,
1889: x_returnStatus => x_returnStatus);
1890:
1891: if(l_logLevel <= wip_constants.full_logging) then
1892: wip_logger.log('EAM validation routine returned:' || x_returnStatus, l_returnStatus);
1893: end if;
1894:
1895: /* Fix for bug 5708242: Call to cstpacms.validate_move_snap_to_temp has been moved to

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

1933: end if;
1934: end if;
1935: end loop;*/
1936:
1937: if(l_logLevel <= wip_constants.trace_logging) then
1938: wip_logger.exitPoint(p_procName => 'wip_mti_pub.postInvWIPValidation',
1939: p_procReturnStatus => x_returnStatus,
1940: p_msg => 'Finished validating interface rows!',
1941: x_returnStatus => l_returnStatus); --discard logging return status

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

1942: end if;
1943: exception
1944: when others then
1945: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1946: if (l_logLevel <= wip_constants.trace_logging) then
1947: wip_logger.exitPoint(p_procName => 'wip_mti_pub.postInvWIPValidation',
1948: p_procReturnStatus => x_returnStatus,
1949: p_msg => 'unexpected error: ' || SQLERRM,
1950: x_returnStatus => l_returnStatus); --discard logging return status

Line 2023: and process_flag = wip_constants.mti_inventory

2019: */
2020: from mtl_transactions_interface
2021: where transaction_header_id = p_txnHeaderID
2022: and transaction_source_type_id = 5
2023: and process_flag = wip_constants.mti_inventory
2024: and ( inventory_item_id is null
2025: or ( locator_id is null
2026: and ( loc_segment1 is not null
2027: or loc_segment2 is not null

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

2046: )
2047: )
2048: );
2049: begin
2050: if (l_logLevel <= wip_constants.trace_logging) then
2051: l_params(1).paramName := 'p_txnHeaderID';
2052: l_params(1).paramValue := p_txnHeaderID;
2053: wip_logger.entryPoint(p_procName => 'wip_mti_pub.doPreProcessingValidations',
2054: p_params => l_params,

Line 2089: transaction_batch_seq = nvl(transaction_batch_seq, wip_constants.ASSY_BATCH_SEQ),

2085: --make sure overcompletions have a move id and overcpl id.
2086: update mtl_transactions_interface
2087: set completion_transaction_id = nvl(completion_transaction_id, mtl_material_transactions_s.nextval),
2088: transaction_batch_id = nvl(transaction_batch_id, nvl(completion_transaction_id, mtl_material_transactions_s.nextval)),
2089: transaction_batch_seq = nvl(transaction_batch_seq, wip_constants.ASSY_BATCH_SEQ),
2090: overcompletion_transaction_id = nvl(overcompletion_transaction_id, decode(overcompletion_transaction_qty,
2091: null, overcompletion_transaction_id,
2092: wip_transactions_s.nextval)),
2093: move_transaction_id = nvl(move_transaction_id, decode(overcompletion_transaction_qty,

Line 2097: and transaction_action_id in (wip_constants.cplassy_action, wip_constants.retassy_action)

2093: move_transaction_id = nvl(move_transaction_id, decode(overcompletion_transaction_qty,
2094: null, move_transaction_id,
2095: wip_transactions_s.nextval))
2096: where transaction_header_id = p_txnHeaderID
2097: and transaction_action_id in (wip_constants.cplassy_action, wip_constants.retassy_action)
2098: and transaction_source_type_id = 5;
2099:
2100: --make sure flow scrap transactions have a cpl id and batch id
2101: update mtl_transactions_interface

Line 2104: transaction_batch_seq = nvl(transaction_batch_seq, wip_constants.ASSY_BATCH_SEQ)

2100: --make sure flow scrap transactions have a cpl id and batch id
2101: update mtl_transactions_interface
2102: set completion_transaction_id = nvl(completion_transaction_id, mtl_material_transactions_s.nextval),
2103: transaction_batch_id = nvl(transaction_batch_id, nvl(completion_transaction_id, mtl_material_transactions_s.nextval)),
2104: transaction_batch_seq = nvl(transaction_batch_seq, wip_constants.ASSY_BATCH_SEQ)
2105: where transaction_header_id = p_txnHeaderID
2106: and transaction_action_id = wip_constants.scrassy_action
2107: and upper(nvl(flow_schedule, 'N')) = 'Y'
2108: and transaction_source_type_id = 5;

Line 2106: and transaction_action_id = wip_constants.scrassy_action

2102: set completion_transaction_id = nvl(completion_transaction_id, mtl_material_transactions_s.nextval),
2103: transaction_batch_id = nvl(transaction_batch_id, nvl(completion_transaction_id, mtl_material_transactions_s.nextval)),
2104: transaction_batch_seq = nvl(transaction_batch_seq, wip_constants.ASSY_BATCH_SEQ)
2105: where transaction_header_id = p_txnHeaderID
2106: and transaction_action_id = wip_constants.scrassy_action
2107: and upper(nvl(flow_schedule, 'N')) = 'Y'
2108: and transaction_source_type_id = 5;
2109:
2110:

Line 2156: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,

2152: where transaction_header_id = p_txnHeaderID
2153: and process_flag = 1
2154: and transaction_source_type_id = 5
2155: and upper(nvl(flow_schedule, 'N')) = 'Y'
2156: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
2157: WIP_CONSTANTS.CPLASSY_ACTION,
2158: WIP_CONSTANTS.RETASSY_ACTION)
2159: and nvl(scheduled_flag, -1) not in (1, 2);
2160:

Line 2157: WIP_CONSTANTS.CPLASSY_ACTION,

2153: and process_flag = 1
2154: and transaction_source_type_id = 5
2155: and upper(nvl(flow_schedule, 'N')) = 'Y'
2156: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
2157: WIP_CONSTANTS.CPLASSY_ACTION,
2158: WIP_CONSTANTS.RETASSY_ACTION)
2159: and nvl(scheduled_flag, -1) not in (1, 2);
2160:
2161:

Line 2158: WIP_CONSTANTS.RETASSY_ACTION)

2154: and transaction_source_type_id = 5
2155: and upper(nvl(flow_schedule, 'N')) = 'Y'
2156: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
2157: WIP_CONSTANTS.CPLASSY_ACTION,
2158: WIP_CONSTANTS.RETASSY_ACTION)
2159: and nvl(scheduled_flag, -1) not in (1, 2);
2160:
2161:
2162: -- validate transaction source name if provided, we won't do

Line 2230: and transaction_action_id = WIP_CONSTANTS.SCRASSY_ACTION

2226: error_explanation = l_errMsg
2227: where transaction_header_id = p_txnHeaderID
2228: and process_flag = 1
2229: and transaction_source_type_id = 5
2230: and transaction_action_id = WIP_CONSTANTS.SCRASSY_ACTION
2231: and upper(nvl(flow_schedule, 'N')) <> 'Y';
2232:
2233:
2234: -- validate transaction source id

Line 2351: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,

2347: and we.wip_entity_id = mti.transaction_source_id)
2348: where transaction_header_id = p_txnHeaderID
2349: and transaction_source_type_id = 5
2350: and process_flag = 1
2351: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
2352: WIP_CONSTANTS.CPLASSY_ACTION,
2353: WIP_CONSTANTS.RETASSY_ACTION)
2354: and transaction_source_id is not null;
2355:

Line 2352: WIP_CONSTANTS.CPLASSY_ACTION,

2348: where transaction_header_id = p_txnHeaderID
2349: and transaction_source_type_id = 5
2350: and process_flag = 1
2351: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
2352: WIP_CONSTANTS.CPLASSY_ACTION,
2353: WIP_CONSTANTS.RETASSY_ACTION)
2354: and transaction_source_id is not null;
2355:
2356:

Line 2353: WIP_CONSTANTS.RETASSY_ACTION)

2349: and transaction_source_type_id = 5
2350: and process_flag = 1
2351: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
2352: WIP_CONSTANTS.CPLASSY_ACTION,
2353: WIP_CONSTANTS.RETASSY_ACTION)
2354: and transaction_source_id is not null;
2355:
2356:
2357: if(l_logLevel <= wip_constants.full_logging) then

Line 2357: if(l_logLevel <= wip_constants.full_logging) then

2353: WIP_CONSTANTS.RETASSY_ACTION)
2354: and transaction_source_id is not null;
2355:
2356:
2357: if(l_logLevel <= wip_constants.full_logging) then
2358: wip_logger.log('about to fetch records for name -> item derivation', l_returnStatus);
2359: end if;
2360: --item id from name
2361: open c_itemTxns;

Line 2379: if(l_logLevel <= wip_constants.full_logging) then

2375: end if;
2376:
2377: for i in 1..l_orgIDTbl.count loop
2378: if(l_itemIDTbl(i) is null) then
2379: if(l_logLevel <= wip_constants.full_logging) then
2380: wip_logger.log('about to derive item id from name', l_returnStatus);
2381: end if;
2382: if(not inv_txn_manager_grp.getitemid(x_itemID => l_itemIDTbl(i),
2383: p_orgID => l_orgIDTbl(i),

Line 2386: if(l_logLevel <= wip_constants.full_logging) then

2382: if(not inv_txn_manager_grp.getitemid(x_itemID => l_itemIDTbl(i),
2383: p_orgID => l_orgIDTbl(i),
2384: p_rowid => l_rowidTbl(i))) then
2385: l_itemIDTbl(i) := null;--let inventory error out later
2386: if(l_logLevel <= wip_constants.full_logging) then
2387: wip_logger.log('item id from name derivation failed', l_returnStatus);
2388: end if;
2389: elsif(l_logLevel <= wip_constants.full_logging) then
2390: wip_logger.log('item id' || l_itemIDTbl(i), l_returnStatus);

Line 2389: elsif(l_logLevel <= wip_constants.full_logging) then

2385: l_itemIDTbl(i) := null;--let inventory error out later
2386: if(l_logLevel <= wip_constants.full_logging) then
2387: wip_logger.log('item id from name derivation failed', l_returnStatus);
2388: end if;
2389: elsif(l_logLevel <= wip_constants.full_logging) then
2390: wip_logger.log('item id' || l_itemIDTbl(i), l_returnStatus);
2391: end if;
2392: end if;
2393:

Line 2412: if(l_logLevel <= wip_constants.full_logging) then

2408: and it.organization_id = sub.organization_id
2409: and mp.organization_id = sub.organization_id
2410: and mp.organization_id = it.organization_id;
2411:
2412: if(l_logLevel <= wip_constants.full_logging) then
2413: wip_logger.log('about to derive locator id from name', l_returnStatus);
2414: end if;
2415: if(not inv_txn_manager_grp.getlocid(x_locID => l_locIDTbl(i),
2416: p_org_id => l_orgIDTbl(i),

Line 2421: if(l_logLevel <= wip_constants.full_logging) then

2417: p_subinv => l_subCodeTbl(i),
2418: p_rowid => l_rowidTbl(i),
2419: p_locCtrl => l_locCtrl)) then
2420: l_locIDTbl(i) := null; --let inventory error out later
2421: if(l_logLevel <= wip_constants.full_logging) then
2422: wip_logger.log('locator id from name derivation failed', l_returnStatus);
2423: end if;
2424: end if;
2425: end if;

Line 2462: and process_flag = wip_constants.mti_inventory;

2458: where transaction_header_id = p_txnHeaderID
2459: and transaction_source_type_id = 5
2460: and locator_id is not null
2461: and project_id is null
2462: and process_flag = wip_constants.mti_inventory;
2463: */
2464:
2465: -- validate inventory item id
2466: fnd_message.set_name('INV', 'INV_INT_ITMCODE');

Line 2528: and wip_entity_type in (wip_constants.discrete,

2524: and organization_id = mti.organization_id)
2525: where transaction_header_id = p_txnHeaderID
2526: and process_flag = 1
2527: and transaction_source_type_id = 5
2528: and wip_entity_type in (wip_constants.discrete,
2529: wip_constants.lotbased,
2530: wip_constants.eam);
2531:
2532: --derive the source project id/task id for flow schedules

Line 2529: wip_constants.lotbased,

2525: where transaction_header_id = p_txnHeaderID
2526: and process_flag = 1
2527: and transaction_source_type_id = 5
2528: and wip_entity_type in (wip_constants.discrete,
2529: wip_constants.lotbased,
2530: wip_constants.eam);
2531:
2532: --derive the source project id/task id for flow schedules
2533: update mtl_transactions_interface mti

Line 2530: wip_constants.eam);

2526: and process_flag = 1
2527: and transaction_source_type_id = 5
2528: and wip_entity_type in (wip_constants.discrete,
2529: wip_constants.lotbased,
2530: wip_constants.eam);
2531:
2532: --derive the source project id/task id for flow schedules
2533: update mtl_transactions_interface mti
2534: set last_update_date = sysdate,

Line 2551: and wip_entity_type = wip_constants.flow;

2547: where transaction_header_id = p_txnHeaderID
2548: and process_flag = 1
2549: and transaction_source_type_id = 5
2550: and transaction_source_id is not null
2551: and wip_entity_type = wip_constants.flow;
2552:
2553:
2554:
2555: -- make sure that flow_schedule flag is 'N' or NULL for job/repetitive and

Line 2599: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,

2595: and process_flag = 1
2596: and transaction_source_type_id = 5
2597: and wip_entity_type = 4
2598: and transaction_source_id is not null
2599: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
2600: WIP_CONSTANTS.CPLASSY_ACTION)
2601: and exists (select 1
2602: from wip_flow_schedules wfs
2603: where wfs.organization_id = mti.organization_id

Line 2600: WIP_CONSTANTS.CPLASSY_ACTION)

2596: and transaction_source_type_id = 5
2597: and wip_entity_type = 4
2598: and transaction_source_id is not null
2599: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
2600: WIP_CONSTANTS.CPLASSY_ACTION)
2601: and exists (select 1
2602: from wip_flow_schedules wfs
2603: where wfs.organization_id = mti.organization_id
2604: and wfs.wip_entity_id = mti.transaction_source_id

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

2603: where wfs.organization_id = mti.organization_id
2604: and wfs.wip_entity_id = mti.transaction_source_id
2605: and wfs.status = 2);
2606:
2607: if (l_logLevel <= wip_constants.trace_logging) then
2608: wip_logger.exitPoint(p_procName => 'wip_mti_pub.doPreProcessingValidations',
2609: p_procReturnStatus => x_returnStatus,
2610: p_msg => 'normal completion',
2611: x_returnStatus => l_returnStatus);

Line 2631: and process_flag = wip_constants.mti_inventory;

2627: error_code = 'wip_mti_pub.doPreProcessingValidations',
2628: error_explanation = l_errMsg
2629: where transaction_header_id = p_txnHeaderID
2630: and transaction_source_type_id = 5
2631: and process_flag = wip_constants.mti_inventory;
2632:
2633: if(l_logLevel <= wip_constants.trace_logging) then
2634: wip_logger.exitPoint(p_procName => 'wip_mti_pub.doPreProcessingValidations',
2635: p_procReturnStatus => x_returnStatus,

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

2629: where transaction_header_id = p_txnHeaderID
2630: and transaction_source_type_id = 5
2631: and process_flag = wip_constants.mti_inventory;
2632:
2633: if(l_logLevel <= wip_constants.trace_logging) then
2634: wip_logger.exitPoint(p_procName => 'wip_mti_pub.doPreProcessingValidations',
2635: p_procReturnStatus => x_returnStatus,
2636: p_msg => 'unexpected error: ' || SQLERRM,
2637: x_returnStatus => l_returnStatus); --discard logging return status

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

2653: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
2654: begin
2655: x_returnStatus := fnd_api.g_ret_sts_success;
2656:
2657: if(l_logLevel <= wip_constants.trace_logging) then
2658: l_params(1).paramName := 'p_txnHeaderID';
2659: l_params(1).paramValue := p_txnHeaderID;
2660: l_params(2).paramName := 'p_txnBatchID';
2661: l_params(2).paramValue := p_txnBatchID;

Line 2672: and process_flag = wip_constants.mti_error);

2668: where transaction_temp_id in (select transaction_interface_id
2669: from mtl_transactions_interface
2670: where transaction_header_id = p_txnHeaderID
2671: and transaction_batch_id = p_txnBatchID
2672: and process_flag = wip_constants.mti_error);
2673:
2674: if(l_logLevel <= wip_constants.full_logging) then
2675: wip_logger.log('deleted ' || SQL%ROWCOUNT || ' pre-allocations', l_retStatus);
2676: end if;

Line 2674: if(l_logLevel <= wip_constants.full_logging) then

2670: where transaction_header_id = p_txnHeaderID
2671: and transaction_batch_id = p_txnBatchID
2672: and process_flag = wip_constants.mti_error);
2673:
2674: if(l_logLevel <= wip_constants.full_logging) then
2675: wip_logger.log('deleted ' || SQL%ROWCOUNT || ' pre-allocations', l_retStatus);
2676: end if;
2677:
2678: --fetch all errored components

Line 2695: and mti.transaction_action_id in (wip_constants.isscomp_action, wip_constants.retcomp_action,

2691: from mtl_transactions_interface mti,
2692: mtl_system_items_kfv msik
2693: where mti.transaction_header_id = p_txnHeaderID
2694: and mti.transaction_batch_id = p_txnBatchID
2695: and mti.transaction_action_id in (wip_constants.isscomp_action, wip_constants.retcomp_action,
2696: wip_constants.issnegc_action, wip_constants.retnegc_action)
2697: and upper(nvl(mti.flow_schedule,'N')) <> 'Y'
2698: and ( mti.completion_transaction_id is not null
2699: or mti.move_transaction_id is not null)

Line 2696: wip_constants.issnegc_action, wip_constants.retnegc_action)

2692: mtl_system_items_kfv msik
2693: where mti.transaction_header_id = p_txnHeaderID
2694: and mti.transaction_batch_id = p_txnBatchID
2695: and mti.transaction_action_id in (wip_constants.isscomp_action, wip_constants.retcomp_action,
2696: wip_constants.issnegc_action, wip_constants.retnegc_action)
2697: and upper(nvl(mti.flow_schedule,'N')) <> 'Y'
2698: and ( mti.completion_transaction_id is not null
2699: or mti.move_transaction_id is not null)
2700: and mti.process_flag = wip_constants.mti_error

Line 2700: and mti.process_flag = wip_constants.mti_error

2696: wip_constants.issnegc_action, wip_constants.retnegc_action)
2697: and upper(nvl(mti.flow_schedule,'N')) <> 'Y'
2698: and ( mti.completion_transaction_id is not null
2699: or mti.move_transaction_id is not null)
2700: and mti.process_flag = wip_constants.mti_error
2701: and mti.error_explanation is not null --records that caused errors have err expl
2702: and mti.inventory_item_id = msik.inventory_item_id
2703: and mti.organization_id = msik.organization_id;
2704:

Line 2709: and transaction_action_id in (wip_constants.isscomp_action, wip_constants.retcomp_action,

2705: --delete all errored backflush components
2706: delete mtl_transactions_interface
2707: where transaction_header_id = p_txnHeaderID
2708: and transaction_batch_id = p_txnBatchID
2709: and transaction_action_id in (wip_constants.isscomp_action, wip_constants.retcomp_action,
2710: wip_constants.issnegc_action, wip_constants.retnegc_action)
2711: and upper(nvl(flow_schedule,'N')) <> 'Y'
2712: and ( completion_transaction_id is not null
2713: or move_transaction_id is not null)

Line 2710: wip_constants.issnegc_action, wip_constants.retnegc_action)

2706: delete mtl_transactions_interface
2707: where transaction_header_id = p_txnHeaderID
2708: and transaction_batch_id = p_txnBatchID
2709: and transaction_action_id in (wip_constants.isscomp_action, wip_constants.retcomp_action,
2710: wip_constants.issnegc_action, wip_constants.retnegc_action)
2711: and upper(nvl(flow_schedule,'N')) <> 'Y'
2712: and ( completion_transaction_id is not null
2713: or move_transaction_id is not null)
2714: and process_flag = wip_constants.mti_error;

Line 2714: and process_flag = wip_constants.mti_error;

2710: wip_constants.issnegc_action, wip_constants.retnegc_action)
2711: and upper(nvl(flow_schedule,'N')) <> 'Y'
2712: and ( completion_transaction_id is not null
2713: or move_transaction_id is not null)
2714: and process_flag = wip_constants.mti_error;
2715:
2716: if(l_logLevel <= wip_constants.full_logging) then
2717: wip_logger.log('deleted ' || SQL%ROWCOUNT || ' backflush components', l_retStatus);
2718: end if;

Line 2716: if(l_logLevel <= wip_constants.full_logging) then

2712: and ( completion_transaction_id is not null
2713: or move_transaction_id is not null)
2714: and process_flag = wip_constants.mti_error;
2715:
2716: if(l_logLevel <= wip_constants.full_logging) then
2717: wip_logger.log('deleted ' || SQL%ROWCOUNT || ' backflush components', l_retStatus);
2718: end if;
2719:
2720: --if any components failed update the parent with the error

Line 2737: and transaction_action_id in (wip_constants.cplassy_action, wip_constants.retassy_action);

2733: and transaction_batch_id = p_txnBatchID
2734: and transaction_source_type_id = 5
2735: and ( completion_transaction_id = l_cplTxnIDTbl(i)
2736: or move_transaction_id = l_movTxnIDTbl(i))
2737: and transaction_action_id in (wip_constants.cplassy_action, wip_constants.retassy_action);
2738:
2739: if (l_logLevel <= wip_constants.trace_logging) then
2740: wip_logger.exitPoint(p_procName => 'wip_mti_pub.postInvWIPProcessing',
2741: p_procReturnStatus => x_returnStatus,

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

2735: and ( completion_transaction_id = l_cplTxnIDTbl(i)
2736: or move_transaction_id = l_movTxnIDTbl(i))
2737: and transaction_action_id in (wip_constants.cplassy_action, wip_constants.retassy_action);
2738:
2739: if (l_logLevel <= wip_constants.trace_logging) then
2740: wip_logger.exitPoint(p_procName => 'wip_mti_pub.postInvWIPProcessing',
2741: p_procReturnStatus => x_returnStatus,
2742: p_msg => 'success',
2743: x_returnStatus => l_retStatus); --discard logging return status

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

2746:
2747: exception
2748: when others then
2749: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2750: if(l_logLevel <= wip_constants.trace_logging) then
2751: wip_logger.exitPoint(p_procName => 'wip_mti_pub.postInvWIPProcessing',
2752: p_procReturnStatus => x_returnStatus,
2753: p_msg => 'unexpected error: ' || SQLERRM,
2754: x_returnStatus => l_retStatus); --discard logging return status