DBA Data[Home] [Help]

APPS.WIP_MTI_PUB dependencies on WIP_CONSTANTS

Line 86: 'Y', wip_constants.flow,

82: mti.overcompletion_transaction_qty,
83: mti.overcompletion_primary_qty,
84: mti.move_transaction_id,
85: decode(upper(mti.flow_schedule),
86: 'Y', wip_constants.flow,
87: we.entity_type),
88: mti.transaction_uom,
89: msi.primary_uom_code,
90: mti.locator_id,

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

96: wip_entities we,
97: mtl_system_items msi
98: where mti.transaction_header_id = p_txnHeaderID
99: and mti.transaction_source_type_id = 5
100: and mti.transaction_action_id in (wip_constants.cplassy_action,
101: wip_constants.retassy_action,
102: wip_constants.scrassy_action)
103: and mti.transaction_source_id = we.wip_entity_id (+)
104: and mti.organization_id = we.organization_id (+)

Line 101: wip_constants.retassy_action,

97: mtl_system_items msi
98: where mti.transaction_header_id = p_txnHeaderID
99: and mti.transaction_source_type_id = 5
100: and mti.transaction_action_id in (wip_constants.cplassy_action,
101: wip_constants.retassy_action,
102: wip_constants.scrassy_action)
103: and mti.transaction_source_id = we.wip_entity_id (+)
104: and mti.organization_id = we.organization_id (+)
105: and mti.inventory_item_id = msi.inventory_item_id

Line 102: wip_constants.scrassy_action)

98: where mti.transaction_header_id = p_txnHeaderID
99: and mti.transaction_source_type_id = 5
100: and mti.transaction_action_id in (wip_constants.cplassy_action,
101: wip_constants.retassy_action,
102: wip_constants.scrassy_action)
103: and mti.transaction_source_id = we.wip_entity_id (+)
104: and mti.organization_id = we.organization_id (+)
105: and mti.inventory_item_id = msi.inventory_item_id
106: and mti.organization_id = msi.organization_id;

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

115: l_convPriQty NUMBER;
116: l_convOverCplPriQty NUMBER;
117: l_convErrExists boolean;
118: begin
119: if (l_logLevel <= wip_constants.trace_logging) then
120: l_params(1).paramName := 'p_txnHeaderID';
121: l_params(1).paramValue := p_txnHeaderID;
122: wip_logger.entryPoint(p_procName => 'wip_mti_pub.preInvWipProcessing',
123: p_params => l_params,

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

201: end if;
202: /* End of fix for Bug 5411401 */
203:
204: if(l_convErrExists) then
205: if(l_logLevel <= wip_constants.full_logging) then
206: wip_logger.log('uom conversion failed.', l_returnStatus);
207: wip_logger.log('l_convPriQty' || l_convPriQty, l_returnStatus);
208: wip_logger.log('l_convOverCplPriQty' || l_convOverCplPriQty, l_returnStatus);
209: end if;

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

239: request_id = fnd_global.conc_request_id,
240: primary_quantity = l_tbls.priQty(i),
241: overcompletion_primary_qty = l_tbls.overCplPriQty(i)
242: where transaction_interface_id = l_tbls.txnIntID(i);
243: if(l_logLevel <= wip_constants.full_logging) then
244: wip_logger.log('pri qty:' || l_tbls.priQty(i), l_returnStatus);
245: wip_logger.log('ovcpl pri qty:' || l_tbls.overCplPriQty(i), l_returnStatus);
246: end if;
247: end if;

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

245: wip_logger.log('ovcpl pri qty:' || l_tbls.overCplPriQty(i), l_returnStatus);
246: end if;
247: end if;
248:
249: if(l_tbls.wipEntityType(i) <> wip_constants.flow and not l_convErrExists) then
250: if(l_logLevel <= wip_constants.full_logging) then
251: wip_logger.log('calling work order row-by-row processor', l_returnStatus);
252: end if;
253: preInvProcessWorkOrder(p_txnHeaderID => p_txnHeaderID,

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

246: end if;
247: end if;
248:
249: if(l_tbls.wipEntityType(i) <> wip_constants.flow and not l_convErrExists) then
250: if(l_logLevel <= wip_constants.full_logging) then
251: wip_logger.log('calling work order row-by-row processor', l_returnStatus);
252: end if;
253: preInvProcessWorkOrder(p_txnHeaderID => p_txnHeaderID,
254: p_tbls => l_tbls,

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

258: end if;
259: end loop;
260:
261: if ( l_errTbls.txnIntID is not null ) then
262: if(l_logLevel <= wip_constants.full_logging) then
263: wip_logger.log(l_errTbls.txnIntID.count || ' records failed work order pre-processing', l_returnStatus);
264: for i in 1..l_errTbls.txnIntID.count loop
265: wip_logger.log('txnIntID: ' || l_errTbls.txnIntID(i), l_returnStatus);
266: wip_logger.log(' errCode: ' || l_errTbls.errCode(i), l_returnStatus);

Line 280: process_flag = wip_constants.mti_error,

276: program_application_id = fnd_global.prog_appl_id,
277: program_id = fnd_global.conc_program_id,
278: program_update_date = sysdate,
279: request_id = fnd_global.conc_request_id,
280: process_flag = wip_constants.mti_error,
281: error_code = l_errTbls.errCode(i),
282: error_explanation = l_errTbls.errExpl(i),
283: lock_flag = 2 --unlock the record so it can be re-submitted
284: where transaction_interface_id = l_errTbls.txnIntID(i);

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

283: lock_flag = 2 --unlock the record so it can be re-submitted
284: where transaction_interface_id = l_errTbls.txnIntID(i);
285: end if;
286:
287: if(l_logLevel <= wip_constants.full_logging) then
288: wip_logger.log('calling flow group processor', l_returnStatus);
289: end if;
290:
291: preInvProcessFlow(p_txnHeaderID => p_txnHeaderID,

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

291: preInvProcessFlow(p_txnHeaderID => p_txnHeaderID,
292: x_returnStatus => l_returnStatus);
293:
294:
295: if (l_logLevel <= wip_constants.trace_logging) then
296: wip_logger.exitPoint(p_procName => 'wip_mti_pub.preInvWIPProcessing',
297: p_procReturnStatus => x_returnStatus,
298: p_msg => 'success',
299: x_returnStatus => l_returnStatus);

Line 322: and process_flag = wip_constants.mti_inventory;

318: error_code = 'wip_mti_pub.preInvWIPProcessing',
319: error_explanation = l_errExp
320: where transaction_header_id = p_txnHeaderID
321: and transaction_source_type_id = 5
322: and process_flag = wip_constants.mti_inventory;
323:
324: if(l_logLevel <= wip_constants.trace_logging) then
325: wip_logger.exitPoint(p_procName => 'wip_mti_pub.preInvWIPProcessing',
326: p_procReturnStatus => x_returnStatus,

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

320: where transaction_header_id = p_txnHeaderID
321: and transaction_source_type_id = 5
322: and process_flag = wip_constants.mti_inventory;
323:
324: if(l_logLevel <= wip_constants.trace_logging) then
325: wip_logger.exitPoint(p_procName => 'wip_mti_pub.preInvWIPProcessing',
326: p_procReturnStatus => x_returnStatus,
327: p_msg => 'unexpected error: ' || SQLERRM,
328: x_returnStatus => l_returnStatus); --discard logging return status

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

346: l_returnStatus VARCHAR2(1);
347: begin
348: savepoint wipmtivb10;
349:
350: if(l_logLevel <= wip_constants.trace_logging) then
351: l_params(1).paramName := 'p_txnHeaderID';
352: l_params(1).paramValue := p_txnHeaderID;
353: l_params(2).paramName := 'p_index';
354: l_params(2).paramValue := p_index;

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

362: end if;
363:
364: x_returnStatus := fnd_api.g_ret_sts_success;
365:
366: if(p_tbls.txnActionID(p_index) = wip_constants.cplassy_action) then
367: l_txnType := wip_constants.comp_txn;
368: elsif(p_tbls.txnActionID(p_index) = wip_constants.retassy_action) then
369: l_txnType := wip_constants.ret_txn;
370: else --scrap. don't do anything

Line 367: l_txnType := wip_constants.comp_txn;

363:
364: x_returnStatus := fnd_api.g_ret_sts_success;
365:
366: if(p_tbls.txnActionID(p_index) = wip_constants.cplassy_action) then
367: l_txnType := wip_constants.comp_txn;
368: elsif(p_tbls.txnActionID(p_index) = wip_constants.retassy_action) then
369: l_txnType := wip_constants.ret_txn;
370: else --scrap. don't do anything
371: if (l_logLevel <= wip_constants.trace_logging) then

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

364: x_returnStatus := fnd_api.g_ret_sts_success;
365:
366: if(p_tbls.txnActionID(p_index) = wip_constants.cplassy_action) then
367: l_txnType := wip_constants.comp_txn;
368: elsif(p_tbls.txnActionID(p_index) = wip_constants.retassy_action) then
369: l_txnType := wip_constants.ret_txn;
370: else --scrap. don't do anything
371: if (l_logLevel <= wip_constants.trace_logging) then
372: wip_logger.exitPoint(p_procName => 'wip_mti_pub.preInvWIPProcessing',

Line 369: l_txnType := wip_constants.ret_txn;

365:
366: if(p_tbls.txnActionID(p_index) = wip_constants.cplassy_action) then
367: l_txnType := wip_constants.comp_txn;
368: elsif(p_tbls.txnActionID(p_index) = wip_constants.retassy_action) then
369: l_txnType := wip_constants.ret_txn;
370: else --scrap. don't do anything
371: if (l_logLevel <= wip_constants.trace_logging) then
372: wip_logger.exitPoint(p_procName => 'wip_mti_pub.preInvWIPProcessing',
373: p_procReturnStatus => x_returnStatus,

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

367: l_txnType := wip_constants.comp_txn;
368: elsif(p_tbls.txnActionID(p_index) = wip_constants.retassy_action) then
369: l_txnType := wip_constants.ret_txn;
370: else --scrap. don't do anything
371: if (l_logLevel <= wip_constants.trace_logging) then
372: wip_logger.exitPoint(p_procName => 'wip_mti_pub.preInvWIPProcessing',
373: p_procReturnStatus => x_returnStatus,
374: p_msg => 'success (scrap txn)',
375: x_returnStatus => l_returnStatus);

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

378: end if;
379:
380: --if repetitive cpl, check allocation table to see if schedule has already been pre-processed
381: if(p_tbls.repLineID(p_index) is not null) then
382: if (l_logLevel <= wip_constants.full_logging) then
383: wip_logger.log('doing repetitive processing', l_returnStatus);
384: end if;
385: select count(*)
386: into l_count

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

387: from wip_mtl_allocations_temp
388: where transaction_temp_id = p_tbls.txnIntID(p_index);
389:
390: if(l_count = 0) then
391: if (l_logLevel <= wip_constants.full_logging) then
392: wip_logger.log('found unallocated schedule', l_returnStatus);
393: end if;
394: wip_cplProc_priv.preAllocateSchedules(p_txnHdrID => p_txnHeaderID,
395: p_cplTxnID => p_tbls.cplTxnID(p_index),

Line 399: p_tblName => wip_constants.MTI_TBL,

395: p_cplTxnID => p_tbls.cplTxnID(p_index),
396: p_txnActionID => p_tbls.txnActionID(p_index),
397: p_wipEntityID => p_tbls.wipEntityID(p_index),
398: p_repLineID => p_tbls.repLineID(p_index),
399: p_tblName => wip_constants.MTI_TBL,
400: p_endDebug => fnd_api.g_false,
401: x_returnStatus => x_returnStatus);
402: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
403: raise fnd_api.g_exc_error;

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

410: into l_count
411: from mtl_transactions_interface
412: where transaction_header_id = p_txnHeaderID
413: and completion_transaction_id = p_tbls.cplTxnID(p_index)
414: and transaction_action_id in (wip_constants.isscomp_action, wip_constants.retcomp_action,
415: wip_constants.issnegc_action, wip_constants.retnegc_action);
416: if(l_count = 0) then
417: if (l_logLevel <= wip_constants.full_logging) then
418: wip_logger.log('backflushing cpl', l_returnStatus);

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

411: from mtl_transactions_interface
412: where transaction_header_id = p_txnHeaderID
413: and completion_transaction_id = p_tbls.cplTxnID(p_index)
414: and transaction_action_id in (wip_constants.isscomp_action, wip_constants.retcomp_action,
415: wip_constants.issnegc_action, wip_constants.retnegc_action);
416: if(l_count = 0) then
417: if (l_logLevel <= wip_constants.full_logging) then
418: wip_logger.log('backflushing cpl', l_returnStatus);
419: end if;

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

413: and completion_transaction_id = p_tbls.cplTxnID(p_index)
414: and transaction_action_id in (wip_constants.isscomp_action, wip_constants.retcomp_action,
415: wip_constants.issnegc_action, wip_constants.retnegc_action);
416: if(l_count = 0) then
417: if (l_logLevel <= wip_constants.full_logging) then
418: wip_logger.log('backflushing cpl', l_returnStatus);
419: end if;
420: wip_bflProc_priv.backflush(p_wipEntityID => p_tbls.wipEntityID(p_index),
421: p_orgID => p_tbls.orgID(p_index),

Line 429: p_tblName => wip_constants.MTI_TBL,

425: p_batchID => p_tbls.txnBatchID(p_index),
426: p_batchSeq => p_tbls.txnSeqNum(p_index) + 1,
427: p_txnType => l_txnType,
428: p_entityType => p_tbls.wipEntityType(p_index),
429: p_tblName => wip_constants.MTI_TBL,
430: p_lineID => p_tbls.repLineID(p_index),
431: p_ocQty => p_tbls.overCplPriQty(p_index),
432: p_childMovTxnID => p_tbls.movTxnID(p_index),
433: p_cplTxnID => p_tbls.cplTxnID(p_index),

Line 435: p_lockFlag => wip_constants.yes,

431: p_ocQty => p_tbls.overCplPriQty(p_index),
432: p_childMovTxnID => p_tbls.movTxnID(p_index),
433: p_cplTxnID => p_tbls.cplTxnID(p_index),
434: p_mtlTxnMode => inv_txn_manager_grp.PROC_MODE_MTI,
435: p_lockFlag => wip_constants.yes,
436: p_reasonID => p_tbls.reasonID(p_index),
437: p_reference => p_tbls.reference(p_index),
438: x_bfRequired => l_bfRequired,
439: x_lotSerRequired => l_lsRequired,

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

438: x_bfRequired => l_bfRequired,
439: x_lotSerRequired => l_lsRequired,
440: x_returnStatus => x_returnStatus);
441:
442: if (l_logLevel <= wip_constants.full_logging) then
443: wip_logger.log('bf required:' || l_bfRequired, l_returnStatus);
444: wip_logger.log('ls required:' || l_lsRequired, l_returnStatus);
445: end if;
446: --if the procedure fails or some lot/serial info for backflush components can not

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

447: --be derived then error
448: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
449: raise fnd_api.g_exc_error;
450: end if;
451: if(l_lsRequired = wip_constants.yes) then
452: fnd_message.set_name('WIP', 'WIP_NO_LOT_SER_COMP_BKGND');
453: fnd_msg_pub.add;
454: raise fnd_api.g_exc_error;
455: end if;

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

454: raise fnd_api.g_exc_error;
455: end if;
456:
457: end if;
458: if (l_logLevel <= wip_constants.trace_logging) then
459: wip_logger.exitPoint(p_procName => 'wip_mti_pub.preInvWIPProcessing',
460: p_procReturnStatus => x_returnStatus,
461: p_msg => 'success',
462: x_returnStatus => l_returnStatus);

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

468: l_errCount := extendErrTbls(p_errTbls);
469: p_errTbls.txnIntID(l_errCount) := p_tbls.txnIntID(p_index);
470: p_errTbls.errCode(l_errCount) := 'WIP_PREPROCESSING';
471: wip_utilities.get_message_stack(p_msg => l_msg);
472: if(l_logLevel <= wip_constants.trace_logging) then
473: wip_logger.exitPoint(p_procName => 'wip_mti_pub.preInvWIPProcessing',
474: p_procReturnStatus => x_returnStatus,
475: p_msg => 'error:' || l_msg,
476: x_returnStatus => l_returnStatus);

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

476: x_returnStatus => l_returnStatus);
477: end if;
478: p_errTbls.errExpl(l_errCount) := substrb(l_msg, 1, 240);
479: when others then
480: if(l_logLevel <= wip_constants.trace_logging) then
481: wip_logger.exitPoint(p_procName => 'wip_mti_pub.preInvWIPProcessing',
482: p_procReturnStatus => x_returnStatus,
483: p_msg => 'unexp error:' || SQLERRM,
484: x_returnStatus => l_returnStatus);

Line 525: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,

521: from mtl_transactions_interface
522: where transaction_header_id = p_txnHeaderID
523: and process_flag = 1
524: and transaction_source_type_id = 5
525: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
526: WIP_CONSTANTS.CPLASSY_ACTION,
527: WIP_CONSTANTS.RETASSY_ACTION);
528: l_logLevel NUMBER := to_number(fnd_log.g_current_runtime_level);
529: l_params wip_logger.param_tbl_t;

Line 526: WIP_CONSTANTS.CPLASSY_ACTION,

522: where transaction_header_id = p_txnHeaderID
523: and process_flag = 1
524: and transaction_source_type_id = 5
525: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
526: WIP_CONSTANTS.CPLASSY_ACTION,
527: WIP_CONSTANTS.RETASSY_ACTION);
528: l_logLevel NUMBER := to_number(fnd_log.g_current_runtime_level);
529: l_params wip_logger.param_tbl_t;
530: l_returnStatus varchar2(1);

Line 527: WIP_CONSTANTS.RETASSY_ACTION);

523: and process_flag = 1
524: and transaction_source_type_id = 5
525: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
526: WIP_CONSTANTS.CPLASSY_ACTION,
527: WIP_CONSTANTS.RETASSY_ACTION);
528: l_logLevel NUMBER := to_number(fnd_log.g_current_runtime_level);
529: l_params wip_logger.param_tbl_t;
530: l_returnStatus varchar2(1);
531: l_msgCount number;

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

568: l_logLevel NUMBER := to_number(fnd_log.g_current_runtime_level);
569: l_bigErrMsg VARCHAR2(2000);
570: begin
571:
572: if (l_logLevel <= wip_constants.trace_logging) then
573: l_params(1).paramName := 'p_txnHeaderID';
574: l_params(1).paramValue := p_txnHeaderID;
575: wip_logger.entryPoint(p_procName => 'wip_mti_pub.preInvProcessFlow',
576: p_params => l_params,

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

582:
583: -- do derivation and validation only for flow records
584: wip_flowUtil_priv.processFlowInterfaceRecords(p_txnHeaderID);
585:
586: if (l_logLevel <= wip_constants.trace_logging) then
587: wip_logger.exitPoint(p_procName => 'wip_mti_pub.preInvProcessFlow',
588: p_procReturnStatus => x_returnStatus,
589: p_msg => 'Finished pre inventory flow processing!',
590: x_returnStatus => l_returnStatus); --discard logging return status

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

591: end if;
592: exception
593: when others then
594: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
595: if (l_logLevel <= wip_constants.trace_logging) then
596: wip_logger.exitPoint(p_procName => 'wip_mti_pub.preInvProcessFlow',
597: p_procReturnStatus => x_returnStatus,
598: p_msg => 'unexpected error: ' || SQLERRM,
599: x_returnStatus => l_returnStatus); --discard logging return status

Line 630: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,

626: from mtl_transactions_interface
627: where transaction_header_id = p_txnHeaderID
628: and process_flag = 1
629: and transaction_source_type_id = 5
630: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
631: WIP_CONSTANTS.RETASSY_ACTION,
632: WIP_CONSTANTS.ISSCOMP_ACTION,
633: WIP_CONSTANTS.RETCOMP_ACTION,
634: WIP_CONSTANTS.ISSNEGC_ACTION,

Line 631: WIP_CONSTANTS.RETASSY_ACTION,

627: where transaction_header_id = p_txnHeaderID
628: and process_flag = 1
629: and transaction_source_type_id = 5
630: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
631: WIP_CONSTANTS.RETASSY_ACTION,
632: WIP_CONSTANTS.ISSCOMP_ACTION,
633: WIP_CONSTANTS.RETCOMP_ACTION,
634: WIP_CONSTANTS.ISSNEGC_ACTION,
635: WIP_CONSTANTS.RETNEGC_ACTION);

Line 632: WIP_CONSTANTS.ISSCOMP_ACTION,

628: and process_flag = 1
629: and transaction_source_type_id = 5
630: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
631: WIP_CONSTANTS.RETASSY_ACTION,
632: WIP_CONSTANTS.ISSCOMP_ACTION,
633: WIP_CONSTANTS.RETCOMP_ACTION,
634: WIP_CONSTANTS.ISSNEGC_ACTION,
635: WIP_CONSTANTS.RETNEGC_ACTION);
636: l_locatorCntlCode number;

Line 633: WIP_CONSTANTS.RETCOMP_ACTION,

629: and transaction_source_type_id = 5
630: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
631: WIP_CONSTANTS.RETASSY_ACTION,
632: WIP_CONSTANTS.ISSCOMP_ACTION,
633: WIP_CONSTANTS.RETCOMP_ACTION,
634: WIP_CONSTANTS.ISSNEGC_ACTION,
635: WIP_CONSTANTS.RETNEGC_ACTION);
636: l_locatorCntlCode number;
637: l_projRefEnabled number;

Line 634: WIP_CONSTANTS.ISSNEGC_ACTION,

630: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
631: WIP_CONSTANTS.RETASSY_ACTION,
632: WIP_CONSTANTS.ISSCOMP_ACTION,
633: WIP_CONSTANTS.RETCOMP_ACTION,
634: WIP_CONSTANTS.ISSNEGC_ACTION,
635: WIP_CONSTANTS.RETNEGC_ACTION);
636: l_locatorCntlCode number;
637: l_projRefEnabled number;
638: l_projID number;

Line 635: WIP_CONSTANTS.RETNEGC_ACTION);

631: WIP_CONSTANTS.RETASSY_ACTION,
632: WIP_CONSTANTS.ISSCOMP_ACTION,
633: WIP_CONSTANTS.RETCOMP_ACTION,
634: WIP_CONSTANTS.ISSNEGC_ACTION,
635: WIP_CONSTANTS.RETNEGC_ACTION);
636: l_locatorCntlCode number;
637: l_projRefEnabled number;
638: l_projID number;
639: l_taskID number;

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

662: -- if ( l_locatorCntlCode <> 1 and l_projRefEnabled = 1 ) then
663: if ( l_projRefEnabled = 1 ) then
664:
665: if(l_locatorCntlCode = 1 or pt_rec.locator_id is null) then
666: if (pt_rec.transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
667: WIP_CONSTANTS.RETASSY_ACTION)) then
668: l_success := FALSE;
669: end if;
670:

Line 667: WIP_CONSTANTS.RETASSY_ACTION)) then

663: if ( l_projRefEnabled = 1 ) then
664:
665: if(l_locatorCntlCode = 1 or pt_rec.locator_id is null) then
666: if (pt_rec.transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
667: WIP_CONSTANTS.RETASSY_ACTION)) then
668: l_success := FALSE;
669: end if;
670:
671: else

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

685: from wip_discrete_jobs
686: where wip_entity_id = pt_rec.transaction_source_id;
687: end if; -- end of flow_schedule = 'Y'
688:
689: if (pt_rec.transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
690: WIP_CONSTANTS.RETASSY_ACTION)) then
691:
692: l_success := pjm_project_locator.check_project_references(
693: p_organization_id => pt_rec.organization_id,

Line 690: WIP_CONSTANTS.RETASSY_ACTION)) then

686: where wip_entity_id = pt_rec.transaction_source_id;
687: end if; -- end of flow_schedule = 'Y'
688:
689: if (pt_rec.transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
690: WIP_CONSTANTS.RETASSY_ACTION)) then
691:
692: l_success := pjm_project_locator.check_project_references(
693: p_organization_id => pt_rec.organization_id,
694: p_locator_id => pt_rec.locator_id,

Line 750: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,

746: where transaction_header_id = p_txnHeaderID
747: and process_flag = 1
748: and transaction_source_type_id = 5
749: and upper(nvl(flow_schedule, 'N')) = 'N'
750: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
751: WIP_CONSTANTS.CPLASSY_ACTION,
752: WIP_CONSTANTS.RETASSY_ACTION);
753:
754: l_primaryCostMethod number;

Line 751: WIP_CONSTANTS.CPLASSY_ACTION,

747: and process_flag = 1
748: and transaction_source_type_id = 5
749: and upper(nvl(flow_schedule, 'N')) = 'N'
750: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
751: WIP_CONSTANTS.CPLASSY_ACTION,
752: WIP_CONSTANTS.RETASSY_ACTION);
753:
754: l_primaryCostMethod number;
755: l_cstRetVal number;

Line 752: WIP_CONSTANTS.RETASSY_ACTION);

748: and transaction_source_type_id = 5
749: and upper(nvl(flow_schedule, 'N')) = 'N'
750: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
751: WIP_CONSTANTS.CPLASSY_ACTION,
752: WIP_CONSTANTS.RETASSY_ACTION);
753:
754: l_primaryCostMethod number;
755: l_cstRetVal number;
756:

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

768: l_sf_status varchar2(100); /*Fix Bug 9758848*/
769:
770: begin
771:
772: if (l_logLevel <= wip_constants.trace_logging) then
773: l_params(1).paramName := 'p_txnHeaderID';
774: l_params(1).paramValue := p_txnHeaderID;
775: wip_logger.entryPoint(p_procName => 'wip_mti_pub.postInvWIPValidation.',
776: p_params => l_params,

Line 920: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,

916: error_explanation = l_errMsg
917: where transaction_header_id = p_txnHeaderID
918: and process_flag = 1
919: and transaction_source_type_id = 5
920: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
921: WIP_CONSTANTS.CPLASSY_ACTION,
922: WIP_CONSTANTS.RETASSY_ACTION)
923: and ( (exists (select 'X'
924: from wip_discrete_jobs wdj

Line 921: WIP_CONSTANTS.CPLASSY_ACTION,

917: where transaction_header_id = p_txnHeaderID
918: and process_flag = 1
919: and transaction_source_type_id = 5
920: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
921: WIP_CONSTANTS.CPLASSY_ACTION,
922: WIP_CONSTANTS.RETASSY_ACTION)
923: and ( (exists (select 'X'
924: from wip_discrete_jobs wdj
925: where wdj.wip_entity_id = mti.transaction_source_id

Line 922: WIP_CONSTANTS.RETASSY_ACTION)

918: and process_flag = 1
919: and transaction_source_type_id = 5
920: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
921: WIP_CONSTANTS.CPLASSY_ACTION,
922: WIP_CONSTANTS.RETASSY_ACTION)
923: and ( (exists (select 'X'
924: from wip_discrete_jobs wdj
925: where wdj.wip_entity_id = mti.transaction_source_id
926: and wdj.organization_id = mti.organization_id

Line 983: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,

979: and wo.next_operation_seq_num is null)
980: where transaction_header_id = p_txnHeaderID
981: and transaction_source_type_id = 5
982: and process_flag = 1
983: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
984: WIP_CONSTANTS.RETASSY_ACTION);
985:
986: -- derive op seq num for wip component issue/return
987: update mtl_transactions_interface mti

Line 984: WIP_CONSTANTS.RETASSY_ACTION);

980: where transaction_header_id = p_txnHeaderID
981: and transaction_source_type_id = 5
982: and process_flag = 1
983: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
984: WIP_CONSTANTS.RETASSY_ACTION);
985:
986: -- derive op seq num for wip component issue/return
987: update mtl_transactions_interface mti
988: set last_update_date = sysdate,

Line 1007: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,

1003: where transaction_header_id = p_txnHeaderID
1004: and transaction_source_type_id = 5
1005: and process_flag = 1
1006: and operation_seq_num is null
1007: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1008: WIP_CONSTANTS.RETCOMP_ACTION);
1009:
1010: -- Added Additional Validation of Operation Disable Date for Lot based jobs for Bug 14065582.
1011: -- validate operation seq num

Line 1008: WIP_CONSTANTS.RETCOMP_ACTION);

1004: and transaction_source_type_id = 5
1005: and process_flag = 1
1006: and operation_seq_num is null
1007: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1008: WIP_CONSTANTS.RETCOMP_ACTION);
1009:
1010: -- Added Additional Validation of Operation Disable Date for Lot based jobs for Bug 14065582.
1011: -- validate operation seq num
1012: fnd_message.set_name('WIP', 'WIP_INVALID_OPERATION');

Line 1030: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,

1026: where transaction_header_id = p_txnHeaderID
1027: and process_flag = 1
1028: and transaction_source_type_id = 5
1029: and wip_entity_type in (1, 2, 5, 6)
1030: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1031: WIP_CONSTANTS.RETCOMP_ACTION,
1032: WIP_CONSTANTS.ISSNEGC_ACTION,
1033: WIP_CONSTANTS.RETNEGC_ACTION)
1034: and operation_seq_num is not null

Line 1031: WIP_CONSTANTS.RETCOMP_ACTION,

1027: and process_flag = 1
1028: and transaction_source_type_id = 5
1029: and wip_entity_type in (1, 2, 5, 6)
1030: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1031: WIP_CONSTANTS.RETCOMP_ACTION,
1032: WIP_CONSTANTS.ISSNEGC_ACTION,
1033: WIP_CONSTANTS.RETNEGC_ACTION)
1034: and operation_seq_num is not null
1035: and 0 =(select decode(count(wo.operation_seq_num),

Line 1032: WIP_CONSTANTS.ISSNEGC_ACTION,

1028: and transaction_source_type_id = 5
1029: and wip_entity_type in (1, 2, 5, 6)
1030: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1031: WIP_CONSTANTS.RETCOMP_ACTION,
1032: WIP_CONSTANTS.ISSNEGC_ACTION,
1033: WIP_CONSTANTS.RETNEGC_ACTION)
1034: and operation_seq_num is not null
1035: and 0 =(select decode(count(wo.operation_seq_num),
1036: 0,

Line 1033: WIP_CONSTANTS.RETNEGC_ACTION)

1029: and wip_entity_type in (1, 2, 5, 6)
1030: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1031: WIP_CONSTANTS.RETCOMP_ACTION,
1032: WIP_CONSTANTS.ISSNEGC_ACTION,
1033: WIP_CONSTANTS.RETNEGC_ACTION)
1034: and operation_seq_num is not null
1035: and 0 =(select decode(count(wo.operation_seq_num),
1036: 0,
1037: decode(mti.operation_seq_num, 1, 1, 0),

Line 1070: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,

1066: error_explanation = l_errMsg
1067: where transaction_header_id = p_txnHeaderID
1068: and process_flag = 1
1069: and transaction_source_type_id = 5
1070: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1071: WIP_CONSTANTS.RETCOMP_ACTION,
1072: WIP_CONSTANTS.ISSNEGC_ACTION,
1073: WIP_CONSTANTS.RETNEGC_ACTION)
1074: and not exists (select 'X'

Line 1071: WIP_CONSTANTS.RETCOMP_ACTION,

1067: where transaction_header_id = p_txnHeaderID
1068: and process_flag = 1
1069: and transaction_source_type_id = 5
1070: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1071: WIP_CONSTANTS.RETCOMP_ACTION,
1072: WIP_CONSTANTS.ISSNEGC_ACTION,
1073: WIP_CONSTANTS.RETNEGC_ACTION)
1074: and not exists (select 'X'
1075: from mtl_system_items msi

Line 1072: WIP_CONSTANTS.ISSNEGC_ACTION,

1068: and process_flag = 1
1069: and transaction_source_type_id = 5
1070: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1071: WIP_CONSTANTS.RETCOMP_ACTION,
1072: WIP_CONSTANTS.ISSNEGC_ACTION,
1073: WIP_CONSTANTS.RETNEGC_ACTION)
1074: and not exists (select 'X'
1075: from mtl_system_items msi
1076: where msi.organization_id = mti.organization_id

Line 1073: WIP_CONSTANTS.RETNEGC_ACTION)

1069: and transaction_source_type_id = 5
1070: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1071: WIP_CONSTANTS.RETCOMP_ACTION,
1072: WIP_CONSTANTS.ISSNEGC_ACTION,
1073: WIP_CONSTANTS.RETNEGC_ACTION)
1074: and not exists (select 'X'
1075: from mtl_system_items msi
1076: where msi.organization_id = mti.organization_id
1077: and msi.inventory_item_id = mti.inventory_item_id

Line 1117: and transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION

1113: from mtl_transactions_interface mti
1114: where transaction_header_id = p_txnHeaderID
1115: and process_flag = 1
1116: and transaction_source_type_id = 5
1117: and transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1118: and upper(nvl(mti.flow_schedule, 'N')) = 'N'
1119: and operation_seq_num is not null
1120: and exists (select 'X'
1121: from wip_shop_floor_status_codes wsfsc,

Line 1127: and wsfs.intraoperation_step_type = WIP_CONSTANTS.TOMOVE

1123: where wsfs.wip_entity_id = mti.transaction_source_id
1124: and wsfs.organization_id = mti.organization_id
1125: and nvl(wsfs.line_id, -1) = nvl(mti.repetitive_line_id, -1)
1126: and wsfs.operation_seq_num = mti.operation_seq_num
1127: and wsfs.intraoperation_step_type = WIP_CONSTANTS.TOMOVE
1128: and wsfs.shop_floor_status_code = wsfsc.shop_floor_status_code
1129: and wsfsc.organization_id = mti.organization_id
1130: and wsfsc.status_move_flag = WIP_CONSTANTS.NO
1131: and nvl(wsfsc.disable_date, sysdate+1) > sysdate);

Line 1130: and wsfsc.status_move_flag = WIP_CONSTANTS.NO

1126: and wsfs.operation_seq_num = mti.operation_seq_num
1127: and wsfs.intraoperation_step_type = WIP_CONSTANTS.TOMOVE
1128: and wsfs.shop_floor_status_code = wsfsc.shop_floor_status_code
1129: and wsfsc.organization_id = mti.organization_id
1130: and wsfsc.status_move_flag = WIP_CONSTANTS.NO
1131: and nvl(wsfsc.disable_date, sysdate+1) > sysdate);
1132:
1133: if l_sfRecTbl.txnIntID.count > 0 then
1134: for i in 1..l_sfRecTbl.txnIntID.count loop

Line 1144: and wsfs.intraoperation_step_type = WIP_CONSTANTS.TOMOVE

1140: where wsfs.wip_entity_id = l_sfRecTbl.txnSrcID(i)
1141: and wsfs.organization_id = l_sfRecTbl.orgID(i)
1142: and nvl(wsfs.line_id, -1) = nvl(l_sfRecTbl.lineID(i) , -1)
1143: and wsfs.operation_seq_num = l_sfRecTbl.opSeqNum(i)
1144: and wsfs.intraoperation_step_type = WIP_CONSTANTS.TOMOVE
1145: and wsfs.shop_floor_status_code = wsfsc.shop_floor_status_code
1146: and wsfsc.organization_id = l_sfRecTbl.orgID(i)
1147: and wsfsc.status_move_flag = WIP_CONSTANTS.NO
1148: and nvl(wsfsc.disable_date, sysdate+1) > sysdate

Line 1147: and wsfsc.status_move_flag = WIP_CONSTANTS.NO

1143: and wsfs.operation_seq_num = l_sfRecTbl.opSeqNum(i)
1144: and wsfs.intraoperation_step_type = WIP_CONSTANTS.TOMOVE
1145: and wsfs.shop_floor_status_code = wsfsc.shop_floor_status_code
1146: and wsfsc.organization_id = l_sfRecTbl.orgID(i)
1147: and wsfsc.status_move_flag = WIP_CONSTANTS.NO
1148: and nvl(wsfsc.disable_date, sysdate+1) > sysdate
1149: and rownum = 1;
1150:
1151: fnd_message.set_name('WIP', 'WIP_SF_STATUS_NO_TXN2');

Line 1192: and transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION

1188: where transaction_header_id = p_txnHeaderID
1189: and process_flag = 1
1190: and transaction_source_type_id = 5
1191: and upper(nvl(flow_schedule, 'N')) = 'N'
1192: and transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1193: and upper(nvl(final_completion_flag, 'E')) not in ('Y', 'N');
1194:
1195:
1196: -- derive item revision for completion txns for discrete jobs

Line 1212: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,

1208: and wdj.wip_entity_id = mti.transaction_source_id)
1209: where transaction_header_id = p_txnHeaderID
1210: and transaction_source_type_id = 5
1211: and process_flag = 1
1212: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
1213: WIP_CONSTANTS.RETASSY_ACTION)
1214: and wip_entity_type in (1,5)
1215: and exists(select 'X'
1216: from mtl_system_items msi

Line 1213: WIP_CONSTANTS.RETASSY_ACTION)

1209: where transaction_header_id = p_txnHeaderID
1210: and transaction_source_type_id = 5
1211: and process_flag = 1
1212: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
1213: WIP_CONSTANTS.RETASSY_ACTION)
1214: and wip_entity_type in (1,5)
1215: and exists(select 'X'
1216: from mtl_system_items msi
1217: where msi.organization_id = mti.organization_id

Line 1238: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,

1234: and wrs.repetitive_schedule_id = mti.schedule_id)
1235: where transaction_header_id = p_txnHeaderID
1236: and transaction_source_type_id = 5
1237: and process_flag = 1
1238: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
1239: WIP_CONSTANTS.RETASSY_ACTION)
1240: and wip_entity_type = 2
1241: and exists(select 'X'
1242: from mtl_system_items msi

Line 1239: WIP_CONSTANTS.RETASSY_ACTION)

1235: where transaction_header_id = p_txnHeaderID
1236: and transaction_source_type_id = 5
1237: and process_flag = 1
1238: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
1239: WIP_CONSTANTS.RETASSY_ACTION)
1240: and wip_entity_type = 2
1241: and exists(select 'X'
1242: from mtl_system_items msi
1243: where msi.organization_id = mti.organization_id

Line 1263: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,

1259: and wfs.wip_entity_id = mti.transaction_source_id)
1260: where transaction_header_id = p_txnHeaderID
1261: and transaction_source_type_id = 5
1262: and process_flag = 1
1263: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
1264: WIP_CONSTANTS.RETASSY_ACTION,
1265: WIP_CONSTANTS.SCRASSY_ACTION)
1266: and wip_entity_type = 4
1267: and exists(select 'X'

Line 1264: WIP_CONSTANTS.RETASSY_ACTION,

1260: where transaction_header_id = p_txnHeaderID
1261: and transaction_source_type_id = 5
1262: and process_flag = 1
1263: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
1264: WIP_CONSTANTS.RETASSY_ACTION,
1265: WIP_CONSTANTS.SCRASSY_ACTION)
1266: and wip_entity_type = 4
1267: and exists(select 'X'
1268: from mtl_system_items msi

Line 1265: WIP_CONSTANTS.SCRASSY_ACTION)

1261: and transaction_source_type_id = 5
1262: and process_flag = 1
1263: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
1264: WIP_CONSTANTS.RETASSY_ACTION,
1265: WIP_CONSTANTS.SCRASSY_ACTION)
1266: and wip_entity_type = 4
1267: and exists(select 'X'
1268: from mtl_system_items msi
1269: where msi.organization_id = mti.organization_id

Line 1291: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,

1287: and process_flag = 1
1288: -- Fixed bug 4405815. We should only update completion_transaction_id
1289: -- if it is null.
1290: and completion_transaction_id is null
1291: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1292: WIP_CONSTANTS.RETCOMP_ACTION,
1293: WIP_CONSTANTS.ISSNEGC_ACTION,
1294: WIP_CONSTANTS.RETNEGC_ACTION)
1295: and wip_entity_type = 4

Line 1292: WIP_CONSTANTS.RETCOMP_ACTION,

1288: -- Fixed bug 4405815. We should only update completion_transaction_id
1289: -- if it is null.
1290: and completion_transaction_id is null
1291: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1292: WIP_CONSTANTS.RETCOMP_ACTION,
1293: WIP_CONSTANTS.ISSNEGC_ACTION,
1294: WIP_CONSTANTS.RETNEGC_ACTION)
1295: and wip_entity_type = 4
1296: and flow_schedule = 'Y';

Line 1293: WIP_CONSTANTS.ISSNEGC_ACTION,

1289: -- if it is null.
1290: and completion_transaction_id is null
1291: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1292: WIP_CONSTANTS.RETCOMP_ACTION,
1293: WIP_CONSTANTS.ISSNEGC_ACTION,
1294: WIP_CONSTANTS.RETNEGC_ACTION)
1295: and wip_entity_type = 4
1296: and flow_schedule = 'Y';
1297:

Line 1294: WIP_CONSTANTS.RETNEGC_ACTION)

1290: and completion_transaction_id is null
1291: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1292: WIP_CONSTANTS.RETCOMP_ACTION,
1293: WIP_CONSTANTS.ISSNEGC_ACTION,
1294: WIP_CONSTANTS.RETNEGC_ACTION)
1295: and wip_entity_type = 4
1296: and flow_schedule = 'Y';
1297:
1298:

Line 1317: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,

1313: error_explanation = l_errMsg
1314: where transaction_header_id = p_txnHeaderID
1315: and process_flag = 1
1316: and transaction_source_type_id = 5
1317: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
1318: WIP_CONSTANTS.RETASSY_ACTION,
1319: WIP_CONSTANTS.SCRASSY_ACTION)
1320: and exists (select 'X'
1321: from mtl_system_items msi

Line 1318: WIP_CONSTANTS.RETASSY_ACTION,

1314: where transaction_header_id = p_txnHeaderID
1315: and process_flag = 1
1316: and transaction_source_type_id = 5
1317: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
1318: WIP_CONSTANTS.RETASSY_ACTION,
1319: WIP_CONSTANTS.SCRASSY_ACTION)
1320: and exists (select 'X'
1321: from mtl_system_items msi
1322: where msi.organization_id = mti.organization_id

Line 1319: WIP_CONSTANTS.SCRASSY_ACTION)

1315: and process_flag = 1
1316: and transaction_source_type_id = 5
1317: and transaction_action_id in (WIP_CONSTANTS.CPLASSY_ACTION,
1318: WIP_CONSTANTS.RETASSY_ACTION,
1319: WIP_CONSTANTS.SCRASSY_ACTION)
1320: and exists (select 'X'
1321: from mtl_system_items msi
1322: where msi.organization_id = mti.organization_id
1323: and msi.inventory_item_id = mti.inventory_item_id

Line 1359: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,

1355: and mir2.effectivity_date <= sysdate))
1356: where transaction_header_id = p_txnHeaderID
1357: and transaction_source_type_id = 5
1358: and process_flag = 1
1359: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1360: WIP_CONSTANTS.RETCOMP_ACTION,
1361: WIP_CONSTANTS.ISSNEGC_ACTION,
1362: WIP_CONSTANTS.RETNEGC_ACTION)
1363: and revision is null

Line 1360: WIP_CONSTANTS.RETCOMP_ACTION,

1356: where transaction_header_id = p_txnHeaderID
1357: and transaction_source_type_id = 5
1358: and process_flag = 1
1359: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1360: WIP_CONSTANTS.RETCOMP_ACTION,
1361: WIP_CONSTANTS.ISSNEGC_ACTION,
1362: WIP_CONSTANTS.RETNEGC_ACTION)
1363: and revision is null
1364: and exists (select 'X'

Line 1361: WIP_CONSTANTS.ISSNEGC_ACTION,

1357: and transaction_source_type_id = 5
1358: and process_flag = 1
1359: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1360: WIP_CONSTANTS.RETCOMP_ACTION,
1361: WIP_CONSTANTS.ISSNEGC_ACTION,
1362: WIP_CONSTANTS.RETNEGC_ACTION)
1363: and revision is null
1364: and exists (select 'X'
1365: from mtl_system_items msi

Line 1362: WIP_CONSTANTS.RETNEGC_ACTION)

1358: and process_flag = 1
1359: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1360: WIP_CONSTANTS.RETCOMP_ACTION,
1361: WIP_CONSTANTS.ISSNEGC_ACTION,
1362: WIP_CONSTANTS.RETNEGC_ACTION)
1363: and revision is null
1364: and exists (select 'X'
1365: from mtl_system_items msi
1366: where msi.organization_id = mti.organization_id

Line 1394: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,

1390: error_explanation = l_errMsg
1391: where transaction_header_id = p_txnHeaderID
1392: and process_flag = 1
1393: and transaction_source_type_id = 5
1394: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1395: WIP_CONSTANTS.RETCOMP_ACTION,
1396: WIP_CONSTANTS.ISSNEGC_ACTION,
1397: WIP_CONSTANTS.RETNEGC_ACTION)
1398: and ( ( revision is not null

Line 1395: WIP_CONSTANTS.RETCOMP_ACTION,

1391: where transaction_header_id = p_txnHeaderID
1392: and process_flag = 1
1393: and transaction_source_type_id = 5
1394: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1395: WIP_CONSTANTS.RETCOMP_ACTION,
1396: WIP_CONSTANTS.ISSNEGC_ACTION,
1397: WIP_CONSTANTS.RETNEGC_ACTION)
1398: and ( ( revision is not null
1399: and ( ( exists(select 'item under rev ctl'

Line 1396: WIP_CONSTANTS.ISSNEGC_ACTION,

1392: and process_flag = 1
1393: and transaction_source_type_id = 5
1394: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1395: WIP_CONSTANTS.RETCOMP_ACTION,
1396: WIP_CONSTANTS.ISSNEGC_ACTION,
1397: WIP_CONSTANTS.RETNEGC_ACTION)
1398: and ( ( revision is not null
1399: and ( ( exists(select 'item under rev ctl'
1400: from mtl_system_items msi

Line 1397: WIP_CONSTANTS.RETNEGC_ACTION)

1393: and transaction_source_type_id = 5
1394: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1395: WIP_CONSTANTS.RETCOMP_ACTION,
1396: WIP_CONSTANTS.ISSNEGC_ACTION,
1397: WIP_CONSTANTS.RETNEGC_ACTION)
1398: and ( ( revision is not null
1399: and ( ( exists(select 'item under rev ctl'
1400: from mtl_system_items msi
1401: where msi.organization_id = mti.organization_id

Line 1471: and transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION

1467: error_explanation = l_errMsg
1468: where transaction_header_id = p_txnHeaderID
1469: and process_flag = 1
1470: and transaction_source_type_id = 5
1471: and transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1472: and wip_entity_type is not null
1473: and wip_entity_type <> 4
1474: and operation_seq_num is not null
1475: and (primary_quantity - nvl(overcompletion_primary_qty, 0)) >

Line 1515: and transaction_action_id = WIP_CONSTANTS.RETASSY_ACTION

1511: error_explanation = l_errMsg
1512: where transaction_header_id = p_txnHeaderID
1513: and process_flag = 1
1514: and transaction_source_type_id = 5
1515: and transaction_action_id = WIP_CONSTANTS.RETASSY_ACTION
1516: and ( wip_entity_type in (1,5)
1517: and (-1*primary_quantity > (select wdj.quantity_completed
1518: from wip_discrete_jobs wdj
1519: where wdj.organization_id = mti.organization_id

Line 1548: and transaction_action_id <> WIP_CONSTANTS.SCRASSY_ACTION

1544: error_explanation = l_errMsg
1545: where transaction_header_id = p_txnHeaderID
1546: and process_flag = 1
1547: and transaction_source_type_id = 5
1548: and transaction_action_id <> WIP_CONSTANTS.SCRASSY_ACTION
1549: and ( ( l_poExpToAssetTnsf = 2
1550: and not exists(select 'X'
1551: from mtl_secondary_inventories sub,
1552: mtl_system_items msi

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

1629: and inventory_item_id = mti.inventory_item_id
1630: and nvl(revision, '--1') = nvl(mti.revision, '--1')
1631: and demand_source_type_id = inv_reservation_global.g_source_type_oe
1632: and demand_source_header_id = mti.demand_source_header_id
1633: and ( ( mti.transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1634: and supply_source_header_id = mti.transaction_source_id
1635: and supply_source_type_id =
1636: inv_reservation_global.g_source_type_wip)
1637: or ( mti.transaction_action_id = WIP_CONSTANTS.RETASSY_ACTION

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

1633: and ( ( mti.transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1634: and supply_source_header_id = mti.transaction_source_id
1635: and supply_source_type_id =
1636: inv_reservation_global.g_source_type_wip)
1637: or ( mti.transaction_action_id = WIP_CONSTANTS.RETASSY_ACTION
1638: and supply_source_type_id =
1639: inv_reservation_global.g_source_type_inv
1640: and subinventory_code = mti.subinventory_code
1641: and nvl(locator_id, -1) = nvl(mti.locator_id, -1) )));

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

1669: inv_reservation_global.g_source_type_oe
1670: and demand_source_header_id = mti.demand_source_header_id
1671: and nvl(demand_source_line_id, -1) =
1672: nvl(to_number(mti.demand_source_line), -1)
1673: and ( ( mti.transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1674: and supply_source_header_id = mti.transaction_source_id
1675: and supply_source_type_id =
1676: inv_reservation_global.g_source_type_wip)
1677: or ( mti.transaction_action_id = WIP_CONSTANTS.RETASSY_ACTION

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

1673: and ( ( mti.transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1674: and supply_source_header_id = mti.transaction_source_id
1675: and supply_source_type_id =
1676: inv_reservation_global.g_source_type_wip)
1677: or ( mti.transaction_action_id = WIP_CONSTANTS.RETASSY_ACTION
1678: and supply_source_type_id =
1679: inv_reservation_global.g_source_type_inv
1680: and subinventory_code = mti.subinventory_code
1681: and nvl(locator_id, -1) = nvl(mti.locator_id, -1) )));

Line 1703: and transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION

1699: where transaction_header_id = p_txnHeaderID
1700: and process_flag = 1
1701: and transaction_source_type_id = 5
1702: and wip_entity_type in (1, 2, 5)
1703: and transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1704: and demand_source_header_id is not null
1705: and not exists (select 'X'
1706: from mtl_reservations
1707: where organization_id = mti.organization_id

Line 1740: and transaction_action_id = WIP_CONSTANTS.RETASSY_ACTION

1736: where transaction_header_id = p_txnHeaderID
1737: and process_flag = 1
1738: and transaction_source_type_id = 5
1739: and wip_entity_type in (1, 2, 5)
1740: and transaction_action_id = WIP_CONSTANTS.RETASSY_ACTION
1741: and demand_source_header_id is not null
1742: and not exists (select 'X'
1743: from mtl_reservations
1744: where organization_id = mti.organization_id

Line 1779: and ( ( transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION

1775: error_explanation = l_errMsg
1776: where transaction_header_id = p_txnHeaderID
1777: and process_flag = 1
1778: and transaction_source_type_id = 5
1779: and ( ( transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1780: and demand_source_header_id is not null
1781: and kanban_card_id is not null)
1782: or( transaction_action_id <> WIP_CONSTANTS.CPLASSY_ACTION
1783: and kanban_card_id is not null));

Line 1782: or( transaction_action_id <> WIP_CONSTANTS.CPLASSY_ACTION

1778: and transaction_source_type_id = 5
1779: and ( ( transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1780: and demand_source_header_id is not null
1781: and kanban_card_id is not null)
1782: or( transaction_action_id <> WIP_CONSTANTS.CPLASSY_ACTION
1783: and kanban_card_id is not null));
1784:
1785:
1786: -- validate the kanban card

Line 1806: and transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION

1802: error_explanation = l_errMsg
1803: where transaction_header_id = p_txnHeaderID
1804: and process_flag = 1
1805: and transaction_source_type_id = 5
1806: and transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1807: and kanban_card_id is not null
1808: and not exists (select 'X'
1809: from mtl_kanban_cards mkc
1810: where mkc.kanban_card_id = mti.kanban_card_id

Line 1837: and transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION

1833: error_explanation = l_errMsg
1834: where transaction_header_id = p_txnHeaderID
1835: and process_flag = 1
1836: and transaction_source_type_id = 5
1837: and transaction_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1838: and kanban_card_id is not null
1839: and not exists (select 'X'
1840: from mtl_kanban_cards mkc
1841: where mkc.kanban_card_id = mti.kanban_card_id

Line 1872: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,

1868: error_explanation = l_errMsg
1869: where transaction_header_id = p_txnHeaderID
1870: and process_flag = 1
1871: and transaction_source_type_id = 5
1872: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1873: WIP_CONSTANTS.RETCOMP_ACTION)
1874: and wip_entity_type = 2
1875: and negative_req_flag is not null
1876: and negative_req_flag not in (1, -1);

Line 1873: WIP_CONSTANTS.RETCOMP_ACTION)

1869: where transaction_header_id = p_txnHeaderID
1870: and process_flag = 1
1871: and transaction_source_type_id = 5
1872: and transaction_action_id in (WIP_CONSTANTS.ISSCOMP_ACTION,
1873: WIP_CONSTANTS.RETCOMP_ACTION)
1874: and wip_entity_type = 2
1875: and negative_req_flag is not null
1876: and negative_req_flag not in (1, -1);
1877:

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

1874: and wip_entity_type = 2
1875: and negative_req_flag is not null
1876: and negative_req_flag not in (1, -1);
1877:
1878: if(l_logLevel <= wip_constants.full_logging) then
1879: wip_logger.log('about to call EAM validations', l_returnStatus);
1880: end if;
1881:
1882: -- for discrete job, we do not support background transactions for

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

1906: wip_entities we
1907: where wdj.wip_entity_id = mti.transaction_source_id
1908: and wdj.organization_id = mti.organization_id
1909: and wdj.wip_entity_id = we.wip_entity_id
1910: and (we.entity_type = wip_constants.lotbased or
1911: wdj.serialization_start_op is null));
1912:
1913:
1914: --for assy completions and returns, project/task must match

Line 1929: and transaction_action_id in (wip_constants.cplassy_action,

1925: task_id = source_task_id
1926: where transaction_header_id = p_txnHeaderID
1927: and process_flag = 1
1928: and transaction_source_type_id = 5
1929: and transaction_action_id in (wip_constants.cplassy_action,
1930: wip_constants.retassy_action);
1931:
1932:
1933: --call eam specific validations. if it errors, just return error status

Line 1930: wip_constants.retassy_action);

1926: where transaction_header_id = p_txnHeaderID
1927: and process_flag = 1
1928: and transaction_source_type_id = 5
1929: and transaction_action_id in (wip_constants.cplassy_action,
1930: wip_constants.retassy_action);
1931:
1932:
1933: --call eam specific validations. if it errors, just return error status
1934: wip_eamMtlProc_priv.validateTxns(p_txnHdrID => p_txnHeaderID,

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

1933: --call eam specific validations. if it errors, just return error status
1934: wip_eamMtlProc_priv.validateTxns(p_txnHdrID => p_txnHeaderID,
1935: x_returnStatus => x_returnStatus);
1936:
1937: if(l_logLevel <= wip_constants.full_logging) then
1938: wip_logger.log('EAM validation routine returned:' || x_returnStatus, l_returnStatus);
1939: end if;
1940:
1941: /* Fix for bug 5708242: Call to cstpacms.validate_move_snap_to_temp has been moved to

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

1982: end if;
1983: end if;
1984: end loop;
1985:
1986: if(l_logLevel <= wip_constants.trace_logging) then
1987: wip_logger.exitPoint(p_procName => 'wip_mti_pub.postInvWIPValidation',
1988: p_procReturnStatus => x_returnStatus,
1989: p_msg => 'Finished validating interface rows!',
1990: x_returnStatus => l_returnStatus); --discard logging return status

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

1991: end if;
1992: exception
1993: when others then
1994: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1995: if (l_logLevel <= wip_constants.trace_logging) then
1996: wip_logger.exitPoint(p_procName => 'wip_mti_pub.postInvWIPValidation',
1997: p_procReturnStatus => x_returnStatus,
1998: p_msg => 'unexpected error: ' || SQLERRM,
1999: x_returnStatus => l_returnStatus); --discard logging return status

Line 2072: and process_flag = wip_constants.mti_inventory

2068: */
2069: from mtl_transactions_interface
2070: where transaction_header_id = p_txnHeaderID
2071: and transaction_source_type_id = 5
2072: and process_flag = wip_constants.mti_inventory
2073: and ( inventory_item_id is null
2074: or ( locator_id is null
2075: and ( loc_segment1 is not null
2076: or loc_segment2 is not null

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

2095: )
2096: )
2097: );
2098: begin
2099: if (l_logLevel <= wip_constants.trace_logging) then
2100: l_params(1).paramName := 'p_txnHeaderID';
2101: l_params(1).paramValue := p_txnHeaderID;
2102: wip_logger.entryPoint(p_procName => 'wip_mti_pub.doPreProcessingValidations',
2103: p_params => l_params,

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

2134: --make sure overcompletions have a move id and overcpl id.
2135: update mtl_transactions_interface
2136: set completion_transaction_id = nvl(completion_transaction_id, mtl_material_transactions_s.nextval),
2137: transaction_batch_id = nvl(transaction_batch_id, nvl(completion_transaction_id, mtl_material_transactions_s.nextval)),
2138: transaction_batch_seq = nvl(transaction_batch_seq, wip_constants.ASSY_BATCH_SEQ),
2139: overcompletion_transaction_id = nvl(overcompletion_transaction_id, decode(overcompletion_transaction_qty,
2140: null, overcompletion_transaction_id,
2141: wip_transactions_s.nextval)),
2142: move_transaction_id = nvl(move_transaction_id, decode(overcompletion_transaction_qty,

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

2142: move_transaction_id = nvl(move_transaction_id, decode(overcompletion_transaction_qty,
2143: null, move_transaction_id,
2144: wip_transactions_s.nextval))
2145: where transaction_header_id = p_txnHeaderID
2146: and transaction_action_id in (wip_constants.cplassy_action, wip_constants.retassy_action)
2147: and transaction_source_type_id = 5;
2148:
2149: --make sure flow scrap transactions have a cpl id and batch id
2150: update mtl_transactions_interface

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

2149: --make sure flow scrap transactions have a cpl id and batch id
2150: update mtl_transactions_interface
2151: set completion_transaction_id = nvl(completion_transaction_id, mtl_material_transactions_s.nextval),
2152: transaction_batch_id = nvl(transaction_batch_id, nvl(completion_transaction_id, mtl_material_transactions_s.nextval)),
2153: transaction_batch_seq = nvl(transaction_batch_seq, wip_constants.ASSY_BATCH_SEQ)
2154: where transaction_header_id = p_txnHeaderID
2155: and transaction_action_id = wip_constants.scrassy_action
2156: and upper(nvl(flow_schedule, 'N')) = 'Y'
2157: and transaction_source_type_id = 5;

Line 2155: and transaction_action_id = wip_constants.scrassy_action

2151: set completion_transaction_id = nvl(completion_transaction_id, mtl_material_transactions_s.nextval),
2152: transaction_batch_id = nvl(transaction_batch_id, nvl(completion_transaction_id, mtl_material_transactions_s.nextval)),
2153: transaction_batch_seq = nvl(transaction_batch_seq, wip_constants.ASSY_BATCH_SEQ)
2154: where transaction_header_id = p_txnHeaderID
2155: and transaction_action_id = wip_constants.scrassy_action
2156: and upper(nvl(flow_schedule, 'N')) = 'Y'
2157: and transaction_source_type_id = 5;
2158:
2159:

Line 2205: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,

2201: where transaction_header_id = p_txnHeaderID
2202: and process_flag = 1
2203: and transaction_source_type_id = 5
2204: and upper(nvl(flow_schedule, 'N')) = 'Y'
2205: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
2206: WIP_CONSTANTS.CPLASSY_ACTION,
2207: WIP_CONSTANTS.RETASSY_ACTION)
2208: and nvl(scheduled_flag, -1) not in (1, 2);
2209:

Line 2206: WIP_CONSTANTS.CPLASSY_ACTION,

2202: and process_flag = 1
2203: and transaction_source_type_id = 5
2204: and upper(nvl(flow_schedule, 'N')) = 'Y'
2205: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
2206: WIP_CONSTANTS.CPLASSY_ACTION,
2207: WIP_CONSTANTS.RETASSY_ACTION)
2208: and nvl(scheduled_flag, -1) not in (1, 2);
2209:
2210:

Line 2207: WIP_CONSTANTS.RETASSY_ACTION)

2203: and transaction_source_type_id = 5
2204: and upper(nvl(flow_schedule, 'N')) = 'Y'
2205: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
2206: WIP_CONSTANTS.CPLASSY_ACTION,
2207: WIP_CONSTANTS.RETASSY_ACTION)
2208: and nvl(scheduled_flag, -1) not in (1, 2);
2209:
2210:
2211: -- validate transaction source name if provided, we won't do

Line 2279: and transaction_action_id = WIP_CONSTANTS.SCRASSY_ACTION

2275: error_explanation = l_errMsg
2276: where transaction_header_id = p_txnHeaderID
2277: and process_flag = 1
2278: and transaction_source_type_id = 5
2279: and transaction_action_id = WIP_CONSTANTS.SCRASSY_ACTION
2280: and upper(nvl(flow_schedule, 'N')) <> 'Y';
2281:
2282:
2283: -- validate transaction source id

Line 2400: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,

2396: and we.wip_entity_id = mti.transaction_source_id)
2397: where transaction_header_id = p_txnHeaderID
2398: and transaction_source_type_id = 5
2399: and process_flag = 1
2400: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
2401: WIP_CONSTANTS.CPLASSY_ACTION,
2402: WIP_CONSTANTS.RETASSY_ACTION)
2403: and transaction_source_id is not null;
2404:

Line 2401: WIP_CONSTANTS.CPLASSY_ACTION,

2397: where transaction_header_id = p_txnHeaderID
2398: and transaction_source_type_id = 5
2399: and process_flag = 1
2400: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
2401: WIP_CONSTANTS.CPLASSY_ACTION,
2402: WIP_CONSTANTS.RETASSY_ACTION)
2403: and transaction_source_id is not null;
2404:
2405:

Line 2402: WIP_CONSTANTS.RETASSY_ACTION)

2398: and transaction_source_type_id = 5
2399: and process_flag = 1
2400: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
2401: WIP_CONSTANTS.CPLASSY_ACTION,
2402: WIP_CONSTANTS.RETASSY_ACTION)
2403: and transaction_source_id is not null;
2404:
2405:
2406: if(l_logLevel <= wip_constants.full_logging) then

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

2402: WIP_CONSTANTS.RETASSY_ACTION)
2403: and transaction_source_id is not null;
2404:
2405:
2406: if(l_logLevel <= wip_constants.full_logging) then
2407: wip_logger.log('about to fetch records for name -> item derivation', l_returnStatus);
2408: end if;
2409: --item id from name
2410: open c_itemTxns;

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

2424: end if;
2425:
2426: for i in 1..l_orgIDTbl.count loop
2427: if(l_itemIDTbl(i) is null) then
2428: if(l_logLevel <= wip_constants.full_logging) then
2429: wip_logger.log('about to derive item id from name', l_returnStatus);
2430: end if;
2431: if(not inv_txn_manager_grp.getitemid(x_itemID => l_itemIDTbl(i),
2432: p_orgID => l_orgIDTbl(i),

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

2431: if(not inv_txn_manager_grp.getitemid(x_itemID => l_itemIDTbl(i),
2432: p_orgID => l_orgIDTbl(i),
2433: p_rowid => l_rowidTbl(i))) then
2434: l_itemIDTbl(i) := null;--let inventory error out later
2435: if(l_logLevel <= wip_constants.full_logging) then
2436: wip_logger.log('item id from name derivation failed', l_returnStatus);
2437: end if;
2438: elsif(l_logLevel <= wip_constants.full_logging) then
2439: wip_logger.log('item id' || l_itemIDTbl(i), l_returnStatus);

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

2434: l_itemIDTbl(i) := null;--let inventory error out later
2435: if(l_logLevel <= wip_constants.full_logging) then
2436: wip_logger.log('item id from name derivation failed', l_returnStatus);
2437: end if;
2438: elsif(l_logLevel <= wip_constants.full_logging) then
2439: wip_logger.log('item id' || l_itemIDTbl(i), l_returnStatus);
2440: end if;
2441: end if;
2442:

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

2457: and it.organization_id = sub.organization_id
2458: and mp.organization_id = sub.organization_id
2459: and mp.organization_id = it.organization_id;
2460:
2461: if(l_logLevel <= wip_constants.full_logging) then
2462: wip_logger.log('about to derive locator id from name', l_returnStatus);
2463: end if;
2464: if(not inv_txn_manager_grp.getlocid(x_locID => l_locIDTbl(i),
2465: p_org_id => l_orgIDTbl(i),

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

2466: p_subinv => l_subCodeTbl(i),
2467: p_rowid => l_rowidTbl(i),
2468: p_locCtrl => l_locCtrl)) then
2469: l_locIDTbl(i) := null; --let inventory error out later
2470: if(l_logLevel <= wip_constants.full_logging) then
2471: wip_logger.log('locator id from name derivation failed', l_returnStatus);
2472: end if;
2473: end if;
2474: end if;

Line 2511: and process_flag = wip_constants.mti_inventory;

2507: where transaction_header_id = p_txnHeaderID
2508: and transaction_source_type_id = 5
2509: and locator_id is not null
2510: and project_id is null
2511: and process_flag = wip_constants.mti_inventory;
2512: */
2513:
2514: -- validate inventory item id
2515: fnd_message.set_name('INV', 'INV_INT_ITMCODE');

Line 2577: and wip_entity_type in (wip_constants.discrete,

2573: and organization_id = mti.organization_id)
2574: where transaction_header_id = p_txnHeaderID
2575: and process_flag = 1
2576: and transaction_source_type_id = 5
2577: and wip_entity_type in (wip_constants.discrete,
2578: wip_constants.lotbased,
2579: wip_constants.eam);
2580:
2581: --derive the source project id/task id for flow schedules

Line 2578: wip_constants.lotbased,

2574: where transaction_header_id = p_txnHeaderID
2575: and process_flag = 1
2576: and transaction_source_type_id = 5
2577: and wip_entity_type in (wip_constants.discrete,
2578: wip_constants.lotbased,
2579: wip_constants.eam);
2580:
2581: --derive the source project id/task id for flow schedules
2582: update mtl_transactions_interface mti

Line 2579: wip_constants.eam);

2575: and process_flag = 1
2576: and transaction_source_type_id = 5
2577: and wip_entity_type in (wip_constants.discrete,
2578: wip_constants.lotbased,
2579: wip_constants.eam);
2580:
2581: --derive the source project id/task id for flow schedules
2582: update mtl_transactions_interface mti
2583: set last_update_date = sysdate,

Line 2600: and wip_entity_type = wip_constants.flow;

2596: where transaction_header_id = p_txnHeaderID
2597: and process_flag = 1
2598: and transaction_source_type_id = 5
2599: and transaction_source_id is not null
2600: and wip_entity_type = wip_constants.flow;
2601:
2602:
2603:
2604: -- make sure that flow_schedule flag is 'N' or NULL for job/repetitive and

Line 2648: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,

2644: and process_flag = 1
2645: and transaction_source_type_id = 5
2646: and wip_entity_type = 4
2647: and transaction_source_id is not null
2648: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
2649: WIP_CONSTANTS.CPLASSY_ACTION)
2650: and exists (select 1
2651: from wip_flow_schedules wfs
2652: where wfs.organization_id = mti.organization_id

Line 2649: WIP_CONSTANTS.CPLASSY_ACTION)

2645: and transaction_source_type_id = 5
2646: and wip_entity_type = 4
2647: and transaction_source_id is not null
2648: and transaction_action_id in (WIP_CONSTANTS.SCRASSY_ACTION,
2649: WIP_CONSTANTS.CPLASSY_ACTION)
2650: and exists (select 1
2651: from wip_flow_schedules wfs
2652: where wfs.organization_id = mti.organization_id
2653: and wfs.wip_entity_id = mti.transaction_source_id

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

2652: where wfs.organization_id = mti.organization_id
2653: and wfs.wip_entity_id = mti.transaction_source_id
2654: and wfs.status = 2);
2655:
2656: if (l_logLevel <= wip_constants.trace_logging) then
2657: wip_logger.exitPoint(p_procName => 'wip_mti_pub.doPreProcessingValidations',
2658: p_procReturnStatus => x_returnStatus,
2659: p_msg => 'normal completion',
2660: x_returnStatus => l_returnStatus);

Line 2680: and process_flag = wip_constants.mti_inventory;

2676: error_code = 'wip_mti_pub.doPreProcessingValidations',
2677: error_explanation = l_errMsg
2678: where transaction_header_id = p_txnHeaderID
2679: and transaction_source_type_id = 5
2680: and process_flag = wip_constants.mti_inventory;
2681:
2682: if(l_logLevel <= wip_constants.trace_logging) then
2683: wip_logger.exitPoint(p_procName => 'wip_mti_pub.doPreProcessingValidations',
2684: p_procReturnStatus => x_returnStatus,

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

2678: where transaction_header_id = p_txnHeaderID
2679: and transaction_source_type_id = 5
2680: and process_flag = wip_constants.mti_inventory;
2681:
2682: if(l_logLevel <= wip_constants.trace_logging) then
2683: wip_logger.exitPoint(p_procName => 'wip_mti_pub.doPreProcessingValidations',
2684: p_procReturnStatus => x_returnStatus,
2685: p_msg => 'unexpected error: ' || SQLERRM,
2686: x_returnStatus => l_returnStatus); --discard logging return status

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

2702: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
2703: begin
2704: x_returnStatus := fnd_api.g_ret_sts_success;
2705:
2706: if(l_logLevel <= wip_constants.trace_logging) then
2707: l_params(1).paramName := 'p_txnHeaderID';
2708: l_params(1).paramValue := p_txnHeaderID;
2709: l_params(2).paramName := 'p_txnBatchID';
2710: l_params(2).paramValue := p_txnBatchID;

Line 2721: and process_flag = wip_constants.mti_error);

2717: where transaction_temp_id in (select transaction_interface_id
2718: from mtl_transactions_interface
2719: where transaction_header_id = p_txnHeaderID
2720: and transaction_batch_id = p_txnBatchID
2721: and process_flag = wip_constants.mti_error);
2722:
2723: if(l_logLevel <= wip_constants.full_logging) then
2724: wip_logger.log('deleted ' || SQL%ROWCOUNT || ' pre-allocations', l_retStatus);
2725: end if;

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

2719: where transaction_header_id = p_txnHeaderID
2720: and transaction_batch_id = p_txnBatchID
2721: and process_flag = wip_constants.mti_error);
2722:
2723: if(l_logLevel <= wip_constants.full_logging) then
2724: wip_logger.log('deleted ' || SQL%ROWCOUNT || ' pre-allocations', l_retStatus);
2725: end if;
2726:
2727: --fetch all errored components

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

2740: from mtl_transactions_interface mti,
2741: mtl_system_items_kfv msik
2742: where mti.transaction_header_id = p_txnHeaderID
2743: and mti.transaction_batch_id = p_txnBatchID
2744: and mti.transaction_action_id in (wip_constants.isscomp_action, wip_constants.retcomp_action,
2745: wip_constants.issnegc_action, wip_constants.retnegc_action)
2746: and upper(nvl(mti.flow_schedule,'N')) <> 'Y'
2747: and ( mti.completion_transaction_id is not null
2748: or mti.move_transaction_id is not null)

Line 2745: wip_constants.issnegc_action, wip_constants.retnegc_action)

2741: mtl_system_items_kfv msik
2742: where mti.transaction_header_id = p_txnHeaderID
2743: and mti.transaction_batch_id = p_txnBatchID
2744: and mti.transaction_action_id in (wip_constants.isscomp_action, wip_constants.retcomp_action,
2745: wip_constants.issnegc_action, wip_constants.retnegc_action)
2746: and upper(nvl(mti.flow_schedule,'N')) <> 'Y'
2747: and ( mti.completion_transaction_id is not null
2748: or mti.move_transaction_id is not null)
2749: and mti.process_flag = wip_constants.mti_error

Line 2749: and mti.process_flag = wip_constants.mti_error

2745: wip_constants.issnegc_action, wip_constants.retnegc_action)
2746: and upper(nvl(mti.flow_schedule,'N')) <> 'Y'
2747: and ( mti.completion_transaction_id is not null
2748: or mti.move_transaction_id is not null)
2749: and mti.process_flag = wip_constants.mti_error
2750: and mti.error_explanation is not null --records that caused errors have err expl
2751: and mti.inventory_item_id = msik.inventory_item_id
2752: and mti.organization_id = msik.organization_id;
2753:

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

2754: --delete all errored backflush components
2755: delete mtl_transactions_interface
2756: where transaction_header_id = p_txnHeaderID
2757: and transaction_batch_id = p_txnBatchID
2758: and transaction_action_id in (wip_constants.isscomp_action, wip_constants.retcomp_action,
2759: wip_constants.issnegc_action, wip_constants.retnegc_action)
2760: and upper(nvl(flow_schedule,'N')) <> 'Y'
2761: and ( completion_transaction_id is not null
2762: or move_transaction_id is not null)

Line 2759: wip_constants.issnegc_action, wip_constants.retnegc_action)

2755: delete mtl_transactions_interface
2756: where transaction_header_id = p_txnHeaderID
2757: and transaction_batch_id = p_txnBatchID
2758: and transaction_action_id in (wip_constants.isscomp_action, wip_constants.retcomp_action,
2759: wip_constants.issnegc_action, wip_constants.retnegc_action)
2760: and upper(nvl(flow_schedule,'N')) <> 'Y'
2761: and ( completion_transaction_id is not null
2762: or move_transaction_id is not null)
2763: and process_flag = wip_constants.mti_error;

Line 2763: and process_flag = wip_constants.mti_error;

2759: wip_constants.issnegc_action, wip_constants.retnegc_action)
2760: and upper(nvl(flow_schedule,'N')) <> 'Y'
2761: and ( completion_transaction_id is not null
2762: or move_transaction_id is not null)
2763: and process_flag = wip_constants.mti_error;
2764:
2765: if(l_logLevel <= wip_constants.full_logging) then
2766: wip_logger.log('deleted ' || SQL%ROWCOUNT || ' backflush components', l_retStatus);
2767: end if;

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

2761: and ( completion_transaction_id is not null
2762: or move_transaction_id is not null)
2763: and process_flag = wip_constants.mti_error;
2764:
2765: if(l_logLevel <= wip_constants.full_logging) then
2766: wip_logger.log('deleted ' || SQL%ROWCOUNT || ' backflush components', l_retStatus);
2767: end if;
2768:
2769: --if any components failed update the parent with the error

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

2782: and transaction_batch_id = p_txnBatchID
2783: and transaction_source_type_id = 5
2784: and ( completion_transaction_id = l_cplTxnIDTbl(i)
2785: or move_transaction_id = l_movTxnIDTbl(i))
2786: and transaction_action_id in (wip_constants.cplassy_action, wip_constants.retassy_action);
2787:
2788: /*Bug 14802139: Calling below inventory API to release locks. this is an inventory request*/
2789: if(l_logLevel <= wip_constants.full_logging) then
2790: wip_logger.log('calling inventory api to release locks on MOQD', l_retStatus);

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

2785: or move_transaction_id = l_movTxnIDTbl(i))
2786: and transaction_action_id in (wip_constants.cplassy_action, wip_constants.retassy_action);
2787:
2788: /*Bug 14802139: Calling below inventory API to release locks. this is an inventory request*/
2789: if(l_logLevel <= wip_constants.full_logging) then
2790: wip_logger.log('calling inventory api to release locks on MOQD', l_retStatus);
2791: end if;
2792: inv_table_lock_pvt.release_locks(p_header_id => p_txnHeaderID);
2793: if(l_logLevel <= wip_constants.full_logging) then

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

2789: if(l_logLevel <= wip_constants.full_logging) then
2790: wip_logger.log('calling inventory api to release locks on MOQD', l_retStatus);
2791: end if;
2792: inv_table_lock_pvt.release_locks(p_header_id => p_txnHeaderID);
2793: if(l_logLevel <= wip_constants.full_logging) then
2794: wip_logger.log('done calling inventory api to release locks on MOQD', l_retStatus);
2795: end if;
2796:
2797: if (l_logLevel <= wip_constants.trace_logging) then

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

2793: if(l_logLevel <= wip_constants.full_logging) then
2794: wip_logger.log('done calling inventory api to release locks on MOQD', l_retStatus);
2795: end if;
2796:
2797: if (l_logLevel <= wip_constants.trace_logging) then
2798: wip_logger.exitPoint(p_procName => 'wip_mti_pub.postInvWIPProcessing',
2799: p_procReturnStatus => x_returnStatus,
2800: p_msg => 'success',
2801: x_returnStatus => l_retStatus); --discard logging return status

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

2804:
2805: exception
2806: when others then
2807: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2808: if(l_logLevel <= wip_constants.trace_logging) then
2809: wip_logger.exitPoint(p_procName => 'wip_mti_pub.postInvWIPProcessing',
2810: p_procReturnStatus => x_returnStatus,
2811: p_msg => 'unexpected error: ' || SQLERRM,
2812: x_returnStatus => l_retStatus); --discard logging return status