DBA Data[Home] [Help]

APPS.WIP_MOVPROC_PRIV dependencies on WIP_CONSTANTS

Line 98: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

94: /* End fix for bug 4891549 */
95: AND mmt.move_transaction_id = wmti.transaction_id
96: AND wmti.transaction_id = p_move_txn_id /* Fixed bug 4916939 */
97: AND wmti.group_id = p_gib.group_id
98: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
99: AND wmti.transaction_date = mmt.transaction_date /*Bug 5581147 - Added to improve selectivity*/
100: AND mmt.transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,
101: WIP_CONSTANTS.CPLASSY_ACTION);
102:

Line 100: AND mmt.transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,

96: AND wmti.transaction_id = p_move_txn_id /* Fixed bug 4916939 */
97: AND wmti.group_id = p_gib.group_id
98: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
99: AND wmti.transaction_date = mmt.transaction_date /*Bug 5581147 - Added to improve selectivity*/
100: AND mmt.transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,
101: WIP_CONSTANTS.CPLASSY_ACTION);
102:
103: CURSOR c_discAssembly IS
104: SELECT mmt.completion_transaction_id cpl_txn_id,

Line 101: WIP_CONSTANTS.CPLASSY_ACTION);

97: AND wmti.group_id = p_gib.group_id
98: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
99: AND wmti.transaction_date = mmt.transaction_date /*Bug 5581147 - Added to improve selectivity*/
100: AND mmt.transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,
101: WIP_CONSTANTS.CPLASSY_ACTION);
102:
103: CURSOR c_discAssembly IS
104: SELECT mmt.completion_transaction_id cpl_txn_id,
105: mmt.transaction_action_id txn_action_id,

Line 127: AND wmti.entity_type = WIP_CONSTANTS.DISCRETE

123: AND mmt.move_transaction_id = wmti.transaction_id
124: AND wmti.transaction_id = p_move_txn_id /* Fixed bug 4916939 */
125: AND wmti.group_id = p_gib.group_id
126: AND wmti.transaction_date = mmt.transaction_date /*Bug 5581147 - Added to improve selectivity*/
127: AND wmti.entity_type = WIP_CONSTANTS.DISCRETE
128: AND mmt.transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,
129: WIP_CONSTANTS.CPLASSY_ACTION);
130:
131: /*Bug 12942986: Because of fix 4343850 in wipmovpb.pls asembly completion record gets committed in MMTT.

Line 128: AND mmt.transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,

124: AND wmti.transaction_id = p_move_txn_id /* Fixed bug 4916939 */
125: AND wmti.group_id = p_gib.group_id
126: AND wmti.transaction_date = mmt.transaction_date /*Bug 5581147 - Added to improve selectivity*/
127: AND wmti.entity_type = WIP_CONSTANTS.DISCRETE
128: AND mmt.transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,
129: WIP_CONSTANTS.CPLASSY_ACTION);
130:
131: /*Bug 12942986: Because of fix 4343850 in wipmovpb.pls asembly completion record gets committed in MMTT.
132: Now if process fails after that, then MMTT will have that record and everything else will be rollback.

Line 129: WIP_CONSTANTS.CPLASSY_ACTION);

125: AND wmti.group_id = p_gib.group_id
126: AND wmti.transaction_date = mmt.transaction_date /*Bug 5581147 - Added to improve selectivity*/
127: AND wmti.entity_type = WIP_CONSTANTS.DISCRETE
128: AND mmt.transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,
129: WIP_CONSTANTS.CPLASSY_ACTION);
130:
131: /*Bug 12942986: Because of fix 4343850 in wipmovpb.pls asembly completion record gets committed in MMTT.
132: Now if process fails after that, then MMTT will have that record and everything else will be rollback.
133: Thus when the process is re-submitted assy_pull components need to be backflushed. Before this fix they

Line 159: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,

155: AND mmtt.organization_id = wmti.organization_id
156: AND wmti.transaction_id = p_move_txn_id
157: AND wmti.group_id = p_gib.group_id /* Fixed bug 4744110 */
158: AND wmti.transaction_date = mmtt.transaction_date /*Bug 5466203 - Added to improve selectivity*/
159: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
160: WIP_CONSTANTS.LOTBASED)
161: AND mmtt.transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,
162: WIP_CONSTANTS.CPLASSY_ACTION);
163:

Line 160: WIP_CONSTANTS.LOTBASED)

156: AND wmti.transaction_id = p_move_txn_id
157: AND wmti.group_id = p_gib.group_id /* Fixed bug 4744110 */
158: AND wmti.transaction_date = mmtt.transaction_date /*Bug 5466203 - Added to improve selectivity*/
159: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
160: WIP_CONSTANTS.LOTBASED)
161: AND mmtt.transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,
162: WIP_CONSTANTS.CPLASSY_ACTION);
163:
164: CURSOR c_OSFMAssembly IS

Line 161: AND mmtt.transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,

157: AND wmti.group_id = p_gib.group_id /* Fixed bug 4744110 */
158: AND wmti.transaction_date = mmtt.transaction_date /*Bug 5466203 - Added to improve selectivity*/
159: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
160: WIP_CONSTANTS.LOTBASED)
161: AND mmtt.transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,
162: WIP_CONSTANTS.CPLASSY_ACTION);
163:
164: CURSOR c_OSFMAssembly IS
165: SELECT mmt.completion_transaction_id cpl_txn_id,

Line 162: WIP_CONSTANTS.CPLASSY_ACTION);

158: AND wmti.transaction_date = mmtt.transaction_date /*Bug 5466203 - Added to improve selectivity*/
159: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
160: WIP_CONSTANTS.LOTBASED)
161: AND mmtt.transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,
162: WIP_CONSTANTS.CPLASSY_ACTION);
163:
164: CURSOR c_OSFMAssembly IS
165: SELECT mmt.completion_transaction_id cpl_txn_id,
166: mmt.transaction_action_id txn_action_id,

Line 194: AND wmti.entity_type = WIP_CONSTANTS.LOTBASED

190: AND mmt.move_transaction_id = wmti.transaction_id
191: AND wmti.transaction_id = p_move_txn_id /* Fixed bug 4916939 */
192: AND wmti.group_id = p_gib.group_id
193: AND wmti.transaction_date = mmt.transaction_date /*Bug 5581147 - Added to improve selectivity*/
194: AND wmti.entity_type = WIP_CONSTANTS.LOTBASED
195: AND mmt.transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,
196: WIP_CONSTANTS.CPLASSY_ACTION);
197:
198: l_repAssembly c_repAssembly%ROWTYPE;

Line 195: AND mmt.transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,

191: AND wmti.transaction_id = p_move_txn_id /* Fixed bug 4916939 */
192: AND wmti.group_id = p_gib.group_id
193: AND wmti.transaction_date = mmt.transaction_date /*Bug 5581147 - Added to improve selectivity*/
194: AND wmti.entity_type = WIP_CONSTANTS.LOTBASED
195: AND mmt.transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,
196: WIP_CONSTANTS.CPLASSY_ACTION);
197:
198: l_repAssembly c_repAssembly%ROWTYPE;
199: l_discAssembly c_discAssembly%ROWTYPE;

Line 196: WIP_CONSTANTS.CPLASSY_ACTION);

192: AND wmti.group_id = p_gib.group_id
193: AND wmti.transaction_date = mmt.transaction_date /*Bug 5581147 - Added to improve selectivity*/
194: AND wmti.entity_type = WIP_CONSTANTS.LOTBASED
195: AND mmt.transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,
196: WIP_CONSTANTS.CPLASSY_ACTION);
197:
198: l_repAssembly c_repAssembly%ROWTYPE;
199: l_discAssembly c_discAssembly%ROWTYPE;
200: l_OSFMAssembly c_OSFMAssembly%ROWTYPE;

Line 213: IF (l_logLevel <= wip_constants.trace_logging) THEN

209: l_error_msg VARCHAR2(1000);
210: l_error_count NUMBER;
211: BEGIN
212: -- write parameter value to log file
213: IF (l_logLevel <= wip_constants.trace_logging) THEN
214: l_params(1).paramName := 'p_group_id';
215: l_params(1).paramValue := p_gib.group_id;
216: l_params(2).paramName := 'p_mtl_header_id';
217: l_params(2).paramValue := p_gib.mtl_header_id;

Line 230: IF(p_entity_type = WIP_CONSTANTS.REPETITIVE) THEN

226: wip_logger.entryPoint(p_procName =>'wip_movProc_priv.backflush_assy_pull',
227: p_params => l_params,
228: x_returnStatus => l_returnStatus);
229: END IF;
230: IF(p_entity_type = WIP_CONSTANTS.REPETITIVE) THEN
231: FOR l_repAssembly IN c_repAssembly LOOP
232: wip_bflProc_priv.backflush(
233: p_wipEntityID => l_repAssembly.txn_src_id,
234: p_orgID => l_repAssembly.org_id,

Line 242: p_entityType => WIP_CONSTANTS.REPETITIVE,

238: -- Fixed bug 5056289. Pass move_id as a batch_id because we want
239: -- inventory to fail only components related to a specific move record.
240: p_batchID => p_move_txn_id,
241: p_txnType => l_repAssembly.txn_type,
242: p_entityType => WIP_CONSTANTS.REPETITIVE,
243: p_tblName => WIP_CONSTANTS.MTI_TBL,
244: p_lineID => l_repAssembly.rep_line_id,
245: p_cplTxnID => l_repAssembly.cpl_txn_id,
246: -- Fixed bug 5014211. Stamp move_transaction_id for assembly

Line 243: p_tblName => WIP_CONSTANTS.MTI_TBL,

239: -- inventory to fail only components related to a specific move record.
240: p_batchID => p_move_txn_id,
241: p_txnType => l_repAssembly.txn_type,
242: p_entityType => WIP_CONSTANTS.REPETITIVE,
243: p_tblName => WIP_CONSTANTS.MTI_TBL,
244: p_lineID => l_repAssembly.rep_line_id,
245: p_cplTxnID => l_repAssembly.cpl_txn_id,
246: -- Fixed bug 5014211. Stamp move_transaction_id for assembly
247: -- pull components so that we will have a link if component

Line 251: p_fmMoveProcessor => WIP_CONSTANTS.YES,

247: -- pull components so that we will have a link if component
248: -- records fail inventory validation.
249: p_movTxnID => l_repAssembly.move_txn_id,
250: -- End fix of 5014211.
251: p_fmMoveProcessor => WIP_CONSTANTS.YES,
252: p_mtlTxnMode => p_gib.mtl_mode,
253: p_reasonID => l_repAssembly.reason_id,
254: p_reference => l_repAssembly.reference,
255: -- Set lock_flag to 1 to prevent inventory worker pick up the record.

Line 257: p_lockFlag => WIP_CONSTANTS.YES,

253: p_reasonID => l_repAssembly.reason_id,
254: p_reference => l_repAssembly.reference,
255: -- Set lock_flag to 1 to prevent inventory worker pick up the record.
256: -- Need this change because we will commit after each TM call.
257: p_lockFlag => WIP_CONSTANTS.YES,
258: x_lotSerRequired => l_ls_required,
259: x_bfRequired => l_bf_required,
260: x_returnStatus => l_returnStatus);
261:

Line 265: IF(l_ls_required = WIP_CONSTANTS.YES) THEN

261:
262: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
263: raise fnd_api.g_exc_unexpected_error;
264: ELSE
265: IF(l_ls_required = WIP_CONSTANTS.YES) THEN
266: -- If we need to gather more lot/serial, error out because
267: -- we cannot gather lot/serial for background transaction.
268: fnd_message.set_name('WIP', 'WIP_NO_LOT_SER_COMP_BKGND');
269: fnd_msg_pub.add;

Line 274: ELSIF(p_entity_type = WIP_CONSTANTS.DISCRETE) THEN

270: raise fnd_api.g_exc_unexpected_error;
271: END IF;
272: END IF; -- check return status
273: END LOOP; -- repetitive schedule
274: ELSIF(p_entity_type = WIP_CONSTANTS.DISCRETE) THEN
275: FOR l_discAssembly IN c_discAssembly LOOP
276: wip_logger.log('Backflush from MMT for txn_src_id: ' || l_discAssembly.txn_src_id, l_returnStatus);
277: wip_bflProc_priv.backflush(
278: p_wipEntityID => l_discAssembly.txn_src_id,

Line 288: p_tblName => WIP_CONSTANTS.MTI_TBL,

284: -- inventory to fail only components related to a specific move record.
285: p_batchID => p_move_txn_id,
286: p_txnType => l_discAssembly.txn_type,
287: p_entityType => l_discAssembly.entity_type,
288: p_tblName => WIP_CONSTANTS.MTI_TBL,
289: p_cplTxnID => l_discAssembly.cpl_txn_id,
290: -- Fixed bug 5014211. Stamp move_transaction_id for assembly
291: -- pull components so that we will have a link if component
292: -- records fail inventory validation.

Line 295: p_fmMoveProcessor => WIP_CONSTANTS.YES,

291: -- pull components so that we will have a link if component
292: -- records fail inventory validation.
293: p_movTxnID => l_discAssembly.move_txn_id,
294: -- End fix of 5014211.
295: p_fmMoveProcessor => WIP_CONSTANTS.YES,
296: p_mtlTxnMode => p_gib.mtl_mode,
297: p_reasonID => l_discAssembly.reason_id,
298: p_reference => l_discAssembly.reference,
299: -- Set lock_flag to 1 to prevent inventory worker pick up the record.

Line 301: p_lockFlag => WIP_CONSTANTS.YES,

297: p_reasonID => l_discAssembly.reason_id,
298: p_reference => l_discAssembly.reference,
299: -- Set lock_flag to 1 to prevent inventory worker pick up the record.
300: -- Need this change because we will commit after each TM call.
301: p_lockFlag => WIP_CONSTANTS.YES,
302: x_lotSerRequired => l_ls_required,
303: x_bfRequired => l_bf_required,
304: x_returnStatus => l_returnStatus);
305:

Line 309: IF(l_ls_required = WIP_CONSTANTS.YES) THEN

305:
306: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
307: raise fnd_api.g_exc_unexpected_error;
308: ELSE
309: IF(l_ls_required = WIP_CONSTANTS.YES) THEN
310: -- If we need to gather more lot/serial, error out because
311: -- we cannot gather lot/serial for background transaction.
312: fnd_message.set_name('WIP', 'WIP_NO_LOT_SER_COMP_BKGND');
313: fnd_msg_pub.add;

Line 337: p_tblName => WIP_CONSTANTS.MTI_TBL,

333: -- inventory to fail only components related to a specific move record.
334: p_batchID => p_move_txn_id,
335: p_txnType => l_discAssembly.txn_type,
336: p_entityType => l_discAssembly.entity_type,
337: p_tblName => WIP_CONSTANTS.MTI_TBL,
338: p_cplTxnID => l_discAssembly.cpl_txn_id,
339: -- Fixed bug 4865234. Stamp move_transaction_id for assembly
340: -- pull components so that we will have a link if component
341: -- records fail inventory validation.

Line 343: p_fmMoveProcessor => WIP_CONSTANTS.YES,

339: -- Fixed bug 4865234. Stamp move_transaction_id for assembly
340: -- pull components so that we will have a link if component
341: -- records fail inventory validation.
342: p_movTxnID => l_discAssembly.move_txn_id,
343: p_fmMoveProcessor => WIP_CONSTANTS.YES,
344: p_mtlTxnMode => p_gib.mtl_mode,
345: p_reasonID => l_discAssembly.reason_id,
346: p_reference => l_discAssembly.reference,
347: -- Set lock_flag to 1 to prevent inventory worker pick up the record.

Line 349: p_lockFlag => WIP_CONSTANTS.YES,

345: p_reasonID => l_discAssembly.reason_id,
346: p_reference => l_discAssembly.reference,
347: -- Set lock_flag to 1 to prevent inventory worker pick up the record.
348: -- Need this change because we will commit after each TM call.
349: p_lockFlag => WIP_CONSTANTS.YES,
350: x_lotSerRequired => l_ls_required,
351: x_bfRequired => l_bf_required,
352: x_returnStatus => l_returnStatus);
353:

Line 357: IF(l_ls_required = WIP_CONSTANTS.YES) THEN

353:
354: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
355: raise fnd_api.g_exc_unexpected_error;
356: ELSE
357: IF(l_ls_required = WIP_CONSTANTS.YES) THEN
358: -- If we need to gather more lot/serial, error out because
359: -- we cannot gather lot/serial for background transaction.
360: fnd_message.set_name('WIP', 'WIP_NO_LOT_SER_COMP_BKGND');
361: fnd_msg_pub.add;

Line 366: ELSIF(p_entity_type = WIP_CONSTANTS.LOTBASED) THEN

362: raise fnd_api.g_exc_unexpected_error;
363: END IF;
364: END IF; -- check return status
365: END LOOP; -- Discrete (MMTT)
366: ELSIF(p_entity_type = WIP_CONSTANTS.LOTBASED) THEN
367: FOR l_OSFMAssembly IN c_OSFMAssembly LOOP
368: wsm_serial_support_grp.backflush_comp(
369: p_wipEntityID => l_OSFMAssembly.txn_src_id,
370: p_orgID => l_OSFMAssembly.org_id,

Line 397: IF(l_ls_required = WIP_CONSTANTS.YES) THEN

393:
394: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
395: raise fnd_api.g_exc_unexpected_error;
396: ELSE
397: IF(l_ls_required = WIP_CONSTANTS.YES) THEN
398: -- If we need to gather more lot/serial, error out because
399: -- we cannot gather lot/serial for background transaction.
400: fnd_message.set_name('WIP', 'WIP_NO_LOT_SER_COMP_BKGND');
401: fnd_msg_pub.add;

Line 408: IF (l_logLevel <= wip_constants.trace_logging) THEN

404: END IF; -- check return status
405: END LOOP; -- OSFM
406: END IF; -- entity_type check
407: -- write to the log file
408: IF (l_logLevel <= wip_constants.trace_logging) THEN
409: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.backflush_assy_pull',
410: p_procReturnStatus => 'S',
411: p_msg => 'procedure complete',
412: x_returnStatus => l_returnStatus);

Line 431: IF (l_logLevel <= wip_constants.trace_logging) THEN

427: l_msg VARCHAR(240);
428: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
429: BEGIN
430: -- write parameter value to log file
431: IF (l_logLevel <= wip_constants.trace_logging) THEN
432: l_params(1).paramName := 'p_mtl_header_id';
433: l_params(1).paramValue := p_mtl_header_id;
434: l_params(2).paramName := 'p_group_id';
435: l_params(2).paramValue := p_group_id;

Line 443: SET wmti.process_status = WIP_CONSTANTS.ERROR

439: END IF;
440: -- Update status of move record to error if components fail inventory
441: -- validation.
442: UPDATE wip_move_txn_interface wmti
443: SET wmti.process_status = WIP_CONSTANTS.ERROR
444: WHERE wmti.group_id = p_group_id
445: AND EXISTS
446: (SELECT 1
447: FROM mtl_transactions_interface mti

Line 452: IF (l_logLevel <= wip_constants.full_logging) THEN

448: WHERE mti.transaction_header_id = p_mtl_header_id
449: AND mti.move_transaction_id = wmti.transaction_id
450: AND mti.error_explanation IS NOT NULL);
451:
452: IF (l_logLevel <= wip_constants.full_logging) THEN
453: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');
454: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
455: fnd_message.set_token('ENTITY2', 'WIP_MOVE_TXN_INTERFACE');
456: l_msg := fnd_message.get;

Line 477: IF (l_logLevel <= wip_constants.full_logging) THEN

473: FROM mtl_transactions_interface mti
474: WHERE mti.move_transaction_id = mmtt.move_transaction_id
475: AND mti.transaction_header_id = p_mtl_header_id));
476:
477: IF (l_logLevel <= wip_constants.full_logging) THEN
478: l_msg := SQL%ROWCOUNT ||
479: ' rows deleted from mtl_transaction_lots_temp';
480: wip_logger.log(p_msg => l_msg,
481: x_returnStatus => l_returnStatus);

Line 493: IF (l_logLevel <= wip_constants.full_logging) THEN

489: FROM mtl_transactions_interface mti
490: WHERE mti.move_transaction_id = mmtt.move_transaction_id
491: AND mti.transaction_header_id = p_mtl_header_id);
492:
493: IF (l_logLevel <= wip_constants.full_logging) THEN
494: l_msg := SQL%ROWCOUNT ||
495: ' rows deleted from mtl_material_transactions_temp';
496: wip_logger.log(p_msg => l_msg,
497: x_returnStatus => l_returnStatus);

Line 507: IF (l_logLevel <= wip_constants.full_logging) THEN

503: (SELECT mti.transaction_interface_id
504: FROM mtl_transactions_interface mti
505: WHERE mti.transaction_header_id = p_mtl_header_id);
506:
507: IF (l_logLevel <= wip_constants.full_logging) THEN
508: l_msg := SQL%ROWCOUNT ||
509: ' rows deleted from mtl_transaction_lots_interface';
510: wip_logger.log(p_msg => l_msg,
511: x_returnStatus => l_returnStatus);

Line 518: IF (l_logLevel <= wip_constants.full_logging) THEN

514: -- Delete error records from MTI
515: DELETE FROM mtl_transactions_interface
516: WHERE transaction_header_id = p_mtl_header_id;
517:
518: IF (l_logLevel <= wip_constants.full_logging) THEN
519: l_msg := SQL%ROWCOUNT ||
520: ' rows deleted from mtl_transactions_interface';
521: wip_logger.log(p_msg => l_msg,
522: x_returnStatus => l_returnStatus);

Line 526: IF (l_logLevel <= wip_constants.trace_logging) THEN

522: x_returnStatus => l_returnStatus);
523: END IF;
524:
525: l_returnStatus := fnd_api.g_ret_sts_success;
526: IF (l_logLevel <= wip_constants.trace_logging) THEN
527: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.component_cleanup',
528: p_procReturnStatus => l_returnStatus,
529: p_msg => 'procedure complete',
530: x_returnStatus => l_returnStatus);

Line 620: IF (l_logLevel <= wip_constants.trace_logging) THEN

616: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
617: l_count NUMBER;
618: BEGIN
619: -- write parameter value to log file
620: IF (l_logLevel <= wip_constants.trace_logging) THEN
621: l_params(1).paramName := 'p_mtl_header_id';
622: l_params(1).paramValue := p_mtl_header_id;
623: wip_logger.entryPoint(p_procName =>'wip_movProc_priv.write_mtl_errors',
624: p_params => l_params,

Line 649: IF (l_logLevel <= wip_constants.full_logging) THEN

645: -- transactions. This will mislead both customer and developer if transaction
646: -- fail inventory validation code.
647: fnd_msg_pub.initialize;
648:
649: IF (l_logLevel <= wip_constants.full_logging) THEN
650: wip_logger.log(p_msg => l_count || ' records inserted',
651: x_returnStatus => l_returnStatus);
652: END IF;
653:

Line 655: IF (l_logLevel <= wip_constants.trace_logging) THEN

651: x_returnStatus => l_returnStatus);
652: END IF;
653:
654: l_returnStatus := fnd_api.g_ret_sts_success;
655: IF (l_logLevel <= wip_constants.trace_logging) THEN
656: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.write_mtl_errors',
657: p_procReturnStatus => l_returnStatus,
658: p_msg => 'procedure complete',
659: x_returnStatus => l_returnStatus);

Line 666: IF (l_logLevel <= wip_constants.trace_logging) THEN

662: WHEN others THEN
663: l_returnStatus := fnd_api.g_ret_sts_unexp_error;
664: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
665:
666: IF (l_logLevel <= wip_constants.trace_logging) THEN
667: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.write_mtl_errors',
668: p_procReturnStatus => l_returnStatus,
669: p_msg => l_errMsg,
670: x_returnStatus => l_returnStatus);

Line 697: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

693: WHERE wop.organization_id = wmti.organization_id
694: AND wop.wip_entity_id = wmti.wip_entity_id
695: AND wmti.group_id = p_group_id
696: AND TRUNC(wmti.transaction_date) = TRUNC(p_txn_date)
697: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
698: AND wmti.process_status = WIP_CONSTANTS.RUNNING
699: AND ((wop.operation_seq_num BETWEEN
700: wmti.fm_operation_seq_num AND wmti.to_operation_seq_num)
701: OR (wop.operation_seq_num BETWEEN

Line 698: AND wmti.process_status = WIP_CONSTANTS.RUNNING

694: AND wop.wip_entity_id = wmti.wip_entity_id
695: AND wmti.group_id = p_group_id
696: AND TRUNC(wmti.transaction_date) = TRUNC(p_txn_date)
697: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
698: AND wmti.process_status = WIP_CONSTANTS.RUNNING
699: AND ((wop.operation_seq_num BETWEEN
700: wmti.fm_operation_seq_num AND wmti.to_operation_seq_num)
701: OR (wop.operation_seq_num BETWEEN
702: wmti.to_operation_seq_num AND wmti.fm_operation_seq_num))

Line 705: AND NVL(wrs.status_type,-999) IN (-999, WIP_CONSTANTS.RELEASED,

701: OR (wop.operation_seq_num BETWEEN
702: wmti.to_operation_seq_num AND wmti.fm_operation_seq_num))
703: AND wop.organization_id = wrs.organization_id (+)
704: AND wop.repetitive_schedule_id = wrs.repetitive_schedule_id(+)
705: AND NVL(wrs.status_type,-999) IN (-999, WIP_CONSTANTS.RELEASED,
706: WIP_CONSTANTS.COMP_CHRG)
707: AND (( wmti.line_id = wrs.line_id
708: AND wmti.line_id IS NOT NULL
709: AND wop.repetitive_schedule_id IS NOT NULL)

Line 706: WIP_CONSTANTS.COMP_CHRG)

702: wmti.to_operation_seq_num AND wmti.fm_operation_seq_num))
703: AND wop.organization_id = wrs.organization_id (+)
704: AND wop.repetitive_schedule_id = wrs.repetitive_schedule_id(+)
705: AND NVL(wrs.status_type,-999) IN (-999, WIP_CONSTANTS.RELEASED,
706: WIP_CONSTANTS.COMP_CHRG)
707: AND (( wmti.line_id = wrs.line_id
708: AND wmti.line_id IS NOT NULL
709: AND wop.repetitive_schedule_id IS NOT NULL)
710: OR (wmti.line_id IS NULL))

Line 721: IF (l_logLevel <= wip_constants.trace_logging) THEN

717: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
718:
719: BEGIN
720: -- write parameter value to log file
721: IF (l_logLevel <= wip_constants.trace_logging) THEN
722: l_params(1).paramName := 'p_group_id';
723: l_params(1).paramValue := p_gib.group_id;
724: l_params(2).paramName := 'p_txn_date';
725: l_params(2).paramValue := p_gib.txn_date;

Line 740: IF (l_logLevel <= wip_constants.trace_logging) THEN

736: END IF;
737: x_returnStatus := fnd_api.g_ret_sts_success;
738:
739: -- write to the log file
740: IF (l_logLevel <= wip_constants.trace_logging) THEN
741: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.lock_wipops',
742: p_procReturnStatus => x_returnStatus,
743: p_msg => 'procedure complete',
744: x_returnStatus => l_returnStatus);

Line 748: WHEN wip_constants.records_locked THEN

744: x_returnStatus => l_returnStatus);
745: END IF;
746:
747: EXCEPTION
748: WHEN wip_constants.records_locked THEN
749: IF(c_wipops%ISOPEN) THEN
750: CLOSE c_wipops;
751: END IF;
752: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

Line 755: IF (l_logLevel <= wip_constants.trace_logging) THEN

751: END IF;
752: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
753: l_errMsg := 'Unable to lock the record in wip_operations';
754:
755: IF (l_logLevel <= wip_constants.trace_logging) THEN
756: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.lock_wipops',
757: p_procReturnStatus => x_returnStatus,
758: p_msg => l_errMsg,
759: x_returnStatus => l_returnStatus);

Line 771: IF (l_logLevel <= wip_constants.trace_logging) THEN

767: END IF;
768: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
769: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
770:
771: IF (l_logLevel <= wip_constants.trace_logging) THEN
772: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.lock_wipops',
773: p_procReturnStatus => x_returnStatus,
774: p_msg => l_errMsg,
775: x_returnStatus => l_returnStatus);

Line 836: AND wrs.status_type in (WIP_CONSTANTS.RELEASED, WIP_CONSTANTS.COMP_CHRG)

832: AND wo2.operation_seq_num = p_to_op
833: AND wrs.organization_id = p_org_id
834: AND wrs.wip_entity_id = p_wip_id
835: AND wrs.line_id = p_line_id
836: AND wrs.status_type in (WIP_CONSTANTS.RELEASED, WIP_CONSTANTS.COMP_CHRG)
837: AND wrs.date_released < p_txn_date
838: GROUP BY wrs.repetitive_schedule_id,
839: wo2.quantity_waiting_to_move,
840: wrs.quantity_completed,

Line 850: WIP_CONSTANTS.YES,NVL(wo1.first_unit_start_date,

846: wo1.quantity_scrapped,
847: wo1.first_unit_start_date,
848: wrs.first_unit_start_date
849: ORDER BY DECODE(p_forward,
850: WIP_CONSTANTS.YES,NVL(wo1.first_unit_start_date,
851: wrs.first_unit_start_date), -- no routing
852: NULL) ASC,
853: DECODE(p_forward,
854: WIP_CONSTANTS.NO, NVL(wo1.first_unit_start_date,

Line 854: WIP_CONSTANTS.NO, NVL(wo1.first_unit_start_date,

850: WIP_CONSTANTS.YES,NVL(wo1.first_unit_start_date,
851: wrs.first_unit_start_date), -- no routing
852: NULL) ASC,
853: DECODE(p_forward,
854: WIP_CONSTANTS.NO, NVL(wo1.first_unit_start_date,
855: wrs.first_unit_start_date), -- no routing
856: NULL) DESC;
857:
858: l_rsa c_rsa%ROWTYPE;

Line 873: IF (l_logLevel <= wip_constants.trace_logging) THEN

869: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
870:
871: BEGIN
872: -- write parameter value to log file
873: IF (l_logLevel <= wip_constants.trace_logging) THEN
874: l_params(1).paramName := 'p_org_id';
875: l_params(1).paramValue := p_org_id;
876: l_params(2).paramName := 'p_wip_id';
877: l_params(2).paramValue := p_wip_id;

Line 908: l_forward := WIP_CONSTANTS.YES;

904: x_sche_count := 0;
905:
906: IF(p_fm_op < p_to_op) OR
907: (p_fm_op = p_to_op AND p_fm_step <= p_to_step) THEN
908: l_forward := WIP_CONSTANTS.YES;
909: ELSE
910: l_forward := WIP_CONSTANTS.NO;
911: END IF;
912:

Line 910: l_forward := WIP_CONSTANTS.NO;

906: IF(p_fm_op < p_to_op) OR
907: (p_fm_op = p_to_op AND p_fm_step <= p_to_step) THEN
908: l_forward := WIP_CONSTANTS.YES;
909: ELSE
910: l_forward := WIP_CONSTANTS.NO;
911: END IF;
912:
913: OPEN c_rsa(l_forward);
914: WHILE l_need_more LOOP

Line 923: IF(p_txnType = WIP_CONSTANTS.RET_TXN AND

919: ELSE
920: l_recordFound := l_recordFound + 1;
921: l_scheID := l_rsa.scheID;
922:
923: IF(p_txnType = WIP_CONSTANTS.RET_TXN AND
924: p_fm_form = WIP_CONSTANTS.YES) THEN
925: l_cur_qty := l_rsa.completedQty;
926: ELSE
927: IF (p_fm_step = WIP_CONSTANTS.QUEUE) THEN

Line 924: p_fm_form = WIP_CONSTANTS.YES) THEN

920: l_recordFound := l_recordFound + 1;
921: l_scheID := l_rsa.scheID;
922:
923: IF(p_txnType = WIP_CONSTANTS.RET_TXN AND
924: p_fm_form = WIP_CONSTANTS.YES) THEN
925: l_cur_qty := l_rsa.completedQty;
926: ELSE
927: IF (p_fm_step = WIP_CONSTANTS.QUEUE) THEN
928: l_cur_qty := NVL(l_rsa.queue_qty, 0);

Line 927: IF (p_fm_step = WIP_CONSTANTS.QUEUE) THEN

923: IF(p_txnType = WIP_CONSTANTS.RET_TXN AND
924: p_fm_form = WIP_CONSTANTS.YES) THEN
925: l_cur_qty := l_rsa.completedQty;
926: ELSE
927: IF (p_fm_step = WIP_CONSTANTS.QUEUE) THEN
928: l_cur_qty := NVL(l_rsa.queue_qty, 0);
929: ELSIF (p_fm_step = WIP_CONSTANTS.RUN) THEN
930: l_cur_qty := NVL(l_rsa.run_qty, 0);
931: ELSIF (p_fm_step = WIP_CONSTANTS.TOMOVE) THEN

Line 929: ELSIF (p_fm_step = WIP_CONSTANTS.RUN) THEN

925: l_cur_qty := l_rsa.completedQty;
926: ELSE
927: IF (p_fm_step = WIP_CONSTANTS.QUEUE) THEN
928: l_cur_qty := NVL(l_rsa.queue_qty, 0);
929: ELSIF (p_fm_step = WIP_CONSTANTS.RUN) THEN
930: l_cur_qty := NVL(l_rsa.run_qty, 0);
931: ELSIF (p_fm_step = WIP_CONSTANTS.TOMOVE) THEN
932: l_cur_qty := NVL(l_rsa.tomove_qty, 0);
933: ELSIF (p_fm_step = WIP_CONSTANTS.REJECT) THEN

Line 931: ELSIF (p_fm_step = WIP_CONSTANTS.TOMOVE) THEN

927: IF (p_fm_step = WIP_CONSTANTS.QUEUE) THEN
928: l_cur_qty := NVL(l_rsa.queue_qty, 0);
929: ELSIF (p_fm_step = WIP_CONSTANTS.RUN) THEN
930: l_cur_qty := NVL(l_rsa.run_qty, 0);
931: ELSIF (p_fm_step = WIP_CONSTANTS.TOMOVE) THEN
932: l_cur_qty := NVL(l_rsa.tomove_qty, 0);
933: ELSIF (p_fm_step = WIP_CONSTANTS.REJECT) THEN
934: l_cur_qty := NVL(l_rsa.reject_qty, 0);
935: ELSIF (p_fm_step = WIP_CONSTANTS.SCRAP) THEN

Line 933: ELSIF (p_fm_step = WIP_CONSTANTS.REJECT) THEN

929: ELSIF (p_fm_step = WIP_CONSTANTS.RUN) THEN
930: l_cur_qty := NVL(l_rsa.run_qty, 0);
931: ELSIF (p_fm_step = WIP_CONSTANTS.TOMOVE) THEN
932: l_cur_qty := NVL(l_rsa.tomove_qty, 0);
933: ELSIF (p_fm_step = WIP_CONSTANTS.REJECT) THEN
934: l_cur_qty := NVL(l_rsa.reject_qty, 0);
935: ELSIF (p_fm_step = WIP_CONSTANTS.SCRAP) THEN
936: l_cur_qty := NVL(l_rsa.scrap_qty, 0);
937: END IF;

Line 935: ELSIF (p_fm_step = WIP_CONSTANTS.SCRAP) THEN

931: ELSIF (p_fm_step = WIP_CONSTANTS.TOMOVE) THEN
932: l_cur_qty := NVL(l_rsa.tomove_qty, 0);
933: ELSIF (p_fm_step = WIP_CONSTANTS.REJECT) THEN
934: l_cur_qty := NVL(l_rsa.reject_qty, 0);
935: ELSIF (p_fm_step = WIP_CONSTANTS.SCRAP) THEN
936: l_cur_qty := NVL(l_rsa.scrap_qty, 0);
937: END IF;
938:
939: IF (p_comp_alloc = WIP_CONSTANTS.YES) THEN

Line 939: IF (p_comp_alloc = WIP_CONSTANTS.YES) THEN

935: ELSIF (p_fm_step = WIP_CONSTANTS.SCRAP) THEN
936: l_cur_qty := NVL(l_rsa.scrap_qty, 0);
937: END IF;
938:
939: IF (p_comp_alloc = WIP_CONSTANTS.YES) THEN
940: -- completion allocation from Tomove of the last op. This logic
941: -- will be used in completion part of EZ Completion transactions
942: l_cur_qty := l_cur_qty + l_rsa.toMoveQty;
943: END IF;

Line 946: IF (p_oc_txn_type = WIP_CONSTANTS.child_txn) THEN

942: l_cur_qty := l_cur_qty + l_rsa.toMoveQty;
943: END IF;
944: END IF; -- Return transactions from form
945:
946: IF (p_oc_txn_type = WIP_CONSTANTS.child_txn) THEN
947: NULL; -- just allocate everything to the last schedule
948: ELSE
949: IF (l_cur_qty > 0) THEN
950: l_quantity := l_quantity - l_cur_qty;

Line 964: IF(p_oc_txn_type = WIP_CONSTANTS.parent_txn) THEN

960: END IF; -- child txn
961: END IF; -- c_rsa%NOTFOUND
962: END LOOP; -- while
963:
964: IF(p_oc_txn_type = WIP_CONSTANTS.parent_txn) THEN
965: -- IF parent and came here, it means that the whole quantity was
966: -- fulfilled without needing overcompletion. In that case it must be
967: -- an error
968: x_proc_status := TVE_OVERCOMPLETION_MISMATCH;

Line 980: ELSIF((p_oc_txn_type = WIP_CONSTANTS.parent_txn OR

976:
977: IF (l_recordFound = 0) THEN -- no schedule found
978: l_errMsg := 'No repetitive schedule found';
979: raise fnd_api.g_exc_unexpected_error;
980: ELSIF((p_oc_txn_type = WIP_CONSTANTS.parent_txn OR
981: (p_txnType = WIP_CONSTANTS.RET_TXN AND
982: p_fm_form = WIP_CONSTANTS.YES)) AND
983: l_quantity > 0) THEN
984: -- parent may have some allocation already made or none

Line 981: (p_txnType = WIP_CONSTANTS.RET_TXN AND

977: IF (l_recordFound = 0) THEN -- no schedule found
978: l_errMsg := 'No repetitive schedule found';
979: raise fnd_api.g_exc_unexpected_error;
980: ELSIF((p_oc_txn_type = WIP_CONSTANTS.parent_txn OR
981: (p_txnType = WIP_CONSTANTS.RET_TXN AND
982: p_fm_form = WIP_CONSTANTS.YES)) AND
983: l_quantity > 0) THEN
984: -- parent may have some allocation already made or none
985: IF (x_sche_count = 0) THEN -- no allocation made yet

Line 982: p_fm_form = WIP_CONSTANTS.YES)) AND

978: l_errMsg := 'No repetitive schedule found';
979: raise fnd_api.g_exc_unexpected_error;
980: ELSIF((p_oc_txn_type = WIP_CONSTANTS.parent_txn OR
981: (p_txnType = WIP_CONSTANTS.RET_TXN AND
982: p_fm_form = WIP_CONSTANTS.YES)) AND
983: l_quantity > 0) THEN
984: -- parent may have some allocation already made or none
985: IF (x_sche_count = 0) THEN -- no allocation made yet
986: x_sche_count := 1;

Line 1001: ELSIF(p_oc_txn_type = WIP_CONSTANTS.child_txn) THEN

997: x_rsa(x_sche_count).scheID := l_scheID;
998: x_rsa(x_sche_count).scheQty := l_quantity;
999: END IF;
1000: END IF; -- x_sche_count = 0
1001: ELSIF(p_oc_txn_type = WIP_CONSTANTS.child_txn) THEN
1002: -- no allocation should be there yet
1003: x_sche_count := 1;
1004: x_rsa(x_sche_count).scheID := l_scheID;
1005: x_rsa(x_sche_count).scheQty := l_quantity;

Line 1008: IF(p_fm_form = WIP_CONSTANTS.YES) THEN

1004: x_rsa(x_sche_count).scheID := l_scheID;
1005: x_rsa(x_sche_count).scheQty := l_quantity;
1006:
1007: ELSE -- IF normal txn
1008: IF(p_fm_form = WIP_CONSTANTS.YES) THEN
1009: -- skip this validation if call from from because there may be
1010: -- a case that completed quantity is negative for repetitive
1011: NULL;
1012: ELSE

Line 1027: x_proc_status := WIP_CONSTANTS.RUNNING;

1023: IF(c_rsa%ISOPEN) THEN
1024: CLOSE c_rsa;
1025: END IF;
1026: x_returnStatus := fnd_api.g_ret_sts_success;
1027: x_proc_status := WIP_CONSTANTS.RUNNING;
1028: -- write to the log file
1029: IF (l_logLevel <= wip_constants.trace_logging) THEN
1030: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.schedule_alloc',
1031: p_procReturnStatus => x_returnStatus,

Line 1029: IF (l_logLevel <= wip_constants.trace_logging) THEN

1025: END IF;
1026: x_returnStatus := fnd_api.g_ret_sts_success;
1027: x_proc_status := WIP_CONSTANTS.RUNNING;
1028: -- write to the log file
1029: IF (l_logLevel <= wip_constants.trace_logging) THEN
1030: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.schedule_alloc',
1031: p_procReturnStatus => x_returnStatus,
1032: p_msg => 'procedure complete',
1033: x_returnStatus => l_returnStatus);

Line 1043: IF (l_logLevel <= wip_constants.trace_logging) THEN

1039: CLOSE c_rsa;
1040: END IF;
1041: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1042:
1043: IF (l_logLevel <= wip_constants.trace_logging) THEN
1044: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.schedule_alloc',
1045: p_procReturnStatus => x_returnStatus,
1046: p_msg => l_errMsg,
1047: x_returnStatus => l_returnStatus);

Line 1060: x_proc_status := WIP_CONSTANTS.ERROR;

1056: IF(c_rsa%ISOPEN) THEN
1057: CLOSE c_rsa;
1058: END IF;
1059: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1060: x_proc_status := WIP_CONSTANTS.ERROR;
1061: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
1062:
1063: IF (l_logLevel <= wip_constants.trace_logging) THEN
1064: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.schedule_alloc',

Line 1063: IF (l_logLevel <= wip_constants.trace_logging) THEN

1059: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1060: x_proc_status := WIP_CONSTANTS.ERROR;
1061: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
1062:
1063: IF (l_logLevel <= wip_constants.trace_logging) THEN
1064: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.schedule_alloc',
1065: p_procReturnStatus => x_returnStatus,
1066: p_msg => l_errMsg,
1067: x_returnStatus => l_returnStatus);

Line 1100: IF (l_logLevel <= wip_constants.trace_logging) THEN

1096: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
1097:
1098: BEGIN
1099: -- write parameter value to log file
1100: IF (l_logLevel <= wip_constants.trace_logging) THEN
1101: l_params(1).paramName := 'p_org_id';
1102: l_params(1).paramValue := p_org_id;
1103: l_params(2).paramName := 'p_scheID';
1104: l_params(2).paramValue := p_scheID;

Line 1122: p_move_profile => WIP_CONSTANTS.BACKGROUND,

1118: (p_primary_quantity => p_oc_pri_qty,
1119: p_parent_txn_id => p_parent_txn_id,
1120: -- pass move_profile equal to background so that it will always insert
1121: -- parent group_id to child group_id
1122: p_move_profile => WIP_CONSTANTS.BACKGROUND,
1123: p_sched_id => p_scheID,
1124: p_user_id => p_gib.user_id,
1125: p_login_id => p_gib.login_id,
1126: p_req_id => p_gib.request_id,

Line 1193: IF (l_logLevel <= wip_constants.trace_logging) THEN

1189: END IF; -- p_scheID > 0
1190: x_returnStatus := fnd_api.g_ret_sts_success;
1191:
1192: -- write to the log file
1193: IF (l_logLevel <= wip_constants.trace_logging) THEN
1194: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_alloc_child',
1195: p_procReturnStatus => x_returnStatus,
1196: p_msg => 'procedure complete',
1197: x_returnStatus => l_returnStatus);

Line 1205: IF (l_logLevel <= wip_constants.trace_logging) THEN

1201: WHEN fnd_api.g_exc_unexpected_error THEN
1202:
1203: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1204:
1205: IF (l_logLevel <= wip_constants.trace_logging) THEN
1206: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_alloc_child',
1207: p_procReturnStatus => x_returnStatus,
1208: p_msg => l_errMsg,
1209: x_returnStatus => l_returnStatus);

Line 1220: IF (l_logLevel <= wip_constants.trace_logging) THEN

1216: WHEN others THEN
1217: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1218: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
1219:
1220: IF (l_logLevel <= wip_constants.trace_logging) THEN
1221: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_alloc_child',
1222: p_procReturnStatus => x_returnStatus,
1223: p_msg => l_errMsg,
1224: x_returnStatus => l_returnStatus);

Line 1248: IF (l_logLevel <= wip_constants.trace_logging) THEN

1244: l_forward_move NUMBER;
1245: BEGIN
1246: FOR i IN 1..p_scheCount LOOP
1247: -- write parameter value to log file
1248: IF (l_logLevel <= wip_constants.trace_logging) THEN
1249: l_params(1).paramName := 'p_scheID';
1250: l_params(1).paramValue := p_rsa_rec(i).scheID;
1251: l_params(2).paramName := 'p_scheQty';
1252: l_params(2).paramValue := p_rsa_rec(i).scheQty;

Line 1306: WIP_CONSTANTS.INV_MAX_PRECISION),0),0) +

1302: wop.quantity_in_queue + SUM(
1303: DECODE(wop.operation_seq_num, p_rsa_rec(i).fmOp,
1304: -1 * DECODE(p_rsa_rec(i).fmStep,
1305: 1, ROUND(p_rsa_rec(i).scheQty,
1306: WIP_CONSTANTS.INV_MAX_PRECISION),0),0) +
1307: DECODE(wop.operation_seq_num, p_rsa_rec(i).toOp,
1308: DECODE(p_rsa_rec(i).toStep,
1309: 1, ROUND(p_rsa_rec(i).scheQty,
1310: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0)),

Line 1310: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0)),

1306: WIP_CONSTANTS.INV_MAX_PRECISION),0),0) +
1307: DECODE(wop.operation_seq_num, p_rsa_rec(i).toOp,
1308: DECODE(p_rsa_rec(i).toStep,
1309: 1, ROUND(p_rsa_rec(i).scheQty,
1310: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0)),
1311: wop.quantity_running + SUM(
1312: DECODE(wop.operation_seq_num, p_rsa_rec(i).fmOp,
1313: -1 * DECODE(p_rsa_rec(i).fmStep,
1314: 2, ROUND(p_rsa_rec(i).scheQty,

Line 1315: WIP_CONSTANTS.INV_MAX_PRECISION),0),0) +

1311: wop.quantity_running + SUM(
1312: DECODE(wop.operation_seq_num, p_rsa_rec(i).fmOp,
1313: -1 * DECODE(p_rsa_rec(i).fmStep,
1314: 2, ROUND(p_rsa_rec(i).scheQty,
1315: WIP_CONSTANTS.INV_MAX_PRECISION),0),0) +
1316: DECODE(wop.operation_seq_num, p_rsa_rec(i).toOp,
1317: DECODE(p_rsa_rec(i).toStep,
1318: 2, ROUND(p_rsa_rec(i).scheQty,
1319: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0)),

Line 1319: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0)),

1315: WIP_CONSTANTS.INV_MAX_PRECISION),0),0) +
1316: DECODE(wop.operation_seq_num, p_rsa_rec(i).toOp,
1317: DECODE(p_rsa_rec(i).toStep,
1318: 2, ROUND(p_rsa_rec(i).scheQty,
1319: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0)),
1320: wop.quantity_waiting_to_move + SUM(
1321: DECODE(wop.operation_seq_num, p_rsa_rec(i).fmOp,
1322: -1 * DECODE(p_rsa_rec(i).fmStep,
1323: 3, ROUND(p_rsa_rec(i).scheQty,

Line 1324: WIP_CONSTANTS.INV_MAX_PRECISION),0),0) +

1320: wop.quantity_waiting_to_move + SUM(
1321: DECODE(wop.operation_seq_num, p_rsa_rec(i).fmOp,
1322: -1 * DECODE(p_rsa_rec(i).fmStep,
1323: 3, ROUND(p_rsa_rec(i).scheQty,
1324: WIP_CONSTANTS.INV_MAX_PRECISION),0),0) +
1325: DECODE(wop.operation_seq_num, p_rsa_rec(i).toOp,
1326: DECODE(p_rsa_rec(i).toStep,
1327: 3, ROUND(p_rsa_rec(i).scheQty,
1328: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0)),

Line 1328: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0)),

1324: WIP_CONSTANTS.INV_MAX_PRECISION),0),0) +
1325: DECODE(wop.operation_seq_num, p_rsa_rec(i).toOp,
1326: DECODE(p_rsa_rec(i).toStep,
1327: 3, ROUND(p_rsa_rec(i).scheQty,
1328: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0)),
1329: wop.quantity_rejected + SUM(
1330: DECODE(wop.operation_seq_num, p_rsa_rec(i).fmOp,
1331: -1*DECODE(p_rsa_rec(i).fmStep,
1332: 4, ROUND(p_rsa_rec(i).scheQty,

Line 1333: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0) +

1329: wop.quantity_rejected + SUM(
1330: DECODE(wop.operation_seq_num, p_rsa_rec(i).fmOp,
1331: -1*DECODE(p_rsa_rec(i).fmStep,
1332: 4, ROUND(p_rsa_rec(i).scheQty,
1333: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0) +
1334: DECODE(wop.operation_seq_num, p_rsa_rec(i).toOp,
1335: DECODE(p_rsa_rec(i).toStep,
1336: 4, ROUND(p_rsa_rec(i).scheQty,
1337: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0)),

Line 1337: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0)),

1333: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0) +
1334: DECODE(wop.operation_seq_num, p_rsa_rec(i).toOp,
1335: DECODE(p_rsa_rec(i).toStep,
1336: 4, ROUND(p_rsa_rec(i).scheQty,
1337: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0)),
1338: wop.quantity_scrapped + SUM(
1339: DECODE(wop.operation_seq_num, p_rsa_rec(i).fmOp,
1340: -1*DECODE(p_rsa_rec(i).fmStep,
1341: 5, ROUND(p_rsa_rec(i).scheQty,

Line 1342: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0) +

1338: wop.quantity_scrapped + SUM(
1339: DECODE(wop.operation_seq_num, p_rsa_rec(i).fmOp,
1340: -1*DECODE(p_rsa_rec(i).fmStep,
1341: 5, ROUND(p_rsa_rec(i).scheQty,
1342: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0) +
1343: DECODE(wop.operation_seq_num, p_rsa_rec(i).toOp,
1344: DECODE(p_rsa_rec(i).toStep,
1345: 5, ROUND(p_rsa_rec(i).scheQty,
1346: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0))

Line 1346: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0))

1342: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0) +
1343: DECODE(wop.operation_seq_num, p_rsa_rec(i).toOp,
1344: DECODE(p_rsa_rec(i).toStep,
1345: 5, ROUND(p_rsa_rec(i).scheQty,
1346: WIP_CONSTANTS.INV_MAX_PRECISION), 0), 0))
1347: FROM wip_operations wop1
1348: WHERE wop1.rowid = wop.rowid
1349: AND wop1.organization_id = p_rsa_rec(i).orgID
1350: AND wop1.wip_entity_id = p_rsa_rec(i).wipID

Line 1364: IF(p_rsa_rec(i).fmStep = WIP_CONSTANTS.SCRAP AND p_rsa_rec(i).toStep = WIP_CONSTANTS.SCRAP) THEN

1360: AND (wop2.operation_seq_num = p_rsa_rec(i).fmOp
1361: OR wop2.operation_seq_num = p_rsa_rec(i).toOp));
1362:
1363: /* Enhancement 2864382*/
1364: IF(p_rsa_rec(i).fmStep = WIP_CONSTANTS.SCRAP AND p_rsa_rec(i).toStep = WIP_CONSTANTS.SCRAP) THEN
1365: l_forward_move := WIP_CONSTANTS.NO;
1366: IF(p_rsa_rec(i).fmOp < p_rsa_rec(i).toOp) THEN
1367: l_forward_move := WIP_CONSTANTS.YES;
1368: END IF;

Line 1365: l_forward_move := WIP_CONSTANTS.NO;

1361: OR wop2.operation_seq_num = p_rsa_rec(i).toOp));
1362:
1363: /* Enhancement 2864382*/
1364: IF(p_rsa_rec(i).fmStep = WIP_CONSTANTS.SCRAP AND p_rsa_rec(i).toStep = WIP_CONSTANTS.SCRAP) THEN
1365: l_forward_move := WIP_CONSTANTS.NO;
1366: IF(p_rsa_rec(i).fmOp < p_rsa_rec(i).toOp) THEN
1367: l_forward_move := WIP_CONSTANTS.YES;
1368: END IF;
1369:

Line 1367: l_forward_move := WIP_CONSTANTS.YES;

1363: /* Enhancement 2864382*/
1364: IF(p_rsa_rec(i).fmStep = WIP_CONSTANTS.SCRAP AND p_rsa_rec(i).toStep = WIP_CONSTANTS.SCRAP) THEN
1365: l_forward_move := WIP_CONSTANTS.NO;
1366: IF(p_rsa_rec(i).fmOp < p_rsa_rec(i).toOp) THEN
1367: l_forward_move := WIP_CONSTANTS.YES;
1368: END IF;
1369:
1370: UPDATE WIP_OPERATIONS wop
1371: SET wop.cumulative_scrap_quantity = wop.cumulative_scrap_quantity +

Line 1373: WIP_CONSTANTS.YES,p_rsa_rec(i).scheQty,

1369:
1370: UPDATE WIP_OPERATIONS wop
1371: SET wop.cumulative_scrap_quantity = wop.cumulative_scrap_quantity +
1372: DECODE(l_forward_move,
1373: WIP_CONSTANTS.YES,p_rsa_rec(i).scheQty,
1374: WIP_CONSTANTS.NO,-1 * p_rsa_rec(i).scheQty,
1375: 0)
1376: WHERE wop.rowid in
1377: (SELECT wop1.rowid

Line 1374: WIP_CONSTANTS.NO,-1 * p_rsa_rec(i).scheQty,

1370: UPDATE WIP_OPERATIONS wop
1371: SET wop.cumulative_scrap_quantity = wop.cumulative_scrap_quantity +
1372: DECODE(l_forward_move,
1373: WIP_CONSTANTS.YES,p_rsa_rec(i).scheQty,
1374: WIP_CONSTANTS.NO,-1 * p_rsa_rec(i).scheQty,
1375: 0)
1376: WHERE wop.rowid in
1377: (SELECT wop1.rowid
1378: FROM WIP_OPERATIONS wop1

Line 1384: ELSIF(p_rsa_rec(i).fmStep=WIP_CONSTANTS.SCRAP OR p_rsa_rec(i).toStep=WIP_CONSTANTS.SCRAP) THEN

1380: AND wop1.wip_entity_id = p_rsa_rec(i).wipID
1381: AND wop1.repetitive_schedule_id = p_rsa_rec(i).scheID
1382: AND wop1.operation_seq_num > LEAST(p_rsa_rec(i).fmOp,p_rsa_rec(i).toOp)
1383: AND wop1.operation_seq_num <= GREATEST(p_rsa_rec(i).fmOp,p_rsa_rec(i).toOp));
1384: ELSIF(p_rsa_rec(i).fmStep=WIP_CONSTANTS.SCRAP OR p_rsa_rec(i).toStep=WIP_CONSTANTS.SCRAP) THEN
1385: UPDATE WIP_OPERATIONS wop
1386: SET wop.cumulative_scrap_quantity = wop.cumulative_scrap_quantity +
1387: DECODE(p_rsa_rec(i).toStep,
1388: WIP_CONSTANTS.SCRAP,p_rsa_rec(i).scheQty,

Line 1388: WIP_CONSTANTS.SCRAP,p_rsa_rec(i).scheQty,

1384: ELSIF(p_rsa_rec(i).fmStep=WIP_CONSTANTS.SCRAP OR p_rsa_rec(i).toStep=WIP_CONSTANTS.SCRAP) THEN
1385: UPDATE WIP_OPERATIONS wop
1386: SET wop.cumulative_scrap_quantity = wop.cumulative_scrap_quantity +
1387: DECODE(p_rsa_rec(i).toStep,
1388: WIP_CONSTANTS.SCRAP,p_rsa_rec(i).scheQty,
1389: 0) +
1390: DECODE(p_rsa_rec(i).fmStep,
1391: WIP_CONSTANTS.SCRAP,-1*p_rsa_rec(i).scheQty,
1392: 0)

Line 1391: WIP_CONSTANTS.SCRAP,-1*p_rsa_rec(i).scheQty,

1387: DECODE(p_rsa_rec(i).toStep,
1388: WIP_CONSTANTS.SCRAP,p_rsa_rec(i).scheQty,
1389: 0) +
1390: DECODE(p_rsa_rec(i).fmStep,
1391: WIP_CONSTANTS.SCRAP,-1*p_rsa_rec(i).scheQty,
1392: 0)
1393: WHERE wop.rowid in
1394: (SELECT wop1.rowid
1395: FROM WIP_OPERATIONS wop1

Line 1400: WIP_CONSTANTS.SCRAP,p_rsa_rec(i).fmOp,

1396: WHERE wop1.organization_id = p_rsa_rec(i).orgID
1397: AND wop1.wip_entity_id = p_rsa_rec(i).wipID
1398: AND wop1.repetitive_schedule_id = p_rsa_rec(i).scheID
1399: AND wop1.operation_seq_num > DECODE(p_rsa_rec(i).fmStep,
1400: WIP_CONSTANTS.SCRAP,p_rsa_rec(i).fmOp,
1401: p_rsa_rec(i).toOp));
1402: END IF;
1403:
1404:

Line 1410: IF (l_logLevel <= wip_constants.trace_logging) THEN

1406:
1407: x_returnStatus := fnd_api.g_ret_sts_success;
1408:
1409: -- write to the log file
1410: IF (l_logLevel <= wip_constants.trace_logging) THEN
1411: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.update_wo_rs',
1412: p_procReturnStatus => x_returnStatus,
1413: p_msg => 'procedure complete',
1414: x_returnStatus => l_returnStatus);

Line 1422: IF (l_logLevel <= wip_constants.trace_logging) THEN

1418: WHEN others THEN
1419: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1420: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
1421:
1422: IF (l_logLevel <= wip_constants.trace_logging) THEN
1423: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.update_wo_rs',
1424: p_procReturnStatus => x_returnStatus,
1425: p_msg => l_errMsg,
1426: x_returnStatus => l_returnStatus);

Line 1450: IF (l_logLevel <= wip_constants.trace_logging) THEN

1446: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
1447:
1448: BEGIN
1449: -- write parameter values to log file
1450: IF (l_logLevel <= wip_constants.trace_logging) THEN
1451: l_params(1).paramName := 'p_txn_id';
1452: l_params(1).paramValue := p_txn_id;
1453: l_params(2).paramName := 'p_group_id';
1454: l_params(2).paramValue := p_gib.group_id;

Line 1522: IF (l_logLevel <= wip_constants.trace_logging) THEN

1518:
1519: x_returnStatus := fnd_api.g_ret_sts_success;
1520:
1521: -- write to the log file
1522: IF (l_logLevel <= wip_constants.trace_logging) THEN
1523: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.update_wipops',
1524: p_procReturnStatus => x_returnStatus,
1525: p_msg => 'procedure complete',
1526: x_returnStatus => l_returnStatus);

Line 1534: IF (l_logLevel <= wip_constants.trace_logging) THEN

1530: WHEN OTHERS THEN
1531: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1532: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
1533:
1534: IF (l_logLevel <= wip_constants.trace_logging) THEN
1535: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.update_wipops',
1536: p_procReturnStatus => x_returnStatus,
1537: p_msg => l_errMsg,
1538: x_returnStatus => l_returnStatus);

Line 1576: -1,WIP_CONSTANTS.normal_txn,

1572: 1,1,0,0,-1,0) past_timeout,
1573: NVL(overcompletion_primary_qty,0) oc_pri_qty,
1574: DECODE(NVL(overcompletion_primary_qty,-1),
1575: -1,DECODE(NVL(overcompletion_transaction_id,-1),
1576: -1,WIP_CONSTANTS.normal_txn,
1577: WIP_CONSTANTS.child_txn),
1578: WIP_CONSTANTS.parent_txn) oc_txn_type,
1579: transaction_type txn_type,
1580: transaction_date txn_date

Line 1577: WIP_CONSTANTS.child_txn),

1573: NVL(overcompletion_primary_qty,0) oc_pri_qty,
1574: DECODE(NVL(overcompletion_primary_qty,-1),
1575: -1,DECODE(NVL(overcompletion_transaction_id,-1),
1576: -1,WIP_CONSTANTS.normal_txn,
1577: WIP_CONSTANTS.child_txn),
1578: WIP_CONSTANTS.parent_txn) oc_txn_type,
1579: transaction_type txn_type,
1580: transaction_date txn_date
1581: FROM wip_move_txn_interface

Line 1578: WIP_CONSTANTS.parent_txn) oc_txn_type,

1574: DECODE(NVL(overcompletion_primary_qty,-1),
1575: -1,DECODE(NVL(overcompletion_transaction_id,-1),
1576: -1,WIP_CONSTANTS.normal_txn,
1577: WIP_CONSTANTS.child_txn),
1578: WIP_CONSTANTS.parent_txn) oc_txn_type,
1579: transaction_type txn_type,
1580: transaction_date txn_date
1581: FROM wip_move_txn_interface
1582: WHERE group_id = p_group_id

Line 1584: AND process_phase = WIP_CONSTANTS.MOVE_PROC

1580: transaction_date txn_date
1581: FROM wip_move_txn_interface
1582: WHERE group_id = p_group_id
1583: AND TRUNC(transaction_date) = TRUNC(p_txn_date)
1584: AND process_phase = WIP_CONSTANTS.MOVE_PROC
1585: AND process_status = WIP_CONSTANTS.RUNNING
1586: AND entity_type = WIP_CONSTANTS.REPETITIVE
1587: ORDER BY transaction_date, organization_id, wip_entity_id, line_id,
1588: fm_operation_seq_num, to_operation_seq_num,

Line 1585: AND process_status = WIP_CONSTANTS.RUNNING

1581: FROM wip_move_txn_interface
1582: WHERE group_id = p_group_id
1583: AND TRUNC(transaction_date) = TRUNC(p_txn_date)
1584: AND process_phase = WIP_CONSTANTS.MOVE_PROC
1585: AND process_status = WIP_CONSTANTS.RUNNING
1586: AND entity_type = WIP_CONSTANTS.REPETITIVE
1587: ORDER BY transaction_date, organization_id, wip_entity_id, line_id,
1588: fm_operation_seq_num, to_operation_seq_num,
1589: fm_intraoperation_step_type, to_intraoperation_step_type,

Line 1586: AND entity_type = WIP_CONSTANTS.REPETITIVE

1582: WHERE group_id = p_group_id
1583: AND TRUNC(transaction_date) = TRUNC(p_txn_date)
1584: AND process_phase = WIP_CONSTANTS.MOVE_PROC
1585: AND process_status = WIP_CONSTANTS.RUNNING
1586: AND entity_type = WIP_CONSTANTS.REPETITIVE
1587: ORDER BY transaction_date, organization_id, wip_entity_id, line_id,
1588: fm_operation_seq_num, to_operation_seq_num,
1589: fm_intraoperation_step_type, to_intraoperation_step_type,
1590: creation_date;

Line 1608: IF (l_logLevel <= wip_constants.trace_logging) THEN

1604: l_msg_data VARCHAR2(2000);
1605: l_propagate_job_change_to_po NUMBER;
1606: BEGIN
1607: -- write parameter value to log file
1608: IF (l_logLevel <= wip_constants.trace_logging) THEN
1609: l_params(1).paramName := 'p_group_id';
1610: l_params(1).paramValue := p_gib.group_id;
1611: l_params(2).paramName := 'p_timeout';
1612: l_params(2).paramValue := p_gib.time_out;

Line 1654: p_fm_form => WIP_CONSTANTS.NO,

1650: p_to_op => l_rs_txn.to_op,
1651: p_to_step => l_rs_txn.to_step,
1652: p_oc_txn_type => l_rs_txn.oc_txn_type,
1653: p_txnType => l_rs_txn.txn_type,
1654: p_fm_form => WIP_CONSTANTS.NO,
1655: p_comp_alloc => WIP_CONSTANTS.NO,
1656: p_txn_date => l_rs_txn.txn_date, /* Bug 5373061 */
1657: x_proc_status => l_proc_status,
1658: x_sche_count => l_sche_count,

Line 1655: p_comp_alloc => WIP_CONSTANTS.NO,

1651: p_to_step => l_rs_txn.to_step,
1652: p_oc_txn_type => l_rs_txn.oc_txn_type,
1653: p_txnType => l_rs_txn.txn_type,
1654: p_fm_form => WIP_CONSTANTS.NO,
1655: p_comp_alloc => WIP_CONSTANTS.NO,
1656: p_txn_date => l_rs_txn.txn_date, /* Bug 5373061 */
1657: x_proc_status => l_proc_status,
1658: x_sche_count => l_sche_count,
1659: x_rsa => l_rsa,

Line 1661: IF (l_logLevel <= wip_constants.full_logging) THEN

1657: x_proc_status => l_proc_status,
1658: x_sche_count => l_sche_count,
1659: x_rsa => l_rsa,
1660: x_returnStatus => x_returnStatus);
1661: IF (l_logLevel <= wip_constants.full_logging) THEN
1662: wip_logger.log(p_msg => 'l_proc_status = ' || l_proc_status,
1663: x_returnStatus => l_returnStatus);
1664: wip_logger.log(p_msg => 'l_sche_count = ' || l_sche_count,
1665: x_returnStatus => l_returnStatus);

Line 1668: IF(l_proc_status = WIP_CONSTANTS.RUNNING) THEN

1664: wip_logger.log(p_msg => 'l_sche_count = ' || l_sche_count,
1665: x_returnStatus => l_returnStatus);
1666: END IF;
1667:
1668: IF(l_proc_status = WIP_CONSTANTS.RUNNING) THEN
1669:
1670: FOR i IN 1..l_sche_count LOOP
1671: INSERT INTO wip_move_txn_allocations
1672: (transaction_id,

Line 1701: WIP_CONSTANTS.INV_MAX_PRECISION)); -- primary_quantity

1697: DECODE(p_gib.request_id,-1,NULL,SYSDATE),
1698: l_rs_txn.txn_qty * l_rsa(i).scheQty /
1699: l_rs_txn.primary_qty, -- transaction_quantity
1700: ROUND(l_rsa(i).scheQty,
1701: WIP_CONSTANTS.INV_MAX_PRECISION)); -- primary_quantity
1702: END LOOP; --END for loop
1703:
1704: IF(l_rs_txn.oc_txn_type = WIP_CONSTANTS.child_txn) THEN
1705:

Line 1704: IF(l_rs_txn.oc_txn_type = WIP_CONSTANTS.child_txn) THEN

1700: ROUND(l_rsa(i).scheQty,
1701: WIP_CONSTANTS.INV_MAX_PRECISION)); -- primary_quantity
1702: END LOOP; --END for loop
1703:
1704: IF(l_rs_txn.oc_txn_type = WIP_CONSTANTS.child_txn) THEN
1705:
1706: -- update qty in the queue step of the from operation
1707: -- for child move txns.
1708: update_wipops(p_txn_id => l_rs_txn.txn_id,

Line 1719: IF(l_rs_txn.oc_txn_type = WIP_CONSTANTS.parent_txn) THEN

1715: END IF;
1716:
1717: END IF; -- child txns
1718:
1719: IF(l_rs_txn.oc_txn_type = WIP_CONSTANTS.parent_txn) THEN
1720: -- all procedure in this loop is pretty much for child record
1721: -- IF it is over completion/move txn, insert child record to WMTI
1722: insert_alloc_child(p_org_id => l_rs_txn.org_id,
1723: p_scheID => l_rsa(1).scheID,

Line 1734: SET process_status = WIP_CONSTANTS.PENDING,

1730: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN
1731:
1732: IF (l_rs_txn.past_timeout = 0) THEN -- not time out yet
1733: UPDATE wip_move_txn_interface
1734: SET process_status = WIP_CONSTANTS.PENDING,
1735: group_id = NULL,
1736: transaction_id = NULL
1737: WHERE transaction_id = l_rs_txn.txn_id
1738: AND group_id = p_gib.group_id;

Line 1769: l_update_rsa(1).fmStep := WIP_CONSTANTS.QUEUE;

1765: l_update_rsa(1).orgID := l_rs_txn.org_id;
1766: l_update_rsa(1).wipID := l_rs_txn.wip_id;
1767: l_update_rsa(1).fmOp := l_oc_fm_op;
1768: l_update_rsa(1).toOp := l_rs_txn.fm_op;
1769: l_update_rsa(1).fmStep := WIP_CONSTANTS.QUEUE;
1770: l_update_rsa(1).toStep := l_rs_txn.fm_step;
1771:
1772: update_wo_rs(p_scheCount => 1,
1773: p_rsa_rec => l_update_rsa,

Line 1792: IF(l_propagate_job_change_to_po = WIP_CONSTANTS.YES) THEN

1788: INTO l_propagate_job_change_to_po
1789: FROM wip_parameters
1790: WHERE organization_id = l_rs_txn.org_id;
1791:
1792: IF(l_propagate_job_change_to_po = WIP_CONSTANTS.YES) THEN
1793: wip_osp.updatePOReqQuantity(
1794: p_job_id => l_rs_txn.wip_id,
1795: p_repetitive_id => l_rsa(1).scheID,
1796: p_org_id => l_rs_txn.org_id,

Line 1808: END IF; -- l_propagate_job_change_to_po = WIP_CONSTANTS.YES

1804: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
1805: l_errMsg := 'wip_osp.updatePOReqQuantity failed';
1806: raise fnd_api.g_exc_unexpected_error;
1807: END IF; -- l_return_status
1808: END IF; -- l_propagate_job_change_to_po = WIP_CONSTANTS.YES
1809: END IF; -- l_rs_txn.oc_pri_qty <> 0 and customer have PO FPJ
1810: END IF; -- IF parent_txn
1811:
1812: -- prepare data before calling update_wo_rs

Line 1843: IF(p_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN

1839:
1840: ELSIF(l_proc_status = TVE_OVERCOMPLETION_MISMATCH OR
1841: l_proc_status = TVE_NO_MOVE_ALLOC) THEN
1842:
1843: IF(p_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN
1844: IF (l_rs_txn.past_timeout = 0) THEN -- not time out yet
1845: UPDATE wip_move_txn_interface
1846: SET process_status = WIP_CONSTANTS.PENDING,
1847: group_id = NULL,

Line 1846: SET process_status = WIP_CONSTANTS.PENDING,

1842:
1843: IF(p_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN
1844: IF (l_rs_txn.past_timeout = 0) THEN -- not time out yet
1845: UPDATE wip_move_txn_interface
1846: SET process_status = WIP_CONSTANTS.PENDING,
1847: group_id = NULL,
1848: transaction_id = NULL
1849: WHERE transaction_id = l_rs_txn.txn_id
1850: AND group_id = p_gib.group_id;

Line 1868: ELSIF(l_proc_status = WIP_CONSTANTS.ERROR) THEN

1864: l_errMsg := 'available qty is not enough to fullfill move txn';
1865: raise fnd_api.g_exc_unexpected_error;
1866: END IF;
1867:
1868: ELSIF(l_proc_status = WIP_CONSTANTS.ERROR) THEN
1869:
1870: -- update move_interface table
1871: UPDATE wip_move_txn_interface
1872: SET process_status = WIP_CONSTANTS.ERROR

Line 1872: SET process_status = WIP_CONSTANTS.ERROR

1868: ELSIF(l_proc_status = WIP_CONSTANTS.ERROR) THEN
1869:
1870: -- update move_interface table
1871: UPDATE wip_move_txn_interface
1872: SET process_status = WIP_CONSTANTS.ERROR
1873: WHERE transaction_id = l_rs_txn.txn_id
1874: AND group_id = p_gib.group_id;
1875:
1876: l_errMsg := 'wip_movProc_priv.schedule_alloc failed';

Line 1889: IF(p_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN

1885: -- Fixed bug 4406536. We should error out only problematic record and
1886: -- continue to process next record.
1887: EXCEPTION
1888: WHEN fnd_api.g_exc_unexpected_error THEN
1889: IF(p_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN
1890: IF (l_rs_txn.past_timeout = 0) THEN -- not time out yet
1891: UPDATE wip_move_txn_interface
1892: SET process_status = WIP_CONSTANTS.PENDING,
1893: group_id = NULL,

Line 1892: SET process_status = WIP_CONSTANTS.PENDING,

1888: WHEN fnd_api.g_exc_unexpected_error THEN
1889: IF(p_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN
1890: IF (l_rs_txn.past_timeout = 0) THEN -- not time out yet
1891: UPDATE wip_move_txn_interface
1892: SET process_status = WIP_CONSTANTS.PENDING,
1893: group_id = NULL,
1894: transaction_id = NULL
1895: WHERE transaction_id = l_rs_txn.txn_id
1896: AND group_id = p_gib.group_id;

Line 1899: SET process_status = WIP_CONSTANTS.ERROR

1895: WHERE transaction_id = l_rs_txn.txn_id
1896: AND group_id = p_gib.group_id;
1897: ELSE -- already time out
1898: UPDATE wip_move_txn_interface
1899: SET process_status = WIP_CONSTANTS.ERROR
1900: WHERE transaction_id = l_rs_txn.txn_id
1901: AND group_id = p_gib.group_id;
1902:
1903: -- Get error from message stack

Line 1960: IF (l_logLevel <= wip_constants.trace_logging) THEN

1956: END IF;
1957: x_returnStatus := fnd_api.g_ret_sts_success;
1958:
1959: -- write to the log file
1960: IF (l_logLevel <= wip_constants.trace_logging) THEN
1961: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.rep_move_alloc',
1962: p_procReturnStatus => x_returnStatus,
1963: p_msg => 'procedure complete',
1964: x_returnStatus => l_returnStatus);

Line 1977: IF (l_logLevel <= wip_constants.trace_logging) THEN

1973: CLOSE c_rs_txn;
1974: END IF;
1975: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1976:
1977: IF (l_logLevel <= wip_constants.trace_logging) THEN
1978: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.rep_move_alloc',
1979: p_procReturnStatus => x_returnStatus,
1980: p_msg => l_errMsg,
1981: x_returnStatus => l_returnStatus);

Line 1990: IF (l_logLevel <= wip_constants.trace_logging) THEN

1986: END IF;
1987: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1988: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
1989:
1990: IF (l_logLevel <= wip_constants.trace_logging) THEN
1991: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.rep_move_alloc',
1992: p_procReturnStatus => x_returnStatus,
1993: p_msg => l_errMsg,
1994: x_returnStatus => l_returnStatus);

Line 2025: IF (l_logLevel <= wip_constants.trace_logging) THEN

2021: l_forward_move NUMBER;
2022:
2023: BEGIN
2024: -- write parameter value to log file
2025: IF (l_logLevel <= wip_constants.trace_logging) THEN
2026: l_params(1).paramName := 'p_txn_date';
2027: l_params(1).paramValue := p_txn_date;
2028: l_params(2).paramName := 'p_fm_op';
2029: l_params(2).paramValue := p_fm_op;

Line 2075: WIP_CONSTANTS.INV_MAX_PRECISION),

2071: wop.quantity_in_queue + SUM(
2072: DECODE(wop.operation_seq_num,
2073: p_fm_op, -1 * DECODE(p_fm_step,
2074: 1,ROUND(p_qty,
2075: WIP_CONSTANTS.INV_MAX_PRECISION),
2076: 0),
2077: 0) +
2078: DECODE(wop.operation_seq_num,
2079: p_to_op,DECODE(p_to_step,

Line 2080: 1,ROUND(p_qty,WIP_CONSTANTS.INV_MAX_PRECISION),

2076: 0),
2077: 0) +
2078: DECODE(wop.operation_seq_num,
2079: p_to_op,DECODE(p_to_step,
2080: 1,ROUND(p_qty,WIP_CONSTANTS.INV_MAX_PRECISION),
2081: 0),
2082: 0)),
2083: wop.quantity_running + SUM(
2084: DECODE(wop.operation_seq_num,

Line 2087: WIP_CONSTANTS.INV_MAX_PRECISION),

2083: wop.quantity_running + SUM(
2084: DECODE(wop.operation_seq_num,
2085: p_fm_op, -1 * DECODE(p_fm_step,
2086: 2,ROUND(p_qty,
2087: WIP_CONSTANTS.INV_MAX_PRECISION),
2088: 0),
2089: 0) +
2090: DECODE(wop.operation_seq_num,
2091: p_to_op,DECODE(p_to_step,

Line 2092: 2,ROUND(p_qty,WIP_CONSTANTS.INV_MAX_PRECISION),

2088: 0),
2089: 0) +
2090: DECODE(wop.operation_seq_num,
2091: p_to_op,DECODE(p_to_step,
2092: 2,ROUND(p_qty,WIP_CONSTANTS.INV_MAX_PRECISION),
2093: 0),
2094: 0)),
2095: wop.quantity_waiting_to_move + SUM(
2096: DECODE(wop.operation_seq_num,

Line 2099: WIP_CONSTANTS.INV_MAX_PRECISION),

2095: wop.quantity_waiting_to_move + SUM(
2096: DECODE(wop.operation_seq_num,
2097: p_fm_op, -1 * DECODE(p_fm_step,
2098: 3,ROUND(p_qty,
2099: WIP_CONSTANTS.INV_MAX_PRECISION),
2100: 0),
2101: 0) +
2102: DECODE(wop.operation_seq_num,
2103: p_to_op,DECODE(p_to_step,

Line 2104: 3,ROUND(p_qty,WIP_CONSTANTS.INV_MAX_PRECISION),

2100: 0),
2101: 0) +
2102: DECODE(wop.operation_seq_num,
2103: p_to_op,DECODE(p_to_step,
2104: 3,ROUND(p_qty,WIP_CONSTANTS.INV_MAX_PRECISION),
2105: 0),
2106: 0)),
2107: wop.quantity_rejected + SUM(
2108: DECODE(wop.operation_seq_num,

Line 2111: WIP_CONSTANTS.INV_MAX_PRECISION),

2107: wop.quantity_rejected + SUM(
2108: DECODE(wop.operation_seq_num,
2109: p_fm_op,-1 * DECODE(p_fm_step,
2110: 4,ROUND(p_qty,
2111: WIP_CONSTANTS.INV_MAX_PRECISION),
2112: 0),
2113: 0) +
2114: DECODE(wop.operation_seq_num,
2115: p_to_op,DECODE(p_to_step,

Line 2116: 4,ROUND(p_qty,WIP_CONSTANTS.INV_MAX_PRECISION),

2112: 0),
2113: 0) +
2114: DECODE(wop.operation_seq_num,
2115: p_to_op,DECODE(p_to_step,
2116: 4,ROUND(p_qty,WIP_CONSTANTS.INV_MAX_PRECISION),
2117: 0),
2118: 0)),
2119: wop.quantity_scrapped + SUM(
2120: DECODE(wop.operation_seq_num,

Line 2123: WIP_CONSTANTS.INV_MAX_PRECISION),

2119: wop.quantity_scrapped + SUM(
2120: DECODE(wop.operation_seq_num,
2121: p_fm_op,-1 * DECODE(p_fm_step,
2122: 5,ROUND(p_qty,
2123: WIP_CONSTANTS.INV_MAX_PRECISION),
2124: 0),
2125: 0) +
2126: DECODE(wop.operation_seq_num,
2127: p_to_op,DECODE(p_to_step,

Line 2128: 5,ROUND(p_qty,WIP_CONSTANTS.INV_MAX_PRECISION),

2124: 0),
2125: 0) +
2126: DECODE(wop.operation_seq_num,
2127: p_to_op,DECODE(p_to_step,
2128: 5,ROUND(p_qty,WIP_CONSTANTS.INV_MAX_PRECISION),
2129: 0),
2130: 0))
2131: FROM wip_operations wop1
2132: WHERE wop1.rowid = wop.rowid

Line 2147: IF(p_fm_step = WIP_CONSTANTS.SCRAP AND p_to_step = WIP_CONSTANTS.SCRAP) THEN

2143: OR wop2.operation_seq_num = p_to_op));
2144:
2145: /*Enh#2864382.Update wip_operations.cumulative_scrap_quantity after each
2146: scrap or return from scrap txn*/
2147: IF(p_fm_step = WIP_CONSTANTS.SCRAP AND p_to_step = WIP_CONSTANTS.SCRAP) THEN
2148: l_forward_move := WIP_CONSTANTS.NO;
2149: IF(p_fm_op 2150: l_forward_move := WIP_CONSTANTS.YES;
2151: END IF;

Line 2148: l_forward_move := WIP_CONSTANTS.NO;

2144:
2145: /*Enh#2864382.Update wip_operations.cumulative_scrap_quantity after each
2146: scrap or return from scrap txn*/
2147: IF(p_fm_step = WIP_CONSTANTS.SCRAP AND p_to_step = WIP_CONSTANTS.SCRAP) THEN
2148: l_forward_move := WIP_CONSTANTS.NO;
2149: IF(p_fm_op 2150: l_forward_move := WIP_CONSTANTS.YES;
2151: END IF;
2152:

Line 2150: l_forward_move := WIP_CONSTANTS.YES;

2146: scrap or return from scrap txn*/
2147: IF(p_fm_step = WIP_CONSTANTS.SCRAP AND p_to_step = WIP_CONSTANTS.SCRAP) THEN
2148: l_forward_move := WIP_CONSTANTS.NO;
2149: IF(p_fm_op 2150: l_forward_move := WIP_CONSTANTS.YES;
2151: END IF;
2152:
2153: UPDATE WIP_OPERATIONS wo
2154: SET wo.cumulative_scrap_quantity = wo.cumulative_scrap_quantity +

Line 2156: WIP_CONSTANTS.YES, -1*p_qty,

2152:
2153: UPDATE WIP_OPERATIONS wo
2154: SET wo.cumulative_scrap_quantity = wo.cumulative_scrap_quantity +
2155: DECODE(l_forward_move,
2156: WIP_CONSTANTS.YES, -1*p_qty,
2157: WIP_CONSTANTS.NO, p_qty,
2158: 0)
2159: WHERE wo.rowid in
2160: ( SELECT wo1.rowid

Line 2157: WIP_CONSTANTS.NO, p_qty,

2153: UPDATE WIP_OPERATIONS wo
2154: SET wo.cumulative_scrap_quantity = wo.cumulative_scrap_quantity +
2155: DECODE(l_forward_move,
2156: WIP_CONSTANTS.YES, -1*p_qty,
2157: WIP_CONSTANTS.NO, p_qty,
2158: 0)
2159: WHERE wo.rowid in
2160: ( SELECT wo1.rowid
2161: FROM WIP_OPERATIONS wo1

Line 2166: ELSIF(p_fm_step=WIP_CONSTANTS.SCRAP OR p_to_step=WIP_CONSTANTS.SCRAP)THEN

2162: WHERE wo1.organization_id = p_org_id
2163: AND wo1.wip_entity_id = p_wip_id
2164: AND wo1.operation_seq_num > LEAST(p_fm_op,p_to_op)
2165: AND wo1.operation_seq_num <= GREATEST(p_fm_op,p_to_op));
2166: ELSIF(p_fm_step=WIP_CONSTANTS.SCRAP OR p_to_step=WIP_CONSTANTS.SCRAP)THEN
2167: UPDATE WIP_OPERATIONS wo
2168: SET wo.cumulative_scrap_quantity = wo.cumulative_scrap_quantity +
2169: DECODE(p_to_step,
2170: WIP_CONSTANTS.SCRAP,p_qty,

Line 2170: WIP_CONSTANTS.SCRAP,p_qty,

2166: ELSIF(p_fm_step=WIP_CONSTANTS.SCRAP OR p_to_step=WIP_CONSTANTS.SCRAP)THEN
2167: UPDATE WIP_OPERATIONS wo
2168: SET wo.cumulative_scrap_quantity = wo.cumulative_scrap_quantity +
2169: DECODE(p_to_step,
2170: WIP_CONSTANTS.SCRAP,p_qty,
2171: 0) +
2172: DECODE(p_fm_step,
2173: WIP_CONSTANTS.SCRAP,-1*p_qty,
2174: 0)

Line 2173: WIP_CONSTANTS.SCRAP,-1*p_qty,

2169: DECODE(p_to_step,
2170: WIP_CONSTANTS.SCRAP,p_qty,
2171: 0) +
2172: DECODE(p_fm_step,
2173: WIP_CONSTANTS.SCRAP,-1*p_qty,
2174: 0)
2175: WHERE wo.rowid in
2176: (SELECT wo1.rowid
2177: FROM WIP_OPERATIONS wo1

Line 2181: WIP_CONSTANTS.SCRAP,p_fm_op,

2177: FROM WIP_OPERATIONS wo1
2178: WHERE wo1.organization_id = p_org_id
2179: AND wo1.wip_entity_id = p_wip_id
2180: AND wo1.operation_seq_num > DECODE(p_fm_step,
2181: WIP_CONSTANTS.SCRAP,p_fm_op,
2182: p_to_op));
2183: END IF;
2184:
2185: x_returnStatus := fnd_api.g_ret_sts_success;

Line 2188: IF (l_logLevel <= wip_constants.trace_logging) THEN

2184:
2185: x_returnStatus := fnd_api.g_ret_sts_success;
2186:
2187: -- write to the log file
2188: IF (l_logLevel <= wip_constants.trace_logging) THEN
2189: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.update_wo_dj',
2190: p_procReturnStatus => x_returnStatus,
2191: p_msg => 'procedure complete',
2192: x_returnStatus => l_returnStatus);

Line 2200: IF (l_logLevel <= wip_constants.trace_logging) THEN

2196: WHEN others THEN
2197: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2198: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
2199:
2200: IF (l_logLevel <= wip_constants.trace_logging) THEN
2201: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.update_wo_dj',
2202: p_procReturnStatus => x_returnStatus,
2203: p_msg => l_errMsg,
2204: x_returnStatus => l_returnStatus);

Line 2236: -1,WIP_CONSTANTS.normal_txn, WIP_CONSTANTS.child_txn)

2232: 1,1,0) past_timeout,
2233: NVL(wmti.overcompletion_primary_qty,0) oc_pri_qty,
2234: DECODE(NVL(wmti.overcompletion_primary_qty,-1),
2235: -1,DECODE(NVL(wmti.overcompletion_transaction_id,-1),
2236: -1,WIP_CONSTANTS.normal_txn, WIP_CONSTANTS.child_txn)
2237: ,WIP_CONSTANTS.parent_txn) oc_txn_type,
2238: -- new columns added for serial location check
2239: wmti.transaction_type txn_type,
2240: wmti.primary_item_id item_id,

Line 2237: ,WIP_CONSTANTS.parent_txn) oc_txn_type,

2233: NVL(wmti.overcompletion_primary_qty,0) oc_pri_qty,
2234: DECODE(NVL(wmti.overcompletion_primary_qty,-1),
2235: -1,DECODE(NVL(wmti.overcompletion_transaction_id,-1),
2236: -1,WIP_CONSTANTS.normal_txn, WIP_CONSTANTS.child_txn)
2237: ,WIP_CONSTANTS.parent_txn) oc_txn_type,
2238: -- new columns added for serial location check
2239: wmti.transaction_type txn_type,
2240: wmti.primary_item_id item_id,
2241: NVL(wdj.serialization_start_op, 0) sn_start_op,

Line 2248: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

2244: wip_discrete_jobs wdj
2245: WHERE wmti.wip_entity_id = wdj.wip_entity_id
2246: AND wmti.group_id = p_group_id
2247: AND TRUNC(wmti.transaction_date) = TRUNC(p_txn_date)
2248: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2249: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2250: /* Now checks for lotbased entity type also */
2251: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
2252: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)

Line 2249: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2245: WHERE wmti.wip_entity_id = wdj.wip_entity_id
2246: AND wmti.group_id = p_group_id
2247: AND TRUNC(wmti.transaction_date) = TRUNC(p_txn_date)
2248: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2249: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2250: /* Now checks for lotbased entity type also */
2251: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
2252: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)
2253: ORDER BY wmti.transaction_date,

Line 2251: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE

2247: AND TRUNC(wmti.transaction_date) = TRUNC(p_txn_date)
2248: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2249: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2250: /* Now checks for lotbased entity type also */
2251: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
2252: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)
2253: ORDER BY wmti.transaction_date,
2254: wmti.organization_id,
2255: wmti.wip_entity_id,

Line 2252: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)

2248: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2249: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2250: /* Now checks for lotbased entity type also */
2251: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
2252: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)
2253: ORDER BY wmti.transaction_date,
2254: wmti.organization_id,
2255: wmti.wip_entity_id,
2256: wmti.processing_order,

Line 2268: NVL(msn.intraoperation_step_type, WIP_CONSTANTS.QUEUE) sn_step

2264: p_move_id NUMBER) IS
2265:
2266: SELECT msn.serial_number serial,
2267: NVL(msn.operation_seq_num, p_start_op) sn_op,
2268: NVL(msn.intraoperation_step_type, WIP_CONSTANTS.QUEUE) sn_step
2269: FROM mtl_serial_numbers msn,
2270: wip_serial_move_interface wsmi,
2271: wip_move_txn_interface wmti
2272: WHERE msn.inventory_item_id = wmti.primary_item_id

Line 2308: IF (l_logLevel <= wip_constants.trace_logging) THEN

2304: l_msg_data VARCHAR2(2000);
2305: l_propagate_job_change_to_po NUMBER;
2306: BEGIN
2307: -- write parameter value to log file
2308: IF (l_logLevel <= wip_constants.trace_logging) THEN
2309: l_params(1).paramName := 'p_group_id';
2310: l_params(1).paramValue := p_gib.group_id;
2311: l_params(2).paramName := 'p_timeout';
2312: l_params(2).paramValue := p_gib.time_out;

Line 2353: IF(l_dj_txn.txn_type IN (WIP_CONSTANTS.COMP_TXN,

2349: p_move_id => l_dj_txn.txn_id) LOOP
2350:
2351: -- get MSN.OPERATION_SEQ_NUM and MSN.INTRAOPERATION_STEP_TYPE
2352:
2353: IF(l_dj_txn.txn_type IN (WIP_CONSTANTS.COMP_TXN,
2354: WIP_CONSTANTS.MOVE_TXN) AND
2355: (l_ser_loc.sn_op <> l_dj_txn.fm_op OR
2356: l_ser_loc.sn_step <> l_dj_txn.fm_step)) THEN
2357: fnd_message.set_name('WIP', 'WIP_SERIAL_LOCATION_MISSMATCH');

Line 2354: WIP_CONSTANTS.MOVE_TXN) AND

2350:
2351: -- get MSN.OPERATION_SEQ_NUM and MSN.INTRAOPERATION_STEP_TYPE
2352:
2353: IF(l_dj_txn.txn_type IN (WIP_CONSTANTS.COMP_TXN,
2354: WIP_CONSTANTS.MOVE_TXN) AND
2355: (l_ser_loc.sn_op <> l_dj_txn.fm_op OR
2356: l_ser_loc.sn_step <> l_dj_txn.fm_step)) THEN
2357: fnd_message.set_name('WIP', 'WIP_SERIAL_LOCATION_MISSMATCH');
2358: fnd_msg_pub.add;

Line 2365: l_dj_txn.to_step = WIP_CONSTANTS.QUEUE) THEN

2361: ELSE -- serial location is valid to move
2362: -- If user move back to Queue of serialization start op, we clear
2363: -- operation_seq_num and intraoperation_step_type in MSNT
2364: IF (l_dj_txn.to_op = l_dj_txn.sn_start_op AND
2365: l_dj_txn.to_step = WIP_CONSTANTS.QUEUE) THEN
2366: l_opSeq := null;
2367: l_step := null;
2368: ELSE
2369: l_opSeq := l_dj_txn.to_op;

Line 2407: IF(l_dj_txn.oc_txn_type = WIP_CONSTANTS.child_txn) THEN

2403: WHERE wop.organization_id = l_dj_txn.org_id
2404: AND wop.wip_entity_id = l_dj_txn.wip_id
2405: AND wop.operation_seq_num = l_dj_txn.fm_op;
2406:
2407: IF(l_dj_txn.oc_txn_type = WIP_CONSTANTS.child_txn) THEN
2408: -- update qty in queue step for child txn
2409: update_wipops(p_txn_id => l_dj_txn.txn_id,
2410: p_gib => p_gib,
2411: x_returnStatus => x_returnStatus);

Line 2420: IF(l_dj_txn.fm_step = WIP_CONSTANTS.QUEUE) THEN

2416: END IF; -- check return status
2417:
2418: ELSE -- IF it is parent or normal txn, validate qty
2419:
2420: IF(l_dj_txn.fm_step = WIP_CONSTANTS.QUEUE) THEN
2421: IF(l_dj_txn.qty > l_queue_qty + l_dj_txn.oc_pri_qty + 0.00001) THEN
2422: l_notenough := TRUE;
2423: END IF;
2424: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.RUN) THEN

Line 2424: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.RUN) THEN

2420: IF(l_dj_txn.fm_step = WIP_CONSTANTS.QUEUE) THEN
2421: IF(l_dj_txn.qty > l_queue_qty + l_dj_txn.oc_pri_qty + 0.00001) THEN
2422: l_notenough := TRUE;
2423: END IF;
2424: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.RUN) THEN
2425: IF(l_dj_txn.qty > l_run_qty + l_dj_txn.oc_pri_qty + 0.00001) THEN
2426: l_notenough := TRUE;
2427: END IF;
2428: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.TOMOVE) THEN

Line 2428: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.TOMOVE) THEN

2424: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.RUN) THEN
2425: IF(l_dj_txn.qty > l_run_qty + l_dj_txn.oc_pri_qty + 0.00001) THEN
2426: l_notenough := TRUE;
2427: END IF;
2428: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.TOMOVE) THEN
2429: IF(l_dj_txn.qty > l_tomove_qty + l_dj_txn.oc_pri_qty + 0.00001) THEN
2430: l_notenough := TRUE;
2431: END IF;
2432: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.REJECT) THEN

Line 2432: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.REJECT) THEN

2428: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.TOMOVE) THEN
2429: IF(l_dj_txn.qty > l_tomove_qty + l_dj_txn.oc_pri_qty + 0.00001) THEN
2430: l_notenough := TRUE;
2431: END IF;
2432: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.REJECT) THEN
2433: IF(l_dj_txn.qty > l_reject_qty + l_dj_txn.oc_pri_qty + 0.00001) THEN
2434: l_notenough := TRUE;
2435: END IF;
2436: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.SCRAP) THEN

Line 2436: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.SCRAP) THEN

2432: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.REJECT) THEN
2433: IF(l_dj_txn.qty > l_reject_qty + l_dj_txn.oc_pri_qty + 0.00001) THEN
2434: l_notenough := TRUE;
2435: END IF;
2436: ELSIF(l_dj_txn.fm_step = WIP_CONSTANTS.SCRAP) THEN
2437: IF(l_dj_txn.qty > l_scrap_qty + l_dj_txn.oc_pri_qty + 0.00001) THEN
2438: l_notenough := TRUE;
2439: END IF;
2440: END IF; -- fm_step check

Line 2444: IF(p_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN

2440: END IF; -- fm_step check
2441: END IF; -- child txn check
2442:
2443: IF(l_notenough) THEN
2444: IF(p_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN
2445: IF (l_dj_txn.past_timeout = 0) THEN -- not time out yet
2446: UPDATE wip_move_txn_interface
2447: SET process_status = WIP_CONSTANTS.PENDING,
2448: group_id = NULL,

Line 2447: SET process_status = WIP_CONSTANTS.PENDING,

2443: IF(l_notenough) THEN
2444: IF(p_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN
2445: IF (l_dj_txn.past_timeout = 0) THEN -- not time out yet
2446: UPDATE wip_move_txn_interface
2447: SET process_status = WIP_CONSTANTS.PENDING,
2448: group_id = NULL,
2449: transaction_id = NULL
2450: WHERE transaction_id = l_dj_txn.txn_id
2451: AND group_id = p_gib.group_id;

Line 2461: IF(l_dj_txn.oc_txn_type = WIP_CONSTANTS.parent_txn) THEN

2457: fnd_msg_pub.add;
2458: l_errMsg := 'available qty is not enough to fullfill move txn';
2459: raise fnd_api.g_exc_unexpected_error;
2460: ELSE -- enough qty to move
2461: IF(l_dj_txn.oc_txn_type = WIP_CONSTANTS.parent_txn) THEN
2462:
2463: -- all procedure in this loop is pretty much for child record
2464: -- IF it is over completion/move txn, insert child record to WMTI
2465: insert_alloc_child(p_org_id => l_dj_txn.org_id,

Line 2476: SET process_status = WIP_CONSTANTS.PENDING,

2472:
2473: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN
2474: IF (l_dj_txn.past_timeout = 0) THEN -- not time out yet
2475: UPDATE wip_move_txn_interface
2476: SET process_status = WIP_CONSTANTS.PENDING,
2477: group_id = NULL,
2478: transaction_id = NULL
2479: WHERE transaction_id = l_dj_txn.txn_id
2480: AND group_id = p_gib.group_id;

Line 2501: p_fm_step => WIP_CONSTANTS.QUEUE,

2497:
2498: -- update wip_operations for child move txns
2499: update_wo_dj(p_gib => p_gib,
2500: p_fm_op => l_oc_fm_op,
2501: p_fm_step => WIP_CONSTANTS.QUEUE,
2502: p_to_op => l_dj_txn.fm_op,
2503: p_to_step => l_dj_txn.fm_step,
2504: p_qty => l_dj_txn.oc_pri_qty,
2505: p_org_id => l_dj_txn.org_id,

Line 2526: IF(l_propagate_job_change_to_po = WIP_CONSTANTS.YES) THEN

2522: INTO l_propagate_job_change_to_po
2523: FROM wip_parameters
2524: WHERE organization_id = l_dj_txn.org_id;
2525:
2526: IF(l_propagate_job_change_to_po = WIP_CONSTANTS.YES) THEN
2527: wip_osp.updatePOReqQuantity(
2528: p_job_id => l_dj_txn.wip_id,
2529: p_org_id => l_dj_txn.org_id,
2530: p_changed_qty => l_dj_txn.oc_pri_qty,

Line 2541: END IF; -- l_propagate_job_change_to_po = WIP_CONSTANTS.YES

2537: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
2538: l_errMsg := 'wip_osp.updatePOReqQuantity failed';
2539: raise fnd_api.g_exc_unexpected_error;
2540: END IF; -- x_returnStatus
2541: END IF; -- l_propagate_job_change_to_po = WIP_CONSTANTS.YES
2542: END IF; -- l_dj_txn.oc_pri_qty <> 0 and customer have PO FPJ
2543: END IF; -- IF parent_txn
2544:
2545: -- update wip_operations for parent and normal move txns

Line 2572: IF(p_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN

2568: -- Fixed bug 4406536. We should error out only problematic record and
2569: -- continue to process next record.
2570: EXCEPTION
2571: WHEN fnd_api.g_exc_unexpected_error THEN
2572: IF(p_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN
2573: /*Bug 10379152: when there is exception happenes after serial update, we want to rollback
2574: to this savepoint check_qty_dj_savepoint to avoid serial number being updated for failed move transaction*/
2575: rollback to check_qty_dj_savepoint;
2576:

Line 2579: SET process_status = WIP_CONSTANTS.PENDING,

2575: rollback to check_qty_dj_savepoint;
2576:
2577: IF (l_dj_txn.past_timeout = 0) THEN -- not time out yet
2578: UPDATE wip_move_txn_interface
2579: SET process_status = WIP_CONSTANTS.PENDING,
2580: group_id = NULL,
2581: transaction_id = NULL
2582: WHERE transaction_id = l_dj_txn.txn_id
2583: AND group_id = p_gib.group_id;

Line 2586: SET process_status = WIP_CONSTANTS.ERROR

2582: WHERE transaction_id = l_dj_txn.txn_id
2583: AND group_id = p_gib.group_id;
2584: ELSE -- already time out
2585: UPDATE wip_move_txn_interface
2586: SET process_status = WIP_CONSTANTS.ERROR
2587: WHERE transaction_id = l_dj_txn.txn_id
2588: AND group_id = p_gib.group_id;
2589: -- Get error from message stack
2590: wip_utilities.get_message_stack(p_msg =>l_msg);

Line 2641: IF (l_logLevel <= wip_constants.trace_logging) THEN

2637: END IF;
2638: x_returnStatus := fnd_api.g_ret_sts_success;
2639:
2640: -- write to the log file
2641: IF (l_logLevel <= wip_constants.trace_logging) THEN
2642: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.check_qty_dj',
2643: p_procReturnStatus => x_returnStatus,
2644: p_msg => 'procedure complete',
2645: x_returnStatus => l_returnStatus);

Line 2656: IF (l_logLevel <= wip_constants.trace_logging) THEN

2652: CLOSE c_dj_txn;
2653: END IF;
2654: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2655:
2656: IF (l_logLevel <= wip_constants.trace_logging) THEN
2657: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.check_qty_dj',
2658: p_procReturnStatus => x_returnStatus,
2659: p_msg => l_errMsg,
2660: x_returnStatus => l_returnStatus);

Line 2670: IF (l_logLevel <= wip_constants.trace_logging) THEN

2666: END IF;
2667: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2668: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
2669:
2670: IF (l_logLevel <= wip_constants.trace_logging) THEN
2671: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.check_qty_dj',
2672: p_procReturnStatus => x_returnStatus,
2673: p_msg => l_errMsg,
2674: x_returnStatus => l_returnStatus);

Line 2705: IF (l_logLevel <= wip_constants.trace_logging) THEN

2701: -- initialize l_move
2702: l_move := p_gib.move_profile;
2703:
2704: -- write parameter value to log file
2705: IF (l_logLevel <= wip_constants.trace_logging) THEN
2706: l_params(1).paramName := 'p_group_id';
2707: l_params(1).paramValue := p_gib.group_id;
2708: l_params(2).paramName := 'p_txn_date';
2709: l_params(2).paramValue := p_gib.txn_date;

Line 2747: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE) THEN

2743: p_params => l_params,
2744: x_returnStatus => l_returnStatus);
2745: END IF;
2746:
2747: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE) THEN
2748:
2749: /* Fix for FP bug 5246228 base bug 5227706:
2750: * Modified following query to consider autocharge
2751: * resources in previous operation for overcompletion cases */

Line 2778: SELECT SUM(DECODE(transaction_type, WIP_CONSTANTS.COMP_TXN, 1, 0)),

2774: Changed < to <= in above condition */
2775:
2776: ELSE -- move_mode is background
2777:
2778: SELECT SUM(DECODE(transaction_type, WIP_CONSTANTS.COMP_TXN, 1, 0)),
2779: SUM(DECODE(transaction_type, WIP_CONSTANTS.RET_TXN, 1, 0))
2780: INTO l_completion,
2781: l_return
2782: FROM wip_move_txn_interface wmti

Line 2779: SUM(DECODE(transaction_type, WIP_CONSTANTS.RET_TXN, 1, 0))

2775:
2776: ELSE -- move_mode is background
2777:
2778: SELECT SUM(DECODE(transaction_type, WIP_CONSTANTS.COMP_TXN, 1, 0)),
2779: SUM(DECODE(transaction_type, WIP_CONSTANTS.RET_TXN, 1, 0))
2780: INTO l_completion,
2781: l_return
2782: FROM wip_move_txn_interface wmti
2783: WHERE wmti.group_id = p_gib.group_id

Line 2785: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

2781: l_return
2782: FROM wip_move_txn_interface wmti
2783: WHERE wmti.group_id = p_gib.group_id
2784: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
2785: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2786: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
2787:
2788: -- set completion and return flag
2789: IF(l_completion > 0) THEN

Line 2786: AND wmti.process_status = WIP_CONSTANTS.RUNNING;

2782: FROM wip_move_txn_interface wmti
2783: WHERE wmti.group_id = p_gib.group_id
2784: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
2785: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2786: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
2787:
2788: -- set completion and return flag
2789: IF(l_completion > 0) THEN
2790: l_move.easyComplete := WIP_CONSTANTS.YES;

Line 2790: l_move.easyComplete := WIP_CONSTANTS.YES;

2786: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
2787:
2788: -- set completion and return flag
2789: IF(l_completion > 0) THEN
2790: l_move.easyComplete := WIP_CONSTANTS.YES;
2791: ELSE
2792: l_move.easyComplete := WIP_CONSTANTS.NO;
2793: END IF;
2794:

Line 2792: l_move.easyComplete := WIP_CONSTANTS.NO;

2788: -- set completion and return flag
2789: IF(l_completion > 0) THEN
2790: l_move.easyComplete := WIP_CONSTANTS.YES;
2791: ELSE
2792: l_move.easyComplete := WIP_CONSTANTS.NO;
2793: END IF;
2794:
2795: IF(l_return > 0) THEN
2796: l_move.easyReturn := WIP_CONSTANTS.YES;

Line 2796: l_move.easyReturn := WIP_CONSTANTS.YES;

2792: l_move.easyComplete := WIP_CONSTANTS.NO;
2793: END IF;
2794:
2795: IF(l_return > 0) THEN
2796: l_move.easyReturn := WIP_CONSTANTS.YES;
2797: ELSE
2798: l_move.easyReturn := WIP_CONSTANTS.NO;
2799: END IF;
2800: /* Fix for bug 3902908: Added hints as per suggestion of appsperf team. */

Line 2798: l_move.easyReturn := WIP_CONSTANTS.NO;

2794:
2795: IF(l_return > 0) THEN
2796: l_move.easyReturn := WIP_CONSTANTS.YES;
2797: ELSE
2798: l_move.easyReturn := WIP_CONSTANTS.NO;
2799: END IF;
2800: /* Fix for bug 3902908: Added hints as per suggestion of appsperf team. */
2801: /* Fix for FP bug 5246228 base bug 5227706: Modified following query to consider autocharge
2802: resources in previous operation for overcompletion cases */

Line 2818: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

2814: FROM wip_move_txn_interface wmti,
2815: wip_operation_resources wor
2816: WHERE wmti.group_id = p_gib.group_id
2817: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
2818: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2819: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2820: AND wor.organization_id = wmti.organization_id
2821: AND wor.wip_entity_id = wmti.wip_entity_id
2822: AND ((wmti.overcompletion_primary_qty IS NULL

Line 2819: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2815: wip_operation_resources wor
2816: WHERE wmti.group_id = p_gib.group_id
2817: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
2818: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2819: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2820: AND wor.organization_id = wmti.organization_id
2821: AND wor.wip_entity_id = wmti.wip_entity_id
2822: AND ((wmti.overcompletion_primary_qty IS NULL
2823: AND (wor.operation_seq_num BETWEEN wmti.fm_operation_seq_num

Line 2836: l_move.rsrcItem := WIP_CONSTANTS.YES;

2832: END IF; -- move_mode is online
2833:
2834: -- set the rest of move_profile flag
2835: IF(l_mv_item > 0) THEN -- auto resource per item
2836: l_move.rsrcItem := WIP_CONSTANTS.YES;
2837: ELSE
2838: l_move.rsrcItem := WIP_CONSTANTS.NO;
2839: END IF;
2840:

Line 2838: l_move.rsrcItem := WIP_CONSTANTS.NO;

2834: -- set the rest of move_profile flag
2835: IF(l_mv_item > 0) THEN -- auto resource per item
2836: l_move.rsrcItem := WIP_CONSTANTS.YES;
2837: ELSE
2838: l_move.rsrcItem := WIP_CONSTANTS.NO;
2839: END IF;
2840:
2841: IF(l_mv_lot > 0) THEN -- auto resource per lot
2842: l_move.rsrcLot := WIP_CONSTANTS.YES;

Line 2842: l_move.rsrcLot := WIP_CONSTANTS.YES;

2838: l_move.rsrcItem := WIP_CONSTANTS.NO;
2839: END IF;
2840:
2841: IF(l_mv_lot > 0) THEN -- auto resource per lot
2842: l_move.rsrcLot := WIP_CONSTANTS.YES;
2843: ELSE
2844: l_move.rsrcLot := WIP_CONSTANTS.NO;
2845: END IF;
2846:

Line 2844: l_move.rsrcLot := WIP_CONSTANTS.NO;

2840:
2841: IF(l_mv_lot > 0) THEN -- auto resource per lot
2842: l_move.rsrcLot := WIP_CONSTANTS.YES;
2843: ELSE
2844: l_move.rsrcLot := WIP_CONSTANTS.NO;
2845: END IF;
2846:
2847: IF(l_po_item > 0) THEN -- po requisition per item
2848: l_move.poReqItem := WIP_CONSTANTS.YES;

Line 2848: l_move.poReqItem := WIP_CONSTANTS.YES;

2844: l_move.rsrcLot := WIP_CONSTANTS.NO;
2845: END IF;
2846:
2847: IF(l_po_item > 0) THEN -- po requisition per item
2848: l_move.poReqItem := WIP_CONSTANTS.YES;
2849: ELSE
2850: l_move.poReqItem := WIP_CONSTANTS.NO;
2851: END IF;
2852:

Line 2850: l_move.poReqItem := WIP_CONSTANTS.NO;

2846:
2847: IF(l_po_item > 0) THEN -- po requisition per item
2848: l_move.poReqItem := WIP_CONSTANTS.YES;
2849: ELSE
2850: l_move.poReqItem := WIP_CONSTANTS.NO;
2851: END IF;
2852:
2853: IF(l_po_lot > 0) THEN -- po requisition per lot
2854: l_move.poReqLot := WIP_CONSTANTS.YES;

Line 2854: l_move.poReqLot := WIP_CONSTANTS.YES;

2850: l_move.poReqItem := WIP_CONSTANTS.NO;
2851: END IF;
2852:
2853: IF(l_po_lot > 0) THEN -- po requisition per lot
2854: l_move.poReqLot := WIP_CONSTANTS.YES;
2855: ELSE
2856: l_move.poReqLot := WIP_CONSTANTS.NO;
2857: END IF;
2858:

Line 2856: l_move.poReqLot := WIP_CONSTANTS.NO;

2852:
2853: IF(l_po_lot > 0) THEN -- po requisition per lot
2854: l_move.poReqLot := WIP_CONSTANTS.YES;
2855: ELSE
2856: l_move.poReqLot := WIP_CONSTANTS.NO;
2857: END IF;
2858:
2859: -- return move profile back
2860: p_gib.move_profile := l_move;

Line 2865: IF (l_logLevel <= wip_constants.trace_logging) THEN

2861:
2862: x_returnStatus := fnd_api.g_ret_sts_success;
2863:
2864: -- write to the log file
2865: IF (l_logLevel <= wip_constants.trace_logging) THEN
2866: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.get_move_profile',
2867: p_procReturnStatus => x_returnStatus,
2868: p_msg => 'procedure complete',
2869: x_returnStatus => l_returnStatus);

Line 2877: IF (l_logLevel <= wip_constants.trace_logging) THEN

2873: WHEN others THEN
2874: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2875: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
2876:
2877: IF (l_logLevel <= wip_constants.trace_logging) THEN
2878: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.get_move_profile',
2879: p_procReturnStatus => x_returnStatus,
2880: p_msg => l_errMsg,
2881: x_returnStatus => l_returnStatus);

Line 2904: IF (l_logLevel <= wip_constants.trace_logging) THEN

2900: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
2901:
2902: BEGIN
2903: -- write parameter value to log file
2904: IF (l_logLevel <= wip_constants.trace_logging) THEN
2905: l_params(1).paramName := 'p_group_id';
2906: l_params(1).paramValue := p_gib.group_id;
2907: l_params(2).paramName := 'p_txn_date';
2908: l_params(2).paramValue := p_gib.txn_date;

Line 2952: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

2948: wip_move_txn_interface wmti
2949: WHERE wsmi.transaction_id = wmti.transaction_id
2950: AND wmti.group_id = p_gib.group_id
2951: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
2952: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2953: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
2954:
2955: -- IF debug message level = 2, write statement below to log file
2956: IF (l_logLevel <= wip_constants.full_logging) THEN

Line 2953: AND wmti.process_status = WIP_CONSTANTS.RUNNING;

2949: WHERE wsmi.transaction_id = wmti.transaction_id
2950: AND wmti.group_id = p_gib.group_id
2951: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
2952: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2953: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
2954:
2955: -- IF debug message level = 2, write statement below to log file
2956: IF (l_logLevel <= wip_constants.full_logging) THEN
2957: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');

Line 2956: IF (l_logLevel <= wip_constants.full_logging) THEN

2952: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
2953: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
2954:
2955: -- IF debug message level = 2, write statement below to log file
2956: IF (l_logLevel <= wip_constants.full_logging) THEN
2957: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
2958: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
2959: fnd_message.set_token('ENTITY2', 'WIP_SERIAL_MOVE_TRANSACTIONS');
2960: l_msg := fnd_message.get;

Line 3091: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

3087: FROM wip_move_txn_interface wmti,
3088: wip_discrete_jobs wdj
3089: WHERE wmti.group_id = p_gib.group_id
3090: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3091: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3092: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3093: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
3094: WIP_CONSTANTS.LOTBASED)
3095: AND wdj.wip_entity_id = wmti.wip_entity_id

Line 3092: AND wmti.process_status = WIP_CONSTANTS.RUNNING

3088: wip_discrete_jobs wdj
3089: WHERE wmti.group_id = p_gib.group_id
3090: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3091: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3092: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3093: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
3094: WIP_CONSTANTS.LOTBASED)
3095: AND wdj.wip_entity_id = wmti.wip_entity_id
3096: AND wdj.organization_id = wmti.organization_id;

Line 3093: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,

3089: WHERE wmti.group_id = p_gib.group_id
3090: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3091: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3092: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3093: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
3094: WIP_CONSTANTS.LOTBASED)
3095: AND wdj.wip_entity_id = wmti.wip_entity_id
3096: AND wdj.organization_id = wmti.organization_id;
3097:

Line 3094: WIP_CONSTANTS.LOTBASED)

3090: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3091: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3092: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3093: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
3094: WIP_CONSTANTS.LOTBASED)
3095: AND wdj.wip_entity_id = wmti.wip_entity_id
3096: AND wdj.organization_id = wmti.organization_id;
3097:
3098: -- IF debug message level = 2, write statement below to log file

Line 3099: IF (l_logLevel <= wip_constants.full_logging) THEN

3095: AND wdj.wip_entity_id = wmti.wip_entity_id
3096: AND wdj.organization_id = wmti.organization_id;
3097:
3098: -- IF debug message level = 2, write statement below to log file
3099: IF (l_logLevel <= wip_constants.full_logging) THEN
3100: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
3101: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
3102: fnd_message.set_token('ENTITY2', 'WIP_MOVE_TRANSACTIONS');
3103: l_msg := fnd_message.get;

Line 3224: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

3220: wmti.overcompletion_transaction_id
3221: FROM wip_move_txn_interface wmti
3222: WHERE wmti.group_id = p_gib.group_id
3223: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3224: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3225: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3226: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE;
3227:
3228: -- IF debug message level = 2, write statement below to log file

Line 3225: AND wmti.process_status = WIP_CONSTANTS.RUNNING

3221: FROM wip_move_txn_interface wmti
3222: WHERE wmti.group_id = p_gib.group_id
3223: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3224: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3225: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3226: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE;
3227:
3228: -- IF debug message level = 2, write statement below to log file
3229: IF (l_logLevel <= wip_constants.full_logging) THEN

Line 3226: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE;

3222: WHERE wmti.group_id = p_gib.group_id
3223: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3224: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3225: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3226: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE;
3227:
3228: -- IF debug message level = 2, write statement below to log file
3229: IF (l_logLevel <= wip_constants.full_logging) THEN
3230: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');

Line 3229: IF (l_logLevel <= wip_constants.full_logging) THEN

3225: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3226: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE;
3227:
3228: -- IF debug message level = 2, write statement below to log file
3229: IF (l_logLevel <= wip_constants.full_logging) THEN
3230: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
3231: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
3232: fnd_message.set_token('ENTITY2', 'WIP_MOVE_TRANSACTIONS');
3233: l_msg := fnd_message.get;

Line 3241: IF (l_logLevel <= wip_constants.trace_logging) THEN

3237:
3238: x_returnStatus := fnd_api.g_ret_sts_success;
3239:
3240: -- write to the log file
3241: IF (l_logLevel <= wip_constants.trace_logging) THEN
3242: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_txn_history',
3243: p_procReturnStatus => x_returnStatus,
3244: p_msg => 'procedure complete',
3245: x_returnStatus => l_returnStatus);

Line 3253: IF (l_logLevel <= wip_constants.trace_logging) THEN

3249: WHEN others THEN
3250: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
3251: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
3252:
3253: IF (l_logLevel <= wip_constants.trace_logging) THEN
3254: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_txn_history',
3255: p_procReturnStatus => x_returnStatus,
3256: p_msg => l_errMsg,
3257: x_returnStatus => l_returnStatus);

Line 3281: IF (l_logLevel <= wip_constants.trace_logging) THEN

3277: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
3278:
3279: BEGIN
3280: -- write parameter value to log file
3281: IF (l_logLevel <= wip_constants.trace_logging) THEN
3282: l_params(1).paramName := 'p_group_id';
3283: l_params(1).paramValue := p_gib.group_id;
3284: l_params(2).paramName := 'p_txn_date';
3285: l_params(2).paramValue := p_gib.txn_date;

Line 3295: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

3291: -- delete child records from WIP
3292: DELETE FROM wip_move_txn_interface wmti
3293: WHERE wmti.group_id = p_gib.group_id
3294: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3295: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3296: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3297: AND wmti.overcompletion_transaction_id IS NOT NULL
3298: AND wmti.overcompletion_primary_qty IS NULL
3299: AND wmti.fm_operation_seq_num = wmti.to_operation_seq_num

Line 3296: AND wmti.process_status = WIP_CONSTANTS.RUNNING

3292: DELETE FROM wip_move_txn_interface wmti
3293: WHERE wmti.group_id = p_gib.group_id
3294: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3295: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3296: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3297: AND wmti.overcompletion_transaction_id IS NOT NULL
3298: AND wmti.overcompletion_primary_qty IS NULL
3299: AND wmti.fm_operation_seq_num = wmti.to_operation_seq_num
3300: AND wmti.fm_intraoperation_step_type =

Line 3302: AND wmti.fm_intraoperation_step_type = WIP_CONSTANTS.QUEUE;

3298: AND wmti.overcompletion_primary_qty IS NULL
3299: AND wmti.fm_operation_seq_num = wmti.to_operation_seq_num
3300: AND wmti.fm_intraoperation_step_type =
3301: wmti.to_intraoperation_step_type
3302: AND wmti.fm_intraoperation_step_type = WIP_CONSTANTS.QUEUE;
3303:
3304: x_returnStatus := fnd_api.g_ret_sts_success;
3305:
3306: -- write to the log file

Line 3307: IF (l_logLevel <= wip_constants.trace_logging) THEN

3303:
3304: x_returnStatus := fnd_api.g_ret_sts_success;
3305:
3306: -- write to the log file
3307: IF (l_logLevel <= wip_constants.trace_logging) THEN
3308: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.delete_child_txn',
3309: p_procReturnStatus => x_returnStatus,
3310: p_msg => 'procedure complete',
3311: x_returnStatus => l_returnStatus);

Line 3318: IF (l_logLevel <= wip_constants.trace_logging) THEN

3314: EXCEPTION
3315: WHEN others THEN
3316: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
3317: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
3318: IF (l_logLevel <= wip_constants.trace_logging) THEN
3319: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.delete_child_txn',
3320: p_procReturnStatus => x_returnStatus,
3321: p_msg => l_errMsg,
3322: x_returnStatus => l_returnStatus);

Line 3349: IF (l_logLevel <= wip_constants.trace_logging) THEN

3345: BEGIN
3346: l_move := p_gib.move_profile;
3347:
3348: -- write parameter value to log file
3349: IF (l_logLevel <= wip_constants.trace_logging) THEN
3350: l_params(1).paramName := 'p_group_id';
3351: l_params(1).paramValue := p_gib.group_id;
3352: l_params(2).paramName := 'p_txn_date';
3353: l_params(2).paramValue := p_gib.txn_date;

Line 3390: IF(l_move.jobTxn = WIP_CONSTANTS.YES AND

3386: x_returnStatus => l_returnStatus);
3387: END IF;
3388:
3389: -- Per item basis type for discrete jobs
3390: IF(l_move.jobTxn = WIP_CONSTANTS.YES AND
3391: l_move.rsrcItem = WIP_CONSTANTS.YES) THEN
3392: /* Fix for bug 4036149: Added leading hint to drive from the table
3393: wip_move_txn_interface to improve performance */
3394: INSERT INTO wip_cost_txn_interface

Line 3391: l_move.rsrcItem = WIP_CONSTANTS.YES) THEN

3387: END IF;
3388:
3389: -- Per item basis type for discrete jobs
3390: IF(l_move.jobTxn = WIP_CONSTANTS.YES AND
3391: l_move.rsrcItem = WIP_CONSTANTS.YES) THEN
3392: /* Fix for bug 4036149: Added leading hint to drive from the table
3393: wip_move_txn_interface to improve performance */
3394: INSERT INTO wip_cost_txn_interface
3395: (transaction_id,

Line 3467: WIP_CONSTANTS.RES_PROC, -- process_phase

3463: DECODE(p_gib.request_id,-1,NULL,SYSDATE), -- program_update_date
3464: p_gib.group_id,
3465: wmti.source_code,
3466: wmti.source_line_id,
3467: WIP_CONSTANTS.RES_PROC, -- process_phase
3468: WIP_CONSTANTS.PENDING, -- process_status
3469: WIP_CONSTANTS.RES_TXN, -- transaction_type
3470: wmti.organization_id,
3471: wmti.organization_code,

Line 3468: WIP_CONSTANTS.PENDING, -- process_status

3464: p_gib.group_id,
3465: wmti.source_code,
3466: wmti.source_line_id,
3467: WIP_CONSTANTS.RES_PROC, -- process_phase
3468: WIP_CONSTANTS.PENDING, -- process_status
3469: WIP_CONSTANTS.RES_TXN, -- transaction_type
3470: wmti.organization_id,
3471: wmti.organization_code,
3472: wmti.wip_entity_id,

Line 3469: WIP_CONSTANTS.RES_TXN, -- transaction_type

3465: wmti.source_code,
3466: wmti.source_line_id,
3467: WIP_CONSTANTS.RES_PROC, -- process_phase
3468: WIP_CONSTANTS.PENDING, -- process_status
3469: WIP_CONSTANTS.RES_TXN, -- transaction_type
3470: wmti.organization_id,
3471: wmti.organization_code,
3472: wmti.wip_entity_id,
3473: wmti.entity_type,

Line 3495: WIP_CONSTANTS.RUN),

3491: wor.usage_rate_or_amount * NVL(wmti.primary_quantity *
3492: DECODE(
3493: SIGN(wmti.to_operation_seq_num - wmti.fm_operation_seq_num),
3494: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
3495: WIP_CONSTANTS.RUN),
3496: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3497: WIP_CONSTANTS.RUN),1,1,-1),
3498: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3499: WIP_CONSTANTS.RUN),1,1,-1),

Line 3497: WIP_CONSTANTS.RUN),1,1,-1),

3493: SIGN(wmti.to_operation_seq_num - wmti.fm_operation_seq_num),
3494: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
3495: WIP_CONSTANTS.RUN),
3496: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3497: WIP_CONSTANTS.RUN),1,1,-1),
3498: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3499: WIP_CONSTANTS.RUN),1,1,-1),
3500: 1,-1),
3501: 1, 1,

Line 3499: WIP_CONSTANTS.RUN),1,1,-1),

3495: WIP_CONSTANTS.RUN),
3496: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3497: WIP_CONSTANTS.RUN),1,1,-1),
3498: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3499: WIP_CONSTANTS.RUN),1,1,-1),
3500: 1,-1),
3501: 1, 1,
3502: -1,-1),
3503: 0), -- transaction_quantity

Line 3509: WIP_CONSTANTS.RUN),

3505: wor.usage_rate_or_amount * NVL(wmti.primary_quantity *
3506: DECODE(
3507: SIGN(wmti.to_operation_seq_num - wmti.fm_operation_seq_num),
3508: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
3509: WIP_CONSTANTS.RUN),
3510: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3511: WIP_CONSTANTS.RUN),1,1,-1),
3512: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3513: WIP_CONSTANTS.RUN),1,1,-1),

Line 3511: WIP_CONSTANTS.RUN),1,1,-1),

3507: SIGN(wmti.to_operation_seq_num - wmti.fm_operation_seq_num),
3508: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
3509: WIP_CONSTANTS.RUN),
3510: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3511: WIP_CONSTANTS.RUN),1,1,-1),
3512: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3513: WIP_CONSTANTS.RUN),1,1,-1),
3514: 1,-1),
3515: 1, 1,

Line 3513: WIP_CONSTANTS.RUN),1,1,-1),

3509: WIP_CONSTANTS.RUN),
3510: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3511: WIP_CONSTANTS.RUN),1,1,-1),
3512: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3513: WIP_CONSTANTS.RUN),1,1,-1),
3514: 1,-1),
3515: 1, 1,
3516: -1,-1),
3517: 0), -- primary_quantity

Line 3540: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

3536: wip_operations wop,
3537: wip_move_txn_interface wmti
3538: WHERE wmti.group_id = p_gib.group_id
3539: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3540: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3541: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3542: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
3543: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
3544: AND wop.organization_id = wmti.organization_id

Line 3541: AND wmti.process_status = WIP_CONSTANTS.RUNNING

3537: wip_move_txn_interface wmti
3538: WHERE wmti.group_id = p_gib.group_id
3539: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3540: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3541: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3542: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
3543: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
3544: AND wop.organization_id = wmti.organization_id
3545: AND wop.wip_entity_id = wmti.wip_entity_id

Line 3542: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE

3538: WHERE wmti.group_id = p_gib.group_id
3539: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3540: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3541: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3542: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
3543: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
3544: AND wop.organization_id = wmti.organization_id
3545: AND wop.wip_entity_id = wmti.wip_entity_id
3546: AND wop.organization_id = wor.organization_id

Line 3543: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */

3539: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3540: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3541: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3542: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
3543: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
3544: AND wop.organization_id = wmti.organization_id
3545: AND wop.wip_entity_id = wmti.wip_entity_id
3546: AND wop.organization_id = wor.organization_id
3547: AND wop.wip_entity_id = wor.wip_entity_id

Line 3550: AND NVL(wop.skip_flag, WIP_CONSTANTS.NO) <> WIP_CONSTANTS.YES

3546: AND wop.organization_id = wor.organization_id
3547: AND wop.wip_entity_id = wor.wip_entity_id
3548: AND wop.operation_seq_num = wor.operation_seq_num
3549: /* added for OSFM jump enhancement 2541431 */
3550: AND NVL(wop.skip_flag, WIP_CONSTANTS.NO) <> WIP_CONSTANTS.YES
3551: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE
3552: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
3553: AND wop.organization_id = bd.organization_id
3554: AND NVL(wor.department_id, wop.department_id) = bd.department_id

Line 3551: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE

3547: AND wop.wip_entity_id = wor.wip_entity_id
3548: AND wop.operation_seq_num = wor.operation_seq_num
3549: /* added for OSFM jump enhancement 2541431 */
3550: AND NVL(wop.skip_flag, WIP_CONSTANTS.NO) <> WIP_CONSTANTS.YES
3551: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE
3552: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
3553: AND wop.organization_id = bd.organization_id
3554: AND NVL(wor.department_id, wop.department_id) = bd.department_id
3555: AND wor.organization_id = br.organization_id

Line 3552: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM

3548: AND wop.operation_seq_num = wor.operation_seq_num
3549: /* added for OSFM jump enhancement 2541431 */
3550: AND NVL(wop.skip_flag, WIP_CONSTANTS.NO) <> WIP_CONSTANTS.YES
3551: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE
3552: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
3553: AND wop.organization_id = bd.organization_id
3554: AND NVL(wor.department_id, wop.department_id) = bd.department_id
3555: AND wor.organization_id = br.organization_id
3556: AND wor.resource_id = br.resource_id

Line 3564: WIP_CONSTANTS.RUN), 1,1,0)

3560: AND wdj.organization_id = wmti.organization_id
3561: AND (
3562: (wop.operation_seq_num >= wmti.fm_operation_seq_num
3563: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3564: WIP_CONSTANTS.RUN), 1,1,0)
3565: AND wop.operation_seq_num < wmti.to_operation_seq_num
3566: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3567: WIP_CONSTANTS.RUN),1,1,0)
3568: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num

Line 3567: WIP_CONSTANTS.RUN),1,1,0)

3563: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3564: WIP_CONSTANTS.RUN), 1,1,0)
3565: AND wop.operation_seq_num < wmti.to_operation_seq_num
3566: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3567: WIP_CONSTANTS.RUN),1,1,0)
3568: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
3569: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
3570: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
3571: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

Line 3570: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN

3566: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3567: WIP_CONSTANTS.RUN),1,1,0)
3568: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
3569: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
3570: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
3571: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
3572: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3573: OR wop.operation_seq_num = wmti.fm_operation_seq_num
3574: OR (wop.operation_seq_num = wmti.to_operation_seq_num

Line 3571: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

3567: WIP_CONSTANTS.RUN),1,1,0)
3568: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
3569: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
3570: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
3571: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
3572: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3573: OR wop.operation_seq_num = wmti.fm_operation_seq_num
3574: OR (wop.operation_seq_num = wmti.to_operation_seq_num
3575: AND wmti.to_intraoperation_step_type >

Line 3572: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL

3568: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
3569: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
3570: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
3571: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
3572: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3573: OR wop.operation_seq_num = wmti.fm_operation_seq_num
3574: OR (wop.operation_seq_num = wmti.to_operation_seq_num
3575: AND wmti.to_intraoperation_step_type >
3576: WIP_CONSTANTS.RUN)))

Line 3576: WIP_CONSTANTS.RUN)))

3572: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3573: OR wop.operation_seq_num = wmti.fm_operation_seq_num
3574: OR (wop.operation_seq_num = wmti.to_operation_seq_num
3575: AND wmti.to_intraoperation_step_type >
3576: WIP_CONSTANTS.RUN)))
3577: OR
3578: (wop.operation_seq_num < wmti.fm_operation_seq_num
3579: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3580: WIP_CONSTANTS.RUN),1,1,0)

Line 3580: WIP_CONSTANTS.RUN),1,1,0)

3576: WIP_CONSTANTS.RUN)))
3577: OR
3578: (wop.operation_seq_num < wmti.fm_operation_seq_num
3579: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3580: WIP_CONSTANTS.RUN),1,1,0)
3581: AND wop.operation_seq_num >= wmti.to_operation_seq_num
3582: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3583: WIP_CONSTANTS.RUN),1,1,0)
3584: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num

Line 3583: WIP_CONSTANTS.RUN),1,1,0)

3579: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3580: WIP_CONSTANTS.RUN),1,1,0)
3581: AND wop.operation_seq_num >= wmti.to_operation_seq_num
3582: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3583: WIP_CONSTANTS.RUN),1,1,0)
3584: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
3585: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
3586: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
3587: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

Line 3586: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN

3582: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3583: WIP_CONSTANTS.RUN),1,1,0)
3584: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
3585: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
3586: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
3587: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
3588: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3589: OR wop.operation_seq_num = wmti.to_operation_seq_num
3590: OR (wop.operation_seq_num = wmti.fm_operation_seq_num

Line 3587: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

3583: WIP_CONSTANTS.RUN),1,1,0)
3584: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
3585: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
3586: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
3587: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
3588: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3589: OR wop.operation_seq_num = wmti.to_operation_seq_num
3590: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
3591: AND wmti.fm_intraoperation_step_type >

Line 3588: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL

3584: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
3585: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
3586: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
3587: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
3588: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3589: OR wop.operation_seq_num = wmti.to_operation_seq_num
3590: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
3591: AND wmti.fm_intraoperation_step_type >
3592: WIP_CONSTANTS.RUN)))

Line 3592: WIP_CONSTANTS.RUN)))

3588: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3589: OR wop.operation_seq_num = wmti.to_operation_seq_num
3590: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
3591: AND wmti.fm_intraoperation_step_type >
3592: WIP_CONSTANTS.RUN)))
3593: );
3594:
3595: -- IF debug message level = 2, write statement below to log file
3596: IF (l_logLevel <= wip_constants.full_logging) THEN

Line 3596: IF (l_logLevel <= wip_constants.full_logging) THEN

3592: WIP_CONSTANTS.RUN)))
3593: );
3594:
3595: -- IF debug message level = 2, write statement below to log file
3596: IF (l_logLevel <= wip_constants.full_logging) THEN
3597: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
3598: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
3599: fnd_message.set_token('ENTITY2', 'WIP_COST_TXN_INTERFACE');
3600: l_msg := fnd_message.get;

Line 3608: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND

3604:
3605: END IF; -- Per item basis type for discrete jobs
3606:
3607: -- Per item basis type for repetitive schedule
3608: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND
3609: l_move.rsrcItem = WIP_CONSTANTS.YES) THEN
3610:
3611: INSERT INTO wip_cost_txn_interface
3612: (transaction_id,

Line 3609: l_move.rsrcItem = WIP_CONSTANTS.YES) THEN

3605: END IF; -- Per item basis type for discrete jobs
3606:
3607: -- Per item basis type for repetitive schedule
3608: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND
3609: l_move.rsrcItem = WIP_CONSTANTS.YES) THEN
3610:
3611: INSERT INTO wip_cost_txn_interface
3612: (transaction_id,
3613: last_update_date,

Line 3681: WIP_CONSTANTS.RES_PROC, -- process_phase

3677: DECODE(p_gib.request_id,-1,NULL,SYSDATE), -- program_update_date
3678: p_gib.group_id,
3679: MAX(wmti.source_code),
3680: MAX(wmti.source_line_id),
3681: WIP_CONSTANTS.RES_PROC, -- process_phase
3682: WIP_CONSTANTS.PENDING, -- process_status
3683: WIP_CONSTANTS.RES_TXN, -- transaction_type
3684: wmti.organization_id,
3685: MAX(wmti.organization_code),

Line 3682: WIP_CONSTANTS.PENDING, -- process_status

3678: p_gib.group_id,
3679: MAX(wmti.source_code),
3680: MAX(wmti.source_line_id),
3681: WIP_CONSTANTS.RES_PROC, -- process_phase
3682: WIP_CONSTANTS.PENDING, -- process_status
3683: WIP_CONSTANTS.RES_TXN, -- transaction_type
3684: wmti.organization_id,
3685: MAX(wmti.organization_code),
3686: wmti.wip_entity_id,

Line 3683: WIP_CONSTANTS.RES_TXN, -- transaction_type

3679: MAX(wmti.source_code),
3680: MAX(wmti.source_line_id),
3681: WIP_CONSTANTS.RES_PROC, -- process_phase
3682: WIP_CONSTANTS.PENDING, -- process_status
3683: WIP_CONSTANTS.RES_TXN, -- transaction_type
3684: wmti.organization_id,
3685: MAX(wmti.organization_code),
3686: wmti.wip_entity_id,
3687: MAX(wmti.entity_type),

Line 3709: WIP_CONSTANTS.RUN),

3705: SUM(wor.usage_rate_or_amount * NVL(wma.primary_quantity *
3706: DECODE(
3707: SIGN(wmti.to_operation_seq_num-wmti.fm_operation_seq_num),
3708: 0, DECODE(SIGN(wmti.fm_intraoperation_step_type -
3709: WIP_CONSTANTS.RUN),
3710: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3711: WIP_CONSTANTS.RUN),1,1,-1),
3712: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3713: WIP_CONSTANTS.RUN),1,1,-1),

Line 3711: WIP_CONSTANTS.RUN),1,1,-1),

3707: SIGN(wmti.to_operation_seq_num-wmti.fm_operation_seq_num),
3708: 0, DECODE(SIGN(wmti.fm_intraoperation_step_type -
3709: WIP_CONSTANTS.RUN),
3710: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3711: WIP_CONSTANTS.RUN),1,1,-1),
3712: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3713: WIP_CONSTANTS.RUN),1,1,-1),
3714: 1,-1),
3715: 1, 1,

Line 3713: WIP_CONSTANTS.RUN),1,1,-1),

3709: WIP_CONSTANTS.RUN),
3710: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3711: WIP_CONSTANTS.RUN),1,1,-1),
3712: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3713: WIP_CONSTANTS.RUN),1,1,-1),
3714: 1,-1),
3715: 1, 1,
3716: -1,-1)
3717: ,0)), -- transaction_quantity

Line 3723: WIP_CONSTANTS.RUN),

3719: SUM(wor.usage_rate_or_amount * NVL(wma.primary_quantity *
3720: DECODE(
3721: SIGN(wmti.to_operation_seq_num-wmti.fm_operation_seq_num),
3722: 0, DECODE(SIGN(wmti.fm_intraoperation_step_type -
3723: WIP_CONSTANTS.RUN),
3724: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3725: WIP_CONSTANTS.RUN),1,1,-1),
3726: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3727: WIP_CONSTANTS.RUN),1,1,-1),

Line 3725: WIP_CONSTANTS.RUN),1,1,-1),

3721: SIGN(wmti.to_operation_seq_num-wmti.fm_operation_seq_num),
3722: 0, DECODE(SIGN(wmti.fm_intraoperation_step_type -
3723: WIP_CONSTANTS.RUN),
3724: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3725: WIP_CONSTANTS.RUN),1,1,-1),
3726: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3727: WIP_CONSTANTS.RUN),1,1,-1),
3728: 1,-1),
3729: 1, 1,

Line 3727: WIP_CONSTANTS.RUN),1,1,-1),

3723: WIP_CONSTANTS.RUN),
3724: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3725: WIP_CONSTANTS.RUN),1,1,-1),
3726: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3727: WIP_CONSTANTS.RUN),1,1,-1),
3728: 1,-1),
3729: 1, 1,
3730: -1,-1)
3731: ,0)), -- primary_quantity

Line 3752: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

3748: wip_operations wop,
3749: wip_move_txn_interface wmti
3750: WHERE wmti.group_id = p_gib.group_id
3751: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3752: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3753: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3754: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
3755: AND wop.organization_id = wmti.organization_id
3756: AND wop.wip_entity_id = wmti.wip_entity_id

Line 3753: AND wmti.process_status = WIP_CONSTANTS.RUNNING

3749: wip_move_txn_interface wmti
3750: WHERE wmti.group_id = p_gib.group_id
3751: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3752: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3753: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3754: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
3755: AND wop.organization_id = wmti.organization_id
3756: AND wop.wip_entity_id = wmti.wip_entity_id
3757: AND wop.wip_entity_id = wor.wip_entity_id

Line 3754: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

3750: WHERE wmti.group_id = p_gib.group_id
3751: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3752: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3753: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3754: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
3755: AND wop.organization_id = wmti.organization_id
3756: AND wop.wip_entity_id = wmti.wip_entity_id
3757: AND wop.wip_entity_id = wor.wip_entity_id
3758: AND wop.operation_seq_num = wor.operation_seq_num

Line 3764: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE

3760: AND wop.repetitive_schedule_id = wma.repetitive_schedule_id
3761: AND wor.repetitive_schedule_id = wma.repetitive_schedule_id
3762: AND wmti.organization_id = wma.organization_id
3763: AND wmti.transaction_id = wma.transaction_id
3764: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE
3765: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
3766: AND wop.organization_id = bd.organization_id
3767: AND NVL(wor.department_id, wop.department_id) = bd.department_id
3768: AND wor.organization_id = br.organization_id

Line 3765: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM

3761: AND wor.repetitive_schedule_id = wma.repetitive_schedule_id
3762: AND wmti.organization_id = wma.organization_id
3763: AND wmti.transaction_id = wma.transaction_id
3764: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE
3765: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
3766: AND wop.organization_id = bd.organization_id
3767: AND NVL(wor.department_id, wop.department_id) = bd.department_id
3768: AND wor.organization_id = br.organization_id
3769: AND wor.resource_id = br.resource_id

Line 3775: WIP_CONSTANTS.RUN),1,1,0)

3771: AND wor.activity_id = ca.activity_id (+)
3772: AND (
3773: (wop.operation_seq_num >= wmti.fm_operation_seq_num
3774: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3775: WIP_CONSTANTS.RUN),1,1,0)
3776: AND wop.operation_seq_num < wmti.to_operation_seq_num
3777: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3778: WIP_CONSTANTS.RUN),1,1,0)
3779: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num

Line 3778: WIP_CONSTANTS.RUN),1,1,0)

3774: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3775: WIP_CONSTANTS.RUN),1,1,0)
3776: AND wop.operation_seq_num < wmti.to_operation_seq_num
3777: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3778: WIP_CONSTANTS.RUN),1,1,0)
3779: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
3780: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
3781: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
3782: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

Line 3781: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN

3777: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3778: WIP_CONSTANTS.RUN),1,1,0)
3779: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
3780: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
3781: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
3782: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
3783: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3784: OR wop.operation_seq_num = wmti.fm_operation_seq_num
3785: OR (wop.operation_seq_num = wmti.to_operation_seq_num

Line 3782: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

3778: WIP_CONSTANTS.RUN),1,1,0)
3779: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
3780: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
3781: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
3782: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
3783: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3784: OR wop.operation_seq_num = wmti.fm_operation_seq_num
3785: OR (wop.operation_seq_num = wmti.to_operation_seq_num
3786: AND wmti.to_intraoperation_step_type >

Line 3783: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL

3779: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
3780: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
3781: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
3782: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
3783: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3784: OR wop.operation_seq_num = wmti.fm_operation_seq_num
3785: OR (wop.operation_seq_num = wmti.to_operation_seq_num
3786: AND wmti.to_intraoperation_step_type >
3787: WIP_CONSTANTS.RUN)))

Line 3787: WIP_CONSTANTS.RUN)))

3783: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3784: OR wop.operation_seq_num = wmti.fm_operation_seq_num
3785: OR (wop.operation_seq_num = wmti.to_operation_seq_num
3786: AND wmti.to_intraoperation_step_type >
3787: WIP_CONSTANTS.RUN)))
3788: OR
3789: (wop.operation_seq_num < wmti.fm_operation_seq_num
3790: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3791: WIP_CONSTANTS.RUN),1,1,0)

Line 3791: WIP_CONSTANTS.RUN),1,1,0)

3787: WIP_CONSTANTS.RUN)))
3788: OR
3789: (wop.operation_seq_num < wmti.fm_operation_seq_num
3790: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3791: WIP_CONSTANTS.RUN),1,1,0)
3792: AND wop.operation_seq_num >= wmti.to_operation_seq_num
3793: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3794: WIP_CONSTANTS.RUN),1,1,0)
3795: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num

Line 3794: WIP_CONSTANTS.RUN),1,1,0)

3790: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
3791: WIP_CONSTANTS.RUN),1,1,0)
3792: AND wop.operation_seq_num >= wmti.to_operation_seq_num
3793: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3794: WIP_CONSTANTS.RUN),1,1,0)
3795: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
3796: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
3797: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
3798: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

Line 3797: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN

3793: + DECODE(SIGN(wmti.to_intraoperation_step_type -
3794: WIP_CONSTANTS.RUN),1,1,0)
3795: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
3796: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
3797: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
3798: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
3799: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3800: OR wop.operation_seq_num = wmti.to_operation_seq_num
3801: OR (wop.operation_seq_num = wmti.fm_operation_seq_num

Line 3798: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

3794: WIP_CONSTANTS.RUN),1,1,0)
3795: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
3796: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
3797: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
3798: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
3799: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3800: OR wop.operation_seq_num = wmti.to_operation_seq_num
3801: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
3802: AND wmti.fm_intraoperation_step_type >

Line 3799: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL

3795: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
3796: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
3797: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
3798: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
3799: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3800: OR wop.operation_seq_num = wmti.to_operation_seq_num
3801: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
3802: AND wmti.fm_intraoperation_step_type >
3803: WIP_CONSTANTS.RUN))))

Line 3803: WIP_CONSTANTS.RUN))))

3799: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
3800: OR wop.operation_seq_num = wmti.to_operation_seq_num
3801: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
3802: AND wmti.fm_intraoperation_step_type >
3803: WIP_CONSTANTS.RUN))))
3804: GROUP BY wmti.organization_id,
3805: wmti.wip_entity_id,
3806: wmti.line_id,
3807: wop.operation_seq_num,

Line 3816: IF (l_logLevel <= wip_constants.full_logging) THEN

3812: wor.usage_rate_or_amount,
3813: wmti.transaction_id;
3814:
3815: -- IF debug message level = 2, write statement below to log file
3816: IF (l_logLevel <= wip_constants.full_logging) THEN
3817: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
3818: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
3819: fnd_message.set_token('ENTITY2', 'WIP_COST_TXN_INTERFACE');
3820: l_msg := fnd_message.get;

Line 3833: IF(l_move.jobTxn = WIP_CONSTANTS.YES AND

3829: department_id cannot be changed so we can take the MAX,
3830: also columns such as usage_rate_or_amount are not part of
3831: the transaction they are looked up in wip_operation_resources
3832: +------------------------------------------------------------*/
3833: IF(l_move.jobTxn = WIP_CONSTANTS.YES AND
3834: l_move.rsrcLot = WIP_CONSTANTS.YES) THEN
3835:
3836: INSERT INTO wip_cost_txn_interface
3837: (transaction_id,

Line 3834: l_move.rsrcLot = WIP_CONSTANTS.YES) THEN

3830: also columns such as usage_rate_or_amount are not part of
3831: the transaction they are looked up in wip_operation_resources
3832: +------------------------------------------------------------*/
3833: IF(l_move.jobTxn = WIP_CONSTANTS.YES AND
3834: l_move.rsrcLot = WIP_CONSTANTS.YES) THEN
3835:
3836: INSERT INTO wip_cost_txn_interface
3837: (transaction_id,
3838: last_update_date,

Line 3909: WIP_CONSTANTS.RES_PROC, -- process_phase

3905: p_gib.group_id,
3906: MAX(wmti.source_code), -- source_code
3907: -- Fixed bug 2465148
3908: MAX(wmti.source_line_id), -- source_line_id
3909: WIP_CONSTANTS.RES_PROC, -- process_phase
3910: WIP_CONSTANTS.PENDING, -- process_status
3911: WIP_CONSTANTS.RES_TXN, -- transaction_type
3912: wop.organization_id,
3913: MAX(wmti.organization_code),

Line 3910: WIP_CONSTANTS.PENDING, -- process_status

3906: MAX(wmti.source_code), -- source_code
3907: -- Fixed bug 2465148
3908: MAX(wmti.source_line_id), -- source_line_id
3909: WIP_CONSTANTS.RES_PROC, -- process_phase
3910: WIP_CONSTANTS.PENDING, -- process_status
3911: WIP_CONSTANTS.RES_TXN, -- transaction_type
3912: wop.organization_id,
3913: MAX(wmti.organization_code),
3914: wop.wip_entity_id,

Line 3911: WIP_CONSTANTS.RES_TXN, -- transaction_type

3907: -- Fixed bug 2465148
3908: MAX(wmti.source_line_id), -- source_line_id
3909: WIP_CONSTANTS.RES_PROC, -- process_phase
3910: WIP_CONSTANTS.PENDING, -- process_status
3911: WIP_CONSTANTS.RES_TXN, -- transaction_type
3912: wop.organization_id,
3913: MAX(wmti.organization_code),
3914: wop.wip_entity_id,
3915: MAX(entity_type),

Line 3939: WIP_CONSTANTS.RUN),

3935: NVL(SUM(wmti.primary_quantity *
3936: DECODE(SIGN(wmti.to_operation_seq_num -
3937: wmti.fm_operation_seq_num),
3938: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
3939: WIP_CONSTANTS.RUN),
3940: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3941: WIP_CONSTANTS.RUN),1,1,-1),
3942: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3943: WIP_CONSTANTS.RUN),1,1,-1),

Line 3941: WIP_CONSTANTS.RUN),1,1,-1),

3937: wmti.fm_operation_seq_num),
3938: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
3939: WIP_CONSTANTS.RUN),
3940: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3941: WIP_CONSTANTS.RUN),1,1,-1),
3942: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3943: WIP_CONSTANTS.RUN),1,1,-1),
3944: 1,-1),
3945: 1, 1,

Line 3943: WIP_CONSTANTS.RUN),1,1,-1),

3939: WIP_CONSTANTS.RUN),
3940: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3941: WIP_CONSTANTS.RUN),1,1,-1),
3942: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3943: WIP_CONSTANTS.RUN),1,1,-1),
3944: 1,-1),
3945: 1, 1,
3946: -1,-1)
3947: ),0)), -- NVL

Line 3958: WIP_CONSTANTS.RUN),

3954: NVL(SUM(wmti.primary_quantity *
3955: DECODE(SIGN(wmti.to_operation_seq_num -
3956: wmti.fm_operation_seq_num),
3957: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
3958: WIP_CONSTANTS.RUN),
3959: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3960: WIP_CONSTANTS.RUN),1,1,-1),
3961: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3962: WIP_CONSTANTS.RUN),1,1,-1),

Line 3960: WIP_CONSTANTS.RUN),1,1,-1),

3956: wmti.fm_operation_seq_num),
3957: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
3958: WIP_CONSTANTS.RUN),
3959: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3960: WIP_CONSTANTS.RUN),1,1,-1),
3961: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3962: WIP_CONSTANTS.RUN),1,1,-1),
3963: 1,-1),
3964: 1, 1,

Line 3962: WIP_CONSTANTS.RUN),1,1,-1),

3958: WIP_CONSTANTS.RUN),
3959: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
3960: WIP_CONSTANTS.RUN),1,1,-1),
3961: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
3962: WIP_CONSTANTS.RUN),1,1,-1),
3963: 1,-1),
3964: 1, 1,
3965: -1,-1)
3966: ),0)), -- NVL

Line 3993: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

3989: wip_operations wop,
3990: wip_move_txn_interface wmti
3991: WHERE wmti.group_id = p_gib.group_id
3992: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3993: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3994: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3995: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
3996: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
3997: AND wop.organization_id = wmti.organization_id

Line 3994: AND wmti.process_status = WIP_CONSTANTS.RUNNING

3990: wip_move_txn_interface wmti
3991: WHERE wmti.group_id = p_gib.group_id
3992: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3993: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3994: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3995: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
3996: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
3997: AND wop.organization_id = wmti.organization_id
3998: AND wop.wip_entity_id = wmti.wip_entity_id

Line 3995: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE

3991: WHERE wmti.group_id = p_gib.group_id
3992: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3993: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3994: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3995: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
3996: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
3997: AND wop.organization_id = wmti.organization_id
3998: AND wop.wip_entity_id = wmti.wip_entity_id
3999: AND wop.wip_entity_id = wor.wip_entity_id

Line 3996: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */

3992: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
3993: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
3994: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3995: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
3996: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
3997: AND wop.organization_id = wmti.organization_id
3998: AND wop.wip_entity_id = wmti.wip_entity_id
3999: AND wop.wip_entity_id = wor.wip_entity_id
4000: AND wop.operation_seq_num = wor.operation_seq_num

Line 4002: AND NVL(wop.skip_flag, WIP_CONSTANTS.NO) <> WIP_CONSTANTS.YES

3998: AND wop.wip_entity_id = wmti.wip_entity_id
3999: AND wop.wip_entity_id = wor.wip_entity_id
4000: AND wop.operation_seq_num = wor.operation_seq_num
4001: /* added for OSFM jump enhancement 2541431 */
4002: AND NVL(wop.skip_flag, WIP_CONSTANTS.NO) <> WIP_CONSTANTS.YES
4003: AND wop.organization_id = wor.organization_id
4004: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE
4005: AND wor.basis_type = WIP_CONSTANTS.PER_LOT
4006: AND wop.organization_id = bd.organization_id

Line 4004: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE

4000: AND wop.operation_seq_num = wor.operation_seq_num
4001: /* added for OSFM jump enhancement 2541431 */
4002: AND NVL(wop.skip_flag, WIP_CONSTANTS.NO) <> WIP_CONSTANTS.YES
4003: AND wop.organization_id = wor.organization_id
4004: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE
4005: AND wor.basis_type = WIP_CONSTANTS.PER_LOT
4006: AND wop.organization_id = bd.organization_id
4007: AND NVL(wor.department_id, wop.department_id) = bd.department_id
4008: AND wor.organization_id = br.organization_id

Line 4005: AND wor.basis_type = WIP_CONSTANTS.PER_LOT

4001: /* added for OSFM jump enhancement 2541431 */
4002: AND NVL(wop.skip_flag, WIP_CONSTANTS.NO) <> WIP_CONSTANTS.YES
4003: AND wop.organization_id = wor.organization_id
4004: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE
4005: AND wor.basis_type = WIP_CONSTANTS.PER_LOT
4006: AND wop.organization_id = bd.organization_id
4007: AND NVL(wor.department_id, wop.department_id) = bd.department_id
4008: AND wor.organization_id = br.organization_id
4009: AND wor.resource_id = br.resource_id

Line 4017: WIP_CONSTANTS.RUN),1,1,0)

4013: AND wdj.organization_id = wmti.organization_id
4014: AND (
4015: (wop.operation_seq_num >= wmti.fm_operation_seq_num
4016: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4017: WIP_CONSTANTS.RUN),1,1,0)
4018: AND wop.operation_seq_num < wmti.to_operation_seq_num
4019: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4020: WIP_CONSTANTS.RUN),1,1,0)
4021: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num

Line 4020: WIP_CONSTANTS.RUN),1,1,0)

4016: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4017: WIP_CONSTANTS.RUN),1,1,0)
4018: AND wop.operation_seq_num < wmti.to_operation_seq_num
4019: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4020: WIP_CONSTANTS.RUN),1,1,0)
4021: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
4022: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
4023: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
4024: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

Line 4023: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN

4019: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4020: WIP_CONSTANTS.RUN),1,1,0)
4021: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
4022: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
4023: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
4024: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
4025: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4026: OR wop.operation_seq_num = wmti.fm_operation_seq_num
4027: OR (wop.operation_seq_num = wmti.to_operation_seq_num

Line 4024: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

4020: WIP_CONSTANTS.RUN),1,1,0)
4021: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
4022: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
4023: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
4024: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
4025: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4026: OR wop.operation_seq_num = wmti.fm_operation_seq_num
4027: OR (wop.operation_seq_num = wmti.to_operation_seq_num
4028: AND wmti.to_intraoperation_step_type >

Line 4025: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL

4021: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
4022: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
4023: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
4024: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
4025: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4026: OR wop.operation_seq_num = wmti.fm_operation_seq_num
4027: OR (wop.operation_seq_num = wmti.to_operation_seq_num
4028: AND wmti.to_intraoperation_step_type >
4029: WIP_CONSTANTS.RUN)))

Line 4029: WIP_CONSTANTS.RUN)))

4025: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4026: OR wop.operation_seq_num = wmti.fm_operation_seq_num
4027: OR (wop.operation_seq_num = wmti.to_operation_seq_num
4028: AND wmti.to_intraoperation_step_type >
4029: WIP_CONSTANTS.RUN)))
4030: OR
4031: (wop.operation_seq_num < wmti.fm_operation_seq_num
4032: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4033: WIP_CONSTANTS.RUN),1,1,0)

Line 4033: WIP_CONSTANTS.RUN),1,1,0)

4029: WIP_CONSTANTS.RUN)))
4030: OR
4031: (wop.operation_seq_num < wmti.fm_operation_seq_num
4032: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4033: WIP_CONSTANTS.RUN),1,1,0)
4034: AND wop.operation_seq_num >= wmti.to_operation_seq_num
4035: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4036: WIP_CONSTANTS.RUN),1,1,0)
4037: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num

Line 4036: WIP_CONSTANTS.RUN),1,1,0)

4032: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4033: WIP_CONSTANTS.RUN),1,1,0)
4034: AND wop.operation_seq_num >= wmti.to_operation_seq_num
4035: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4036: WIP_CONSTANTS.RUN),1,1,0)
4037: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
4038: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
4039: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
4040: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

Line 4039: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN

4035: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4036: WIP_CONSTANTS.RUN),1,1,0)
4037: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
4038: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
4039: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
4040: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
4041: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4042: OR wop.operation_seq_num = wmti.to_operation_seq_num
4043: OR (wop.operation_seq_num = wmti.fm_operation_seq_num

Line 4040: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

4036: WIP_CONSTANTS.RUN),1,1,0)
4037: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
4038: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
4039: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
4040: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
4041: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4042: OR wop.operation_seq_num = wmti.to_operation_seq_num
4043: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
4044: AND wmti.fm_intraoperation_step_type >

Line 4041: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL

4037: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
4038: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
4039: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
4040: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
4041: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4042: OR wop.operation_seq_num = wmti.to_operation_seq_num
4043: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
4044: AND wmti.fm_intraoperation_step_type >
4045: WIP_CONSTANTS.RUN))))

Line 4045: WIP_CONSTANTS.RUN))))

4041: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4042: OR wop.operation_seq_num = wmti.to_operation_seq_num
4043: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
4044: AND wmti.fm_intraoperation_step_type >
4045: WIP_CONSTANTS.RUN))))
4046: GROUP BY wop.organization_id,
4047: wop.wip_entity_id,
4048: wop.operation_seq_num,
4049: wor.resource_seq_num

Line 4056: WIP_CONSTANTS.RUN),

4052: NVL(SUM(wmti.primary_quantity *
4053: DECODE(SIGN(wmti.to_operation_seq_num -
4054: wmti.fm_operation_seq_num),
4055: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4056: WIP_CONSTANTS.RUN),
4057: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4058: WIP_CONSTANTS.RUN),1,1,-1),
4059: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4060: WIP_CONSTANTS.RUN),1,1,-1),

Line 4058: WIP_CONSTANTS.RUN),1,1,-1),

4054: wmti.fm_operation_seq_num),
4055: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4056: WIP_CONSTANTS.RUN),
4057: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4058: WIP_CONSTANTS.RUN),1,1,-1),
4059: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4060: WIP_CONSTANTS.RUN),1,1,-1),
4061: 1,-1),
4062: 1, 1,

Line 4060: WIP_CONSTANTS.RUN),1,1,-1),

4056: WIP_CONSTANTS.RUN),
4057: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4058: WIP_CONSTANTS.RUN),1,1,-1),
4059: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4060: WIP_CONSTANTS.RUN),1,1,-1),
4061: 1,-1),
4062: 1, 1,
4063: -1,-1)
4064: ),0)), -- NVL

Line 4070: IF (l_logLevel <= wip_constants.full_logging) THEN

4066: 1, DECODE(SIGN(MAX(wop.quantity_completed)),1,0,1),
4067: -1, DECODE(SIGN(MAX(wop.quantity_completed)),1,-1,0));
4068:
4069: -- IF debug message level = 2, write statement below to log file
4070: IF (l_logLevel <= wip_constants.full_logging) THEN
4071: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
4072: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
4073: fnd_message.set_token('ENTITY2', 'WIP_COST_TXN_INTERFACE');
4074: l_msg := fnd_message.get;

Line 4082: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND

4078:
4079: END IF; -- Per order basis type for discrete jobs
4080:
4081: -- Per order basis type for repetitive
4082: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND
4083: l_move.rsrcLot = WIP_CONSTANTS.YES) THEN
4084:
4085: INSERT INTO wip_cost_txn_interface
4086: (transaction_id,

Line 4083: l_move.rsrcLot = WIP_CONSTANTS.YES) THEN

4079: END IF; -- Per order basis type for discrete jobs
4080:
4081: -- Per order basis type for repetitive
4082: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND
4083: l_move.rsrcLot = WIP_CONSTANTS.YES) THEN
4084:
4085: INSERT INTO wip_cost_txn_interface
4086: (transaction_id,
4087: last_update_date,

Line 4156: WIP_CONSTANTS.RES_PROC, -- process_phase

4152: p_gib.group_id,
4153: MAX(wmti.source_code), -- source_code
4154: -- Fixed bug 2465148
4155: MAX(wmti.source_line_id), -- source_line_id
4156: WIP_CONSTANTS.RES_PROC, -- process_phase
4157: WIP_CONSTANTS.PENDING, -- process_status
4158: WIP_CONSTANTS.RES_TXN, -- transaction_type
4159: wop.organization_id,
4160: MAX(wmti.organization_code),

Line 4157: WIP_CONSTANTS.PENDING, -- process_status

4153: MAX(wmti.source_code), -- source_code
4154: -- Fixed bug 2465148
4155: MAX(wmti.source_line_id), -- source_line_id
4156: WIP_CONSTANTS.RES_PROC, -- process_phase
4157: WIP_CONSTANTS.PENDING, -- process_status
4158: WIP_CONSTANTS.RES_TXN, -- transaction_type
4159: wop.organization_id,
4160: MAX(wmti.organization_code),
4161: wop.wip_entity_id,

Line 4158: WIP_CONSTANTS.RES_TXN, -- transaction_type

4154: -- Fixed bug 2465148
4155: MAX(wmti.source_line_id), -- source_line_id
4156: WIP_CONSTANTS.RES_PROC, -- process_phase
4157: WIP_CONSTANTS.PENDING, -- process_status
4158: WIP_CONSTANTS.RES_TXN, -- transaction_type
4159: wop.organization_id,
4160: MAX(wmti.organization_code),
4161: wop.wip_entity_id,
4162: MAX(entity_type),

Line 4204: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

4200: wip_operations wop,
4201: wip_move_txn_interface wmti
4202: WHERE wmti.group_id = p_gib.group_id
4203: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
4204: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
4205: AND wmti.process_status = WIP_CONSTANTS.RUNNING
4206: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
4207: AND wop.organization_id = wmti.organization_id
4208: AND wop.wip_entity_id = wmti.wip_entity_id

Line 4205: AND wmti.process_status = WIP_CONSTANTS.RUNNING

4201: wip_move_txn_interface wmti
4202: WHERE wmti.group_id = p_gib.group_id
4203: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
4204: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
4205: AND wmti.process_status = WIP_CONSTANTS.RUNNING
4206: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
4207: AND wop.organization_id = wmti.organization_id
4208: AND wop.wip_entity_id = wmti.wip_entity_id
4209: AND wop.wip_entity_id = wor.wip_entity_id

Line 4206: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

4202: WHERE wmti.group_id = p_gib.group_id
4203: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
4204: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
4205: AND wmti.process_status = WIP_CONSTANTS.RUNNING
4206: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
4207: AND wop.organization_id = wmti.organization_id
4208: AND wop.wip_entity_id = wmti.wip_entity_id
4209: AND wop.wip_entity_id = wor.wip_entity_id
4210: AND wop.operation_seq_num = wor.operation_seq_num

Line 4216: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE

4212: AND wop.repetitive_schedule_id = wma.repetitive_schedule_id
4213: AND wor.repetitive_schedule_id = wma.repetitive_schedule_id
4214: AND wmti.organization_id = wma.organization_id
4215: AND wmti.transaction_id = wma.transaction_id
4216: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE
4217: AND wor.basis_type = WIP_CONSTANTS.PER_LOT
4218: AND wop.organization_id = bd.organization_id
4219: AND NVL(wor.department_id, wop.department_id) = bd.department_id
4220: AND wor.organization_id = br.organization_id

Line 4217: AND wor.basis_type = WIP_CONSTANTS.PER_LOT

4213: AND wor.repetitive_schedule_id = wma.repetitive_schedule_id
4214: AND wmti.organization_id = wma.organization_id
4215: AND wmti.transaction_id = wma.transaction_id
4216: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE
4217: AND wor.basis_type = WIP_CONSTANTS.PER_LOT
4218: AND wop.organization_id = bd.organization_id
4219: AND NVL(wor.department_id, wop.department_id) = bd.department_id
4220: AND wor.organization_id = br.organization_id
4221: AND wor.resource_id = br.resource_id

Line 4227: WIP_CONSTANTS.RUN),1,1,0)

4223: AND wor.activity_id = ca.activity_id (+)
4224: AND (
4225: (wop.operation_seq_num >= wmti.fm_operation_seq_num
4226: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4227: WIP_CONSTANTS.RUN),1,1,0)
4228: AND wop.operation_seq_num < wmti.to_operation_seq_num
4229: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4230: WIP_CONSTANTS.RUN),1,1,0)
4231: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num

Line 4230: WIP_CONSTANTS.RUN),1,1,0)

4226: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4227: WIP_CONSTANTS.RUN),1,1,0)
4228: AND wop.operation_seq_num < wmti.to_operation_seq_num
4229: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4230: WIP_CONSTANTS.RUN),1,1,0)
4231: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
4232: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
4233: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
4234: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

Line 4233: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN

4229: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4230: WIP_CONSTANTS.RUN),1,1,0)
4231: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
4232: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
4233: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
4234: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
4235: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4236: OR wop.operation_seq_num = wmti.fm_operation_seq_num
4237: OR (wop.operation_seq_num = wmti.to_operation_seq_num

Line 4234: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

4230: WIP_CONSTANTS.RUN),1,1,0)
4231: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
4232: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
4233: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
4234: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
4235: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4236: OR wop.operation_seq_num = wmti.fm_operation_seq_num
4237: OR (wop.operation_seq_num = wmti.to_operation_seq_num
4238: AND wmti.to_intraoperation_step_type >

Line 4235: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL

4231: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
4232: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
4233: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
4234: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
4235: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4236: OR wop.operation_seq_num = wmti.fm_operation_seq_num
4237: OR (wop.operation_seq_num = wmti.to_operation_seq_num
4238: AND wmti.to_intraoperation_step_type >
4239: WIP_CONSTANTS.RUN)))

Line 4239: WIP_CONSTANTS.RUN)))

4235: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4236: OR wop.operation_seq_num = wmti.fm_operation_seq_num
4237: OR (wop.operation_seq_num = wmti.to_operation_seq_num
4238: AND wmti.to_intraoperation_step_type >
4239: WIP_CONSTANTS.RUN)))
4240: OR
4241: (wop.operation_seq_num < wmti.fm_operation_seq_num
4242: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4243: WIP_CONSTANTS.RUN),1,1,0)

Line 4243: WIP_CONSTANTS.RUN),1,1,0)

4239: WIP_CONSTANTS.RUN)))
4240: OR
4241: (wop.operation_seq_num < wmti.fm_operation_seq_num
4242: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4243: WIP_CONSTANTS.RUN),1,1,0)
4244: AND wop.operation_seq_num >= wmti.to_operation_seq_num
4245: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4246: WIP_CONSTANTS.RUN),1,1,0)
4247: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num

Line 4246: WIP_CONSTANTS.RUN),1,1,0)

4242: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4243: WIP_CONSTANTS.RUN),1,1,0)
4244: AND wop.operation_seq_num >= wmti.to_operation_seq_num
4245: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4246: WIP_CONSTANTS.RUN),1,1,0)
4247: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
4248: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
4249: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
4250: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

Line 4249: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN

4245: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4246: WIP_CONSTANTS.RUN),1,1,0)
4247: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
4248: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
4249: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
4250: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
4251: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4252: OR wop.operation_seq_num = wmti.to_operation_seq_num
4253: OR (wop.operation_seq_num = wmti.fm_operation_seq_num

Line 4250: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

4246: WIP_CONSTANTS.RUN),1,1,0)
4247: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
4248: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
4249: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
4250: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
4251: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4252: OR wop.operation_seq_num = wmti.to_operation_seq_num
4253: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
4254: AND wmti.fm_intraoperation_step_type >

Line 4251: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL

4247: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
4248: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
4249: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
4250: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
4251: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4252: OR wop.operation_seq_num = wmti.to_operation_seq_num
4253: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
4254: AND wmti.fm_intraoperation_step_type >
4255: WIP_CONSTANTS.RUN))))

Line 4255: WIP_CONSTANTS.RUN))))

4251: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4252: OR wop.operation_seq_num = wmti.to_operation_seq_num
4253: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
4254: AND wmti.fm_intraoperation_step_type >
4255: WIP_CONSTANTS.RUN))))
4256: GROUP BY wop.organization_id,
4257: wop.wip_entity_id,
4258: wmti.line_id,
4259: wma.repetitive_schedule_id,

Line 4272: WIP_CONSTANTS.RUN),

4268: wma.primary_quantity *
4269: DECODE(SIGN(wmti.to_operation_seq_num -
4270: wmti.fm_operation_seq_num),
4271: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4272: WIP_CONSTANTS.RUN),
4273: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4274: WIP_CONSTANTS.RUN),1,1,-1),
4275: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4276: WIP_CONSTANTS.RUN),1,1,-1),

Line 4274: WIP_CONSTANTS.RUN),1,1,-1),

4270: wmti.fm_operation_seq_num),
4271: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4272: WIP_CONSTANTS.RUN),
4273: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4274: WIP_CONSTANTS.RUN),1,1,-1),
4275: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4276: WIP_CONSTANTS.RUN),1,1,-1),
4277: 1,-1),
4278: 1, 1,

Line 4276: WIP_CONSTANTS.RUN),1,1,-1),

4272: WIP_CONSTANTS.RUN),
4273: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4274: WIP_CONSTANTS.RUN),1,1,-1),
4275: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4276: WIP_CONSTANTS.RUN),1,1,-1),
4277: 1,-1),
4278: 1, 1,
4279: -1,-1)
4280: ),0)), -- NVL

Line 4286: IF (l_logLevel <= wip_constants.full_logging) THEN

4282: 1, DECODE(SIGN(MAX(wop.quantity_completed)),1,0,1),
4283: -1, DECODE(SIGN(MAX(wop.quantity_completed)),1,-1,0));
4284:
4285: -- IF debug message level = 2, write statement below to log file
4286: IF (l_logLevel <= wip_constants.full_logging) THEN
4287: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
4288: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
4289: fnd_message.set_token('ENTITY2', 'WIP_COST_TXN_INTERFACE');
4290: l_msg := fnd_message.get;

Line 4298: IF(l_move.rsrcItem = WIP_CONSTANTS.YES OR

4294:
4295: END IF; -- Per order basis type for repetitive
4296:
4297: -- IF resource per item or resource per lot, set transaction_id
4298: IF(l_move.rsrcItem = WIP_CONSTANTS.YES OR
4299: l_move.rsrcLot = WIP_CONSTANTS.YES) THEN
4300:
4301: /*------------------------------------------------------------+
4302: | Generate transaction_id for WIP_TXN_ALLOCATIONS |

Line 4299: l_move.rsrcLot = WIP_CONSTANTS.YES) THEN

4295: END IF; -- Per order basis type for repetitive
4296:
4297: -- IF resource per item or resource per lot, set transaction_id
4298: IF(l_move.rsrcItem = WIP_CONSTANTS.YES OR
4299: l_move.rsrcLot = WIP_CONSTANTS.YES) THEN
4300:
4301: /*------------------------------------------------------------+
4302: | Generate transaction_id for WIP_TXN_ALLOCATIONS |
4303: +------------------------------------------------------------*/

Line 4308: AND transaction_type = WIP_CONSTANTS.RES_TXN;

4304: UPDATE wip_cost_txn_interface
4305: SET transaction_id = wip_transactions_s.nextval
4306: WHERE group_id = p_gib.group_id
4307: AND TRUNC(transaction_date) = TRUNC(p_gib.txn_date)
4308: AND transaction_type = WIP_CONSTANTS.RES_TXN;
4309:
4310: -- IF debug message level = 2, write statement below to log file
4311: IF (l_logLevel <= wip_constants.full_logging) THEN
4312: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');

Line 4311: IF (l_logLevel <= wip_constants.full_logging) THEN

4307: AND TRUNC(transaction_date) = TRUNC(p_gib.txn_date)
4308: AND transaction_type = WIP_CONSTANTS.RES_TXN;
4309:
4310: -- IF debug message level = 2, write statement below to log file
4311: IF (l_logLevel <= wip_constants.full_logging) THEN
4312: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');
4313: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
4314: fnd_message.set_token('ENTITY2', 'WIP_COST_TXN_INTERFACE');
4315: l_msg := fnd_message.get;

Line 4323: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND

4319:
4320: END IF; -- Either resource per item or resource per lot
4321:
4322: -- Per order basis type for repetitive
4323: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND
4324: l_move.rsrcLot = WIP_CONSTANTS.YES) THEN
4325:
4326: /*------------------------------------------------------------+
4327: | Insert into cost allocations for repetitive schedules |

Line 4324: l_move.rsrcLot = WIP_CONSTANTS.YES) THEN

4320: END IF; -- Either resource per item or resource per lot
4321:
4322: -- Per order basis type for repetitive
4323: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND
4324: l_move.rsrcLot = WIP_CONSTANTS.YES) THEN
4325:
4326: /*------------------------------------------------------------+
4327: | Insert into cost allocations for repetitive schedules |
4328: | per lot

Line 4377: WIP_CONSTANTS.RUN),

4373: NVL(SUM(wma.primary_quantity *
4374: DECODE(SIGN(wmti.to_operation_seq_num -
4375: wmti.fm_operation_seq_num),
4376: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4377: WIP_CONSTANTS.RUN),
4378: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4379: WIP_CONSTANTS.RUN),1,1,-1),
4380: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4381: WIP_CONSTANTS.RUN),1,1,-1),

Line 4379: WIP_CONSTANTS.RUN),1,1,-1),

4375: wmti.fm_operation_seq_num),
4376: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4377: WIP_CONSTANTS.RUN),
4378: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4379: WIP_CONSTANTS.RUN),1,1,-1),
4380: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4381: WIP_CONSTANTS.RUN),1,1,-1),
4382: 1,-1),
4383: 1, 1,

Line 4381: WIP_CONSTANTS.RUN),1,1,-1),

4377: WIP_CONSTANTS.RUN),
4378: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4379: WIP_CONSTANTS.RUN),1,1,-1),
4380: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4381: WIP_CONSTANTS.RUN),1,1,-1),
4382: 1,-1),
4383: 1, 1,
4384: -1,-1)
4385: ),0)), -- NVL

Line 4395: WIP_CONSTANTS.RUN),

4391: NVL(SUM(wma.primary_quantity *
4392: DECODE(SIGN(wmti.to_operation_seq_num -
4393: wmti.fm_operation_seq_num),
4394: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4395: WIP_CONSTANTS.RUN),
4396: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4397: WIP_CONSTANTS.RUN),1,1,-1),
4398: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4399: WIP_CONSTANTS.RUN),1,1,-1),

Line 4397: WIP_CONSTANTS.RUN),1,1,-1),

4393: wmti.fm_operation_seq_num),
4394: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4395: WIP_CONSTANTS.RUN),
4396: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4397: WIP_CONSTANTS.RUN),1,1,-1),
4398: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4399: WIP_CONSTANTS.RUN),1,1,-1),
4400: 1,-1),
4401: 1, 1,

Line 4399: WIP_CONSTANTS.RUN),1,1,-1),

4395: WIP_CONSTANTS.RUN),
4396: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4397: WIP_CONSTANTS.RUN),1,1,-1),
4398: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4399: WIP_CONSTANTS.RUN),1,1,-1),
4400: 1,-1),
4401: 1, 1,
4402: -1,-1)
4403: ),0)), -- NVL

Line 4415: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

4411: wip_cost_txn_interface wci,
4412: wip_move_txn_interface wmti
4413: WHERE wmti.group_id = p_gib.group_id
4414: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
4415: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
4416: AND wmti.process_status = WIP_CONSTANTS.RUNNING
4417: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
4418: AND wmti.group_id = wci.group_id
4419: AND wci.organization_id = wmti.organization_id

Line 4416: AND wmti.process_status = WIP_CONSTANTS.RUNNING

4412: wip_move_txn_interface wmti
4413: WHERE wmti.group_id = p_gib.group_id
4414: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
4415: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
4416: AND wmti.process_status = WIP_CONSTANTS.RUNNING
4417: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
4418: AND wmti.group_id = wci.group_id
4419: AND wci.organization_id = wmti.organization_id
4420: AND wci.wip_entity_id = wmti.wip_entity_id

Line 4417: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

4413: WHERE wmti.group_id = p_gib.group_id
4414: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
4415: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
4416: AND wmti.process_status = WIP_CONSTANTS.RUNNING
4417: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
4418: AND wmti.group_id = wci.group_id
4419: AND wci.organization_id = wmti.organization_id
4420: AND wci.wip_entity_id = wmti.wip_entity_id
4421: AND wci.operation_seq_num = wop.operation_seq_num

Line 4422: AND wci.basis_type = WIP_CONSTANTS.PER_LOT

4418: AND wmti.group_id = wci.group_id
4419: AND wci.organization_id = wmti.organization_id
4420: AND wci.wip_entity_id = wmti.wip_entity_id
4421: AND wci.operation_seq_num = wop.operation_seq_num
4422: AND wci.basis_type = WIP_CONSTANTS.PER_LOT
4423: AND wci.transaction_type = WIP_CONSTANTS.RES_TXN
4424: AND wop.repetitive_schedule_id = wor.repetitive_schedule_id
4425: AND wci.organization_id = wor.organization_id
4426: AND wci.wip_entity_id = wor.wip_entity_id

Line 4423: AND wci.transaction_type = WIP_CONSTANTS.RES_TXN

4419: AND wci.organization_id = wmti.organization_id
4420: AND wci.wip_entity_id = wmti.wip_entity_id
4421: AND wci.operation_seq_num = wop.operation_seq_num
4422: AND wci.basis_type = WIP_CONSTANTS.PER_LOT
4423: AND wci.transaction_type = WIP_CONSTANTS.RES_TXN
4424: AND wop.repetitive_schedule_id = wor.repetitive_schedule_id
4425: AND wci.organization_id = wor.organization_id
4426: AND wci.wip_entity_id = wor.wip_entity_id
4427: AND wci.operation_seq_num = wor.operation_seq_num

Line 4433: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE

4429: AND wci.resource_id = wor.resource_id
4430: AND wci.standard_rate_flag = wor.standard_rate_flag
4431: AND wci.usage_rate_or_amount = wor.usage_rate_or_amount
4432: AND NVL(wci.activity_id, -1) = NVL(wor.activity_id, -1)
4433: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE
4434: AND wor.basis_type = WIP_CONSTANTS.PER_LOT
4435: AND wop.organization_id = wmti.organization_id
4436: AND wop.wip_entity_id = wmti.wip_entity_id
4437: AND wop.repetitive_schedule_id = wma.repetitive_schedule_id

Line 4434: AND wor.basis_type = WIP_CONSTANTS.PER_LOT

4430: AND wci.standard_rate_flag = wor.standard_rate_flag
4431: AND wci.usage_rate_or_amount = wor.usage_rate_or_amount
4432: AND NVL(wci.activity_id, -1) = NVL(wor.activity_id, -1)
4433: AND wor.autocharge_type = WIP_CONSTANTS.WIP_MOVE
4434: AND wor.basis_type = WIP_CONSTANTS.PER_LOT
4435: AND wop.organization_id = wmti.organization_id
4436: AND wop.wip_entity_id = wmti.wip_entity_id
4437: AND wop.repetitive_schedule_id = wma.repetitive_schedule_id
4438: AND wmti.organization_id = wma.organization_id

Line 4445: IF (l_logLevel <= wip_constants.full_logging) THEN

4441: GROUP BY wci.transaction_id,
4442: wma.repetitive_schedule_id;
4443:
4444: -- IF debug message level = 2, write statement below to log file
4445: IF (l_logLevel <= wip_constants.full_logging) THEN
4446: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
4447: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
4448: fnd_message.set_token('ENTITY2', 'WIP_TXN_ALLOCATIONS');
4449: l_msg := fnd_message.get;

Line 4459: IF (l_logLevel <= wip_constants.trace_logging) THEN

4455:
4456: x_returnStatus := fnd_api.g_ret_sts_success;
4457:
4458: -- write to the log file
4459: IF (l_logLevel <= wip_constants.trace_logging) THEN
4460: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_auto_resource',
4461: p_procReturnStatus => x_returnStatus,
4462: p_msg => 'procedure complete',
4463: x_returnStatus => l_returnStatus);

Line 4471: IF (l_logLevel <= wip_constants.trace_logging) THEN

4467: WHEN others THEN
4468: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
4469: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
4470:
4471: IF (l_logLevel <= wip_constants.trace_logging) THEN
4472: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.insert_auto_resource',
4473: p_procReturnStatus => x_returnStatus,
4474: p_msg => l_errMsg,
4475: x_returnStatus => l_returnStatus);

Line 4501: IF (l_logLevel <= wip_constants.trace_logging) THEN

4497: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
4498:
4499: BEGIN
4500: -- write parameter value to log file
4501: IF (l_logLevel <= wip_constants.trace_logging) THEN
4502: l_params(1).paramName := 'p_group_id';
4503: l_params(1).paramValue := p_gib.group_id;
4504: wip_logger.entryPoint(p_procName =>'wip_movProc_priv.insert_txn_alloc',
4505: p_params => l_params,

Line 4547: WIP_CONSTANTS.RUN),

4543: wmta.transaction_quantity * wor.usage_rate_or_amount
4544: * DECODE(SIGN(wmti.to_operation_seq_num -
4545: wmti.fm_operation_seq_num),
4546: 0, DECODE(SIGN(wmti.fm_intraoperation_step_type -
4547: WIP_CONSTANTS.RUN),
4548: 1, -1, DECODE(SIGN(wmti.to_intraoperation_step_type -
4549: WIP_CONSTANTS.RUN),1, 1, -1)),
4550: 1, 1,
4551: -1,-1), -- transaction_quantity

Line 4549: WIP_CONSTANTS.RUN),1, 1, -1)),

4545: wmti.fm_operation_seq_num),
4546: 0, DECODE(SIGN(wmti.fm_intraoperation_step_type -
4547: WIP_CONSTANTS.RUN),
4548: 1, -1, DECODE(SIGN(wmti.to_intraoperation_step_type -
4549: WIP_CONSTANTS.RUN),1, 1, -1)),
4550: 1, 1,
4551: -1,-1), -- transaction_quantity
4552: wmta.primary_quantity * wor.usage_rate_or_amount
4553: * DECODE(SIGN(wmti.to_operation_seq_num -

Line 4556: WIP_CONSTANTS.RUN),

4552: wmta.primary_quantity * wor.usage_rate_or_amount
4553: * DECODE(SIGN(wmti.to_operation_seq_num -
4554: wmti.fm_operation_seq_num),
4555: 0, DECODE(SIGN(wmti.fm_intraoperation_step_type -
4556: WIP_CONSTANTS.RUN),
4557: 1, -1, DECODE(SIGN(wmti.to_intraoperation_step_type -
4558: WIP_CONSTANTS.RUN),1, 1, -1)),
4559: 1, 1,
4560: -1,-1) -- primary_quantity

Line 4558: WIP_CONSTANTS.RUN),1, 1, -1)),

4554: wmti.fm_operation_seq_num),
4555: 0, DECODE(SIGN(wmti.fm_intraoperation_step_type -
4556: WIP_CONSTANTS.RUN),
4557: 1, -1, DECODE(SIGN(wmti.to_intraoperation_step_type -
4558: WIP_CONSTANTS.RUN),1, 1, -1)),
4559: 1, 1,
4560: -1,-1) -- primary_quantity
4561: FROM wip_operation_resources wor,
4562: wip_move_txn_allocations wmta,

Line 4566: AND wcti.process_phase = WIP_CONSTANTS.RES_PROC

4562: wip_move_txn_allocations wmta,
4563: wip_move_txn_interface wmti,
4564: wip_cost_txn_interface wcti
4565: WHERE wcti.group_id = p_gib.group_id
4566: AND wcti.process_phase = WIP_CONSTANTS.RES_PROC
4567: AND wcti.process_status = WIP_CONSTANTS.PENDING
4568: AND wcti.transaction_type = WIP_CONSTANTS.RES_TXN
4569: AND wcti.move_transaction_id IS NOT NULL /* Automatic resource */
4570: AND wcti.entity_type = WIP_CONSTANTS.REPETITIVE

Line 4567: AND wcti.process_status = WIP_CONSTANTS.PENDING

4563: wip_move_txn_interface wmti,
4564: wip_cost_txn_interface wcti
4565: WHERE wcti.group_id = p_gib.group_id
4566: AND wcti.process_phase = WIP_CONSTANTS.RES_PROC
4567: AND wcti.process_status = WIP_CONSTANTS.PENDING
4568: AND wcti.transaction_type = WIP_CONSTANTS.RES_TXN
4569: AND wcti.move_transaction_id IS NOT NULL /* Automatic resource */
4570: AND wcti.entity_type = WIP_CONSTANTS.REPETITIVE
4571: AND wcti.basis_type = WIP_CONSTANTS.PER_ITEM

Line 4568: AND wcti.transaction_type = WIP_CONSTANTS.RES_TXN

4564: wip_cost_txn_interface wcti
4565: WHERE wcti.group_id = p_gib.group_id
4566: AND wcti.process_phase = WIP_CONSTANTS.RES_PROC
4567: AND wcti.process_status = WIP_CONSTANTS.PENDING
4568: AND wcti.transaction_type = WIP_CONSTANTS.RES_TXN
4569: AND wcti.move_transaction_id IS NOT NULL /* Automatic resource */
4570: AND wcti.entity_type = WIP_CONSTANTS.REPETITIVE
4571: AND wcti.basis_type = WIP_CONSTANTS.PER_ITEM
4572: AND wcti.group_id = wmti.group_id /* Bug 938039, 979553*/

Line 4570: AND wcti.entity_type = WIP_CONSTANTS.REPETITIVE

4566: AND wcti.process_phase = WIP_CONSTANTS.RES_PROC
4567: AND wcti.process_status = WIP_CONSTANTS.PENDING
4568: AND wcti.transaction_type = WIP_CONSTANTS.RES_TXN
4569: AND wcti.move_transaction_id IS NOT NULL /* Automatic resource */
4570: AND wcti.entity_type = WIP_CONSTANTS.REPETITIVE
4571: AND wcti.basis_type = WIP_CONSTANTS.PER_ITEM
4572: AND wcti.group_id = wmti.group_id /* Bug 938039, 979553*/
4573: AND wcti.move_transaction_id = wmti.transaction_id
4574: AND wcti.move_transaction_id = wmta.transaction_id

Line 4571: AND wcti.basis_type = WIP_CONSTANTS.PER_ITEM

4567: AND wcti.process_status = WIP_CONSTANTS.PENDING
4568: AND wcti.transaction_type = WIP_CONSTANTS.RES_TXN
4569: AND wcti.move_transaction_id IS NOT NULL /* Automatic resource */
4570: AND wcti.entity_type = WIP_CONSTANTS.REPETITIVE
4571: AND wcti.basis_type = WIP_CONSTANTS.PER_ITEM
4572: AND wcti.group_id = wmti.group_id /* Bug 938039, 979553*/
4573: AND wcti.move_transaction_id = wmti.transaction_id
4574: AND wcti.move_transaction_id = wmta.transaction_id
4575: AND wcti.organization_id = wmta.organization_id

Line 4587: IF (l_logLevel <= wip_constants.full_logging) THEN

4583: AND wor.standard_rate_flag = wcti.standard_rate_flag
4584: AND wor.usage_rate_or_amount = wcti.usage_rate_or_amount;
4585:
4586: -- IF debug message level = 2, write statement below to log file
4587: IF (l_logLevel <= wip_constants.full_logging) THEN
4588: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
4589: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
4590: fnd_message.set_token('ENTITY2', 'WIP_TXN_ALLOCATIONS');
4591: l_msg := fnd_message.get;

Line 4599: IF (l_logLevel <= wip_constants.trace_logging) THEN

4595:
4596: x_returnStatus := fnd_api.g_ret_sts_success;
4597:
4598: -- write to the log file
4599: IF (l_logLevel <= wip_constants.trace_logging) THEN
4600: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_txn_alloc',
4601: p_procReturnStatus => x_returnStatus,
4602: p_msg => 'procedure complete',
4603: x_returnStatus => l_returnStatus);

Line 4611: IF (l_logLevel <= wip_constants.trace_logging) THEN

4607: WHEN others THEN
4608: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
4609: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
4610:
4611: IF (l_logLevel <= wip_constants.trace_logging) THEN
4612: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.insert_txn_alloc',
4613: p_procReturnStatus => x_returnStatus,
4614: p_msg => l_errMsg,
4615: x_returnStatus => l_returnStatus);

Line 4641: IF (l_logLevel <= wip_constants.trace_logging) THEN

4637: BEGIN
4638: l_move := p_gib.move_profile;
4639:
4640: -- write parameter value to log file
4641: IF (l_logLevel <= wip_constants.trace_logging) THEN
4642: l_params(1).paramName := 'p_group_id';
4643: l_params(1).paramValue := p_gib.group_id;
4644: l_params(2).paramName := 'p_txn_date';
4645: l_params(2).paramValue := p_gib.txn_date;

Line 4682: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN

4678: x_returnStatus => l_returnStatus);
4679: END IF;
4680:
4681: -- Per item basis type for discrete jobs
4682: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN
4683:
4684: INSERT INTO wip_cost_txn_interface
4685: (transaction_id,
4686: last_update_date,

Line 4756: WIP_CONSTANTS.RES_PROC, -- process_phase

4752: DECODE(p_gib.request_id,-1,NULL,SYSDATE), -- program_update_date
4753: p_gib.group_id,
4754: MAX(wmti.source_code),
4755: MAX(wmti.source_line_id),
4756: WIP_CONSTANTS.RES_PROC, -- process_phase
4757: WIP_CONSTANTS.PENDING, -- process_status
4758: WIP_CONSTANTS.OVHD_TXN, -- transaction_type
4759: MAX(wmti.organization_id),
4760: MAX(wmti.organization_code),

Line 4757: WIP_CONSTANTS.PENDING, -- process_status

4753: p_gib.group_id,
4754: MAX(wmti.source_code),
4755: MAX(wmti.source_line_id),
4756: WIP_CONSTANTS.RES_PROC, -- process_phase
4757: WIP_CONSTANTS.PENDING, -- process_status
4758: WIP_CONSTANTS.OVHD_TXN, -- transaction_type
4759: MAX(wmti.organization_id),
4760: MAX(wmti.organization_code),
4761: MAX(wmti.wip_entity_id),

Line 4758: WIP_CONSTANTS.OVHD_TXN, -- transaction_type

4754: MAX(wmti.source_code),
4755: MAX(wmti.source_line_id),
4756: WIP_CONSTANTS.RES_PROC, -- process_phase
4757: WIP_CONSTANTS.PENDING, -- process_status
4758: WIP_CONSTANTS.OVHD_TXN, -- transaction_type
4759: MAX(wmti.organization_id),
4760: MAX(wmti.organization_code),
4761: MAX(wmti.wip_entity_id),
4762: MAX(wmti.entity_type),

Line 4777: WIP_CONSTANTS.PER_ITEM, -- basis_type

4773: NULL, -- resource_id
4774: NULL, -- resource_code
4775: MAX(wor.phantom_flag),
4776: NULL, -- usage_rate_or_amount
4777: WIP_CONSTANTS.PER_ITEM, -- basis_type
4778: WIP_CONSTANTS.WIP_MOVE, -- autocharge_type
4779: NULL, -- standard_rate_flag
4780: MAX(NVL(DECODE(wor.phantom_flag, 1, wro.quantity_per_assembly, 1)
4781: * wmti.primary_quantity *

Line 4778: WIP_CONSTANTS.WIP_MOVE, -- autocharge_type

4774: NULL, -- resource_code
4775: MAX(wor.phantom_flag),
4776: NULL, -- usage_rate_or_amount
4777: WIP_CONSTANTS.PER_ITEM, -- basis_type
4778: WIP_CONSTANTS.WIP_MOVE, -- autocharge_type
4779: NULL, -- standard_rate_flag
4780: MAX(NVL(DECODE(wor.phantom_flag, 1, wro.quantity_per_assembly, 1)
4781: * wmti.primary_quantity *
4782: DECODE(SIGN(wmti.to_operation_seq_num -

Line 4785: WIP_CONSTANTS.RUN),

4781: * wmti.primary_quantity *
4782: DECODE(SIGN(wmti.to_operation_seq_num -
4783: wmti.fm_operation_seq_num),
4784: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4785: WIP_CONSTANTS.RUN),
4786: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4787: WIP_CONSTANTS.RUN),1,1,-1),
4788: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4789: WIP_CONSTANTS.RUN),1,1,-1),

Line 4787: WIP_CONSTANTS.RUN),1,1,-1),

4783: wmti.fm_operation_seq_num),
4784: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4785: WIP_CONSTANTS.RUN),
4786: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4787: WIP_CONSTANTS.RUN),1,1,-1),
4788: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4789: WIP_CONSTANTS.RUN),1,1,-1),
4790: 1,-1),
4791: 1, 1,

Line 4789: WIP_CONSTANTS.RUN),1,1,-1),

4785: WIP_CONSTANTS.RUN),
4786: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4787: WIP_CONSTANTS.RUN),1,1,-1),
4788: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4789: WIP_CONSTANTS.RUN),1,1,-1),
4790: 1,-1),
4791: 1, 1,
4792: -1,-1)
4793: ,0)), -- transaction_quantity

Line 4800: WIP_CONSTANTS.RUN),

4796: * wmti.primary_quantity *
4797: DECODE(SIGN(wmti.to_operation_seq_num -
4798: wmti.fm_operation_seq_num),
4799: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4800: WIP_CONSTANTS.RUN),
4801: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4802: WIP_CONSTANTS.RUN),1,1,-1),
4803: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4804: WIP_CONSTANTS.RUN),1,1,-1),

Line 4802: WIP_CONSTANTS.RUN),1,1,-1),

4798: wmti.fm_operation_seq_num),
4799: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
4800: WIP_CONSTANTS.RUN),
4801: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4802: WIP_CONSTANTS.RUN),1,1,-1),
4803: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4804: WIP_CONSTANTS.RUN),1,1,-1),
4805: 1,-1),
4806: 1, 1,

Line 4804: WIP_CONSTANTS.RUN),1,1,-1),

4800: WIP_CONSTANTS.RUN),
4801: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
4802: WIP_CONSTANTS.RUN),1,1,-1),
4803: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
4804: WIP_CONSTANTS.RUN),1,1,-1),
4805: 1,-1),
4806: 1, 1,
4807: -1,-1)
4808: ,0)), -- primary_quantity

Line 4832: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

4828: WHERE wmti.group_id = p_gib.group_id
4829: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
4830: AND wdj.wip_entity_id = wmti.wip_entity_id
4831: AND wdj.organization_id = wmti.organization_id
4832: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
4833: AND wmti.process_status = WIP_CONSTANTS.RUNNING
4834: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
4835: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM */
4836: AND wop.organization_id = wmti.organization_id

Line 4833: AND wmti.process_status = WIP_CONSTANTS.RUNNING

4829: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
4830: AND wdj.wip_entity_id = wmti.wip_entity_id
4831: AND wdj.organization_id = wmti.organization_id
4832: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
4833: AND wmti.process_status = WIP_CONSTANTS.RUNNING
4834: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
4835: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM */
4836: AND wop.organization_id = wmti.organization_id
4837: AND wop.wip_entity_id = wmti.wip_entity_id

Line 4834: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE

4830: AND wdj.wip_entity_id = wmti.wip_entity_id
4831: AND wdj.organization_id = wmti.organization_id
4832: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
4833: AND wmti.process_status = WIP_CONSTANTS.RUNNING
4834: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
4835: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM */
4836: AND wop.organization_id = wmti.organization_id
4837: AND wop.wip_entity_id = wmti.wip_entity_id
4838: AND wop.organization_id = bd.organization_id

Line 4835: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM */

4831: AND wdj.organization_id = wmti.organization_id
4832: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
4833: AND wmti.process_status = WIP_CONSTANTS.RUNNING
4834: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
4835: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM */
4836: AND wop.organization_id = wmti.organization_id
4837: AND wop.wip_entity_id = wmti.wip_entity_id
4838: AND wop.organization_id = bd.organization_id
4839: AND NVL(wor.department_id, wop.department_id) = bd.department_id

Line 4844: AND NVL(wop.skip_flag, WIP_CONSTANTS.NO) <> WIP_CONSTANTS.YES

4840: AND wop.organization_id = wor.organization_id(+)
4841: AND wop.wip_entity_id = wor.wip_entity_id(+)
4842: AND wop.operation_seq_num = wor.operation_seq_num(+)
4843: /* added for OSFM jump enhancement 2541431 */
4844: AND NVL(wop.skip_flag, WIP_CONSTANTS.NO) <> WIP_CONSTANTS.YES
4845: AND wor.wip_entity_id = wro.wip_entity_id (+)
4846: AND wor.organization_id = wro.organization_id (+)
4847: /* Fixed bug 3881663. Op seq in wro is a negative number,
4848: * but op seq in wor is a positive number.*/

Line 4860: WIP_CONSTANTS.RUN),1,1,0)

4856: )
4857: AND (
4858: (wop.operation_seq_num >= wmti.fm_operation_seq_num
4859: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4860: WIP_CONSTANTS.RUN),1,1,0)
4861: AND wop.operation_seq_num < wmti.to_operation_seq_num
4862: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4863: WIP_CONSTANTS.RUN),1,1,0)
4864: AND(wmti.to_operation_seq_num > wmti.fm_operation_seq_num

Line 4863: WIP_CONSTANTS.RUN),1,1,0)

4859: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4860: WIP_CONSTANTS.RUN),1,1,0)
4861: AND wop.operation_seq_num < wmti.to_operation_seq_num
4862: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4863: WIP_CONSTANTS.RUN),1,1,0)
4864: AND(wmti.to_operation_seq_num > wmti.fm_operation_seq_num
4865: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
4866: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
4867: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

Line 4866: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN

4862: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4863: WIP_CONSTANTS.RUN),1,1,0)
4864: AND(wmti.to_operation_seq_num > wmti.fm_operation_seq_num
4865: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
4866: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
4867: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
4868: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4869: OR wop.operation_seq_num = wmti.fm_operation_seq_num
4870: OR (wop.operation_seq_num = wmti.to_operation_seq_num

Line 4867: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

4863: WIP_CONSTANTS.RUN),1,1,0)
4864: AND(wmti.to_operation_seq_num > wmti.fm_operation_seq_num
4865: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
4866: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
4867: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
4868: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4869: OR wop.operation_seq_num = wmti.fm_operation_seq_num
4870: OR (wop.operation_seq_num = wmti.to_operation_seq_num
4871: AND wmti.to_intraoperation_step_type >

Line 4868: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL

4864: AND(wmti.to_operation_seq_num > wmti.fm_operation_seq_num
4865: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
4866: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
4867: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
4868: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4869: OR wop.operation_seq_num = wmti.fm_operation_seq_num
4870: OR (wop.operation_seq_num = wmti.to_operation_seq_num
4871: AND wmti.to_intraoperation_step_type >
4872: WIP_CONSTANTS.RUN)))

Line 4872: WIP_CONSTANTS.RUN)))

4868: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4869: OR wop.operation_seq_num = wmti.fm_operation_seq_num
4870: OR (wop.operation_seq_num = wmti.to_operation_seq_num
4871: AND wmti.to_intraoperation_step_type >
4872: WIP_CONSTANTS.RUN)))
4873: OR
4874: (wop.operation_seq_num < wmti.fm_operation_seq_num
4875: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4876: WIP_CONSTANTS.RUN),1,1,0)

Line 4876: WIP_CONSTANTS.RUN),1,1,0)

4872: WIP_CONSTANTS.RUN)))
4873: OR
4874: (wop.operation_seq_num < wmti.fm_operation_seq_num
4875: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4876: WIP_CONSTANTS.RUN),1,1,0)
4877: AND wop.operation_seq_num >= wmti.to_operation_seq_num
4878: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4879: WIP_CONSTANTS.RUN),1,1,0)
4880: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num

Line 4879: WIP_CONSTANTS.RUN),1,1,0)

4875: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
4876: WIP_CONSTANTS.RUN),1,1,0)
4877: AND wop.operation_seq_num >= wmti.to_operation_seq_num
4878: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4879: WIP_CONSTANTS.RUN),1,1,0)
4880: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
4881: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
4882: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
4883: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

Line 4882: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN

4878: + DECODE(SIGN(wmti.to_intraoperation_step_type -
4879: WIP_CONSTANTS.RUN),1,1,0)
4880: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
4881: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
4882: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
4883: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
4884: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4885: OR wop.operation_seq_num = wmti.to_operation_seq_num
4886: OR (wop.operation_seq_num = wmti.fm_operation_seq_num

Line 4883: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

4879: WIP_CONSTANTS.RUN),1,1,0)
4880: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
4881: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
4882: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
4883: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
4884: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4885: OR wop.operation_seq_num = wmti.to_operation_seq_num
4886: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
4887: AND wmti.fm_intraoperation_step_type >

Line 4884: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL

4880: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
4881: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
4882: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
4883: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
4884: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4885: OR wop.operation_seq_num = wmti.to_operation_seq_num
4886: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
4887: AND wmti.fm_intraoperation_step_type >
4888: WIP_CONSTANTS.RUN))))

Line 4888: WIP_CONSTANTS.RUN))))

4884: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
4885: OR wop.operation_seq_num = wmti.to_operation_seq_num
4886: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
4887: AND wmti.fm_intraoperation_step_type >
4888: WIP_CONSTANTS.RUN))))
4889: GROUP BY wop.wip_entity_id,
4890: wop.operation_seq_num,
4891: wor.department_id,/*Fixed bug 2834503*/
4892: wop.department_id,

Line 4898: IF (l_logLevel <= wip_constants.full_logging) THEN

4894: wor.phantom_op_seq_num,
4895: wmti.transaction_id; /* 2821017 */
4896:
4897: -- IF debug message level = 2, write statement below to log file
4898: IF (l_logLevel <= wip_constants.full_logging) THEN
4899: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
4900: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
4901: fnd_message.set_token('ENTITY2', 'WIP_COST_TXN_INTERFACE');
4902: l_msg := fnd_message.get;

Line 4910: IF(l_move.scheTxn = WIP_CONSTANTS.YES) THEN

4906:
4907: END IF; --Per item basis type for discrete jobs
4908:
4909: -- Per item basis type for repetitive schedule
4910: IF(l_move.scheTxn = WIP_CONSTANTS.YES) THEN
4911:
4912: INSERT INTO wip_cost_txn_interface
4913: (transaction_id,
4914: last_update_date,

Line 4982: WIP_CONSTANTS.RES_PROC, -- process_phase

4978: DECODE(p_gib.request_id,-1,NULL,SYSDATE), -- program_update_date
4979: p_gib.group_id,
4980: MAX(wmti.source_code),
4981: MAX(wmti.source_line_id),
4982: WIP_CONSTANTS.RES_PROC, -- process_phase
4983: WIP_CONSTANTS.PENDING, -- process_status
4984: WIP_CONSTANTS.OVHD_TXN, -- transaction_type
4985: wmti.organization_id,
4986: MAX(wmti.organization_code),

Line 4983: WIP_CONSTANTS.PENDING, -- process_status

4979: p_gib.group_id,
4980: MAX(wmti.source_code),
4981: MAX(wmti.source_line_id),
4982: WIP_CONSTANTS.RES_PROC, -- process_phase
4983: WIP_CONSTANTS.PENDING, -- process_status
4984: WIP_CONSTANTS.OVHD_TXN, -- transaction_type
4985: wmti.organization_id,
4986: MAX(wmti.organization_code),
4987: wmti.wip_entity_id,

Line 4984: WIP_CONSTANTS.OVHD_TXN, -- transaction_type

4980: MAX(wmti.source_code),
4981: MAX(wmti.source_line_id),
4982: WIP_CONSTANTS.RES_PROC, -- process_phase
4983: WIP_CONSTANTS.PENDING, -- process_status
4984: WIP_CONSTANTS.OVHD_TXN, -- transaction_type
4985: wmti.organization_id,
4986: MAX(wmti.organization_code),
4987: wmti.wip_entity_id,
4988: MAX(wmti.entity_type),

Line 5003: WIP_CONSTANTS.PER_ITEM, -- basis_type

4999: NULL, -- resource_id
5000: NULL, -- resource_code
5001: max(wor.phantom_flag),
5002: NULL, -- usage_rate_or_amount
5003: WIP_CONSTANTS.PER_ITEM, -- basis_type
5004: WIP_CONSTANTS.WIP_MOVE, -- autocharge_type
5005: NULL, -- standard_rate_flag
5006: SUM(NVL(wma.primary_quantity *
5007: DECODE(SIGN(wmti.to_operation_seq_num -

Line 5004: WIP_CONSTANTS.WIP_MOVE, -- autocharge_type

5000: NULL, -- resource_code
5001: max(wor.phantom_flag),
5002: NULL, -- usage_rate_or_amount
5003: WIP_CONSTANTS.PER_ITEM, -- basis_type
5004: WIP_CONSTANTS.WIP_MOVE, -- autocharge_type
5005: NULL, -- standard_rate_flag
5006: SUM(NVL(wma.primary_quantity *
5007: DECODE(SIGN(wmti.to_operation_seq_num -
5008: wmti.fm_operation_seq_num),

Line 5010: WIP_CONSTANTS.RUN),

5006: SUM(NVL(wma.primary_quantity *
5007: DECODE(SIGN(wmti.to_operation_seq_num -
5008: wmti.fm_operation_seq_num),
5009: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5010: WIP_CONSTANTS.RUN),
5011: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5012: WIP_CONSTANTS.RUN),1,1,-1),
5013: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5014: WIP_CONSTANTS.RUN),1,1,-1),

Line 5012: WIP_CONSTANTS.RUN),1,1,-1),

5008: wmti.fm_operation_seq_num),
5009: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5010: WIP_CONSTANTS.RUN),
5011: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5012: WIP_CONSTANTS.RUN),1,1,-1),
5013: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5014: WIP_CONSTANTS.RUN),1,1,-1),
5015: 1,-1),
5016: 1, 1,

Line 5014: WIP_CONSTANTS.RUN),1,1,-1),

5010: WIP_CONSTANTS.RUN),
5011: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5012: WIP_CONSTANTS.RUN),1,1,-1),
5013: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5014: WIP_CONSTANTS.RUN),1,1,-1),
5015: 1,-1),
5016: 1, 1,
5017: -1,-1)
5018: ,0)), -- transaction_quantity

Line 5024: WIP_CONSTANTS.RUN),

5020: SUM(NVL(wma.primary_quantity *
5021: DECODE(SIGN(wmti.to_operation_seq_num -
5022: wmti.fm_operation_seq_num),
5023: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5024: WIP_CONSTANTS.RUN),
5025: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5026: WIP_CONSTANTS.RUN),1,1,-1),
5027: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5028: WIP_CONSTANTS.RUN),1,1,-1),

Line 5026: WIP_CONSTANTS.RUN),1,1,-1),

5022: wmti.fm_operation_seq_num),
5023: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5024: WIP_CONSTANTS.RUN),
5025: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5026: WIP_CONSTANTS.RUN),1,1,-1),
5027: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5028: WIP_CONSTANTS.RUN),1,1,-1),
5029: 1,-1),
5030: 1, 1,

Line 5028: WIP_CONSTANTS.RUN),1,1,-1),

5024: WIP_CONSTANTS.RUN),
5025: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5026: WIP_CONSTANTS.RUN),1,1,-1),
5027: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5028: WIP_CONSTANTS.RUN),1,1,-1),
5029: 1,-1),
5030: 1, 1,
5031: -1,-1)
5032: ,0)), -- primary_quantity

Line 5051: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

5047: wip_move_txn_interface wmti,
5048: wip_operation_resources wor
5049: WHERE wmti.group_id = p_gib.group_id
5050: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5051: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5052: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5053: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
5054: AND wop.organization_id = wmti.organization_id
5055: AND wop.wip_entity_id = wmti.wip_entity_id

Line 5052: AND wmti.process_status = WIP_CONSTANTS.RUNNING

5048: wip_operation_resources wor
5049: WHERE wmti.group_id = p_gib.group_id
5050: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5051: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5052: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5053: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
5054: AND wop.organization_id = wmti.organization_id
5055: AND wop.wip_entity_id = wmti.wip_entity_id
5056: AND wmti.organization_id = wma.organization_id

Line 5053: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

5049: WHERE wmti.group_id = p_gib.group_id
5050: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5051: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5052: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5053: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
5054: AND wop.organization_id = wmti.organization_id
5055: AND wop.wip_entity_id = wmti.wip_entity_id
5056: AND wmti.organization_id = wma.organization_id
5057: AND wmti.transaction_id = wma.transaction_id

Line 5068: WIP_CONSTANTS.RUN),1,1,0)

5064: AND wor.repetitive_schedule_id = wop.repetitive_schedule_id
5065: AND (
5066: (wop.operation_seq_num >= wmti.fm_operation_seq_num
5067: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5068: WIP_CONSTANTS.RUN),1,1,0)
5069: AND wop.operation_seq_num < wmti.to_operation_seq_num
5070: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5071: WIP_CONSTANTS.RUN),1,1,0)
5072: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num

Line 5071: WIP_CONSTANTS.RUN),1,1,0)

5067: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5068: WIP_CONSTANTS.RUN),1,1,0)
5069: AND wop.operation_seq_num < wmti.to_operation_seq_num
5070: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5071: WIP_CONSTANTS.RUN),1,1,0)
5072: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
5073: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
5074: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
5075: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

Line 5074: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN

5070: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5071: WIP_CONSTANTS.RUN),1,1,0)
5072: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
5073: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
5074: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
5075: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
5076: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5077: OR wop.operation_seq_num = wmti.fm_operation_seq_num
5078: OR (wop.operation_seq_num = wmti.to_operation_seq_num

Line 5075: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

5071: WIP_CONSTANTS.RUN),1,1,0)
5072: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
5073: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
5074: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
5075: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
5076: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5077: OR wop.operation_seq_num = wmti.fm_operation_seq_num
5078: OR (wop.operation_seq_num = wmti.to_operation_seq_num
5079: AND wmti.to_intraoperation_step_type >

Line 5076: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL

5072: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
5073: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
5074: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
5075: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
5076: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5077: OR wop.operation_seq_num = wmti.fm_operation_seq_num
5078: OR (wop.operation_seq_num = wmti.to_operation_seq_num
5079: AND wmti.to_intraoperation_step_type >
5080: WIP_CONSTANTS.RUN)))

Line 5080: WIP_CONSTANTS.RUN)))

5076: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5077: OR wop.operation_seq_num = wmti.fm_operation_seq_num
5078: OR (wop.operation_seq_num = wmti.to_operation_seq_num
5079: AND wmti.to_intraoperation_step_type >
5080: WIP_CONSTANTS.RUN)))
5081: OR
5082: (wop.operation_seq_num < wmti.fm_operation_seq_num
5083: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5084: WIP_CONSTANTS.RUN),1,1,0)

Line 5084: WIP_CONSTANTS.RUN),1,1,0)

5080: WIP_CONSTANTS.RUN)))
5081: OR
5082: (wop.operation_seq_num < wmti.fm_operation_seq_num
5083: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5084: WIP_CONSTANTS.RUN),1,1,0)
5085: AND wop.operation_seq_num >= wmti.to_operation_seq_num
5086: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5087: WIP_CONSTANTS.RUN),1,1,0)
5088: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num

Line 5087: WIP_CONSTANTS.RUN),1,1,0)

5083: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5084: WIP_CONSTANTS.RUN),1,1,0)
5085: AND wop.operation_seq_num >= wmti.to_operation_seq_num
5086: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5087: WIP_CONSTANTS.RUN),1,1,0)
5088: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
5089: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
5090: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
5091: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

Line 5090: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN

5086: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5087: WIP_CONSTANTS.RUN),1,1,0)
5088: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
5089: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
5090: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
5091: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
5092: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5093: OR wop.operation_seq_num = wmti.to_operation_seq_num
5094: OR (wop.operation_seq_num = wmti.fm_operation_seq_num

Line 5091: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

5087: WIP_CONSTANTS.RUN),1,1,0)
5088: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
5089: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
5090: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
5091: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
5092: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5093: OR wop.operation_seq_num = wmti.to_operation_seq_num
5094: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
5095: AND wmti.fm_intraoperation_step_type >

Line 5092: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL

5088: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
5089: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
5090: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
5091: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
5092: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5093: OR wop.operation_seq_num = wmti.to_operation_seq_num
5094: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
5095: AND wmti.fm_intraoperation_step_type >
5096: WIP_CONSTANTS.RUN))))

Line 5096: WIP_CONSTANTS.RUN))))

5092: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5093: OR wop.operation_seq_num = wmti.to_operation_seq_num
5094: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
5095: AND wmti.fm_intraoperation_step_type >
5096: WIP_CONSTANTS.RUN))))
5097: GROUP BY wmti.organization_id,
5098: wmti.wip_entity_id,
5099: wmti.line_id,
5100: wor.operation_seq_num,

Line 5108: IF (l_logLevel <= wip_constants.full_logging) THEN

5104: wor.phantom_item_id,
5105: wor.phantom_op_seq_num;
5106:
5107: -- IF debug message level = 2, write statement below to log file
5108: IF (l_logLevel <= wip_constants.full_logging) THEN
5109: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
5110: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
5111: fnd_message.set_token('ENTITY2', 'WIP_COST_TXN_INTERFACE');
5112: l_msg := fnd_message.get;

Line 5127: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN

5123: | wmti.reason_id, wmti.reference may not make sense since they are
5124: | tied to the transaction_id. NULL them out [24-JUL-92, John, Djuki.
5125: | We have more than one record per op_seq because of quantity_completed
5126: +----------------------------------------------------------------------*/
5127: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN
5128:
5129: INSERT INTO wip_cost_txn_interface
5130: (transaction_id,
5131: last_update_date,

Line 5201: WIP_CONSTANTS.RES_PROC, -- process_phase

5197: DECODE(p_gib.request_id,-1,NULL,SYSDATE), -- program_update_date
5198: p_gib.group_id,
5199: MAX(wmti.source_code), -- source_code
5200: MAX(wmti.source_line_id), -- source_line_id
5201: WIP_CONSTANTS.RES_PROC, -- process_phase
5202: WIP_CONSTANTS.PENDING, -- process_status
5203: WIP_CONSTANTS.OVHD_TXN, -- transaction_type
5204: wmti.organization_id,
5205: MAX(wmti.organization_code),

Line 5202: WIP_CONSTANTS.PENDING, -- process_status

5198: p_gib.group_id,
5199: MAX(wmti.source_code), -- source_code
5200: MAX(wmti.source_line_id), -- source_line_id
5201: WIP_CONSTANTS.RES_PROC, -- process_phase
5202: WIP_CONSTANTS.PENDING, -- process_status
5203: WIP_CONSTANTS.OVHD_TXN, -- transaction_type
5204: wmti.organization_id,
5205: MAX(wmti.organization_code),
5206: wmti.wip_entity_id,

Line 5203: WIP_CONSTANTS.OVHD_TXN, -- transaction_type

5199: MAX(wmti.source_code), -- source_code
5200: MAX(wmti.source_line_id), -- source_line_id
5201: WIP_CONSTANTS.RES_PROC, -- process_phase
5202: WIP_CONSTANTS.PENDING, -- process_status
5203: WIP_CONSTANTS.OVHD_TXN, -- transaction_type
5204: wmti.organization_id,
5205: MAX(wmti.organization_code),
5206: wmti.wip_entity_id,
5207: MAX(entity_type),

Line 5222: WIP_CONSTANTS.PER_LOT, -- basis_type

5218: NULL, -- resource_id
5219: NULL, -- resource_code
5220: MAX(wor.phantom_flag),
5221: NULL, -- usage_rate_or_amount
5222: WIP_CONSTANTS.PER_LOT, -- basis_type
5223: WIP_CONSTANTS.WIP_MOVE, -- autocharge_type
5224: NULL, -- standard_rate_flag
5225: DECODE(SIGN(MAX(wop.quantity_completed) +
5226: /* Fixed bug 3740010 change from "NVL(SUM(wmti.primary_quantity"

Line 5223: WIP_CONSTANTS.WIP_MOVE, -- autocharge_type

5219: NULL, -- resource_code
5220: MAX(wor.phantom_flag),
5221: NULL, -- usage_rate_or_amount
5222: WIP_CONSTANTS.PER_LOT, -- basis_type
5223: WIP_CONSTANTS.WIP_MOVE, -- autocharge_type
5224: NULL, -- standard_rate_flag
5225: DECODE(SIGN(MAX(wop.quantity_completed) +
5226: /* Fixed bug 3740010 change from "NVL(SUM(wmti.primary_quantity"
5227: * to "NVL(MAX(wmti.primary_quantity" because there may be

Line 5234: WIP_CONSTANTS.RUN),

5230: NVL(MAX(wmti.primary_quantity *
5231: DECODE(SIGN(wmti.to_operation_seq_num -
5232: wmti.fm_operation_seq_num),
5233: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5234: WIP_CONSTANTS.RUN),
5235: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5236: WIP_CONSTANTS.RUN),1,1,-1),
5237: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5238: WIP_CONSTANTS.RUN),1,1,-1),

Line 5236: WIP_CONSTANTS.RUN),1,1,-1),

5232: wmti.fm_operation_seq_num),
5233: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5234: WIP_CONSTANTS.RUN),
5235: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5236: WIP_CONSTANTS.RUN),1,1,-1),
5237: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5238: WIP_CONSTANTS.RUN),1,1,-1),
5239: 1,-1),
5240: 1, 1,

Line 5238: WIP_CONSTANTS.RUN),1,1,-1),

5234: WIP_CONSTANTS.RUN),
5235: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5236: WIP_CONSTANTS.RUN),1,1,-1),
5237: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5238: WIP_CONSTANTS.RUN),1,1,-1),
5239: 1,-1),
5240: 1, 1,
5241: -1,-1)
5242: ),0)), -- transaction_quantity

Line 5256: WIP_CONSTANTS.RUN),

5252: NVL(MAX(wmti.primary_quantity *
5253: DECODE(SIGN(wmti.to_operation_seq_num -
5254: wmti.fm_operation_seq_num),
5255: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5256: WIP_CONSTANTS.RUN),
5257: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5258: WIP_CONSTANTS.RUN),1,1,-1),
5259: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5260: WIP_CONSTANTS.RUN),1,1,-1),

Line 5258: WIP_CONSTANTS.RUN),1,1,-1),

5254: wmti.fm_operation_seq_num),
5255: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5256: WIP_CONSTANTS.RUN),
5257: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5258: WIP_CONSTANTS.RUN),1,1,-1),
5259: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5260: WIP_CONSTANTS.RUN),1,1,-1),
5261: 1,-1),
5262: 1, 1,

Line 5260: WIP_CONSTANTS.RUN),1,1,-1),

5256: WIP_CONSTANTS.RUN),
5257: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5258: WIP_CONSTANTS.RUN),1,1,-1),
5259: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5260: WIP_CONSTANTS.RUN),1,1,-1),
5261: 1,-1),
5262: 1, 1,
5263: -1,-1)
5264: ),0)), -- primary_quantity

Line 5288: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

5284: wip_discrete_jobs wdj,
5285: wip_move_txn_interface wmti
5286: WHERE wmti.group_id = p_gib.group_id
5287: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5288: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5289: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5290: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
5291: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
5292: AND wdj.wip_entity_id = wmti.wip_entity_id

Line 5289: AND wmti.process_status = WIP_CONSTANTS.RUNNING

5285: wip_move_txn_interface wmti
5286: WHERE wmti.group_id = p_gib.group_id
5287: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5288: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5289: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5290: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
5291: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
5292: AND wdj.wip_entity_id = wmti.wip_entity_id
5293: AND wdj.organization_id = wmti.organization_id

Line 5290: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE

5286: WHERE wmti.group_id = p_gib.group_id
5287: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5288: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5289: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5290: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
5291: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
5292: AND wdj.wip_entity_id = wmti.wip_entity_id
5293: AND wdj.organization_id = wmti.organization_id
5294: AND wop.organization_id = wmti.organization_id

Line 5291: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */

5287: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5288: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5289: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5290: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
5291: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
5292: AND wdj.wip_entity_id = wmti.wip_entity_id
5293: AND wdj.organization_id = wmti.organization_id
5294: AND wop.organization_id = wmti.organization_id
5295: AND wop.wip_entity_id = wmti.wip_entity_id

Line 5302: AND NVL(wop.skip_flag, WIP_CONSTANTS.NO) <> WIP_CONSTANTS.YES

5298: AND wop.organization_id = wor.organization_id(+)
5299: AND wop.wip_entity_id = wor.wip_entity_id(+)
5300: AND wop.operation_seq_num = wor.operation_seq_num(+)
5301: /* added for OSFM jump enhancement 2541431 */
5302: AND NVL(wop.skip_flag, WIP_CONSTANTS.NO) <> WIP_CONSTANTS.YES
5303: /*bug 3930251 -> insert into WCTI only if there are records in CDO)*/
5304: AND EXISTS
5305: ( SELECT 1 FROM cst_department_overheads cdo
5306: WHERE cdo.organization_id = bd.organization_id

Line 5312: WIP_CONSTANTS.RUN),1,1,0)

5308: )
5309: AND (
5310: (wop.operation_seq_num >= wmti.fm_operation_seq_num
5311: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5312: WIP_CONSTANTS.RUN),1,1,0)
5313: AND wop.operation_seq_num < wmti.to_operation_seq_num
5314: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5315: WIP_CONSTANTS.RUN),1,1,0)
5316: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num

Line 5315: WIP_CONSTANTS.RUN),1,1,0)

5311: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5312: WIP_CONSTANTS.RUN),1,1,0)
5313: AND wop.operation_seq_num < wmti.to_operation_seq_num
5314: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5315: WIP_CONSTANTS.RUN),1,1,0)
5316: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
5317: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
5318: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
5319: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

Line 5318: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN

5314: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5315: WIP_CONSTANTS.RUN),1,1,0)
5316: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
5317: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
5318: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
5319: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
5320: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5321: OR wop.operation_seq_num = wmti.fm_operation_seq_num
5322: OR (wop.operation_seq_num = wmti.to_operation_seq_num

Line 5319: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

5315: WIP_CONSTANTS.RUN),1,1,0)
5316: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
5317: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
5318: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
5319: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
5320: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5321: OR wop.operation_seq_num = wmti.fm_operation_seq_num
5322: OR (wop.operation_seq_num = wmti.to_operation_seq_num
5323: AND wmti.to_intraoperation_step_type >

Line 5320: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL

5316: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
5317: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
5318: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
5319: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
5320: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5321: OR wop.operation_seq_num = wmti.fm_operation_seq_num
5322: OR (wop.operation_seq_num = wmti.to_operation_seq_num
5323: AND wmti.to_intraoperation_step_type >
5324: WIP_CONSTANTS.RUN)))

Line 5324: WIP_CONSTANTS.RUN)))

5320: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5321: OR wop.operation_seq_num = wmti.fm_operation_seq_num
5322: OR (wop.operation_seq_num = wmti.to_operation_seq_num
5323: AND wmti.to_intraoperation_step_type >
5324: WIP_CONSTANTS.RUN)))
5325: OR
5326: (wop.operation_seq_num < wmti.fm_operation_seq_num
5327: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5328: WIP_CONSTANTS.RUN),1,1,0)

Line 5328: WIP_CONSTANTS.RUN),1,1,0)

5324: WIP_CONSTANTS.RUN)))
5325: OR
5326: (wop.operation_seq_num < wmti.fm_operation_seq_num
5327: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5328: WIP_CONSTANTS.RUN),1,1,0)
5329: AND wop.operation_seq_num >= wmti.to_operation_seq_num
5330: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5331: WIP_CONSTANTS.RUN),1,1,0)
5332: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num

Line 5331: WIP_CONSTANTS.RUN),1,1,0)

5327: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5328: WIP_CONSTANTS.RUN),1,1,0)
5329: AND wop.operation_seq_num >= wmti.to_operation_seq_num
5330: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5331: WIP_CONSTANTS.RUN),1,1,0)
5332: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
5333: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
5334: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
5335: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

Line 5334: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN

5330: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5331: WIP_CONSTANTS.RUN),1,1,0)
5332: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
5333: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
5334: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
5335: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
5336: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5337: OR wop.operation_seq_num = wmti.to_operation_seq_num
5338: OR (wop.operation_seq_num = wmti.fm_operation_seq_num

Line 5335: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

5331: WIP_CONSTANTS.RUN),1,1,0)
5332: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
5333: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
5334: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
5335: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
5336: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5337: OR wop.operation_seq_num = wmti.to_operation_seq_num
5338: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
5339: AND wmti.fm_intraoperation_step_type >

Line 5336: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL

5332: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
5333: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
5334: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
5335: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
5336: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5337: OR wop.operation_seq_num = wmti.to_operation_seq_num
5338: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
5339: AND wmti.fm_intraoperation_step_type >
5340: WIP_CONSTANTS.RUN))))

Line 5340: WIP_CONSTANTS.RUN))))

5336: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5337: OR wop.operation_seq_num = wmti.to_operation_seq_num
5338: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
5339: AND wmti.fm_intraoperation_step_type >
5340: WIP_CONSTANTS.RUN))))
5341: GROUP BY wmti.organization_id,
5342: wmti.wip_entity_id,
5343: wop.operation_seq_num,
5344: wor.phantom_item_id, --Bug 5213164:Added to take care of multiple phantoms

Line 5358: WIP_CONSTANTS.RUN),

5354: NVL(MAX(wmti.primary_quantity *
5355: DECODE(SIGN(wmti.to_operation_seq_num -
5356: wmti.fm_operation_seq_num),
5357: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5358: WIP_CONSTANTS.RUN),
5359: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5360: WIP_CONSTANTS.RUN),1,1,-1),
5361: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5362: WIP_CONSTANTS.RUN),1,1,-1),

Line 5360: WIP_CONSTANTS.RUN),1,1,-1),

5356: wmti.fm_operation_seq_num),
5357: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5358: WIP_CONSTANTS.RUN),
5359: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5360: WIP_CONSTANTS.RUN),1,1,-1),
5361: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5362: WIP_CONSTANTS.RUN),1,1,-1),
5363: 1,-1),
5364: 1, 1,

Line 5362: WIP_CONSTANTS.RUN),1,1,-1),

5358: WIP_CONSTANTS.RUN),
5359: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5360: WIP_CONSTANTS.RUN),1,1,-1),
5361: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5362: WIP_CONSTANTS.RUN),1,1,-1),
5363: 1,-1),
5364: 1, 1,
5365: -1,-1)
5366: ),0)), -- NVL

Line 5372: IF (l_logLevel <= wip_constants.full_logging) THEN

5368: 1, DECODE(sign(MAX(wop.quantity_completed)),1,0,1),
5369: -1, DECODE(sign(MAX(wop.quantity_completed)),1,-1,0));
5370:
5371: -- IF debug message level = 2, write statement below to log file
5372: IF (l_logLevel <= wip_constants.full_logging) THEN
5373: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
5374: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
5375: fnd_message.set_token('ENTITY2', 'WIP_COST_TXN_INTERFACE');
5376: l_msg := fnd_message.get;

Line 5384: IF(l_move.scheTxn = WIP_CONSTANTS.YES) THEN

5380:
5381: END IF; -- Per order basis type for discrete jobs
5382:
5383: -- Per order basis type for repetitive
5384: IF(l_move.scheTxn = WIP_CONSTANTS.YES) THEN
5385:
5386: INSERT INTO wip_cost_txn_interface
5387: (transaction_id,
5388: last_update_date,

Line 5457: WIP_CONSTANTS.RES_PROC, -- process_phase

5453: p_gib.group_id,
5454: MAX(wmti.source_code), -- source_code
5455: -- Fixed bug 2465148
5456: MAX(wmti.source_line_id), -- source_line_id
5457: WIP_CONSTANTS.RES_PROC, -- process_phase
5458: WIP_CONSTANTS.PENDING, -- process_status
5459: WIP_CONSTANTS.OVHD_TXN, -- transaction_type
5460: wmti.organization_id,
5461: MAX(wmti.organization_code),

Line 5458: WIP_CONSTANTS.PENDING, -- process_status

5454: MAX(wmti.source_code), -- source_code
5455: -- Fixed bug 2465148
5456: MAX(wmti.source_line_id), -- source_line_id
5457: WIP_CONSTANTS.RES_PROC, -- process_phase
5458: WIP_CONSTANTS.PENDING, -- process_status
5459: WIP_CONSTANTS.OVHD_TXN, -- transaction_type
5460: wmti.organization_id,
5461: MAX(wmti.organization_code),
5462: wmti.wip_entity_id,

Line 5459: WIP_CONSTANTS.OVHD_TXN, -- transaction_type

5455: -- Fixed bug 2465148
5456: MAX(wmti.source_line_id), -- source_line_id
5457: WIP_CONSTANTS.RES_PROC, -- process_phase
5458: WIP_CONSTANTS.PENDING, -- process_status
5459: WIP_CONSTANTS.OVHD_TXN, -- transaction_type
5460: wmti.organization_id,
5461: MAX(wmti.organization_code),
5462: wmti.wip_entity_id,
5463: MAX(entity_type),

Line 5478: WIP_CONSTANTS.PER_LOT, -- basis_type

5474: NULL, -- resource_id
5475: NULL, -- resource_code
5476: MAX(wor.phantom_flag),
5477: NULL, -- usage_rate_or_amount
5478: WIP_CONSTANTS.PER_LOT, -- basis_type
5479: WIP_CONSTANTS.WIP_MOVE, -- autocharge_type
5480: NULL, -- standard_rate_flag
5481: 1, -- transaction_quantity
5482: MAX(wmti.primary_uom), -- transaction_uom

Line 5479: WIP_CONSTANTS.WIP_MOVE, -- autocharge_type

5475: NULL, -- resource_code
5476: MAX(wor.phantom_flag),
5477: NULL, -- usage_rate_or_amount
5478: WIP_CONSTANTS.PER_LOT, -- basis_type
5479: WIP_CONSTANTS.WIP_MOVE, -- autocharge_type
5480: NULL, -- standard_rate_flag
5481: 1, -- transaction_quantity
5482: MAX(wmti.primary_uom), -- transaction_uom
5483: 1, -- primary_quantity

Line 5503: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

5499: wip_move_txn_interface wmti,
5500: wip_operation_resources wor
5501: WHERE wmti.group_id = p_gib.group_id
5502: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5503: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5504: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5505: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
5506: AND wop.organization_id = wmti.organization_id
5507: AND wop.wip_entity_id = wmti.wip_entity_id

Line 5504: AND wmti.process_status = WIP_CONSTANTS.RUNNING

5500: wip_operation_resources wor
5501: WHERE wmti.group_id = p_gib.group_id
5502: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5503: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5504: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5505: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
5506: AND wop.organization_id = wmti.organization_id
5507: AND wop.wip_entity_id = wmti.wip_entity_id
5508: AND wop.repetitive_schedule_id = wma.repetitive_schedule_id

Line 5505: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

5501: WHERE wmti.group_id = p_gib.group_id
5502: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5503: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5504: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5505: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
5506: AND wop.organization_id = wmti.organization_id
5507: AND wop.wip_entity_id = wmti.wip_entity_id
5508: AND wop.repetitive_schedule_id = wma.repetitive_schedule_id
5509: AND wmti.organization_id = wma.organization_id

Line 5520: WIP_CONSTANTS.RUN),1,1,0)

5516: AND wor.repetitive_schedule_id = wop.repetitive_schedule_id
5517: AND (
5518: (wop.operation_seq_num >= wmti.fm_operation_seq_num
5519: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5520: WIP_CONSTANTS.RUN),1,1,0)
5521: AND wop.operation_seq_num < wmti.to_operation_seq_num
5522: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5523: WIP_CONSTANTS.RUN),1,1,0)
5524: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num

Line 5523: WIP_CONSTANTS.RUN),1,1,0)

5519: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5520: WIP_CONSTANTS.RUN),1,1,0)
5521: AND wop.operation_seq_num < wmti.to_operation_seq_num
5522: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5523: WIP_CONSTANTS.RUN),1,1,0)
5524: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
5525: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
5526: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
5527: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

Line 5526: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN

5522: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5523: WIP_CONSTANTS.RUN),1,1,0)
5524: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
5525: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
5526: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
5527: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
5528: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5529: OR wop.operation_seq_num = wmti.fm_operation_seq_num
5530: OR (wop.operation_seq_num = wmti.to_operation_seq_num

Line 5527: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

5523: WIP_CONSTANTS.RUN),1,1,0)
5524: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
5525: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
5526: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
5527: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
5528: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5529: OR wop.operation_seq_num = wmti.fm_operation_seq_num
5530: OR (wop.operation_seq_num = wmti.to_operation_seq_num
5531: AND wmti.to_intraoperation_step_type >

Line 5528: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL

5524: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
5525: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
5526: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
5527: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
5528: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5529: OR wop.operation_seq_num = wmti.fm_operation_seq_num
5530: OR (wop.operation_seq_num = wmti.to_operation_seq_num
5531: AND wmti.to_intraoperation_step_type >
5532: WIP_CONSTANTS.RUN)))

Line 5532: WIP_CONSTANTS.RUN)))

5528: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5529: OR wop.operation_seq_num = wmti.fm_operation_seq_num
5530: OR (wop.operation_seq_num = wmti.to_operation_seq_num
5531: AND wmti.to_intraoperation_step_type >
5532: WIP_CONSTANTS.RUN)))
5533: OR
5534: (wop.operation_seq_num < wmti.fm_operation_seq_num
5535: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5536: WIP_CONSTANTS.RUN),1,1,0)

Line 5536: WIP_CONSTANTS.RUN),1,1,0)

5532: WIP_CONSTANTS.RUN)))
5533: OR
5534: (wop.operation_seq_num < wmti.fm_operation_seq_num
5535: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5536: WIP_CONSTANTS.RUN),1,1,0)
5537: AND wop.operation_seq_num >= wmti.to_operation_seq_num
5538: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5539: WIP_CONSTANTS.RUN),1,1,0)
5540: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num

Line 5539: WIP_CONSTANTS.RUN),1,1,0)

5535: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
5536: WIP_CONSTANTS.RUN),1,1,0)
5537: AND wop.operation_seq_num >= wmti.to_operation_seq_num
5538: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5539: WIP_CONSTANTS.RUN),1,1,0)
5540: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
5541: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
5542: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
5543: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

Line 5542: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN

5538: + DECODE(SIGN(wmti.to_intraoperation_step_type -
5539: WIP_CONSTANTS.RUN),1,1,0)
5540: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
5541: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
5542: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
5543: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
5544: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5545: OR wop.operation_seq_num = wmti.to_operation_seq_num
5546: OR (wop.operation_seq_num = wmti.fm_operation_seq_num

Line 5543: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

5539: WIP_CONSTANTS.RUN),1,1,0)
5540: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
5541: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
5542: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
5543: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
5544: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5545: OR wop.operation_seq_num = wmti.to_operation_seq_num
5546: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
5547: AND wmti.fm_intraoperation_step_type >

Line 5544: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL

5540: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
5541: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
5542: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
5543: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
5544: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5545: OR wop.operation_seq_num = wmti.to_operation_seq_num
5546: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
5547: AND wmti.fm_intraoperation_step_type >
5548: WIP_CONSTANTS.RUN))))

Line 5548: WIP_CONSTANTS.RUN))))

5544: AND (wop.count_point_type < WIP_CONSTANTS.NO_MANUAL
5545: OR wop.operation_seq_num = wmti.to_operation_seq_num
5546: OR (wop.operation_seq_num = wmti.fm_operation_seq_num
5547: AND wmti.fm_intraoperation_step_type >
5548: WIP_CONSTANTS.RUN))))
5549: GROUP BY wmti.organization_id,
5550: wmti.wip_entity_id,
5551: wmti.line_id,
5552: wma.repetitive_schedule_id,

Line 5564: WIP_CONSTANTS.RUN),

5560: NVL(SUM(wma.primary_quantity *
5561: DECODE(SIGN(wmti.to_operation_seq_num -
5562: wmti.fm_operation_seq_num),
5563: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5564: WIP_CONSTANTS.RUN),
5565: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5566: WIP_CONSTANTS.RUN),1,1,-1),
5567: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5568: WIP_CONSTANTS.RUN),1,1,-1),

Line 5566: WIP_CONSTANTS.RUN),1,1,-1),

5562: wmti.fm_operation_seq_num),
5563: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5564: WIP_CONSTANTS.RUN),
5565: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5566: WIP_CONSTANTS.RUN),1,1,-1),
5567: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5568: WIP_CONSTANTS.RUN),1,1,-1),
5569: 1,-1),
5570: 1, 1,

Line 5568: WIP_CONSTANTS.RUN),1,1,-1),

5564: WIP_CONSTANTS.RUN),
5565: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5566: WIP_CONSTANTS.RUN),1,1,-1),
5567: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5568: WIP_CONSTANTS.RUN),1,1,-1),
5569: 1,-1),
5570: 1, 1,
5571: -1,-1)
5572: ),0)),

Line 5578: IF (l_logLevel <= wip_constants.full_logging) THEN

5574: 1, DECODE(sign(MAX(wop.quantity_completed)),1,0,1),
5575: -1, DECODE(sign(MAX(wop.quantity_completed)),1,-1,0));
5576:
5577: -- IF debug message level = 2, write statement below to log file
5578: IF (l_logLevel <= wip_constants.full_logging) THEN
5579: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
5580: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
5581: fnd_message.set_token('ENTITY2', 'WIP_COST_TXN_INTERFACE');
5582: l_msg := fnd_message.get;

Line 5597: AND transaction_type = WIP_CONSTANTS.OVHD_TXN;

5593: UPDATE wip_cost_txn_interface
5594: SET transaction_id = wip_transactions_s.nextval
5595: WHERE group_id = p_gib.group_id
5596: AND TRUNC(transaction_date) = TRUNC(p_gib.txn_date)
5597: AND transaction_type = WIP_CONSTANTS.OVHD_TXN;
5598:
5599: -- IF debug message level = 2, write statement below to log file
5600: IF (l_logLevel <= wip_constants.full_logging) THEN
5601: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');

Line 5600: IF (l_logLevel <= wip_constants.full_logging) THEN

5596: AND TRUNC(transaction_date) = TRUNC(p_gib.txn_date)
5597: AND transaction_type = WIP_CONSTANTS.OVHD_TXN;
5598:
5599: -- IF debug message level = 2, write statement below to log file
5600: IF (l_logLevel <= wip_constants.full_logging) THEN
5601: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');
5602: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
5603: fnd_message.set_token('ENTITY2', 'WIP_COST_TXN_INTERFACE');
5604: l_msg := fnd_message.get;

Line 5610: IF(l_move.scheTxn = WIP_CONSTANTS.YES) THEN

5606: x_returnStatus => l_returnStatus);
5607: END IF;
5608:
5609: -- For repetitive
5610: IF(l_move.scheTxn = WIP_CONSTANTS.YES) THEN
5611:
5612: /*------------------------------------------------------------+
5613: | Insert into cost allocations for repetitive schedules |
5614: | per lot

Line 5662: WIP_CONSTANTS.RUN),

5658: NVL(SUM(wma.primary_quantity *
5659: DECODE(SIGN(wmti.to_operation_seq_num -
5660: wmti.fm_operation_seq_num),
5661: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5662: WIP_CONSTANTS.RUN),
5663: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5664: WIP_CONSTANTS.RUN),1,1,-1),
5665: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5666: WIP_CONSTANTS.RUN),1,1,-1),

Line 5664: WIP_CONSTANTS.RUN),1,1,-1),

5660: wmti.fm_operation_seq_num),
5661: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5662: WIP_CONSTANTS.RUN),
5663: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5664: WIP_CONSTANTS.RUN),1,1,-1),
5665: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5666: WIP_CONSTANTS.RUN),1,1,-1),
5667: 1,-1),
5668: 1, 1,

Line 5666: WIP_CONSTANTS.RUN),1,1,-1),

5662: WIP_CONSTANTS.RUN),
5663: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5664: WIP_CONSTANTS.RUN),1,1,-1),
5665: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5666: WIP_CONSTANTS.RUN),1,1,-1),
5667: 1,-1),
5668: 1, 1,
5669: -1,-1)
5670: ),0)), -- transaction_quantity

Line 5679: WIP_CONSTANTS.RUN),

5675: NVL(SUM(wma.primary_quantity *
5676: DECODE(SIGN(wmti.to_operation_seq_num -
5677: wmti.fm_operation_seq_num),
5678: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5679: WIP_CONSTANTS.RUN),
5680: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5681: WIP_CONSTANTS.RUN),1,1,-1),
5682: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5683: WIP_CONSTANTS.RUN),1,1,-1),

Line 5681: WIP_CONSTANTS.RUN),1,1,-1),

5677: wmti.fm_operation_seq_num),
5678: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
5679: WIP_CONSTANTS.RUN),
5680: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5681: WIP_CONSTANTS.RUN),1,1,-1),
5682: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5683: WIP_CONSTANTS.RUN),1,1,-1),
5684: 1,-1),
5685: 1, 1,

Line 5683: WIP_CONSTANTS.RUN),1,1,-1),

5679: WIP_CONSTANTS.RUN),
5680: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
5681: WIP_CONSTANTS.RUN),1,1,-1),
5682: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
5683: WIP_CONSTANTS.RUN),1,1,-1),
5684: 1,-1),
5685: 1, 1,
5686: -1,-1)
5687: ),0)), -- primary_quantity

Line 5697: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

5693: wip_cost_txn_interface wci,
5694: wip_move_txn_interface wmti
5695: WHERE wmti.group_id = p_gib.group_id
5696: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5697: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5698: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5699: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
5700: AND wmti.group_id = wci.group_id
5701: AND wci.organization_id = wmti.organization_id

Line 5698: AND wmti.process_status = WIP_CONSTANTS.RUNNING

5694: wip_move_txn_interface wmti
5695: WHERE wmti.group_id = p_gib.group_id
5696: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5697: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5698: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5699: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
5700: AND wmti.group_id = wci.group_id
5701: AND wci.organization_id = wmti.organization_id
5702: AND wci.wip_entity_id = wmti.wip_entity_id

Line 5699: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

5695: WHERE wmti.group_id = p_gib.group_id
5696: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
5697: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5698: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5699: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
5700: AND wmti.group_id = wci.group_id
5701: AND wci.organization_id = wmti.organization_id
5702: AND wci.wip_entity_id = wmti.wip_entity_id
5703: AND wci.operation_seq_num = wop.operation_seq_num

Line 5704: AND wci.basis_type = WIP_CONSTANTS.PER_LOT

5700: AND wmti.group_id = wci.group_id
5701: AND wci.organization_id = wmti.organization_id
5702: AND wci.wip_entity_id = wmti.wip_entity_id
5703: AND wci.operation_seq_num = wop.operation_seq_num
5704: AND wci.basis_type = WIP_CONSTANTS.PER_LOT
5705: AND wci.transaction_type = WIP_CONSTANTS.OVHD_TXN
5706: AND wop.organization_id = wmti.organization_id
5707: AND wop.wip_entity_id = wmti.wip_entity_id
5708: AND wop.repetitive_schedule_id = wma.repetitive_schedule_id

Line 5705: AND wci.transaction_type = WIP_CONSTANTS.OVHD_TXN

5701: AND wci.organization_id = wmti.organization_id
5702: AND wci.wip_entity_id = wmti.wip_entity_id
5703: AND wci.operation_seq_num = wop.operation_seq_num
5704: AND wci.basis_type = WIP_CONSTANTS.PER_LOT
5705: AND wci.transaction_type = WIP_CONSTANTS.OVHD_TXN
5706: AND wop.organization_id = wmti.organization_id
5707: AND wop.wip_entity_id = wmti.wip_entity_id
5708: AND wop.repetitive_schedule_id = wma.repetitive_schedule_id
5709: AND wmti.organization_id = wma.organization_id

Line 5716: IF (l_logLevel <= wip_constants.full_logging) THEN

5712: GROUP BY wci.transaction_id,
5713: wma.repetitive_schedule_id;
5714:
5715: -- IF debug message level = 2, write statement below to log file
5716: IF (l_logLevel <= wip_constants.full_logging) THEN
5717: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
5718: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
5719: fnd_message.set_token('ENTITY2', 'WIP_TXN_ALLOCATIONS');
5720: l_msg := fnd_message.get;

Line 5730: IF (l_logLevel <= wip_constants.trace_logging) THEN

5726:
5727: x_returnStatus := fnd_api.g_ret_sts_success;
5728:
5729: -- write to the log file
5730: IF (l_logLevel <= wip_constants.trace_logging) THEN
5731: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_dept_overhead',
5732: p_procReturnStatus => x_returnStatus,
5733: p_msg => 'procedure complete',
5734: x_returnStatus => l_returnStatus);

Line 5742: IF (l_logLevel <= wip_constants.trace_logging) THEN

5738: WHEN others THEN
5739: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
5740: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
5741:
5742: IF (l_logLevel <= wip_constants.trace_logging) THEN
5743: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.insert_dept_overhead',
5744: p_procReturnStatus => x_returnStatus,
5745: p_msg => l_errMsg,
5746: x_returnStatus => l_returnStatus);

Line 5769: IF (l_logLevel <= wip_constants.trace_logging) THEN

5765: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
5766:
5767: BEGIN
5768: -- write parameter value to log file
5769: IF (l_logLevel <= wip_constants.trace_logging) THEN
5770: l_params(1).paramName := 'p_group_id';
5771: l_params(1).paramValue := p_gib.group_id;
5772: l_params(2).paramName := 'p_txn_date';
5773: l_params(2).paramValue := p_gib.txn_date;

Line 5785: IF (l_logLevel <= wip_constants.full_logging) THEN

5781: WHERE group_id = p_gib.group_id
5782: AND TRUNC(transaction_date) = TRUNC(p_gib.txn_date);
5783:
5784: -- IF debug message level = 2, write statement below to log file
5785: IF (l_logLevel <= wip_constants.full_logging) THEN
5786: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');
5787: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
5788: fnd_message.set_token('ENTITY2', 'WIP_COST_TXN_INTERFACE');
5789: l_msg := fnd_message.get;

Line 5797: IF (l_logLevel <= wip_constants.trace_logging) THEN

5793:
5794: x_returnStatus := fnd_api.g_ret_sts_success;
5795:
5796: -- write to the log file
5797: IF (l_logLevel <= wip_constants.trace_logging) THEN
5798: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.release_cost_txn',
5799: p_procReturnStatus => x_returnStatus,
5800: p_msg => 'procedure complete',
5801: x_returnStatus => l_returnStatus);

Line 5809: IF (l_logLevel <= wip_constants.trace_logging) THEN

5805: WHEN others THEN
5806: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
5807: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
5808:
5809: IF (l_logLevel <= wip_constants.trace_logging) THEN
5810: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.release_cost_txn',
5811: p_procReturnStatus => x_returnStatus,
5812: p_msg => l_errMsg,
5813: x_returnStatus => l_returnStatus);

Line 5842: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

5838: wip_operations wo,
5839: wip_operation_resources wor,
5840: wip_discrete_jobs wdj
5841: WHERE wmti.group_id = p_group_id
5842: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5843: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5844: AND wmti.overcompletion_transaction_qty IS NOT NULL
5845: AND wdj.wip_entity_id = wmti.wip_entity_id
5846: AND wdj.organization_id = wmti.organization_id

Line 5843: AND wmti.process_status = WIP_CONSTANTS.RUNNING

5839: wip_operation_resources wor,
5840: wip_discrete_jobs wdj
5841: WHERE wmti.group_id = p_group_id
5842: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5843: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5844: AND wmti.overcompletion_transaction_qty IS NOT NULL
5845: AND wdj.wip_entity_id = wmti.wip_entity_id
5846: AND wdj.organization_id = wmti.organization_id
5847: AND wdj.po_creation_time = WIP_CONSTANTS.AT_JOB_SCHEDULE_RELEASE

Line 5847: AND wdj.po_creation_time = WIP_CONSTANTS.AT_JOB_SCHEDULE_RELEASE

5843: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5844: AND wmti.overcompletion_transaction_qty IS NOT NULL
5845: AND wdj.wip_entity_id = wmti.wip_entity_id
5846: AND wdj.organization_id = wmti.organization_id
5847: AND wdj.po_creation_time = WIP_CONSTANTS.AT_JOB_SCHEDULE_RELEASE
5848: AND wo.wip_entity_id = wmti.wip_entity_id
5849: AND wo.organization_id = wmti.organization_id
5850: AND wo.operation_seq_num > wmti.fm_operation_seq_num
5851: AND wo.count_point_type <> WIP_CONSTANTS.NO_MANUAL

Line 5851: AND wo.count_point_type <> WIP_CONSTANTS.NO_MANUAL

5847: AND wdj.po_creation_time = WIP_CONSTANTS.AT_JOB_SCHEDULE_RELEASE
5848: AND wo.wip_entity_id = wmti.wip_entity_id
5849: AND wo.organization_id = wmti.organization_id
5850: AND wo.operation_seq_num > wmti.fm_operation_seq_num
5851: AND wo.count_point_type <> WIP_CONSTANTS.NO_MANUAL
5852: AND wor.wip_entity_id = wo.wip_entity_id
5853: AND wor.organization_id = wo.organization_id
5854: AND wor.operation_seq_num = wo.operation_seq_num
5855: AND wor.autocharge_type in (WIP_CONSTANTS.PO_RECEIPT,

Line 5855: AND wor.autocharge_type in (WIP_CONSTANTS.PO_RECEIPT,

5851: AND wo.count_point_type <> WIP_CONSTANTS.NO_MANUAL
5852: AND wor.wip_entity_id = wo.wip_entity_id
5853: AND wor.organization_id = wo.organization_id
5854: AND wor.operation_seq_num = wo.operation_seq_num
5855: AND wor.autocharge_type in (WIP_CONSTANTS.PO_RECEIPT,
5856: WIP_CONSTANTS.PO_MOVE)
5857: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
5858:
5859: UNION

Line 5856: WIP_CONSTANTS.PO_MOVE)

5852: AND wor.wip_entity_id = wo.wip_entity_id
5853: AND wor.organization_id = wo.organization_id
5854: AND wor.operation_seq_num = wo.operation_seq_num
5855: AND wor.autocharge_type in (WIP_CONSTANTS.PO_RECEIPT,
5856: WIP_CONSTANTS.PO_MOVE)
5857: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
5858:
5859: UNION
5860:

Line 5857: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM

5853: AND wor.organization_id = wo.organization_id
5854: AND wor.operation_seq_num = wo.operation_seq_num
5855: AND wor.autocharge_type in (WIP_CONSTANTS.PO_RECEIPT,
5856: WIP_CONSTANTS.PO_MOVE)
5857: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
5858:
5859: UNION
5860:
5861: SELECT distinct wmti.wip_entity_id wip_id,

Line 5871: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

5867: wip_operations wo,
5868: wip_operation_resources wor,
5869: wip_repetitive_schedules wrs
5870: WHERE wmti.group_id = p_group_id
5871: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5872: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5873: AND wmti.overcompletion_transaction_qty IS NOT NULL
5874: AND wrs.wip_entity_id = wmti.wip_entity_id
5875: AND wrs.repetitive_schedule_id = wmti.repetitive_schedule_id

Line 5872: AND wmti.process_status = WIP_CONSTANTS.RUNNING

5868: wip_operation_resources wor,
5869: wip_repetitive_schedules wrs
5870: WHERE wmti.group_id = p_group_id
5871: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
5872: AND wmti.process_status = WIP_CONSTANTS.RUNNING
5873: AND wmti.overcompletion_transaction_qty IS NOT NULL
5874: AND wrs.wip_entity_id = wmti.wip_entity_id
5875: AND wrs.repetitive_schedule_id = wmti.repetitive_schedule_id
5876: AND wrs.organization_id = wmti.organization_id

Line 5877: AND wrs.po_creation_time = WIP_CONSTANTS.AT_JOB_SCHEDULE_RELEASE

5873: AND wmti.overcompletion_transaction_qty IS NOT NULL
5874: AND wrs.wip_entity_id = wmti.wip_entity_id
5875: AND wrs.repetitive_schedule_id = wmti.repetitive_schedule_id
5876: AND wrs.organization_id = wmti.organization_id
5877: AND wrs.po_creation_time = WIP_CONSTANTS.AT_JOB_SCHEDULE_RELEASE
5878: AND wo.wip_entity_id = wmti.wip_entity_id
5879: AND wo.repetitive_schedule_id = wmti.repetitive_schedule_id
5880: AND wo.organization_id = wmti.organization_id
5881: AND wo.operation_seq_num > wmti.fm_operation_seq_num

Line 5882: AND wo.count_point_type <> WIP_CONSTANTS.NO_MANUAL

5878: AND wo.wip_entity_id = wmti.wip_entity_id
5879: AND wo.repetitive_schedule_id = wmti.repetitive_schedule_id
5880: AND wo.organization_id = wmti.organization_id
5881: AND wo.operation_seq_num > wmti.fm_operation_seq_num
5882: AND wo.count_point_type <> WIP_CONSTANTS.NO_MANUAL
5883: AND wor.wip_entity_id = wo.wip_entity_id
5884: AND wor.organization_id = wo.organization_id
5885: AND wor.repetitive_schedule_id = wmti.repetitive_schedule_id
5886: AND wor.operation_seq_num = wo.operation_seq_num

Line 5887: AND wor.autocharge_type in (WIP_CONSTANTS.PO_RECEIPT,

5883: AND wor.wip_entity_id = wo.wip_entity_id
5884: AND wor.organization_id = wo.organization_id
5885: AND wor.repetitive_schedule_id = wmti.repetitive_schedule_id
5886: AND wor.operation_seq_num = wo.operation_seq_num
5887: AND wor.autocharge_type in (WIP_CONSTANTS.PO_RECEIPT,
5888: WIP_CONSTANTS.PO_MOVE)
5889: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM ;
5890:
5891:

Line 5888: WIP_CONSTANTS.PO_MOVE)

5884: AND wor.organization_id = wo.organization_id
5885: AND wor.repetitive_schedule_id = wmti.repetitive_schedule_id
5886: AND wor.operation_seq_num = wo.operation_seq_num
5887: AND wor.autocharge_type in (WIP_CONSTANTS.PO_RECEIPT,
5888: WIP_CONSTANTS.PO_MOVE)
5889: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM ;
5890:
5891:
5892: l_params wip_logger.param_tbl_t;

Line 5889: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM ;

5885: AND wor.repetitive_schedule_id = wmti.repetitive_schedule_id
5886: AND wor.operation_seq_num = wo.operation_seq_num
5887: AND wor.autocharge_type in (WIP_CONSTANTS.PO_RECEIPT,
5888: WIP_CONSTANTS.PO_MOVE)
5889: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM ;
5890:
5891:
5892: l_params wip_logger.param_tbl_t;
5893: l_returnStatus VARCHAR(1);

Line 5904: IF (l_logLevel <= wip_constants.trace_logging) THEN

5900: BEGIN
5901: l_move := p_gib.move_profile;
5902:
5903: -- write parameter value to log file
5904: IF (l_logLevel <= wip_constants.trace_logging) THEN
5905: l_params(1).paramName := 'p_group_id';
5906: l_params(1).paramValue := p_gib.group_id;
5907: l_params(2).paramName := 'p_txn_date';
5908: l_params(2).paramValue := p_gib.txn_date;

Line 5948: IF(l_move.jobTxn = WIP_CONSTANTS.YES AND

5944:
5945: /*------------------------------------------------------------+
5946: | Insert into PO_REQUISITIONS_INTERFACE_ALL table for per item for jobs
5947: +------------------------------------------------------------*/
5948: IF(l_move.jobTxn = WIP_CONSTANTS.YES AND
5949: l_move.poReqItem = WIP_CONSTANTS.YES) THEN
5950:
5951: -- Fixed bug 5144659. Insert into po_requisitions_interface_all instead of
5952: -- po_requisitions_interface as part of MOAC change.

Line 5949: l_move.poReqItem = WIP_CONSTANTS.YES) THEN

5945: /*------------------------------------------------------------+
5946: | Insert into PO_REQUISITIONS_INTERFACE_ALL table for per item for jobs
5947: +------------------------------------------------------------*/
5948: IF(l_move.jobTxn = WIP_CONSTANTS.YES AND
5949: l_move.poReqItem = WIP_CONSTANTS.YES) THEN
5950:
5951: -- Fixed bug 5144659. Insert into po_requisitions_interface_all instead of
5952: -- po_requisitions_interface as part of MOAC change.
5953: INSERT INTO po_requisitions_interface_all

Line 6024: WIP_CONSTANTS.INV_MAX_PRECISION),

6020: ))), /* Fixed Bug# 1623063 */
6021: msi.primary_uom_code, -- uom_code
6022: DECODE(msi.outside_operation_uom_type, -- quantity
6023: 'RESOURCE',ROUND(wor.usage_rate_or_amount*wmti.primary_quantity,
6024: WIP_CONSTANTS.INV_MAX_PRECISION),
6025: 'ASSEMBLY',wmti.primary_quantity),
6026: 3, -- line_type_id
6027: wdj.outside_processing_account, -- charge_account_id
6028: bd.location_id, -- deliver_to_location_id

Line 6038: WIP_CONSTANTS.LOTBASED, bcd1.calendar_date, */

6034: wor.resource_id,
6035: wor.repetitive_schedule_id,
6036: /* Bug 4398047 commented following portion of the sql
6037: DECODE(wmti.entity_type, -- Fix for 2374334
6038: WIP_CONSTANTS.LOTBASED, bcd1.calendar_date, */
6039: /*Bug 14687249: when post processing leadtime is 0, use operation date directly to populate need_by_date, so it will not flip to the next working date.*/
6040: Decode(NVL(msi.postprocessing_lead_time,0),
6041: 0, DECODE(wo1.next_operation_seq_num,
6042: NULL, wo1.last_unit_completion_date,

Line 6076: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

6072: wip_operations wo2,
6073: wip_parameters wp /*ER 4276433*/
6074: WHERE wmti.group_id = p_gib.group_id
6075: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
6076: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6077: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6078: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
6079: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
6080: AND (wmti.overcompletion_transaction_id IS NULL

Line 6077: AND wmti.process_status = WIP_CONSTANTS.RUNNING

6073: wip_parameters wp /*ER 4276433*/
6074: WHERE wmti.group_id = p_gib.group_id
6075: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
6076: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6077: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6078: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
6079: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
6080: AND (wmti.overcompletion_transaction_id IS NULL
6081: OR ( wmti.overcompletion_transaction_id IS NOT NULL

Line 6078: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE

6074: WHERE wmti.group_id = p_gib.group_id
6075: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
6076: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6077: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6078: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
6079: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
6080: AND (wmti.overcompletion_transaction_id IS NULL
6081: OR ( wmti.overcompletion_transaction_id IS NOT NULL
6082: AND wmti.overcompletion_transaction_qty IS NOT NULL))

Line 6079: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */

6075: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
6076: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6077: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6078: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
6079: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED) /* WSM */
6080: AND (wmti.overcompletion_transaction_id IS NULL
6081: OR ( wmti.overcompletion_transaction_id IS NOT NULL
6082: AND wmti.overcompletion_transaction_qty IS NOT NULL))
6083: --Bugfix 6679124: Join to wor using wdj rather than wmti to get better execution plan.

Line 6090: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE

6086: AND wdj.organization_id = wor.organization_id --6679124
6087: AND wdj.wip_entity_id = wor.wip_entity_id -- 6679124
6088: AND wmti.to_operation_seq_num = wor.operation_seq_num
6089: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
6090: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
6091: AND wo1.organization_id = wmti.organization_id
6092: AND wo1.wip_entity_id = wmti.wip_entity_id
6093: AND wo1.operation_seq_num = wmti.to_operation_seq_num
6094: AND wo2.organization_id = wo1.organization_id

Line 6097: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT

6093: AND wo1.operation_seq_num = wmti.to_operation_seq_num
6094: AND wo2.organization_id = wo1.organization_id
6095: AND wo2.wip_entity_id = wo1.wip_entity_id
6096: -- Fixed bug 2259661
6097: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6098: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6099: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6100: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6101: WIP_CONSTANTS.PO_MOVE))

Line 6099: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE

6095: AND wo2.wip_entity_id = wo1.wip_entity_id
6096: -- Fixed bug 2259661
6097: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6098: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6099: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6100: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6101: WIP_CONSTANTS.PO_MOVE))
6102: AND ((wo1.next_operation_seq_num IS NOT NULL
6103: AND wo1.next_operation_seq_num = wo2.operation_seq_num)

Line 6100: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,

6096: -- Fixed bug 2259661
6097: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6098: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6099: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6100: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6101: WIP_CONSTANTS.PO_MOVE))
6102: AND ((wo1.next_operation_seq_num IS NOT NULL
6103: AND wo1.next_operation_seq_num = wo2.operation_seq_num)
6104: OR (wo1.next_operation_seq_num IS NULL

Line 6101: WIP_CONSTANTS.PO_MOVE))

6097: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6098: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6099: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6100: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6101: WIP_CONSTANTS.PO_MOVE))
6102: AND ((wo1.next_operation_seq_num IS NOT NULL
6103: AND wo1.next_operation_seq_num = wo2.operation_seq_num)
6104: OR (wo1.next_operation_seq_num IS NULL
6105: AND wo2.operation_seq_num = wmti.to_operation_seq_num)))

Line 6108: AND (wdj.po_creation_time = WIP_CONSTANTS.AT_OPERATION

6104: OR (wo1.next_operation_seq_num IS NULL
6105: AND wo2.operation_seq_num = wmti.to_operation_seq_num)))
6106: AND wdj.organization_id = wmti.organization_id
6107: AND wdj.wip_entity_id = wmti.wip_entity_id
6108: AND (wdj.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6109: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
6110: AND wdj.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
6111: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
6112: AND wor.organization_id = br.organization_id

Line 6109: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL

6105: AND wo2.operation_seq_num = wmti.to_operation_seq_num)))
6106: AND wdj.organization_id = wmti.organization_id
6107: AND wdj.wip_entity_id = wmti.wip_entity_id
6108: AND (wdj.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6109: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
6110: AND wdj.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
6111: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
6112: AND wor.organization_id = br.organization_id
6113: AND wor.resource_id = br.resource_id

Line 6110: AND wdj.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))

6106: AND wdj.organization_id = wmti.organization_id
6107: AND wdj.wip_entity_id = wmti.wip_entity_id
6108: AND (wdj.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6109: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
6110: AND wdj.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
6111: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
6112: AND wor.organization_id = br.organization_id
6113: AND wor.resource_id = br.resource_id
6114: AND br.organization_id = msi.organization_id

Line 6111: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM

6107: AND wdj.wip_entity_id = wmti.wip_entity_id
6108: AND (wdj.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6109: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
6110: AND wdj.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
6111: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
6112: AND wor.organization_id = br.organization_id
6113: AND wor.resource_id = br.resource_id
6114: AND br.organization_id = msi.organization_id
6115: AND br.purchase_item_id = msi.inventory_item_id

Line 6120: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND

6116: AND wmti.created_by = fu.user_id
6117: AND wmti.organization_id = bd.organization_id
6118: /* Fix for bug 3609023: Corrected condition to ensure we insert
6119: correct deliver_to_location_id for PO_RECEIPT */
6120: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND
6121: wo1.department_id = bd.department_id)
6122: OR
6123: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND
6124: wo2.department_id = bd.department_id))

Line 6123: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND

6119: correct deliver_to_location_id for PO_RECEIPT */
6120: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND
6121: wo1.department_id = bd.department_id)
6122: OR
6123: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND
6124: wo2.department_id = bd.department_id))
6125: AND mp.organization_id = wmti.organization_id
6126: AND hoi.organization_id = wmti.organization_id
6127: AND hoi.org_information_context = 'Accounting Information'

Line 6159: IF (l_logLevel <= wip_constants.full_logging) THEN

6155: AND bcd3.seq_num = (bcd4.next_seq_num -
6156: CEIL(NVL(msi.postprocessing_lead_time,0)))
6157: AND wp.organization_id = wmti.organization_id; /*ER 4276433*/
6158: -- IF debug message level = 2, write statement below to log file
6159: IF (l_logLevel <= wip_constants.full_logging) THEN
6160: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
6161: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
6162: fnd_message.set_token('ENTITY2', 'PO_REQUISITIONS_INTERFACE_ALL');
6163: l_msg := fnd_message.get;

Line 6173: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND

6169:
6170: /*------------------------------------------------------------+
6171: |Insert into po_req interface table for per item for schedule
6172: +------------------------------------------------------------*/
6173: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND
6174: l_move.poReqItem = WIP_CONSTANTS.YES) THEN
6175: -- Fixed bug 5144659. Insert into po_requisitions_interface_all instead of
6176: -- po_requisitions_interface as part of MOAC change.
6177: INSERT INTO po_requisitions_interface_all

Line 6174: l_move.poReqItem = WIP_CONSTANTS.YES) THEN

6170: /*------------------------------------------------------------+
6171: |Insert into po_req interface table for per item for schedule
6172: +------------------------------------------------------------*/
6173: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND
6174: l_move.poReqItem = WIP_CONSTANTS.YES) THEN
6175: -- Fixed bug 5144659. Insert into po_requisitions_interface_all instead of
6176: -- po_requisitions_interface as part of MOAC change.
6177: INSERT INTO po_requisitions_interface_all
6178: (last_update_date,

Line 6244: WIP_CONSTANTS.INV_MAX_PRECISION),

6240: ))), /* Fixed Bug# 1623063 */
6241: msi.primary_uom_code, -- uom_code
6242: DECODE(msi.outside_operation_uom_type, -- quantity
6243: 'RESOURCE',ROUND(wor.usage_rate_or_amount *wma.primary_quantity,
6244: WIP_CONSTANTS.INV_MAX_PRECISION),
6245: 'ASSEMBLY',wma.primary_quantity),
6246: 3, -- line_type_id
6247: wrs.outside_processing_account,-- charge_account_id
6248: bd.location_id, -- deliver_to_location_id

Line 6290: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

6286: wip_move_txn_interface wmti,
6287: wip_parameters wp /*ER 4276433*/
6288: WHERE wmti.group_id = p_gib.group_id
6289: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
6290: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6291: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6292: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
6293: AND (wmti.overcompletion_transaction_id IS NULL
6294: OR ( wmti.overcompletion_transaction_id IS NOT NULL

Line 6291: AND wmti.process_status = WIP_CONSTANTS.RUNNING

6287: wip_parameters wp /*ER 4276433*/
6288: WHERE wmti.group_id = p_gib.group_id
6289: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
6290: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6291: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6292: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
6293: AND (wmti.overcompletion_transaction_id IS NULL
6294: OR ( wmti.overcompletion_transaction_id IS NOT NULL
6295: AND wmti.overcompletion_transaction_qty IS NOT NULL))

Line 6292: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

6288: WHERE wmti.group_id = p_gib.group_id
6289: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
6290: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6291: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6292: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
6293: AND (wmti.overcompletion_transaction_id IS NULL
6294: OR ( wmti.overcompletion_transaction_id IS NOT NULL
6295: AND wmti.overcompletion_transaction_qty IS NOT NULL))
6296: AND wmti.organization_id = wor.organization_id

Line 6303: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE

6299: AND wor.repetitive_schedule_id = wma.repetitive_schedule_id
6300: AND wmti.organization_id = wma.organization_id
6301: AND wmti.transaction_id = wma.transaction_id
6302: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
6303: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
6304: AND wrs.organization_id = wor.organization_id
6305: AND wrs.repetitive_schedule_id = wor.repetitive_schedule_id
6306: AND (wrs.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6307: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL

Line 6306: AND (wrs.po_creation_time = WIP_CONSTANTS.AT_OPERATION

6302: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
6303: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
6304: AND wrs.organization_id = wor.organization_id
6305: AND wrs.repetitive_schedule_id = wor.repetitive_schedule_id
6306: AND (wrs.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6307: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
6308: AND wrs.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
6309: AND wo1.organization_id = wmti.organization_id
6310: AND wo1.wip_entity_id = wmti.wip_entity_id

Line 6307: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL

6303: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
6304: AND wrs.organization_id = wor.organization_id
6305: AND wrs.repetitive_schedule_id = wor.repetitive_schedule_id
6306: AND (wrs.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6307: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
6308: AND wrs.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
6309: AND wo1.organization_id = wmti.organization_id
6310: AND wo1.wip_entity_id = wmti.wip_entity_id
6311: AND wo1.operation_seq_num = wmti.to_operation_seq_num

Line 6308: AND wrs.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))

6304: AND wrs.organization_id = wor.organization_id
6305: AND wrs.repetitive_schedule_id = wor.repetitive_schedule_id
6306: AND (wrs.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6307: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
6308: AND wrs.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
6309: AND wo1.organization_id = wmti.organization_id
6310: AND wo1.wip_entity_id = wmti.wip_entity_id
6311: AND wo1.operation_seq_num = wmti.to_operation_seq_num
6312: AND wo1.repetitive_schedule_id = wor.repetitive_schedule_id

Line 6317: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT

6313: AND wo2.organization_id = wo1.organization_id
6314: AND wo2.wip_entity_id = wo1.wip_entity_id
6315: AND wo2.repetitive_schedule_id = wo1.repetitive_schedule_id
6316: -- Fixed bug 2259661
6317: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6318: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6319: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6320: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6321: WIP_CONSTANTS.PO_MOVE))

Line 6319: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE

6315: AND wo2.repetitive_schedule_id = wo1.repetitive_schedule_id
6316: -- Fixed bug 2259661
6317: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6318: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6319: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6320: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6321: WIP_CONSTANTS.PO_MOVE))
6322: AND ((wo1.next_operation_seq_num IS NOT NULL
6323: AND wo1.next_operation_seq_num = wo2.operation_seq_num)

Line 6320: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,

6316: -- Fixed bug 2259661
6317: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6318: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6319: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6320: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6321: WIP_CONSTANTS.PO_MOVE))
6322: AND ((wo1.next_operation_seq_num IS NOT NULL
6323: AND wo1.next_operation_seq_num = wo2.operation_seq_num)
6324: OR (wo1.next_operation_seq_num IS NULL

Line 6321: WIP_CONSTANTS.PO_MOVE))

6317: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6318: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6319: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6320: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6321: WIP_CONSTANTS.PO_MOVE))
6322: AND ((wo1.next_operation_seq_num IS NOT NULL
6323: AND wo1.next_operation_seq_num = wo2.operation_seq_num)
6324: OR (wo1.next_operation_seq_num IS NULL
6325: AND wo2.operation_seq_num = wmti.to_operation_seq_num)))

Line 6326: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM

6322: AND ((wo1.next_operation_seq_num IS NOT NULL
6323: AND wo1.next_operation_seq_num = wo2.operation_seq_num)
6324: OR (wo1.next_operation_seq_num IS NULL
6325: AND wo2.operation_seq_num = wmti.to_operation_seq_num)))
6326: AND wor.basis_type = WIP_CONSTANTS.PER_ITEM
6327: AND wor.organization_id = br.organization_id
6328: AND wor.resource_id = br.resource_id
6329: AND br.organization_id = msi.organization_id
6330: AND br.purchase_item_id = msi.inventory_item_id

Line 6335: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND

6331: AND wmti.created_by = fu.user_id
6332: AND wmti.organization_id = bd.organization_id
6333: /* Fix for bug 3609023: Corrected condition to ensure we insert
6334: correct deliver_to_location_id for PO_RECEIPT */
6335: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND
6336: wo1.department_id = bd.department_id)
6337: OR
6338: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND
6339: wo2.department_id = bd.department_id))

Line 6338: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND

6334: correct deliver_to_location_id for PO_RECEIPT */
6335: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND
6336: wo1.department_id = bd.department_id)
6337: OR
6338: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND
6339: wo2.department_id = bd.department_id))
6340: AND mp.organization_id = wmti.organization_id
6341: AND hoi.organization_id = wmti.organization_id
6342: AND hoi.org_information_context = 'Accounting Information'

Line 6359: IF (l_logLevel <= wip_constants.full_logging) THEN

6355: CEIL(NVL(msi.postprocessing_lead_time,0)))
6356: AND wp.organization_id = wmti.organization_id; /*ER 4276433*/
6357:
6358: -- IF debug message level = 2, write statement below to log file
6359: IF (l_logLevel <= wip_constants.full_logging) THEN
6360: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
6361: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
6362: fnd_message.set_token('ENTITY2', 'PO_REQUISITIONS_INTERFACE_ALL');
6363: l_msg := fnd_message.get;

Line 6373: IF(l_move.jobTxn = WIP_CONSTANTS.YES AND

6369:
6370: /*------------------------------------------------------------+
6371: | Insert into po_req interface table for per lot for job
6372: +------------------------------------------------------------*/
6373: IF(l_move.jobTxn = WIP_CONSTANTS.YES AND
6374: l_move.poReqLot = WIP_CONSTANTS.YES) THEN
6375: -- Fixed bug 5144659. Insert into po_requisitions_interface_all instead of
6376: -- po_requisitions_interface as part of MOAC change.
6377: INSERT INTO po_requisitions_interface_all

Line 6374: l_move.poReqLot = WIP_CONSTANTS.YES) THEN

6370: /*------------------------------------------------------------+
6371: | Insert into po_req interface table for per lot for job
6372: +------------------------------------------------------------*/
6373: IF(l_move.jobTxn = WIP_CONSTANTS.YES AND
6374: l_move.poReqLot = WIP_CONSTANTS.YES) THEN
6375: -- Fixed bug 5144659. Insert into po_requisitions_interface_all instead of
6376: -- po_requisitions_interface as part of MOAC change.
6377: INSERT INTO po_requisitions_interface_all
6378: (last_update_date,

Line 6448: WIP_CONSTANTS.INV_MAX_PRECISION)),

6444: )))), /* Fixed Bug# 1623063 */
6445: MAX(msi.primary_uom_code), -- uom_code
6446: DECODE(MAX(msi.outside_operation_uom_type), -- quantity
6447: 'RESOURCE',MAX(ROUND(wor.usage_rate_or_amount,
6448: WIP_CONSTANTS.INV_MAX_PRECISION)),
6449: 'ASSEMBLY', 1),
6450: 3, -- line_type_id
6451: MAX(wdj.outside_processing_account), -- charge_account_id
6452: MAX(bd.location_id), -- deliver_to_location_id

Line 6462: WIP_CONSTANTS.LOTBASED, MAX(bcd1.calendar_date),*/

6458: MAX(wor.resource_id),
6459: wor.repetitive_schedule_id,
6460: /* Bug 4398047 commenting out this portion of the sql
6461: DECODE(MAX(wmti.entity_type), -- Fix for 2374334
6462: WIP_CONSTANTS.LOTBASED, MAX(bcd1.calendar_date),*/
6463: /*Bug 14687249: when post processing leadtime is 0, use operation date directly to populate need_by_date, so it will not flip to the next working date.*/
6464: Decode(NVL(msi.postprocessing_lead_time,0),
6465: 0,DECODE(MAX(wo1.next_operation_seq_num),
6466: NULL, MAX(wo1.last_unit_completion_date),

Line 6500: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

6496: wip_operations wo2,
6497: wip_parameters wp /*ER 4276433*/
6498: WHERE wmti.group_id = p_gib.group_id
6499: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
6500: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6501: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6502: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
6503: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM */
6504: AND (wmti.overcompletion_transaction_id IS NULL

Line 6501: AND wmti.process_status = WIP_CONSTANTS.RUNNING

6497: wip_parameters wp /*ER 4276433*/
6498: WHERE wmti.group_id = p_gib.group_id
6499: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
6500: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6501: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6502: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
6503: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM */
6504: AND (wmti.overcompletion_transaction_id IS NULL
6505: OR ( wmti.overcompletion_transaction_id IS NOT NULL

Line 6502: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE

6498: WHERE wmti.group_id = p_gib.group_id
6499: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
6500: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6501: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6502: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
6503: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM */
6504: AND (wmti.overcompletion_transaction_id IS NULL
6505: OR ( wmti.overcompletion_transaction_id IS NOT NULL
6506: AND wmti.overcompletion_transaction_qty IS NOT NULL))

Line 6503: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM */

6499: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
6500: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6501: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6502: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
6503: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM */
6504: AND (wmti.overcompletion_transaction_id IS NULL
6505: OR ( wmti.overcompletion_transaction_id IS NOT NULL
6506: AND wmti.overcompletion_transaction_qty IS NOT NULL))
6507: -- Bugfix 6679124: Join to wor using wdj rather than wmti to get better execution plan

Line 6514: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE

6510: AND wdj.organization_id = wor.organization_id --6679124
6511: AND wdj.wip_entity_id = wor.wip_entity_id -- 6679124
6512: AND wmti.to_operation_seq_num = wor.operation_seq_num
6513: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
6514: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
6515: AND wo1.organization_id = wmti.organization_id
6516: AND wo1.wip_entity_id = wmti.wip_entity_id
6517: AND wo1.operation_seq_num = wmti.to_operation_seq_num
6518: AND wo2.organization_id = wo1.organization_id

Line 6521: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT

6517: AND wo1.operation_seq_num = wmti.to_operation_seq_num
6518: AND wo2.organization_id = wo1.organization_id
6519: AND wo2.wip_entity_id = wo1.wip_entity_id
6520: -- Fixed bug 2259661
6521: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6522: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6523: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6524: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6525: WIP_CONSTANTS.PO_MOVE))

Line 6523: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE

6519: AND wo2.wip_entity_id = wo1.wip_entity_id
6520: -- Fixed bug 2259661
6521: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6522: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6523: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6524: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6525: WIP_CONSTANTS.PO_MOVE))
6526: AND ((wo1.next_operation_seq_num IS NOT NULL
6527: AND wo1.next_operation_seq_num = wo2.operation_seq_num)

Line 6524: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,

6520: -- Fixed bug 2259661
6521: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6522: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6523: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6524: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6525: WIP_CONSTANTS.PO_MOVE))
6526: AND ((wo1.next_operation_seq_num IS NOT NULL
6527: AND wo1.next_operation_seq_num = wo2.operation_seq_num)
6528: OR (wo1.next_operation_seq_num IS NULL

Line 6525: WIP_CONSTANTS.PO_MOVE))

6521: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6522: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6523: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6524: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6525: WIP_CONSTANTS.PO_MOVE))
6526: AND ((wo1.next_operation_seq_num IS NOT NULL
6527: AND wo1.next_operation_seq_num = wo2.operation_seq_num)
6528: OR (wo1.next_operation_seq_num IS NULL
6529: AND wo2.operation_seq_num = wmti.to_operation_seq_num)))

Line 6532: AND (wdj.po_creation_time = WIP_CONSTANTS.AT_OPERATION

6528: OR (wo1.next_operation_seq_num IS NULL
6529: AND wo2.operation_seq_num = wmti.to_operation_seq_num)))
6530: AND wdj.organization_id = wmti.organization_id
6531: AND wdj.wip_entity_id = wmti.wip_entity_id
6532: AND (wdj.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6533: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
6534: AND wdj.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
6535: AND wor.basis_type = WIP_CONSTANTS.PER_LOT
6536: AND wor.organization_id = br.organization_id

Line 6533: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL

6529: AND wo2.operation_seq_num = wmti.to_operation_seq_num)))
6530: AND wdj.organization_id = wmti.organization_id
6531: AND wdj.wip_entity_id = wmti.wip_entity_id
6532: AND (wdj.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6533: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
6534: AND wdj.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
6535: AND wor.basis_type = WIP_CONSTANTS.PER_LOT
6536: AND wor.organization_id = br.organization_id
6537: AND wor.resource_id = br.resource_id

Line 6534: AND wdj.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))

6530: AND wdj.organization_id = wmti.organization_id
6531: AND wdj.wip_entity_id = wmti.wip_entity_id
6532: AND (wdj.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6533: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
6534: AND wdj.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
6535: AND wor.basis_type = WIP_CONSTANTS.PER_LOT
6536: AND wor.organization_id = br.organization_id
6537: AND wor.resource_id = br.resource_id
6538: AND br.organization_id = msi.organization_id

Line 6535: AND wor.basis_type = WIP_CONSTANTS.PER_LOT

6531: AND wdj.wip_entity_id = wmti.wip_entity_id
6532: AND (wdj.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6533: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
6534: AND wdj.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
6535: AND wor.basis_type = WIP_CONSTANTS.PER_LOT
6536: AND wor.organization_id = br.organization_id
6537: AND wor.resource_id = br.resource_id
6538: AND br.organization_id = msi.organization_id
6539: AND br.purchase_item_id = msi.inventory_item_id

Line 6544: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND

6540: AND wmti.created_by = fu.user_id
6541: AND wmti.organization_id = bd.organization_id
6542: /* Fix for bug 3609023: Corrected condition to ensure we insert
6543: correct deliver_to_location_id for PO_RECEIPT */
6544: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND
6545: wo1.department_id = bd.department_id)
6546: OR
6547: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND
6548: wo2.department_id = bd.department_id))

Line 6547: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND

6543: correct deliver_to_location_id for PO_RECEIPT */
6544: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND
6545: wo1.department_id = bd.department_id)
6546: OR
6547: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND
6548: wo2.department_id = bd.department_id))
6549: AND mp.organization_id = wmti.organization_id
6550: AND hoi.organization_id = wmti.organization_id
6551: AND hoi.org_information_context = 'Accounting Information'

Line 6601: IF (l_logLevel <= wip_constants.full_logging) THEN

6597: 1, 0),
6598: 1, 0);
6599:
6600: -- IF debug message level = 2, write statement below to log file
6601: IF (l_logLevel <= wip_constants.full_logging) THEN
6602: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
6603: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
6604: fnd_message.set_token('ENTITY2', 'PO_REQUISITIONS_INTERFACE_ALL');
6605: l_msg := fnd_message.get;

Line 6615: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND

6611:
6612: /*------------------------------------------------------------+
6613: | Insert into po_req interface table for per lot for schedule
6614: +------------------------------------------------------------*/
6615: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND
6616: l_move.poReqLot = WIP_CONSTANTS.YES) THEN
6617: -- Fixed bug 5144659. Insert into po_requisitions_interface_all instead of
6618: -- po_requisitions_interface as part of MOAC change.
6619: INSERT INTO po_requisitions_interface_all

Line 6616: l_move.poReqLot = WIP_CONSTANTS.YES) THEN

6612: /*------------------------------------------------------------+
6613: | Insert into po_req interface table for per lot for schedule
6614: +------------------------------------------------------------*/
6615: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND
6616: l_move.poReqLot = WIP_CONSTANTS.YES) THEN
6617: -- Fixed bug 5144659. Insert into po_requisitions_interface_all instead of
6618: -- po_requisitions_interface as part of MOAC change.
6619: INSERT INTO po_requisitions_interface_all
6620: (last_update_date,

Line 6686: WIP_CONSTANTS.INV_MAX_PRECISION)),

6682: )))), /* Fixed Bug# 1623063 */
6683: MAX(msi.primary_uom_code), -- uom_code
6684: DECODE(MAX(msi.outside_operation_uom_type), -- quantity
6685: 'RESOURCE',MAX(ROUND(wor.usage_rate_or_amount,
6686: WIP_CONSTANTS.INV_MAX_PRECISION)),
6687: 'ASSEMBLY', 1),
6688: 3, -- line_type_id
6689: MAX(wrs.outside_processing_account), -- charge_account_id
6690: MAX(bd.location_id), -- deliver_to_location_id

Line 6732: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

6728: wip_move_txn_interface wmti,
6729: wip_parameters wp /*ER 4276433*/
6730: WHERE wmti.group_id = p_gib.group_id
6731: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
6732: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6733: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6734: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
6735: AND (wmti.overcompletion_transaction_id IS NULL
6736: OR ( wmti.overcompletion_transaction_id IS NOT NULL

Line 6733: AND wmti.process_status = WIP_CONSTANTS.RUNNING

6729: wip_parameters wp /*ER 4276433*/
6730: WHERE wmti.group_id = p_gib.group_id
6731: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
6732: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6733: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6734: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
6735: AND (wmti.overcompletion_transaction_id IS NULL
6736: OR ( wmti.overcompletion_transaction_id IS NOT NULL
6737: AND wmti.overcompletion_transaction_qty IS NOT NULL))

Line 6734: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

6730: WHERE wmti.group_id = p_gib.group_id
6731: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
6732: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6733: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6734: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
6735: AND (wmti.overcompletion_transaction_id IS NULL
6736: OR ( wmti.overcompletion_transaction_id IS NOT NULL
6737: AND wmti.overcompletion_transaction_qty IS NOT NULL))
6738: AND wmti.organization_id = wor.organization_id

Line 6745: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE

6741: AND wor.repetitive_schedule_id = wma.repetitive_schedule_id
6742: AND wmti.organization_id = wma.organization_id
6743: AND wmti.transaction_id = wma.transaction_id
6744: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
6745: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
6746: AND wrs.organization_id = wor.organization_id
6747: AND wrs.repetitive_schedule_id = wor.repetitive_schedule_id
6748: AND (wrs.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6749: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL

Line 6748: AND (wrs.po_creation_time = WIP_CONSTANTS.AT_OPERATION

6744: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
6745: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
6746: AND wrs.organization_id = wor.organization_id
6747: AND wrs.repetitive_schedule_id = wor.repetitive_schedule_id
6748: AND (wrs.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6749: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
6750: AND wrs.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
6751: AND wo1.organization_id = wmti.organization_id
6752: AND wo1.wip_entity_id = wmti.wip_entity_id

Line 6749: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL

6745: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
6746: AND wrs.organization_id = wor.organization_id
6747: AND wrs.repetitive_schedule_id = wor.repetitive_schedule_id
6748: AND (wrs.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6749: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
6750: AND wrs.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
6751: AND wo1.organization_id = wmti.organization_id
6752: AND wo1.wip_entity_id = wmti.wip_entity_id
6753: AND wo1.repetitive_schedule_id = wor.repetitive_schedule_id

Line 6750: AND wrs.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))

6746: AND wrs.organization_id = wor.organization_id
6747: AND wrs.repetitive_schedule_id = wor.repetitive_schedule_id
6748: AND (wrs.po_creation_time = WIP_CONSTANTS.AT_OPERATION
6749: OR (wo1.count_point_type = WIP_CONSTANTS.NO_MANUAL
6750: AND wrs.po_creation_time <> WIP_CONSTANTS.MANUAL_CREATION))
6751: AND wo1.organization_id = wmti.organization_id
6752: AND wo1.wip_entity_id = wmti.wip_entity_id
6753: AND wo1.repetitive_schedule_id = wor.repetitive_schedule_id
6754: AND wo1.operation_seq_num = wmti.to_operation_seq_num

Line 6759: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT

6755: AND wo2.organization_id = wo1.organization_id
6756: AND wo2.wip_entity_id = wo1.wip_entity_id
6757: AND wo2.repetitive_schedule_id = wo1.repetitive_schedule_id
6758: -- Fixed bug 2259661
6759: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6760: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6761: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6762: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6763: WIP_CONSTANTS.PO_MOVE))

Line 6761: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE

6757: AND wo2.repetitive_schedule_id = wo1.repetitive_schedule_id
6758: -- Fixed bug 2259661
6759: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6760: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6761: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6762: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6763: WIP_CONSTANTS.PO_MOVE))
6764: AND ((wo1.next_operation_seq_num IS NOT NULL
6765: AND wo1.next_operation_seq_num = wo2.operation_seq_num)

Line 6762: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,

6758: -- Fixed bug 2259661
6759: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6760: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6761: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6762: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6763: WIP_CONSTANTS.PO_MOVE))
6764: AND ((wo1.next_operation_seq_num IS NOT NULL
6765: AND wo1.next_operation_seq_num = wo2.operation_seq_num)
6766: OR (wo1.next_operation_seq_num IS NULL

Line 6763: WIP_CONSTANTS.PO_MOVE))

6759: -- AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT
6760: -- AND wo2.operation_seq_num = wmti.to_operation_seq_num)
6761: -- OR (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE
6762: AND ((wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
6763: WIP_CONSTANTS.PO_MOVE))
6764: AND ((wo1.next_operation_seq_num IS NOT NULL
6765: AND wo1.next_operation_seq_num = wo2.operation_seq_num)
6766: OR (wo1.next_operation_seq_num IS NULL
6767: AND wo2.operation_seq_num = wmti.to_operation_seq_num)))

Line 6768: AND wor.basis_type = WIP_CONSTANTS.PER_LOT

6764: AND ((wo1.next_operation_seq_num IS NOT NULL
6765: AND wo1.next_operation_seq_num = wo2.operation_seq_num)
6766: OR (wo1.next_operation_seq_num IS NULL
6767: AND wo2.operation_seq_num = wmti.to_operation_seq_num)))
6768: AND wor.basis_type = WIP_CONSTANTS.PER_LOT
6769: AND wor.organization_id = br.organization_id
6770: AND wor.resource_id = br.resource_id
6771: AND br.organization_id = msi.organization_id
6772: AND br.purchase_item_id = msi.inventory_item_id

Line 6777: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND

6773: AND wmti.created_by = fu.user_id
6774: AND wmti.organization_id = bd.organization_id
6775: /* Fix for bug 3609023: Corrected condition to ensure we insert
6776: correct deliver_to_location_id for PO_RECEIPT */
6777: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND
6778: wo1.department_id = bd.department_id)
6779: OR
6780: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND
6781: wo2.department_id = bd.department_id))

Line 6780: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND

6776: correct deliver_to_location_id for PO_RECEIPT */
6777: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND
6778: wo1.department_id = bd.department_id)
6779: OR
6780: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND
6781: wo2.department_id = bd.department_id))
6782: AND mp.organization_id = wmti.organization_id
6783: AND hoi.organization_id = wmti.organization_id
6784: AND hoi.org_information_context = 'Accounting Information'

Line 6829: IF (l_logLevel <= wip_constants.full_logging) THEN

6825: 1, 0),
6826: 1, 0);
6827:
6828: -- IF debug message level = 2, write statement below to log file
6829: IF (l_logLevel <= wip_constants.full_logging) THEN
6830: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
6831: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
6832: fnd_message.set_token('ENTITY2', 'PO_REQUISITIONS_INTERFACE_ALL');
6833: l_msg := fnd_message.get;

Line 6864: IF (l_logLevel <= wip_constants.trace_logging) THEN

6860: END IF; -- check PO patchset
6861: x_returnStatus := fnd_api.g_ret_sts_success;
6862:
6863: -- write to the log file
6864: IF (l_logLevel <= wip_constants.trace_logging) THEN
6865: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_po_req',
6866: p_procReturnStatus => x_returnStatus,
6867: p_msg => 'procedure complete',
6868: x_returnStatus => l_returnStatus);

Line 6879: IF (l_logLevel <= wip_constants.trace_logging) THEN

6875: END IF;
6876: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
6877: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
6878:
6879: IF (l_logLevel <= wip_constants.trace_logging) THEN
6880: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.insert_po_req',
6881: p_procReturnStatus => x_returnStatus,
6882: p_msg => l_errMsg,
6883: x_returnStatus => l_returnStatus);

Line 6913: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

6909: wip_operation_resources wor,
6910: wip_operations wo,
6911: wip_move_txn_interface wmti
6912: WHERE wmti.group_id = p_group_id
6913: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6914: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6915: AND TRUNC(wmti.transaction_date)= TRUNC(p_txn_date)
6916: AND (wmti.fm_operation_seq_num < wmti.to_operation_seq_num
6917: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num

Line 6914: AND wmti.process_status = WIP_CONSTANTS.RUNNING

6910: wip_operations wo,
6911: wip_move_txn_interface wmti
6912: WHERE wmti.group_id = p_group_id
6913: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
6914: AND wmti.process_status = WIP_CONSTANTS.RUNNING
6915: AND TRUNC(wmti.transaction_date)= TRUNC(p_txn_date)
6916: AND (wmti.fm_operation_seq_num < wmti.to_operation_seq_num
6917: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
6918: AND wmti.fm_intraoperation_step_type <

Line 6920: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE

6916: AND (wmti.fm_operation_seq_num < wmti.to_operation_seq_num
6917: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
6918: AND wmti.fm_intraoperation_step_type <
6919: wmti.to_intraoperation_step_type))
6920: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
6921: AND muom.uom_code = wmti.primary_uom
6922: AND wo.wip_entity_id = wmti.wip_entity_id
6923: AND wo.organization_id = wmti.organization_id
6924: AND NVL(wo.repetitive_schedule_id, -1) =

Line 6946: AND wor.autocharge_type in(WIP_CONSTANTS.PO_MOVE, --Fix for 2393550

6942: AND wor.organization_id = wo.organization_id
6943: AND NVL(wor.repetitive_schedule_id, -1) =
6944: NVL(wo.repetitive_schedule_id, -1)
6945: AND wor.operation_seq_num = wo.operation_seq_num
6946: AND wor.autocharge_type in(WIP_CONSTANTS.PO_MOVE, --Fix for 2393550
6947: WIP_CONSTANTS.PO_RECEIPT)
6948: AND br.resource_id = wor.resource_id
6949: AND br.organization_id = wor.organization_id
6950: AND br.purchase_item_id IS NOT NULL;

Line 6947: WIP_CONSTANTS.PO_RECEIPT)

6943: AND NVL(wor.repetitive_schedule_id, -1) =
6944: NVL(wo.repetitive_schedule_id, -1)
6945: AND wor.operation_seq_num = wo.operation_seq_num
6946: AND wor.autocharge_type in(WIP_CONSTANTS.PO_MOVE, --Fix for 2393550
6947: WIP_CONSTANTS.PO_RECEIPT)
6948: AND br.resource_id = wor.resource_id
6949: AND br.organization_id = wor.organization_id
6950: AND br.purchase_item_id IS NOT NULL;
6951:

Line 6966: l_osp_exist NUMBER := WIP_CONSTANTS.NO;

6962: l_req_import VARCHAR2(20); --8919025(Fp 8850950)
6963:
6964: -- new parameter used to determine whether we have to launch "Req Import"
6965: -- concurrent program or not
6966: l_osp_exist NUMBER := WIP_CONSTANTS.NO;
6967: l_launch_req_import NUMBER := WIP_CONSTANTS.YES;
6968: l_po_receipt_exsit NUMBER := WIP_CONSTANTS.NO; --Bug 13768020
6969: l_init_reqappr VARCHAR2(1);/*ER 4276433*/
6970:

Line 6967: l_launch_req_import NUMBER := WIP_CONSTANTS.YES;

6963:
6964: -- new parameter used to determine whether we have to launch "Req Import"
6965: -- concurrent program or not
6966: l_osp_exist NUMBER := WIP_CONSTANTS.NO;
6967: l_launch_req_import NUMBER := WIP_CONSTANTS.YES;
6968: l_po_receipt_exsit NUMBER := WIP_CONSTANTS.NO; --Bug 13768020
6969: l_init_reqappr VARCHAR2(1);/*ER 4276433*/
6970:
6971: BEGIN

Line 6968: l_po_receipt_exsit NUMBER := WIP_CONSTANTS.NO; --Bug 13768020

6964: -- new parameter used to determine whether we have to launch "Req Import"
6965: -- concurrent program or not
6966: l_osp_exist NUMBER := WIP_CONSTANTS.NO;
6967: l_launch_req_import NUMBER := WIP_CONSTANTS.YES;
6968: l_po_receipt_exsit NUMBER := WIP_CONSTANTS.NO; --Bug 13768020
6969: l_init_reqappr VARCHAR2(1);/*ER 4276433*/
6970:
6971: BEGIN
6972: -- write parameter value to log file

Line 6973: IF (l_logLevel <= wip_constants.trace_logging) THEN

6969: l_init_reqappr VARCHAR2(1);/*ER 4276433*/
6970:
6971: BEGIN
6972: -- write parameter value to log file
6973: IF (l_logLevel <= wip_constants.trace_logging) THEN
6974: l_params(1).paramName := 'p_group_id';
6975: l_params(1).paramValue := p_gib.group_id;
6976: l_params(2).paramName := 'p_txn_date';
6977: l_params(2).paramValue := p_gib.txn_date;

Line 6988: l_osp_exist := WIP_CONSTANTS.YES;

6984: LOOP
6985: FETCH c_wmti_txn INTO l_wmti_txn;
6986: EXIT WHEN c_wmti_txn%NOTFOUND;
6987:
6988: l_osp_exist := WIP_CONSTANTS.YES;
6989: l_org_id := l_wmti_txn.org_id;
6990:
6991: IF(l_wmti_txn.autocharge_type = WIP_CONSTANTS.PO_MOVE) THEN
6992: -- Launch workflow only for PO_MOVE

Line 6991: IF(l_wmti_txn.autocharge_type = WIP_CONSTANTS.PO_MOVE) THEN

6987:
6988: l_osp_exist := WIP_CONSTANTS.YES;
6989: l_org_id := l_wmti_txn.org_id;
6990:
6991: IF(l_wmti_txn.autocharge_type = WIP_CONSTANTS.PO_MOVE) THEN
6992: -- Launch workflow only for PO_MOVE
6993: -- call PL/SQL API to start workflow
6994:
6995: -- Fixed bug 5333089. Need to set org context before launching workflow

Line 7024: l_launch_req_import := WIP_CONSTANTS.NO;

7020: WHERE transaction_id = l_wmti_txn.txn_id;
7021: END IF;
7022: -- No need to lauch "Req Import" again if we already laucned the workflow
7023: -- because "Req Import" is part of the workflow itself.
7024: l_launch_req_import := WIP_CONSTANTS.NO;
7025: -- Fix for Bug#4369684. Need to reassign to null for multiple OSP Move.
7026: l_itemkey := NULL;
7027: END IF; -- PO_MOVE
7028:

Line 7030: IF(l_wmti_txn.autocharge_type = WIP_CONSTANTS.PO_RECEIPT) THEN

7026: l_itemkey := NULL;
7027: END IF; -- PO_MOVE
7028:
7029: /*Bug 13768020*/
7030: IF(l_wmti_txn.autocharge_type = WIP_CONSTANTS.PO_RECEIPT) THEN
7031: l_po_receipt_exsit := WIP_CONSTANTS.YES;
7032: END IF;
7033:
7034: END LOOP;

Line 7031: l_po_receipt_exsit := WIP_CONSTANTS.YES;

7027: END IF; -- PO_MOVE
7028:
7029: /*Bug 13768020*/
7030: IF(l_wmti_txn.autocharge_type = WIP_CONSTANTS.PO_RECEIPT) THEN
7031: l_po_receipt_exsit := WIP_CONSTANTS.YES;
7032: END IF;
7033:
7034: END LOOP;
7035:

Line 7037: IF( l_po_receipt_exsit = WIP_CONSTANTS.YES AND

7033:
7034: END LOOP;
7035:
7036: /*Bug 13768020: Do not launch "Req Import" when there is po receipt resource and profile WIP_OSP_REQ is set to No.*/
7037: IF( l_po_receipt_exsit = WIP_CONSTANTS.YES AND
7038: fnd_profile.value('WIP_OSP_REQ') = WIP_CONSTANTS.NO) THEN
7039: l_launch_req_import := WIP_CONSTANTS.NO;
7040: END IF;
7041:

Line 7038: fnd_profile.value('WIP_OSP_REQ') = WIP_CONSTANTS.NO) THEN

7034: END LOOP;
7035:
7036: /*Bug 13768020: Do not launch "Req Import" when there is po receipt resource and profile WIP_OSP_REQ is set to No.*/
7037: IF( l_po_receipt_exsit = WIP_CONSTANTS.YES AND
7038: fnd_profile.value('WIP_OSP_REQ') = WIP_CONSTANTS.NO) THEN
7039: l_launch_req_import := WIP_CONSTANTS.NO;
7040: END IF;
7041:
7042: /*Bug 13768020: Launch "Req Import" when there is po receipt resource, worflow is diabled and WIP_OSP_REQ is set to Yes*/

Line 7039: l_launch_req_import := WIP_CONSTANTS.NO;

7035:
7036: /*Bug 13768020: Do not launch "Req Import" when there is po receipt resource and profile WIP_OSP_REQ is set to No.*/
7037: IF( l_po_receipt_exsit = WIP_CONSTANTS.YES AND
7038: fnd_profile.value('WIP_OSP_REQ') = WIP_CONSTANTS.NO) THEN
7039: l_launch_req_import := WIP_CONSTANTS.NO;
7040: END IF;
7041:
7042: /*Bug 13768020: Launch "Req Import" when there is po receipt resource, worflow is diabled and WIP_OSP_REQ is set to Yes*/
7043: IF(l_launch_req_import = WIP_CONSTANTS.NO AND

Line 7043: IF(l_launch_req_import = WIP_CONSTANTS.NO AND

7039: l_launch_req_import := WIP_CONSTANTS.NO;
7040: END IF;
7041:
7042: /*Bug 13768020: Launch "Req Import" when there is po receipt resource, worflow is diabled and WIP_OSP_REQ is set to Yes*/
7043: IF(l_launch_req_import = WIP_CONSTANTS.NO AND
7044: l_po_receipt_exsit = WIP_CONSTANTS.YES AND
7045: fnd_profile.value('WIP_OSP_REQ') = WIP_CONSTANTS.YES AND
7046: fnd_profile.value('WIP_OSP_WF') = WIP_CONSTANTS.NO) THEN
7047: l_launch_req_import := WIP_CONSTANTS.YES;

Line 7044: l_po_receipt_exsit = WIP_CONSTANTS.YES AND

7040: END IF;
7041:
7042: /*Bug 13768020: Launch "Req Import" when there is po receipt resource, worflow is diabled and WIP_OSP_REQ is set to Yes*/
7043: IF(l_launch_req_import = WIP_CONSTANTS.NO AND
7044: l_po_receipt_exsit = WIP_CONSTANTS.YES AND
7045: fnd_profile.value('WIP_OSP_REQ') = WIP_CONSTANTS.YES AND
7046: fnd_profile.value('WIP_OSP_WF') = WIP_CONSTANTS.NO) THEN
7047: l_launch_req_import := WIP_CONSTANTS.YES;
7048: END IF;

Line 7045: fnd_profile.value('WIP_OSP_REQ') = WIP_CONSTANTS.YES AND

7041:
7042: /*Bug 13768020: Launch "Req Import" when there is po receipt resource, worflow is diabled and WIP_OSP_REQ is set to Yes*/
7043: IF(l_launch_req_import = WIP_CONSTANTS.NO AND
7044: l_po_receipt_exsit = WIP_CONSTANTS.YES AND
7045: fnd_profile.value('WIP_OSP_REQ') = WIP_CONSTANTS.YES AND
7046: fnd_profile.value('WIP_OSP_WF') = WIP_CONSTANTS.NO) THEN
7047: l_launch_req_import := WIP_CONSTANTS.YES;
7048: END IF;
7049:

Line 7046: fnd_profile.value('WIP_OSP_WF') = WIP_CONSTANTS.NO) THEN

7042: /*Bug 13768020: Launch "Req Import" when there is po receipt resource, worflow is diabled and WIP_OSP_REQ is set to Yes*/
7043: IF(l_launch_req_import = WIP_CONSTANTS.NO AND
7044: l_po_receipt_exsit = WIP_CONSTANTS.YES AND
7045: fnd_profile.value('WIP_OSP_REQ') = WIP_CONSTANTS.YES AND
7046: fnd_profile.value('WIP_OSP_WF') = WIP_CONSTANTS.NO) THEN
7047: l_launch_req_import := WIP_CONSTANTS.YES;
7048: END IF;
7049:
7050: -- If OSP item exists, and there is no workflow launch yet, we have to launch

Line 7047: l_launch_req_import := WIP_CONSTANTS.YES;

7043: IF(l_launch_req_import = WIP_CONSTANTS.NO AND
7044: l_po_receipt_exsit = WIP_CONSTANTS.YES AND
7045: fnd_profile.value('WIP_OSP_REQ') = WIP_CONSTANTS.YES AND
7046: fnd_profile.value('WIP_OSP_WF') = WIP_CONSTANTS.NO) THEN
7047: l_launch_req_import := WIP_CONSTANTS.YES;
7048: END IF;
7049:
7050: -- If OSP item exists, and there is no workflow launch yet, we have to launch
7051: -- "Req Import" concurrent program

Line 7052: IF(l_osp_exist = WIP_CONSTANTS.YES AND

7048: END IF;
7049:
7050: -- If OSP item exists, and there is no workflow launch yet, we have to launch
7051: -- "Req Import" concurrent program
7052: IF(l_osp_exist = WIP_CONSTANTS.YES AND
7053: l_launch_req_import = WIP_CONSTANTS.YES) THEN
7054:
7055: -- get the OU, set context for MOAC
7056: select to_number(ORG_INFORMATION3) into l_ou_id

Line 7053: l_launch_req_import = WIP_CONSTANTS.YES) THEN

7049:
7050: -- If OSP item exists, and there is no workflow launch yet, we have to launch
7051: -- "Req Import" concurrent program
7052: IF(l_osp_exist = WIP_CONSTANTS.YES AND
7053: l_launch_req_import = WIP_CONSTANTS.YES) THEN
7054:
7055: -- get the OU, set context for MOAC
7056: select to_number(ORG_INFORMATION3) into l_ou_id
7057: from HR_ORGANIZATION_INFORMATION

Line 7074: if(fnd_profile.value('WIP_OSP_INITIATE_REQAPPR') = WIP_CONSTANTS.NO) then

7070: WHEN NO_DATA_FOUND THEN
7071: raise fnd_api.g_exc_unexpected_error;
7072: END;
7073: /*ER 4276433*/
7074: if(fnd_profile.value('WIP_OSP_INITIATE_REQAPPR') = WIP_CONSTANTS.NO) then
7075: l_init_reqappr := 'N';
7076: else
7077: l_init_reqappr := 'Y';
7078: end if;

Line 7101: IF (l_logLevel <= wip_constants.trace_logging) THEN

7097: CLOSE c_wmti_txn;
7098: END IF;
7099: x_returnStatus := fnd_api.g_ret_sts_success;
7100: -- write to the log file
7101: IF (l_logLevel <= wip_constants.trace_logging) THEN
7102: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.start_workflow',
7103: p_procReturnStatus => x_returnStatus,
7104: p_msg => 'procedure complete',
7105: x_returnStatus => l_returnStatus);

Line 7117: IF (l_logLevel <= wip_constants.trace_logging) THEN

7113: END IF;
7114: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7115: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
7116:
7117: IF (l_logLevel <= wip_constants.trace_logging) THEN
7118: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.start_workflow',
7119: p_procReturnStatus => x_returnStatus,
7120: p_msg => l_errMsg,
7121: x_returnStatus => l_returnStatus);

Line 7145: IF (l_logLevel <= wip_constants.trace_logging) THEN

7141: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
7142:
7143: BEGIN
7144: -- write parameter value to log file
7145: IF (l_logLevel <= wip_constants.trace_logging) THEN
7146: l_params(1).paramName := 'p_group_id';
7147: l_params(1).paramValue := p_gib.group_id;
7148: l_params(2).paramName := 'p_txn_date';
7149: l_params(2).paramValue := p_gib.txn_date;

Line 7176: WIP_CONSTANTS.RUN),

7172: NVL(SUM(NVL(wma1.primary_quantity, wmti.primary_quantity) *
7173: DECODE(SIGN(wmti.to_operation_seq_num -
7174: wmti.fm_operation_seq_num),
7175: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
7176: WIP_CONSTANTS.RUN),
7177: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
7178: WIP_CONSTANTS.RUN),1,1,-1),
7179: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
7180: WIP_CONSTANTS.RUN),1,1,-1),

Line 7178: WIP_CONSTANTS.RUN),1,1,-1),

7174: wmti.fm_operation_seq_num),
7175: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
7176: WIP_CONSTANTS.RUN),
7177: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
7178: WIP_CONSTANTS.RUN),1,1,-1),
7179: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
7180: WIP_CONSTANTS.RUN),1,1,-1),
7181: 1,-1),
7182: 1, 1,

Line 7180: WIP_CONSTANTS.RUN),1,1,-1),

7176: WIP_CONSTANTS.RUN),
7177: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
7178: WIP_CONSTANTS.RUN),1,1,-1),
7179: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
7180: WIP_CONSTANTS.RUN),1,1,-1),
7181: 1,-1),
7182: 1, 1,
7183: -1,-1)
7184: ),0)), /* for discrete */

Line 7190: WIP_CONSTANTS.RUN),

7186: NVL(SUM(NVL(wma1.primary_quantity, wmti.primary_quantity) *
7187: DECODE(SIGN(wmti.to_operation_seq_num -
7188: wmti.fm_operation_seq_num),
7189: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
7190: WIP_CONSTANTS.RUN),
7191: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
7192: WIP_CONSTANTS.RUN),1,1,-1),
7193: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
7194: WIP_CONSTANTS.RUN),1,1,-1),

Line 7192: WIP_CONSTANTS.RUN),1,1,-1),

7188: wmti.fm_operation_seq_num),
7189: 0,DECODE(SIGN(wmti.fm_intraoperation_step_type -
7190: WIP_CONSTANTS.RUN),
7191: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
7192: WIP_CONSTANTS.RUN),1,1,-1),
7193: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
7194: WIP_CONSTANTS.RUN),1,1,-1),
7195: 1,-1),
7196: 1, 1,

Line 7194: WIP_CONSTANTS.RUN),1,1,-1),

7190: WIP_CONSTANTS.RUN),
7191: 0,DECODE(SIGN(wmti.to_intraoperation_step_type -
7192: WIP_CONSTANTS.RUN),1,1,-1),
7193: -1,DECODE(SIGN(wmti.to_intraoperation_step_type -
7194: WIP_CONSTANTS.RUN),1,1,-1),
7195: 1,-1),
7196: 1, 1,
7197: -1,-1)
7198: ),0) /* for repetitive */

Line 7214: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

7210: WHERE wop1.rowid = wop.rowid
7211: AND wmti.group_id = p_gib.group_id
7212: AND (p_txn_id IS NULL OR wmti.transaction_id = p_txn_id)
7213: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7214: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7215: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7216: AND wop1.organization_id = wmti.organization_id
7217: AND wop1.wip_entity_id = wmti.wip_entity_id
7218: AND wmti.organization_id = wma1.organization_id (+)

Line 7215: AND wmti.process_status = WIP_CONSTANTS.RUNNING

7211: AND wmti.group_id = p_gib.group_id
7212: AND (p_txn_id IS NULL OR wmti.transaction_id = p_txn_id)
7213: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7214: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7215: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7216: AND wop1.organization_id = wmti.organization_id
7217: AND wop1.wip_entity_id = wmti.wip_entity_id
7218: AND wmti.organization_id = wma1.organization_id (+)
7219: AND wmti.transaction_id = wma1.transaction_id (+)

Line 7224: WIP_CONSTANTS.RUN),1,1,0)

7220: AND NVL(wma1.repetitive_schedule_id,0) =
7221: NVL(wop1.repetitive_schedule_id,0)
7222: AND ((wop1.operation_seq_num >= wmti.fm_operation_seq_num
7223: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
7224: WIP_CONSTANTS.RUN),1,1,0)
7225: AND wop1.operation_seq_num < wmti.to_operation_seq_num
7226: + DECODE(SIGN(wmti.to_intraoperation_step_type -
7227: WIP_CONSTANTS.RUN),1,1,0)
7228: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num

Line 7227: WIP_CONSTANTS.RUN),1,1,0)

7223: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
7224: WIP_CONSTANTS.RUN),1,1,0)
7225: AND wop1.operation_seq_num < wmti.to_operation_seq_num
7226: + DECODE(SIGN(wmti.to_intraoperation_step_type -
7227: WIP_CONSTANTS.RUN),1,1,0)
7228: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
7229: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
7230: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
7231: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

Line 7230: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN

7226: + DECODE(SIGN(wmti.to_intraoperation_step_type -
7227: WIP_CONSTANTS.RUN),1,1,0)
7228: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
7229: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
7230: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
7231: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
7232: AND (wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL
7233: OR wop1.operation_seq_num = wmti.fm_operation_seq_num
7234: OR (wop1.operation_seq_num = wmti.to_operation_seq_num

Line 7231: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

7227: WIP_CONSTANTS.RUN),1,1,0)
7228: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
7229: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
7230: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
7231: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
7232: AND (wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL
7233: OR wop1.operation_seq_num = wmti.fm_operation_seq_num
7234: OR (wop1.operation_seq_num = wmti.to_operation_seq_num
7235: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN)))

Line 7232: AND (wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL

7228: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
7229: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
7230: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
7231: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
7232: AND (wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL
7233: OR wop1.operation_seq_num = wmti.fm_operation_seq_num
7234: OR (wop1.operation_seq_num = wmti.to_operation_seq_num
7235: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN)))
7236: OR

Line 7235: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN)))

7231: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
7232: AND (wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL
7233: OR wop1.operation_seq_num = wmti.fm_operation_seq_num
7234: OR (wop1.operation_seq_num = wmti.to_operation_seq_num
7235: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN)))
7236: OR
7237: (wop1.operation_seq_num < wmti.fm_operation_seq_num
7238: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
7239: WIP_CONSTANTS.RUN),1,1,0)

Line 7239: WIP_CONSTANTS.RUN),1,1,0)

7235: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN)))
7236: OR
7237: (wop1.operation_seq_num < wmti.fm_operation_seq_num
7238: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
7239: WIP_CONSTANTS.RUN),1,1,0)
7240: AND wop1.operation_seq_num >= wmti.to_operation_seq_num
7241: + DECODE(SIGN(wmti.to_intraoperation_step_type -
7242: WIP_CONSTANTS.RUN),1,1,0)
7243: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num

Line 7242: WIP_CONSTANTS.RUN),1,1,0)

7238: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
7239: WIP_CONSTANTS.RUN),1,1,0)
7240: AND wop1.operation_seq_num >= wmti.to_operation_seq_num
7241: + DECODE(SIGN(wmti.to_intraoperation_step_type -
7242: WIP_CONSTANTS.RUN),1,1,0)
7243: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
7244: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
7245: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
7246: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

Line 7245: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN

7241: + DECODE(SIGN(wmti.to_intraoperation_step_type -
7242: WIP_CONSTANTS.RUN),1,1,0)
7243: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
7244: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
7245: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
7246: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
7247: AND (wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL
7248: OR (wop1.operation_seq_num = wmti.to_operation_seq_num)
7249: /*Fix bug 9538314(fp of 9344254) ,revert the fix of bug 1834450 as it caused regression*/

Line 7246: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

7242: WIP_CONSTANTS.RUN),1,1,0)
7243: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
7244: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
7245: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
7246: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
7247: AND (wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL
7248: OR (wop1.operation_seq_num = wmti.to_operation_seq_num)
7249: /*Fix bug 9538314(fp of 9344254) ,revert the fix of bug 1834450 as it caused regression*/
7250: --/*fix bug 1834450*/ AND wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL )

Line 7247: AND (wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL

7243: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
7244: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
7245: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
7246: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
7247: AND (wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL
7248: OR (wop1.operation_seq_num = wmti.to_operation_seq_num)
7249: /*Fix bug 9538314(fp of 9344254) ,revert the fix of bug 1834450 as it caused regression*/
7250: --/*fix bug 1834450*/ AND wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL )
7251: OR (wop1.operation_seq_num = wmti.fm_operation_seq_num

Line 7250: --/*fix bug 1834450*/ AND wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL )

7246: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
7247: AND (wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL
7248: OR (wop1.operation_seq_num = wmti.to_operation_seq_num)
7249: /*Fix bug 9538314(fp of 9344254) ,revert the fix of bug 1834450 as it caused regression*/
7250: --/*fix bug 1834450*/ AND wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL )
7251: OR (wop1.operation_seq_num = wmti.fm_operation_seq_num
7252: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN)))
7253: ))
7254: WHERE wop.rowid IN

Line 7252: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN)))

7248: OR (wop1.operation_seq_num = wmti.to_operation_seq_num)
7249: /*Fix bug 9538314(fp of 9344254) ,revert the fix of bug 1834450 as it caused regression*/
7250: --/*fix bug 1834450*/ AND wop1.count_point_type < WIP_CONSTANTS.NO_MANUAL )
7251: OR (wop1.operation_seq_num = wmti.fm_operation_seq_num
7252: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN)))
7253: ))
7254: WHERE wop.rowid IN
7255: (SELECT wop2.rowid
7256: FROM wip_operations wop2,

Line 7263: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

7259: WHERE wop2.organization_id = wmti.organization_id
7260: AND wmti.group_id = p_gib.group_id
7261: AND (p_txn_id IS NULL OR wmti.transaction_id = p_txn_id)
7262: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7263: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7264: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7265: AND wop2.organization_id = wmti.organization_id
7266: AND wop2.wip_entity_id = wmti.wip_entity_id
7267: AND wmti.organization_id = wma2.organization_id (+)

Line 7264: AND wmti.process_status = WIP_CONSTANTS.RUNNING

7260: AND wmti.group_id = p_gib.group_id
7261: AND (p_txn_id IS NULL OR wmti.transaction_id = p_txn_id)
7262: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7263: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7264: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7265: AND wop2.organization_id = wmti.organization_id
7266: AND wop2.wip_entity_id = wmti.wip_entity_id
7267: AND wmti.organization_id = wma2.organization_id (+)
7268: AND wmti.transaction_id = wma2.transaction_id (+)

Line 7273: WIP_CONSTANTS.RUN),1,1,0)

7269: AND NVL(wma2.repetitive_schedule_id,0) =
7270: NVL(wop2.repetitive_schedule_id,0)
7271: AND ((wop2.operation_seq_num >= wmti.fm_operation_seq_num
7272: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
7273: WIP_CONSTANTS.RUN),1,1,0)
7274: AND wop2.operation_seq_num < wmti.to_operation_seq_num
7275: + DECODE(SIGN(wmti.to_intraoperation_step_type -
7276: WIP_CONSTANTS.RUN),1,1,0)
7277: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num

Line 7276: WIP_CONSTANTS.RUN),1,1,0)

7272: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
7273: WIP_CONSTANTS.RUN),1,1,0)
7274: AND wop2.operation_seq_num < wmti.to_operation_seq_num
7275: + DECODE(SIGN(wmti.to_intraoperation_step_type -
7276: WIP_CONSTANTS.RUN),1,1,0)
7277: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
7278: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
7279: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
7280: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

Line 7279: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN

7275: + DECODE(SIGN(wmti.to_intraoperation_step_type -
7276: WIP_CONSTANTS.RUN),1,1,0)
7277: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
7278: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
7279: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
7280: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
7281: AND (wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL
7282: OR wop2.operation_seq_num = wmti.fm_operation_seq_num
7283: OR (wop2.operation_seq_num = wmti.to_operation_seq_num

Line 7280: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))

7276: WIP_CONSTANTS.RUN),1,1,0)
7277: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
7278: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
7279: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
7280: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
7281: AND (wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL
7282: OR wop2.operation_seq_num = wmti.fm_operation_seq_num
7283: OR (wop2.operation_seq_num = wmti.to_operation_seq_num
7284: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN)))

Line 7281: AND (wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL

7277: AND (wmti.to_operation_seq_num > wmti.fm_operation_seq_num
7278: OR (wmti.to_operation_seq_num = wmti.fm_operation_seq_num
7279: AND wmti.fm_intraoperation_step_type <= WIP_CONSTANTS.RUN
7280: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
7281: AND (wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL
7282: OR wop2.operation_seq_num = wmti.fm_operation_seq_num
7283: OR (wop2.operation_seq_num = wmti.to_operation_seq_num
7284: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN)))
7285: OR

Line 7284: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN)))

7280: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN))
7281: AND (wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL
7282: OR wop2.operation_seq_num = wmti.fm_operation_seq_num
7283: OR (wop2.operation_seq_num = wmti.to_operation_seq_num
7284: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN)))
7285: OR
7286: (wop2.operation_seq_num < wmti.fm_operation_seq_num
7287: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
7288: WIP_CONSTANTS.RUN),1,1,0)

Line 7288: WIP_CONSTANTS.RUN),1,1,0)

7284: AND wmti.to_intraoperation_step_type > WIP_CONSTANTS.RUN)))
7285: OR
7286: (wop2.operation_seq_num < wmti.fm_operation_seq_num
7287: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
7288: WIP_CONSTANTS.RUN),1,1,0)
7289: AND wop2.operation_seq_num >= wmti.to_operation_seq_num
7290: + DECODE(SIGN(wmti.to_intraoperation_step_type -
7291: WIP_CONSTANTS.RUN),1,1,0)
7292: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num

Line 7291: WIP_CONSTANTS.RUN),1,1,0)

7287: + DECODE(SIGN(wmti.fm_intraoperation_step_type -
7288: WIP_CONSTANTS.RUN),1,1,0)
7289: AND wop2.operation_seq_num >= wmti.to_operation_seq_num
7290: + DECODE(SIGN(wmti.to_intraoperation_step_type -
7291: WIP_CONSTANTS.RUN),1,1,0)
7292: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
7293: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
7294: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
7295: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

Line 7294: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN

7290: + DECODE(SIGN(wmti.to_intraoperation_step_type -
7291: WIP_CONSTANTS.RUN),1,1,0)
7292: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
7293: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
7294: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
7295: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
7296: AND (wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL
7297: OR (wop2.operation_seq_num = wmti.to_operation_seq_num)
7298: /*Fix bug 9538314(fp of 9344254) ,revert the fix of bug 1834450 as it caused regression*/

Line 7295: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))

7291: WIP_CONSTANTS.RUN),1,1,0)
7292: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
7293: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
7294: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
7295: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
7296: AND (wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL
7297: OR (wop2.operation_seq_num = wmti.to_operation_seq_num)
7298: /*Fix bug 9538314(fp of 9344254) ,revert the fix of bug 1834450 as it caused regression*/
7299: --/*fix bug 1834450*/ AND wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL)

Line 7296: AND (wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL

7292: AND (wmti.fm_operation_seq_num > wmti.to_operation_seq_num
7293: OR (wmti.fm_operation_seq_num = wmti.to_operation_seq_num
7294: AND wmti.to_intraoperation_step_type <= WIP_CONSTANTS.RUN
7295: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
7296: AND (wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL
7297: OR (wop2.operation_seq_num = wmti.to_operation_seq_num)
7298: /*Fix bug 9538314(fp of 9344254) ,revert the fix of bug 1834450 as it caused regression*/
7299: --/*fix bug 1834450*/ AND wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL)
7300: OR (wop2.operation_seq_num = wmti.fm_operation_seq_num

Line 7299: --/*fix bug 1834450*/ AND wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL)

7295: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN))
7296: AND (wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL
7297: OR (wop2.operation_seq_num = wmti.to_operation_seq_num)
7298: /*Fix bug 9538314(fp of 9344254) ,revert the fix of bug 1834450 as it caused regression*/
7299: --/*fix bug 1834450*/ AND wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL)
7300: OR (wop2.operation_seq_num = wmti.fm_operation_seq_num
7301: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN)))
7302: ));
7303:

Line 7301: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN)))

7297: OR (wop2.operation_seq_num = wmti.to_operation_seq_num)
7298: /*Fix bug 9538314(fp of 9344254) ,revert the fix of bug 1834450 as it caused regression*/
7299: --/*fix bug 1834450*/ AND wop2.count_point_type < WIP_CONSTANTS.NO_MANUAL)
7300: OR (wop2.operation_seq_num = wmti.fm_operation_seq_num
7301: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN)))
7302: ));
7303:
7304: -- IF debug message level = 2, write statement below to log file
7305: IF (l_logLevel <= wip_constants.full_logging) THEN

Line 7305: IF (l_logLevel <= wip_constants.full_logging) THEN

7301: AND wmti.fm_intraoperation_step_type > WIP_CONSTANTS.RUN)))
7302: ));
7303:
7304: -- IF debug message level = 2, write statement below to log file
7305: IF (l_logLevel <= wip_constants.full_logging) THEN
7306: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');
7307: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
7308: fnd_message.set_token('ENTITY2', 'WIP_OPERATIONS');
7309: l_msg := fnd_message.get;

Line 7317: IF (l_logLevel <= wip_constants.trace_logging) THEN

7313:
7314: x_returnStatus := fnd_api.g_ret_sts_success;
7315:
7316: -- write to the log file
7317: IF (l_logLevel <= wip_constants.trace_logging) THEN
7318: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.update_complete_qty',
7319: p_procReturnStatus => x_returnStatus,
7320: p_msg => 'procedure complete',
7321: x_returnStatus => l_returnStatus);

Line 7329: IF (l_logLevel <= wip_constants.trace_logging) THEN

7325: WHEN others THEN
7326: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7327: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
7328:
7329: IF (l_logLevel <= wip_constants.trace_logging) THEN
7330: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.update_complete_qty',
7331: p_procReturnStatus => x_returnStatus,
7332: p_msg => l_errMsg,
7333: x_returnStatus => l_returnStatus);

Line 7357: IF (l_logLevel <= wip_constants.trace_logging) THEN

7353: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
7354:
7355: BEGIN
7356: -- write parameter value to log file
7357: IF (l_logLevel <= wip_constants.trace_logging) THEN
7358: l_params(1).paramName := 'p_mtl_temp_id';
7359: l_params(1).paramValue := p_mtl_temp_id;
7360: wip_logger.entryPoint(p_procName =>'wip_movProc_priv.op_snapshot',
7361: p_params => l_params,

Line 7378: IF (l_logLevel <= wip_constants.trace_logging) THEN

7374:
7375: x_returnStatus := fnd_api.g_ret_sts_success;
7376:
7377: -- write to the log file
7378: IF (l_logLevel <= wip_constants.trace_logging) THEN
7379: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.op_snapshot',
7380: p_procReturnStatus => x_returnStatus,
7381: p_msg => 'procedure complete',
7382: x_returnStatus => l_returnStatus);

Line 7389: IF (l_logLevel <= wip_constants.trace_logging) THEN

7385: EXCEPTION
7386: WHEN fnd_api.g_exc_unexpected_error THEN
7387: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7388:
7389: IF (l_logLevel <= wip_constants.trace_logging) THEN
7390: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.op_snapshot',
7391: p_procReturnStatus => x_returnStatus,
7392: p_msg => l_errMsg,
7393: x_returnStatus => l_returnStatus);

Line 7403: IF (l_logLevel <= wip_constants.trace_logging) THEN

7399: WHEN others THEN
7400: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7401: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
7402:
7403: IF (l_logLevel <= wip_constants.trace_logging) THEN
7404: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.op_snapshot',
7405: p_procReturnStatus => x_returnStatus,
7406: p_msg => l_errMsg,
7407: x_returnStatus => l_returnStatus);

Line 7432: AND (wip_entity_type = WIP_CONSTANTS.DISCRETE

7428: WHERE transaction_header_id = p_mtl_header_id
7429: AND transaction_action_id = p_txn_action_id
7430: AND transaction_type_id = p_txn_type_id
7431: AND transaction_source_type_id = TPS_INV_JOB_OR_SCHED
7432: AND (wip_entity_type = WIP_CONSTANTS.DISCRETE
7433: OR wip_entity_type = WIP_CONSTANTS.LOTBASED) /*WSM */
7434: ORDER BY transaction_date, transaction_source_id; /*Bug 7314913: Added order by clause*/
7435:
7436: l_params wip_logger.param_tbl_t;

Line 7433: OR wip_entity_type = WIP_CONSTANTS.LOTBASED) /*WSM */

7429: AND transaction_action_id = p_txn_action_id
7430: AND transaction_type_id = p_txn_type_id
7431: AND transaction_source_type_id = TPS_INV_JOB_OR_SCHED
7432: AND (wip_entity_type = WIP_CONSTANTS.DISCRETE
7433: OR wip_entity_type = WIP_CONSTANTS.LOTBASED) /*WSM */
7434: ORDER BY transaction_date, transaction_source_id; /*Bug 7314913: Added order by clause*/
7435:
7436: l_params wip_logger.param_tbl_t;
7437: l_returnStatus VARCHAR(1);

Line 7446: IF (l_logLevel <= wip_constants.trace_logging) THEN

7442: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
7443:
7444: BEGIN
7445: -- write parameter value to log file
7446: IF (l_logLevel <= wip_constants.trace_logging) THEN
7447: l_params(1).paramName := 'p_mtl_header_id';
7448: l_params(1).paramValue := p_mtl_header_id;
7449: l_params(2).paramName := 'p_org_id';
7450: l_params(2).paramValue := p_org_id;

Line 7474: IF((l_pri_cost_method = WIP_CONSTANTS.COST_AVG OR

7470: INTO l_mandatory_scrap_flag
7471: FROM wip_parameters wp
7472: WHERE wp.organization_id = p_org_id;
7473:
7474: IF((l_pri_cost_method = WIP_CONSTANTS.COST_AVG OR
7475: l_pri_cost_method = WIP_CONSTANTS.COST_FIFO OR
7476: l_pri_cost_method = WIP_CONSTANTS.COST_LIFO)
7477: AND
7478: (p_txn_type = WIP_CONSTANTS.COMP_TXN OR

Line 7475: l_pri_cost_method = WIP_CONSTANTS.COST_FIFO OR

7471: FROM wip_parameters wp
7472: WHERE wp.organization_id = p_org_id;
7473:
7474: IF((l_pri_cost_method = WIP_CONSTANTS.COST_AVG OR
7475: l_pri_cost_method = WIP_CONSTANTS.COST_FIFO OR
7476: l_pri_cost_method = WIP_CONSTANTS.COST_LIFO)
7477: AND
7478: (p_txn_type = WIP_CONSTANTS.COMP_TXN OR
7479: p_txn_type = WIP_CONSTANTS.RET_TXN OR

Line 7476: l_pri_cost_method = WIP_CONSTANTS.COST_LIFO)

7472: WHERE wp.organization_id = p_org_id;
7473:
7474: IF((l_pri_cost_method = WIP_CONSTANTS.COST_AVG OR
7475: l_pri_cost_method = WIP_CONSTANTS.COST_FIFO OR
7476: l_pri_cost_method = WIP_CONSTANTS.COST_LIFO)
7477: AND
7478: (p_txn_type = WIP_CONSTANTS.COMP_TXN OR
7479: p_txn_type = WIP_CONSTANTS.RET_TXN OR
7480: p_txn_type = WIP_CONSTANTS.MOVE_TXN)) THEN

Line 7478: (p_txn_type = WIP_CONSTANTS.COMP_TXN OR

7474: IF((l_pri_cost_method = WIP_CONSTANTS.COST_AVG OR
7475: l_pri_cost_method = WIP_CONSTANTS.COST_FIFO OR
7476: l_pri_cost_method = WIP_CONSTANTS.COST_LIFO)
7477: AND
7478: (p_txn_type = WIP_CONSTANTS.COMP_TXN OR
7479: p_txn_type = WIP_CONSTANTS.RET_TXN OR
7480: p_txn_type = WIP_CONSTANTS.MOVE_TXN)) THEN
7481:
7482: -- Fix bug 2369642

Line 7479: p_txn_type = WIP_CONSTANTS.RET_TXN OR

7475: l_pri_cost_method = WIP_CONSTANTS.COST_FIFO OR
7476: l_pri_cost_method = WIP_CONSTANTS.COST_LIFO)
7477: AND
7478: (p_txn_type = WIP_CONSTANTS.COMP_TXN OR
7479: p_txn_type = WIP_CONSTANTS.RET_TXN OR
7480: p_txn_type = WIP_CONSTANTS.MOVE_TXN)) THEN
7481:
7482: -- Fix bug 2369642
7483: --(p_txn_type = WIP_CONSTANTS.MOVE_TXN AND

Line 7480: p_txn_type = WIP_CONSTANTS.MOVE_TXN)) THEN

7476: l_pri_cost_method = WIP_CONSTANTS.COST_LIFO)
7477: AND
7478: (p_txn_type = WIP_CONSTANTS.COMP_TXN OR
7479: p_txn_type = WIP_CONSTANTS.RET_TXN OR
7480: p_txn_type = WIP_CONSTANTS.MOVE_TXN)) THEN
7481:
7482: -- Fix bug 2369642
7483: --(p_txn_type = WIP_CONSTANTS.MOVE_TXN AND
7484: -- l_mandatory_scrap_flag = WIP_CONSTANTS.YES))) THEN

Line 7483: --(p_txn_type = WIP_CONSTANTS.MOVE_TXN AND

7479: p_txn_type = WIP_CONSTANTS.RET_TXN OR
7480: p_txn_type = WIP_CONSTANTS.MOVE_TXN)) THEN
7481:
7482: -- Fix bug 2369642
7483: --(p_txn_type = WIP_CONSTANTS.MOVE_TXN AND
7484: -- l_mandatory_scrap_flag = WIP_CONSTANTS.YES))) THEN
7485:
7486: UPDATE mtl_material_transactions_temp
7487: SET transaction_temp_id = mtl_material_transactions_s.nextval

Line 7484: -- l_mandatory_scrap_flag = WIP_CONSTANTS.YES))) THEN

7480: p_txn_type = WIP_CONSTANTS.MOVE_TXN)) THEN
7481:
7482: -- Fix bug 2369642
7483: --(p_txn_type = WIP_CONSTANTS.MOVE_TXN AND
7484: -- l_mandatory_scrap_flag = WIP_CONSTANTS.YES))) THEN
7485:
7486: UPDATE mtl_material_transactions_temp
7487: SET transaction_temp_id = mtl_material_transactions_s.nextval
7488: WHERE transaction_header_id = p_mtl_header_id

Line 7493: AND (wip_entity_type = WIP_CONSTANTS.DISCRETE

7489: AND transaction_temp_id IS NULL
7490: AND transaction_action_id = p_txn_action_id
7491: AND transaction_type_id = p_txn_type_id
7492: AND transaction_source_type_id = TPS_INV_JOB_OR_SCHED
7493: AND (wip_entity_type = WIP_CONSTANTS.DISCRETE
7494: OR wip_entity_type = WIP_CONSTANTS.LOTBASED); /*WSM*/
7495:
7496: FOR l_mmtt IN c_mmtt LOOP
7497: op_snapshot(p_mtl_temp_id => l_mmtt.mtl_temp_id,

Line 7494: OR wip_entity_type = WIP_CONSTANTS.LOTBASED); /*WSM*/

7490: AND transaction_action_id = p_txn_action_id
7491: AND transaction_type_id = p_txn_type_id
7492: AND transaction_source_type_id = TPS_INV_JOB_OR_SCHED
7493: AND (wip_entity_type = WIP_CONSTANTS.DISCRETE
7494: OR wip_entity_type = WIP_CONSTANTS.LOTBASED); /*WSM*/
7495:
7496: FOR l_mmtt IN c_mmtt LOOP
7497: op_snapshot(p_mtl_temp_id => l_mmtt.mtl_temp_id,
7498: x_returnStatus => x_returnStatus);

Line 7510: IF (l_logLevel <= wip_constants.trace_logging) THEN

7506:
7507: x_returnStatus := fnd_api.g_ret_sts_success;
7508:
7509: -- write to the log file
7510: IF (l_logLevel <= wip_constants.trace_logging) THEN
7511: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.snapshot_online',
7512: p_procReturnStatus => x_returnStatus,
7513: p_msg => 'procedure complete',
7514: x_returnStatus => l_returnStatus);

Line 7521: IF (l_logLevel <= wip_constants.trace_logging) THEN

7517: EXCEPTION
7518: WHEN fnd_api.g_exc_unexpected_error THEN
7519: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7520:
7521: IF (l_logLevel <= wip_constants.trace_logging) THEN
7522: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.snapshot_online',
7523: p_procReturnStatus => x_returnStatus,
7524: p_msg => l_errMsg,
7525: x_returnStatus => l_returnStatus);

Line 7532: IF (l_logLevel <= wip_constants.trace_logging) THEN

7528: WHEN others THEN
7529: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7530: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
7531:
7532: IF (l_logLevel <= wip_constants.trace_logging) THEN
7533: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.snapshot_online',
7534: p_procReturnStatus => x_returnStatus,
7535: p_msg => l_errMsg,
7536: x_returnStatus => l_returnStatus);

Line 7583: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

7579: mtl_parameters mp
7580: WHERE wmti.group_id = p_group_id
7581: AND (p_txn_id IS NULL OR wmti.transaction_id = p_txn_id)
7582: AND TRUNC(wmti.transaction_date) = TRUNC(p_txn_date)
7583: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7584: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7585: AND mmtt.move_transaction_id = wmti.transaction_id
7586: /* Improve performance */
7587: AND mmtt.organization_id = wmti.organization_id

Line 7584: AND wmti.process_status = WIP_CONSTANTS.RUNNING

7580: WHERE wmti.group_id = p_group_id
7581: AND (p_txn_id IS NULL OR wmti.transaction_id = p_txn_id)
7582: AND TRUNC(wmti.transaction_date) = TRUNC(p_txn_date)
7583: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7584: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7585: AND mmtt.move_transaction_id = wmti.transaction_id
7586: /* Improve performance */
7587: AND mmtt.organization_id = wmti.organization_id
7588: AND mmtt.transaction_source_id = wmti.wip_entity_id

Line 7591: AND mmtt.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,

7587: AND mmtt.organization_id = wmti.organization_id
7588: AND mmtt.transaction_source_id = wmti.wip_entity_id
7589: AND mmtt.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
7590: /* End Improve performance */
7591: AND mmtt.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
7592: WIP_CONSTANTS.LOTBASED) /*WSM */
7593: -- Fixed bug2515712 (do not insert component related record)
7594: AND mmtt.transaction_action_id IN (WIP_CONSTANTS.SCRASSY_ACTION,
7595: WIP_CONSTANTS.RETASSY_ACTION,

Line 7592: WIP_CONSTANTS.LOTBASED) /*WSM */

7588: AND mmtt.transaction_source_id = wmti.wip_entity_id
7589: AND mmtt.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
7590: /* End Improve performance */
7591: AND mmtt.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
7592: WIP_CONSTANTS.LOTBASED) /*WSM */
7593: -- Fixed bug2515712 (do not insert component related record)
7594: AND mmtt.transaction_action_id IN (WIP_CONSTANTS.SCRASSY_ACTION,
7595: WIP_CONSTANTS.RETASSY_ACTION,
7596: WIP_CONSTANTS.CPLASSY_ACTION)

Line 7594: AND mmtt.transaction_action_id IN (WIP_CONSTANTS.SCRASSY_ACTION,

7590: /* End Improve performance */
7591: AND mmtt.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
7592: WIP_CONSTANTS.LOTBASED) /*WSM */
7593: -- Fixed bug2515712 (do not insert component related record)
7594: AND mmtt.transaction_action_id IN (WIP_CONSTANTS.SCRASSY_ACTION,
7595: WIP_CONSTANTS.RETASSY_ACTION,
7596: WIP_CONSTANTS.CPLASSY_ACTION)
7597: AND mp.organization_id = wmti.organization_id
7598: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,

Line 7595: WIP_CONSTANTS.RETASSY_ACTION,

7591: AND mmtt.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
7592: WIP_CONSTANTS.LOTBASED) /*WSM */
7593: -- Fixed bug2515712 (do not insert component related record)
7594: AND mmtt.transaction_action_id IN (WIP_CONSTANTS.SCRASSY_ACTION,
7595: WIP_CONSTANTS.RETASSY_ACTION,
7596: WIP_CONSTANTS.CPLASSY_ACTION)
7597: AND mp.organization_id = wmti.organization_id
7598: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7599: WIP_CONSTANTS.COST_FIFO,

Line 7596: WIP_CONSTANTS.CPLASSY_ACTION)

7592: WIP_CONSTANTS.LOTBASED) /*WSM */
7593: -- Fixed bug2515712 (do not insert component related record)
7594: AND mmtt.transaction_action_id IN (WIP_CONSTANTS.SCRASSY_ACTION,
7595: WIP_CONSTANTS.RETASSY_ACTION,
7596: WIP_CONSTANTS.CPLASSY_ACTION)
7597: AND mp.organization_id = wmti.organization_id
7598: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7599: WIP_CONSTANTS.COST_FIFO,
7600: WIP_CONSTANTS.COST_LIFO)

Line 7598: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,

7594: AND mmtt.transaction_action_id IN (WIP_CONSTANTS.SCRASSY_ACTION,
7595: WIP_CONSTANTS.RETASSY_ACTION,
7596: WIP_CONSTANTS.CPLASSY_ACTION)
7597: AND mp.organization_id = wmti.organization_id
7598: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7599: WIP_CONSTANTS.COST_FIFO,
7600: WIP_CONSTANTS.COST_LIFO)
7601: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7602: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

Line 7599: WIP_CONSTANTS.COST_FIFO,

7595: WIP_CONSTANTS.RETASSY_ACTION,
7596: WIP_CONSTANTS.CPLASSY_ACTION)
7597: AND mp.organization_id = wmti.organization_id
7598: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7599: WIP_CONSTANTS.COST_FIFO,
7600: WIP_CONSTANTS.COST_LIFO)
7601: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7602: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7603: AND wmti.scrap_account_id IS NOT NULL)

Line 7600: WIP_CONSTANTS.COST_LIFO)

7596: WIP_CONSTANTS.CPLASSY_ACTION)
7597: AND mp.organization_id = wmti.organization_id
7598: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7599: WIP_CONSTANTS.COST_FIFO,
7600: WIP_CONSTANTS.COST_LIFO)
7601: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7602: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7603: AND wmti.scrap_account_id IS NOT NULL)
7604: -- Fix bug 2369642

Line 7601: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP

7597: AND mp.organization_id = wmti.organization_id
7598: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7599: WIP_CONSTANTS.COST_FIFO,
7600: WIP_CONSTANTS.COST_LIFO)
7601: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7602: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7603: AND wmti.scrap_account_id IS NOT NULL)
7604: -- Fix bug 2369642
7605: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)

Line 7602: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

7598: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7599: WIP_CONSTANTS.COST_FIFO,
7600: WIP_CONSTANTS.COST_LIFO)
7601: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7602: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7603: AND wmti.scrap_account_id IS NOT NULL)
7604: -- Fix bug 2369642
7605: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)
7606: OR

Line 7605: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)

7601: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7602: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7603: AND wmti.scrap_account_id IS NOT NULL)
7604: -- Fix bug 2369642
7605: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)
7606: OR
7607: (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
7608: WIP_CONSTANTS.RET_TXN)));
7609:

Line 7607: (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,

7603: AND wmti.scrap_account_id IS NOT NULL)
7604: -- Fix bug 2369642
7605: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)
7606: OR
7607: (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
7608: WIP_CONSTANTS.RET_TXN)));
7609:
7610: l_params wip_logger.param_tbl_t;
7611: l_returnStatus VARCHAR(1);

Line 7608: WIP_CONSTANTS.RET_TXN)));

7604: -- Fix bug 2369642
7605: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)
7606: OR
7607: (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
7608: WIP_CONSTANTS.RET_TXN)));
7609:
7610: l_params wip_logger.param_tbl_t;
7611: l_returnStatus VARCHAR(1);
7612: l_errMsg VARCHAR(240);

Line 7623: IF (l_logLevel <= wip_constants.trace_logging) THEN

7619: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
7620:
7621: BEGIN
7622: -- write parameter value to log file
7623: IF (l_logLevel <= wip_constants.trace_logging) THEN
7624: l_params(1).paramName := 'p_group_id';
7625: l_params(1).paramValue := p_group_id;
7626: l_params(2).paramName := 'p_txn_date';
7627: l_params(2).paramValue := p_txn_date;

Line 7642: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

7638: FROM wip_move_txn_interface wmti,
7639: mtl_parameters mp
7640: -- wip_parameters wp
7641: WHERE wmti.group_id = p_group_id
7642: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7643: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7644: AND wmti.organization_id = mp.organization_id
7645: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7646: WIP_CONSTANTS.COST_FIFO,

Line 7643: AND wmti.process_status = WIP_CONSTANTS.RUNNING

7639: mtl_parameters mp
7640: -- wip_parameters wp
7641: WHERE wmti.group_id = p_group_id
7642: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7643: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7644: AND wmti.organization_id = mp.organization_id
7645: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7646: WIP_CONSTANTS.COST_FIFO,
7647: WIP_CONSTANTS.COST_LIFO)

Line 7645: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,

7641: WHERE wmti.group_id = p_group_id
7642: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7643: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7644: AND wmti.organization_id = mp.organization_id
7645: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7646: WIP_CONSTANTS.COST_FIFO,
7647: WIP_CONSTANTS.COST_LIFO)
7648: --AND wp.organization_id = wmti.organization_id
7649: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP

Line 7646: WIP_CONSTANTS.COST_FIFO,

7642: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7643: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7644: AND wmti.organization_id = mp.organization_id
7645: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7646: WIP_CONSTANTS.COST_FIFO,
7647: WIP_CONSTANTS.COST_LIFO)
7648: --AND wp.organization_id = wmti.organization_id
7649: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7650: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

Line 7647: WIP_CONSTANTS.COST_LIFO)

7643: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7644: AND wmti.organization_id = mp.organization_id
7645: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7646: WIP_CONSTANTS.COST_FIFO,
7647: WIP_CONSTANTS.COST_LIFO)
7648: --AND wp.organization_id = wmti.organization_id
7649: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7650: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7651: AND wmti.scrap_account_id IS NOT NULL)

Line 7649: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP

7645: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7646: WIP_CONSTANTS.COST_FIFO,
7647: WIP_CONSTANTS.COST_LIFO)
7648: --AND wp.organization_id = wmti.organization_id
7649: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7650: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7651: AND wmti.scrap_account_id IS NOT NULL)
7652: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)
7653: OR

Line 7650: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

7646: WIP_CONSTANTS.COST_FIFO,
7647: WIP_CONSTANTS.COST_LIFO)
7648: --AND wp.organization_id = wmti.organization_id
7649: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7650: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7651: AND wmti.scrap_account_id IS NOT NULL)
7652: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)
7653: OR
7654: (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,

Line 7652: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)

7648: --AND wp.organization_id = wmti.organization_id
7649: AND (((wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7650: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7651: AND wmti.scrap_account_id IS NOT NULL)
7652: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)
7653: OR
7654: (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
7655: WIP_CONSTANTS.RET_TXN)));
7656:

Line 7654: (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,

7650: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7651: AND wmti.scrap_account_id IS NOT NULL)
7652: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)
7653: OR
7654: (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
7655: WIP_CONSTANTS.RET_TXN)));
7656:
7657: IF(l_num_snapshot = 0) THEN
7658: GOTO END_txn;

Line 7655: WIP_CONSTANTS.RET_TXN)));

7651: AND wmti.scrap_account_id IS NOT NULL)
7652: -- AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES)
7653: OR
7654: (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
7655: WIP_CONSTANTS.RET_TXN)));
7656:
7657: IF(l_num_snapshot = 0) THEN
7658: GOTO END_txn;
7659: END IF;

Line 7671: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

7667: mtl_parameters mp,
7668: mtl_material_transactions_temp mmtt2
7669: WHERE wmti.group_id = p_group_id
7670: AND TRUNC(wmti.transaction_date) = TRUNC(p_txn_date)
7671: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7672: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7673: AND mmtt2.organization_id = wmti.organization_id
7674: AND mmtt2.transaction_source_id = wmti.wip_entity_id
7675: AND mmtt2.transaction_source_type_id = TPS_INV_JOB_OR_SCHED

Line 7672: AND wmti.process_status = WIP_CONSTANTS.RUNNING

7668: mtl_material_transactions_temp mmtt2
7669: WHERE wmti.group_id = p_group_id
7670: AND TRUNC(wmti.transaction_date) = TRUNC(p_txn_date)
7671: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7672: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7673: AND mmtt2.organization_id = wmti.organization_id
7674: AND mmtt2.transaction_source_id = wmti.wip_entity_id
7675: AND mmtt2.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
7676: AND mp.organization_id = wmti.organization_id

Line 7677: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,

7673: AND mmtt2.organization_id = wmti.organization_id
7674: AND mmtt2.transaction_source_id = wmti.wip_entity_id
7675: AND mmtt2.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
7676: AND mp.organization_id = wmti.organization_id
7677: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7678: WIP_CONSTANTS.COST_FIFO,
7679: WIP_CONSTANTS.COST_LIFO)
7680: AND ( ( (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7681: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

Line 7678: WIP_CONSTANTS.COST_FIFO,

7674: AND mmtt2.transaction_source_id = wmti.wip_entity_id
7675: AND mmtt2.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
7676: AND mp.organization_id = wmti.organization_id
7677: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7678: WIP_CONSTANTS.COST_FIFO,
7679: WIP_CONSTANTS.COST_LIFO)
7680: AND ( ( (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7681: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7682: AND wmti.scrap_account_id IS NOT NULL)

Line 7679: WIP_CONSTANTS.COST_LIFO)

7675: AND mmtt2.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
7676: AND mp.organization_id = wmti.organization_id
7677: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7678: WIP_CONSTANTS.COST_FIFO,
7679: WIP_CONSTANTS.COST_LIFO)
7680: AND ( ( (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7681: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7682: AND wmti.scrap_account_id IS NOT NULL)
7683: OR (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,WIP_CONSTANTS.RET_TXN)))

Line 7680: AND ( ( (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP

7676: AND mp.organization_id = wmti.organization_id
7677: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7678: WIP_CONSTANTS.COST_FIFO,
7679: WIP_CONSTANTS.COST_LIFO)
7680: AND ( ( (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7681: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7682: AND wmti.scrap_account_id IS NOT NULL)
7683: OR (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,WIP_CONSTANTS.RET_TXN)))
7684: AND MMTT1.ROWID = MMTT2.ROWID

Line 7681: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

7677: AND mp.primary_cost_method IN (WIP_CONSTANTS.COST_AVG,
7678: WIP_CONSTANTS.COST_FIFO,
7679: WIP_CONSTANTS.COST_LIFO)
7680: AND ( ( (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7681: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7682: AND wmti.scrap_account_id IS NOT NULL)
7683: OR (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,WIP_CONSTANTS.RET_TXN)))
7684: AND MMTT1.ROWID = MMTT2.ROWID
7685: AND ROWNUM = 1

Line 7683: OR (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,WIP_CONSTANTS.RET_TXN)))

7679: WIP_CONSTANTS.COST_LIFO)
7680: AND ( ( (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
7681: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7682: AND wmti.scrap_account_id IS NOT NULL)
7683: OR (wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,WIP_CONSTANTS.RET_TXN)))
7684: AND MMTT1.ROWID = MMTT2.ROWID
7685: AND ROWNUM = 1
7686: )
7687: AND mmtt1.transaction_source_type_id = TPS_INV_JOB_OR_SCHED

Line 7725: IF (l_logLevel <= wip_constants.trace_logging) THEN

7721: <>
7722: x_returnStatus := fnd_api.g_ret_sts_success;
7723:
7724: -- write to the log file
7725: IF (l_logLevel <= wip_constants.trace_logging) THEN
7726: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.snapshot_background',
7727: p_procReturnStatus => x_returnStatus,
7728: p_msg => 'procedure complete',
7729: x_returnStatus => l_returnStatus);

Line 7736: IF (l_logLevel <= wip_constants.trace_logging) THEN

7732: EXCEPTION
7733: WHEN fnd_api.g_exc_unexpected_error THEN
7734: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7735:
7736: IF (l_logLevel <= wip_constants.trace_logging) THEN
7737: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.snapshot_background',
7738: p_procReturnStatus => x_returnStatus,
7739: p_msg => l_errMsg,
7740: x_returnStatus => l_returnStatus);

Line 7747: IF (l_logLevel <= wip_constants.trace_logging) THEN

7743: WHEN others THEN
7744: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7745: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
7746:
7747: IF (l_logLevel <= wip_constants.trace_logging) THEN
7748: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.snapshot_background',
7749: p_procReturnStatus => x_returnStatus,
7750: p_msg => l_errMsg,
7751: x_returnStatus => l_returnStatus);

Line 7769: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

7765: SELECT wmti.transaction_id txn_id
7766: FROM wip_move_txn_interface wmti
7767: WHERE wmti.group_id = p_gib.group_id
7768: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7769: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7770: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7771: ORDER BY wmti.transaction_date;
7772:
7773: l_move_rec c_move_rec%ROWTYPE;

Line 7770: AND wmti.process_status = WIP_CONSTANTS.RUNNING

7766: FROM wip_move_txn_interface wmti
7767: WHERE wmti.group_id = p_gib.group_id
7768: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7769: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7770: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7771: ORDER BY wmti.transaction_date;
7772:
7773: l_move_rec c_move_rec%ROWTYPE;
7774: l_returnStatus VARCHAR(1);

Line 7779: IF (l_logLevel <= wip_constants.trace_logging) THEN

7775: l_errMsg VARCHAR(240);
7776: l_params wip_logger.param_tbl_t;
7777: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
7778: BEGIN
7779: IF (l_logLevel <= wip_constants.trace_logging) THEN
7780: l_params(1).paramName := 'p_gib.group_id';
7781: l_params(1).paramValue := p_gib.group_id;
7782: l_params(2).paramName := 'p_gib.txn_date';
7783: l_params(2).paramValue := p_gib.txn_date;

Line 7791: IF(p_gib.seq_move = WIP_CONSTANTS.YES) THEN

7787: p_params => l_params,
7788: x_returnStatus => l_returnStatus);
7789: END IF;
7790:
7791: IF(p_gib.seq_move = WIP_CONSTANTS.YES) THEN
7792: -- update quantity_completed and take snapshot one record at a time
7793: FOR l_move_rec IN c_move_rec LOOP
7794: update_complete_qty(p_gib => p_gib,
7795: p_txn_id => l_move_rec.txn_id,

Line 7835: IF (l_logLevel <= wip_constants.trace_logging) THEN

7831: END IF;
7832:
7833: x_returnStatus := fnd_api.g_ret_sts_success;
7834: -- write to the log file
7835: IF (l_logLevel <= wip_constants.trace_logging) THEN
7836: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.update_wo_and_snapshot',
7837: p_procReturnStatus => x_returnStatus,
7838: p_msg => 'procedure complete',
7839: x_returnStatus => l_returnStatus);

Line 7844: IF (l_logLevel <= wip_constants.trace_logging) THEN

7840: END IF;
7841: EXCEPTION
7842: WHEN fnd_api.g_exc_unexpected_error THEN
7843: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7844: IF (l_logLevel <= wip_constants.trace_logging) THEN
7845: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.update_wo_and_snapshot',
7846: p_procReturnStatus => x_returnStatus,
7847: p_msg => l_errMsg,
7848: x_returnStatus => l_returnStatus);

Line 7855: IF (l_logLevel <= wip_constants.trace_logging) THEN

7851: WHEN others THEN
7852: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7853: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
7854:
7855: IF (l_logLevel <= wip_constants.trace_logging) THEN
7856: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.update_wo_and_snapshot',
7857: p_procReturnStatus => x_returnStatus,
7858: p_msg => l_errMsg,
7859: x_returnStatus => l_returnStatus);

Line 7891: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

7887: AND mmtt.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
7888: /* End Improve performance */
7889: AND wmti.group_id = p_gib.group_id
7890: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7891: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7892: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7893: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
7894: AND wmti.scrap_account_id IS NOT NULL
7895: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR

Line 7892: AND wmti.process_status = WIP_CONSTANTS.RUNNING

7888: /* End Improve performance */
7889: AND wmti.group_id = p_gib.group_id
7890: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7891: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7892: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7893: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
7894: AND wmti.scrap_account_id IS NOT NULL
7895: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
7896: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP);

Line 7893: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

7889: AND wmti.group_id = p_gib.group_id
7890: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7891: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7892: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7893: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
7894: AND wmti.scrap_account_id IS NOT NULL
7895: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
7896: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP);
7897:

Line 7895: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR

7891: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7892: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7893: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
7894: AND wmti.scrap_account_id IS NOT NULL
7895: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
7896: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP);
7897:
7898: CURSOR c_update_po IS
7899: SELECT wmti.wip_entity_id job_id,

Line 7896: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP);

7892: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7893: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
7894: AND wmti.scrap_account_id IS NOT NULL
7895: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
7896: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP);
7897:
7898: CURSOR c_update_po IS
7899: SELECT wmti.wip_entity_id job_id,
7900: DECODE(wmti.entity_type,

Line 7901: WIP_CONSTANTS.REPETITIVE, wmta.repetitive_schedule_id,

7897:
7898: CURSOR c_update_po IS
7899: SELECT wmti.wip_entity_id job_id,
7900: DECODE(wmti.entity_type,
7901: WIP_CONSTANTS.REPETITIVE, wmta.repetitive_schedule_id,
7902: NULL) rep_id,
7903: wmti.organization_id org_id,
7904: DECODE (wmti.fm_intraoperation_step_type,
7905: WIP_CONSTANTS.SCRAP,DECODE(wmti.entity_type,

Line 7905: WIP_CONSTANTS.SCRAP,DECODE(wmti.entity_type,

7901: WIP_CONSTANTS.REPETITIVE, wmta.repetitive_schedule_id,
7902: NULL) rep_id,
7903: wmti.organization_id org_id,
7904: DECODE (wmti.fm_intraoperation_step_type,
7905: WIP_CONSTANTS.SCRAP,DECODE(wmti.entity_type,
7906: WIP_CONSTANTS.REPETITIVE,wmta.primary_quantity,
7907: wmti.primary_quantity),
7908: -1 * DECODE(wmti.entity_type,
7909: WIP_CONSTANTS.REPETITIVE, wmta.primary_quantity,

Line 7906: WIP_CONSTANTS.REPETITIVE,wmta.primary_quantity,

7902: NULL) rep_id,
7903: wmti.organization_id org_id,
7904: DECODE (wmti.fm_intraoperation_step_type,
7905: WIP_CONSTANTS.SCRAP,DECODE(wmti.entity_type,
7906: WIP_CONSTANTS.REPETITIVE,wmta.primary_quantity,
7907: wmti.primary_quantity),
7908: -1 * DECODE(wmti.entity_type,
7909: WIP_CONSTANTS.REPETITIVE, wmta.primary_quantity,
7910: wmti.primary_quantity)) changed_qty,

Line 7909: WIP_CONSTANTS.REPETITIVE, wmta.primary_quantity,

7905: WIP_CONSTANTS.SCRAP,DECODE(wmti.entity_type,
7906: WIP_CONSTANTS.REPETITIVE,wmta.primary_quantity,
7907: wmti.primary_quantity),
7908: -1 * DECODE(wmti.entity_type,
7909: WIP_CONSTANTS.REPETITIVE, wmta.primary_quantity,
7910: wmti.primary_quantity)) changed_qty,
7911: GREATEST(wmti.fm_operation_seq_num, wmti.to_operation_seq_num) fm_op
7912: FROM wip_move_txn_interface wmti,
7913: wip_move_txn_allocations wmta,

Line 7919: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

7915: WHERE wmti.transaction_id = wmta.transaction_id (+)
7916: AND wmti.organization_id = wmta.organization_id (+)
7917: AND wmti.group_id = p_gib.group_id
7918: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7919: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7920: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7921: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
7922: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7923: AND NOT(wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP AND

Line 7920: AND wmti.process_status = WIP_CONSTANTS.RUNNING

7916: AND wmti.organization_id = wmta.organization_id (+)
7917: AND wmti.group_id = p_gib.group_id
7918: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7919: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7920: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7921: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
7922: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7923: AND NOT(wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP AND
7924: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

Line 7921: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR

7917: AND wmti.group_id = p_gib.group_id
7918: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7919: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7920: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7921: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
7922: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7923: AND NOT(wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP AND
7924: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7925: AND mp.organization_id = wmti.organization_id

Line 7922: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

7918: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
7919: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7920: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7921: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
7922: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7923: AND NOT(wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP AND
7924: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7925: AND mp.organization_id = wmti.organization_id
7926: AND mp.propagate_job_change_to_po = WIP_CONSTANTS.YES;

Line 7923: AND NOT(wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP AND

7919: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
7920: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7921: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
7922: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7923: AND NOT(wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP AND
7924: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7925: AND mp.organization_id = wmti.organization_id
7926: AND mp.propagate_job_change_to_po = WIP_CONSTANTS.YES;
7927:

Line 7924: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

7920: AND wmti.process_status = WIP_CONSTANTS.RUNNING
7921: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
7922: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7923: AND NOT(wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP AND
7924: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7925: AND mp.organization_id = wmti.organization_id
7926: AND mp.propagate_job_change_to_po = WIP_CONSTANTS.YES;
7927:
7928:

Line 7926: AND mp.propagate_job_change_to_po = WIP_CONSTANTS.YES;

7922: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7923: AND NOT(wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP AND
7924: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
7925: AND mp.organization_id = wmti.organization_id
7926: AND mp.propagate_job_change_to_po = WIP_CONSTANTS.YES;
7927:
7928:
7929: l_params wip_logger.param_tbl_t;
7930: l_mtl_alloc c_mtl_alloc%ROWTYPE;

Line 7948: IF (l_logLevel <= wip_constants.trace_logging) THEN

7944: BEGIN
7945: l_move := p_gib.move_profile;
7946:
7947: -- write parameter value to log file
7948: IF (l_logLevel <= wip_constants.trace_logging) THEN
7949: l_params(1).paramName := 'p_group_id';
7950: l_params(1).paramValue := p_gib.group_id;
7951: l_params(2).paramName := 'p_txn_date';
7952: l_params(2).paramValue := p_gib.txn_date;

Line 7995: IF(l_move.scrapTxn <> WIP_CONSTANTS.YES AND

7991: x_returnStatus => l_returnStatus);
7992: END IF;
7993:
7994: -- Any scrap transaction?
7995: IF(l_move.scrapTxn <> WIP_CONSTANTS.YES AND
7996: l_move.scrapTxn <> WIP_CONSTANTS.NO) THEN -- Indeterminate
7997:
7998: SELECT COUNT(1)
7999: INTO l_scrap_flag

Line 7996: l_move.scrapTxn <> WIP_CONSTANTS.NO) THEN -- Indeterminate

7992: END IF;
7993:
7994: -- Any scrap transaction?
7995: IF(l_move.scrapTxn <> WIP_CONSTANTS.YES AND
7996: l_move.scrapTxn <> WIP_CONSTANTS.NO) THEN -- Indeterminate
7997:
7998: SELECT COUNT(1)
7999: INTO l_scrap_flag
8000: FROM wip_move_txn_interface

Line 8003: AND process_phase = WIP_CONSTANTS.MOVE_PROC

7999: INTO l_scrap_flag
8000: FROM wip_move_txn_interface
8001: WHERE group_id = p_gib.group_id
8002: AND TRUNC(transaction_date) = TRUNC(p_gib.txn_date)
8003: AND process_phase = WIP_CONSTANTS.MOVE_PROC
8004: AND process_status = WIP_CONSTANTS.RUNNING
8005: AND (fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
8006: OR to_intraoperation_step_type = WIP_CONSTANTS.SCRAP);
8007:

Line 8004: AND process_status = WIP_CONSTANTS.RUNNING

8000: FROM wip_move_txn_interface
8001: WHERE group_id = p_gib.group_id
8002: AND TRUNC(transaction_date) = TRUNC(p_gib.txn_date)
8003: AND process_phase = WIP_CONSTANTS.MOVE_PROC
8004: AND process_status = WIP_CONSTANTS.RUNNING
8005: AND (fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
8006: OR to_intraoperation_step_type = WIP_CONSTANTS.SCRAP);
8007:
8008: IF (l_scrap_flag > 0) THEN

Line 8005: AND (fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP

8001: WHERE group_id = p_gib.group_id
8002: AND TRUNC(transaction_date) = TRUNC(p_gib.txn_date)
8003: AND process_phase = WIP_CONSTANTS.MOVE_PROC
8004: AND process_status = WIP_CONSTANTS.RUNNING
8005: AND (fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
8006: OR to_intraoperation_step_type = WIP_CONSTANTS.SCRAP);
8007:
8008: IF (l_scrap_flag > 0) THEN
8009: l_move.scrapTxn := WIP_CONSTANTS.YES;

Line 8006: OR to_intraoperation_step_type = WIP_CONSTANTS.SCRAP);

8002: AND TRUNC(transaction_date) = TRUNC(p_gib.txn_date)
8003: AND process_phase = WIP_CONSTANTS.MOVE_PROC
8004: AND process_status = WIP_CONSTANTS.RUNNING
8005: AND (fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
8006: OR to_intraoperation_step_type = WIP_CONSTANTS.SCRAP);
8007:
8008: IF (l_scrap_flag > 0) THEN
8009: l_move.scrapTxn := WIP_CONSTANTS.YES;
8010: ELSE

Line 8009: l_move.scrapTxn := WIP_CONSTANTS.YES;

8005: AND (fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
8006: OR to_intraoperation_step_type = WIP_CONSTANTS.SCRAP);
8007:
8008: IF (l_scrap_flag > 0) THEN
8009: l_move.scrapTxn := WIP_CONSTANTS.YES;
8010: ELSE
8011: l_move.scrapTxn := WIP_CONSTANTS.NO;
8012: END IF;
8013:

Line 8011: l_move.scrapTxn := WIP_CONSTANTS.NO;

8007:
8008: IF (l_scrap_flag > 0) THEN
8009: l_move.scrapTxn := WIP_CONSTANTS.YES;
8010: ELSE
8011: l_move.scrapTxn := WIP_CONSTANTS.NO;
8012: END IF;
8013:
8014: END IF; -- scrap txn indeterminate
8015:

Line 8017: IF(l_move.scrapTxn = WIP_CONSTANTS.YES) THEN

8013:
8014: END IF; -- scrap txn indeterminate
8015:
8016: -- Scrap transaction
8017: IF(l_move.scrapTxn = WIP_CONSTANTS.YES) THEN
8018: /*------------------------------------------------------------+
8019: | Update scrap quantity for discrete jobs
8020: +------------------------------------------------------------*/
8021: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN

Line 8021: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN

8017: IF(l_move.scrapTxn = WIP_CONSTANTS.YES) THEN
8018: /*------------------------------------------------------------+
8019: | Update scrap quantity for discrete jobs
8020: +------------------------------------------------------------*/
8021: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN
8022:
8023: /** 3050846 **/
8024: wip_so_reservations.scrap_txn_relieve_rsv ( p_group_id => p_gib.group_id,
8025: x_return_status => l_returnstatus,

Line 8062: WIP_CONSTANTS.SCRAP, wmti.primary_quantity,0)

8058: program_update_date
8059: ) =
8060: (SELECT wdj.quantity_scrapped -- quantity_scrapped
8061: + SUM(DECODE(wmti.to_intraoperation_step_type,
8062: WIP_CONSTANTS.SCRAP, wmti.primary_quantity,0)
8063: - DECODE(wmti.fm_intraoperation_step_type,
8064: WIP_CONSTANTS.SCRAP,wmti.primary_quantity,0)),
8065: MAX(wmti.last_updated_by),
8066: SYSDATE, -- last_update_date

Line 8064: WIP_CONSTANTS.SCRAP,wmti.primary_quantity,0)),

8060: (SELECT wdj.quantity_scrapped -- quantity_scrapped
8061: + SUM(DECODE(wmti.to_intraoperation_step_type,
8062: WIP_CONSTANTS.SCRAP, wmti.primary_quantity,0)
8063: - DECODE(wmti.fm_intraoperation_step_type,
8064: WIP_CONSTANTS.SCRAP,wmti.primary_quantity,0)),
8065: MAX(wmti.last_updated_by),
8066: SYSDATE, -- last_update_date
8067: DECODE(p_gib.login_id,-1,NULL,p_gib.login_id),
8068: DECODE(p_gib.request_id,-1,NULL,p_gib.request_id),

Line 8077: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

8073: FROM wip_discrete_jobs wdj1, wip_move_txn_interface wmti
8074: WHERE wdj1.rowid = wdj.rowid
8075: AND wmti.group_id = p_gib.group_id
8076: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8077: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8078: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8079: AND wmti.organization_id = wdj1.organization_id
8080: AND wmti.wip_entity_id = wdj1.wip_entity_id
8081: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE

Line 8078: AND wmti.process_status = WIP_CONSTANTS.RUNNING

8074: WHERE wdj1.rowid = wdj.rowid
8075: AND wmti.group_id = p_gib.group_id
8076: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8077: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8078: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8079: AND wmti.organization_id = wdj1.organization_id
8080: AND wmti.wip_entity_id = wdj1.wip_entity_id
8081: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8082: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM */

Line 8081: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE

8077: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8078: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8079: AND wmti.organization_id = wdj1.organization_id
8080: AND wmti.wip_entity_id = wdj1.wip_entity_id
8081: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8082: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM */
8083: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
8084: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
8085: )

Line 8082: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM */

8078: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8079: AND wmti.organization_id = wdj1.organization_id
8080: AND wmti.wip_entity_id = wdj1.wip_entity_id
8081: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8082: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM */
8083: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
8084: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
8085: )
8086: WHERE wdj.rowid IN

Line 8083: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP

8079: AND wmti.organization_id = wdj1.organization_id
8080: AND wmti.wip_entity_id = wdj1.wip_entity_id
8081: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8082: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM */
8083: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
8084: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
8085: )
8086: WHERE wdj.rowid IN
8087: (SELECT wdj2.rowid

Line 8084: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

8080: AND wmti.wip_entity_id = wdj1.wip_entity_id
8081: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8082: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM */
8083: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
8084: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
8085: )
8086: WHERE wdj.rowid IN
8087: (SELECT wdj2.rowid
8088: FROM wip_discrete_jobs wdj2,

Line 8092: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

8088: FROM wip_discrete_jobs wdj2,
8089: wip_move_txn_interface wmti
8090: WHERE wmti.group_id = p_gib.group_id
8091: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8092: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8093: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8094: AND wmti.organization_id = wdj2.organization_id
8095: AND wmti.wip_entity_id = wdj2.wip_entity_id
8096: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE

Line 8093: AND wmti.process_status = WIP_CONSTANTS.RUNNING

8089: wip_move_txn_interface wmti
8090: WHERE wmti.group_id = p_gib.group_id
8091: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8092: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8093: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8094: AND wmti.organization_id = wdj2.organization_id
8095: AND wmti.wip_entity_id = wdj2.wip_entity_id
8096: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8097: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM*/

Line 8096: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE

8092: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8093: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8094: AND wmti.organization_id = wdj2.organization_id
8095: AND wmti.wip_entity_id = wdj2.wip_entity_id
8096: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8097: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM*/
8098: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
8099: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
8100: );

Line 8097: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM*/

8093: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8094: AND wmti.organization_id = wdj2.organization_id
8095: AND wmti.wip_entity_id = wdj2.wip_entity_id
8096: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8097: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM*/
8098: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
8099: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
8100: );
8101: /* Now we will also update the column status_type to "Complete" IF

Line 8098: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP

8094: AND wmti.organization_id = wdj2.organization_id
8095: AND wmti.wip_entity_id = wdj2.wip_entity_id
8096: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8097: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM*/
8098: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
8099: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
8100: );
8101: /* Now we will also update the column status_type to "Complete" IF
8102: these scrap completions will finish off the remaining quantity to be

Line 8099: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

8095: AND wmti.wip_entity_id = wdj2.wip_entity_id
8096: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8097: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM*/
8098: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
8099: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
8100: );
8101: /* Now we will also update the column status_type to "Complete" IF
8102: these scrap completions will finish off the remaining quantity to be
8103: completed, or update it to "Released" IF moving these assemblies back

Line 8112: (SELECT WIP_CONSTANTS.COMP_CHRG, -- status_type

8108: UPDATE wip_discrete_jobs wdj
8109: SET (status_type,
8110: date_completed
8111: ) =
8112: (SELECT WIP_CONSTANTS.COMP_CHRG, -- status_type
8113: SYSDATE -- date_completed
8114: FROM DUAL)
8115: WHERE wdj.rowid IN
8116: (SELECT wdj2.rowid

Line 8121: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

8117: FROM wip_discrete_jobs wdj2,
8118: wip_move_txn_interface wmti
8119: WHERE wmti.group_id = p_gib.group_id
8120: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8121: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8122: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8123: AND wmti.organization_id = wdj2.organization_id
8124: AND wmti.wip_entity_id = wdj2.wip_entity_id
8125: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE

Line 8122: AND wmti.process_status = WIP_CONSTANTS.RUNNING

8118: wip_move_txn_interface wmti
8119: WHERE wmti.group_id = p_gib.group_id
8120: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8121: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8122: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8123: AND wmti.organization_id = wdj2.organization_id
8124: AND wmti.wip_entity_id = wdj2.wip_entity_id
8125: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8126: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM */

Line 8125: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE

8121: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8122: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8123: AND wmti.organization_id = wdj2.organization_id
8124: AND wmti.wip_entity_id = wdj2.wip_entity_id
8125: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8126: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM */
8127: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
8128: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
8129: AND (wdj2.start_quantity - wdj2.quantity_completed -

Line 8126: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM */

8122: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8123: AND wmti.organization_id = wdj2.organization_id
8124: AND wmti.wip_entity_id = wdj2.wip_entity_id
8125: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8126: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM */
8127: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
8128: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
8129: AND (wdj2.start_quantity - wdj2.quantity_completed -
8130: wdj2.quantity_scrapped) <= 0

Line 8127: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP

8123: AND wmti.organization_id = wdj2.organization_id
8124: AND wmti.wip_entity_id = wdj2.wip_entity_id
8125: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8126: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM */
8127: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
8128: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
8129: AND (wdj2.start_quantity - wdj2.quantity_completed -
8130: wdj2.quantity_scrapped) <= 0
8131: -- Fix bug 13826369

Line 8128: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

8124: AND wmti.wip_entity_id = wdj2.wip_entity_id
8125: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8126: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM */
8127: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
8128: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
8129: AND (wdj2.start_quantity - wdj2.quantity_completed -
8130: wdj2.quantity_scrapped) <= 0
8131: -- Fix bug 13826369
8132: AND (select sum(quantity_in_queue)

Line 8141: SET status_type = WIP_CONSTANTS.RELEASED,

8137: where wip_entity_id = wdj2.wip_entity_id
8138: and organization_id = wdj2.organization_id) = 0);
8139:
8140: UPDATE wip_discrete_jobs wdj
8141: SET status_type = WIP_CONSTANTS.RELEASED,
8142: /*bug 3933240 -> nullify date_completed while changing the status of job to
8143: released */
8144: date_completed = null
8145: WHERE wdj.rowid IN

Line 8151: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

8147: FROM wip_discrete_jobs wdj2,
8148: wip_move_txn_interface wmti
8149: WHERE wmti.group_id = p_gib.group_id
8150: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8151: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8152: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8153: AND wmti.organization_id = wdj2.organization_id
8154: AND wmti.wip_entity_id = wdj2.wip_entity_id
8155: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE

Line 8152: AND wmti.process_status = WIP_CONSTANTS.RUNNING

8148: wip_move_txn_interface wmti
8149: WHERE wmti.group_id = p_gib.group_id
8150: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8151: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8152: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8153: AND wmti.organization_id = wdj2.organization_id
8154: AND wmti.wip_entity_id = wdj2.wip_entity_id
8155: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8156: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM*/

Line 8155: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE

8151: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8152: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8153: AND wmti.organization_id = wdj2.organization_id
8154: AND wmti.wip_entity_id = wdj2.wip_entity_id
8155: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8156: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM*/
8157: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
8158: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
8159: AND (wdj2.start_quantity - wdj2.quantity_completed -

Line 8156: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM*/

8152: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8153: AND wmti.organization_id = wdj2.organization_id
8154: AND wmti.wip_entity_id = wdj2.wip_entity_id
8155: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8156: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM*/
8157: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
8158: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
8159: AND (wdj2.start_quantity - wdj2.quantity_completed -
8160: wdj2.quantity_scrapped) > 0);

Line 8157: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP

8153: AND wmti.organization_id = wdj2.organization_id
8154: AND wmti.wip_entity_id = wdj2.wip_entity_id
8155: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8156: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM*/
8157: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
8158: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
8159: AND (wdj2.start_quantity - wdj2.quantity_completed -
8160: wdj2.quantity_scrapped) > 0);
8161:

Line 8158: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

8154: AND wmti.wip_entity_id = wdj2.wip_entity_id
8155: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8156: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/* WSM*/
8157: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
8158: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
8159: AND (wdj2.start_quantity - wdj2.quantity_completed -
8160: wdj2.quantity_scrapped) > 0);
8161:
8162: -- IF debug message level = 2, write statement below to log file

Line 8163: IF (l_logLevel <= wip_constants.full_logging) THEN

8159: AND (wdj2.start_quantity - wdj2.quantity_completed -
8160: wdj2.quantity_scrapped) > 0);
8161:
8162: -- IF debug message level = 2, write statement below to log file
8163: IF (l_logLevel <= wip_constants.full_logging) THEN
8164: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');
8165: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
8166: fnd_message.set_token('ENTITY2', 'WIP_DISCRETE_JOBS');
8167: l_msg := fnd_message.get;

Line 8176: IF(l_move.scheTxn = WIP_CONSTANTS.YES) THEN

8172:
8173: /*------------------------------------------------------------+
8174: | Update scrap quantity for repetitive schedule
8175: +------------------------------------------------------------*/
8176: IF(l_move.scheTxn = WIP_CONSTANTS.YES) THEN
8177: /*------------------------------------------------------------------+
8178: | For repetitive schedules, we do not set the date_closed, since this
8179: | is only done manually, via the form. It is not set automatically for
8180: | regular completions, so we will not set it here. rkaiser

Line 8188: 1, WIP_CONSTANTS.RELEASED,

8184: (SELECT DECODE(SIGN(
8185: (wrs.daily_production_rate * wrs.processing_work_days -
8186: wrs.quantity_completed) -
8187: SUM(NVL(wo.quantity_scrapped, 0))),
8188: 1, WIP_CONSTANTS.RELEASED,
8189: WIP_CONSTANTS.COMP_CHRG)
8190: FROM wip_operations wo
8191: WHERE wo.organization_id = wrs.organization_id
8192: AND wo.repetitive_schedule_id = wrs.repetitive_schedule_id)

Line 8189: WIP_CONSTANTS.COMP_CHRG)

8185: (wrs.daily_production_rate * wrs.processing_work_days -
8186: wrs.quantity_completed) -
8187: SUM(NVL(wo.quantity_scrapped, 0))),
8188: 1, WIP_CONSTANTS.RELEASED,
8189: WIP_CONSTANTS.COMP_CHRG)
8190: FROM wip_operations wo
8191: WHERE wo.organization_id = wrs.organization_id
8192: AND wo.repetitive_schedule_id = wrs.repetitive_schedule_id)
8193: WHERE wrs.status_type IN (WIP_CONSTANTS.RELEASED,

Line 8193: WHERE wrs.status_type IN (WIP_CONSTANTS.RELEASED,

8189: WIP_CONSTANTS.COMP_CHRG)
8190: FROM wip_operations wo
8191: WHERE wo.organization_id = wrs.organization_id
8192: AND wo.repetitive_schedule_id = wrs.repetitive_schedule_id)
8193: WHERE wrs.status_type IN (WIP_CONSTANTS.RELEASED,
8194: WIP_CONSTANTS.COMP_CHRG)
8195: AND wrs.rowid IN
8196: (SELECT wrs2.rowid
8197: FROM wip_repetitive_schedules wrs2,

Line 8194: WIP_CONSTANTS.COMP_CHRG)

8190: FROM wip_operations wo
8191: WHERE wo.organization_id = wrs.organization_id
8192: AND wo.repetitive_schedule_id = wrs.repetitive_schedule_id)
8193: WHERE wrs.status_type IN (WIP_CONSTANTS.RELEASED,
8194: WIP_CONSTANTS.COMP_CHRG)
8195: AND wrs.rowid IN
8196: (SELECT wrs2.rowid
8197: FROM wip_repetitive_schedules wrs2,
8198: wip_move_txn_interface wmti

Line 8201: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

8197: FROM wip_repetitive_schedules wrs2,
8198: wip_move_txn_interface wmti
8199: WHERE wmti.group_id = p_gib.group_id
8200: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8201: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8202: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8203: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
8204: AND wrs2.wip_entity_id = wmti.wip_entity_id
8205: AND wrs2.organization_id = wmti.organization_id

Line 8202: AND wmti.process_status = WIP_CONSTANTS.RUNNING

8198: wip_move_txn_interface wmti
8199: WHERE wmti.group_id = p_gib.group_id
8200: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8201: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8202: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8203: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
8204: AND wrs2.wip_entity_id = wmti.wip_entity_id
8205: AND wrs2.organization_id = wmti.organization_id
8206: AND wrs2.line_id = wmti.line_id

Line 8203: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

8199: WHERE wmti.group_id = p_gib.group_id
8200: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8201: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8202: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8203: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
8204: AND wrs2.wip_entity_id = wmti.wip_entity_id
8205: AND wrs2.organization_id = wmti.organization_id
8206: AND wrs2.line_id = wmti.line_id
8207: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP

Line 8207: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP

8203: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
8204: AND wrs2.wip_entity_id = wmti.wip_entity_id
8205: AND wrs2.organization_id = wmti.organization_id
8206: AND wrs2.line_id = wmti.line_id
8207: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
8208: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP));
8209:
8210: -- IF debug message level = 2, write statement below to log file
8211: IF (l_logLevel <= wip_constants.full_logging) THEN

Line 8208: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP));

8204: AND wrs2.wip_entity_id = wmti.wip_entity_id
8205: AND wrs2.organization_id = wmti.organization_id
8206: AND wrs2.line_id = wmti.line_id
8207: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
8208: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP));
8209:
8210: -- IF debug message level = 2, write statement below to log file
8211: IF (l_logLevel <= wip_constants.full_logging) THEN
8212: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');

Line 8211: IF (l_logLevel <= wip_constants.full_logging) THEN

8207: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP
8208: OR wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP));
8209:
8210: -- IF debug message level = 2, write statement below to log file
8211: IF (l_logLevel <= wip_constants.full_logging) THEN
8212: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');
8213: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
8214: fnd_message.set_token('ENTITY2', 'WIP_REPETITIVE_SCHEDULES');
8215: l_msg := fnd_message.get;

Line 8230: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE AND

8226: FROM DUAL;
8227: END IF;
8228:
8229: -- initialize transaction mode
8230: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE AND
8231: p_gib.mtl_mode = WIP_CONSTANTS.ONLINE) THEN
8232: l_transaction_mode := WIP_CONSTANTS.ONLINE;
8233: ELSE
8234: l_transaction_mode := WIP_CONSTANTS.BACKGROUND;

Line 8231: p_gib.mtl_mode = WIP_CONSTANTS.ONLINE) THEN

8227: END IF;
8228:
8229: -- initialize transaction mode
8230: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE AND
8231: p_gib.mtl_mode = WIP_CONSTANTS.ONLINE) THEN
8232: l_transaction_mode := WIP_CONSTANTS.ONLINE;
8233: ELSE
8234: l_transaction_mode := WIP_CONSTANTS.BACKGROUND;
8235: END IF;

Line 8232: l_transaction_mode := WIP_CONSTANTS.ONLINE;

8228:
8229: -- initialize transaction mode
8230: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE AND
8231: p_gib.mtl_mode = WIP_CONSTANTS.ONLINE) THEN
8232: l_transaction_mode := WIP_CONSTANTS.ONLINE;
8233: ELSE
8234: l_transaction_mode := WIP_CONSTANTS.BACKGROUND;
8235: END IF;
8236:

Line 8234: l_transaction_mode := WIP_CONSTANTS.BACKGROUND;

8230: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE AND
8231: p_gib.mtl_mode = WIP_CONSTANTS.ONLINE) THEN
8232: l_transaction_mode := WIP_CONSTANTS.ONLINE;
8233: ELSE
8234: l_transaction_mode := WIP_CONSTANTS.BACKGROUND;
8235: END IF;
8236:
8237: FOR l_step IN WIP_CONSTANTS.QUEUE..WIP_CONSTANTS.RUN LOOP
8238:

Line 8237: FOR l_step IN WIP_CONSTANTS.QUEUE..WIP_CONSTANTS.RUN LOOP

8233: ELSE
8234: l_transaction_mode := WIP_CONSTANTS.BACKGROUND;
8235: END IF;
8236:
8237: FOR l_step IN WIP_CONSTANTS.QUEUE..WIP_CONSTANTS.RUN LOOP
8238:
8239: -- Discrete and Lotbased jobs
8240: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN
8241: INSERT INTO mtl_material_transactions_temp

Line 8240: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN

8236:
8237: FOR l_step IN WIP_CONSTANTS.QUEUE..WIP_CONSTANTS.RUN LOOP
8238:
8239: -- Discrete and Lotbased jobs
8240: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN
8241: INSERT INTO mtl_material_transactions_temp
8242: (last_updated_by,
8243: last_update_date,
8244: last_update_login,

Line 8304: WIP_CONSTANTS.REV, NVL(wdj.bom_revision,

8300: l_transaction_mode, -- transaction_mode
8301: wmti.primary_item_id, -- inventory_item_id
8302: -- Fixed bug 2387630
8303: DECODE(msi.revision_qty_control_code,
8304: WIP_CONSTANTS.REV, NVL(wdj.bom_revision,
8305: bom_revisions.get_item_revision_fn
8306: ('EXCLUDE_OPEN_HOLD', -- eco_status
8307: 'ALL', -- examine_type
8308: wmti.organization_id, -- org_id

Line 8315: WIP_CONSTANTS.QUEUE, -1 * wmti.transaction_quantity,

8311: )),
8312: NULL), -- revision
8313: wmti.organization_id,
8314: DECODE(l_step, -- transaction_quantity
8315: WIP_CONSTANTS.QUEUE, -1 * wmti.transaction_quantity,
8316: wmti.transaction_quantity),
8317: wmti.transaction_uom, -- transaction_uom
8318: DECODE(l_step, -- primary_quantity
8319: WIP_CONSTANTS.QUEUE, -1 * wmti.primary_quantity,

Line 8319: WIP_CONSTANTS.QUEUE, -1 * wmti.primary_quantity,

8315: WIP_CONSTANTS.QUEUE, -1 * wmti.transaction_quantity,
8316: wmti.transaction_quantity),
8317: wmti.transaction_uom, -- transaction_uom
8318: DECODE(l_step, -- primary_quantity
8319: WIP_CONSTANTS.QUEUE, -1 * wmti.primary_quantity,
8320: wmti.primary_quantity),
8321: TPS_INV_JOB_OR_SCHED, -- transaction_source_type_id
8322: wmti.wip_entity_id, -- transaction_source_id
8323: WIP_CONSTANTS.SCRASSY_ACTION, -- transaction_action_id

Line 8323: WIP_CONSTANTS.SCRASSY_ACTION, -- transaction_action_id

8319: WIP_CONSTANTS.QUEUE, -1 * wmti.primary_quantity,
8320: wmti.primary_quantity),
8321: TPS_INV_JOB_OR_SCHED, -- transaction_source_type_id
8322: wmti.wip_entity_id, -- transaction_source_id
8323: WIP_CONSTANTS.SCRASSY_ACTION, -- transaction_action_id
8324: WIP_CONSTANTS.SCRASSY_TYPE, -- transaction_type_id
8325: wmti.transaction_date,
8326: wmti.acct_period_id,
8327: wmti.scrap_account_id, -- distribution_account_id

Line 8324: WIP_CONSTANTS.SCRASSY_TYPE, -- transaction_type_id

8320: wmti.primary_quantity),
8321: TPS_INV_JOB_OR_SCHED, -- transaction_source_type_id
8322: wmti.wip_entity_id, -- transaction_source_id
8323: WIP_CONSTANTS.SCRASSY_ACTION, -- transaction_action_id
8324: WIP_CONSTANTS.SCRASSY_TYPE, -- transaction_type_id
8325: wmti.transaction_date,
8326: wmti.acct_period_id,
8327: wmti.scrap_account_id, -- distribution_account_id
8328: NULL, -- transaction_cost

Line 8335: WIP_CONSTANTS.QUEUE, wmti.fm_operation_seq_num,

8331: wmti.entity_type, -- wip_entity_type
8332: NULL, -- schedule_id
8333: wmti.line_id, -- repetitive_line_id
8334: DECODE(l_step, -- operation_seq_num
8335: WIP_CONSTANTS.QUEUE, wmti.fm_operation_seq_num,
8336: wmti.to_operation_seq_num),
8337: wmti.transaction_id, -- move_transaction_id
8338: 'Y', -- process_flag
8339: 'N', -- lock_flag

Line 8345: WIP_CONSTANTS.ASSY_BATCH_SEQ -- transaction_batch_seq

8341: wdj.project_id,
8342: wdj.task_id,
8343: p_gib.mtl_header_id, -- transaction_batch_id
8344: wmti.qa_collection_id, /*Added for Bug 7136450 (FP of 7126588 )*/
8345: WIP_CONSTANTS.ASSY_BATCH_SEQ -- transaction_batch_seq
8346: FROM wip_move_txn_interface wmti,
8347: mtl_system_items msi,
8348: wip_discrete_jobs wdj
8349: WHERE wmti.group_id = p_gib.group_id

Line 8351: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

8347: mtl_system_items msi,
8348: wip_discrete_jobs wdj
8349: WHERE wmti.group_id = p_gib.group_id
8350: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8351: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8352: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8353: AND wmti.scrap_account_id IS NOT NULL
8354: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8355: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM*/

Line 8352: AND wmti.process_status = WIP_CONSTANTS.RUNNING

8348: wip_discrete_jobs wdj
8349: WHERE wmti.group_id = p_gib.group_id
8350: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8351: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8352: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8353: AND wmti.scrap_account_id IS NOT NULL
8354: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8355: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM*/
8356: AND wdj.wip_entity_id = wmti.wip_entity_id

Line 8354: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE

8350: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8351: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8352: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8353: AND wmti.scrap_account_id IS NOT NULL
8354: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8355: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM*/
8356: AND wdj.wip_entity_id = wmti.wip_entity_id
8357: AND wdj.organization_id = wmti.organization_id
8358: AND DECODE(l_step,

Line 8355: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM*/

8351: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8352: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8353: AND wmti.scrap_account_id IS NOT NULL
8354: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8355: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM*/
8356: AND wdj.wip_entity_id = wmti.wip_entity_id
8357: AND wdj.organization_id = wmti.organization_id
8358: AND DECODE(l_step,
8359: WIP_CONSTANTS.QUEUE, wmti.fm_intraoperation_step_type,

Line 8359: WIP_CONSTANTS.QUEUE, wmti.fm_intraoperation_step_type,

8355: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM*/
8356: AND wdj.wip_entity_id = wmti.wip_entity_id
8357: AND wdj.organization_id = wmti.organization_id
8358: AND DECODE(l_step,
8359: WIP_CONSTANTS.QUEUE, wmti.fm_intraoperation_step_type,
8360: wmti.to_intraoperation_step_type) = WIP_CONSTANTS.SCRAP
8361: AND msi.organization_id = wmti.organization_id
8362: AND msi.inventory_item_id = wmti.primary_item_id;
8363:

Line 8360: wmti.to_intraoperation_step_type) = WIP_CONSTANTS.SCRAP

8356: AND wdj.wip_entity_id = wmti.wip_entity_id
8357: AND wdj.organization_id = wmti.organization_id
8358: AND DECODE(l_step,
8359: WIP_CONSTANTS.QUEUE, wmti.fm_intraoperation_step_type,
8360: wmti.to_intraoperation_step_type) = WIP_CONSTANTS.SCRAP
8361: AND msi.organization_id = wmti.organization_id
8362: AND msi.inventory_item_id = wmti.primary_item_id;
8363:
8364: -- IF debug message level = 2, write statement below to log file

Line 8365: IF (l_logLevel <= wip_constants.full_logging) THEN

8361: AND msi.organization_id = wmti.organization_id
8362: AND msi.inventory_item_id = wmti.primary_item_id;
8363:
8364: -- IF debug message level = 2, write statement below to log file
8365: IF (l_logLevel <= wip_constants.full_logging) THEN
8366: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
8367: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
8368: fnd_message.set_token('ENTITY2', 'MTL_MATERIAL_TRANSACTIONS_TEMP');
8369: l_msg := fnd_message.get;

Line 8377: IF(l_move.scheTxn = WIP_CONSTANTS.YES) THEN

8373:
8374: END IF; -- discrete jobs
8375:
8376: -- Repetitive schedules
8377: IF(l_move.scheTxn = WIP_CONSTANTS.YES) THEN
8378:
8379: INSERT INTO mtl_material_transactions_temp
8380: (material_allocation_temp_id,
8381: last_updated_by,

Line 8441: WIP_CONSTANTS.REV, NVL(wrs.bom_revision,

8437: l_transaction_mode, -- transaction_mode
8438: wmti.primary_item_id, -- inventory_item_id
8439: -- Fixed bug 2387630
8440: DECODE(msi.revision_qty_control_code, -- revision
8441: WIP_CONSTANTS.REV, NVL(wrs.bom_revision,
8442: bom_revisions.get_item_revision_fn
8443: ('EXCLUDE_OPEN_HOLD', -- eco_status
8444: 'ALL', -- examine_type
8445: wmti.organization_id, -- org_id

Line 8452: WIP_CONSTANTS.QUEUE, -1 * wmti.transaction_quantity,

8448: )),
8449: NULL),
8450: wmti.organization_id,
8451: DECODE(l_step, -- transaction_quantity
8452: WIP_CONSTANTS.QUEUE, -1 * wmti.transaction_quantity,
8453: wmti.transaction_quantity),
8454: wmti.transaction_uom,
8455: DECODE(l_step, -- primary_quantity
8456: WIP_CONSTANTS.QUEUE, -1 * wmti.primary_quantity,

Line 8456: WIP_CONSTANTS.QUEUE, -1 * wmti.primary_quantity,

8452: WIP_CONSTANTS.QUEUE, -1 * wmti.transaction_quantity,
8453: wmti.transaction_quantity),
8454: wmti.transaction_uom,
8455: DECODE(l_step, -- primary_quantity
8456: WIP_CONSTANTS.QUEUE, -1 * wmti.primary_quantity,
8457: wmti.primary_quantity),
8458: TPS_INV_JOB_OR_SCHED, -- transaction_source_type_id
8459: wmti.wip_entity_id, -- transaction_source_id
8460: WIP_CONSTANTS.SCRASSY_ACTION, -- transaction_action_id

Line 8460: WIP_CONSTANTS.SCRASSY_ACTION, -- transaction_action_id

8456: WIP_CONSTANTS.QUEUE, -1 * wmti.primary_quantity,
8457: wmti.primary_quantity),
8458: TPS_INV_JOB_OR_SCHED, -- transaction_source_type_id
8459: wmti.wip_entity_id, -- transaction_source_id
8460: WIP_CONSTANTS.SCRASSY_ACTION, -- transaction_action_id
8461: WIP_CONSTANTS.SCRASSY_TYPE, -- transaction_type_id
8462: wmti.transaction_date,
8463: wmti.acct_period_id,
8464: wmti.scrap_account_id, -- distribution_account_id

Line 8461: WIP_CONSTANTS.SCRASSY_TYPE, -- transaction_type_id

8457: wmti.primary_quantity),
8458: TPS_INV_JOB_OR_SCHED, -- transaction_source_type_id
8459: wmti.wip_entity_id, -- transaction_source_id
8460: WIP_CONSTANTS.SCRASSY_ACTION, -- transaction_action_id
8461: WIP_CONSTANTS.SCRASSY_TYPE, -- transaction_type_id
8462: wmti.transaction_date,
8463: wmti.acct_period_id,
8464: wmti.scrap_account_id, -- distribution_account_id
8465: NULL, -- transaction_cost

Line 8472: WIP_CONSTANTS.QUEUE, wmti.fm_operation_seq_num,

8468: wmti.entity_type, -- wip_entity_type
8469: NULL, -- schedule_id
8470: wmti.line_id, -- repetitive_line_id
8471: DECODE(l_step, -- operation_seq_num
8472: WIP_CONSTANTS.QUEUE, wmti.fm_operation_seq_num,
8473: wmti.to_operation_seq_num),
8474: wmti.transaction_id, -- move_transaction_id
8475: 'Y', -- process_flag
8476: 'N', -- lock_flag

Line 8479: WIP_CONSTANTS.ASSY_BATCH_SEQ -- transaction_batch_seq

8475: 'Y', -- process_flag
8476: 'N', -- lock_flag
8477: 'Y', -- posting_flag
8478: p_gib.mtl_header_id, -- transaction_batch_id
8479: WIP_CONSTANTS.ASSY_BATCH_SEQ -- transaction_batch_seq
8480: FROM wip_move_txn_interface wmti,
8481: mtl_system_items msi,
8482: wip_repetitive_schedules wrs
8483: WHERE wmti.group_id = p_gib.group_id

Line 8485: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

8481: mtl_system_items msi,
8482: wip_repetitive_schedules wrs
8483: WHERE wmti.group_id = p_gib.group_id
8484: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8485: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8486: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8487: AND wmti.scrap_account_id IS NOT NULL
8488: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
8489: AND wrs.wip_entity_id = wmti.wip_entity_id

Line 8486: AND wmti.process_status = WIP_CONSTANTS.RUNNING

8482: wip_repetitive_schedules wrs
8483: WHERE wmti.group_id = p_gib.group_id
8484: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8485: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8486: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8487: AND wmti.scrap_account_id IS NOT NULL
8488: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
8489: AND wrs.wip_entity_id = wmti.wip_entity_id
8490: AND wrs.organization_id = wmti.organization_id

Line 8488: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

8484: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8485: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8486: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8487: AND wmti.scrap_account_id IS NOT NULL
8488: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
8489: AND wrs.wip_entity_id = wmti.wip_entity_id
8490: AND wrs.organization_id = wmti.organization_id
8491: AND wrs.line_id = wmti.line_id
8492: AND wrs.repetitive_schedule_id = wmti.repetitive_schedule_id

Line 8494: WIP_CONSTANTS.QUEUE, wmti.fm_intraoperation_step_type,

8490: AND wrs.organization_id = wmti.organization_id
8491: AND wrs.line_id = wmti.line_id
8492: AND wrs.repetitive_schedule_id = wmti.repetitive_schedule_id
8493: AND DECODE(l_step,
8494: WIP_CONSTANTS.QUEUE, wmti.fm_intraoperation_step_type,
8495: wmti.to_intraoperation_step_type) = WIP_CONSTANTS.SCRAP
8496: AND msi.organization_id = wmti.organization_id
8497: AND msi.inventory_item_id = wmti.primary_item_id;
8498:

Line 8495: wmti.to_intraoperation_step_type) = WIP_CONSTANTS.SCRAP

8491: AND wrs.line_id = wmti.line_id
8492: AND wrs.repetitive_schedule_id = wmti.repetitive_schedule_id
8493: AND DECODE(l_step,
8494: WIP_CONSTANTS.QUEUE, wmti.fm_intraoperation_step_type,
8495: wmti.to_intraoperation_step_type) = WIP_CONSTANTS.SCRAP
8496: AND msi.organization_id = wmti.organization_id
8497: AND msi.inventory_item_id = wmti.primary_item_id;
8498:
8499: -- IF debug message level = 2, write statement below to log file

Line 8500: IF (l_logLevel <= wip_constants.full_logging) THEN

8496: AND msi.organization_id = wmti.organization_id
8497: AND msi.inventory_item_id = wmti.primary_item_id;
8498:
8499: -- IF debug message level = 2, write statement below to log file
8500: IF (l_logLevel <= wip_constants.full_logging) THEN
8501: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
8502: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
8503: fnd_message.set_token('ENTITY2', 'MTL_MATERIAL_TRANSACTIONS_TEMP');
8504: l_msg := fnd_message.get;

Line 8511: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN

8507: END IF;
8508: END IF; -- Repetitive schedules
8509: END LOOP; -- FOR l_step
8510:
8511: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN
8512: /* Call snapshot for Discrete jobs and only in Avg costing Org. */
8513: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE) THEN
8514: snapshot_online(p_mtl_header_id => p_gib.mtl_header_id,
8515: p_org_id => l_move.org_id,

Line 8513: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE) THEN

8509: END LOOP; -- FOR l_step
8510:
8511: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN
8512: /* Call snapshot for Discrete jobs and only in Avg costing Org. */
8513: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE) THEN
8514: snapshot_online(p_mtl_header_id => p_gib.mtl_header_id,
8515: p_org_id => l_move.org_id,
8516: p_txn_type => WIP_CONSTANTS.MOVE_TXN,
8517: p_txn_type_id => WIP_CONSTANTS.SCRASSY_TYPE,

Line 8516: p_txn_type => WIP_CONSTANTS.MOVE_TXN,

8512: /* Call snapshot for Discrete jobs and only in Avg costing Org. */
8513: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE) THEN
8514: snapshot_online(p_mtl_header_id => p_gib.mtl_header_id,
8515: p_org_id => l_move.org_id,
8516: p_txn_type => WIP_CONSTANTS.MOVE_TXN,
8517: p_txn_type_id => WIP_CONSTANTS.SCRASSY_TYPE,
8518: p_txn_action_id => WIP_CONSTANTS.SCRASSY_ACTION,
8519: x_returnStatus => x_returnStatus);
8520:

Line 8517: p_txn_type_id => WIP_CONSTANTS.SCRASSY_TYPE,

8513: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE) THEN
8514: snapshot_online(p_mtl_header_id => p_gib.mtl_header_id,
8515: p_org_id => l_move.org_id,
8516: p_txn_type => WIP_CONSTANTS.MOVE_TXN,
8517: p_txn_type_id => WIP_CONSTANTS.SCRASSY_TYPE,
8518: p_txn_action_id => WIP_CONSTANTS.SCRASSY_ACTION,
8519: x_returnStatus => x_returnStatus);
8520:
8521: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

Line 8518: p_txn_action_id => WIP_CONSTANTS.SCRASSY_ACTION,

8514: snapshot_online(p_mtl_header_id => p_gib.mtl_header_id,
8515: p_org_id => l_move.org_id,
8516: p_txn_type => WIP_CONSTANTS.MOVE_TXN,
8517: p_txn_type_id => WIP_CONSTANTS.SCRASSY_TYPE,
8518: p_txn_action_id => WIP_CONSTANTS.SCRASSY_ACTION,
8519: x_returnStatus => x_returnStatus);
8520:
8521: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
8522: l_errMsg := 'wip_movProc_priv.snapshot_online failed';

Line 8549: AND autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT, WIP_CONSTANTS.PO_MOVE);

8545: into l_osp_op_seq_num
8546: FROM wip_operation_resources
8547: WHERE wip_entity_id = l_update_po.job_id
8548: AND organization_id = l_update_po.org_id
8549: AND autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT, WIP_CONSTANTS.PO_MOVE);
8550:
8551: IF(l_update_po_qty = 0 AND l_update_po.fm_op < l_osp_op_seq_num) then
8552: wip_osp.cancelPOReq(
8553: p_job_id => l_update_po.job_id,

Line 8570: p_is_scrap_txn => WIP_CONSTANTS.YES,

8566: p_org_id => l_update_po.org_id,
8567: p_changed_qty => l_update_po.changed_qty,
8568: p_fm_op => l_update_po.fm_op,
8569: /* Fix for Bug#4734309 */
8570: p_is_scrap_txn => WIP_CONSTANTS.YES,
8571: x_return_status => x_returnStatus);
8572:
8573: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
8574: l_errMsg := 'wip_osp.updatePOReqQuantity failed';

Line 8588: IF (l_logLevel <= wip_constants.trace_logging) THEN

8584: p_gib.move_profile := l_move;
8585: x_returnStatus := fnd_api.g_ret_sts_success;
8586:
8587: -- write to the log file
8588: IF (l_logLevel <= wip_constants.trace_logging) THEN
8589: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.scrap_txns',
8590: p_procReturnStatus => x_returnStatus,
8591: p_msg => 'procedure complete',
8592: x_returnStatus => l_returnStatus);

Line 8598: IF (l_logLevel <= wip_constants.trace_logging) THEN

8594:
8595: EXCEPTION
8596: WHEN fnd_api.g_exc_unexpected_error THEN
8597: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
8598: IF (l_logLevel <= wip_constants.trace_logging) THEN
8599: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.scrap_txns',
8600: p_procReturnStatus => x_returnStatus,
8601: p_msg => l_errMsg,
8602: x_returnStatus => l_returnStatus);

Line 8609: IF (l_logLevel <= wip_constants.trace_logging) THEN

8605: WHEN others THEN
8606: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
8607: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
8608:
8609: IF (l_logLevel <= wip_constants.trace_logging) THEN
8610: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.scrap_txns',
8611: p_procReturnStatus => x_returnStatus,
8612: p_msg => l_errMsg,
8613: x_returnStatus => l_returnStatus);

Line 8642: AND wip_entity_type = WIP_CONSTANTS.REPETITIVE

8638: reason_id reason_id,
8639: transaction_reference reference
8640: FROM mtl_material_transactions_temp
8641: WHERE transaction_header_id = p_header_id
8642: AND wip_entity_type = WIP_CONSTANTS.REPETITIVE
8643: AND transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,
8644: WIP_CONSTANTS.CPLASSY_ACTION);
8645:
8646: l_repAssembly c_repAssembly%ROWTYPE;

Line 8643: AND transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,

8639: transaction_reference reference
8640: FROM mtl_material_transactions_temp
8641: WHERE transaction_header_id = p_header_id
8642: AND wip_entity_type = WIP_CONSTANTS.REPETITIVE
8643: AND transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,
8644: WIP_CONSTANTS.CPLASSY_ACTION);
8645:
8646: l_repAssembly c_repAssembly%ROWTYPE;
8647: l_params wip_logger.param_tbl_t;

Line 8644: WIP_CONSTANTS.CPLASSY_ACTION);

8640: FROM mtl_material_transactions_temp
8641: WHERE transaction_header_id = p_header_id
8642: AND wip_entity_type = WIP_CONSTANTS.REPETITIVE
8643: AND transaction_action_id IN (WIP_CONSTANTS.RETASSY_ACTION,
8644: WIP_CONSTANTS.CPLASSY_ACTION);
8645:
8646: l_repAssembly c_repAssembly%ROWTYPE;
8647: l_params wip_logger.param_tbl_t;
8648: l_returnStatus VARCHAR(1);

Line 8667: IF (l_logLevel <= wip_constants.trace_logging) THEN

8663: BEGIN
8664: l_move := p_gib.move_profile;
8665:
8666: -- write parameter value to log file
8667: IF (l_logLevel <= wip_constants.trace_logging) THEN
8668: l_params(1).paramName := 'p_group_id';
8669: l_params(1).paramValue := p_gib.group_id;
8670: l_params(2).paramName := 'p_txn_date';
8671: l_params(2).paramValue := p_gib.txn_date;

Line 8736: IF (p_txn_type = WIP_CONSTANTS.RET_TXN) THEN

8732: FROM DUAL;
8733: END IF;
8734:
8735: /* set transaction type */
8736: IF (p_txn_type = WIP_CONSTANTS.RET_TXN) THEN
8737: l_txn_action_id := WIP_CONSTANTS.RETASSY_ACTION;
8738: l_txn_type_id := WIP_CONSTANTS.RETASSY_TYPE;
8739: l_txn_direction := -1;
8740: ELSE

Line 8737: l_txn_action_id := WIP_CONSTANTS.RETASSY_ACTION;

8733: END IF;
8734:
8735: /* set transaction type */
8736: IF (p_txn_type = WIP_CONSTANTS.RET_TXN) THEN
8737: l_txn_action_id := WIP_CONSTANTS.RETASSY_ACTION;
8738: l_txn_type_id := WIP_CONSTANTS.RETASSY_TYPE;
8739: l_txn_direction := -1;
8740: ELSE
8741: l_txn_action_id := WIP_CONSTANTS.CPLASSY_ACTION;

Line 8738: l_txn_type_id := WIP_CONSTANTS.RETASSY_TYPE;

8734:
8735: /* set transaction type */
8736: IF (p_txn_type = WIP_CONSTANTS.RET_TXN) THEN
8737: l_txn_action_id := WIP_CONSTANTS.RETASSY_ACTION;
8738: l_txn_type_id := WIP_CONSTANTS.RETASSY_TYPE;
8739: l_txn_direction := -1;
8740: ELSE
8741: l_txn_action_id := WIP_CONSTANTS.CPLASSY_ACTION;
8742: l_txn_type_id := WIP_CONSTANTS.CPLASSY_TYPE;

Line 8741: l_txn_action_id := WIP_CONSTANTS.CPLASSY_ACTION;

8737: l_txn_action_id := WIP_CONSTANTS.RETASSY_ACTION;
8738: l_txn_type_id := WIP_CONSTANTS.RETASSY_TYPE;
8739: l_txn_direction := -1;
8740: ELSE
8741: l_txn_action_id := WIP_CONSTANTS.CPLASSY_ACTION;
8742: l_txn_type_id := WIP_CONSTANTS.CPLASSY_TYPE;
8743: l_txn_direction := 1;
8744: END IF;
8745:

Line 8742: l_txn_type_id := WIP_CONSTANTS.CPLASSY_TYPE;

8738: l_txn_type_id := WIP_CONSTANTS.RETASSY_TYPE;
8739: l_txn_direction := -1;
8740: ELSE
8741: l_txn_action_id := WIP_CONSTANTS.CPLASSY_ACTION;
8742: l_txn_type_id := WIP_CONSTANTS.CPLASSY_TYPE;
8743: l_txn_direction := 1;
8744: END IF;
8745:
8746: -- initialize transaction mode

Line 8747: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE AND

8743: l_txn_direction := 1;
8744: END IF;
8745:
8746: -- initialize transaction mode
8747: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE AND
8748: p_gib.mtl_mode = WIP_CONSTANTS.ONLINE) THEN
8749: l_transaction_mode := WIP_CONSTANTS.ONLINE;
8750: ELSE
8751: l_transaction_mode := WIP_CONSTANTS.BACKGROUND;

Line 8748: p_gib.mtl_mode = WIP_CONSTANTS.ONLINE) THEN

8744: END IF;
8745:
8746: -- initialize transaction mode
8747: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE AND
8748: p_gib.mtl_mode = WIP_CONSTANTS.ONLINE) THEN
8749: l_transaction_mode := WIP_CONSTANTS.ONLINE;
8750: ELSE
8751: l_transaction_mode := WIP_CONSTANTS.BACKGROUND;
8752: END IF;

Line 8749: l_transaction_mode := WIP_CONSTANTS.ONLINE;

8745:
8746: -- initialize transaction mode
8747: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE AND
8748: p_gib.mtl_mode = WIP_CONSTANTS.ONLINE) THEN
8749: l_transaction_mode := WIP_CONSTANTS.ONLINE;
8750: ELSE
8751: l_transaction_mode := WIP_CONSTANTS.BACKGROUND;
8752: END IF;
8753:

Line 8751: l_transaction_mode := WIP_CONSTANTS.BACKGROUND;

8747: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE AND
8748: p_gib.mtl_mode = WIP_CONSTANTS.ONLINE) THEN
8749: l_transaction_mode := WIP_CONSTANTS.ONLINE;
8750: ELSE
8751: l_transaction_mode := WIP_CONSTANTS.BACKGROUND;
8752: END IF;
8753:
8754: /*------------------------------------------------------------+
8755: | Insert completion transaction record |

Line 8757: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN

8753:
8754: /*------------------------------------------------------------+
8755: | Insert completion transaction record |
8756: +------------------------------------------------------------*/
8757: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN
8758: INSERT INTO mtl_transactions_interface
8759: (completion_transaction_id,
8760: transaction_interface_id,
8761: last_updated_by,

Line 8851: WIP_CONSTANTS.REV, NVL(wdj.bom_revision,

8847: wop.operation_seq_num operation_seq_num,
8848: wmti.reason_id reason_id,
8849: -- Fixed bug 2387630
8850: DECODE(msi.revision_qty_control_code, -- revision
8851: WIP_CONSTANTS.REV, NVL(wdj.bom_revision,
8852: bom_revisions.get_item_revision_fn
8853: ('EXCLUDE_OPEN_HOLD', -- eco_status
8854: 'ALL', -- examine_type
8855: wmti.organization_id, -- org_id

Line 8865: WIP_CONSTANTS.MTI_INVENTORY process_flag, -- process_flag for WIP

8861: -1,NULL,wdj.kanban_card_id) kanban_card_id,
8862: wdj.project_id source_project_id,
8863: wdj.task_id source_task_id,
8864: l_transaction_mode transaction_mode,
8865: WIP_CONSTANTS.MTI_INVENTORY process_flag, -- process_flag for WIP
8866: -- 'N', -- lock_flag
8867: -- 'Y', -- posting_flag
8868: -- msi.lot_control_code, -- item_lot_control_code
8869: -- msi.serial_number_control_code,-- item_serial_control_code

Line 8875: WIP_CONSTANTS.ASSY_BATCH_SEQ transaction_batch_seq,

8871: -- mil.task_id, -- task_id
8872: wmti.wip_entity_id source_header_id,
8873: wop.operation_seq_num source_line_id,
8874: p_gib.assy_header_id transaction_batch_id,
8875: WIP_CONSTANTS.ASSY_BATCH_SEQ transaction_batch_seq,
8876: -- mtl_material_transactions_s.nextval, -- transaction_interface_id
8877: -- populate this value for EZ completion/return because
8878: -- material processor need this value to enable quality
8879: wmti.qa_collection_id qa_collection_id,

Line 8888: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

8884: mtl_system_items msi,
8885: wip_discrete_jobs wdj
8886: WHERE wmti.group_id = p_gib.group_id
8887: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8888: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8889: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8890: AND wmti.transaction_type = p_txn_type
8891: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8892: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM*/

Line 8889: AND wmti.process_status = WIP_CONSTANTS.RUNNING

8885: wip_discrete_jobs wdj
8886: WHERE wmti.group_id = p_gib.group_id
8887: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8888: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8889: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8890: AND wmti.transaction_type = p_txn_type
8891: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8892: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM*/
8893: AND wdj.wip_entity_id = wmti.wip_entity_id

Line 8891: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE

8887: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
8888: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8889: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8890: AND wmti.transaction_type = p_txn_type
8891: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8892: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM*/
8893: AND wdj.wip_entity_id = wmti.wip_entity_id
8894: AND wdj.organization_id = wmti.organization_id
8895: AND wop.organization_id = wmti.organization_id

Line 8892: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM*/

8888: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
8889: AND wmti.process_status = WIP_CONSTANTS.RUNNING
8890: AND wmti.transaction_type = p_txn_type
8891: AND (wmti.entity_type = WIP_CONSTANTS.DISCRETE
8892: OR wmti.entity_type = WIP_CONSTANTS.LOTBASED)/*WSM*/
8893: AND wdj.wip_entity_id = wmti.wip_entity_id
8894: AND wdj.organization_id = wmti.organization_id
8895: AND wop.organization_id = wmti.organization_id
8896: AND wop.wip_entity_id = wmti.wip_entity_id

Line 8909: IF(l_move.scheTxn = WIP_CONSTANTS.YES) THEN

8905: ;
8906:
8907: END IF; -- discrete jobs
8908:
8909: IF(l_move.scheTxn = WIP_CONSTANTS.YES) THEN
8910:
8911: INSERT INTO mtl_transactions_interface
8912: (completion_transaction_id,
8913: transaction_interface_id,

Line 8998: WIP_CONSTANTS.REV, NVL(wrs.bom_revision,

8994: wop.operation_seq_num operation_seq_num,
8995: wmti.reason_id reason_id,
8996: -- Fixed bug 2387630
8997: DECODE(msi.revision_qty_control_code, -- revision
8998: WIP_CONSTANTS.REV, NVL(wrs.bom_revision,
8999: bom_revisions.get_item_revision_fn
9000: ('EXCLUDE_OPEN_HOLD', -- eco_status
9001: 'ALL', -- examine_type
9002: wmti.organization_id, -- org_id

Line 9008: WIP_CONSTANTS.MTI_INVENTORY process_flag, -- process_flag for WIP

9004: wmti.transaction_date -- rev_date
9005: )),
9006: NULL) revision_qty_control_code,
9007: l_transaction_mode transaction_mode,
9008: WIP_CONSTANTS.MTI_INVENTORY process_flag, -- process_flag for WIP
9009: -- 'N', -- lock_flag
9010: -- 'Y', -- posting_flag
9011: -- msi.lot_control_code, -- item_lot_control_code
9012: -- msi.serial_number_control_code, -- item_serial_control_code

Line 9016: WIP_CONSTANTS.ASSY_BATCH_SEQ transaction_batch_seq,

9012: -- msi.serial_number_control_code, -- item_serial_control_code
9013: wmti.wip_entity_id source_header_id,
9014: wop.operation_seq_num source_line_id,
9015: p_gib.assy_header_id transaction_batch_id,
9016: WIP_CONSTANTS.ASSY_BATCH_SEQ transaction_batch_seq,
9017: -- mtl_material_transactions_s.nextval, -- transaction_interface_id
9018: -- populate this value for EZ completion/return because
9019: -- material processor need this value to enable quality
9020: wmti.qa_collection_id qa_collection_id

Line 9028: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC

9024: wip_repetitive_schedules wrs,
9025: wip_repetitive_items wri
9026: WHERE wmti.group_id = p_gib.group_id
9027: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
9028: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
9029: AND wmti.process_status = WIP_CONSTANTS.RUNNING
9030: AND wmti.transaction_type = p_txn_type
9031: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
9032: AND wrs.wip_entity_id = wmti.wip_entity_id

Line 9029: AND wmti.process_status = WIP_CONSTANTS.RUNNING

9025: wip_repetitive_items wri
9026: WHERE wmti.group_id = p_gib.group_id
9027: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
9028: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
9029: AND wmti.process_status = WIP_CONSTANTS.RUNNING
9030: AND wmti.transaction_type = p_txn_type
9031: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
9032: AND wrs.wip_entity_id = wmti.wip_entity_id
9033: AND wrs.organization_id = wmti.organization_id

Line 9031: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

9027: AND TRUNC(wmti.transaction_date) = TRUNC(p_gib.txn_date)
9028: AND wmti.process_phase = WIP_CONSTANTS.MOVE_PROC
9029: AND wmti.process_status = WIP_CONSTANTS.RUNNING
9030: AND wmti.transaction_type = p_txn_type
9031: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
9032: AND wrs.wip_entity_id = wmti.wip_entity_id
9033: AND wrs.organization_id = wmti.organization_id
9034: AND wrs.line_id = wmti.line_id
9035: AND wrs.repetitive_schedule_id = wmti.repetitive_schedule_id

Line 9050: IF (l_logLevel <= wip_constants.full_logging) THEN

9046: order by wmti.transaction_date, wmti.wip_entity_id) t;
9047: END IF; -- Repetitive schedules
9048:
9049: -- IF debug message level = 2, write statement below to log file
9050: IF (l_logLevel <= wip_constants.full_logging) THEN
9051: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
9052: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
9053: fnd_message.set_token('ENTITY2', 'MTL_TRANSACTIONS_INTERFACE');
9054: l_msg := fnd_message.get;

Line 9060: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN

9056: x_returnStatus => l_returnStatus);
9057: END IF;
9058:
9059: /* Only allow lot control for discrete/OSFM jobs */
9060: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN
9061:
9062: SELECT COUNT(*)
9063: INTO l_mti_lot_rec
9064: FROM mtl_transactions_interface mti,

Line 9072: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,

9068: AND mti.transaction_header_id = p_gib.assy_header_id
9069: AND mti.transaction_action_id = l_txn_action_id
9070: AND mti.transaction_type_id = l_txn_type_id
9071: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9072: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9073: WIP_CONSTANTS.LOTBASED) /*WSM*/
9074: AND msi.lot_control_code = WIP_CONSTANTS.LOT;
9075:
9076: -- IF debug message level = 2, write statement below to log file

Line 9073: WIP_CONSTANTS.LOTBASED) /*WSM*/

9069: AND mti.transaction_action_id = l_txn_action_id
9070: AND mti.transaction_type_id = l_txn_type_id
9071: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9072: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9073: WIP_CONSTANTS.LOTBASED) /*WSM*/
9074: AND msi.lot_control_code = WIP_CONSTANTS.LOT;
9075:
9076: -- IF debug message level = 2, write statement below to log file
9077: IF (l_logLevel <= wip_constants.full_logging) THEN

Line 9074: AND msi.lot_control_code = WIP_CONSTANTS.LOT;

9070: AND mti.transaction_type_id = l_txn_type_id
9071: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9072: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9073: WIP_CONSTANTS.LOTBASED) /*WSM*/
9074: AND msi.lot_control_code = WIP_CONSTANTS.LOT;
9075:
9076: -- IF debug message level = 2, write statement below to log file
9077: IF (l_logLevel <= wip_constants.full_logging) THEN
9078: l_msg := 'No. of records in mti updated for lot controlled ' ||

Line 9077: IF (l_logLevel <= wip_constants.full_logging) THEN

9073: WIP_CONSTANTS.LOTBASED) /*WSM*/
9074: AND msi.lot_control_code = WIP_CONSTANTS.LOT;
9075:
9076: -- IF debug message level = 2, write statement below to log file
9077: IF (l_logLevel <= wip_constants.full_logging) THEN
9078: l_msg := 'No. of records in mti updated for lot controlled ' ||
9079: 'assemblies : ' || l_mti_lot_rec;
9080: wip_logger.log(p_msg => l_msg,
9081: x_returnStatus => l_returnStatus);

Line 9128: WIP_CONSTANTS.FULL_SN, mtl_material_transactions_s.nextval,

9124: mti.last_update_date,
9125: mti.last_updated_by,
9126: mti.last_update_login,
9127: DECODE(msi.serial_number_control_code,
9128: WIP_CONSTANTS.FULL_SN, mtl_material_transactions_s.nextval,
9129: WIP_CONSTANTS.DYN_RCV_SN,mtl_material_transactions_s.nextval,
9130: NULL),
9131: 1, -- Bug 13734082 ,FP Bug for Populating orignation type as 'Production'
9132: mti.transaction_date

Line 9129: WIP_CONSTANTS.DYN_RCV_SN,mtl_material_transactions_s.nextval,

9125: mti.last_updated_by,
9126: mti.last_update_login,
9127: DECODE(msi.serial_number_control_code,
9128: WIP_CONSTANTS.FULL_SN, mtl_material_transactions_s.nextval,
9129: WIP_CONSTANTS.DYN_RCV_SN,mtl_material_transactions_s.nextval,
9130: NULL),
9131: 1, -- Bug 13734082 ,FP Bug for Populating orignation type as 'Production'
9132: mti.transaction_date
9133: FROM mtl_transactions_interface mti,

Line 9142: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,

9138: AND mti.transaction_header_id = p_gib.assy_header_id
9139: AND mti.transaction_action_id = l_txn_action_id
9140: AND mti.transaction_type_id = l_txn_type_id
9141: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9142: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9143: WIP_CONSTANTS.LOTBASED)/*WSM */
9144: AND msi.lot_control_code = WIP_CONSTANTS.LOT
9145: AND mti.organization_id = wdj.organization_id
9146: AND mti.transaction_source_id = wdj.wip_entity_id

Line 9143: WIP_CONSTANTS.LOTBASED)/*WSM */

9139: AND mti.transaction_action_id = l_txn_action_id
9140: AND mti.transaction_type_id = l_txn_type_id
9141: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9142: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9143: WIP_CONSTANTS.LOTBASED)/*WSM */
9144: AND msi.lot_control_code = WIP_CONSTANTS.LOT
9145: AND mti.organization_id = wdj.organization_id
9146: AND mti.transaction_source_id = wdj.wip_entity_id
9147: AND NOT EXISTS

Line 9144: AND msi.lot_control_code = WIP_CONSTANTS.LOT

9140: AND mti.transaction_type_id = l_txn_type_id
9141: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9142: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9143: WIP_CONSTANTS.LOTBASED)/*WSM */
9144: AND msi.lot_control_code = WIP_CONSTANTS.LOT
9145: AND mti.organization_id = wdj.organization_id
9146: AND mti.transaction_source_id = wdj.wip_entity_id
9147: AND NOT EXISTS
9148: (SELECT 1

Line 9154: IF (l_logLevel <= wip_constants.full_logging) THEN

9150: WHERE mtli.transaction_interface_id =
9151: mti.transaction_interface_id);
9152:
9153: -- IF debug message level = 2, write statement below to log file
9154: IF (l_logLevel <= wip_constants.full_logging) THEN
9155: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
9156: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
9157: fnd_message.set_token('ENTITY2', 'MTL_TRANSACTION_LOTS_INTERFACE');
9158: l_msg := fnd_message.get;

Line 9179: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,

9175: AND mti.transaction_header_id = p_gib.assy_header_id
9176: AND mti.transaction_action_id = l_txn_action_id
9177: AND mti.transaction_type_id = l_txn_type_id
9178: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9179: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9180: WIP_CONSTANTS.LOTBASED)/*WSM */
9181: AND msi.lot_control_code = WIP_CONSTANTS.LOT
9182: AND mln.lot_number = mtli.lot_number
9183: AND mln.inventory_item_id = mti.inventory_item_id

Line 9180: WIP_CONSTANTS.LOTBASED)/*WSM */

9176: AND mti.transaction_action_id = l_txn_action_id
9177: AND mti.transaction_type_id = l_txn_type_id
9178: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9179: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9180: WIP_CONSTANTS.LOTBASED)/*WSM */
9181: AND msi.lot_control_code = WIP_CONSTANTS.LOT
9182: AND mln.lot_number = mtli.lot_number
9183: AND mln.inventory_item_id = mti.inventory_item_id
9184: AND mln.organization_id = mti.organization_id)

Line 9181: AND msi.lot_control_code = WIP_CONSTANTS.LOT

9177: AND mti.transaction_type_id = l_txn_type_id
9178: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9179: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9180: WIP_CONSTANTS.LOTBASED)/*WSM */
9181: AND msi.lot_control_code = WIP_CONSTANTS.LOT
9182: AND mln.lot_number = mtli.lot_number
9183: AND mln.inventory_item_id = mti.inventory_item_id
9184: AND mln.organization_id = mti.organization_id)
9185: WHERE mtli.transaction_interface_id IN

Line 9195: /* AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,

9191: AND mti.transaction_header_id = p_gib.assy_header_id
9192: AND mti.transaction_action_id = l_txn_action_id
9193: AND mti.transaction_type_id = l_txn_type_id
9194: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9195: /* AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9196: WIP_CONSTANTS.LOTBASED) WSM */
9197: AND msi.lot_control_code = WIP_CONSTANTS.LOT
9198: -- Bug 8847539. Update lot_expiration_date for osfm jobs if on hand of existing lot is not zero.
9199: -- For Lots with zero onhand it will be recalculated based on shelf life in next sql.

Line 9196: WIP_CONSTANTS.LOTBASED) WSM */

9192: AND mti.transaction_action_id = l_txn_action_id
9193: AND mti.transaction_type_id = l_txn_type_id
9194: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9195: /* AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9196: WIP_CONSTANTS.LOTBASED) WSM */
9197: AND msi.lot_control_code = WIP_CONSTANTS.LOT
9198: -- Bug 8847539. Update lot_expiration_date for osfm jobs if on hand of existing lot is not zero.
9199: -- For Lots with zero onhand it will be recalculated based on shelf life in next sql.
9200: AND ( mti.wip_entity_type = WIP_CONSTANTS.DISCRETE or

Line 9197: AND msi.lot_control_code = WIP_CONSTANTS.LOT

9193: AND mti.transaction_type_id = l_txn_type_id
9194: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9195: /* AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9196: WIP_CONSTANTS.LOTBASED) WSM */
9197: AND msi.lot_control_code = WIP_CONSTANTS.LOT
9198: -- Bug 8847539. Update lot_expiration_date for osfm jobs if on hand of existing lot is not zero.
9199: -- For Lots with zero onhand it will be recalculated based on shelf life in next sql.
9200: AND ( mti.wip_entity_type = WIP_CONSTANTS.DISCRETE or
9201: (mti.wip_entity_type = WIP_CONSTANTS.LOTBASED and

Line 9200: AND ( mti.wip_entity_type = WIP_CONSTANTS.DISCRETE or

9196: WIP_CONSTANTS.LOTBASED) WSM */
9197: AND msi.lot_control_code = WIP_CONSTANTS.LOT
9198: -- Bug 8847539. Update lot_expiration_date for osfm jobs if on hand of existing lot is not zero.
9199: -- For Lots with zero onhand it will be recalculated based on shelf life in next sql.
9200: AND ( mti.wip_entity_type = WIP_CONSTANTS.DISCRETE or
9201: (mti.wip_entity_type = WIP_CONSTANTS.LOTBASED and
9202: 0 <> (select nvl(sum(primary_transaction_quantity),0)
9203: FROM mtl_onhand_quantities_detail moqd
9204: WHERE moqd.inventory_item_id = mti.inventory_item_id

Line 9201: (mti.wip_entity_type = WIP_CONSTANTS.LOTBASED and

9197: AND msi.lot_control_code = WIP_CONSTANTS.LOT
9198: -- Bug 8847539. Update lot_expiration_date for osfm jobs if on hand of existing lot is not zero.
9199: -- For Lots with zero onhand it will be recalculated based on shelf life in next sql.
9200: AND ( mti.wip_entity_type = WIP_CONSTANTS.DISCRETE or
9201: (mti.wip_entity_type = WIP_CONSTANTS.LOTBASED and
9202: 0 <> (select nvl(sum(primary_transaction_quantity),0)
9203: FROM mtl_onhand_quantities_detail moqd
9204: WHERE moqd.inventory_item_id = mti.inventory_item_id
9205: AND moqd.organization_id = mti.organization_id

Line 9212: IF (l_logLevel <= wip_constants.full_logging) THEN

9208: )
9209: ));
9210:
9211: -- IF debug message level = 2, write statement below to log file
9212: IF (l_logLevel <= wip_constants.full_logging) THEN
9213: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');
9214: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
9215: fnd_message.set_token('ENTITY2', 'MTL_TRANSACTION_LOTS_INTERFACE');
9216: l_msg := fnd_message.get;

Line 9234: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,

9230: WHERE mti.transaction_header_id = p_gib.assy_header_id
9231: AND mti.transaction_action_id = l_txn_action_id
9232: AND mti.transaction_type_id = l_txn_type_id
9233: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9234: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9235: WIP_CONSTANTS.LOTBASED) /*WSM */
9236: AND msi.lot_control_code = WIP_CONSTANTS.LOT
9237: AND msi.organization_id = mti.organization_id
9238: AND msi.inventory_item_id = mti.inventory_item_id

Line 9235: WIP_CONSTANTS.LOTBASED) /*WSM */

9231: AND mti.transaction_action_id = l_txn_action_id
9232: AND mti.transaction_type_id = l_txn_type_id
9233: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9234: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9235: WIP_CONSTANTS.LOTBASED) /*WSM */
9236: AND msi.lot_control_code = WIP_CONSTANTS.LOT
9237: AND msi.organization_id = mti.organization_id
9238: AND msi.inventory_item_id = mti.inventory_item_id
9239: AND msi.shelf_life_code = WIP_CONSTANTS.SHELF_LIFE

Line 9236: AND msi.lot_control_code = WIP_CONSTANTS.LOT

9232: AND mti.transaction_type_id = l_txn_type_id
9233: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9234: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9235: WIP_CONSTANTS.LOTBASED) /*WSM */
9236: AND msi.lot_control_code = WIP_CONSTANTS.LOT
9237: AND msi.organization_id = mti.organization_id
9238: AND msi.inventory_item_id = mti.inventory_item_id
9239: AND msi.shelf_life_code = WIP_CONSTANTS.SHELF_LIFE
9240: AND mtli.transaction_interface_id =

Line 9239: AND msi.shelf_life_code = WIP_CONSTANTS.SHELF_LIFE

9235: WIP_CONSTANTS.LOTBASED) /*WSM */
9236: AND msi.lot_control_code = WIP_CONSTANTS.LOT
9237: AND msi.organization_id = mti.organization_id
9238: AND msi.inventory_item_id = mti.inventory_item_id
9239: AND msi.shelf_life_code = WIP_CONSTANTS.SHELF_LIFE
9240: AND mtli.transaction_interface_id =
9241: mti.transaction_interface_id)
9242: WHERE mtli.lot_expiration_date IS NULL
9243: AND mtli.transaction_interface_id IN

Line 9253: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,

9249: AND mti.transaction_header_id = p_gib.assy_header_id
9250: AND mti.transaction_action_id = l_txn_action_id
9251: AND mti.transaction_type_id = l_txn_type_id
9252: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9253: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9254: WIP_CONSTANTS.LOTBASED)/* WSM */
9255: AND msi.lot_control_code = WIP_CONSTANTS.LOT);
9256:
9257: -- IF debug message level = 2, write statement below to log file

Line 9254: WIP_CONSTANTS.LOTBASED)/* WSM */

9250: AND mti.transaction_action_id = l_txn_action_id
9251: AND mti.transaction_type_id = l_txn_type_id
9252: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9253: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9254: WIP_CONSTANTS.LOTBASED)/* WSM */
9255: AND msi.lot_control_code = WIP_CONSTANTS.LOT);
9256:
9257: -- IF debug message level = 2, write statement below to log file
9258: IF (l_logLevel <= wip_constants.full_logging) THEN

Line 9255: AND msi.lot_control_code = WIP_CONSTANTS.LOT);

9251: AND mti.transaction_type_id = l_txn_type_id
9252: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9253: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9254: WIP_CONSTANTS.LOTBASED)/* WSM */
9255: AND msi.lot_control_code = WIP_CONSTANTS.LOT);
9256:
9257: -- IF debug message level = 2, write statement below to log file
9258: IF (l_logLevel <= wip_constants.full_logging) THEN
9259: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');

Line 9258: IF (l_logLevel <= wip_constants.full_logging) THEN

9254: WIP_CONSTANTS.LOTBASED)/* WSM */
9255: AND msi.lot_control_code = WIP_CONSTANTS.LOT);
9256:
9257: -- IF debug message level = 2, write statement below to log file
9258: IF (l_logLevel <= wip_constants.full_logging) THEN
9259: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');
9260: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
9261: fnd_message.set_token('ENTITY2', 'MTL_TRANSACTION_LOTS_INTERFACE');
9262: l_msg := fnd_message.get;

Line 9280: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,

9276: AND mti.transaction_header_id = p_gib.assy_header_id
9277: AND mti.transaction_action_id = l_txn_action_id
9278: AND mti.transaction_type_id = l_txn_type_id
9279: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9280: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9281: WIP_CONSTANTS.LOTBASED) /*WSM*/
9282: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,
9283: WIP_CONSTANTS.DYN_RCV_SN);
9284:

Line 9281: WIP_CONSTANTS.LOTBASED) /*WSM*/

9277: AND mti.transaction_action_id = l_txn_action_id
9278: AND mti.transaction_type_id = l_txn_type_id
9279: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9280: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9281: WIP_CONSTANTS.LOTBASED) /*WSM*/
9282: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,
9283: WIP_CONSTANTS.DYN_RCV_SN);
9284:
9285: -- IF debug message level = 2, write statement below to log file

Line 9282: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,

9278: AND mti.transaction_type_id = l_txn_type_id
9279: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9280: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9281: WIP_CONSTANTS.LOTBASED) /*WSM*/
9282: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,
9283: WIP_CONSTANTS.DYN_RCV_SN);
9284:
9285: -- IF debug message level = 2, write statement below to log file
9286: IF (l_logLevel <= wip_constants.full_logging) THEN

Line 9283: WIP_CONSTANTS.DYN_RCV_SN);

9279: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9280: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9281: WIP_CONSTANTS.LOTBASED) /*WSM*/
9282: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,
9283: WIP_CONSTANTS.DYN_RCV_SN);
9284:
9285: -- IF debug message level = 2, write statement below to log file
9286: IF (l_logLevel <= wip_constants.full_logging) THEN
9287: l_msg := 'No. of records in mti updated for serial controlled ' ||

Line 9286: IF (l_logLevel <= wip_constants.full_logging) THEN

9282: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,
9283: WIP_CONSTANTS.DYN_RCV_SN);
9284:
9285: -- IF debug message level = 2, write statement below to log file
9286: IF (l_logLevel <= wip_constants.full_logging) THEN
9287: l_msg := 'No. of records in mti updated for serial controlled ' ||
9288: 'assemblies : ' || l_mti_ser_rec;
9289: wip_logger.log(p_msg => l_msg,
9290: x_returnStatus => l_returnStatus);

Line 9308: WIP_CONSTANTS.LOT, mtli.serial_transaction_temp_id,

9304: fm_serial_number,
9305: to_serial_number
9306: )
9307: SELECT DECODE(msi.lot_control_code,
9308: WIP_CONSTANTS.LOT, mtli.serial_transaction_temp_id,
9309: mti.transaction_interface_id),
9310: mti.creation_date,
9311: mti.created_by,
9312: mti.last_update_date,

Line 9327: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,

9323: AND mti.transaction_header_id = p_gib.assy_header_id
9324: AND mti.transaction_action_id = l_txn_action_id
9325: AND mti.transaction_type_id = l_txn_type_id
9326: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9327: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9328: WIP_CONSTANTS.LOTBASED)/*WSM */
9329: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,
9330: WIP_CONSTANTS.DYN_RCV_SN)
9331: AND mti.transaction_interface_id = mtli.transaction_interface_id(+)

Line 9328: WIP_CONSTANTS.LOTBASED)/*WSM */

9324: AND mti.transaction_action_id = l_txn_action_id
9325: AND mti.transaction_type_id = l_txn_type_id
9326: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9327: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9328: WIP_CONSTANTS.LOTBASED)/*WSM */
9329: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,
9330: WIP_CONSTANTS.DYN_RCV_SN)
9331: AND mti.transaction_interface_id = mtli.transaction_interface_id(+)
9332: AND mti.move_transaction_id = wsmi.transaction_id;

Line 9329: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,

9325: AND mti.transaction_type_id = l_txn_type_id
9326: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9327: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9328: WIP_CONSTANTS.LOTBASED)/*WSM */
9329: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,
9330: WIP_CONSTANTS.DYN_RCV_SN)
9331: AND mti.transaction_interface_id = mtli.transaction_interface_id(+)
9332: AND mti.move_transaction_id = wsmi.transaction_id;
9333:

Line 9330: WIP_CONSTANTS.DYN_RCV_SN)

9326: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
9327: AND mti.wip_entity_type IN (WIP_CONSTANTS.DISCRETE,
9328: WIP_CONSTANTS.LOTBASED)/*WSM */
9329: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,
9330: WIP_CONSTANTS.DYN_RCV_SN)
9331: AND mti.transaction_interface_id = mtli.transaction_interface_id(+)
9332: AND mti.move_transaction_id = wsmi.transaction_id;
9333:
9334: -- IF debug message level = 2, write statement below to log file

Line 9335: IF (l_logLevel <= wip_constants.full_logging) THEN

9331: AND mti.transaction_interface_id = mtli.transaction_interface_id(+)
9332: AND mti.move_transaction_id = wsmi.transaction_id;
9333:
9334: -- IF debug message level = 2, write statement below to log file
9335: IF (l_logLevel <= wip_constants.full_logging) THEN
9336: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
9337: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
9338: fnd_message.set_token('ENTITY2', 'MTL_SERIAL_NUMBERS_INTERFACE');
9339: l_msg := fnd_message.get;

Line 9345: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE) THEN

9341: x_returnStatus => l_returnStatus);
9342: END IF;
9343: END IF; -- Discrete or OSFM jobs
9344:
9345: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE) THEN
9346: l_addMsgToStack := fnd_api.g_true;
9347: ELSE
9348: -- Message stack is only useful for online transaction. For background,
9349: -- we never used message stack.

Line 9363: IF (l_transaction_mode <> WIP_CONSTANTS.ONLINE) THEN

9359: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9360: --FP bug 5752485 (base bug 4128207) Added the IF condition below since write_mtl_errors
9361: --is not applicable for ONLINE completions. Otherwise the fnd_msg_pub stack is initialized
9362: --inside write_mtl_errors which suppresses messages to be shown to the user in the UI
9363: IF (l_transaction_mode <> WIP_CONSTANTS.ONLINE) THEN
9364: -- write mtl error message into WIP_TXN_INTERFACE_ERRORS
9365: write_mtl_errors(p_mtl_header_id => p_gib.assy_header_id);
9366: END IF;
9367: l_errMsg := 'wip_mtlTempProc_priv.validateInterfaceTxns failed' ||

Line 9381: p_tblName => WIP_CONSTANTS.MMTT_TBL,

9377: p_cplTxnID => l_repAssembly.cpl_txn_id,
9378: p_txnActionID => l_repAssembly.txn_action_id,
9379: p_wipEntityID => l_repAssembly.txn_src_id,
9380: p_repLineID => l_repAssembly.rep_line_id,
9381: p_tblName => WIP_CONSTANTS.MMTT_TBL,
9382: p_endDebug => fnd_api.g_false,
9383: x_returnStatus => x_returnStatus);
9384:
9385: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

Line 9391: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE) THEN

9387: raise fnd_api.g_exc_unexpected_error;
9388: END IF;
9389: END LOOP;
9390:
9391: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE) THEN
9392: snapshot_online(p_mtl_header_id => p_gib.assy_header_id,
9393: p_org_id => l_move.org_id,
9394: p_txn_type => p_txn_type,
9395: p_txn_type_id => l_txn_type_id,

Line 9404: IF(p_txn_type = WIP_CONSTANTS.RET_TXN) THEN

9400: l_errMsg := 'wip_movProc_priv.snapshot_online failed';
9401: raise fnd_api.g_exc_unexpected_error;
9402: END IF; -- check return status
9403: ELSE -- move is background
9404: IF(p_txn_type = WIP_CONSTANTS.RET_TXN) THEN
9405: snapshot_background(p_group_id => p_gib.group_id,
9406: p_txn_date => p_gib.txn_date,
9407: x_returnStatus => x_returnStatus);
9408:

Line 9419: IF (l_logLevel <= wip_constants.trace_logging) THEN

9415:
9416: x_returnStatus := fnd_api.g_ret_sts_success;
9417:
9418: -- write to the log file
9419: IF (l_logLevel <= wip_constants.trace_logging) THEN
9420: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.ez_completion',
9421: p_procReturnStatus => x_returnStatus,
9422: p_msg => 'procedure complete',
9423: x_returnStatus => l_returnStatus);

Line 9429: IF (l_logLevel <= wip_constants.trace_logging) THEN

9425:
9426: EXCEPTION
9427: WHEN fnd_api.g_exc_unexpected_error THEN
9428: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
9429: IF (l_logLevel <= wip_constants.trace_logging) THEN
9430: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.ez_completion',
9431: p_procReturnStatus => x_returnStatus,
9432: p_msg => l_errMsg,
9433: x_returnStatus => l_returnStatus);

Line 9440: IF (l_logLevel <= wip_constants.trace_logging) THEN

9436: WHEN others THEN
9437: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
9438: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
9439:
9440: IF (l_logLevel <= wip_constants.trace_logging) THEN
9441: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.ez_completion',
9442: p_procReturnStatus => x_returnStatus,
9443: p_msg => l_errMsg,
9444: x_returnStatus => l_returnStatus);

Line 9466: IF (l_logLevel <= wip_constants.trace_logging) THEN

9462: l_errMsg VARCHAR2(240);
9463: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
9464:
9465: BEGIN
9466: IF (l_logLevel <= wip_constants.trace_logging) THEN
9467: l_params(1).paramName := 'p_group_id';
9468: l_params(1).paramValue := p_gib.group_id;
9469: l_params(2).paramName := 'p_txn_date';
9470: l_params(2).paramValue := p_gib.txn_date;

Line 9504: AND wmti1.process_phase = WIP_CONSTANTS.MOVE_PROC

9500: WHERE wro1.rowid = wro.rowid
9501: -- The WO rows to be updated are identIFied by the rowids.
9502: -- For each such row, go back and sum the quantities from WMTI
9503: AND wmti1.group_id = p_gib.group_id
9504: AND wmti1.process_phase = WIP_CONSTANTS.MOVE_PROC
9505: AND wmti1.process_status = WIP_CONSTANTS.RUNNING
9506: AND TRUNC(wmti1.transaction_date) = TRUNC(p_gib.txn_date)
9507: AND wmti1.overcompletion_transaction_id IS NOT NULL
9508: AND wmti1.overcompletion_primary_qty IS NULL

Line 9505: AND wmti1.process_status = WIP_CONSTANTS.RUNNING

9501: -- The WO rows to be updated are identIFied by the rowids.
9502: -- For each such row, go back and sum the quantities from WMTI
9503: AND wmti1.group_id = p_gib.group_id
9504: AND wmti1.process_phase = WIP_CONSTANTS.MOVE_PROC
9505: AND wmti1.process_status = WIP_CONSTANTS.RUNNING
9506: AND TRUNC(wmti1.transaction_date) = TRUNC(p_gib.txn_date)
9507: AND wmti1.overcompletion_transaction_id IS NOT NULL
9508: AND wmti1.overcompletion_primary_qty IS NULL
9509: AND wro1.wip_entity_id = wmti1.wip_entity_id

Line 9522: AND wmti2.process_phase = WIP_CONSTANTS.MOVE_PROC

9518: FROM wip_requirement_operations wro2,
9519: wip_move_txn_interface wmti2,
9520: wip_move_txn_allocations wma2
9521: WHERE wmti2.group_id = p_gib.group_id
9522: AND wmti2.process_phase = WIP_CONSTANTS.MOVE_PROC
9523: AND wmti2.process_status = WIP_CONSTANTS.RUNNING
9524: AND TRUNC(wmti2.transaction_date) = TRUNC(p_gib.txn_date)
9525: AND wmti2.overcompletion_transaction_id IS NOT NULL
9526: AND wmti2.overcompletion_primary_qty IS NULL

Line 9523: AND wmti2.process_status = WIP_CONSTANTS.RUNNING

9519: wip_move_txn_interface wmti2,
9520: wip_move_txn_allocations wma2
9521: WHERE wmti2.group_id = p_gib.group_id
9522: AND wmti2.process_phase = WIP_CONSTANTS.MOVE_PROC
9523: AND wmti2.process_status = WIP_CONSTANTS.RUNNING
9524: AND TRUNC(wmti2.transaction_date) = TRUNC(p_gib.txn_date)
9525: AND wmti2.overcompletion_transaction_id IS NOT NULL
9526: AND wmti2.overcompletion_primary_qty IS NULL
9527: -- Picked a Move txn

Line 9534: AND nvl(wro.basis_type,1) <> WIP_CONSTANTS.LOT_BASED_MTL; /* LBM Project */

9530: AND wmti2.organization_id = wma2.organization_id (+)
9531: AND wmti2.transaction_id = wma2.transaction_id (+)
9532: AND NVL(wma2.repetitive_schedule_id,0)
9533: = NVL(wro2.repetitive_schedule_id,0))
9534: AND nvl(wro.basis_type,1) <> WIP_CONSTANTS.LOT_BASED_MTL; /* LBM Project */
9535:
9536: x_returnStatus := fnd_api.g_ret_sts_success;
9537:
9538: -- write to the log file

Line 9539: IF (l_logLevel <= wip_constants.trace_logging) THEN

9535:
9536: x_returnStatus := fnd_api.g_ret_sts_success;
9537:
9538: -- write to the log file
9539: IF (l_logLevel <= wip_constants.trace_logging) THEN
9540: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.update_wro',
9541: p_procReturnStatus => x_returnStatus,
9542: p_msg => 'procedure complete',
9543: x_returnStatus => l_returnStatus);

Line 9551: IF (l_logLevel <= wip_constants.trace_logging) THEN

9547: WHEN others THEN
9548: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
9549: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
9550:
9551: IF (l_logLevel <= wip_constants.trace_logging) THEN
9552: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.update_wro',
9553: p_procReturnStatus => x_returnStatus,
9554: p_msg => l_errMsg,
9555: x_returnStatus => l_returnStatus);

Line 9583: IF (l_logLevel <= wip_constants.trace_logging) THEN

9579:
9580: BEGIN
9581: l_move := p_gib.move_profile;
9582:
9583: IF (l_logLevel <= wip_constants.trace_logging) THEN
9584: l_params(1).paramName := 'p_group_id';
9585: l_params(1).paramValue := p_gib.group_id;
9586: l_params(2).paramName := 'p_mtl_header_id';
9587: l_params(2).paramValue := p_gib.mtl_header_id;

Line 9661: IF(l_move.scheTxn = WIP_CONSTANTS.YES) THEN

9657: raise fnd_api.g_exc_unexpected_error;
9658: END IF; -- check return status
9659:
9660: -- Call repetitive allocatioin for repetitive schedule
9661: IF(l_move.scheTxn = WIP_CONSTANTS.YES) THEN
9662: rep_move_alloc(p_gib => p_gib,
9663: x_returnStatus => x_returnStatus);
9664:
9665: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

Line 9672: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN

9668: END IF; -- check return status
9669: END IF; -- check repetitive schedules
9670:
9671: -- Check for the step unit quantities for discrete and OSFM jobs
9672: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN
9673: check_qty_dj(p_gib => p_gib,
9674: x_returnStatus => x_returnStatus);
9675:
9676: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

Line 9724: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND

9720: END IF; -- check return status
9721:
9722: -- Only call the cost allocation IF schedule transactions and auto resource
9723: -- per item exist (insert into WIP_TXN_ALLOCATIONS)
9724: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND
9725: l_move.rsrcItem = WIP_CONSTANTS.YES) THEN
9726:
9727: insert_txn_alloc(p_gib => p_gib,
9728: x_returnStatus => x_returnStatus);

Line 9725: l_move.rsrcItem = WIP_CONSTANTS.YES) THEN

9721:
9722: -- Only call the cost allocation IF schedule transactions and auto resource
9723: -- per item exist (insert into WIP_TXN_ALLOCATIONS)
9724: IF(l_move.scheTxn = WIP_CONSTANTS.YES AND
9725: l_move.rsrcItem = WIP_CONSTANTS.YES) THEN
9726:
9727: insert_txn_alloc(p_gib => p_gib,
9728: x_returnStatus => x_returnStatus);
9729:

Line 9776: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE) THEN

9772: END IF; -- check return status
9773: END IF;
9774: END IF;
9775:
9776: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE) THEN
9777: -- Only update quantity_completed if online. For background, we will update
9778: -- quantity completed in update_wo_and_snapshot
9779: update_complete_qty(p_gib => p_gib,
9780: x_returnStatus => x_returnStatus);

Line 9810: IF (l_logLevel <= wip_constants.trace_logging) THEN

9806:
9807: x_returnStatus := fnd_api.g_ret_sts_success;
9808:
9809: -- write to the log file
9810: IF (l_logLevel <= wip_constants.trace_logging) THEN
9811: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.move_txns',
9812: p_procReturnStatus => x_returnStatus,
9813: p_msg => 'procedure complete',
9814: x_returnStatus => l_returnStatus);

Line 9820: IF (l_logLevel <= wip_constants.trace_logging) THEN

9816:
9817: EXCEPTION
9818: WHEN fnd_api.g_exc_unexpected_error THEN
9819: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
9820: IF (l_logLevel <= wip_constants.trace_logging) THEN
9821: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.move_txns',
9822: p_procReturnStatus => x_returnStatus,
9823: p_msg => l_errMsg,
9824: x_returnStatus => l_returnStatus);

Line 9831: IF (l_logLevel <= wip_constants.trace_logging) THEN

9827: WHEN others THEN
9828: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
9829: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
9830:
9831: IF (l_logLevel <= wip_constants.trace_logging) THEN
9832: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.move_txns',
9833: p_procReturnStatus => x_returnStatus,
9834: p_msg => l_errMsg,
9835: x_returnStatus => l_returnStatus);

Line 9887: AND wmti.process_phase = WIP_CONSTANTS.BF_SETUP

9883: wmti.reference reference
9884: FROM wip_move_txn_interface wmti
9885: WHERE wmti.group_id = p_group_id
9886: AND TRUNC(wmti.transaction_date)= TRUNC(p_txn_date)
9887: AND wmti.process_phase = WIP_CONSTANTS.BF_SETUP
9888: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
9889:
9890: CURSOR c_move_online IS
9891: SELECT NVL(last_updated_by, -1) user_id,

Line 9888: AND wmti.process_status = WIP_CONSTANTS.RUNNING;

9884: FROM wip_move_txn_interface wmti
9885: WHERE wmti.group_id = p_group_id
9886: AND TRUNC(wmti.transaction_date)= TRUNC(p_txn_date)
9887: AND wmti.process_phase = WIP_CONSTANTS.BF_SETUP
9888: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
9889:
9890: CURSOR c_move_online IS
9891: SELECT NVL(last_updated_by, -1) user_id,
9892: NVL(last_update_login, -1) login_id,

Line 9909: -- AND process_phase = WIP_CONSTANTS.MOVE_PROC

9905: to_intraoperation_step_type to_step
9906: FROM wip_move_txn_interface
9907: WHERE group_id = p_group_id
9908: /* Comment out the check below because UI may need to use validation logic */
9909: -- AND process_phase = WIP_CONSTANTS.MOVE_PROC
9910: AND process_status = WIP_CONSTANTS.RUNNING;
9911:
9912: CURSOR c_qa_id(p_txn_date DATE) IS
9913: SELECT qa_collection_id

Line 9910: AND process_status = WIP_CONSTANTS.RUNNING;

9906: FROM wip_move_txn_interface
9907: WHERE group_id = p_group_id
9908: /* Comment out the check below because UI may need to use validation logic */
9909: -- AND process_phase = WIP_CONSTANTS.MOVE_PROC
9910: AND process_status = WIP_CONSTANTS.RUNNING;
9911:
9912: CURSOR c_qa_id(p_txn_date DATE) IS
9913: SELECT qa_collection_id
9914: FROM wip_move_txn_interface

Line 9916: AND process_phase = WIP_CONSTANTS.MOVE_PROC

9912: CURSOR c_qa_id(p_txn_date DATE) IS
9913: SELECT qa_collection_id
9914: FROM wip_move_txn_interface
9915: WHERE group_id = p_group_id
9916: AND process_phase = WIP_CONSTANTS.MOVE_PROC
9917: AND process_status = WIP_CONSTANTS.RUNNING
9918: AND TRUNC(transaction_date)= TRUNC(p_txn_date)
9919: -- Only enable QA for move, scrap and reject. For EZ completion/return,
9920: -- material processor will call it.

Line 9917: AND process_status = WIP_CONSTANTS.RUNNING

9913: SELECT qa_collection_id
9914: FROM wip_move_txn_interface
9915: WHERE group_id = p_group_id
9916: AND process_phase = WIP_CONSTANTS.MOVE_PROC
9917: AND process_status = WIP_CONSTANTS.RUNNING
9918: AND TRUNC(transaction_date)= TRUNC(p_txn_date)
9919: -- Only enable QA for move, scrap and reject. For EZ completion/return,
9920: -- material processor will call it.
9921: AND transaction_type = WIP_CONSTANTS.MOVE_TXN

Line 9921: AND transaction_type = WIP_CONSTANTS.MOVE_TXN

9917: AND process_status = WIP_CONSTANTS.RUNNING
9918: AND TRUNC(transaction_date)= TRUNC(p_txn_date)
9919: -- Only enable QA for move, scrap and reject. For EZ completion/return,
9920: -- material processor will call it.
9921: AND transaction_type = WIP_CONSTANTS.MOVE_TXN
9922: AND qa_collection_id IS NOT NULL;
9923:
9924: CURSOR c_txn_date IS
9925: SELECT DISTINCT TRUNC(transaction_date)

Line 9928: AND process_status = WIP_CONSTANTS.RUNNING

9924: CURSOR c_txn_date IS
9925: SELECT DISTINCT TRUNC(transaction_date)
9926: FROM wip_move_txn_interface
9927: WHERE group_id = p_group_id
9928: AND process_status = WIP_CONSTANTS.RUNNING
9929: order by 1; /*Bug 7314913: Added order by clause*/
9930:
9931: /*Bug 13992087: This cursor returns jobs submitted for EZ_Completion (Move & Complete)*/
9932: /*Bug 16483751: Added the check so that EZ completions for repetetive schedules do not error out */

Line 9937: AND wmti.process_status = WIP_CONSTANTS.RUNNING

9933: CURSOR c_jobs IS
9934: select wmti.wip_entity_id, wmti.transaction_id txn_id, wmti.transaction_type txn_type
9935: from wip_move_txn_interface wmti,wip_entities we
9936: where wmti.group_id = p_group_id
9937: AND wmti.process_status = WIP_CONSTANTS.RUNNING
9938: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
9939: AND we.wip_entity_id=wmti.wip_entity_id
9940: AND we.entity_type <>WIP_CONSTANTS.REPETITIVE;
9941:

Line 9938: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

9934: select wmti.wip_entity_id, wmti.transaction_id txn_id, wmti.transaction_type txn_type
9935: from wip_move_txn_interface wmti,wip_entities we
9936: where wmti.group_id = p_group_id
9937: AND wmti.process_status = WIP_CONSTANTS.RUNNING
9938: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
9939: AND we.wip_entity_id=wmti.wip_entity_id
9940: AND we.entity_type <>WIP_CONSTANTS.REPETITIVE;
9941:
9942: l_gib group_rec_t;

Line 9940: AND we.entity_type <>WIP_CONSTANTS.REPETITIVE;

9936: where wmti.group_id = p_group_id
9937: AND wmti.process_status = WIP_CONSTANTS.RUNNING
9938: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
9939: AND we.wip_entity_id=wmti.wip_entity_id
9940: AND we.entity_type <>WIP_CONSTANTS.REPETITIVE;
9941:
9942: l_gib group_rec_t;
9943: l_move_online c_move_online%ROWTYPE;
9944: l_backflush c_backflush%ROWTYPE;

Line 9981: IF (l_logLevel <= wip_constants.trace_logging) THEN

9977: IF(fnd_api.to_boolean(p_initMsgList)) THEN
9978: fnd_msg_pub.initialize;
9979: END IF;
9980:
9981: IF (l_logLevel <= wip_constants.trace_logging) THEN
9982: l_params(1).paramName := 'p_group_id';
9983: l_params(1).paramValue := p_group_id;
9984: l_params(2).paramName := 'p_child_txn_id';
9985: l_params(2).paramValue := p_child_txn_id;

Line 10016: IF(p_move_mode = WIP_CONSTANTS.ONLINE) THEN

10012: p_params => l_params,
10013: x_returnStatus => l_returnStatus);
10014: END IF;
10015:
10016: IF(p_move_mode = WIP_CONSTANTS.ONLINE) THEN
10017:
10018: -- this cursor suppose to return only one record because transaction_id
10019: -- is primary_key
10020: FOR l_move_online IN c_move_online LOOP

Line 10033: IF(l_move_online.txn_type = WIP_CONSTANTS.COMP_TXN) THEN

10029: l_gib.move_profile.fmStep := l_move_online.fm_step;
10030: l_gib.move_profile.toOp := l_move_online.to_op;
10031: l_gib.move_profile.toStep := l_move_online.to_step;
10032:
10033: IF(l_move_online.txn_type = WIP_CONSTANTS.COMP_TXN) THEN
10034: l_gib.move_profile.easyComplete := WIP_CONSTANTS.YES;
10035: ELSE
10036: l_gib.move_profile.easyComplete := WIP_CONSTANTS.NO;
10037: END IF;

Line 10034: l_gib.move_profile.easyComplete := WIP_CONSTANTS.YES;

10030: l_gib.move_profile.toOp := l_move_online.to_op;
10031: l_gib.move_profile.toStep := l_move_online.to_step;
10032:
10033: IF(l_move_online.txn_type = WIP_CONSTANTS.COMP_TXN) THEN
10034: l_gib.move_profile.easyComplete := WIP_CONSTANTS.YES;
10035: ELSE
10036: l_gib.move_profile.easyComplete := WIP_CONSTANTS.NO;
10037: END IF;
10038:

Line 10036: l_gib.move_profile.easyComplete := WIP_CONSTANTS.NO;

10032:
10033: IF(l_move_online.txn_type = WIP_CONSTANTS.COMP_TXN) THEN
10034: l_gib.move_profile.easyComplete := WIP_CONSTANTS.YES;
10035: ELSE
10036: l_gib.move_profile.easyComplete := WIP_CONSTANTS.NO;
10037: END IF;
10038:
10039: IF(l_move_online.txn_type = WIP_CONSTANTS.RET_TXN) THEN
10040: l_gib.move_profile.easyReturn := WIP_CONSTANTS.YES;

Line 10039: IF(l_move_online.txn_type = WIP_CONSTANTS.RET_TXN) THEN

10035: ELSE
10036: l_gib.move_profile.easyComplete := WIP_CONSTANTS.NO;
10037: END IF;
10038:
10039: IF(l_move_online.txn_type = WIP_CONSTANTS.RET_TXN) THEN
10040: l_gib.move_profile.easyReturn := WIP_CONSTANTS.YES;
10041: ELSE
10042: l_gib.move_profile.easyReturn := WIP_CONSTANTS.NO;
10043: END IF;

Line 10040: l_gib.move_profile.easyReturn := WIP_CONSTANTS.YES;

10036: l_gib.move_profile.easyComplete := WIP_CONSTANTS.NO;
10037: END IF;
10038:
10039: IF(l_move_online.txn_type = WIP_CONSTANTS.RET_TXN) THEN
10040: l_gib.move_profile.easyReturn := WIP_CONSTANTS.YES;
10041: ELSE
10042: l_gib.move_profile.easyReturn := WIP_CONSTANTS.NO;
10043: END IF;
10044:

Line 10042: l_gib.move_profile.easyReturn := WIP_CONSTANTS.NO;

10038:
10039: IF(l_move_online.txn_type = WIP_CONSTANTS.RET_TXN) THEN
10040: l_gib.move_profile.easyReturn := WIP_CONSTANTS.YES;
10041: ELSE
10042: l_gib.move_profile.easyReturn := WIP_CONSTANTS.NO;
10043: END IF;
10044:
10045: IF(l_move_online.entity_type = WIP_CONSTANTS.DISCRETE OR
10046: l_move_online.entity_type = WIP_CONSTANTS.LOTBASED) THEN

Line 10045: IF(l_move_online.entity_type = WIP_CONSTANTS.DISCRETE OR

10041: ELSE
10042: l_gib.move_profile.easyReturn := WIP_CONSTANTS.NO;
10043: END IF;
10044:
10045: IF(l_move_online.entity_type = WIP_CONSTANTS.DISCRETE OR
10046: l_move_online.entity_type = WIP_CONSTANTS.LOTBASED) THEN
10047: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
10048: ELSE
10049: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;

Line 10046: l_move_online.entity_type = WIP_CONSTANTS.LOTBASED) THEN

10042: l_gib.move_profile.easyReturn := WIP_CONSTANTS.NO;
10043: END IF;
10044:
10045: IF(l_move_online.entity_type = WIP_CONSTANTS.DISCRETE OR
10046: l_move_online.entity_type = WIP_CONSTANTS.LOTBASED) THEN
10047: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
10048: ELSE
10049: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;
10050: END IF;

Line 10047: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;

10043: END IF;
10044:
10045: IF(l_move_online.entity_type = WIP_CONSTANTS.DISCRETE OR
10046: l_move_online.entity_type = WIP_CONSTANTS.LOTBASED) THEN
10047: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
10048: ELSE
10049: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;
10050: END IF;
10051:

Line 10049: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;

10045: IF(l_move_online.entity_type = WIP_CONSTANTS.DISCRETE OR
10046: l_move_online.entity_type = WIP_CONSTANTS.LOTBASED) THEN
10047: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
10048: ELSE
10049: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;
10050: END IF;
10051:
10052: IF(l_move_online.entity_type = WIP_CONSTANTS.REPETITIVE) THEN
10053: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;

Line 10052: IF(l_move_online.entity_type = WIP_CONSTANTS.REPETITIVE) THEN

10048: ELSE
10049: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;
10050: END IF;
10051:
10052: IF(l_move_online.entity_type = WIP_CONSTANTS.REPETITIVE) THEN
10053: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;
10054: ELSE
10055: l_gib.move_profile.scheTxn := WIP_CONSTANTS.NO;
10056: END IF;

Line 10053: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;

10049: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;
10050: END IF;
10051:
10052: IF(l_move_online.entity_type = WIP_CONSTANTS.REPETITIVE) THEN
10053: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;
10054: ELSE
10055: l_gib.move_profile.scheTxn := WIP_CONSTANTS.NO;
10056: END IF;
10057: -- the others 4 parameters will be initialized in get_move_profile()

Line 10055: l_gib.move_profile.scheTxn := WIP_CONSTANTS.NO;

10051:
10052: IF(l_move_online.entity_type = WIP_CONSTANTS.REPETITIVE) THEN
10053: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;
10054: ELSE
10055: l_gib.move_profile.scheTxn := WIP_CONSTANTS.NO;
10056: END IF;
10057: -- the others 4 parameters will be initialized in get_move_profile()
10058: -- rsrcItem, rsrcLot, poReqItem, poReqLot
10059:

Line 10064: l_gib.move_mode := WIP_CONSTANTS.ONLINE;

10060: -- initialize value for l_gib
10061: l_gib.group_id := p_group_id;
10062: l_gib.assy_header_id := p_assy_header_id;
10063: l_gib.mtl_header_id := p_mtl_header_id;
10064: l_gib.move_mode := WIP_CONSTANTS.ONLINE;
10065: l_gib.bf_mode := p_bf_mode; -- l_bf_mode;
10066: l_gib.mtl_mode := p_mtl_mode; -- l_mtl_mode;
10067: l_gib.process_phase := WIP_CONSTANTS.MOVE_PROC;
10068: l_gib.process_status := WIP_CONSTANTS.RUNNING;

Line 10067: l_gib.process_phase := WIP_CONSTANTS.MOVE_PROC;

10063: l_gib.mtl_header_id := p_mtl_header_id;
10064: l_gib.move_mode := WIP_CONSTANTS.ONLINE;
10065: l_gib.bf_mode := p_bf_mode; -- l_bf_mode;
10066: l_gib.mtl_mode := p_mtl_mode; -- l_mtl_mode;
10067: l_gib.process_phase := WIP_CONSTANTS.MOVE_PROC;
10068: l_gib.process_status := WIP_CONSTANTS.RUNNING;
10069: l_gib.time_out := p_time_out;
10070: l_gib.intf_tbl_name := 'WIP_MOVE_TXN_INTERFACE';
10071: l_gib.user_id := l_move_online.user_id;

Line 10068: l_gib.process_status := WIP_CONSTANTS.RUNNING;

10064: l_gib.move_mode := WIP_CONSTANTS.ONLINE;
10065: l_gib.bf_mode := p_bf_mode; -- l_bf_mode;
10066: l_gib.mtl_mode := p_mtl_mode; -- l_mtl_mode;
10067: l_gib.process_phase := WIP_CONSTANTS.MOVE_PROC;
10068: l_gib.process_status := WIP_CONSTANTS.RUNNING;
10069: l_gib.time_out := p_time_out;
10070: l_gib.intf_tbl_name := 'WIP_MOVE_TXN_INTERFACE';
10071: l_gib.user_id := l_move_online.user_id;
10072: l_gib.login_id := l_move_online.login_id;

Line 10076: l_gib.seq_move := WIP_CONSTANTS.NO;

10072: l_gib.login_id := l_move_online.login_id;
10073: l_gib.request_id := l_move_online.req_id;
10074: l_gib.application_id := l_move_online.appl_id;
10075: l_gib.program_id := l_move_online.prog_id;
10076: l_gib.seq_move := WIP_CONSTANTS.NO;
10077: END LOOP; -- c_move_online
10078: ELSE -- move mode is background
10079: l_gib.group_id := p_group_id;
10080: l_gib.assy_header_id := p_assy_header_id;

Line 10082: l_gib.move_mode := WIP_CONSTANTS.BACKGROUND;

10078: ELSE -- move mode is background
10079: l_gib.group_id := p_group_id;
10080: l_gib.assy_header_id := p_assy_header_id;
10081: l_gib.mtl_header_id := p_mtl_header_id;
10082: l_gib.move_mode := WIP_CONSTANTS.BACKGROUND;
10083: l_gib.bf_mode := p_bf_mode; -- l_bf_mode;
10084: l_gib.mtl_mode := p_mtl_mode; -- l_mtl_mode;
10085: l_gib.process_phase := p_proc_phase;
10086: l_gib.process_status := WIP_CONSTANTS.RUNNING;

Line 10086: l_gib.process_status := WIP_CONSTANTS.RUNNING;

10082: l_gib.move_mode := WIP_CONSTANTS.BACKGROUND;
10083: l_gib.bf_mode := p_bf_mode; -- l_bf_mode;
10084: l_gib.mtl_mode := p_mtl_mode; -- l_mtl_mode;
10085: l_gib.process_phase := p_proc_phase;
10086: l_gib.process_status := WIP_CONSTANTS.RUNNING;
10087: l_gib.time_out := p_time_out;
10088: l_gib.intf_tbl_name := 'WIP_MOVE_TXN_INTERFACE';
10089: l_gib.user_id := fnd_global.user_id;
10090: l_gib.login_id := fnd_global.conc_login_id;

Line 10094: l_gib.seq_move := NVL(p_seq_move, WIP_CONSTANTS.NO);

10090: l_gib.login_id := fnd_global.conc_login_id;
10091: l_gib.request_id := fnd_global.conc_request_id;
10092: l_gib.application_id := fnd_global.prog_appl_id;
10093: l_gib.program_id := fnd_global.conc_program_id;
10094: l_gib.seq_move := NVL(p_seq_move, WIP_CONSTANTS.NO);
10095: END IF; -- move is online
10096:
10097: /*Bug 13992087: Check if the job associated to any EZ Completion record is locked. If yes, then error that transaction*/
10098: wip_logger.log('Check to see if job associated to any EZ Completion WMTI record is locked', l_returnStatus);

Line 10108: when wip_constants.records_locked then

10104: where wip_entity_id = l_jobs.wip_entity_id
10105: for update nowait;
10106: wip_logger.log('no lock existed for this job', l_returnStatus);
10107: exception
10108: when wip_constants.records_locked then
10109: wip_logger.log('Job is locked', l_returnStatus);
10110: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN
10111: wip_logger.log('background mode is ON', l_returnStatus);
10112: /* Update process status to error */

Line 10110: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN

10106: wip_logger.log('no lock existed for this job', l_returnStatus);
10107: exception
10108: when wip_constants.records_locked then
10109: wip_logger.log('Job is locked', l_returnStatus);
10110: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN
10111: wip_logger.log('background mode is ON', l_returnStatus);
10112: /* Update process status to error */
10113: UPDATE wip_move_txn_interface
10114: SET process_status = WIP_CONSTANTS.ERROR

Line 10114: SET process_status = WIP_CONSTANTS.ERROR

10110: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN
10111: wip_logger.log('background mode is ON', l_returnStatus);
10112: /* Update process status to error */
10113: UPDATE wip_move_txn_interface
10114: SET process_status = WIP_CONSTANTS.ERROR
10115: WHERE group_id = p_group_id
10116: AND process_status = WIP_CONSTANTS.RUNNING
10117: AND transaction_id = l_jobs.txn_id;
10118: wip_logger.log('Updated WMTI record to error', l_returnStatus);

Line 10116: AND process_status = WIP_CONSTANTS.RUNNING

10112: /* Update process status to error */
10113: UPDATE wip_move_txn_interface
10114: SET process_status = WIP_CONSTANTS.ERROR
10115: WHERE group_id = p_group_id
10116: AND process_status = WIP_CONSTANTS.RUNNING
10117: AND transaction_id = l_jobs.txn_id;
10118: wip_logger.log('Updated WMTI record to error', l_returnStatus);
10119:
10120: select WIP_ENTITY_NAME into l_job_name from wip_entities where WIP_ENTITY_ID = l_jobs.wip_entity_id;

Line 10162: IF(p_proc_phase = WIP_CONSTANTS.MOVE_VAL) THEN

10158: END LOOP;
10159: wip_logger.log('Completed the check for Jobs being locked', l_returnStatus);
10160: /*END 13992087*/
10161:
10162: IF(p_proc_phase = WIP_CONSTANTS.MOVE_VAL) THEN
10163: /*----------------+
10164: | Move Validation |
10165: +-----------------*/
10166: -- derive and validate all necessary info

Line 10173: -- WIP_CONSTANTS.ERROR, and those error records will not be picked up by

10169:
10170: -- There is no return status from this routine. IF some record error out,
10171: -- just neglect it and continue validating other records. The error record
10172: -- will have process_status in WIP_MOVE_TXN_INTERFACE equal to (3) or
10173: -- WIP_CONSTANTS.ERROR, and those error records will not be picked up by
10174: -- move_txns. The error message also show up in WIP_TXN_INTERFACE_ERRORS
10175: END IF; -- Move Validation
10176:
10177: OPEN c_txn_date;

Line 10183: IF(p_proc_phase = WIP_CONSTANTS.MOVE_VAL OR

10179: BEGIN
10180: FETCH c_txn_date INTO l_gib.txn_date;
10181: EXIT WHEN c_txn_date%NOTFOUND;
10182: SAVEPOINT s_move_proc;
10183: IF(p_proc_phase = WIP_CONSTANTS.MOVE_VAL OR
10184: p_proc_phase = WIP_CONSTANTS.MOVE_PROC) THEN
10185:
10186: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN
10187:

Line 10184: p_proc_phase = WIP_CONSTANTS.MOVE_PROC) THEN

10180: FETCH c_txn_date INTO l_gib.txn_date;
10181: EXIT WHEN c_txn_date%NOTFOUND;
10182: SAVEPOINT s_move_proc;
10183: IF(p_proc_phase = WIP_CONSTANTS.MOVE_VAL OR
10184: p_proc_phase = WIP_CONSTANTS.MOVE_PROC) THEN
10185:
10186: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN
10187:
10188: SELECT SUM(DECODE(entity_type,

Line 10186: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN

10182: SAVEPOINT s_move_proc;
10183: IF(p_proc_phase = WIP_CONSTANTS.MOVE_VAL OR
10184: p_proc_phase = WIP_CONSTANTS.MOVE_PROC) THEN
10185:
10186: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN
10187:
10188: SELECT SUM(DECODE(entity_type,
10189: WIP_CONSTANTS.DISCRETE, 1,
10190: WIP_CONSTANTS.LOTBASED, 1,

Line 10189: WIP_CONSTANTS.DISCRETE, 1,

10185:
10186: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN
10187:
10188: SELECT SUM(DECODE(entity_type,
10189: WIP_CONSTANTS.DISCRETE, 1,
10190: WIP_CONSTANTS.LOTBASED, 1,
10191: 0)),
10192: SUM(DECODE(entity_type,WIP_CONSTANTS.REPETITIVE,1,0))
10193: INTO l_job,

Line 10190: WIP_CONSTANTS.LOTBASED, 1,

10186: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN
10187:
10188: SELECT SUM(DECODE(entity_type,
10189: WIP_CONSTANTS.DISCRETE, 1,
10190: WIP_CONSTANTS.LOTBASED, 1,
10191: 0)),
10192: SUM(DECODE(entity_type,WIP_CONSTANTS.REPETITIVE,1,0))
10193: INTO l_job,
10194: l_sche

Line 10192: SUM(DECODE(entity_type,WIP_CONSTANTS.REPETITIVE,1,0))

10188: SELECT SUM(DECODE(entity_type,
10189: WIP_CONSTANTS.DISCRETE, 1,
10190: WIP_CONSTANTS.LOTBASED, 1,
10191: 0)),
10192: SUM(DECODE(entity_type,WIP_CONSTANTS.REPETITIVE,1,0))
10193: INTO l_job,
10194: l_sche
10195: FROM wip_move_txn_interface wmti
10196: WHERE wmti.group_id = l_gib.group_id

Line 10198: AND process_phase = WIP_CONSTANTS.MOVE_PROC

10194: l_sche
10195: FROM wip_move_txn_interface wmti
10196: WHERE wmti.group_id = l_gib.group_id
10197: AND TRUNC(transaction_date)= TRUNC(l_gib.txn_date)
10198: AND process_phase = WIP_CONSTANTS.MOVE_PROC
10199: AND process_status = WIP_CONSTANTS.RUNNING;
10200:
10201: IF(l_job > 0 AND l_sche > 0) THEN
10202: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;

Line 10199: AND process_status = WIP_CONSTANTS.RUNNING;

10195: FROM wip_move_txn_interface wmti
10196: WHERE wmti.group_id = l_gib.group_id
10197: AND TRUNC(transaction_date)= TRUNC(l_gib.txn_date)
10198: AND process_phase = WIP_CONSTANTS.MOVE_PROC
10199: AND process_status = WIP_CONSTANTS.RUNNING;
10200:
10201: IF(l_job > 0 AND l_sche > 0) THEN
10202: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
10203: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;

Line 10202: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;

10198: AND process_phase = WIP_CONSTANTS.MOVE_PROC
10199: AND process_status = WIP_CONSTANTS.RUNNING;
10200:
10201: IF(l_job > 0 AND l_sche > 0) THEN
10202: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
10203: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;
10204: ELSIF(l_job > 0) THEN
10205: l_gib.move_profile.entity_type := WIP_CONSTANTS.DISCRETE;
10206: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;

Line 10203: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;

10199: AND process_status = WIP_CONSTANTS.RUNNING;
10200:
10201: IF(l_job > 0 AND l_sche > 0) THEN
10202: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
10203: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;
10204: ELSIF(l_job > 0) THEN
10205: l_gib.move_profile.entity_type := WIP_CONSTANTS.DISCRETE;
10206: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
10207: l_gib.move_profile.scheTxn := WIP_CONSTANTS.NO;

Line 10205: l_gib.move_profile.entity_type := WIP_CONSTANTS.DISCRETE;

10201: IF(l_job > 0 AND l_sche > 0) THEN
10202: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
10203: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;
10204: ELSIF(l_job > 0) THEN
10205: l_gib.move_profile.entity_type := WIP_CONSTANTS.DISCRETE;
10206: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
10207: l_gib.move_profile.scheTxn := WIP_CONSTANTS.NO;
10208: ELSIF(l_sche > 0) THEN
10209: l_gib.move_profile.entity_type := WIP_CONSTANTS.REPETITIVE;

Line 10206: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;

10202: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
10203: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;
10204: ELSIF(l_job > 0) THEN
10205: l_gib.move_profile.entity_type := WIP_CONSTANTS.DISCRETE;
10206: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
10207: l_gib.move_profile.scheTxn := WIP_CONSTANTS.NO;
10208: ELSIF(l_sche > 0) THEN
10209: l_gib.move_profile.entity_type := WIP_CONSTANTS.REPETITIVE;
10210: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;

Line 10207: l_gib.move_profile.scheTxn := WIP_CONSTANTS.NO;

10203: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;
10204: ELSIF(l_job > 0) THEN
10205: l_gib.move_profile.entity_type := WIP_CONSTANTS.DISCRETE;
10206: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
10207: l_gib.move_profile.scheTxn := WIP_CONSTANTS.NO;
10208: ELSIF(l_sche > 0) THEN
10209: l_gib.move_profile.entity_type := WIP_CONSTANTS.REPETITIVE;
10210: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;
10211: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;

Line 10209: l_gib.move_profile.entity_type := WIP_CONSTANTS.REPETITIVE;

10205: l_gib.move_profile.entity_type := WIP_CONSTANTS.DISCRETE;
10206: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
10207: l_gib.move_profile.scheTxn := WIP_CONSTANTS.NO;
10208: ELSIF(l_sche > 0) THEN
10209: l_gib.move_profile.entity_type := WIP_CONSTANTS.REPETITIVE;
10210: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;
10211: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;
10212: END IF; -- move profile check
10213: -- the others 6 parameters will be initialized in get_move_profile()

Line 10210: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;

10206: l_gib.move_profile.jobTxn := WIP_CONSTANTS.YES;
10207: l_gib.move_profile.scheTxn := WIP_CONSTANTS.NO;
10208: ELSIF(l_sche > 0) THEN
10209: l_gib.move_profile.entity_type := WIP_CONSTANTS.REPETITIVE;
10210: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;
10211: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;
10212: END IF; -- move profile check
10213: -- the others 6 parameters will be initialized in get_move_profile()
10214: -- rsrcItem, rsrcLot, poReqItem, poReqLot, easyComplete, easyReturn

Line 10211: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;

10207: l_gib.move_profile.scheTxn := WIP_CONSTANTS.NO;
10208: ELSIF(l_sche > 0) THEN
10209: l_gib.move_profile.entity_type := WIP_CONSTANTS.REPETITIVE;
10210: l_gib.move_profile.jobTxn := WIP_CONSTANTS.NO;
10211: l_gib.move_profile.scheTxn := WIP_CONSTANTS.YES;
10212: END IF; -- move profile check
10213: -- the others 6 parameters will be initialized in get_move_profile()
10214: -- rsrcItem, rsrcLot, poReqItem, poReqLot, easyComplete, easyReturn
10215: END IF; -- Background transactions

Line 10227: IF(l_gib.move_profile.easyReturn = WIP_CONSTANTS.YES) THEN

10223: raise fnd_api.g_exc_unexpected_error;
10224: END IF; -- check return status
10225:
10226: -- check IF easy return txns
10227: IF(l_gib.move_profile.easyReturn = WIP_CONSTANTS.YES) THEN
10228: IF(p_insertAssy = fnd_api.g_true) THEN
10229: ez_completion(p_gib => l_gib,
10230: p_txn_type => WIP_CONSTANTS.RET_TXN,
10231: x_returnStatus => x_returnStatus);

Line 10230: p_txn_type => WIP_CONSTANTS.RET_TXN,

10226: -- check IF easy return txns
10227: IF(l_gib.move_profile.easyReturn = WIP_CONSTANTS.YES) THEN
10228: IF(p_insertAssy = fnd_api.g_true) THEN
10229: ez_completion(p_gib => l_gib,
10230: p_txn_type => WIP_CONSTANTS.RET_TXN,
10231: x_returnStatus => x_returnStatus);
10232:
10233: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
10234: l_errMsg := 'wip_movProc_priv.ez_completion (return) failed';

Line 10242: p_txn_type => WIP_CONSTANTS.RET_TXN,

10238: processed with p_insertAssy = fnd_api.g_false. Added the following call to snapshot
10239: for assembly return transaction.*/
10240: snapshot_online(p_mtl_header_id => l_gib.assy_header_id,
10241: p_org_id => l_gib.move_profile.org_id,
10242: p_txn_type => WIP_CONSTANTS.RET_TXN,
10243: p_txn_type_id => WIP_CONSTANTS.RETASSY_TYPE,
10244: p_txn_action_id => WIP_CONSTANTS.RETASSY_ACTION,
10245: x_returnStatus => x_returnStatus);
10246:

Line 10243: p_txn_type_id => WIP_CONSTANTS.RETASSY_TYPE,

10239: for assembly return transaction.*/
10240: snapshot_online(p_mtl_header_id => l_gib.assy_header_id,
10241: p_org_id => l_gib.move_profile.org_id,
10242: p_txn_type => WIP_CONSTANTS.RET_TXN,
10243: p_txn_type_id => WIP_CONSTANTS.RETASSY_TYPE,
10244: p_txn_action_id => WIP_CONSTANTS.RETASSY_ACTION,
10245: x_returnStatus => x_returnStatus);
10246:
10247: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

Line 10244: p_txn_action_id => WIP_CONSTANTS.RETASSY_ACTION,

10240: snapshot_online(p_mtl_header_id => l_gib.assy_header_id,
10241: p_org_id => l_gib.move_profile.org_id,
10242: p_txn_type => WIP_CONSTANTS.RET_TXN,
10243: p_txn_type_id => WIP_CONSTANTS.RETASSY_TYPE,
10244: p_txn_action_id => WIP_CONSTANTS.RETASSY_ACTION,
10245: x_returnStatus => x_returnStatus);
10246:
10247: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
10248: l_errMsg := 'wip_movProc_priv.snapshot_online (return) failed';

Line 10260: p_txnMode => WIP_CONSTANTS.ONLINE,

10256: -- Process assembly return record
10257: wip_mtlTempProc_priv.processTemp
10258: (p_initMsgList => fnd_api.g_true,
10259: p_txnHdrID => l_gib.assy_header_id,
10260: p_txnMode => WIP_CONSTANTS.ONLINE,
10261: x_returnStatus => x_returnStatus,
10262: x_errorMsg => l_errMsg);
10263:
10264: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

Line 10290: IF(l_gib.move_profile.easyComplete = WIP_CONSTANTS.YES) THEN

10286: raise fnd_api.g_exc_unexpected_error;
10287: END IF; -- check return status
10288:
10289: -- check IF easy completion txns
10290: IF(l_gib.move_profile.easyComplete = WIP_CONSTANTS.YES) THEN
10291: IF( p_insertAssy = fnd_api.g_true) THEN
10292: ez_completion(p_gib => l_gib,
10293: p_txn_type => WIP_CONSTANTS.COMP_TXN,
10294: x_returnStatus => x_returnStatus);

Line 10293: p_txn_type => WIP_CONSTANTS.COMP_TXN,

10289: -- check IF easy completion txns
10290: IF(l_gib.move_profile.easyComplete = WIP_CONSTANTS.YES) THEN
10291: IF( p_insertAssy = fnd_api.g_true) THEN
10292: ez_completion(p_gib => l_gib,
10293: p_txn_type => WIP_CONSTANTS.COMP_TXN,
10294: x_returnStatus => x_returnStatus);
10295:
10296: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
10297: l_errMsg := 'wip_movProc_priv.ez_completion (complete) failed';

Line 10304: p_txn_type => WIP_CONSTANTS.COMP_TXN,

10300: ELSE /* Bug fix 5026797 (base 4901865) - Assembly completion/return transaction through Discrete Workstation are
10301: processed with p_insertAssy = fnd_api.g_false. Added the following call to snapshot for assembly completion transaction.*/
10302: snapshot_online(p_mtl_header_id => l_gib.assy_header_id,
10303: p_org_id => l_gib.move_profile.org_id,
10304: p_txn_type => WIP_CONSTANTS.COMP_TXN,
10305: p_txn_type_id => WIP_CONSTANTS.CPLASSY_TYPE,
10306: p_txn_action_id => WIP_CONSTANTS.CPLASSY_ACTION,
10307: x_returnStatus => x_returnStatus);
10308:

Line 10305: p_txn_type_id => WIP_CONSTANTS.CPLASSY_TYPE,

10301: processed with p_insertAssy = fnd_api.g_false. Added the following call to snapshot for assembly completion transaction.*/
10302: snapshot_online(p_mtl_header_id => l_gib.assy_header_id,
10303: p_org_id => l_gib.move_profile.org_id,
10304: p_txn_type => WIP_CONSTANTS.COMP_TXN,
10305: p_txn_type_id => WIP_CONSTANTS.CPLASSY_TYPE,
10306: p_txn_action_id => WIP_CONSTANTS.CPLASSY_ACTION,
10307: x_returnStatus => x_returnStatus);
10308:
10309: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

Line 10306: p_txn_action_id => WIP_CONSTANTS.CPLASSY_ACTION,

10302: snapshot_online(p_mtl_header_id => l_gib.assy_header_id,
10303: p_org_id => l_gib.move_profile.org_id,
10304: p_txn_type => WIP_CONSTANTS.COMP_TXN,
10305: p_txn_type_id => WIP_CONSTANTS.CPLASSY_TYPE,
10306: p_txn_action_id => WIP_CONSTANTS.CPLASSY_ACTION,
10307: x_returnStatus => x_returnStatus);
10308:
10309: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
10310: l_errMsg := 'wip_movProc_priv.snapshot_online(complete) failed';

Line 10319: IF(l_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN

10315: END IF; -- easy complete txn
10316:
10317: -- update completed quantity and take snapshot before calling inventory
10318: -- to process aseembly completion record
10319: IF(l_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN
10320: update_wo_and_snapshot(p_gib => l_gib,
10321: x_returnStatus => x_returnStatus);
10322: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
10323: l_errMsg := 'wip_movProc_priv.update_wo_and_snapshot';

Line 10355: IF (l_logLevel <= wip_constants.full_logging) THEN

10351: END LOOP; -- c_qa_id FETCH
10352:
10353: CLOSE c_qa_id; /* Bug 4204892 - Close the cursor c_qa_id to avoid ORA-6511. */
10354:
10355: IF (l_logLevel <= wip_constants.full_logging) THEN
10356: wip_logger.log(p_msg => 'QA enable success',
10357: x_returnStatus => l_returnStatus);
10358: END IF;
10359:

Line 10361: SET process_phase = WIP_CONSTANTS.BF_SETUP

10357: x_returnStatus => l_returnStatus);
10358: END IF;
10359:
10360: UPDATE wip_move_txn_interface
10361: SET process_phase = WIP_CONSTANTS.BF_SETUP
10362: WHERE group_id = p_group_id
10363: AND process_phase = WIP_CONSTANTS.MOVE_PROC
10364: AND process_status = WIP_CONSTANTS.RUNNING
10365: AND TRUNC(transaction_date) = TRUNC(l_gib.txn_date);

Line 10363: AND process_phase = WIP_CONSTANTS.MOVE_PROC

10359:
10360: UPDATE wip_move_txn_interface
10361: SET process_phase = WIP_CONSTANTS.BF_SETUP
10362: WHERE group_id = p_group_id
10363: AND process_phase = WIP_CONSTANTS.MOVE_PROC
10364: AND process_status = WIP_CONSTANTS.RUNNING
10365: AND TRUNC(transaction_date) = TRUNC(l_gib.txn_date);
10366:
10367: -- IF debug message level = 2, write statement below to log file

Line 10364: AND process_status = WIP_CONSTANTS.RUNNING

10360: UPDATE wip_move_txn_interface
10361: SET process_phase = WIP_CONSTANTS.BF_SETUP
10362: WHERE group_id = p_group_id
10363: AND process_phase = WIP_CONSTANTS.MOVE_PROC
10364: AND process_status = WIP_CONSTANTS.RUNNING
10365: AND TRUNC(transaction_date) = TRUNC(l_gib.txn_date);
10366:
10367: -- IF debug message level = 2, write statement below to log file
10368: IF (l_logLevel <= wip_constants.full_logging) THEN

Line 10368: IF (l_logLevel <= wip_constants.full_logging) THEN

10364: AND process_status = WIP_CONSTANTS.RUNNING
10365: AND TRUNC(transaction_date) = TRUNC(l_gib.txn_date);
10366:
10367: -- IF debug message level = 2, write statement below to log file
10368: IF (l_logLevel <= wip_constants.full_logging) THEN
10369: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');
10370: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
10371: fnd_message.set_token('ENTITY2', 'WIP_MOVE_TXN_INTERFACE');
10372: l_msg := fnd_message.get;

Line 10377: IF(p_allow_partial_commit = WIP_CONSTANTS.YES) THEN

10373: wip_logger.log(p_msg => l_msg,
10374: x_returnStatus => l_returnStatus);
10375: END IF;
10376:
10377: IF(p_allow_partial_commit = WIP_CONSTANTS.YES) THEN
10378: IF(l_gib.assy_header_id IS NOT NULL AND
10379: l_gib.assy_header_id <> -1) THEN
10380: -- Update lock_flag to 'Y' to prevent inventory worker pick up these
10381: -- records. After we commit, assembly completion record will be in

Line 10407: p_txnMode => WIP_CONSTANTS.ONLINE,

10403: -- Process assembly completion record
10404: wip_mtlTempProc_priv.processTemp
10405: (p_initMsgList => fnd_api.g_true,
10406: p_txnHdrID => l_gib.assy_header_id,
10407: p_txnMode => WIP_CONSTANTS.ONLINE,
10408: x_returnStatus => x_returnStatus,
10409: x_errorMsg => l_errMsg);
10410:
10411: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

Line 10420: IF(p_allow_partial_commit = WIP_CONSTANTS.YES) THEN

10416: raise fnd_api.g_exc_unexpected_error;
10417: END IF;
10418: END IF; -- check l_gib.assy_header_id
10419:
10420: IF(p_allow_partial_commit = WIP_CONSTANTS.YES) THEN
10421: -- Fixed bug 4361566. Commit to prevent dead lock from calling
10422: -- inventory TM mulitple times in the same commit cycle.
10423: COMMIT;
10424: IF(l_gib.assy_header_id IS NOT NULL AND

Line 10437: IF(p_proc_phase = WIP_CONSTANTS.MOVE_VAL OR

10433:
10434: END IF; -- Move Processing
10435:
10436: /* Backflush processing */
10437: IF(p_proc_phase = WIP_CONSTANTS.MOVE_VAL OR
10438: p_proc_phase = WIP_CONSTANTS.MOVE_PROC OR
10439: p_proc_phase = WIP_CONSTANTS.BF_SETUP) THEN
10440:
10441: IF(l_gib.bf_mode = WIP_CONSTANTS.ONLINE) THEN

Line 10438: p_proc_phase = WIP_CONSTANTS.MOVE_PROC OR

10434: END IF; -- Move Processing
10435:
10436: /* Backflush processing */
10437: IF(p_proc_phase = WIP_CONSTANTS.MOVE_VAL OR
10438: p_proc_phase = WIP_CONSTANTS.MOVE_PROC OR
10439: p_proc_phase = WIP_CONSTANTS.BF_SETUP) THEN
10440:
10441: IF(l_gib.bf_mode = WIP_CONSTANTS.ONLINE) THEN
10442: IF(p_do_backflush = fnd_api.g_true) THEN

Line 10439: p_proc_phase = WIP_CONSTANTS.BF_SETUP) THEN

10435:
10436: /* Backflush processing */
10437: IF(p_proc_phase = WIP_CONSTANTS.MOVE_VAL OR
10438: p_proc_phase = WIP_CONSTANTS.MOVE_PROC OR
10439: p_proc_phase = WIP_CONSTANTS.BF_SETUP) THEN
10440:
10441: IF(l_gib.bf_mode = WIP_CONSTANTS.ONLINE) THEN
10442: IF(p_do_backflush = fnd_api.g_true) THEN
10443: IF(l_gib.mtl_header_id IS NULL OR

Line 10441: IF(l_gib.bf_mode = WIP_CONSTANTS.ONLINE) THEN

10437: IF(p_proc_phase = WIP_CONSTANTS.MOVE_VAL OR
10438: p_proc_phase = WIP_CONSTANTS.MOVE_PROC OR
10439: p_proc_phase = WIP_CONSTANTS.BF_SETUP) THEN
10440:
10441: IF(l_gib.bf_mode = WIP_CONSTANTS.ONLINE) THEN
10442: IF(p_do_backflush = fnd_api.g_true) THEN
10443: IF(l_gib.mtl_header_id IS NULL OR
10444: l_gib.mtl_header_id = -1) THEN
10445: SELECT mtl_material_transactions_s.nextval

Line 10465: IF(l_backflush.ent_type = WIP_CONSTANTS.LOTBASED) THEN

10461: p_move_txn_id => l_backflush.txn_id,
10462: p_entity_type => l_backflush.ent_type);
10463: /* End changes for bug 4916939 */
10464: -- Call OSFM new backflush API for OSFM job.
10465: IF(l_backflush.ent_type = WIP_CONSTANTS.LOTBASED) THEN
10466: wsm_serial_support_grp.backflush_comp(
10467: p_wipEntityID => l_backflush.wip_id,
10468: p_orgID => l_backflush.org_id,
10469: p_primaryQty => l_backflush.primary_qty,

Line 10491: IF(l_ls_required = WIP_CONSTANTS.YES) THEN

10487: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
10488: l_errMsg := 'wsm_serial_support_grp.backflush_comp failed' ;
10489: raise fnd_api.g_exc_unexpected_error;
10490: ELSE
10491: IF(l_ls_required = WIP_CONSTANTS.YES) THEN
10492: -- If we need to gather more lot/serial, error out because
10493: -- we cannot gather lot/serial for background transaction.
10494: fnd_message.set_name('WIP', 'WIP_NO_LOT_SER_COMP_BKGND');
10495: fnd_msg_pub.add;

Line 10511: p_tblName => WIP_CONSTANTS.MTI_TBL,

10507: -- inventory to fail only components related to a specific move record.
10508: p_batchID => l_backflush.txn_id,
10509: p_txnType => l_backflush.txn_type,
10510: p_entityType => l_backflush.ent_type,
10511: p_tblName => WIP_CONSTANTS.MTI_TBL,
10512: p_lineID => l_backflush.line_id,
10513: p_fmOp => l_backflush.fm_op,
10514: p_fmStep => l_backflush.fm_step,
10515: p_toOp => l_backflush.to_op,

Line 10518: p_fmMoveProcessor => WIP_CONSTANTS.YES,

10514: p_fmStep => l_backflush.fm_step,
10515: p_toOp => l_backflush.to_op,
10516: p_toStep => l_backflush.to_step,
10517: p_movTxnID => l_backflush.txn_id,
10518: p_fmMoveProcessor => WIP_CONSTANTS.YES,
10519: p_mtlTxnMode => l_gib.mtl_mode,
10520: p_reasonID => l_backflush.reason_id,
10521: p_reference => l_backflush.reference,
10522: x_lotSerRequired => l_ls_required,

Line 10530: IF(l_ls_required = WIP_CONSTANTS.YES) THEN

10526: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
10527: l_errMsg := 'wip_bflProc_priv.backflush failed' ;
10528: raise fnd_api.g_exc_unexpected_error;
10529: ELSE
10530: IF(l_ls_required = WIP_CONSTANTS.YES) THEN
10531: -- If we need to gather more lot/serial, error out because
10532: -- we cannot gather lot/serial for background transaction.
10533: fnd_message.set_name('WIP', 'WIP_NO_LOT_SER_COMP_BKGND');
10534: fnd_msg_pub.add;

Line 10549: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN

10545: -- insert null into WIP_TXN_INTERFACE_ERRORS
10546: fnd_message.set_name('WIP', 'WIP_SOME_RECORDS_ERROR');
10547: l_errMsg := fnd_message.get;
10548: END IF;
10549: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN
10550: /* Update process status to error */
10551: UPDATE wip_move_txn_interface
10552: SET process_status = WIP_CONSTANTS.ERROR
10553: WHERE group_id = p_group_id

Line 10552: SET process_status = WIP_CONSTANTS.ERROR

10548: END IF;
10549: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN
10550: /* Update process status to error */
10551: UPDATE wip_move_txn_interface
10552: SET process_status = WIP_CONSTANTS.ERROR
10553: WHERE group_id = p_group_id
10554: AND process_status = WIP_CONSTANTS.RUNNING
10555: AND transaction_id = l_backflush.txn_id;
10556:

Line 10554: AND process_status = WIP_CONSTANTS.RUNNING

10550: /* Update process status to error */
10551: UPDATE wip_move_txn_interface
10552: SET process_status = WIP_CONSTANTS.ERROR
10553: WHERE group_id = p_group_id
10554: AND process_status = WIP_CONSTANTS.RUNNING
10555: AND transaction_id = l_backflush.txn_id;
10556:
10557: /* insert error messages */
10558: INSERT INTO wip_txn_interface_errors

Line 10593: IF (l_logLevel <= wip_constants.trace_logging) THEN

10589: IF(x_returnStatus = fnd_api.g_ret_sts_error) THEN
10590: -- let the user know that more lot/serial info required
10591: x_returnStatus := fnd_api.g_ret_sts_error;
10592: END IF;
10593: IF (l_logLevel <= wip_constants.trace_logging) THEN
10594: l_errMsg := 'move_txn_id: ' || l_backflush.txn_id ||
10595: ' failed because ' || l_errMsg;
10596: wip_logger.log(p_msg => l_errMsg,
10597: x_returnStatus => l_returnStatus);

Line 10619: IF (l_logLevel <= wip_constants.full_logging) THEN

10615:
10616: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
10617: -- write error into WIP_TXN_INTERFACE_ERRORS
10618: write_mtl_errors(p_mtl_header_id => l_gib.mtl_header_id);
10619: IF (l_logLevel <= wip_constants.full_logging) THEN
10620: l_errMsg := 'wip_mtlTempProc_priv.validateInterfaceTxns failed'||
10621: ' (component records)' ;
10622: wip_logger.log(p_msg => l_errMsg,
10623: x_returnStatus => l_returnStatus);

Line 10645: l_gib.mtl_mode <> WIP_CONSTANTS.NO_PROCESSING) THEN

10641: FROM mtl_material_transactions_temp
10642: WHERE transaction_header_id = l_gib.mtl_header_id;
10643:
10644: IF(l_MMTT_record > 0 AND
10645: l_gib.mtl_mode <> WIP_CONSTANTS.NO_PROCESSING) THEN
10646: -- Call material processor to process backflush components, and
10647: -- scrap assembly.
10648: wip_mtlTempProc_priv.processTemp
10649: (p_initMsgList => fnd_api.g_true,

Line 10666: process_phase = WIP_CONSTANTS.BF_SETUP,

10662: END IF; -- there is the records in MMTT with this header_id
10663: ELSE -- backflush is background
10664: UPDATE wip_move_txn_interface
10665: SET group_id = NULL,
10666: process_phase = WIP_CONSTANTS.BF_SETUP,
10667: process_status = WIP_CONSTANTS.PENDING
10668: WHERE group_id = p_group_id
10669: AND process_status = WIP_CONSTANTS.RUNNING;
10670: END IF; -- backflush is online

Line 10667: process_status = WIP_CONSTANTS.PENDING

10663: ELSE -- backflush is background
10664: UPDATE wip_move_txn_interface
10665: SET group_id = NULL,
10666: process_phase = WIP_CONSTANTS.BF_SETUP,
10667: process_status = WIP_CONSTANTS.PENDING
10668: WHERE group_id = p_group_id
10669: AND process_status = WIP_CONSTANTS.RUNNING;
10670: END IF; -- backflush is online
10671: END IF; -- Backflush Setup

Line 10669: AND process_status = WIP_CONSTANTS.RUNNING;

10665: SET group_id = NULL,
10666: process_phase = WIP_CONSTANTS.BF_SETUP,
10667: process_status = WIP_CONSTANTS.PENDING
10668: WHERE group_id = p_group_id
10669: AND process_status = WIP_CONSTANTS.RUNNING;
10670: END IF; -- backflush is online
10671: END IF; -- Backflush Setup
10672:
10673: IF(p_allow_partial_commit = WIP_CONSTANTS.YES) THEN

Line 10673: IF(p_allow_partial_commit = WIP_CONSTANTS.YES) THEN

10669: AND process_status = WIP_CONSTANTS.RUNNING;
10670: END IF; -- backflush is online
10671: END IF; -- Backflush Setup
10672:
10673: IF(p_allow_partial_commit = WIP_CONSTANTS.YES) THEN
10674: -- Fixed bug 4361566. Commit to prevent dead lock from calling
10675: -- inventory TM mulitple times in the same commit cycle.
10676: COMMIT;
10677: IF(l_MMTT_record > 0 AND

Line 10678: l_gib.mtl_mode <> WIP_CONSTANTS.NO_PROCESSING) THEN

10674: -- Fixed bug 4361566. Commit to prevent dead lock from calling
10675: -- inventory TM mulitple times in the same commit cycle.
10676: COMMIT;
10677: IF(l_MMTT_record > 0 AND
10678: l_gib.mtl_mode <> WIP_CONSTANTS.NO_PROCESSING) THEN
10679: -- Release user lock on backflush records per inventory request.
10680: inv_table_lock_pvt.release_locks(p_header_id => l_gib.mtl_header_id);
10681: END IF;
10682: -- Set savepoint again because commit will clear savepoint.

Line 10693: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN

10689: EXCEPTION
10690:
10691: WHEN fnd_api.g_exc_unexpected_error THEN
10692:
10693: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN
10694:
10695: ROLLBACK TO SAVEPOINT s_move_proc;
10696: /*Fix for bug 8473023(FP 8358813)*/
10697: /*Update the lock_flag in MMTT to be 'N' if failed in Move Processing Phase*/

Line 10702: SET process_status = WIP_CONSTANTS.ERROR

10698: clean_up(p_assy_header_id => l_gib.assy_header_id);
10699:
10700: /* Update process status to error */
10701: UPDATE wip_move_txn_interface
10702: SET process_status = WIP_CONSTANTS.ERROR
10703: WHERE group_id = p_group_id
10704: AND process_status = WIP_CONSTANTS.RUNNING
10705: AND TRUNC(transaction_date)= TRUNC(l_gib.txn_date);
10706:

Line 10704: AND process_status = WIP_CONSTANTS.RUNNING

10700: /* Update process status to error */
10701: UPDATE wip_move_txn_interface
10702: SET process_status = WIP_CONSTANTS.ERROR
10703: WHERE group_id = p_group_id
10704: AND process_status = WIP_CONSTANTS.RUNNING
10705: AND TRUNC(transaction_date)= TRUNC(l_gib.txn_date);
10706:
10707: wip_utilities.get_message_stack(p_msg =>l_errMsg);
10708: IF(l_errMsg IS NULL) THEN

Line 10757: IF (l_logLevel <= wip_constants.trace_logging) THEN

10753: ELSE
10754: ROLLBACK TO SAVEPOINT s_move_proc;
10755: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
10756: END IF;
10757: IF (l_logLevel <= wip_constants.trace_logging) THEN
10758: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.processIntf',
10759: p_procReturnStatus => x_returnStatus,
10760: p_msg => l_errMsg,
10761: x_returnStatus => l_returnStatus);

Line 10772: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN

10768: END IF; -- move mode is background
10769:
10770: WHEN others THEN
10771: ROLLBACK TO SAVEPOINT s_move_proc;
10772: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN
10773:
10774: /* Update process status to error */
10775: UPDATE wip_move_txn_interface
10776: SET process_status = WIP_CONSTANTS.ERROR

Line 10776: SET process_status = WIP_CONSTANTS.ERROR

10772: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN
10773:
10774: /* Update process status to error */
10775: UPDATE wip_move_txn_interface
10776: SET process_status = WIP_CONSTANTS.ERROR
10777: WHERE group_id = p_group_id
10778: AND process_status = WIP_CONSTANTS.RUNNING
10779: AND TRUNC(transaction_date)= TRUNC(l_gib.txn_date);
10780:

Line 10778: AND process_status = WIP_CONSTANTS.RUNNING

10774: /* Update process status to error */
10775: UPDATE wip_move_txn_interface
10776: SET process_status = WIP_CONSTANTS.ERROR
10777: WHERE group_id = p_group_id
10778: AND process_status = WIP_CONSTANTS.RUNNING
10779: AND TRUNC(transaction_date)= TRUNC(l_gib.txn_date);
10780:
10781: l_errMsg := 'unexpected error: ' || SQLERRM;
10782:

Line 10818: IF (l_logLevel <= wip_constants.trace_logging) THEN

10814: FROM wip_txn_interface_errors wtie
10815: WHERE wtie.transaction_id = wmti.transaction_id);
10816: ELSE -- move mode is online
10817: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
10818: IF (l_logLevel <= wip_constants.trace_logging) THEN
10819: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.processIntf',
10820: p_procReturnStatus => x_returnStatus,
10821: p_msg => 'unexpected error: ' || SQLERRM,
10822: x_returnStatus => l_returnStatus);

Line 10850: AND wmti.process_phase = WIP_CONSTANTS.BF_SETUP

10846: AND wmti.organization_id = msn2.current_organization_id
10847: AND wmti.wip_entity_id = msn2.wip_entity_id
10848: AND msn2.group_mark_id IS NULL
10849: AND wmti.group_id = p_group_id
10850: AND wmti.process_phase = WIP_CONSTANTS.BF_SETUP
10851: AND wmti.process_status = WIP_CONSTANTS.RUNNING
10852: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN);
10853:
10854: /*--------------------------------------+

Line 10851: AND wmti.process_status = WIP_CONSTANTS.RUNNING

10847: AND wmti.wip_entity_id = msn2.wip_entity_id
10848: AND msn2.group_mark_id IS NULL
10849: AND wmti.group_id = p_group_id
10850: AND wmti.process_phase = WIP_CONSTANTS.BF_SETUP
10851: AND wmti.process_status = WIP_CONSTANTS.RUNNING
10852: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN);
10853:
10854: /*--------------------------------------+
10855: | Delete serial move interface records |

Line 10852: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN);

10848: AND msn2.group_mark_id IS NULL
10849: AND wmti.group_id = p_group_id
10850: AND wmti.process_phase = WIP_CONSTANTS.BF_SETUP
10851: AND wmti.process_status = WIP_CONSTANTS.RUNNING
10852: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN);
10853:
10854: /*--------------------------------------+
10855: | Delete serial move interface records |
10856: +--------------------------------------*/

Line 10862: AND process_phase = WIP_CONSTANTS.BF_SETUP

10858: WHERE transaction_id IN
10859: (SELECT transaction_id
10860: FROM wip_move_txn_interface
10861: WHERE group_id = p_group_id
10862: AND process_phase = WIP_CONSTANTS.BF_SETUP
10863: AND process_status = WIP_CONSTANTS.RUNNING);
10864:
10865: /*-------------------------------+
10866: | Delete move interface records |

Line 10863: AND process_status = WIP_CONSTANTS.RUNNING);

10859: (SELECT transaction_id
10860: FROM wip_move_txn_interface
10861: WHERE group_id = p_group_id
10862: AND process_phase = WIP_CONSTANTS.BF_SETUP
10863: AND process_status = WIP_CONSTANTS.RUNNING);
10864:
10865: /*-------------------------------+
10866: | Delete move interface records |
10867: +-------------------------------*/

Line 10870: AND process_phase = WIP_CONSTANTS.BF_SETUP

10866: | Delete move interface records |
10867: +-------------------------------*/
10868: DELETE FROM wip_move_txn_interface
10869: WHERE group_id = p_group_id
10870: AND process_phase = WIP_CONSTANTS.BF_SETUP
10871: AND process_status = WIP_CONSTANTS.RUNNING;
10872:
10873: /*--------------------------------+
10874: | check for failed transactions |

Line 10871: AND process_status = WIP_CONSTANTS.RUNNING;

10867: +-------------------------------*/
10868: DELETE FROM wip_move_txn_interface
10869: WHERE group_id = p_group_id
10870: AND process_phase = WIP_CONSTANTS.BF_SETUP
10871: AND process_status = WIP_CONSTANTS.RUNNING;
10872:
10873: /*--------------------------------+
10874: | check for failed transactions |
10875: +--------------------------------*/

Line 10880: AND process_status in (WIP_CONSTANTS.ERROR, WIP_CONSTANTS.RUNNING);

10876: SELECT COUNT(1)
10877: INTO l_err_record
10878: FROM WIP_MOVE_TXN_INTERFACE
10879: WHERE GROUP_ID = p_group_id
10880: AND process_status in (WIP_CONSTANTS.ERROR, WIP_CONSTANTS.RUNNING);
10881:
10882: IF(l_err_record > 0) THEN
10883: /*===========================================================*/
10884: /* transactions in current group left in interface table - */

Line 10894: IF (l_logLevel <= wip_constants.trace_logging) THEN

10890: -- background transaction. However, WIP_SOME_RECORDS_ERROR is only
10891: -- applicable for background transaction.
10892: --fnd_message.set_name('WIP', 'WIP_SOME_RECORDS_ERROR');
10893: --fnd_msg_pub.add;
10894: IF (l_logLevel <= wip_constants.trace_logging) THEN
10895: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.processIntf',
10896: p_procReturnStatus => x_returnStatus,
10897: p_msg => 'some records error out',
10898: x_returnStatus => l_returnStatus);

Line 10913: IF (l_logLevel <= wip_constants.trace_logging) THEN

10909: x_returnStatus to error again */
10910: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
10911: ELSE
10912: x_returnStatus := fnd_api.g_ret_sts_success;
10913: IF (l_logLevel <= wip_constants.trace_logging) THEN
10914: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.processIntf',
10915: p_procReturnStatus => x_returnStatus,
10916: p_msg => 'no record in this group error out',
10917: x_returnStatus => l_returnStatus);

Line 10949: SET process_status = WIP_CONSTANTS.RUNNING,

10945: BEGIN
10946: retcode := 0; -- success
10947: /* Set process phase to 'Running' */
10948: UPDATE wip_move_txn_interface
10949: SET process_status = WIP_CONSTANTS.RUNNING,
10950: last_update_date = SYSDATE,
10951: last_update_login = fnd_global.conc_login_id,
10952: request_id = fnd_global.conc_request_id,
10953: program_application_id = fnd_global.prog_appl_id,

Line 10961: WIP_CONSTANTS.WIP_MOVE_WORKER := 'Y';

10957:
10958: -- Fixed bug 4361566. Set global variable to let inventory know that they
10959: -- should not delete lock record from their temp table. These lock records
10960: -- will be deleted when wip call inv_table_lock_pvt.release_locks.
10961: WIP_CONSTANTS.WIP_MOVE_WORKER := 'Y';
10962:
10963: wip_movProc_priv.processIntf
10964: (p_group_id => p_group_id,
10965: p_proc_phase => p_proc_phase,

Line 10967: p_move_mode => WIP_CONSTANTS.BACKGROUND,

10963: wip_movProc_priv.processIntf
10964: (p_group_id => p_group_id,
10965: p_proc_phase => p_proc_phase,
10966: p_time_out => p_time_out,
10967: p_move_mode => WIP_CONSTANTS.BACKGROUND,
10968: p_bf_mode => WIP_CONSTANTS.ONLINE,
10969: p_mtl_mode => WIP_CONSTANTS.ONLINE,
10970: p_endDebug => FND_API.G_TRUE,
10971: p_initMsgList => FND_API.G_TRUE,

Line 10968: p_bf_mode => WIP_CONSTANTS.ONLINE,

10964: (p_group_id => p_group_id,
10965: p_proc_phase => p_proc_phase,
10966: p_time_out => p_time_out,
10967: p_move_mode => WIP_CONSTANTS.BACKGROUND,
10968: p_bf_mode => WIP_CONSTANTS.ONLINE,
10969: p_mtl_mode => WIP_CONSTANTS.ONLINE,
10970: p_endDebug => FND_API.G_TRUE,
10971: p_initMsgList => FND_API.G_TRUE,
10972: p_insertAssy => FND_API.G_TRUE,

Line 10969: p_mtl_mode => WIP_CONSTANTS.ONLINE,

10965: p_proc_phase => p_proc_phase,
10966: p_time_out => p_time_out,
10967: p_move_mode => WIP_CONSTANTS.BACKGROUND,
10968: p_bf_mode => WIP_CONSTANTS.ONLINE,
10969: p_mtl_mode => WIP_CONSTANTS.ONLINE,
10970: p_endDebug => FND_API.G_TRUE,
10971: p_initMsgList => FND_API.G_TRUE,
10972: p_insertAssy => FND_API.G_TRUE,
10973: p_do_backflush => FND_API.G_TRUE,

Line 10975: p_allow_partial_commit => WIP_CONSTANTS.YES, -- Fixed bug 4361566.

10971: p_initMsgList => FND_API.G_TRUE,
10972: p_insertAssy => FND_API.G_TRUE,
10973: p_do_backflush => FND_API.G_TRUE,
10974: p_seq_move => p_seq_move,
10975: p_allow_partial_commit => WIP_CONSTANTS.YES, -- Fixed bug 4361566.
10976: x_returnStatus => l_returnStatus);
10977:
10978: -- Fixed bug 4361566. Reset global variable WIP_MOVE_WORKER to its original
10979: -- value.

Line 10980: WIP_CONSTANTS.WIP_MOVE_WORKER := 'N';

10976: x_returnStatus => l_returnStatus);
10977:
10978: -- Fixed bug 4361566. Reset global variable WIP_MOVE_WORKER to its original
10979: -- value.
10980: WIP_CONSTANTS.WIP_MOVE_WORKER := 'N';
10981:
10982: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
10983: retcode := 2; -- error
10984: -- Fixed bug 5355443. Since WIP_SOME_RECORDS_ERROR message is only

Line 11007: IF (l_logLevel <= wip_constants.trace_logging) THEN

11003: l_msg VARCHAR(240);
11004: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
11005: BEGIN
11006: -- write parameter value to log file
11007: IF (l_logLevel <= wip_constants.trace_logging) THEN
11008: l_params(1).paramName := 'p_tmp_id';
11009: l_params(1).paramValue := p_tmp_id;
11010: wip_logger.entryPoint(p_procName => 'wip_movProc_priv.repetitive_scrap',
11011: p_params => l_params,

Line 11056: AND mmtt.transaction_action_id = WIP_CONSTANTS.SCRASSY_ACTION;

11052: WHERE wmti.transaction_id = wmta.transaction_id
11053: AND wmti.organization_id = wmta.organization_id
11054: AND wmti.transaction_id = mmtt.move_transaction_id
11055: AND mmtt.transaction_temp_id = p_tmp_id
11056: AND mmtt.transaction_action_id = WIP_CONSTANTS.SCRASSY_ACTION;
11057:
11058: -- IF debug message level = 2, write statement below to log file
11059: IF (l_logLevel <= wip_constants.full_logging) THEN
11060: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');

Line 11059: IF (l_logLevel <= wip_constants.full_logging) THEN

11055: AND mmtt.transaction_temp_id = p_tmp_id
11056: AND mmtt.transaction_action_id = WIP_CONSTANTS.SCRASSY_ACTION;
11057:
11058: -- IF debug message level = 2, write statement below to log file
11059: IF (l_logLevel <= wip_constants.full_logging) THEN
11060: fnd_message.set_name('WIP', 'WIP_INSERTED_ROWS');
11061: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
11062: fnd_message.set_token('ENTITY2', 'MTL_MATERIAL_TXN_ALLOCATIONS');
11063: l_msg := fnd_message.get;

Line 11074: IF (l_logLevel <= wip_constants.trace_logging) THEN

11070: WHEN others THEN
11071: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
11072: l_msg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
11073:
11074: IF (l_logLevel <= wip_constants.trace_logging) THEN
11075: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.repetitive_scrap',
11076: p_procReturnStatus => x_returnStatus,
11077: p_msg => l_msg,
11078: x_returnStatus => l_returnStatus);

Line 11357: IF (l_log_level <= wip_constants.trace_logging) THEN

11353: so that messages from INV are not deleted */
11354: fnd_msg_pub.initialize;
11355:
11356: l_process_phase := '1';
11357: IF (l_log_level <= wip_constants.trace_logging) THEN
11358: l_params(1).paramName := 'p_group_id';
11359: l_params(1).paramValue := p_group_id;
11360: l_params(2).paramName := 'p_child_txn_id';
11361: l_params(2).paramValue := p_child_txn_id;

Line 11398: AND mti.transaction_action_id in (WIP_CONSTANTS.RETASSY_ACTION,WIP_CONSTANTS.CPLASSY_ACTION)

11394: FROM mtl_transaction_lots_interface mtli,
11395: mtl_transactions_interface mti
11396: WHERE mtli.transaction_interface_id = mti.transaction_interface_id
11397: AND mti.transaction_header_id = p_mtl_header_id
11398: AND mti.transaction_action_id in (WIP_CONSTANTS.RETASSY_ACTION,WIP_CONSTANTS.CPLASSY_ACTION)
11399: and MTI.TRANSACTION_TYPE_ID in (WIP_CONSTANTS.RETASSY_TYPE,WIP_CONSTANTS.CPLASSY_TYPE)
11400: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED ;
11401:
11402: IF l_mti_lot_rec>0 THEN

Line 11399: and MTI.TRANSACTION_TYPE_ID in (WIP_CONSTANTS.RETASSY_TYPE,WIP_CONSTANTS.CPLASSY_TYPE)

11395: mtl_transactions_interface mti
11396: WHERE mtli.transaction_interface_id = mti.transaction_interface_id
11397: AND mti.transaction_header_id = p_mtl_header_id
11398: AND mti.transaction_action_id in (WIP_CONSTANTS.RETASSY_ACTION,WIP_CONSTANTS.CPLASSY_ACTION)
11399: and MTI.TRANSACTION_TYPE_ID in (WIP_CONSTANTS.RETASSY_TYPE,WIP_CONSTANTS.CPLASSY_TYPE)
11400: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED ;
11401:
11402: IF l_mti_lot_rec>0 THEN
11403: --ProcesOATxn is used only for Discrete jobs

Line 11414: AND mti.transaction_action_id in (WIP_CONSTANTS.RETASSY_ACTION,WIP_CONSTANTS.CPLASSY_ACTION)

11410: mtl_lot_numbers mln
11411: WHERE mti.organization_id = msi.organization_id
11412: AND mti.inventory_item_id = msi.inventory_item_id
11413: AND mti.transaction_header_id = p_mtl_header_id
11414: AND mti.transaction_action_id in (WIP_CONSTANTS.RETASSY_ACTION,WIP_CONSTANTS.CPLASSY_ACTION)
11415: AND mti.transaction_type_id in (WIP_CONSTANTS.RETASSY_TYPE,WIP_CONSTANTS.CPLASSY_TYPE)
11416: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
11417: AND mti.wip_entity_type =WIP_CONSTANTS.DISCRETE
11418: AND msi.lot_control_code = WIP_CONSTANTS.LOT

Line 11415: AND mti.transaction_type_id in (WIP_CONSTANTS.RETASSY_TYPE,WIP_CONSTANTS.CPLASSY_TYPE)

11411: WHERE mti.organization_id = msi.organization_id
11412: AND mti.inventory_item_id = msi.inventory_item_id
11413: AND mti.transaction_header_id = p_mtl_header_id
11414: AND mti.transaction_action_id in (WIP_CONSTANTS.RETASSY_ACTION,WIP_CONSTANTS.CPLASSY_ACTION)
11415: AND mti.transaction_type_id in (WIP_CONSTANTS.RETASSY_TYPE,WIP_CONSTANTS.CPLASSY_TYPE)
11416: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
11417: AND mti.wip_entity_type =WIP_CONSTANTS.DISCRETE
11418: AND msi.lot_control_code = WIP_CONSTANTS.LOT
11419: AND mln.lot_number = mtli.lot_number

Line 11417: AND mti.wip_entity_type =WIP_CONSTANTS.DISCRETE

11413: AND mti.transaction_header_id = p_mtl_header_id
11414: AND mti.transaction_action_id in (WIP_CONSTANTS.RETASSY_ACTION,WIP_CONSTANTS.CPLASSY_ACTION)
11415: AND mti.transaction_type_id in (WIP_CONSTANTS.RETASSY_TYPE,WIP_CONSTANTS.CPLASSY_TYPE)
11416: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
11417: AND mti.wip_entity_type =WIP_CONSTANTS.DISCRETE
11418: AND msi.lot_control_code = WIP_CONSTANTS.LOT
11419: AND mln.lot_number = mtli.lot_number
11420: AND mln.inventory_item_id = mti.inventory_item_id
11421: AND mln.organization_id = mti.organization_id)

Line 11418: AND msi.lot_control_code = WIP_CONSTANTS.LOT

11414: AND mti.transaction_action_id in (WIP_CONSTANTS.RETASSY_ACTION,WIP_CONSTANTS.CPLASSY_ACTION)
11415: AND mti.transaction_type_id in (WIP_CONSTANTS.RETASSY_TYPE,WIP_CONSTANTS.CPLASSY_TYPE)
11416: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
11417: AND mti.wip_entity_type =WIP_CONSTANTS.DISCRETE
11418: AND msi.lot_control_code = WIP_CONSTANTS.LOT
11419: AND mln.lot_number = mtli.lot_number
11420: AND mln.inventory_item_id = mti.inventory_item_id
11421: AND mln.organization_id = mti.organization_id)
11422: WHERE mtli.transaction_interface_id IN

Line 11429: AND mti.transaction_action_id in (WIP_CONSTANTS.RETASSY_ACTION,WIP_CONSTANTS.CPLASSY_ACTION)

11425: mtl_system_items msi
11426: WHERE mti.organization_id = msi.organization_id
11427: AND mti.inventory_item_id = msi.inventory_item_id
11428: AND mti.transaction_header_id = p_mtl_header_id
11429: AND mti.transaction_action_id in (WIP_CONSTANTS.RETASSY_ACTION,WIP_CONSTANTS.CPLASSY_ACTION)
11430: AND mti.transaction_type_id in (WIP_CONSTANTS.RETASSY_TYPE,WIP_CONSTANTS.CPLASSY_TYPE)
11431: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
11432: AND msi.lot_control_code = WIP_CONSTANTS.LOT
11433: AND mti.wip_entity_type = WIP_CONSTANTS.DISCRETE

Line 11430: AND mti.transaction_type_id in (WIP_CONSTANTS.RETASSY_TYPE,WIP_CONSTANTS.CPLASSY_TYPE)

11426: WHERE mti.organization_id = msi.organization_id
11427: AND mti.inventory_item_id = msi.inventory_item_id
11428: AND mti.transaction_header_id = p_mtl_header_id
11429: AND mti.transaction_action_id in (WIP_CONSTANTS.RETASSY_ACTION,WIP_CONSTANTS.CPLASSY_ACTION)
11430: AND mti.transaction_type_id in (WIP_CONSTANTS.RETASSY_TYPE,WIP_CONSTANTS.CPLASSY_TYPE)
11431: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
11432: AND msi.lot_control_code = WIP_CONSTANTS.LOT
11433: AND mti.wip_entity_type = WIP_CONSTANTS.DISCRETE
11434: )

Line 11432: AND msi.lot_control_code = WIP_CONSTANTS.LOT

11428: AND mti.transaction_header_id = p_mtl_header_id
11429: AND mti.transaction_action_id in (WIP_CONSTANTS.RETASSY_ACTION,WIP_CONSTANTS.CPLASSY_ACTION)
11430: AND mti.transaction_type_id in (WIP_CONSTANTS.RETASSY_TYPE,WIP_CONSTANTS.CPLASSY_TYPE)
11431: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
11432: AND msi.lot_control_code = WIP_CONSTANTS.LOT
11433: AND mti.wip_entity_type = WIP_CONSTANTS.DISCRETE
11434: )
11435: AND mtli.lot_expiration_date is null;
11436:

Line 11433: AND mti.wip_entity_type = WIP_CONSTANTS.DISCRETE

11429: AND mti.transaction_action_id in (WIP_CONSTANTS.RETASSY_ACTION,WIP_CONSTANTS.CPLASSY_ACTION)
11430: AND mti.transaction_type_id in (WIP_CONSTANTS.RETASSY_TYPE,WIP_CONSTANTS.CPLASSY_TYPE)
11431: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
11432: AND msi.lot_control_code = WIP_CONSTANTS.LOT
11433: AND mti.wip_entity_type = WIP_CONSTANTS.DISCRETE
11434: )
11435: AND mtli.lot_expiration_date is null;
11436:
11437: -- IF debug message level = 2, write statement below to log file

Line 11438: IF (l_log_level <= wip_constants.full_logging) THEN

11434: )
11435: AND mtli.lot_expiration_date is null;
11436:
11437: -- IF debug message level = 2, write statement below to log file
11438: IF (l_log_level <= wip_constants.full_logging) THEN
11439: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');
11440: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
11441: fnd_message.set_token('ENTITY2', 'MTL_TRANSACTION_LOTS_INTERFACE');
11442: l_msg := fnd_message.get;

Line 11457: AND mti.transaction_action_id in (WIP_CONSTANTS.RETASSY_ACTION,WIP_CONSTANTS.CPLASSY_ACTION)

11453: (SELECT mti.transaction_date + NVL(msi.shelf_life_days,0)
11454: FROM mtl_transactions_interface mti,
11455: mtl_system_items msi
11456: WHERE mti.transaction_header_id =p_mtl_header_id
11457: AND mti.transaction_action_id in (WIP_CONSTANTS.RETASSY_ACTION,WIP_CONSTANTS.CPLASSY_ACTION)
11458: AND mti.transaction_type_id in (WIP_CONSTANTS.RETASSY_TYPE,WIP_CONSTANTS.CPLASSY_TYPE)
11459: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
11460: AND mti.wip_entity_type =WIP_CONSTANTS.DISCRETE
11461: AND msi.lot_control_code = WIP_CONSTANTS.LOT

Line 11458: AND mti.transaction_type_id in (WIP_CONSTANTS.RETASSY_TYPE,WIP_CONSTANTS.CPLASSY_TYPE)

11454: FROM mtl_transactions_interface mti,
11455: mtl_system_items msi
11456: WHERE mti.transaction_header_id =p_mtl_header_id
11457: AND mti.transaction_action_id in (WIP_CONSTANTS.RETASSY_ACTION,WIP_CONSTANTS.CPLASSY_ACTION)
11458: AND mti.transaction_type_id in (WIP_CONSTANTS.RETASSY_TYPE,WIP_CONSTANTS.CPLASSY_TYPE)
11459: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
11460: AND mti.wip_entity_type =WIP_CONSTANTS.DISCRETE
11461: AND msi.lot_control_code = WIP_CONSTANTS.LOT
11462: AND msi.organization_id = mti.organization_id

Line 11460: AND mti.wip_entity_type =WIP_CONSTANTS.DISCRETE

11456: WHERE mti.transaction_header_id =p_mtl_header_id
11457: AND mti.transaction_action_id in (WIP_CONSTANTS.RETASSY_ACTION,WIP_CONSTANTS.CPLASSY_ACTION)
11458: AND mti.transaction_type_id in (WIP_CONSTANTS.RETASSY_TYPE,WIP_CONSTANTS.CPLASSY_TYPE)
11459: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
11460: AND mti.wip_entity_type =WIP_CONSTANTS.DISCRETE
11461: AND msi.lot_control_code = WIP_CONSTANTS.LOT
11462: AND msi.organization_id = mti.organization_id
11463: AND msi.inventory_item_id = mti.inventory_item_id
11464: AND msi.shelf_life_code = WIP_CONSTANTS.SHELF_LIFE

Line 11461: AND msi.lot_control_code = WIP_CONSTANTS.LOT

11457: AND mti.transaction_action_id in (WIP_CONSTANTS.RETASSY_ACTION,WIP_CONSTANTS.CPLASSY_ACTION)
11458: AND mti.transaction_type_id in (WIP_CONSTANTS.RETASSY_TYPE,WIP_CONSTANTS.CPLASSY_TYPE)
11459: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
11460: AND mti.wip_entity_type =WIP_CONSTANTS.DISCRETE
11461: AND msi.lot_control_code = WIP_CONSTANTS.LOT
11462: AND msi.organization_id = mti.organization_id
11463: AND msi.inventory_item_id = mti.inventory_item_id
11464: AND msi.shelf_life_code = WIP_CONSTANTS.SHELF_LIFE
11465: AND mtli.transaction_interface_id =

Line 11464: AND msi.shelf_life_code = WIP_CONSTANTS.SHELF_LIFE

11460: AND mti.wip_entity_type =WIP_CONSTANTS.DISCRETE
11461: AND msi.lot_control_code = WIP_CONSTANTS.LOT
11462: AND msi.organization_id = mti.organization_id
11463: AND msi.inventory_item_id = mti.inventory_item_id
11464: AND msi.shelf_life_code = WIP_CONSTANTS.SHELF_LIFE
11465: AND mtli.transaction_interface_id =
11466: mti.transaction_interface_id)
11467: WHERE mtli.lot_expiration_date IS NULL
11468: AND mtli.transaction_interface_id IN

Line 11475: AND mti.transaction_action_id in (WIP_CONSTANTS.RETASSY_ACTION,WIP_CONSTANTS.CPLASSY_ACTION)

11471: mtl_system_items msi
11472: WHERE mti.organization_id = msi.organization_id
11473: AND mti.inventory_item_id = msi.inventory_item_id
11474: AND mti.transaction_header_id = p_mtl_header_id
11475: AND mti.transaction_action_id in (WIP_CONSTANTS.RETASSY_ACTION,WIP_CONSTANTS.CPLASSY_ACTION)
11476: AND mti.transaction_type_id in (WIP_CONSTANTS.RETASSY_TYPE,WIP_CONSTANTS.CPLASSY_TYPE)
11477: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
11478: AND mti.wip_entity_type =WIP_CONSTANTS.DISCRETE
11479: AND msi.lot_control_code = WIP_CONSTANTS.LOT);

Line 11476: AND mti.transaction_type_id in (WIP_CONSTANTS.RETASSY_TYPE,WIP_CONSTANTS.CPLASSY_TYPE)

11472: WHERE mti.organization_id = msi.organization_id
11473: AND mti.inventory_item_id = msi.inventory_item_id
11474: AND mti.transaction_header_id = p_mtl_header_id
11475: AND mti.transaction_action_id in (WIP_CONSTANTS.RETASSY_ACTION,WIP_CONSTANTS.CPLASSY_ACTION)
11476: AND mti.transaction_type_id in (WIP_CONSTANTS.RETASSY_TYPE,WIP_CONSTANTS.CPLASSY_TYPE)
11477: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
11478: AND mti.wip_entity_type =WIP_CONSTANTS.DISCRETE
11479: AND msi.lot_control_code = WIP_CONSTANTS.LOT);
11480:

Line 11478: AND mti.wip_entity_type =WIP_CONSTANTS.DISCRETE

11474: AND mti.transaction_header_id = p_mtl_header_id
11475: AND mti.transaction_action_id in (WIP_CONSTANTS.RETASSY_ACTION,WIP_CONSTANTS.CPLASSY_ACTION)
11476: AND mti.transaction_type_id in (WIP_CONSTANTS.RETASSY_TYPE,WIP_CONSTANTS.CPLASSY_TYPE)
11477: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
11478: AND mti.wip_entity_type =WIP_CONSTANTS.DISCRETE
11479: AND msi.lot_control_code = WIP_CONSTANTS.LOT);
11480:
11481: -- IF debug message level = 2, write statement below to log file
11482: IF (l_log_level <= wip_constants.full_logging) THEN

Line 11479: AND msi.lot_control_code = WIP_CONSTANTS.LOT);

11475: AND mti.transaction_action_id in (WIP_CONSTANTS.RETASSY_ACTION,WIP_CONSTANTS.CPLASSY_ACTION)
11476: AND mti.transaction_type_id in (WIP_CONSTANTS.RETASSY_TYPE,WIP_CONSTANTS.CPLASSY_TYPE)
11477: AND mti.transaction_source_type_id = TPS_INV_JOB_OR_SCHED
11478: AND mti.wip_entity_type =WIP_CONSTANTS.DISCRETE
11479: AND msi.lot_control_code = WIP_CONSTANTS.LOT);
11480:
11481: -- IF debug message level = 2, write statement below to log file
11482: IF (l_log_level <= wip_constants.full_logging) THEN
11483: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');

Line 11482: IF (l_log_level <= wip_constants.full_logging) THEN

11478: AND mti.wip_entity_type =WIP_CONSTANTS.DISCRETE
11479: AND msi.lot_control_code = WIP_CONSTANTS.LOT);
11480:
11481: -- IF debug message level = 2, write statement below to log file
11482: IF (l_log_level <= wip_constants.full_logging) THEN
11483: fnd_message.set_name('WIP', 'WIP_UPDATED_ROWS');
11484: fnd_message.set_token('ENTITY1', SQL%ROWCOUNT);
11485: fnd_message.set_token('ENTITY2', 'MTL_TRANSACTION_LOTS_INTERFACE');
11486: l_msg := fnd_message.get;

Line 11520: IF (l_log_level <= wip_constants.full_logging) then

11516: p_business_flow_code => 26); -- discrete business flow code
11517: -- do not error out if label printing, only put warning message in log
11518: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
11519: wip_utilities.get_message_stack(p_msg => l_msg_stack);
11520: IF (l_log_level <= wip_constants.full_logging) then
11521: wip_logger.log(p_msg => 'An error has occurred with label printing.\n' ||
11522: 'The following error has occurred during ' ||
11523: 'printing: ' || l_msg_stack || '\n' ||
11524: 'Please check the Inventory log file for more ' ||

Line 11543: p_proc_phase => WIP_CONSTANTS.MOVE_PROC,

11539: (p_group_id => p_group_id,
11540: p_child_txn_id => p_child_txn_id,
11541: p_mtl_header_id => p_mtl_header_id,
11542: p_assy_header_id => p_mtl_header_id,
11543: p_proc_phase => WIP_CONSTANTS.MOVE_PROC,
11544: p_time_out => 0,
11545: p_move_mode => WIP_CONSTANTS.ONLINE,
11546: p_bf_mode => WIP_CONSTANTS.ONLINE,
11547: p_mtl_mode => WIP_CONSTANTS.ONLINE,

Line 11545: p_move_mode => WIP_CONSTANTS.ONLINE,

11541: p_mtl_header_id => p_mtl_header_id,
11542: p_assy_header_id => p_mtl_header_id,
11543: p_proc_phase => WIP_CONSTANTS.MOVE_PROC,
11544: p_time_out => 0,
11545: p_move_mode => WIP_CONSTANTS.ONLINE,
11546: p_bf_mode => WIP_CONSTANTS.ONLINE,
11547: p_mtl_mode => WIP_CONSTANTS.ONLINE,
11548: p_endDebug => FND_API.G_FALSE,
11549: p_initMsgList => FND_API.G_TRUE,

Line 11546: p_bf_mode => WIP_CONSTANTS.ONLINE,

11542: p_assy_header_id => p_mtl_header_id,
11543: p_proc_phase => WIP_CONSTANTS.MOVE_PROC,
11544: p_time_out => 0,
11545: p_move_mode => WIP_CONSTANTS.ONLINE,
11546: p_bf_mode => WIP_CONSTANTS.ONLINE,
11547: p_mtl_mode => WIP_CONSTANTS.ONLINE,
11548: p_endDebug => FND_API.G_FALSE,
11549: p_initMsgList => FND_API.G_TRUE,
11550: p_insertAssy => FND_API.G_FALSE,

Line 11547: p_mtl_mode => WIP_CONSTANTS.ONLINE,

11543: p_proc_phase => WIP_CONSTANTS.MOVE_PROC,
11544: p_time_out => 0,
11545: p_move_mode => WIP_CONSTANTS.ONLINE,
11546: p_bf_mode => WIP_CONSTANTS.ONLINE,
11547: p_mtl_mode => WIP_CONSTANTS.ONLINE,
11548: p_endDebug => FND_API.G_FALSE,
11549: p_initMsgList => FND_API.G_TRUE,
11550: p_insertAssy => FND_API.G_FALSE,
11551: p_do_backflush => p_do_backflush,

Line 11579: IF (l_log_level <= wip_constants.full_logging) THEN

11575: x_msg => l_error_msg);
11576: -- do not error out if label printing, only put warning message in log
11577: IF(l_return_status <> fnd_api.g_ret_sts_success) THEN
11578: wip_utilities.get_message_stack(p_msg => l_msg_stack);
11579: IF (l_log_level <= wip_constants.full_logging) THEN
11580: wip_logger.log(p_msg => 'An error has occurred with label printing.\n' ||
11581: 'The following error has occurred during ' ||
11582: 'printing: ' || l_msg_stack || '\n' ||
11583: 'Please check the Inventory log file for more ' ||

Line 11596: IF (l_log_level <= wip_constants.trace_logging) THEN

11592:
11593: x_returnStatus := fnd_api.g_ret_sts_success;
11594:
11595: -- write to the log file
11596: IF (l_log_level <= wip_constants.trace_logging) THEN
11597: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.processOATxn',
11598: p_procReturnStatus => x_returnStatus,
11599: p_msg => 'procedure complete',
11600: x_returnStatus => l_return_status);

Line 11617: IF (l_log_level <= wip_constants.trace_logging) THEN

11613: fnd_msg_pub.add;
11614: END LOOP;
11615: ROLLBACK TO SAVEPOINT s_oa_txn_proc;
11616: x_returnStatus := fnd_api.g_ret_sts_error;
11617: IF (l_log_level <= wip_constants.trace_logging) THEN
11618: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.processOATxn',
11619: p_procReturnStatus => x_returnStatus,
11620: p_msg => 'wip_movProc_priv.processOATxn failed : '
11621: || l_process_phase,

Line 11635: IF (l_log_level <= wip_constants.trace_logging) THEN

11631: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
11632: fnd_message.set_token('MESSAGE', l_error_msg);
11633: fnd_msg_pub.add;
11634:
11635: IF (l_log_level <= wip_constants.trace_logging) THEN
11636: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.processOATxn',
11637: p_procReturnStatus => x_returnStatus,
11638: p_msg => l_error_msg || ' : ' || l_process_phase,
11639: x_returnStatus => l_return_status);